summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_sample.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph/ng_sample.h')
-rw-r--r--sys/netgraph/ng_sample.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/netgraph/ng_sample.h b/sys/netgraph/ng_sample.h
index 5d2df45..faa539c 100644
--- a/sys/netgraph/ng_sample.h
+++ b/sys/netgraph/ng_sample.h
@@ -72,4 +72,19 @@ struct ngxxxstat {
u_int packets_out; /* packets out towards downstream */
};
+/*
+ * This is used to define the 'parse type' for a struct ngxxxstat, which
+ * is bascially a description of how to convert a binary struct ngxxxstat
+ * to an ASCII string and back. See ng_parse.h for more info.
+ *
+ * This needs to be kept in sync with the above structure definition
+ */
+#define NG_XXX_STATS_TYPE_INFO { \
+ { \
+ { "packets_in", &ng_parse_int32_type }, \
+ { "packets_out", &ng_parse_int32_type }, \
+ { NULL }, \
+ } \
+}
+
#endif /* _NETGRAPH_SAMPLE_H_ */
OpenPOWER on IntegriCloud