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_set - Assign Ethernet address to a net_device
305 * @addr: address to assign
307 * Assign given address to the net_device, addr_assign_type is not changed.
315 * eth_hw_addr_inherit - Copy dev_addr from another net_device
319 * Copy the Ethernet address from one net_device to another along with
320 * the address attributes (addr_assign_type).
325 dst->addr_assign_type = src->addr_assign_type; in eth_hw_addr_inherit()
326 ether_addr_copy(dst->dev_addr, src->dev_addr); in eth_hw_addr_inherit()
330 * ether_addr_equal - Compare two Ethernet addresses
331 * @addr1: Pointer to a six-byte array containing the Ethernet address
332 * @addr2: Pointer other six-byte array containing the Ethernet address
336 * Please note: addr1 & addr2 must both be aligned to u16.
354 * ether_addr_equal_64bits - Compare two Ethernet addresses
384 * ether_addr_equal_unaligned - Compare two not u16 aligned Ethernet addresses
385 * @addr1: Pointer to a six-byte array containing the Ethernet address
386 * @addr2: Pointer other six-byte array containing the Ethernet address
390 * Please note: Use only when any Ethernet address may not be u16 aligned.
402 * ether_addr_equal_masked - Compare two Ethernet addresses with a mask
403 * @addr1: Pointer to a six-byte array containing the 1st Ethernet address
404 * @addr2: Pointer to a six-byte array containing the 2nd Ethernet address
405 * @mask: Pointer to a six-byte array containing the Ethernet address bitmask
425 * ether_addr_to_u64 - Convert an Ethernet address into a u64 value.
426 * @addr: Pointer to a six-byte array containing the Ethernet address
428 * Return a u64 value of the address
442 * u64_to_ether_addr - Convert a u64 to an Ethernet address.
443 * @u: u64 to convert to an Ethernet MAC address
444 * @addr: Pointer to a six-byte array to contain the Ethernet address
450 for (i = ETH_ALEN - 1; i >= 0; i--) { in u64_to_ether_addr()
457 * eth_addr_dec - Decrement the given MAC address
459 * @addr: Pointer to a six-byte array containing Ethernet address to decrement
465 u--; in eth_addr_dec()
470 * eth_addr_inc() - Increment the given MAC address.
471 * @addr: Pointer to a six-byte array containing Ethernet address to increment.
482 * is_etherdev_addr - Tell if given Ethernet address belongs to the device.
484 * @addr: Pointer to a six-byte array containing the Ethernet address
486 * Compare passed address with all addresses of the device. Return true if the
487 * address if one of the device addresses.
500 res = ether_addr_equal_64bits(addr, ha->addr); in is_etherdev_addr()
510 * compare_ether_header - Compare two Ethernet headers
515 * This assumes that the network header (i.e., IP header) is 4-byte
516 * aligned OR the platform can handle unaligned access. This is the
547 * eth_skb_pad - Pad buffer to mininum number of octets for Ethernet frame