Date: Mon, 27 Jul 2009 16:07:17 GMT From: Gabor Pali <pgj@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166628 for review Message-ID: <200907271607.n6RG7H1S097539@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=166628 Change 166628 by pgj@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 */help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907271607.n6RG7H1S097539>
