From owner-p4-projects@FreeBSD.ORG Thu Jul 30 17:26:24 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD3121065676; Thu, 30 Jul 2009 17:26:23 +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 673AC106564A for ; Thu, 30 Jul 2009 17:26:23 +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 3BB028FC21 for ; Thu, 30 Jul 2009 17:26:23 +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 n6UHQNFJ097152 for ; Thu, 30 Jul 2009 17:26:23 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6UHQNAF097149 for perforce@freebsd.org; Thu, 30 Jul 2009 17:26:23 GMT (envelope-from pgj@FreeBSD.org) Date: Thu, 30 Jul 2009 17:26:23 GMT Message-Id: <200907301726.n6UHQNAF097149@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 166806 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: Thu, 30 Jul 2009 17:26:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=166806 Change 166806 by pgj@petymeg-current on 2009/07/30 17:25:27 - Standardize and add a header for RIP6 statistics. - Add a field for calculating delivered packets (it will be filled in by libnetstat(3)). Affected files ... .. //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/raw_ip6.c#2 edit .. //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/raw_ip6.h#2 edit Differences ... ==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/raw_ip6.c#2 (text+ko) ==== @@ -121,6 +121,10 @@ #ifdef VIMAGE_GLOBALS extern struct inpcbhead ripcb; extern struct inpcbinfo ripcbinfo; +struct stat_header rip6stat_header = { + .sth_version = RIP6STAT_VERSION, + .sth_len = sizeof(struct rip6stat) +}; struct rip6stat rip6stat; #endif ==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/raw_ip6.h#2 (text+ko) ==== @@ -36,19 +36,24 @@ /* * ICMPv6 stat is counted separately. see netinet/icmp6.h */ + +#define RIP6STAT_VERSION 0x00000001 + struct rip6stat { - u_quad_t rip6s_ipackets; /* total input packets */ - u_quad_t rip6s_isum; /* input checksum computations */ - u_quad_t rip6s_badsum; /* of above, checksum error */ - u_quad_t rip6s_nosock; /* no matching socket */ - u_quad_t rip6s_nosockmcast; /* of above, arrived as multicast */ - u_quad_t rip6s_fullsock; /* not delivered, input socket full */ + u_int64_t rip6s_ipackets; /* total input packets */ + u_int64_t rip6s_isum; /* input checksum computations */ + u_int64_t rip6s_badsum; /* of above, checksum error */ + u_int64_t rip6s_nosock; /* no matching socket */ + u_int64_t rip6s_nosockmcast; /* of above, arrived as multicast */ + u_int64_t rip6s_fullsock; /* not delivered, input socket full */ - u_quad_t rip6s_opackets; /* total output packets */ + u_int64_t rip6s_opackets; /* total output packets */ + u_int64_t rip6s_delivered; /* derived field */ }; #ifdef _KERNEL #ifdef VIMAGE_GLOBALS +extern struct stat_header rip6stat_header; extern struct rip6stat rip6stat; #endif #endif