Changeset 2177b39 in mainline
- Timestamp:
- 2021-08-08T21:51:33Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 241ab7e
- Parents:
- a7f7b9c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/inet/src/eth_addr.c
ra7f7b9c3 r2177b39 39 39 #include <stdio.h> 40 40 41 /** Ethernet broadcast address */ 41 42 const eth_addr_t eth_addr_broadcast = 42 43 ETH_ADDR_INITIALIZER(0xff, 0xff, 0xff, 0xff, 0xff, 0xff); 43 44 45 /** Encode Ethernet address to buffer. 46 * 47 * Encode Ethernet address as a sequence of ETH_ADDR_SIZE bytes into a buffer. 48 * 49 * @param addr Ethernet address 50 * @param buf Buffer (ETH_ADDR_SIZE bytes in size) to store bytes 51 */ 44 52 void eth_addr_encode(eth_addr_t *addr, void *buf) 45 53 { … … 54 62 } 55 63 64 /** Decode Ethernet address from buffer. 65 * 66 * Decode Ethernet address from a buffer containing a sequence of 67 * ETH_ADDR_SIZE bytes. 68 * 69 * @param buf Buffer (ETH_ADDR_SIZE bytes in size) 70 * @param addr Place to store Ethernet address 71 */ 56 72 void eth_addr_decode(const void *buf, eth_addr_t *addr) 57 73 { … … 67 83 } 68 84 69 /** Compare ethernet addresses.85 /** Compare Ethernet addresses. 70 86 * 71 * @return Non-zero if equal, zero if not equal. 87 * @param a First address 88 * @param b Second address, 89 * @return -1, 0, 1 iff @a a is less than, equal to or greater than @a b, 90 * respectively. 72 91 */ 73 92 int eth_addr_compare(const eth_addr_t *a, const eth_addr_t *b) … … 81 100 } 82 101 102 /** Format Ethernet address as a string. 103 * 104 * @param addr Ethernet address 105 * @param saddr Structure for storing string representation 106 * of @a addr. The caller can access it as @a saddr->str. 107 */ 83 108 void eth_addr_format(eth_addr_t *addr, eth_addr_str_t *saddr) 84 109 {
Note:
See TracChangeset
for help on using the changeset viewer.