Changeset b4edc96 in mainline for uspace/lib/inet/src/eth_addr.c
- Timestamp:
- 2021-08-08T09:20:20Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3e6bca8
- Parents:
- d5ed54b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/inet/src/eth_addr.c
rd5ed54b rb4edc96 38 38 #include <mem.h> 39 39 40 void mac48_encode(addr48_t *addr, void *buf) 40 const eth_addr_t eth_addr_broadcast = { 41 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 42 }; 43 44 void eth_addr_encode(eth_addr_t *addr, void *buf) 41 45 { 42 46 uint8_t *bp = (uint8_t *)buf; … … 45 49 } 46 50 47 void mac48_decode(const void *buf, addr48_t *addr)51 void eth_addr_decode(const void *buf, eth_addr_t *addr) 48 52 { 49 53 const uint8_t *bp = (uint8_t *)buf; … … 52 56 } 53 57 58 /** Compare ethernet addresses. 59 * 60 * @return Non-zero if equal, zero if not equal. 61 */ 62 int eth_addr_compare(const eth_addr_t *a, const eth_addr_t *b) 63 { 64 return memcmp(a->b, b->b, ETH_ADDR_SIZE) == 0; 65 } 66 54 67 /** @} 55 68 */
Note:
See TracChangeset
for help on using the changeset viewer.