diff options
author | ru <ru@FreeBSD.org> | 2004-05-19 11:26:33 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-05-19 11:26:33 +0000 |
commit | 63a58dc2d2db4c7d8f82237a7e949a7d09c4fc23 (patch) | |
tree | 813a70bb3f57fe0d147478e182c21ed456c78183 /sys/netgraph/ng_hole.h | |
parent | db8317e9835a860ed49308bf8be0b919371d1faa (diff) | |
download | FreeBSD-src-63a58dc2d2db4c7d8f82237a7e949a7d09c4fc23.zip FreeBSD-src-63a58dc2d2db4c7d8f82237a7e949a7d09c4fc23.tar.gz |
Maintain statistics about the received frames.
Diffstat (limited to 'sys/netgraph/ng_hole.h')
-rw-r--r-- | sys/netgraph/ng_hole.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/netgraph/ng_hole.h b/sys/netgraph/ng_hole.h index cff47aa..d2da2d2 100644 --- a/sys/netgraph/ng_hole.h +++ b/sys/netgraph/ng_hole.h @@ -46,5 +46,25 @@ /* Node type name and magic cookie */ #define NG_HOLE_NODE_TYPE "hole" #define NGM_HOLE_COOKIE 915433206 + +/* Statistics structure for one hook. */ +struct ng_hole_hookstat { + uint64_t frames; + uint64_t octets; +}; + +/* Keep this in sync with the above structure definition. */ +#define NG_HOLE_HOOKSTAT_TYPE_INFO { \ + { "frames", &ng_parse_uint64_type }, \ + { "octets", &ng_parse_uint64_type }, \ + { NULL } \ +} + +/* Netgraph commands. */ +enum { + NGM_HOLE_GET_STATS = 1, + NGM_HOLE_CLR_STATS, + NGM_HOLE_GETCLR_STATS, +}; #endif /* _NETGRAPH_NG_HOLE_H_ */ |