Lines Matching refs:pt
209 int netlink_policy_dump_attr_size_estimate(const struct nla_policy *pt) in netlink_policy_dump_attr_size_estimate() argument
214 switch (pt->type) { in netlink_policy_dump_attr_size_estimate()
253 const struct nla_policy *pt, in __netlink_policy_dump_write_attr() argument
256 int estimate = netlink_policy_dump_attr_size_estimate(pt); in __netlink_policy_dump_write_attr()
264 switch (pt->type) { in __netlink_policy_dump_write_attr()
275 if (pt->type == NLA_NESTED_ARRAY) in __netlink_policy_dump_write_attr()
277 if (state && pt->nested_policy && pt->len && in __netlink_policy_dump_write_attr()
280 pt->nested_policy, in __netlink_policy_dump_write_attr()
281 pt->len)) || in __netlink_policy_dump_write_attr()
283 pt->len))) in __netlink_policy_dump_write_attr()
293 if (pt->type == NLA_U8) in __netlink_policy_dump_write_attr()
295 else if (pt->type == NLA_U16) in __netlink_policy_dump_write_attr()
297 else if (pt->type == NLA_U32) in __netlink_policy_dump_write_attr()
302 if (pt->validation_type == NLA_VALIDATE_MASK) { in __netlink_policy_dump_write_attr()
304 pt->mask, in __netlink_policy_dump_write_attr()
310 nla_get_range_unsigned(pt, &range); in __netlink_policy_dump_write_attr()
325 if (pt->type == NLA_S8) in __netlink_policy_dump_write_attr()
327 else if (pt->type == NLA_S16) in __netlink_policy_dump_write_attr()
329 else if (pt->type == NLA_S32) in __netlink_policy_dump_write_attr()
334 nla_get_range_signed(pt, &range); in __netlink_policy_dump_write_attr()
346 pt->bitfield32_valid)) in __netlink_policy_dump_write_attr()
352 if (pt->type == NLA_STRING) in __netlink_policy_dump_write_attr()
354 else if (pt->type == NLA_NUL_STRING) in __netlink_policy_dump_write_attr()
359 if (pt->validation_type == NLA_VALIDATE_RANGE || in __netlink_policy_dump_write_attr()
360 pt->validation_type == NLA_VALIDATE_RANGE_WARN_TOO_LONG) { in __netlink_policy_dump_write_attr()
363 nla_get_range_unsigned(pt, &range); in __netlink_policy_dump_write_attr()
374 } else if (pt->len && in __netlink_policy_dump_write_attr()
376 pt->len)) { in __netlink_policy_dump_write_attr()
408 const struct nla_policy *pt, in netlink_policy_dump_write_attr() argument
411 return __netlink_policy_dump_write_attr(NULL, skb, pt, nestattr); in netlink_policy_dump_write_attr()
424 const struct nla_policy *pt; in netlink_policy_dump_write() local
432 pt = &state->policies[state->policy_idx].policy[state->attr_idx]; in netlink_policy_dump_write()
438 err = __netlink_policy_dump_write_attr(state, skb, pt, state->attr_idx); in netlink_policy_dump_write()