diff options
author | itojun <itojun@FreeBSD.org> | 2000-07-05 02:02:54 +0000 |
---|---|---|
committer | itojun <itojun@FreeBSD.org> | 2000-07-05 02:02:54 +0000 |
commit | e512fbcdce2f18d76d6051b0381f8a70cd9ec039 (patch) | |
tree | ea937f2ecb7baa59830cd8c97ef4dff2d1fad07f | |
parent | b2c4e4cdeb1e0b7021a9e17da57f6b016cefccb6 (diff) | |
download | FreeBSD-src-e512fbcdce2f18d76d6051b0381f8a70cd9ec039.zip FreeBSD-src-e512fbcdce2f18d76d6051b0381f8a70cd9ec039.tar.gz |
add pfkeystat. sync with kame
-rw-r--r-- | usr.bin/netstat/main.c | 23 | ||||
-rw-r--r-- | usr.bin/netstat/netstat.h | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 87c3a73..453eb79 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -143,6 +143,8 @@ static struct nlist nl[] = { { "_mf6ctable" }, #define N_MIF6TABLE 36 { "_mif6table" }, +#define N_PFKEYSTAT 37 + { "_pfkeystat" }, { "" }, }; @@ -203,6 +205,15 @@ struct protox ip6protox[] = { }; #endif /*INET6*/ +#ifdef IPSEC +struct protox pfkeyprotox[] = { + { -1, N_PFKEYSTAT, 1, 0, + pfkey_stats, NULL, "pfkey", 0 }, + { -1, -1, 0, 0, + 0, NULL, 0, 0 } +}; +#endif + struct protox atalkprotox[] = { { N_DDPCB, N_DDPSTAT, 1, atalkprotopr, ddp_stats, NULL, "ddp" }, @@ -261,6 +272,9 @@ struct protox *protoprotox[] = { #ifdef INET6 ip6protox, #endif +#ifdef IPSEC + pfkeyprotox, +#endif ipxprotox, atalkprotox, #ifdef NS nsprotox, @@ -316,6 +330,10 @@ main(argc, argv) else if (strcmp(optarg, "inet6") == 0) af = AF_INET6; #endif /*INET6*/ +#ifdef INET6 + else if (strcmp(optarg, "pfkey") == 0) + af = PF_KEY; +#endif /*INET6*/ else if (strcmp(optarg, "unix") == 0) af = AF_UNIX; else if (strcmp(optarg, "atalk") == 0) @@ -505,6 +523,11 @@ main(argc, argv) for (tp = ip6protox; tp->pr_name; tp++) printproto(tp, tp->pr_name); #endif /*INET6*/ +#ifdef IPSEC + if (af == PF_KEY || af == AF_UNSPEC) + for (tp = pfkeyprotox; tp->pr_name; tp++) + printproto(tp, tp->pr_name); +#endif /*IPSEC*/ if (af == AF_IPX || af == AF_UNSPEC) { kread(0, 0, 0); for (tp = ipxprotox; tp->pr_name; tp++) diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index 6a329f9..70bfbf0 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -88,6 +88,10 @@ char *routename6 __P((struct sockaddr_in6 *)); char *netname6 __P((struct sockaddr_in6 *, struct in6_addr *)); #endif /*INET6*/ +#ifdef IPSEC +void pfkey_stats __P((u_long, char *)); +#endif + void bdg_stats __P((u_long, char *)); void mbpr __P((void)); |