Changeset 30c5d13 in mainline
- Timestamp:
- 2013-07-16T17:27:42Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9ae6fc7
- Parents:
- 1f97352
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inet/addr.c
r1f97352 r30c5d13 260 260 } 261 261 262 int inet_naddr_compare(const inet_naddr_t *naddr, const inet_addr_t *addr) 263 { 264 if (naddr->family != addr->family) 265 return 0; 266 267 switch (naddr->family) { 268 case AF_INET: 269 return (naddr->addr == addr->addr); 270 case AF_INET6: 271 return addr128_compare(naddr->addr6, addr->addr6); 272 default: 273 return 0; 274 } 275 } 276 262 277 int inet_naddr_compare_mask(const inet_naddr_t *naddr, const inet_addr_t *addr) 263 278 { -
uspace/lib/c/include/inet/addr.h
r1f97352 r30c5d13 97 97 extern int inet_addr_is_any(const inet_addr_t *); 98 98 99 extern int inet_naddr_compare(const inet_naddr_t *, const inet_addr_t *); 99 100 extern int inet_naddr_compare_mask(const inet_naddr_t *, const inet_addr_t *); 100 101 -
uspace/srv/net/inetsrv/addrobj.c
r1f97352 r30c5d13 119 119 inet_addrobj_t, addr_list); 120 120 121 if (inet_naddr_compare_mask(&naddr->naddr, addr)) { 122 fibril_mutex_unlock(&addr_list_lock); 123 log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find: found %p", 124 naddr); 125 return naddr; 121 switch (find) { 122 case iaf_net: 123 if (inet_naddr_compare_mask(&naddr->naddr, addr)) { 124 fibril_mutex_unlock(&addr_list_lock); 125 log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find: found %p", 126 naddr); 127 return naddr; 128 } 129 break; 130 case iaf_addr: 131 if (inet_naddr_compare(&naddr->naddr, addr)) { 132 fibril_mutex_unlock(&addr_list_lock); 133 log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_addrobj_find: found %p", 134 naddr); 135 return naddr; 136 } 137 break; 126 138 } 127 139 }
Note:
See TracChangeset
for help on using the changeset viewer.