Changeset 5856b627 in mainline for uspace/lib/c/generic/inet/addr.c
- Timestamp:
- 2013-08-20T12:36:48Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 26e2de3
- Parents:
- 0ee999d (diff), 4da8fdb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inet/addr.c
r0ee999d r5856b627 52 52 }; 53 53 54 static const addr48_t inet_addr48_solicited_node = { 55 0x33, 0x33, 0xff, 0, 0, 0 56 }; 57 54 58 static const inet_addr_t inet_addr_any_addr = { 55 59 .family = AF_INET, … … 72 76 } 73 77 78 int addr48_compare(const addr48_t a, const addr48_t b) 79 { 80 return memcmp(a, b, 6); 81 } 82 74 83 int addr128_compare(const addr128_t a, const addr128_t b) 75 84 { 76 85 return memcmp(a, b, 16); 86 } 87 88 /** Compute solicited node MAC multicast address from target IPv6 address 89 * 90 * @param ip Target IPv6 address 91 * @param mac Solicited MAC address to be assigned 92 * 93 */ 94 void addr48_solicited_node(const addr128_t ip, addr48_t mac) 95 { 96 memcpy(mac, inet_addr48_solicited_node, 3); 97 memcpy(mac + 3, ip + 13, 3); 77 98 } 78 99
Note:
See TracChangeset
for help on using the changeset viewer.