Changeset b4edc96 in mainline for uspace/lib/inet/src/addr.c
- Timestamp:
- 2021-08-08T09:20:20Z (4 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/addr.c
rd5ed54b rb4edc96 37 37 #include <errno.h> 38 38 #include <inet/addr.h> 39 #include <inet/eth_addr.h> 39 40 #include <stdio.h> 40 41 #include <stddef.h> … … 54 55 const addr32_t addr32_broadcast_all_hosts = 0xffffffff; 55 56 56 const addr48_t addr48_broadcast = { 57 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 58 }; 59 60 static const addr48_t inet_addr48_solicited_node = { 57 static const eth_addr_t inet_eth_addr_solicited_node = { 61 58 0x33, 0x33, 0xff, 0, 0, 0 62 59 }; … … 77 74 } 78 75 79 /** Compare addr48.80 *81 * @return Non-zero if equal, zero if not equal.82 */83 int addr48_compare(const addr48_t *a, const addr48_t *b)84 {85 return memcmp(a->b, b->b, 6) == 0;86 }87 88 76 /** Compare addr128. 89 77 * … … 101 89 * 102 90 */ 103 void addr48_solicited_node(const addr128_t ip, addr48_t *mac)104 { 105 memcpy(&mac->b[0], &inet_ addr48_solicited_node.b[0], 3);91 void eth_addr_solicited_node(const addr128_t ip, eth_addr_t *mac) 92 { 93 memcpy(&mac->b[0], &inet_eth_addr_solicited_node.b[0], 3); 106 94 memcpy(&mac->b[3], ip + 13, 3); 107 95 }
Note:
See TracChangeset
for help on using the changeset viewer.