PERFORCE change 166687 for review

Gabor Pali pgj at FreeBSD.org
Tue Jul 28 18:58:45 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=166687

Change 166687 by pgj at petymeg-current on 2009/07/28 18:57:53

	Add header for IGMP statistics.  Note that it is required, because
	-z flag of netstat(1) would reset the version and length information
	too.

Affected files ...

.. //depot/projects/soc2009/pgj_libstat/src/sys/netinet/igmp.c#3 edit
.. //depot/projects/soc2009/pgj_libstat/src/sys/netinet/igmp_var.h#2 edit

Differences ...

==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet/igmp.c#3 (text+ko) ====

@@ -220,6 +220,10 @@
 					  * IGMPv3 g/sg query response */
 
 LIST_HEAD(, igmp_ifinfo)	 igi_head;
+struct stat_header  igmpstat_header = {
+	.sth_version = IGMPSTAT_VERSION,
+	.sth_len = sizeof(struct igmpstat)
+};
 struct igmpstat			 igmpstat;
 struct timeval			 igmp_gsrdelay;
 
@@ -237,6 +241,10 @@
  */
 SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_igmp, IGMPCTL_STATS, stats,
     CTLFLAG_RW, igmpstat, igmpstat, "");
+
+SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, stats_header,
+    CTLFLAG_RD, igmpstat_header, stat_header, "IGMP statistics header");
+
 SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_igmp, OID_AUTO, recvifkludge,
     CTLFLAG_RW, igmp_recvifkludge, 0,
     "Rewrite IGMPv1/v2 reports from 0.0.0.0 to contain subnet address");

==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet/igmp_var.h#2 (text+ko) ====

@@ -67,6 +67,7 @@
 /*
  * IGMPv3 protocol statistics.
  */
+#define	IGMPSTAT_VERSION    0x00000001
 struct igmpstat {
 	/*
 	 * Structure header (to insulate ABI changes).


More information about the p4-projects mailing list