diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2005-02-10 14:25:09 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2005-02-10 14:25:09 +0000 |
commit | 17c3fb0a6d195d88dc659b3d984a37496d2a3beb (patch) | |
tree | 617a0d87709f9d0d33cb77a7b03fbb74d2e7788f | |
parent | 7ba285852c57519e95c0adb0d3c5bda648ee6f00 (diff) |
backout previous; i committed to wrong repository (i meant to commit kame)
-rw-r--r-- | usr.bin/netstat/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/netstat/inet.c | 78 | ||||
-rw-r--r-- | usr.bin/netstat/main.c | 16 | ||||
-rw-r--r-- | usr.bin/netstat/netstat.h | 5 |
4 files changed, 6 insertions, 97 deletions
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile index 5c5ad3e8c84..ca5e2a34cbf 100644 --- a/usr.bin/netstat/Makefile +++ b/usr.bin/netstat/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.13 2005/02/10 05:28:58 itojun Exp $ +# $OpenBSD: Makefile,v 1.14 2005/02/10 14:25:08 itojun Exp $ PROG= netstat SRCS= if.c inet.c inet6.c ipx.c main.c mbuf.c mroute.c ns.c route.c \ @@ -13,6 +13,4 @@ INET6?= yes CPPFLAGS+= -DINET6 .endif -CPPFLAGS+= -DDCCP - .include <bsd.prog.mk> diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 5ae71825751..26bff285170 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.91 2005/02/10 05:28:58 itojun Exp $ */ +/* $OpenBSD: inet.c,v 1.92 2005/02/10 14:25:08 itojun Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -static const char *rcsid = "$OpenBSD: inet.c,v 1.91 2005/02/10 05:28:58 itojun Exp $"; +static const char *rcsid = "$OpenBSD: inet.c,v 1.92 2005/02/10 14:25:08 itojun Exp $"; #endif #endif /* not lint */ @@ -71,11 +71,6 @@ static const char *rcsid = "$OpenBSD: inet.c,v 1.91 2005/02/10 05:28:58 itojun E #include <netinet/ip_ipip.h> #include <netinet/ip_ipcomp.h> #include <netinet/ip_ether.h> -#ifdef DCCP -#include <netinet/dccp.h> -#define DCCPSTATES -#include <netinet/dccp_var.h> -#endif #include <netinet/ip_carp.h> #include <net/if.h> #include <net/pfvar.h> @@ -96,9 +91,6 @@ static const char *rcsid = "$OpenBSD: inet.c,v 1.91 2005/02/10 05:28:58 itojun E struct inpcb inpcb; struct tcpcb tcpcb; -#ifdef DCCP -struct dccpcb dccpcb; -#endif struct socket sockb; static void protopr0(u_long, char *, int); @@ -137,9 +129,6 @@ protopr0(u_long off, char *name, int af) struct inpcb *head, *next, *prev; struct inpcb inpcb; int istcp, israw; -#ifdef DCCP - int isdccp; -#endif int first = 1; char *name0; char namebuf[20]; @@ -149,9 +138,6 @@ protopr0(u_long off, char *name, int af) return; istcp = strcmp(name, "tcp") == 0; israw = strncmp(name, "ip", 2) == 0; -#ifdef DCCP - isdccp = strcmp(name, "dccp") == 0; -#endif kread(off, (char *)&table, sizeof table); prev = head = (struct inpcb *)&((struct inpcbtable *)off)->inpt_queue.cqh_first; @@ -187,12 +173,6 @@ protopr0(u_long off, char *name, int af) kread((u_long)inpcb.inp_ppcb, (char *)&tcpcb, sizeof (tcpcb)); } -#ifdef DCCP - if (isdccp) { - kread((u_long)inpcb.inp_ppcb, - (char *)&dccpcb, sizeof (dccpcb)); - } -#endif if (first) { printf("Active Internet connections"); if (aflag) @@ -211,11 +191,7 @@ protopr0(u_long off, char *name, int af) first = 0; } if (Aflag) { -#ifdef DCCP - if (istcp || isdccp) -#else if (istcp) -#endif printf("%*p ", PLEN, inpcb.inp_ppcb); else printf("%*p ", PLEN, prev); @@ -420,56 +396,6 @@ udp_stats(u_long off, char *name) #undef p1 } -#ifdef DCCP -void -dccp_stats(off, name) - u_long off; - char *name; -{ - struct dccpstat dccpstat; - - if (off == 0) - return; - printf("%s:\n", name); - kread(off, (char *)&dccpstat, sizeof (dccpstat)); - -#define p(f, m) if (dccpstat.f || sflag <= 1) \ - printf(m, dccpstat.f, plural(dccpstat.f)) -#define p1a(f, m) if (dccpstat.f || sflag <= 1) \ - printf(m, dccpstat.f) - p(dccps_ipackets, "\t%lu packet%s received\n"); - p(dccps_ibytes, "\t%lu byte%s received\n"); - p(dccps_connattempt, "\t%lu connection request%s\n"); - p(dccps_connects, "\t%lu connection%s established\n"); - p(dccps_drops, "\t%lu packet%s dropped\n"); - p(dccps_badlen, "\t%lu packet%s with bad data length field\n"); - p(dccps_badsum, "\t%lu packet%s with bad checksum\n"); - p(dccps_badseq, "\t%lu packet%s with bad sequencenumber\n"); - p(dccps_noport, "\t%lu packet%s dropped due to no socket\n"); - p(dccps_opackets, "\t%lu packet%s output\n"); - p(dccps_obytes, "\t%lu byte%s output\n"); - - printf("\n\tTCPlike Sender:\n"); - p(tcplikes_send_conn, "\t%lu connection%s established\n"); - p(tcplikes_send_reploss, "\t%lu data packet%s reported lost\n"); - p(tcplikes_send_assloss, "\t%lu data packet%s assumed lost\n"); - p(tcplikes_send_ackrecv, "\t%lu acknowledgement%s received\n"); - p(tcplikes_send_missack, "\t%lu ack packet%s assumed lost\n"); - p(tcplikes_send_badseq, "\t%lu bad sequence number on outgoing packet%s\n"); - p(tcplikes_send_memerr, "\t%lu memory allocation error%s\n"); - - printf("\tTCPlike Receiver:\n"); - p(tcplikes_recv_conn, "\t%lu connection%s established\n"); - p(tcplikes_recv_datarecv, "\t%lu data packet%s received\n"); - p(tcplikes_recv_ackack, "\t%lu Ack-on-ack%s received\n"); - p(tcplikes_recv_acksent, "\t%lu acknowledgement packet%s sent\n"); - p(tcplikes_recv_memerr, "\t%lu memory allocation error%s\n"); - -#undef p -#undef p1a -} -#endif - /* * Dump IP statistics structure. */ diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 53ac6b98d50..83e43082ee8 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.51 2005/02/10 05:28:58 itojun Exp $ */ +/* $OpenBSD: main.c,v 1.52 2005/02/10 14:25:08 itojun Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -40,7 +40,7 @@ char copyright[] = #if 0 static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; #else -static char *rcsid = "$OpenBSD: main.c,v 1.51 2005/02/10 05:28:58 itojun Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.52 2005/02/10 14:25:08 itojun Exp $"; #endif #endif /* not lint */ @@ -185,10 +185,6 @@ struct nlist nl[] = { { "_pfsyncstats" }, #define N_PIMSTAT 59 { "_pimstat" }, -#define N_DCCPSTAT 60 - { "_dccpstat" }, -#define N_DCCPBTABLE 61 - { "_dccpbtable" }, { ""}, }; @@ -204,10 +200,6 @@ struct protox { tcp_stats, "tcp" }, { N_UDBTABLE, N_UDPSTAT, 1, protopr, udp_stats, "udp" }, -#ifdef DCCP - { N_DCCPBTABLE, N_DCCPSTAT, 1, protopr, - dccp_stats, "dccp" }, -#endif { N_RAWIPTABLE, N_IPSTAT, 1, protopr, ip_stats, "ip" }, { -1, N_ICMPSTAT, 1, 0, @@ -240,10 +232,6 @@ struct protox ip6protox[] = { 0, "tcp" }, { N_UDBTABLE, N_UDPSTAT, 1, ip6protopr, 0, "udp" }, -#ifdef DCCP - { N_DCCPBTABLE, N_DCCPSTAT, 1, ip6protopr, - dccp_stats, "dccp" }, -#endif { N_RAWIP6TABLE,N_IP6STAT, 1, ip6protopr, ip6_stats, "ip6" }, { -1, N_ICMP6STAT, 1, 0, diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index 6ff2cdb2866..f4685d60d33 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: netstat.h,v 1.30 2005/02/10 05:28:58 itojun Exp $ */ +/* $OpenBSD: netstat.h,v 1.31 2005/02/10 14:25:08 itojun Exp $ */ /* $NetBSD: netstat.h,v 1.6 1996/05/07 02:55:05 thorpej Exp $ */ /* @@ -73,9 +73,6 @@ void ip6protopr(u_long, char *); #endif void tcp_stats(u_long, char *); void udp_stats(u_long, char *); -#ifdef DCCP -void dccp_stats(u_long, char *); -#endif void ip_stats(u_long, char *); void icmp_stats(u_long, char *); void igmp_stats(u_long, char *); |