add pfkeystat. sync with kame
This commit is contained in:
parent
7ee982bcac
commit
3b8a8567a1
@ -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" },
|
||||
@ -260,6 +271,9 @@ struct protox *protoprotox[] = {
|
||||
protox,
|
||||
#ifdef INET6
|
||||
ip6protox,
|
||||
#endif
|
||||
#ifdef IPSEC
|
||||
pfkeyprotox,
|
||||
#endif
|
||||
ipxprotox, atalkprotox,
|
||||
#ifdef NS
|
||||
@ -315,6 +329,10 @@ main(argc, argv)
|
||||
#ifdef INET6
|
||||
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;
|
||||
@ -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++)
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user