diff options
author | ume <ume@FreeBSD.org> | 2004-02-05 12:08:35 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2004-02-05 12:08:35 +0000 |
commit | 756361c57e76deae895429266625b448186a62b8 (patch) | |
tree | af2b6c2aac58debd3bb687f1df876d0cfc314aa0 /usr.bin | |
parent | 315524cfd593b5fa38f782d5c1941a2df598be65 (diff) | |
download | FreeBSD-src-756361c57e76deae895429266625b448186a62b8.zip FreeBSD-src-756361c57e76deae895429266625b448186a62b8.tar.gz |
printed statistics about source address selection rules.
Obtained from: KAME
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/inet6.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index 4eb898d..6b90b75 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -335,6 +335,25 @@ static const char *ip6nh[] = { "#255", }; +static char *srcrule_str[] = { + "first candidate", + "same address", + "appropriate scope", + "deprecated address", + "home address", + "outgoing interface", + "matching label", + "public/temporary address", + "alive interface", + "preferred interface", + "rule #10", + "rule #11", + "rule #12", + "rule #13", + "longest match", + "rule #15", +}; + /* * Dump IP6 statistics structure. */ @@ -489,6 +508,12 @@ ip6_stats(u_long off __unused, const char *name, int af1 __unused) p1a(ip6s_forward_cachehit, "\t%llu forward cache hit\n"); p1a(ip6s_forward_cachemiss, "\t%llu forward cache miss\n"); + printf("\tSource addresses selection rule applied:\n"); + for (i = 0; i < 16; i++) { + if (ip6stat.ip6s_sources_rule[i]) + printf("\t\t%llu %s\n", ip6stat.ip6s_sources_rule[i], + srcrule_str[i]); + } #undef p #undef p1a } |