From a5c64fe8bbf78d360a1400b91af82ca843efc407 Mon Sep 17 00:00:00 2001 From: archie Date: Wed, 1 Dec 1999 19:40:37 +0000 Subject: Show how to supply a struct ng_cmdlist for (de)asciification of control messages. Suggested by: julian --- sys/netgraph/ng_sample.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys/netgraph/ng_sample.h') 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_ */ -- cgit v1.1