diff options
author | cy <cy@FreeBSD.org> | 2017-05-30 03:33:48 +0000 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2017-05-30 03:33:48 +0000 |
commit | 6768cd3f753df534a4c8cb88c8bddbbf2e08d30b (patch) | |
tree | 9eb380cf5154c4ffe31adf9199390604f8ad836f /sys/contrib/ipfilter | |
parent | 8e79febcf2f5ad3de033cc615aec90a8f82ad89e (diff) | |
download | FreeBSD-src-6768cd3f753df534a4c8cb88c8bddbbf2e08d30b.zip FreeBSD-src-6768cd3f753df534a4c8cb88c8bddbbf2e08d30b.tar.gz |
MFC r318606:
Refactor & compact struct i6addr_t #ifdef: remove redundant structure
definintion when USE_INET6 is false.
Diffstat (limited to 'sys/contrib/ipfilter')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_fil.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 646f5d6..35d7f6a 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -143,11 +143,12 @@ typedef int (* lookupfunc_t) __P((struct ipf_main_softc_s *, void *, * i6addr is used as a container for both IPv4 and IPv6 addresses, as well * as other types of objects, depending on its qualifier. */ -#ifdef USE_INET6 typedef union i6addr { u_32_t i6[4]; struct in_addr in4; +#ifdef USE_INET6 struct in6_addr in6; +#endif void *vptr[2]; lookupfunc_t lptr[2]; struct { @@ -156,19 +157,6 @@ typedef union i6addr { int name; } i6un; } i6addr_t; -#else -typedef union i6addr { - u_32_t i6[4]; - struct in_addr in4; - void *vptr[2]; - lookupfunc_t lptr[2]; - struct { - u_short type; - u_short subtype; - int name; - } i6un; -} i6addr_t; -#endif #define in4_addr in4.s_addr #define iplookupnum i6[1] |