Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jul 2009 18:58:43 GMT
From:      Gabor Pali <pgj@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 166687 for review
Message-ID:  <200907281858.n6SIwhm2019744@repoman.freebsd.org>

index | next in thread | raw e-mail

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

Change 166687 by pgj@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).


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907281858.n6SIwhm2019744>