summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authoritojun <itojun@FreeBSD.org>2000-07-05 02:02:54 +0000
committeritojun <itojun@FreeBSD.org>2000-07-05 02:02:54 +0000
commite512fbcdce2f18d76d6051b0381f8a70cd9ec039 (patch)
treeea937f2ecb7baa59830cd8c97ef4dff2d1fad07f /usr.bin/netstat/main.c
parentb2c4e4cdeb1e0b7021a9e17da57f6b016cefccb6 (diff)
downloadFreeBSD-src-e512fbcdce2f18d76d6051b0381f8a70cd9ec039.zip
FreeBSD-src-e512fbcdce2f18d76d6051b0381f8a70cd9ec039.tar.gz
add pfkeystat. sync with kame
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c23
1 files changed, 23 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++)
OpenPOWER on IntegriCloud