ipv6.h (971f359ddcb2e7a0d577479c7561bda407febe1b) | ipv6.h (b1cacb6820e0afc4aeeea67bcb5296a316862cad) |
---|---|
1/* 2 * Linux INET6 implementation 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * 7 * $Id: ipv6.h,v 1.1 2002/05/20 15:13:07 jgrimm Exp $ 8 * --- 238 unchanged lines hidden (view full) --- 247 * Function prototype for build_xmit 248 */ 249 250typedef int (*inet_getfrag_t) (const void *data, 251 struct in6_addr *addr, 252 char *, 253 unsigned int, unsigned int); 254 | 1/* 2 * Linux INET6 implementation 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * 7 * $Id: ipv6.h,v 1.1 2002/05/20 15:13:07 jgrimm Exp $ 8 * --- 238 unchanged lines hidden (view full) --- 247 * Function prototype for build_xmit 248 */ 249 250typedef int (*inet_getfrag_t) (const void *data, 251 struct in6_addr *addr, 252 char *, 253 unsigned int, unsigned int); 254 |
255extern int __ipv6_addr_type(const struct in6_addr *addr); 256static inline int ipv6_addr_type(const struct in6_addr *addr) 257{ 258 return __ipv6_addr_type(addr) & 0xffff; 259} |
|
255 | 260 |
256extern int ipv6_addr_type(const struct in6_addr *addr); 257 | |
258static inline int ipv6_addr_scope(const struct in6_addr *addr) 259{ | 261static inline int ipv6_addr_scope(const struct in6_addr *addr) 262{ |
260 return ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK; | 263 return __ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK; |
261} 262 | 264} 265 |
266static inline int __ipv6_addr_src_scope(int type) 267{ 268 return (type == IPV6_ADDR_ANY ? __IPV6_ADDR_SCOPE_INVALID : (type >> 16)); 269} 270 271static inline int ipv6_addr_src_scope(const struct in6_addr *addr) 272{ 273 return __ipv6_addr_src_scope(__ipv6_addr_type(addr)); 274} 275 |
|
263static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2) 264{ 265 return memcmp((const void *) a1, (const void *) a2, sizeof(struct in6_addr)); 266} 267 268static inline void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2) 269{ 270 memcpy((void *) a1, (const void *) a2, sizeof(struct in6_addr)); --- 285 unchanged lines hidden --- | 276static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2) 277{ 278 return memcmp((const void *) a1, (const void *) a2, sizeof(struct in6_addr)); 279} 280 281static inline void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2) 282{ 283 memcpy((void *) a1, (const void *) a2, sizeof(struct in6_addr)); --- 285 unchanged lines hidden --- |