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 | 7441a46b3b63a837e1970d649a4e8a373e413caa (patch) | |
tree | b2b38b5120e98717b7fbdf53a88a60d5cc07c0a3 /sys/contrib | |
parent | 787d26a1a0c4bc3ec95386322ed245169ed07022 (diff) | |
download | FreeBSD-src-7441a46b3b63a837e1970d649a4e8a373e413caa.zip FreeBSD-src-7441a46b3b63a837e1970d649a4e8a373e413caa.tar.gz |
MFC r318606:
Refactor & compact struct i6addr_t #ifdef: remove redundant structure
definintion when USE_INET6 is false.
Diffstat (limited to 'sys/contrib')
-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 170cc53..a88c7a0 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] |