attribute validation policy More...
#include <attr.h>
Data Fields | |
| uint16_t | type |
| Type of attribute or NLA_UNSPEC. | |
| uint16_t | minlen |
| Minimal length of payload required to be available. | |
| uint16_t | maxlen |
| Maximal length of payload required to be available. | |
Policies are defined as arrays of this struct, the array must be accessible by attribute type up to the highest identifier to be expected.
Example:
static struct nla_policy my_policy[ATTR_MAX+1] __read_mostly = { [ATTR_FOO] = { .type = NLA_U16 }, [ATTR_BAR] = { .type = NLA_STRING }, [ATTR_BAZ] = { .minlen = sizeof(struct mystruct) }, };
1.6.1