From owner-p4-projects@FreeBSD.ORG Fri Jul 31 21:23:01 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 539661065673; Fri, 31 Jul 2009 21:23:01 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14EB6106564A for ; Fri, 31 Jul 2009 21:23:01 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 03A1C8FC0A for ; Fri, 31 Jul 2009 21:23:01 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6VLN0Es086369 for ; Fri, 31 Jul 2009 21:23:00 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6VLN03o086365 for perforce@freebsd.org; Fri, 31 Jul 2009 21:23:00 GMT (envelope-from pgj@FreeBSD.org) Date: Fri, 31 Jul 2009 21:23:00 GMT Message-Id: <200907312123.n6VLN03o086365@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 166876 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2009 21:23:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=166876 Change 166876 by pgj@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 #endif #include +#ifdef INET6 +#include +#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 */