[NLA_S64] = sizeof(int64_t),
};
-static int validate_nla(struct nlattr *nla, int maxtype,
- struct nla_policy *policy)
+static int validate_nla(const struct nlattr *nla, int maxtype,
+ const struct nla_policy *policy)
{
- struct nla_policy *pt;
+ const struct nla_policy *pt;
int minlen = 0, type = nla_type(nla);
if (type <= 0 || type > maxtype)
* @return 0 on success or a negative error code.
*/
int nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, int len,
- struct nla_policy *policy)
+ const struct nla_policy *policy)
{
struct nlattr *nla;
int rem, err;
*
* @return 0 on success or a negative error code.
*/
-int nla_validate(struct nlattr *head, int len, int maxtype,
- struct nla_policy *policy)
+int nla_validate(const struct nlattr *head, int len, int maxtype,
+ const struct nla_policy *policy)
{
- struct nlattr *nla;
+ const struct nlattr *nla;
int rem, err;
nla_for_each_attr(nla, head, len, rem) {