diff options
author | bz <bz@FreeBSD.org> | 2008-12-15 21:50:54 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-12-15 21:50:54 +0000 |
commit | 03f6bb9dc9b98a515613b815d92f251d470edfeb (patch) | |
tree | 30c97711914bd53cfed83d5b45b42b5a723ba6b1 /sys/netinet6/ip6_output.c | |
parent | ea29c11cdebf56f08c85084a4e99c193160a87b7 (diff) | |
download | FreeBSD-src-03f6bb9dc9b98a515613b815d92f251d470edfeb.zip FreeBSD-src-03f6bb9dc9b98a515613b815d92f251d470edfeb.tar.gz |
Another step assimilating IPv[46] PCB code - directly use
the inpcb names rather than the following IPv6 compat macros:
in6pcb,in6p_sp, in6p_ip6_nxt,in6p_flowinfo,in6p_vflag,
in6p_flags,in6p_socket,in6p_lport,in6p_fport,in6p_ppcb and
sotoin6pcb().
Apart from removing duplicate code in netipsec, this is a pure
whitespace, not a functional change.
Discussed with: rwatson
Reviewed by: rwatson (version before review requested changes)
MFC after: 4 weeks (set the timer and see then)
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r-- | sys/netinet6/ip6_output.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index c0f614f..d871363 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1464,7 +1464,7 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt) else { /* -1 = kernel default */ in6p->in6p_hops = optval; - if ((in6p->in6p_vflag & + if ((in6p->inp_vflag & INP_IPV4) != 0) in6p->inp_ip_ttl = optval; } @@ -1472,19 +1472,19 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt) #define OPTSET(bit) \ do { \ if (optval) \ - in6p->in6p_flags |= (bit); \ + in6p->inp_flags |= (bit); \ else \ - in6p->in6p_flags &= ~(bit); \ + in6p->inp_flags &= ~(bit); \ } while (/*CONSTCOND*/ 0) #define OPTSET2292(bit) \ do { \ - in6p->in6p_flags |= IN6P_RFC2292; \ + in6p->inp_flags |= IN6P_RFC2292; \ if (optval) \ - in6p->in6p_flags |= (bit); \ + in6p->inp_flags |= (bit); \ else \ - in6p->in6p_flags &= ~(bit); \ + in6p->inp_flags &= ~(bit); \ } while (/*CONSTCOND*/ 0) -#define OPTBIT(bit) (in6p->in6p_flags & (bit) ? 1 : 0) +#define OPTBIT(bit) (in6p->inp_flags & (bit) ? 1 : 0) case IPV6_RECVPKTINFO: /* cannot mix with RFC2292 */ @@ -1578,16 +1578,16 @@ do { \ * available only prior to bind(2). * see ipng mailing list, Jun 22 2001. */ - if (in6p->in6p_lport || + if (in6p->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr)) { error = EINVAL; break; } OPTSET(IN6P_IPV6_V6ONLY); if (optval) - in6p->in6p_vflag &= ~INP_IPV4; + in6p->inp_vflag &= ~INP_IPV4; else - in6p->in6p_vflag |= INP_IPV4; + in6p->inp_vflag |= INP_IPV4; break; case IPV6_RECVTCLASS: /* cannot mix with RFC2292 XXX */ @@ -1768,18 +1768,18 @@ do { \ switch (optval) { case IPV6_PORTRANGE_DEFAULT: - in6p->in6p_flags &= ~(IN6P_LOWPORT); - in6p->in6p_flags &= ~(IN6P_HIGHPORT); + in6p->inp_flags &= ~(IN6P_LOWPORT); + in6p->inp_flags &= ~(IN6P_HIGHPORT); break; case IPV6_PORTRANGE_HIGH: - in6p->in6p_flags &= ~(IN6P_LOWPORT); - in6p->in6p_flags |= IN6P_HIGHPORT; + in6p->inp_flags &= ~(IN6P_LOWPORT); + in6p->inp_flags |= IN6P_HIGHPORT; break; case IPV6_PORTRANGE_LOW: - in6p->in6p_flags &= ~(IN6P_HIGHPORT); - in6p->in6p_flags |= IN6P_LOWPORT; + in6p->inp_flags &= ~(IN6P_HIGHPORT); + in6p->inp_flags |= IN6P_LOWPORT; break; default: @@ -1891,7 +1891,7 @@ do { \ case IPV6_PORTRANGE: { int flags; - flags = in6p->in6p_flags; + flags = in6p->inp_flags; if (flags & IN6P_HIGHPORT) optval = IPV6_PORTRANGE_HIGH; else if (flags & IN6P_LOWPORT) @@ -2050,7 +2050,7 @@ ip6_raw_ctloutput(struct socket *so, struct sockopt *sopt) { int error = 0, optval, optlen; const int icmp6off = offsetof(struct icmp6_hdr, icmp6_cksum); - struct in6pcb *in6p = sotoin6pcb(so); + struct inpcb *in6p = sotoinpcb(so); int level, op, optname; level = sopt->sopt_level; @@ -3326,7 +3326,7 @@ ip6_splithdr(struct mbuf *m, struct ip6_exthdrs *exthdrs) * Compute IPv6 extension header length. */ int -ip6_optlen(struct in6pcb *in6p) +ip6_optlen(struct inpcb *in6p) { int len; |