Lines Matching defs:pt
210 int netlink_policy_dump_attr_size_estimate(const struct nla_policy *pt)
215 switch (pt->type) {
256 const struct nla_policy *pt,
259 int estimate = netlink_policy_dump_attr_size_estimate(pt);
267 switch (pt->type) {
278 if (pt->type == NLA_NESTED_ARRAY)
280 if (state && pt->nested_policy && pt->len &&
283 pt->nested_policy,
284 pt->len)) ||
286 pt->len)))
297 if (pt->type == NLA_U8)
299 else if (pt->type == NLA_U16)
301 else if (pt->type == NLA_U32)
303 else if (pt->type == NLA_U64)
308 if (pt->validation_type == NLA_VALIDATE_MASK) {
310 pt->mask,
314 } else if (pt->validation_type == NLA_VALIDATE_FUNCTION) {
318 nla_get_range_unsigned(pt, &range);
334 if (pt->type == NLA_S8)
336 else if (pt->type == NLA_S16)
338 else if (pt->type == NLA_S32)
340 else if (pt->type == NLA_S64)
345 if (pt->validation_type == NLA_VALIDATE_FUNCTION)
348 nla_get_range_signed(pt, &range);
360 pt->bitfield32_valid))
366 if (pt->type == NLA_STRING)
368 else if (pt->type == NLA_NUL_STRING)
373 if (pt->validation_type == NLA_VALIDATE_RANGE ||
374 pt->validation_type == NLA_VALIDATE_RANGE_WARN_TOO_LONG) {
377 nla_get_range_unsigned(pt, &range);
388 } else if (pt->len &&
390 pt->len)) {
414 * @pt: the attribute's policy
422 const struct nla_policy *pt,
425 return __netlink_policy_dump_write_attr(NULL, skb, pt, nestattr);
438 const struct nla_policy *pt;
446 pt = &state->policies[state->policy_idx].policy[state->attr_idx];
452 err = __netlink_policy_dump_write_attr(state, skb, pt, state->attr_idx);