summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_tee.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph/ng_tee.h')
-rw-r--r--sys/netgraph/ng_tee.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/netgraph/ng_tee.h b/sys/netgraph/ng_tee.h
index 2c1959a..f70b9f3 100644
--- a/sys/netgraph/ng_tee.h
+++ b/sys/netgraph/ng_tee.h
@@ -61,6 +61,17 @@ struct ng_tee_hookstat {
u_int64_t outFrames;
};
+/* Keep this in sync with the above structure definition */
+#define NG_TEE_HOOKSTAT_INFO { \
+ { \
+ { "inOctets", &ng_parse_int64_type }, \
+ { "inFrames", &ng_parse_int64_type }, \
+ { "outOctets", &ng_parse_int64_type }, \
+ { "outFrames", &ng_parse_int64_type }, \
+ { NULL }, \
+ } \
+}
+
/* Statistics structure returned by NGM_TEE_GET_STATS */
struct ng_tee_stats {
struct ng_tee_hookstat right;
@@ -69,6 +80,17 @@ struct ng_tee_stats {
struct ng_tee_hookstat left2right;
};
+/* Keep this in sync with the above structure definition */
+#define NG_TEE_STATS_INFO(hstype) { \
+ { \
+ { "right", (hstype) }, \
+ { "left", (hstype) }, \
+ { "right2left", (hstype) }, \
+ { "left2right", (hstype) }, \
+ { NULL }, \
+ } \
+}
+
/* Netgraph commands */
enum {
NGM_TEE_GET_STATS = 1, /* get stats */
OpenPOWER on IntegriCloud