Lines Matching refs:pt
199 int netlink_policy_dump_attr_size_estimate(const struct nla_policy *pt) in netlink_policy_dump_attr_size_estimate() argument
204 switch (pt->type) { in netlink_policy_dump_attr_size_estimate()
243 const struct nla_policy *pt, in __netlink_policy_dump_write_attr() argument
246 int estimate = netlink_policy_dump_attr_size_estimate(pt); in __netlink_policy_dump_write_attr()
254 switch (pt->type) { in __netlink_policy_dump_write_attr()
265 if (pt->type == NLA_NESTED_ARRAY) in __netlink_policy_dump_write_attr()
267 if (state && pt->nested_policy && pt->len && in __netlink_policy_dump_write_attr()
270 pt->nested_policy, in __netlink_policy_dump_write_attr()
271 pt->len)) || in __netlink_policy_dump_write_attr()
273 pt->len))) in __netlink_policy_dump_write_attr()
283 if (pt->type == NLA_U8) in __netlink_policy_dump_write_attr()
285 else if (pt->type == NLA_U16) in __netlink_policy_dump_write_attr()
287 else if (pt->type == NLA_U32) in __netlink_policy_dump_write_attr()
292 if (pt->validation_type == NLA_VALIDATE_MASK) { in __netlink_policy_dump_write_attr()
294 pt->mask, in __netlink_policy_dump_write_attr()
300 nla_get_range_unsigned(pt, &range); in __netlink_policy_dump_write_attr()
315 if (pt->type == NLA_S8) in __netlink_policy_dump_write_attr()
317 else if (pt->type == NLA_S16) in __netlink_policy_dump_write_attr()
319 else if (pt->type == NLA_S32) in __netlink_policy_dump_write_attr()
324 nla_get_range_signed(pt, &range); in __netlink_policy_dump_write_attr()
336 pt->bitfield32_valid)) in __netlink_policy_dump_write_attr()
342 if (pt->type == NLA_STRING) in __netlink_policy_dump_write_attr()
344 else if (pt->type == NLA_NUL_STRING) in __netlink_policy_dump_write_attr()
349 if (pt->validation_type == NLA_VALIDATE_RANGE || in __netlink_policy_dump_write_attr()
350 pt->validation_type == NLA_VALIDATE_RANGE_WARN_TOO_LONG) { in __netlink_policy_dump_write_attr()
353 nla_get_range_unsigned(pt, &range); in __netlink_policy_dump_write_attr()
364 } else if (pt->len && in __netlink_policy_dump_write_attr()
366 pt->len)) { in __netlink_policy_dump_write_attr()
398 const struct nla_policy *pt, in netlink_policy_dump_write_attr() argument
401 return __netlink_policy_dump_write_attr(NULL, skb, pt, nestattr); in netlink_policy_dump_write_attr()
414 const struct nla_policy *pt; in netlink_policy_dump_write() local
422 pt = &state->policies[state->policy_idx].policy[state->attr_idx]; in netlink_policy_dump_write()
428 err = __netlink_policy_dump_write_attr(state, skb, pt, state->attr_idx); in netlink_policy_dump_write()