Lines Matching refs:type
111 switch (pt->type) { in nla_validate_int_range()
163 int minlen = 0, attrlen = nla_len(nla), type = nla_type(nla); in validate_nla() local
166 if (strict_start_type && type >= strict_start_type) in validate_nla()
169 if (type <= 0 || type > maxtype) in validate_nla()
172 pt = &policy[type]; in validate_nla()
174 BUG_ON(pt->type > NLA_TYPE_MAX); in validate_nla()
176 if ((nla_attr_len[pt->type] && attrlen != nla_attr_len[pt->type]) || in validate_nla()
177 (pt->type == NLA_EXACT_LEN_WARN && attrlen != pt->len)) { in validate_nla()
179 current->comm, type); in validate_nla()
188 if ((pt->type == NLA_NESTED || pt->type == NLA_NESTED_ARRAY) && in validate_nla()
194 if (pt->type != NLA_NESTED && pt->type != NLA_NESTED_ARRAY && in validate_nla()
195 pt->type != NLA_UNSPEC && (nla->nla_type & NLA_F_NESTED)) { in validate_nla()
202 switch (pt->type) { in validate_nla()
324 minlen = nla_attr_minlen[pt->type]; in validate_nla()
370 u16 type = nla_type(nla); in __nla_validate_parse() local
372 if (type == 0 || type > maxtype) { in __nla_validate_parse()
389 tb[type] = (struct nlattr *)nla; in __nla_validate_parse()
447 else if (nla_attr_len[p->type]) in nla_policy_len()
448 len += nla_total_size(nla_attr_len[p->type]); in nla_policy_len()
449 else if (nla_attr_minlen[p->type]) in nla_policy_len()
450 len += nla_total_size(nla_attr_minlen[p->type]); in nla_policy_len()