| /linux/net/netlink/ |
| H A D | policy.c | 23 unsigned int maxtype; member 29 unsigned int maxtype) in add_policy() argument 39 state->policies[i].maxtype == maxtype) in add_policy() 44 state->policies[i].maxtype = maxtype; in add_policy() 61 state->policies[old_n_alloc].maxtype = maxtype; in add_policy() 71 * @maxtype: the policy's maxattr 84 unsigned int maxtype) in netlink_policy_dump_get_policy_idx() argument 128 netlink_policy_dump_add_policy(struct netlink_policy_dump_state ** pstate,const struct nla_policy * policy,unsigned int maxtype) netlink_policy_dump_add_policy() argument [all...] |
| /linux/tools/lib/bpf/ |
| H A D | nlattr.c | 45 static int validate_nla(struct nlattr *nla, int maxtype, in validate_nla() argument 52 if (type < 0 || type > maxtype) in validate_nla() 88 * @arg tb Index array to be filled (maxtype+1 elements). 89 * @arg maxtype Maximum attribute type expected and accepted. 104 int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, in libbpf_nla_parse() argument 110 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); in libbpf_nla_parse() 115 if (type > maxtype) in libbpf_nla_parse() 119 err = validate_nla(nla, maxtype, policy); in libbpf_nla_parse() 137 * @arg tb Index array to be filled (maxtype+1 elements). 138 * @arg maxtype Maximum attribute type expected and accepted. [all …]
|
| H A D | nlattr.h | 123 int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, 125 int libbpf_nla_parse_nested(struct nlattr *tb[], int maxtype,
|
| /linux/lib/ |
| H A D | nlattr.c | 60 static int __nla_validate_parse(const struct nlattr *head, int len, int maxtype, 89 static int nla_validate_array(const struct nlattr *head, int len, int maxtype, in nla_validate_array() argument 110 maxtype, policy, validate, extack, in nla_validate_array() 393 static int validate_nla(const struct nlattr *nla, int maxtype, in validate_nla() argument 405 if (type <= 0 || type > maxtype) in validate_nla() 408 type = array_index_nospec(type, maxtype + 1); in validate_nla() 604 static int __nla_validate_parse(const struct nlattr *head, int len, int maxtype, in __nla_validate_parse() argument 620 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); in __nla_validate_parse() 625 if (type == 0 || type > maxtype) { in __nla_validate_parse() 633 type = array_index_nospec(type, maxtype + 1); in __nla_validate_parse() [all …]
|
| /linux/drivers/block/drbd/ |
| H A D | drbd_nl_gen.c | 649 const int maxtype = DRBD_A_DRBD_CFG_CONTEXT_CTX_PEER_ADDR; in __drbd_cfg_context_from_attrs() local 662 err = nla_parse_nested_deprecated(ntb, maxtype, tla, drbd_drbd_cfg_context_nl_policy, NULL); in __drbd_cfg_context_from_attrs() 707 const int maxtype = DRBD_A_DISK_CONF_DISABLE_WRITE_SAME; in __disk_conf_from_attrs() local 720 err = nla_parse_nested_deprecated(ntb, maxtype, tla, drbd_disk_conf_nl_policy, NULL); in __disk_conf_from_attrs() 864 const int maxtype = DRBD_A_RES_OPTS_ON_NO_DATA; in __res_opts_from_attrs() local 877 err = nla_parse_nested_deprecated(ntb, maxtype, tla, drbd_res_opts_nl_policy, NULL); in __res_opts_from_attrs() 914 const int maxtype = DRBD_A_NET_CONF_SOCK_CHECK_TIMEO; in __net_conf_from_attrs() local 927 err = nla_parse_nested_deprecated(ntb, maxtype, tla, drbd_net_conf_nl_policy, NULL); in __net_conf_from_attrs() 1080 const int maxtype = DRBD_A_SET_ROLE_PARMS_ASSUME_UPTODATE; in __set_role_parms_from_attrs() local 1093 err = nla_parse_nested_deprecated(ntb, maxtype, tla, drbd_set_role_parms_nl_policy, NULL); in __set_role_parms_from_attrs() [all …]
|
| /linux/drivers/net/ethernet/rocker/ |
| H A D | rocker_tlv.c | 15 void rocker_tlv_parse(const struct rocker_tlv **tb, int maxtype, in rocker_tlv_parse() argument 22 memset(tb, 0, sizeof(struct rocker_tlv *) * (maxtype + 1)); in rocker_tlv_parse() 27 if (type > 0 && type <= maxtype) in rocker_tlv_parse()
|
| H A D | rocker_tlv.h | 109 void rocker_tlv_parse(const struct rocker_tlv **tb, int maxtype, 113 int maxtype, in rocker_tlv_parse_nested() argument 116 rocker_tlv_parse(tb, maxtype, rocker_tlv_data(tlv), in rocker_tlv_parse_nested() 121 rocker_tlv_parse_desc(const struct rocker_tlv **tb, int maxtype, in rocker_tlv_parse_desc() argument 124 rocker_tlv_parse(tb, maxtype, desc_info->data, in rocker_tlv_parse_desc()
|
| /linux/include/net/ |
| H A D | genetlink.h | 382 * @tb: destination array with maxtype+1 elements 383 * @maxtype: maximum attribute type to be expected 389 struct nlattr *tb[], int maxtype, in genlmsg_parse_deprecated() argument 393 return __nlmsg_parse(nlh, family->hdrsize + GENL_HDRLEN, tb, maxtype, in genlmsg_parse_deprecated() 401 * @tb: destination array with maxtype+1 elements 402 * @maxtype: maximum attribute type to be expected 408 struct nlattr *tb[], int maxtype, in genlmsg_parse() argument 412 return __nlmsg_parse(nlh, family->hdrsize + GENL_HDRLEN, tb, maxtype, in genlmsg_parse()
|
| H A D | rtnetlink.h | 114 * @maxtype: Highest device specific netlink attribute number 156 unsigned int maxtype; member
|
| /linux/net/devlink/ |
| H A D | netlink.c | 246 unsigned int maxtype = ARRAY_SIZE(devlink_dl_parent_dev_nl_policy) - 1; in devlink_get_parent_from_attrs_lock() local 254 tb = kzalloc_objs(*tb, maxtype + 1); in devlink_get_parent_from_attrs_lock() 258 err = nla_parse_nested(tb, maxtype, attrs[DEVLINK_ATTR_PARENT_DEV], in devlink_get_parent_from_attrs_lock()
|
| /linux/net/dsa/ |
| H A D | netlink.c | 58 .maxtype = IFLA_DSA_MAX,
|
| /linux/include/uapi/linux/ |
| H A D | netlink.h | 293 * consists of sub-attributes. The nested policy and maxtype 299 * and the corresponding maxtype may be specified.
|
| /linux/Documentation/netlink/specs/ |
| H A D | nlctrl.yaml | 144 name: policy-maxtype
|
| /linux/drivers/infiniband/ulp/ipoib/ |
| H A D | ipoib_netlink.c | 174 .maxtype = IFLA_IPOIB_MAX,
|
| /linux/drivers/net/ovpn/ |
| H A D | main.c | 259 .maxtype = IFLA_OVPN_MAX,
|
| /linux/drivers/net/can/ |
| H A D | vxcan.c | 328 .maxtype = VXCAN_INFO_MAX,
|
| /linux/net/sched/ |
| H A D | sch_netem.c | 1022 static int parse_attr(struct nlattr *tb[], int maxtype, struct nlattr *nla, in netem_change() 1035 return nla_parse_deprecated(tb, maxtype, in netem_change() 1039 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); in netem_change() 990 parse_attr(struct nlattr * tb[],int maxtype,struct nlattr * nla,const struct nla_policy * policy,int len) parse_attr() argument
|
| /linux/drivers/net/ethernet/qualcomm/rmnet/ |
| H A D | rmnet_config.c | 402 .maxtype = IFLA_RMNET_MAX,
|
| /linux/net/ipv4/ |
| H A D | ip_gre.c | 1680 .maxtype = IFLA_GRE_MAX, 1695 .maxtype = IFLA_GRE_MAX, 1710 .maxtype = IFLA_GRE_MAX,
|
| H A D | ip_vti.c | 651 .maxtype = IFLA_VTI_MAX,
|
| /linux/net/hsr/ |
| H A D | hsr_netlink.c | 193 .maxtype = IFLA_HSR_MAX,
|
| /linux/net/core/ |
| H A D | netdev-genl.c | 953 const int maxtype = ARRAY_SIZE(netdev_queue_id_nl_policy) - 1; in netdev_nl_read_rxq_bitmap() local 962 err = nla_parse_nested(tb, maxtype, attr, in netdev_nl_read_rxq_bitmap()
|
| /linux/drivers/net/ |
| H A D | bareudp.c | 786 .maxtype = IFLA_BAREUDP_MAX,
|
| /linux/drivers/net/bonding/ |
| H A D | bond_netlink.c | 989 .maxtype = IFLA_BOND_MAX,
|
| /linux/drivers/net/can/dev/ |
| H A D | netlink.c | 1093 .maxtype = IFLA_CAN_MAX,
|