From owner-p4-projects@FreeBSD.ORG Fri Jul 31 20:23:57 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BE8B11065676; Fri, 31 Jul 2009 20:23:56 +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 74385106564A for ; Fri, 31 Jul 2009 20:23:55 +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 62CC38FC08 for ; Fri, 31 Jul 2009 20:23:55 +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 n6VKNtI5070787 for ; Fri, 31 Jul 2009 20:23:55 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6VKNtUR070785 for perforce@freebsd.org; Fri, 31 Jul 2009 20:23:55 GMT (envelope-from pgj@FreeBSD.org) Date: Fri, 31 Jul 2009 20:23:55 GMT Message-Id: <200907312023.n6VKNtUR070785@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 166868 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: Fri, 31 Jul 2009 20:23:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=166868 Change 166868 by pgj@petymeg-current on 2009/07/31 20:23:53 Add header for IP6 statistics. Affected files ... .. //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/ip6_input.c#2 edit .. //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/ip6_var.h#2 edit Differences ... ==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/ip6_input.c#2 (text+ko) ==== @@ -131,6 +131,11 @@ #ifdef VIMAGE_GLOBALS static int ip6qmaxlen; struct in6_ifaddr *in6_ifaddr; + +struct stat_header ip6stat_header = { + .sth_version = IP6STAT_VERSION, + .sth_len = sizeof(struct ip6stat) +}; struct ip6stat ip6stat; extern struct callout in6_tmpaddrtimer_ch; ==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/ip6_var.h#2 (text+ko) ==== @@ -180,38 +180,40 @@ * Control options for incoming packets */ +#define IP6STAT_VERSION 0x00000001 + struct ip6stat { - u_quad_t ip6s_total; /* total packets received */ - u_quad_t ip6s_tooshort; /* packet too short */ - u_quad_t ip6s_toosmall; /* not enough data */ - u_quad_t ip6s_fragments; /* fragments received */ - u_quad_t ip6s_fragdropped; /* frags dropped(dups, out of space) */ - u_quad_t ip6s_fragtimeout; /* fragments timed out */ - u_quad_t ip6s_fragoverflow; /* fragments that exceeded limit */ - u_quad_t ip6s_forward; /* packets forwarded */ - u_quad_t ip6s_cantforward; /* packets rcvd for unreachable dest */ - u_quad_t ip6s_redirectsent; /* packets forwarded on same net */ - u_quad_t ip6s_delivered; /* datagrams delivered to upper level*/ - u_quad_t ip6s_localout; /* total ip packets generated here */ - u_quad_t ip6s_odropped; /* lost packets due to nobufs, etc. */ - u_quad_t ip6s_reassembled; /* total packets reassembled ok */ - u_quad_t ip6s_fragmented; /* datagrams successfully fragmented */ - u_quad_t ip6s_ofragments; /* output fragments created */ - u_quad_t ip6s_cantfrag; /* don't fragment flag was set, etc. */ - u_quad_t ip6s_badoptions; /* error in option processing */ - u_quad_t ip6s_noroute; /* packets discarded due to no route */ - u_quad_t ip6s_badvers; /* ip6 version != 6 */ - u_quad_t ip6s_rawout; /* total raw ip packets generated */ - u_quad_t ip6s_badscope; /* scope error */ - u_quad_t ip6s_notmember; /* don't join this multicast group */ - u_quad_t ip6s_nxthist[256]; /* next header history */ - u_quad_t ip6s_m1; /* one mbuf */ - u_quad_t ip6s_m2m[32]; /* two or more mbuf */ - u_quad_t ip6s_mext1; /* one ext mbuf */ - u_quad_t ip6s_mext2m; /* two or more ext mbuf */ - u_quad_t ip6s_exthdrtoolong; /* ext hdr are not continuous */ - u_quad_t ip6s_nogif; /* no match gif found */ - u_quad_t ip6s_toomanyhdr; /* discarded due to too many headers */ + u_int64_t ip6s_total; /* total packets received */ + u_int64_t ip6s_tooshort; /* packet too short */ + u_int64_t ip6s_toosmall; /* not enough data */ + u_int64_t ip6s_fragments; /* fragments received */ + u_int64_t ip6s_fragdropped; /* frags dropped(dups, out of space) */ + u_int64_t ip6s_fragtimeout; /* fragments timed out */ + u_int64_t ip6s_fragoverflow; /* fragments that exceeded limit */ + u_int64_t ip6s_forward; /* packets forwarded */ + u_int64_t ip6s_cantforward; /* packets rcvd for unreachable dest */ + u_int64_t ip6s_redirectsent; /* packets forwarded on same net */ + u_int64_t ip6s_delivered; /* datagrams delivered to upper level*/ + u_int64_t ip6s_localout; /* total ip packets generated here */ + u_int64_t ip6s_odropped; /* lost packets due to nobufs, etc. */ + u_int64_t ip6s_reassembled; /* total packets reassembled ok */ + u_int64_t ip6s_fragmented; /* datagrams successfully fragmented */ + u_int64_t ip6s_ofragments; /* output fragments created */ + u_int64_t ip6s_cantfrag; /* don't fragment flag was set, etc. */ + u_int64_t ip6s_badoptions; /* error in option processing */ + u_int64_t ip6s_noroute; /* packets discarded due to no route */ + u_int64_t ip6s_badvers; /* ip6 version != 6 */ + u_int64_t ip6s_rawout; /* total raw ip packets generated */ + u_int64_t ip6s_badscope; /* scope error */ + u_int64_t ip6s_notmember; /* don't join this multicast group */ + u_int64_t ip6s_nxthist[256]; /* next header history */ + u_int64_t ip6s_m1; /* one mbuf */ + u_int64_t ip6s_m2m[32]; /* two or more mbuf */ + u_int64_t ip6s_mext1; /* one ext mbuf */ + u_int64_t ip6s_mext2m; /* two or more ext mbuf */ + u_int64_t ip6s_exthdrtoolong; /* ext hdr are not continuous */ + u_int64_t ip6s_nogif; /* no match gif found */ + u_int64_t ip6s_toomanyhdr; /* discarded due to too many headers */ /* * statistics for improvement of the source address selection @@ -219,26 +221,26 @@ * XXX: hardcoded 16 = # of ip6 multicast scope types + 1 */ /* number of times that address selection fails */ - u_quad_t ip6s_sources_none; + u_int64_t ip6s_sources_none; /* number of times that an address on the outgoing I/F is chosen */ - u_quad_t ip6s_sources_sameif[16]; + u_int64_t ip6s_sources_sameif[16]; /* number of times that an address on a non-outgoing I/F is chosen */ - u_quad_t ip6s_sources_otherif[16]; + u_int64_t ip6s_sources_otherif[16]; /* * number of times that an address that has the same scope * from the destination is chosen. */ - u_quad_t ip6s_sources_samescope[16]; + u_int64_t ip6s_sources_samescope[16]; /* * number of times that an address that has a different scope * from the destination is chosen. */ - u_quad_t ip6s_sources_otherscope[16]; + u_int64_t ip6s_sources_otherscope[16]; /* number of times that a deprecated address is chosen */ - u_quad_t ip6s_sources_deprecated[16]; + u_int64_t ip6s_sources_deprecated[16]; /* number of times that each rule of source selection is applied. */ - u_quad_t ip6s_sources_rule[16]; + u_int64_t ip6s_sources_rule[16]; }; #ifdef _KERNEL @@ -292,6 +294,7 @@ #endif #ifdef VIMAGE_GLOBALS +extern struct stat_header ip6stat_header; extern struct ip6stat ip6stat; /* statistics */ extern int ip6_defhlim; /* default hop limit */ extern int ip6_defmcasthlim; /* default multicast hop limit */