PERFORCE change 166806 for review
Gabor Pali
pgj at FreeBSD.org
Thu Jul 30 17:26:24 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166806
Change 166806 by pgj at 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
More information about the p4-projects
mailing list