--- sys/netinet6/scope6_var.h (svn+ssh://svn.freebsd.org/base/head) (revision 261548) +++ sys/netinet6/scope6_var.h (working copy) @@ -35,6 +35,7 @@ #ifdef _KERNEL #include +#define IPV6_ADDR_SCOPES_COUNT 16 struct scope6_id { /* @@ -41,12 +42,9 @@ struct scope6_id { * 16 is correspondent to 4bit multicast scope field. * i.e. from node-local to global with some reserved/unassigned types. */ - u_int32_t s6id_list[16]; + uint32_t s6id_list[IPV6_ADDR_SCOPES_COUNT]; }; -VNET_DECLARE(int, deembed_scopeid); -#define V_deembed_scopeid VNET(deembed_scopeid) - void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); @@ -57,9 +55,13 @@ int scope6_get_default(struct scope6_id *); u_int32_t scope6_addr2default(struct in6_addr *); int sa6_embedscope(struct sockaddr_in6 *, int); int sa6_recoverscope(struct sockaddr_in6 *); +int sa6_checkzone(struct sockaddr_in6 *); +int sa6_checkzone_ifp(struct ifnet *, struct sockaddr_in6 *); int in6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); int in6_clearscope(struct in6_addr *); uint16_t in6_getscope(struct in6_addr *); +uint32_t in6_getscopezone(const struct ifnet *, int); +struct ifnet* in6_getlinkifnet(uint32_t); #endif /* _KERNEL */ #endif /* _NETINET6_SCOPE6_VAR_H_ */