diff options
Diffstat (limited to 'sys/netinet6/scope6.c')
-rw-r--r-- | sys/netinet6/scope6.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index 0e4d303..1a9d038 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -487,6 +487,22 @@ in6_getscopezone(const struct ifnet *ifp, int scope) } /* + * Extracts scope from adddress @dst, stores cleared address + * inside @dst and zone inside @scopeid + */ +void +in6_splitscope(const struct in6_addr *src, struct in6_addr *dst, + uint32_t *scopeid) +{ + uint32_t zoneid; + + *dst = *src; + zoneid = ntohs(in6_getscope(dst)); + in6_clearscope(dst); + *scopeid = zoneid; +} + +/* * This function is for checking sockaddr_in6 structure passed * from the application level (usually). * |