PERFORCE change 166802 for review
Gabor Pali
pgj at FreeBSD.org
Thu Jul 30 16:57:53 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166802
Change 166802 by pgj at petymeg-current on 2009/07/30 16:57:10
Standardize and add header for PIM6 and IPv6 Multicast Routing
statistics.
Affected files ...
.. //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/ip6_mroute.c#3 edit
.. //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/ip6_mroute.h#2 edit
.. //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/pim6_var.h#2 edit
Differences ...
==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/ip6_mroute.c#3 (text+ko) ====
@@ -166,10 +166,17 @@
SYSCTL_DECL(_net_inet6_ip6);
SYSCTL_NODE(_net_inet6, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
+static struct stat_header mrt6stat_header = {
+ .sth_version = MRT6STAT_VERSION,
+ .sth_len = sizeof(struct mrt6stat)
+};
static struct mrt6stat mrt6stat;
SYSCTL_STRUCT(_net_inet6_ip6, OID_AUTO, mrt6stat, CTLFLAG_RW,
&mrt6stat, mrt6stat,
"Multicast Routing Statistics (struct mrt6stat, netinet6/ip6_mroute.h)");
+SYSCTL_STRUCT(_net_inet6_ip6, OID_AUTO, mrt6stat_header, CTLFLAG_RD,
+ &mrt6stat_header, stat_header,
+ "Multicast Routing Statistics header");
#define NO_RTE_FOUND 0x1
#define RTE_FOUND 0x2
@@ -258,10 +265,16 @@
static mifi_t nummifs = 0;
static mifi_t reg_mif_num = (mifi_t)-1;
+static struct stat_header pim6stat_header = {
+ .sth_version = PIM6STAT_VERSION,
+ .sth_len = sizeof(struct pim6stat)
+};
static struct pim6stat pim6stat;
-SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RD,
+SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RW,
&pim6stat, pim6stat,
"PIM Statistics (struct pim6stat, netinet6/pim_var.h)");
+SYSCTL_STRUCT(_net_inet6_pim, OID_AUTO, stats_header, CTLFLAG_RD,
+ &pim6stat_header, stat_header, "PIM Statistics header");
#ifdef VIMAGE_GLOBALS
static int pim6;
==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/ip6_mroute.h#2 (text+ko) ====
@@ -120,20 +120,22 @@
/*
* The kernel's multicast routing statistics.
*/
+#define MRT6STAT_VERSION 0x00000001
+
struct mrt6stat {
- u_quad_t mrt6s_mfc_lookups; /* # forw. cache hash table hits */
- u_quad_t mrt6s_mfc_misses; /* # forw. cache hash table misses */
- u_quad_t mrt6s_upcalls; /* # calls to multicast routing daemon */
- u_quad_t mrt6s_no_route; /* no route for packet's origin */
- u_quad_t mrt6s_bad_tunnel; /* malformed tunnel options */
- u_quad_t mrt6s_cant_tunnel; /* no room for tunnel options */
- u_quad_t mrt6s_wrong_if; /* arrived on wrong interface */
- u_quad_t mrt6s_upq_ovflw; /* upcall Q overflow */
- u_quad_t mrt6s_cache_cleanups; /* # entries with no upcalls */
- u_quad_t mrt6s_drop_sel; /* pkts dropped selectively */
- u_quad_t mrt6s_q_overflow; /* pkts dropped - Q overflow */
- u_quad_t mrt6s_pkt2large; /* pkts dropped - size > BKT SIZE */
- u_quad_t mrt6s_upq_sockfull; /* upcalls dropped - socket full */
+ u_int64_t mrt6s_mfc_lookups; /* # forw. cache hash table hits */
+ u_int64_t mrt6s_mfc_misses; /* # forw. cache hash table misses */
+ u_int64_t mrt6s_upcalls; /* # calls to multicast routing daemon */
+ u_int64_t mrt6s_no_route; /* no route for packet's origin */
+ u_int64_t mrt6s_bad_tunnel; /* malformed tunnel options */
+ u_int64_t mrt6s_cant_tunnel; /* no room for tunnel options */
+ u_int64_t mrt6s_wrong_if; /* arrived on wrong interface */
+ u_int64_t mrt6s_upq_ovflw; /* upcall Q overflow */
+ u_int64_t mrt6s_cache_cleanups; /* # entries with no upcalls */
+ u_int64_t mrt6s_drop_sel; /* pkts dropped selectively */
+ u_int64_t mrt6s_q_overflow; /* pkts dropped - Q overflow */
+ u_int64_t mrt6s_pkt2large; /* pkts dropped - size > BKT SIZE */
+ u_int64_t mrt6s_upq_sockfull; /* upcalls dropped - socket full */
};
#ifdef MRT6_OINIT
==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/pim6_var.h#2 (text+ko) ====
@@ -41,14 +41,16 @@
#ifndef _NETINET6_PIM6_VAR_H_
#define _NETINET6_PIM6_VAR_H_
+#define PIM6STAT_VERSION 0x00000001
+
struct pim6stat {
- u_quad_t pim6s_rcv_total; /* total PIM messages received */
- u_quad_t pim6s_rcv_tooshort; /* received with too few bytes */
- u_quad_t pim6s_rcv_badsum; /* received with bad checksum */
- u_quad_t pim6s_rcv_badversion; /* received bad PIM version */
- u_quad_t pim6s_rcv_registers; /* received registers */
- u_quad_t pim6s_rcv_badregisters; /* received invalid registers */
- u_quad_t pim6s_snd_registers; /* sent registers */
+ u_int64_t pim6s_rcv_total; /* total PIM messages received */
+ u_int64_t pim6s_rcv_tooshort; /* received with too few bytes */
+ u_int64_t pim6s_rcv_badsum; /* received with bad checksum */
+ u_int64_t pim6s_rcv_badversion; /* received bad PIM version */
+ u_int64_t pim6s_rcv_registers; /* received registers */
+ u_int64_t pim6s_rcv_badregisters; /* received invalid registers */
+ u_int64_t pim6s_snd_registers; /* sent registers */
};
#if (defined(KERNEL)) || (defined(_KERNEL))
More information about the p4-projects
mailing list