From owner-p4-projects@FreeBSD.ORG Mon Jul 27 16:07:17 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 88A5D1065672; Mon, 27 Jul 2009 16:07:17 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 432A3106566B for ; Mon, 27 Jul 2009 16:07:17 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 30DBF8FC1B for ; Mon, 27 Jul 2009 16:07:17 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RG7Hwu097541 for ; Mon, 27 Jul 2009 16:07:17 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6RG7H1S097539 for perforce@freebsd.org; Mon, 27 Jul 2009 16:07:17 GMT (envelope-from pgj@FreeBSD.org) Date: Mon, 27 Jul 2009 16:07:17 GMT Message-Id: <200907271607.n6RG7H1S097539@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 166628 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 16:07:18 -0000 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 #include +#include #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 */