svn commit: r216964 - stable/8/usr.bin/netstat
John Nielsen
lists at jnielsen.net
Tue Jan 4 21:51:13 UTC 2011
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:
===> usr.bin/netstat (all)
cc -O2 -pipe -march=k6-3 -fno-strict-aliasing -DIPSEC -DSCTP -DNETGRAPH -DNDEBUG -std=gnu99 -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=k6-3 -fno-strict-aliasing -DIPSEC -DSCTP -DNETGRAPH -DNDEBUG -std=gnu99 -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
>
> Log:
> MFC: 215434, 215724
>
> Add new, per connection, statistics for TCP, including:
> Retransmitted Packets
> Zero Window Advertisements
> Out of Order Receives
>
> These statistics are available via the -T argument to
> netstat(1).
>
> 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
>
> Modified: stable/8/usr.bin/netstat/inet.c
> ==============================================================================
> --- 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)
> + 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",
> + "S-CLUS", "R-HIWA", "S-HIWA",
> + "R-LOWA", "S-LOWA", "R-BCNT",
> + "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) ?
> "%-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",
> - "S-CLUS", "R-HIWA", "S-HIWA",
> - "R-LOWA", "S-LOWA", "R-BCNT",
> - "S-BCNT", "R-BMAX", "S-BMAX",
> - "(state)");
> - else
> - printf("(state)\n");
> + printf("(state)\n");
> }
> first = 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 >= TCP_NSTATES)
> printf("%d", tp->t_state);
> else {
>
> Modified: stable/8/usr.bin/netstat/main.c
> ==============================================================================
> --- 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 */
>
> @@ -359,7 +360,8 @@ main(int argc, char *argv[])
>
> af = AF_UNSPEC;
>
> - while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:q:rSstuWw:xz")) != -1)
> + while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:Qq:rSTstuWw:xz"))
> + != -1)
> switch(ch) {
> case 'A':
> Aflag = 1;
> @@ -473,6 +475,9 @@ main(int argc, char *argv[])
> interval = atoi(optarg);
> iflag = 1;
> break;
> + case 'T':
> + Tflag = 1;
> + break;
> case 'x':
> xflag = 1;
> break;
> @@ -512,6 +517,9 @@ main(int argc, char *argv[])
> if (!live)
> setgid(getgid());
>
> + if (xflag && Tflag)
> + 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]",
>
> Modified: stable/8/usr.bin/netstat/netstat.1
> ==============================================================================
> --- 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
>
> Modified: stable/8/usr.bin/netstat/netstat.h
> ==============================================================================
> --- 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 at 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 at freebsd.org"
>
More information about the svn-src-all
mailing list