diff options
author | archie <archie@FreeBSD.org> | 1999-12-01 19:40:37 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 1999-12-01 19:40:37 +0000 |
commit | a5c64fe8bbf78d360a1400b91af82ca843efc407 (patch) | |
tree | 6899eb342e2764f9f2a76fd966e71dc263272985 /sys/netgraph/ng_sample.h | |
parent | 579c93e79305fd5f203f4fb5546c42fa53c347c0 (diff) | |
download | FreeBSD-src-a5c64fe8bbf78d360a1400b91af82ca843efc407.zip FreeBSD-src-a5c64fe8bbf78d360a1400b91af82ca843efc407.tar.gz |
Show how to supply a struct ng_cmdlist for (de)asciification
of control messages.
Suggested by: julian
Diffstat (limited to 'sys/netgraph/ng_sample.h')
-rw-r--r-- | sys/netgraph/ng_sample.h | 15 |
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_ */ |