summaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph/ng_parse.h')
-rw-r--r--sys/netgraph/ng_parse.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/netgraph/ng_parse.h b/sys/netgraph/ng_parse.h
index 1543c6bbc601..fe8e553ca9ba 100644
--- a/sys/netgraph/ng_parse.h
+++ b/sys/netgraph/ng_parse.h
@@ -163,12 +163,14 @@
// Super-type info for struct foo
struct ng_parse_struct_info foo_fields = {
- { "ip", &ng_parse_ipaddr_type },
+ {
+ { "ip", &ng_parse_ipaddr_type },
{ "bar", &ng_parse_int32_type },
{ "label", &foo_label_type },
- { "alen", &ng_parse_int8_type },
+ { "alen", &ng_parse_uint8_type },
{ "ary", &foo_ary_type },
{ NULL }
+ }
};
// Parse type for struct foo
@@ -413,6 +415,18 @@ extern const struct ng_parse_type ng_parse_int16_type;
extern const struct ng_parse_type ng_parse_int32_type;
extern const struct ng_parse_type ng_parse_int64_type;
+/* Same thing but unparse as unsigned quantities */
+extern const struct ng_parse_type ng_parse_uint8_type;
+extern const struct ng_parse_type ng_parse_uint16_type;
+extern const struct ng_parse_type ng_parse_uint32_type;
+extern const struct ng_parse_type ng_parse_uint64_type;
+
+/* Same thing but unparse as hex quantities, e.g., "0xe7" */
+extern const struct ng_parse_type ng_parse_hint8_type;
+extern const struct ng_parse_type ng_parse_hint16_type;
+extern const struct ng_parse_type ng_parse_hint32_type;
+extern const struct ng_parse_type ng_parse_hint64_type;
+
/*
* IP ADDRESS TYPE
*