PERFORCE change 166628 for review
Gabor Pali
pgj at FreeBSD.org
Mon Jul 27 16:07:18 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166628
Change 166628 by pgj at petymeg-current on 2009/07/27 16:06:46
Add header for CARP statistics.
Affected files ...
.. //depot/projects/soc2009/pgj_libstat/src/sys/netinet/ip_carp.c#2 edit
.. //depot/projects/soc2009/pgj_libstat/src/sys/netinet/ip_carp.h#2 edit
Differences ...
==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet/ip_carp.c#2 (text+ko) ====
@@ -88,6 +88,7 @@
#include <crypto/sha1.h>
#include <netinet/ip_carp.h>
+#include <netinet/tcp_var.h>
#define CARP_IFNAME "carp"
static MALLOC_DEFINE(M_CARP, "CARP", "CARP interfaces");
@@ -149,11 +150,19 @@
SYSCTL_INT(_net_inet_carp, OID_AUTO, suppress_preempt, CTLFLAG_RD,
&carp_suppress_preempt, 0, "Preemption is suppressed");
+struct stat_header carpstats_header = {
+ .sth_version = CARPSTAT_VERSION,
+ .sth_len = sizeof(struct carpstats),
+};
struct carpstats carpstats;
SYSCTL_STRUCT(_net_inet_carp, CARPCTL_STATS, stats, CTLFLAG_RW,
&carpstats, carpstats,
"CARP statistics (struct carpstats, netinet/ip_carp.h)");
+SYSCTL_STRUCT(_net_inet_carp, OID_AUTO, stats_header, CTLFLAG_RD,
+ &carpstats_header, stat_header,
+ "CARP statistics header");
+
struct carp_if {
TAILQ_HEAD(, carp_softc) vhif_vrs;
int vhif_nvrs;
==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet/ip_carp.h#2 (text+ko) ====
@@ -96,6 +96,8 @@
/*
* Statistics.
*/
+#define CARPSTAT_VERSION 0x00000001
+
struct carpstats {
uint64_t carps_ipackets; /* total input packets, IPv4 */
uint64_t carps_ipackets6; /* total input packets, IPv6 */
More information about the p4-projects
mailing list