Date: Thu, 30 Jul 2009 16:28:19 GMT From: Gabor Pali <pgj@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166799 for review Message-ID: <200907301628.n6UGSJ6b079821@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166799 Change 166799 by pgj@petymeg-current on 2009/07/30 16:28:08 Add header for ICMP6 statistics. Affected files ... .. //depot/projects/soc2009/pgj_libstat/src/sys/netinet/icmp6.h#2 edit .. //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/icmp6.c#2 edit Differences ... ==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet/icmp6.h#2 (text+ko) ==== @@ -537,40 +537,43 @@ * Variables related to this implementation * of the internet control message protocol version 6. */ + +#define ICMP6STAT_VERSION 0x00000001 + struct icmp6errstat { - u_quad_t icp6errs_dst_unreach_noroute; - u_quad_t icp6errs_dst_unreach_admin; - u_quad_t icp6errs_dst_unreach_beyondscope; - u_quad_t icp6errs_dst_unreach_addr; - u_quad_t icp6errs_dst_unreach_noport; - u_quad_t icp6errs_packet_too_big; - u_quad_t icp6errs_time_exceed_transit; - u_quad_t icp6errs_time_exceed_reassembly; - u_quad_t icp6errs_paramprob_header; - u_quad_t icp6errs_paramprob_nextheader; - u_quad_t icp6errs_paramprob_option; - u_quad_t icp6errs_redirect; /* we regard redirect as an error here */ - u_quad_t icp6errs_unknown; + u_int64_t icp6errs_dst_unreach_noroute; + u_int64_t icp6errs_dst_unreach_admin; + u_int64_t icp6errs_dst_unreach_beyondscope; + u_int64_t icp6errs_dst_unreach_addr; + u_int64_t icp6errs_dst_unreach_noport; + u_int64_t icp6errs_packet_too_big; + u_int64_t icp6errs_time_exceed_transit; + u_int64_t icp6errs_time_exceed_reassembly; + u_int64_t icp6errs_paramprob_header; + u_int64_t icp6errs_paramprob_nextheader; + u_int64_t icp6errs_paramprob_option; + u_int64_t icp6errs_redirect; /* we regard redirect as an error here */ + u_int64_t icp6errs_unknown; }; struct icmp6stat { /* statistics related to icmp6 packets generated */ - u_quad_t icp6s_error; /* # of calls to icmp6_error */ - u_quad_t icp6s_canterror; /* no error 'cuz old was icmp */ - u_quad_t icp6s_toofreq; /* no error 'cuz rate limitation */ - u_quad_t icp6s_outhist[256]; + u_int64_t icp6s_error; /* # of calls to icmp6_error */ + u_int64_t icp6s_canterror; /* no error 'cuz old was icmp */ + u_int64_t icp6s_toofreq; /* no error 'cuz rate limitation */ + u_int64_t icp6s_outhist[256]; /* statistics related to input message processed */ - u_quad_t icp6s_badcode; /* icmp6_code out of range */ - u_quad_t icp6s_tooshort; /* packet < sizeof(struct icmp6_hdr) */ - u_quad_t icp6s_checksum; /* bad checksum */ - u_quad_t icp6s_badlen; /* calculated bound mismatch */ + u_int64_t icp6s_badcode; /* icmp6_code out of range */ + u_int64_t icp6s_tooshort; /* packet < sizeof(struct icmp6_hdr) */ + u_int64_t icp6s_checksum; /* bad checksum */ + u_int64_t icp6s_badlen; /* calculated bound mismatch */ /* * number of responses: this member is inherited from netinet code, but * for netinet6 code, it is already available in icp6s_outhist[]. */ - u_quad_t icp6s_reflect; - u_quad_t icp6s_inhist[256]; - u_quad_t icp6s_nd_toomanyopt; /* too many ND options */ + u_int64_t icp6s_reflect; + u_int64_t icp6s_inhist[256]; + u_int64_t icp6s_nd_toomanyopt; /* too many ND options */ struct icmp6errstat icp6s_outerrhist; #define icp6s_odst_unreach_noroute \ icp6s_outerrhist.icp6errs_dst_unreach_noroute @@ -590,13 +593,13 @@ #define icp6s_oparamprob_option icp6s_outerrhist.icp6errs_paramprob_option #define icp6s_oredirect icp6s_outerrhist.icp6errs_redirect #define icp6s_ounknown icp6s_outerrhist.icp6errs_unknown - u_quad_t icp6s_pmtuchg; /* path MTU changes */ - u_quad_t icp6s_nd_badopt; /* bad ND options */ - u_quad_t icp6s_badns; /* bad neighbor solicitation */ - u_quad_t icp6s_badna; /* bad neighbor advertisement */ - u_quad_t icp6s_badrs; /* bad router advertisement */ - u_quad_t icp6s_badra; /* bad router advertisement */ - u_quad_t icp6s_badredirect; /* bad redirect message */ + u_int64_t icp6s_pmtuchg; /* path MTU changes */ + u_int64_t icp6s_nd_badopt; /* bad ND options */ + u_int64_t icp6s_badns; /* bad neighbor solicitation */ + u_int64_t icp6s_badna; /* bad neighbor advertisement */ + u_int64_t icp6s_badrs; /* bad router advertisement */ + u_int64_t icp6s_badra; /* bad router advertisement */ + u_int64_t icp6s_badredirect; /* bad redirect message */ }; #ifdef _KERNEL ==== //depot/projects/soc2009/pgj_libstat/src/sys/netinet6/icmp6.c#2 (text+ko) ==== @@ -121,6 +121,10 @@ extern int icmp6errppslim; extern int icmp6_nodeinfo; +struct stat_header icmp6stat_header = { + .sth_version = ICMP6STAT_VERSION, + .sth_len = sizeof(struct icmp6stat) +}; struct icmp6stat icmp6stat; static int icmp6errpps_count; static struct timeval icmp6errppslim_last;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907301628.n6UGSJ6b079821>