PERFORCE change 166876 for review
Gabor Pali
pgj at FreeBSD.org
Fri Jul 31 21:23:02 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166876
Change 166876 by pgj at petymeg-current on 2009/07/31 21:22:22
Add support for IPv6 multicast forwarding statistics.
Affected files ...
.. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat.h#56 edit
.. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_internal.h#53 edit
.. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_stat.c#23 edit
.. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_util.c#61 edit
Differences ...
==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat.h#56 (text+ko) ====
@@ -174,6 +174,9 @@
stat_IPsec,
#endif
stat_mroute,
+#ifdef INET6
+ stat_mroute6,
+#endif
stat_MAX,
stat_Invalid,
};
@@ -230,6 +233,9 @@
struct ipcomp_stat;
#endif
struct mroute_stat;
+#ifdef INET6
+struct mroute6_stat;
+#endif
__BEGIN_DECLS
const char *netstat_strerror(int);
@@ -1142,4 +1148,22 @@
u_int64_t netstat_mroutes_get_q_overflow(const struct mroute_stat *);
u_int64_t netstat_mroutes_get_pkt2large(const struct mroute_stat *);
u_int64_t netstat_mroutes_get_upq_sockfull(const struct mroute_stat *);
+
+#ifdef INET6
+const struct mroute6_stat *netstat_get_mroute6stats(const struct stat_type *);
+
+u_int64_t netstat_mroute6s_get_mfc_lookups(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_mfc_misses(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_upcalls(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_no_route(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_bad_tunnel(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_cant_tunnel(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_wrong_if(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_upq_ovflw(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_cache_cleanups(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_drop_sel(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_q_overflow(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_pkt2large(const struct mroute6_stat *);
+u_int64_t netstat_mroute6s_get_upq_sockfull(const struct mroute6_stat *);
+#endif
#endif /* !_NETSTAT_H_ */
==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_internal.h#53 (text+ko) ====
@@ -74,6 +74,9 @@
#include <netipsec/ipsec.h>
#endif
#include <netinet/ip_mroute.h>
+#ifdef INET6
+#include <netinet6/ip6_mroute.h>
+#endif
#include "netstat.h"
@@ -407,6 +410,12 @@
struct mrtstat s;
};
+#ifdef INET6
+struct mroute6_stat {
+ struct mrt6stat s;
+};
+#endif
+
/* Timestamp type. */
struct timestamp_type {
u_int32_t ts_sec;
==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_stat.c#23 (text+ko) ====
@@ -94,7 +94,10 @@
{ IPCOMPSTAT_VERSION, "net.inet.ipcomp.stats", "_ipcompstat" },
{ IPSECSTAT_VERSION, "net.inet.ipsec.ipsecstats", "_ipsec4stat" },
#endif
- { MRTSTAT_VERSION, "net.inet.ip.mrtstat", "_mrtstat" }
+ { MRTSTAT_VERSION, "net.inet.ip.mrtstat", "_mrtstat" },
+#ifdef INET6
+ { MRT6STAT_VERSION, "net.inet6.ip6.mrt6stat", "_mrt6stat" },
+#endif
};
int
==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_util.c#61 (text+ko) ====
@@ -2125,6 +2125,26 @@
MRT_ACC(upq_sockfull);
#undef MRT_ACC
+#ifdef INET6
+#define MRT6_ACC(field) \
+ STATS_ACCX(u_int64_t,mroute6,field,mrt6s_##field)
+
+STATS_GET(mroute6,mroute6);
+MRT6_ACC(mfc_lookups);
+MRT6_ACC(mfc_misses);
+MRT6_ACC(upcalls);
+MRT6_ACC(no_route);
+MRT6_ACC(bad_tunnel);
+MRT6_ACC(cant_tunnel);
+MRT6_ACC(wrong_if);
+MRT6_ACC(upq_ovflw);
+MRT6_ACC(cache_cleanups);
+MRT6_ACC(drop_sel);
+MRT6_ACC(q_overflow);
+MRT6_ACC(pkt2large);
+MRT6_ACC(upq_sockfull);
+#undef MRT6_ACC
+#endif
static const char *icmpnames[ICMP_MAXTYPE + 1] = {
"echo reply", /* RFC 792 */
More information about the p4-projects
mailing list