Lines Matching +full:address +full:- +full:aligned
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
68 * is_link_local_ether_addr - Determine if given Ethernet address is link-local
69 * @addr: Pointer to a six-byte array containing the Ethernet address
71 * Return true if address is link local reserved addr (01:80:c2:00:00:0X) per
74 * Please note: addr must be aligned to u16.
91 * is_zero_ether_addr - Determine if give Ethernet address is all zeros.
92 * @addr: Pointer to a six-byte array containing the Ethernet address
94 * Return true if the address is all zeroes.
96 * Please note: addr must be aligned to u16.
110 * is_multicast_ether_addr - Determine if the Ethernet address is a multicast.
111 * @addr: Pointer to a six-byte array containing the Ethernet address
113 * Return true if the address is a multicast address.
114 * By definition the broadcast address is also a multicast address.
124 return 0x01 & (a >> ((sizeof(a) * 8) - 8)); in is_multicast_ether_addr()
144 * is_local_ether_addr - Determine if the Ethernet address is locally-assigned one (IEEE 802).
145 * @addr: Pointer to a six-byte array containing the Ethernet address
147 * Return true if the address is a local address.
155 * is_broadcast_ether_addr - Determine if the Ethernet address is broadcast
156 * @addr: Pointer to a six-byte array containing the Ethernet address
158 * Return true if the address is the broadcast address.
160 * Please note: addr must be aligned to u16.
170 * is_unicast_ether_addr - Determine if the Ethernet address is unicast
171 * @addr: Pointer to a six-byte array containing the Ethernet address
173 * Return true if the address is a unicast address.
181 * is_valid_ether_addr - Determine if the given Ethernet address is valid
182 * @addr: Pointer to a six-byte array containing the Ethernet address
184 * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not
185 * a multicast address, and is not FF:FF:FF:FF:FF:FF.
187 * Return true if the address is valid.
189 * Please note: addr must be aligned to u16.
193 /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to in is_valid_ether_addr()
199 * eth_proto_is_802_3 - Determine if a given Ethertype/length is a protocol
217 * eth_random_addr - Generate software assigned random Ethernet address
218 * @addr: Pointer to a six-byte array containing the Ethernet address
220 * Generate a random Ethernet address (MAC) that is not multicast
233 * eth_broadcast_addr - Assign broadcast address
234 * @addr: Pointer to a six-byte array containing the Ethernet address
236 * Assign the broadcast address to the given address array.
244 * eth_zero_addr - Assign zero address
245 * @addr: Pointer to a six-byte array containing the Ethernet address
247 * Assign the zero address to the given address array.
255 * eth_hw_addr_random - Generate software assigned random Ethernet and
259 * Generate a random Ethernet address (MAC) to be used by a net device
265 dev->addr_assign_type = NET_ADDR_RANDOM; in eth_hw_addr_random()
266 eth_random_addr(dev->dev_addr); in eth_hw_addr_random()
270 * eth_hw_addr_crc - Calculate CRC from netdev_hw_addr
271 * @ha: pointer to hardware address
273 * Calculate CRC from a hardware address as basis for filter hashes.
277 return ether_crc(ETH_ALEN, ha->addr); in eth_hw_addr_crc()
281 * ether_addr_copy - Copy an Ethernet address
282 * @dst: Pointer to a six-byte array Ethernet address destination
283 * @src: Pointer to a six-byte array Ethernet address source
285 * Please note: dst & src must both be aligned to u16.
303 * eth_hw_addr_inherit - Copy dev_addr from another net_device
307 * Copy the Ethernet address from one net_device to another along with
308 * the address attributes (addr_assign_type).
313 dst->addr_assign_type = src->addr_assign_type; in eth_hw_addr_inherit()
314 ether_addr_copy(dst->dev_addr, src->dev_addr); in eth_hw_addr_inherit()
318 * ether_addr_equal - Compare two Ethernet addresses
319 * @addr1: Pointer to a six-byte array containing the Ethernet address
320 * @addr2: Pointer other six-byte array containing the Ethernet address
324 * Please note: addr1 & addr2 must both be aligned to u16.
342 * ether_addr_equal_64bits - Compare two Ethernet addresses
371 * ether_addr_equal_unaligned - Compare two not u16 aligned Ethernet addresses
372 * @addr1: Pointer to a six-byte array containing the Ethernet address
373 * @addr2: Pointer other six-byte array containing the Ethernet address
377 * Please note: Use only when any Ethernet address may not be u16 aligned.
389 * ether_addr_equal_masked - Compare two Ethernet addresses with a mask
390 * @addr1: Pointer to a six-byte array containing the 1st Ethernet address
391 * @addr2: Pointer to a six-byte array containing the 2nd Ethernet address
392 * @mask: Pointer to a six-byte array containing the Ethernet address bitmask
412 * ether_addr_to_u64 - Convert an Ethernet address into a u64 value.
413 * @addr: Pointer to a six-byte array containing the Ethernet address
415 * Return a u64 value of the address
429 * u64_to_ether_addr - Convert a u64 to an Ethernet address.
430 * @u: u64 to convert to an Ethernet MAC address
431 * @addr: Pointer to a six-byte array to contain the Ethernet address
437 for (i = ETH_ALEN - 1; i >= 0; i--) { in u64_to_ether_addr()
444 * eth_addr_dec - Decrement the given MAC address
446 * @addr: Pointer to a six-byte array containing Ethernet address to decrement
452 u--; in eth_addr_dec()
457 * eth_addr_inc() - Increment the given MAC address.
458 * @addr: Pointer to a six-byte array containing Ethernet address to increment.
469 * is_etherdev_addr - Tell if given Ethernet address belongs to the device.
471 * @addr: Pointer to a six-byte array containing the Ethernet address
473 * Compare passed address with all addresses of the device. Return true if the
474 * address if one of the device addresses.
487 res = ether_addr_equal_64bits(addr, ha->addr); in is_etherdev_addr()
497 * compare_ether_header - Compare two Ethernet headers
502 * This assumes that the network header (i.e., IP header) is 4-byte
503 * aligned OR the platform can handle unaligned access. This is the
534 * eth_skb_pad - Pad buffer to mininum number of octets for Ethernet frame