mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
- Add new unsigned and hex integer parse types
- Fix bug in commented example code
This commit is contained in:
parent
8db3c6cd29
commit
7b3bf3f9aa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64506
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user