svn commit: r189637 - in head: sys/netinet usr.bin/sockstat
Robert Watson
rwatson at FreeBSD.org
Tue Mar 10 10:57:42 PDT 2009
Author: rwatson
Date: Tue Mar 10 17:57:41 2009
New Revision: 189637
URL: http://svn.freebsd.org/changeset/base/189637
Log:
Remove unused v6 macro aliases for inpcb fields:
in6p_ip6_nxt
in6p_vflag
in6p_flags
in6p_socket
in6p_lport
in6p_fport
in6p_ppcb
Remove unused v6 macro aliases for inpcb flags:
IN6P_HIGHPORT
IN6P_LOWPORT
IN6P_ANONPORT
IN6P_RECVIF
IN6P_MTUDISC
IN6P_FAITH
IN6P_CONTROLOPTS
References to in6p_lport and in6_fport in sockstat are also replaced with
normal inp_lport and inp_fport references.
MFC after: 3 days
Reviewed by: bz
Modified:
head/sys/netinet/in_pcb.h
head/usr.bin/sockstat/sockstat.c
Modified: head/sys/netinet/in_pcb.h
==============================================================================
--- head/sys/netinet/in_pcb.h Tue Mar 10 17:54:04 2009 (r189636)
+++ head/sys/netinet/in_pcb.h Tue Mar 10 17:57:41 2009 (r189637)
@@ -214,19 +214,12 @@ struct inpcb {
#define in6p_faddr inp_inc.inc6_faddr
#define in6p_laddr inp_inc.inc6_laddr
#define in6p_hops inp_depend6.inp6_hops /* default hop limit */
-#define in6p_ip6_nxt inp_ip_p
#define in6p_flowinfo inp_flow
-#define in6p_vflag inp_vflag
#define in6p_options inp_depend6.inp6_options
#define in6p_outputopts inp_depend6.inp6_outputopts
#define in6p_moptions inp_depend6.inp6_moptions
#define in6p_icmp6filt inp_depend6.inp6_icmp6filt
#define in6p_cksum inp_depend6.inp6_cksum
-#define in6p_flags inp_flags /* for KAME src sync over BSD*'s */
-#define in6p_socket inp_socket /* for KAME src sync over BSD*'s */
-#define in6p_lport inp_lport /* for KAME src sync over BSD*'s */
-#define in6p_fport inp_fport /* for KAME src sync over BSD*'s */
-#define in6p_ppcb inp_ppcb /* for KAME src sync over BSD*'s */
/*
* The range of the generation count, as used in this implementation, is 9e19.
@@ -434,19 +427,6 @@ void inp_4tuple_get(struct inpcb *inp,
IN6P_TCLASS|IN6P_AUTOFLOWLABEL|IN6P_RFC2292|\
IN6P_MTU)
- /* for KAME src sync over BSD*'s */
-#define IN6P_HIGHPORT INP_HIGHPORT
-#define IN6P_LOWPORT INP_LOWPORT
-#define IN6P_ANONPORT INP_ANONPORT
-#define IN6P_RECVIF INP_RECVIF
-#define IN6P_MTUDISC INP_MTUDISC
-#define IN6P_FAITH INP_FAITH
-#define IN6P_CONTROLOPTS INP_CONTROLOPTS
- /*
- * socket AF version is {newer than,or include}
- * actual datagram AF version
- */
-
#define INPLOOKUP_WILDCARD 1
#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
#define sotoin6pcb(so) sotoinpcb(so) /* for KAME src sync over BSD*'s */
Modified: head/usr.bin/sockstat/sockstat.c
==============================================================================
--- head/usr.bin/sockstat/sockstat.c Tue Mar 10 17:54:04 2009 (r189636)
+++ head/usr.bin/sockstat/sockstat.c Tue Mar 10 17:57:41 2009 (r189637)
@@ -351,8 +351,8 @@ gather_inet(int proto)
continue;
#undef __IN_IS_ADDR_LOOPBACK
} else if (inp->inp_vflag & INP_IPV6) {
- if ((inp->in6p_fport == 0 && !opt_l) ||
- (inp->in6p_fport != 0 && !opt_c))
+ if ((inp->inp_fport == 0 && !opt_l) ||
+ (inp->inp_fport != 0 && !opt_c))
continue;
if (opt_L &&
(IN6_IS_ADDR_LOOPBACK(&inp->in6p_faddr) ||
@@ -376,9 +376,9 @@ gather_inet(int proto)
} else if (inp->inp_vflag & INP_IPV6) {
sock->family = AF_INET6;
sockaddr(&sock->laddr, sock->family,
- &inp->in6p_laddr, inp->in6p_lport);
+ &inp->in6p_laddr, inp->inp_lport);
sockaddr(&sock->faddr, sock->family,
- &inp->in6p_faddr, inp->in6p_fport);
+ &inp->in6p_faddr, inp->inp_fport);
}
sock->vflag = inp->inp_vflag;
sock->protoname = protoname;
More information about the svn-src-all
mailing list