summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ppp.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2007-08-01 20:49:35 +0000
committermav <mav@FreeBSD.org>2007-08-01 20:49:35 +0000
commit86e4cc2cc9e4992ddeb4256ecbd0540fda8d7bb0 (patch)
tree1830cb41743749db0e716b57fdba4611058a126a /sys/netgraph/ng_ppp.h
parent7a0a14613bebb3ed0397506e0e2d07c8d61d4816 (diff)
downloadFreeBSD-src-86e4cc2cc9e4992ddeb4256ecbd0540fda8d7bb0.zip
FreeBSD-src-86e4cc2cc9e4992ddeb4256ecbd0540fda8d7bb0.tar.gz
Add 64bit statistic counters to the ng_ppp node.
64bit counters are needed to simplify traffic accounting and reduce system load at the big PPP concentrators. Approved by: re (rwatson), glebius (mentor)
Diffstat (limited to 'sys/netgraph/ng_ppp.h')
-rw-r--r--sys/netgraph/ng_ppp.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/netgraph/ng_ppp.h b/sys/netgraph/ng_ppp.h
index c1a3c68..c081f28 100644
--- a/sys/netgraph/ng_ppp.h
+++ b/sys/netgraph/ng_ppp.h
@@ -48,6 +48,9 @@
#define NG_PPP_NODE_TYPE "ppp"
#define NGM_PPP_COOKIE 940897795
+/* 64bit stats presence flag */
+#define NG_PPP_STATS64
+
/* Maximum number of supported links */
#define NG_PPP_MAX_LINKS 16
@@ -97,6 +100,8 @@ enum {
NGM_PPP_GET_LINK_STATS, /* takes link #, returns stats struct */
NGM_PPP_CLR_LINK_STATS, /* takes link #, clears link stats */
NGM_PPP_GETCLR_LINK_STATS, /* takes link #, returns & clrs stats */
+ NGM_PPP_GET_LINK_STATS64, /* takes link #, returns stats64 struct */
+ NGM_PPP_GETCLR_LINK_STATS64, /* takes link #, returns stats64 & clrs */
};
/* Multi-link sequence number state (for debugging) */
@@ -212,4 +217,29 @@ struct ng_ppp_link_stat {
{ NULL } \
}
+/* Statistics struct for a link (or the bundle if NG_PPP_BUNDLE_LINKNUM) */
+struct ng_ppp_link_stat64 {
+ u_int64_t xmitFrames; /* xmit frames on link */
+ u_int64_t xmitOctets; /* xmit octets on link */
+ u_int64_t recvFrames; /* recv frames on link */
+ u_int64_t recvOctets; /* recv octets on link */
+ u_int64_t badProtos; /* frames rec'd with bogus protocol */
+ u_int64_t runts; /* Too short MP fragments */
+ u_int64_t dupFragments; /* MP frames with duplicate seq # */
+ u_int64_t dropFragments; /* MP fragments we had to drop */
+};
+
+/* Keep this in sync with the above structure definition */
+#define NG_PPP_STATS64_TYPE_INFO { \
+ { "xmitFrames", &ng_parse_uint64_type }, \
+ { "xmitOctets", &ng_parse_uint64_type }, \
+ { "recvFrames", &ng_parse_uint64_type }, \
+ { "recvOctets", &ng_parse_uint64_type }, \
+ { "badProtos", &ng_parse_uint64_type }, \
+ { "runts", &ng_parse_uint64_type }, \
+ { "dupFragments", &ng_parse_uint64_type }, \
+ { "dropFragments", &ng_parse_uint64_type }, \
+ { NULL } \
+}
+
#endif /* _NETGRAPH_NG_PPP_H_ */
OpenPOWER on IntegriCloud