Date: Thu, 30 Jul 2009 18:32:37 GMT From: Gabor Pali <pgj@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166823 for review Message-ID: <200907301832.n6UIWbac005470@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166823 Change 166823 by pgj@petymeg-current on 2009/07/30 18:32:13 Add (optional) support for SPX statistics. Affected files ... .. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat.h#47 edit .. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_internal.h#44 edit .. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_stat.c#14 edit .. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_util.c#52 edit Differences ... ==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat.h#47 (text+ko) ==== @@ -133,6 +133,7 @@ #endif #ifdef IPX stat_IPX, + stat_SPX, #endif stat_MAX, stat_Invalid, @@ -179,6 +180,7 @@ #endif #ifdef IPX struct ipx_stat; +struct spx_stat; #endif __BEGIN_DECLS @@ -813,5 +815,68 @@ u_int64_t netstat_ipxs_get_odropped(const struct ipx_stat *); u_int64_t netstat_ipxs_get_noroute(const struct ipx_stat *); u_int64_t netstat_ipxs_get_mtutoosmall(const struct ipx_stat *); + +const struct spx_stat *netstat_get_spxstats(const struct stat_type *); + +u_int64_t netstat_spxs_get_connattempt(const struct spx_stat *); +u_int64_t netstat_spxs_get_accepts(const struct spx_stat *); +u_int64_t netstat_spxs_get_connects(const struct spx_stat *); +u_int64_t netstat_spxs_get_drops(const struct spx_stat *); +u_int64_t netstat_spxs_get_conndrops(const struct spx_stat *); +u_int64_t netstat_spxs_get_closed(const struct spx_stat *); +u_int64_t netstat_spxs_get_segstimed(const struct spx_stat *); +u_int64_t netstat_spxs_get_rttupdated(const struct spx_stat *); +u_int64_t netstat_spxs_get_delack(const struct spx_stat *); +u_int64_t netstat_spxs_get_timeoutdrop(const struct spx_stat *); +u_int64_t netstat_spxs_get_rexmttimeo(const struct spx_stat *); +u_int64_t netstat_spxs_get_persisttimeo(const struct spx_stat *); +u_int64_t netstat_spxs_get_keeptimeo(const struct spx_stat *); +u_int64_t netstat_spxs_get_keepprobe(const struct spx_stat *); +u_int64_t netstat_spxs_get_keepdrops(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndtotal(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndpack(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndbyte(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndrexmitpack(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndrexmitbyte(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndacks(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndprobe(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndurg(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndwinup(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndctrl(const struct spx_stat *); +u_int64_t netstat_spxs_get_sndvoid(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvtotal(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvpack(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvbyte(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvbadsum(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvbadoff(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvshort(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvduppack(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvdupbyte(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvpartduppack(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvpartdupbyte(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvoopack(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvoobyte(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvpackafterwin(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvbyteafterwin(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvafterclose(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvwinprobe(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvdupack(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvacktoomuch(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvackpack(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvackbyte(const struct spx_stat *); +u_int64_t netstat_spxs_get_rcvwinupd(const struct spx_stat *); +u_int64_t netstat_spxs_get_hdrops(const struct spx_stat *); +u_int64_t netstat_spxs_get_badsum(const struct spx_stat *); +u_int64_t netstat_spxs_get_badlen(const struct spx_stat *); +u_int64_t netstat_spxs_get_slotim(const struct spx_stat *); +u_int64_t netstat_spxs_get_fastim(const struct spx_stat *); +u_int64_t netstat_spxs_get_nonucn(const struct spx_stat *); +u_int64_t netstat_spxs_get_noconn(const struct spx_stat *); +u_int64_t netstat_spxs_get_notme(const struct spx_stat *); +u_int64_t netstat_spxs_get_wrncon(const struct spx_stat *); +u_int64_t netstat_spxs_get_bdreas(const struct spx_stat *); +u_int64_t netstat_spxs_get_gonawy(const struct spx_stat *); +u_int64_t netstat_spxs_get_notyet(const struct spx_stat *); +u_int64_t netstat_spxs_get_lstdup(const struct spx_stat *); #endif /* !IPX */ #endif /* !_NETSTAT_H_ */ ==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_internal.h#44 (text+ko) ==== @@ -61,6 +61,7 @@ #endif #ifdef IPX #include <netipx/ipx_var.h> +#include <netipx/spx_var.h> #endif #include "netstat.h" @@ -355,6 +356,10 @@ struct ipx_stat { struct ipxstat s; }; + +struct spx_stat { + struct spx_istat s; +}; #endif /* Timestamp type. */ ==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_stat.c#14 (text+ko) ==== @@ -44,6 +44,7 @@ #endif #ifdef IPX #include <netipx/ipx_var.h> +#include <netipx/spx_var.h> #endif #include <err.h> @@ -82,6 +83,7 @@ #endif #ifdef IPX { IPXSTAT_VERSION, "net.ipx.ipx.stats", "_ipxstat" }, + { SPXSTAT_VERSION, "net.ipx.spx.stats", "_spx_istat" }, #endif }; ==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_util.c#52 (text+ko) ==== @@ -1771,6 +1771,76 @@ IPX_ACC(noroute); IPX_ACC(mtutoosmall); #undef IPX_ACC + +#define SPX_ACC(field) \ + STATS_ACCX(u_int64_t,spx,field,newstats.spxs_##field) + +#define SPX_ACC1(field) \ + STATS_ACCX(u_int64_t,spx,field,field) + +STATS_GET(spx,SPX); +SPX_ACC(connattempt); +SPX_ACC(accepts); +SPX_ACC(connects); +SPX_ACC(drops); +SPX_ACC(conndrops); +SPX_ACC(closed); +SPX_ACC(segstimed); +SPX_ACC(rttupdated); +SPX_ACC(delack); +SPX_ACC(timeoutdrop); +SPX_ACC(rexmttimeo); +SPX_ACC(persisttimeo); +SPX_ACC(keeptimeo); +SPX_ACC(keepprobe); +SPX_ACC(keepdrops); +SPX_ACC(sndtotal); +SPX_ACC(sndpack); +SPX_ACC(sndbyte); +SPX_ACC(sndrexmitpack); +SPX_ACC(sndrexmitbyte); +SPX_ACC(sndacks); +SPX_ACC(sndprobe); +SPX_ACC(sndurg); +SPX_ACC(sndwinup); +SPX_ACC(sndctrl); +SPX_ACC(sndvoid); +SPX_ACC(rcvtotal); +SPX_ACC(rcvpack); +SPX_ACC(rcvbyte); +SPX_ACC(rcvbadsum); +SPX_ACC(rcvbadoff); +SPX_ACC(rcvshort); +SPX_ACC(rcvduppack); +SPX_ACC(rcvdupbyte); +SPX_ACC(rcvpartduppack); +SPX_ACC(rcvpartdupbyte); +SPX_ACC(rcvoopack); +SPX_ACC(rcvoobyte); +SPX_ACC(rcvpackafterwin); +SPX_ACC(rcvbyteafterwin); +SPX_ACC(rcvafterclose); +SPX_ACC(rcvwinprobe); +SPX_ACC(rcvdupack); +SPX_ACC(rcvacktoomuch); +SPX_ACC(rcvackpack); +SPX_ACC(rcvackbyte); +SPX_ACC(rcvwinupd); +SPX_ACC1(hdrops); +SPX_ACC1(badsum); +SPX_ACC1(badlen); +SPX_ACC1(slotim); +SPX_ACC1(fastim); +SPX_ACC1(nonucn); +SPX_ACC1(noconn); +SPX_ACC1(notme); +SPX_ACC1(wrncon); +SPX_ACC1(bdreas); +SPX_ACC1(gonawy); +SPX_ACC1(notyet); +SPX_ACC1(lstdup); +#undef SPX_ACC +#undef SPX_ACC1 #endif /* !IPX */ static const char *icmpnames[ICMP_MAXTYPE + 1] = {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907301832.n6UIWbac005470>