summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2013-07-09 09:32:06 +0000
committerae <ae@FreeBSD.org>2013-07-09 09:32:06 +0000
commit1a36dfcc879833c6fdc45e20d39db618b110f55c (patch)
treecad0a71b5db80ecb80a8a7339f4a480cc96c54be /sys/netinet6
parent91dfaf8dd5d31f04188d8f43b006545b68878474 (diff)
downloadFreeBSD-src-1a36dfcc879833c6fdc45e20d39db618b110f55c.zip
FreeBSD-src-1a36dfcc879833c6fdc45e20d39db618b110f55c.tar.gz
Prepare network statistics structures for migration to PCPU counters.
Use uint64_t as type for all fields of structures. Changed structures: ahstat, arpstat, espstat, icmp6_ifstat, icmp6stat, in6_ifstat, ip6stat, ipcompstat, ipipstat, ipsecstat, mrt6stat, mrtstat, pfkeystat, pim6stat, pimstat, rip6stat, udpstat. Discussed with: arch@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_var.h108
-rw-r--r--sys/netinet6/ip6_mroute.h26
-rw-r--r--sys/netinet6/ip6_var.h76
-rw-r--r--sys/netinet6/pim6_var.h14
-rw-r--r--sys/netinet6/raw_ip6.h14
5 files changed, 119 insertions, 119 deletions
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index b3f7218..1afb7ea 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -153,37 +153,37 @@ struct in6_addrpolicy {
* IPv6 interface statistics, as defined in RFC2465 Ipv6IfStatsEntry (p12).
*/
struct in6_ifstat {
- u_quad_t ifs6_in_receive; /* # of total input datagram */
- u_quad_t ifs6_in_hdrerr; /* # of datagrams with invalid hdr */
- u_quad_t ifs6_in_toobig; /* # of datagrams exceeded MTU */
- u_quad_t ifs6_in_noroute; /* # of datagrams with no route */
- u_quad_t ifs6_in_addrerr; /* # of datagrams with invalid dst */
- u_quad_t ifs6_in_protounknown; /* # of datagrams with unknown proto */
+ uint64_t ifs6_in_receive; /* # of total input datagram */
+ uint64_t ifs6_in_hdrerr; /* # of datagrams with invalid hdr */
+ uint64_t ifs6_in_toobig; /* # of datagrams exceeded MTU */
+ uint64_t ifs6_in_noroute; /* # of datagrams with no route */
+ uint64_t ifs6_in_addrerr; /* # of datagrams with invalid dst */
+ uint64_t ifs6_in_protounknown; /* # of datagrams with unknown proto */
/* NOTE: increment on final dst if */
- u_quad_t ifs6_in_truncated; /* # of truncated datagrams */
- u_quad_t ifs6_in_discard; /* # of discarded datagrams */
+ uint64_t ifs6_in_truncated; /* # of truncated datagrams */
+ uint64_t ifs6_in_discard; /* # of discarded datagrams */
/* NOTE: fragment timeout is not here */
- u_quad_t ifs6_in_deliver; /* # of datagrams delivered to ULP */
+ uint64_t ifs6_in_deliver; /* # of datagrams delivered to ULP */
/* NOTE: increment on final dst if */
- u_quad_t ifs6_out_forward; /* # of datagrams forwarded */
+ uint64_t ifs6_out_forward; /* # of datagrams forwarded */
/* NOTE: increment on outgoing if */
- u_quad_t ifs6_out_request; /* # of outgoing datagrams from ULP */
+ uint64_t ifs6_out_request; /* # of outgoing datagrams from ULP */
/* NOTE: does not include forwrads */
- u_quad_t ifs6_out_discard; /* # of discarded datagrams */
- u_quad_t ifs6_out_fragok; /* # of datagrams fragmented */
- u_quad_t ifs6_out_fragfail; /* # of datagrams failed on fragment */
- u_quad_t ifs6_out_fragcreat; /* # of fragment datagrams */
+ uint64_t ifs6_out_discard; /* # of discarded datagrams */
+ uint64_t ifs6_out_fragok; /* # of datagrams fragmented */
+ uint64_t ifs6_out_fragfail; /* # of datagrams failed on fragment */
+ uint64_t ifs6_out_fragcreat; /* # of fragment datagrams */
/* NOTE: this is # after fragment */
- u_quad_t ifs6_reass_reqd; /* # of incoming fragmented packets */
+ uint64_t ifs6_reass_reqd; /* # of incoming fragmented packets */
/* NOTE: increment on final dst if */
- u_quad_t ifs6_reass_ok; /* # of reassembled packets */
+ uint64_t ifs6_reass_ok; /* # of reassembled packets */
/* NOTE: this is # after reass */
/* NOTE: increment on final dst if */
- u_quad_t ifs6_reass_fail; /* # of reass failures */
+ uint64_t ifs6_reass_fail; /* # of reass failures */
/* NOTE: may not be packet count */
/* NOTE: increment on final dst if */
- u_quad_t ifs6_in_mcast; /* # of inbound multicast datagrams */
- u_quad_t ifs6_out_mcast; /* # of outbound multicast datagrams */
+ uint64_t ifs6_in_mcast; /* # of inbound multicast datagrams */
+ uint64_t ifs6_out_mcast; /* # of outbound multicast datagrams */
};
/*
@@ -195,77 +195,77 @@ struct icmp6_ifstat {
* Input statistics
*/
/* ipv6IfIcmpInMsgs, total # of input messages */
- u_quad_t ifs6_in_msg;
+ uint64_t ifs6_in_msg;
/* ipv6IfIcmpInErrors, # of input error messages */
- u_quad_t ifs6_in_error;
+ uint64_t ifs6_in_error;
/* ipv6IfIcmpInDestUnreachs, # of input dest unreach errors */
- u_quad_t ifs6_in_dstunreach;
+ uint64_t ifs6_in_dstunreach;
/* ipv6IfIcmpInAdminProhibs, # of input administratively prohibited errs */
- u_quad_t ifs6_in_adminprohib;
+ uint64_t ifs6_in_adminprohib;
/* ipv6IfIcmpInTimeExcds, # of input time exceeded errors */
- u_quad_t ifs6_in_timeexceed;
+ uint64_t ifs6_in_timeexceed;
/* ipv6IfIcmpInParmProblems, # of input parameter problem errors */
- u_quad_t ifs6_in_paramprob;
+ uint64_t ifs6_in_paramprob;
/* ipv6IfIcmpInPktTooBigs, # of input packet too big errors */
- u_quad_t ifs6_in_pkttoobig;
+ uint64_t ifs6_in_pkttoobig;
/* ipv6IfIcmpInEchos, # of input echo requests */
- u_quad_t ifs6_in_echo;
+ uint64_t ifs6_in_echo;
/* ipv6IfIcmpInEchoReplies, # of input echo replies */
- u_quad_t ifs6_in_echoreply;
+ uint64_t ifs6_in_echoreply;
/* ipv6IfIcmpInRouterSolicits, # of input router solicitations */
- u_quad_t ifs6_in_routersolicit;
+ uint64_t ifs6_in_routersolicit;
/* ipv6IfIcmpInRouterAdvertisements, # of input router advertisements */
- u_quad_t ifs6_in_routeradvert;
+ uint64_t ifs6_in_routeradvert;
/* ipv6IfIcmpInNeighborSolicits, # of input neighbor solicitations */
- u_quad_t ifs6_in_neighborsolicit;
+ uint64_t ifs6_in_neighborsolicit;
/* ipv6IfIcmpInNeighborAdvertisements, # of input neighbor advertisements */
- u_quad_t ifs6_in_neighboradvert;
+ uint64_t ifs6_in_neighboradvert;
/* ipv6IfIcmpInRedirects, # of input redirects */
- u_quad_t ifs6_in_redirect;
+ uint64_t ifs6_in_redirect;
/* ipv6IfIcmpInGroupMembQueries, # of input MLD queries */
- u_quad_t ifs6_in_mldquery;
+ uint64_t ifs6_in_mldquery;
/* ipv6IfIcmpInGroupMembResponses, # of input MLD reports */
- u_quad_t ifs6_in_mldreport;
+ uint64_t ifs6_in_mldreport;
/* ipv6IfIcmpInGroupMembReductions, # of input MLD done */
- u_quad_t ifs6_in_mlddone;
+ uint64_t ifs6_in_mlddone;
/*
* Output statistics. We should solve unresolved routing problem...
*/
/* ipv6IfIcmpOutMsgs, total # of output messages */
- u_quad_t ifs6_out_msg;
+ uint64_t ifs6_out_msg;
/* ipv6IfIcmpOutErrors, # of output error messages */
- u_quad_t ifs6_out_error;
+ uint64_t ifs6_out_error;
/* ipv6IfIcmpOutDestUnreachs, # of output dest unreach errors */
- u_quad_t ifs6_out_dstunreach;
+ uint64_t ifs6_out_dstunreach;
/* ipv6IfIcmpOutAdminProhibs, # of output administratively prohibited errs */
- u_quad_t ifs6_out_adminprohib;
+ uint64_t ifs6_out_adminprohib;
/* ipv6IfIcmpOutTimeExcds, # of output time exceeded errors */
- u_quad_t ifs6_out_timeexceed;
+ uint64_t ifs6_out_timeexceed;
/* ipv6IfIcmpOutParmProblems, # of output parameter problem errors */
- u_quad_t ifs6_out_paramprob;
+ uint64_t ifs6_out_paramprob;
/* ipv6IfIcmpOutPktTooBigs, # of output packet too big errors */
- u_quad_t ifs6_out_pkttoobig;
+ uint64_t ifs6_out_pkttoobig;
/* ipv6IfIcmpOutEchos, # of output echo requests */
- u_quad_t ifs6_out_echo;
+ uint64_t ifs6_out_echo;
/* ipv6IfIcmpOutEchoReplies, # of output echo replies */
- u_quad_t ifs6_out_echoreply;
+ uint64_t ifs6_out_echoreply;
/* ipv6IfIcmpOutRouterSolicits, # of output router solicitations */
- u_quad_t ifs6_out_routersolicit;
+ uint64_t ifs6_out_routersolicit;
/* ipv6IfIcmpOutRouterAdvertisements, # of output router advertisements */
- u_quad_t ifs6_out_routeradvert;
+ uint64_t ifs6_out_routeradvert;
/* ipv6IfIcmpOutNeighborSolicits, # of output neighbor solicitations */
- u_quad_t ifs6_out_neighborsolicit;
+ uint64_t ifs6_out_neighborsolicit;
/* ipv6IfIcmpOutNeighborAdvertisements, # of output neighbor advertisements */
- u_quad_t ifs6_out_neighboradvert;
+ uint64_t ifs6_out_neighboradvert;
/* ipv6IfIcmpOutRedirects, # of output redirects */
- u_quad_t ifs6_out_redirect;
+ uint64_t ifs6_out_redirect;
/* ipv6IfIcmpOutGroupMembQueries, # of output MLD queries */
- u_quad_t ifs6_out_mldquery;
+ uint64_t ifs6_out_mldquery;
/* ipv6IfIcmpOutGroupMembResponses, # of output MLD reports */
- u_quad_t ifs6_out_mldreport;
+ uint64_t ifs6_out_mldreport;
/* ipv6IfIcmpOutGroupMembReductions, # of output MLD done */
- u_quad_t ifs6_out_mlddone;
+ uint64_t ifs6_out_mlddone;
};
struct in6_ifreq {
diff --git a/sys/netinet6/ip6_mroute.h b/sys/netinet6/ip6_mroute.h
index d2df0db..ed247dd 100644
--- a/sys/netinet6/ip6_mroute.h
+++ b/sys/netinet6/ip6_mroute.h
@@ -121,19 +121,19 @@ struct mf6cctl {
* The kernel's multicast routing statistics.
*/
struct mrt6stat {
- u_quad_t mrt6s_mfc_lookups; /* # forw. cache hash table hits */
- u_quad_t mrt6s_mfc_misses; /* # forw. cache hash table misses */
- u_quad_t mrt6s_upcalls; /* # calls to multicast routing daemon */
- u_quad_t mrt6s_no_route; /* no route for packet's origin */
- u_quad_t mrt6s_bad_tunnel; /* malformed tunnel options */
- u_quad_t mrt6s_cant_tunnel; /* no room for tunnel options */
- u_quad_t mrt6s_wrong_if; /* arrived on wrong interface */
- u_quad_t mrt6s_upq_ovflw; /* upcall Q overflow */
- u_quad_t mrt6s_cache_cleanups; /* # entries with no upcalls */
- u_quad_t mrt6s_drop_sel; /* pkts dropped selectively */
- u_quad_t mrt6s_q_overflow; /* pkts dropped - Q overflow */
- u_quad_t mrt6s_pkt2large; /* pkts dropped - size > BKT SIZE */
- u_quad_t mrt6s_upq_sockfull; /* upcalls dropped - socket full */
+ uint64_t mrt6s_mfc_lookups; /* # forw. cache hash table hits */
+ uint64_t mrt6s_mfc_misses; /* # forw. cache hash table misses */
+ uint64_t mrt6s_upcalls; /* # calls to multicast routing daemon */
+ uint64_t mrt6s_no_route; /* no route for packet's origin */
+ uint64_t mrt6s_bad_tunnel; /* malformed tunnel options */
+ uint64_t mrt6s_cant_tunnel; /* no room for tunnel options */
+ uint64_t mrt6s_wrong_if; /* arrived on wrong interface */
+ uint64_t mrt6s_upq_ovflw; /* upcall Q overflow */
+ uint64_t mrt6s_cache_cleanups; /* # entries with no upcalls */
+ uint64_t mrt6s_drop_sel; /* pkts dropped selectively */
+ uint64_t mrt6s_q_overflow; /* pkts dropped - Q overflow */
+ uint64_t mrt6s_pkt2large; /* pkts dropped - size > BKT SIZE */
+ uint64_t mrt6s_upq_sockfull; /* upcalls dropped - socket full */
};
#ifdef MRT6_OINIT
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h
index 4a094d4..f7210ea 100644
--- a/sys/netinet6/ip6_var.h
+++ b/sys/netinet6/ip6_var.h
@@ -181,39 +181,39 @@ struct ip6_pktopts {
*/
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 */
+ uint64_t ip6s_total; /* total packets received */
+ uint64_t ip6s_tooshort; /* packet too short */
+ uint64_t ip6s_toosmall; /* not enough data */
+ uint64_t ip6s_fragments; /* fragments received */
+ uint64_t ip6s_fragdropped; /* frags dropped(dups, out of space) */
+ uint64_t ip6s_fragtimeout; /* fragments timed out */
+ uint64_t ip6s_fragoverflow; /* fragments that exceeded limit */
+ uint64_t ip6s_forward; /* packets forwarded */
+ uint64_t ip6s_cantforward; /* packets rcvd for unreachable dest */
+ uint64_t ip6s_redirectsent; /* packets forwarded on same net */
+ uint64_t ip6s_delivered; /* datagrams delivered to upper level*/
+ uint64_t ip6s_localout; /* total ip packets generated here */
+ uint64_t ip6s_odropped; /* lost packets due to nobufs, etc. */
+ uint64_t ip6s_reassembled; /* total packets reassembled ok */
+ uint64_t ip6s_fragmented; /* datagrams successfully fragmented */
+ uint64_t ip6s_ofragments; /* output fragments created */
+ uint64_t ip6s_cantfrag; /* don't fragment flag was set, etc. */
+ uint64_t ip6s_badoptions; /* error in option processing */
+ uint64_t ip6s_noroute; /* packets discarded due to no route */
+ uint64_t ip6s_badvers; /* ip6 version != 6 */
+ uint64_t ip6s_rawout; /* total raw ip packets generated */
+ uint64_t ip6s_badscope; /* scope error */
+ uint64_t ip6s_notmember; /* don't join this multicast group */
#define IP6S_HDRCNT 256 /* headers count */
- u_quad_t ip6s_nxthist[IP6S_HDRCNT]; /* next header history */
- u_quad_t ip6s_m1; /* one mbuf */
+ uint64_t ip6s_nxthist[IP6S_HDRCNT]; /* next header history */
+ uint64_t ip6s_m1; /* one mbuf */
#define IP6S_M2MMAX 32
- u_quad_t ip6s_m2m[IP6S_M2MMAX]; /* 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 contiguous */
- u_quad_t ip6s_nogif; /* no match gif found */
- u_quad_t ip6s_toomanyhdr; /* discarded due to too many headers */
+ uint64_t ip6s_m2m[IP6S_M2MMAX]; /* two or more mbuf */
+ uint64_t ip6s_mext1; /* one ext mbuf */
+ uint64_t ip6s_mext2m; /* two or more ext mbuf */
+ uint64_t ip6s_exthdrtoolong; /* ext hdr are not contiguous */
+ uint64_t ip6s_nogif; /* no match gif found */
+ uint64_t ip6s_toomanyhdr; /* discarded due to too many headers */
/*
* statistics for improvement of the source address selection
@@ -223,26 +223,26 @@ struct ip6stat {
#define IP6S_RULESMAX 16
#define IP6S_SCOPECNT 16
/* number of times that address selection fails */
- u_quad_t ip6s_sources_none;
+ uint64_t ip6s_sources_none;
/* number of times that an address on the outgoing I/F is chosen */
- u_quad_t ip6s_sources_sameif[IP6S_SCOPECNT];
+ uint64_t ip6s_sources_sameif[IP6S_SCOPECNT];
/* number of times that an address on a non-outgoing I/F is chosen */
- u_quad_t ip6s_sources_otherif[IP6S_SCOPECNT];
+ uint64_t ip6s_sources_otherif[IP6S_SCOPECNT];
/*
* number of times that an address that has the same scope
* from the destination is chosen.
*/
- u_quad_t ip6s_sources_samescope[IP6S_SCOPECNT];
+ uint64_t ip6s_sources_samescope[IP6S_SCOPECNT];
/*
* number of times that an address that has a different scope
* from the destination is chosen.
*/
- u_quad_t ip6s_sources_otherscope[IP6S_SCOPECNT];
+ uint64_t ip6s_sources_otherscope[IP6S_SCOPECNT];
/* number of times that a deprecated address is chosen */
- u_quad_t ip6s_sources_deprecated[IP6S_SCOPECNT];
+ uint64_t ip6s_sources_deprecated[IP6S_SCOPECNT];
/* number of times that each rule of source selection is applied. */
- u_quad_t ip6s_sources_rule[IP6S_RULESMAX];
+ uint64_t ip6s_sources_rule[IP6S_RULESMAX];
};
#ifdef _KERNEL
diff --git a/sys/netinet6/pim6_var.h b/sys/netinet6/pim6_var.h
index 060836b..4157e84 100644
--- a/sys/netinet6/pim6_var.h
+++ b/sys/netinet6/pim6_var.h
@@ -42,13 +42,13 @@
#define _NETINET6_PIM6_VAR_H_
struct pim6stat {
- u_quad_t pim6s_rcv_total; /* total PIM messages received */
- u_quad_t pim6s_rcv_tooshort; /* received with too few bytes */
- u_quad_t pim6s_rcv_badsum; /* received with bad checksum */
- u_quad_t pim6s_rcv_badversion; /* received bad PIM version */
- u_quad_t pim6s_rcv_registers; /* received registers */
- u_quad_t pim6s_rcv_badregisters; /* received invalid registers */
- u_quad_t pim6s_snd_registers; /* sent registers */
+ uint64_t pim6s_rcv_total; /* total PIM messages received */
+ uint64_t pim6s_rcv_tooshort; /* received with too few bytes */
+ uint64_t pim6s_rcv_badsum; /* received with bad checksum */
+ uint64_t pim6s_rcv_badversion; /* received bad PIM version */
+ uint64_t pim6s_rcv_registers; /* received registers */
+ uint64_t pim6s_rcv_badregisters; /* received invalid registers */
+ uint64_t pim6s_snd_registers; /* sent registers */
};
#if (defined(KERNEL)) || (defined(_KERNEL))
diff --git a/sys/netinet6/raw_ip6.h b/sys/netinet6/raw_ip6.h
index cc4bcdd..265d578 100644
--- a/sys/netinet6/raw_ip6.h
+++ b/sys/netinet6/raw_ip6.h
@@ -37,14 +37,14 @@
* ICMPv6 stat is counted separately. see netinet/icmp6.h
*/
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 */
+ uint64_t rip6s_ipackets; /* total input packets */
+ uint64_t rip6s_isum; /* input checksum computations */
+ uint64_t rip6s_badsum; /* of above, checksum error */
+ uint64_t rip6s_nosock; /* no matching socket */
+ uint64_t rip6s_nosockmcast; /* of above, arrived as multicast */
+ uint64_t rip6s_fullsock; /* not delivered, input socket full */
- u_quad_t rip6s_opackets; /* total output packets */
+ uint64_t rip6s_opackets; /* total output packets */
};
#ifdef _KERNEL
OpenPOWER on IntegriCloud