Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jan 2011 16:21:12 -0500
From:      John Nielsen <lists@jnielsen.net>
To:        "George V. Neville-Neil" <gnn@freebsd.org>
Cc:        svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Dan Allen <danallen46@airwired.net>
Subject:   Re: svn commit: r216964 - stable/8/usr.bin/netstat
Message-ID:  <394C0FD2-E197-4899-8868-DC761D3AFB03@jnielsen.net>
In-Reply-To: <201101041651.p04GpO15046054@svn.freebsd.org>
References:  <201101041651.p04GpO15046054@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
The build on -STABLE is broken for me at at least one other person today =
and my guess is that this commit is to blame.  My buildworld output:

=3D=3D=3D> usr.bin/netstat (all)
cc -O2 -pipe -march=3Dk6-3 -fno-strict-aliasing -DIPSEC -DSCTP =
-DNETGRAPH -DNDEBUG -std=3Dgnu99 -fstack-protector -Wsystem-headers =
-Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes =
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized =
-Wno-pointer-sign -c /usr/src/usr.bin/netstat/if.c
cc -O2 -pipe -march=3Dk6-3 -fno-strict-aliasing -DIPSEC -DSCTP =
-DNETGRAPH -DNDEBUG -std=3Dgnu99 -fstack-protector -Wsystem-headers =
-Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes =
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized =
-Wno-pointer-sign -c /usr/src/usr.bin/netstat/inet.c
/usr/src/usr.bin/netstat/inet.c: In function 'protopr':
/usr/src/usr.bin/netstat/inet.c:462: error: 'struct tcpcb' has no member =
named 't_sndrexmitpack'
/usr/src/usr.bin/netstat/inet.c:463: error: 'struct tcpcb' has no member =
named 't_rcvoopack'
/usr/src/usr.bin/netstat/inet.c:463: error: 'struct tcpcb' has no member =
named 't_sndzerowin'
*** Error code 1

Stop in /usr/src/usr.bin/netstat.
*** Error code 1

Stop in /usr/src/usr.bin.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.


JN

On Jan 4, 2011, at 11:51 AM, George V. Neville-Neil wrote:

> Author: gnn
> Date: Tue Jan  4 16:51:24 2011
> New Revision: 216964
> URL: http://svn.freebsd.org/changeset/base/216964
>=20
> Log:
>  MFC: 215434, 215724
>=20
>  Add new, per connection, statistics for TCP, including:
>  Retransmitted Packets
>  Zero Window Advertisements
>  Out of Order Receives
>=20
>  These statistics are available via the -T argument to
>  netstat(1).
>=20
> Modified:
>  stable/8/usr.bin/netstat/inet.c
>  stable/8/usr.bin/netstat/main.c
>  stable/8/usr.bin/netstat/netstat.1
>  stable/8/usr.bin/netstat/netstat.h
>=20
> Modified: stable/8/usr.bin/netstat/inet.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- stable/8/usr.bin/netstat/inet.c	Tue Jan  4 16:29:07 2011	=
(r216963)
> +++ stable/8/usr.bin/netstat/inet.c	Tue Jan  4 16:51:24 2011	=
(r216964)
> @@ -408,21 +408,29 @@ protopr(u_long off, const char *name, in
> 			if (Lflag)
> 				printf("%-5.5s %-14.14s %-22.22s\n",
> 				    "Proto", "Listen", "Local Address");
> -			else {
> +			if (Tflag)=20
> +				printf((Aflag && !Wflag) ?
> +			    "%-5.5s %-6.6s %-6.6s %-6.6s %-18.18s %s\n" =
:
> +			    "%-5.5s %-6.6s %-6.6s %-6.6s %-22.22s %s\n",
> +				    "Proto", "Rexmit", "OOORcv", =
"0-win",
> +				    "Local Address", "Foreign Address");
> +			if (xflag) {
> +				printf("%-6.6s %-6.6s %-6.6s %-6.6s =
%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s ",
> +				       "R-MBUF", "S-MBUF", "R-CLUS",=20
> +				       "S-CLUS", "R-HIWA", "S-HIWA",=20
> +				       "R-LOWA", "S-LOWA", "R-BCNT",=20
> +				       "S-BCNT", "R-BMAX", "S-BMAX");
> +				printf("%7.7s %7.7s %7.7s %7.7s %7.7s =
%7.7s\n",
> +				       "rexmt", "persist", "keep",
> +				       "2msl", "delack", "rcvtime");
> +			}
> +			if (!xflag && !Tflag) {
> 				printf((Aflag && !Wflag) ?=20
> 				       "%-5.5s %-6.6s %-6.6s  %-18.18s =
%-18.18s" :
> 				       "%-5.5s %-6.6s %-6.6s  %-22.22s =
%-22.22s",
> 				       "Proto", "Recv-Q", "Send-Q",
> 				       "Local Address", "Foreign =
Address");
> -				if (xflag)
> -					printf("%-6.6s %-6.6s %-6.6s =
%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %s\n",
> -					       	"R-MBUF", "S-MBUF", =
"R-CLUS",=20
> -						"S-CLUS", "R-HIWA", =
"S-HIWA",=20
> -						"R-LOWA", "S-LOWA", =
"R-BCNT",=20
> -						"S-BCNT", "R-BMAX", =
"S-BMAX",
> -					       "(state)");
> -				else
> -					printf("(state)\n");
> +				printf("(state)\n");
> 			}
> 			first =3D 0;
> 		}
> @@ -449,6 +457,10 @@ protopr(u_long off, const char *name, in
> 			snprintf(buf1, 15, "%d/%d/%d", so->so_qlen,
> 			    so->so_incqlen, so->so_qlimit);
> 			printf("%-14.14s ", buf1);
> +		} else if (Tflag) {
> +			if (istcp)
> +				printf("%6u %6u %6u ", =
tp->t_sndrexmitpack,
> +				       tp->t_rcvoopack, =
tp->t_sndzerowin);
> 		} else {
> 			printf("%6u %6u ", so->so_rcv.sb_cc, =
so->so_snd.sb_cc);
> 		}
> @@ -525,7 +537,7 @@ protopr(u_long off, const char *name, in
> 				       so->so_rcv.sb_mbcnt, =
so->so_snd.sb_mbcnt,
> 				       so->so_rcv.sb_mbmax, =
so->so_snd.sb_mbmax);
> 		}
> -		if (istcp && !Lflag) {
> +		if (istcp && !Lflag && !xflag && !Tflag) {
> 			if (tp->t_state < 0 || tp->t_state >=3D =
TCP_NSTATES)
> 				printf("%d", tp->t_state);
> 			else {
>=20
> Modified: stable/8/usr.bin/netstat/main.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- stable/8/usr.bin/netstat/main.c	Tue Jan  4 16:29:07 2011	=
(r216963)
> +++ stable/8/usr.bin/netstat/main.c	Tue Jan  4 16:51:24 2011	=
(r216964)
> @@ -340,6 +340,7 @@ int	rflag;		/* show routing tables =
(or r
> int	sflag;		/* show protocol statistics */
> int	tflag;		/* show i/f watchdog timers */
> int	Wflag;		/* wide display */
> +int	Tflag;		/* TCP Information */
> int	xflag;		/* extra information, includes all socket buffer =
info */
> int	zflag;		/* zero stats */
>=20
> @@ -359,7 +360,8 @@ main(int argc, char *argv[])
>=20
> 	af =3D AF_UNSPEC;
>=20
> -	while ((ch =3D getopt(argc, argv, =
"AaBbdf:ghI:iLlM:mN:np:q:rSstuWw:xz")) !=3D -1)
> +	while ((ch =3D getopt(argc, argv, =
"AaBbdf:ghI:iLlM:mN:np:Qq:rSTstuWw:xz"))
> +	    !=3D -1)
> 		switch(ch) {
> 		case 'A':
> 			Aflag =3D 1;
> @@ -473,6 +475,9 @@ main(int argc, char *argv[])
> 			interval =3D atoi(optarg);
> 			iflag =3D 1;
> 			break;
> +		case 'T':
> +			Tflag =3D 1;
> +			break;
> 		case 'x':
> 			xflag =3D 1;
> 			break;
> @@ -512,6 +517,9 @@ main(int argc, char *argv[])
> 	if (!live)
> 		setgid(getgid());
>=20
> +	if (xflag && Tflag)=20
> +		errx(1, "-x and -T are incompatible, pick one.");
> +
> 	if (Bflag) {
> 		if (!live)
> 			usage();
> @@ -782,7 +790,7 @@ static void
> usage(void)
> {
> 	(void)fprintf(stderr, =
"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
> -"usage: netstat [-AaLnSWx] [-f protocol_family | -p protocol]\n"
> +"usage: netstat [-AaLnSTWx] [-f protocol_family | -p protocol]\n"
> "               [-M core] [-N system]",
> "       netstat -i | -I interface [-abdhntW] [-f address_family]\n"
> "               [-M core] [-N system]",
>=20
> Modified: stable/8/usr.bin/netstat/netstat.1
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- stable/8/usr.bin/netstat/netstat.1	Tue Jan  4 16:29:07 2011	=
(r216963)
> +++ stable/8/usr.bin/netstat/netstat.1	Tue Jan  4 16:51:24 2011	=
(r216964)
> @@ -49,7 +49,7 @@ depending on the options for the informa
> .It Xo
> .Bk -words
> .Nm
> -.Op Fl AaLnSWx
> +.Op Fl AaLnSTWx
> .Op Fl f Ar protocol_family | Fl p Ar protocol
> .Op Fl M Ar core
> .Op Fl N Ar system
> @@ -88,6 +88,10 @@ but show ports symbolically.
> If
> .Fl x
> is present display full socket buffer statistics for each internet =
socket.
> +When
> +.Fl T
> +is present, display information from the TCP control block, including
> +retransmits, out-of-order packets received, and zero-sized windows =
advertised.
> .It Xo
> .Bk -words
> .Nm
>=20
> Modified: stable/8/usr.bin/netstat/netstat.h
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- stable/8/usr.bin/netstat/netstat.h	Tue Jan  4 16:29:07 2011	=
(r216963)
> +++ stable/8/usr.bin/netstat/netstat.h	Tue Jan  4 16:51:24 2011	=
(r216964)
> @@ -51,6 +51,7 @@ extern int	numeric_port;	/* show ports n
> extern int	rflag;	/* show routing tables (or routing stats) */
> extern int	sflag;	/* show protocol statistics */
> extern int	tflag;	/* show i/f watchdog timers */
> +extern int	Tflag;  /* show TCP control block info */
> extern int	Wflag;	/* wide display */
> extern int	xflag;	/* extended display, includes all socket buffer =
info */
> extern int	zflag;	/* zero stats */
> _______________________________________________
> svn-src-stable-8@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-stable-8
> To unsubscribe, send any mail to =
"svn-src-stable-8-unsubscribe@freebsd.org"
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?394C0FD2-E197-4899-8868-DC761D3AFB03>