=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/main.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- src/usr.bin/netstat/main.c 1997/06/29 20:18:01 1.11 +++ src/usr.bin/netstat/main.c 1997/07/23 04:38:33 1.12 @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.11 1997/06/29 20:18:01 millert Exp $ */ +/* $OpenBSD: main.c,v 1.12 1997/07/23 04:38:33 denny Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ #if 0 static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; #else -static char *rcsid = "$OpenBSD: main.c,v 1.11 1997/06/29 20:18:01 millert Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.12 1997/07/23 04:38:33 denny Exp $"; #endif #endif /* not lint */ @@ -147,6 +147,10 @@ { "_espstat"}, #define N_IP4STAT 38 { "_ip4stat"}, +#define N_DDPSTAT 39 + { "_ddpstat"}, +#define N_DDPCB 40 + { "_ddpcb"}, { ""}, }; @@ -213,8 +217,15 @@ 0, 0 } }; -struct protox *protoprotox[] = { protox, ipxprotox, nsprotox, isoprotox, NULL }; +struct protox atalkprotox[] = { + { N_DDPCB, N_DDPSTAT, 1, atalkprotopr, + ddp_stats, "ddp" }, + { -1, -1, 0, 0, + 0, 0 } +}; +struct protox *protoprotox[] = { protox, ipxprotox, nsprotox, isoprotox, atalkprotox, NULL }; + static void printproto __P((struct protox *, char *)); static void usage __P((void)); static struct protox *name2protox __P((char *)); @@ -263,6 +274,8 @@ af = AF_ISO; else if (strcmp(optarg, "encap") == 0) af = AF_ENCAP; + else if (strcmp(optarg, "atalk") == 0) + af = AF_APPLETALK; else { (void)fprintf(stderr, "%s: %s: unknown address family\n", @@ -429,6 +442,9 @@ printproto(tp, tp->pr_name); if ((af == AF_UNIX || af == AF_UNSPEC) && !sflag) unixpr(nl[N_UNIXSW].n_value); + if (af == AF_APPLETALK || af == AF_UNSPEC) + for (tp = atalkprotox; tp->pr_name; tp++) + printproto(tp, tp->pr_name); exit(0); }