/net/bridge/ |
D | br_mrp_netlink.c | 34 struct nlattr *tb[IFLA_BRIDGE_MRP_INSTANCE_MAX + 1]; in br_mrp_instance_parse() local 38 err = nla_parse_nested(tb, IFLA_BRIDGE_MRP_INSTANCE_MAX, attr, in br_mrp_instance_parse() 43 if (!tb[IFLA_BRIDGE_MRP_INSTANCE_RING_ID] || in br_mrp_instance_parse() 44 !tb[IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX] || in br_mrp_instance_parse() 45 !tb[IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX]) { in br_mrp_instance_parse() 53 inst.ring_id = nla_get_u32(tb[IFLA_BRIDGE_MRP_INSTANCE_RING_ID]); in br_mrp_instance_parse() 54 inst.p_ifindex = nla_get_u32(tb[IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX]); in br_mrp_instance_parse() 55 inst.s_ifindex = nla_get_u32(tb[IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX]); in br_mrp_instance_parse() 58 if (tb[IFLA_BRIDGE_MRP_INSTANCE_PRIO]) in br_mrp_instance_parse() 59 inst.prio = nla_get_u16(tb[IFLA_BRIDGE_MRP_INSTANCE_PRIO]); in br_mrp_instance_parse() [all …]
|
/net/netfilter/ |
D | nfnetlink_cthelper.c | 76 struct nlattr *tb[NFCTH_TUPLE_MAX+1]; in nfnl_cthelper_parse_tuple() local 78 err = nla_parse_nested_deprecated(tb, NFCTH_TUPLE_MAX, attr, in nfnl_cthelper_parse_tuple() 83 if (!tb[NFCTH_TUPLE_L3PROTONUM] || !tb[NFCTH_TUPLE_L4PROTONUM]) in nfnl_cthelper_parse_tuple() 89 tuple->src.l3num = ntohs(nla_get_be16(tb[NFCTH_TUPLE_L3PROTONUM])); in nfnl_cthelper_parse_tuple() 90 tuple->dst.protonum = nla_get_u8(tb[NFCTH_TUPLE_L4PROTONUM]); in nfnl_cthelper_parse_tuple() 137 struct nlattr *tb[NFCTH_POLICY_MAX+1]; in nfnl_cthelper_expect_policy() local 139 err = nla_parse_nested_deprecated(tb, NFCTH_POLICY_MAX, attr, in nfnl_cthelper_expect_policy() 144 if (!tb[NFCTH_POLICY_NAME] || in nfnl_cthelper_expect_policy() 145 !tb[NFCTH_POLICY_EXPECT_MAX] || in nfnl_cthelper_expect_policy() 146 !tb[NFCTH_POLICY_EXPECT_TIMEOUT]) in nfnl_cthelper_expect_policy() [all …]
|
D | nft_tunnel.c | 75 const struct nlattr * const tb[]) in nft_tunnel_get_init() argument 80 if (!tb[NFTA_TUNNEL_KEY] || in nft_tunnel_get_init() 81 !tb[NFTA_TUNNEL_DREG]) in nft_tunnel_get_init() 84 priv->key = ntohl(nla_get_be32(tb[NFTA_TUNNEL_KEY])); in nft_tunnel_get_init() 96 if (tb[NFTA_TUNNEL_MODE]) { in nft_tunnel_get_init() 97 priv->mode = ntohl(nla_get_be32(tb[NFTA_TUNNEL_MODE])); in nft_tunnel_get_init() 104 return nft_parse_register_store(ctx, tb[NFTA_TUNNEL_DREG], &priv->dreg, in nft_tunnel_get_init() 167 struct nlattr *tb[NFTA_TUNNEL_KEY_IP_MAX + 1]; in nft_tunnel_obj_ip_init() local 170 err = nla_parse_nested_deprecated(tb, NFTA_TUNNEL_KEY_IP_MAX, attr, in nft_tunnel_obj_ip_init() 175 if (!tb[NFTA_TUNNEL_KEY_IP_DST]) in nft_tunnel_obj_ip_init() [all …]
|
D | nft_bitwise.c | 94 const struct nlattr *const tb[]) in nft_bitwise_init_bool() argument 108 if (tb[NFTA_BITWISE_DATA]) in nft_bitwise_init_bool() 111 if (!tb[NFTA_BITWISE_MASK] || in nft_bitwise_init_bool() 112 !tb[NFTA_BITWISE_XOR]) in nft_bitwise_init_bool() 115 err = nft_data_init(NULL, &priv->mask, &mask, tb[NFTA_BITWISE_MASK]); in nft_bitwise_init_bool() 119 err = nft_data_init(NULL, &priv->xor, &xor, tb[NFTA_BITWISE_XOR]); in nft_bitwise_init_bool() 132 const struct nlattr *const tb[]) in nft_bitwise_init_shift() argument 141 if (tb[NFTA_BITWISE_MASK] || in nft_bitwise_init_shift() 142 tb[NFTA_BITWISE_XOR]) in nft_bitwise_init_shift() 145 if (!tb[NFTA_BITWISE_DATA]) in nft_bitwise_init_shift() [all …]
|
D | nft_hash.c | 71 const struct nlattr * const tb[]) in nft_jhash_init() argument 77 if (!tb[NFTA_HASH_SREG] || in nft_jhash_init() 78 !tb[NFTA_HASH_DREG] || in nft_jhash_init() 79 !tb[NFTA_HASH_LEN] || in nft_jhash_init() 80 !tb[NFTA_HASH_MODULUS]) in nft_jhash_init() 83 if (tb[NFTA_HASH_OFFSET]) in nft_jhash_init() 84 priv->offset = ntohl(nla_get_be32(tb[NFTA_HASH_OFFSET])); in nft_jhash_init() 86 err = nft_parse_u32_check(tb[NFTA_HASH_LEN], U8_MAX, &len); in nft_jhash_init() 94 err = nft_parse_register_load(tb[NFTA_HASH_SREG], &priv->sreg, len); in nft_jhash_init() 98 priv->modulus = ntohl(nla_get_be32(tb[NFTA_HASH_MODULUS])); in nft_jhash_init() [all …]
|
D | nft_exthdr.c | 424 const struct nlattr * const tb[]) in nft_exthdr_init() argument 430 if (!tb[NFTA_EXTHDR_DREG] || in nft_exthdr_init() 431 !tb[NFTA_EXTHDR_TYPE] || in nft_exthdr_init() 432 !tb[NFTA_EXTHDR_OFFSET] || in nft_exthdr_init() 433 !tb[NFTA_EXTHDR_LEN]) in nft_exthdr_init() 436 err = nft_parse_u32_check(tb[NFTA_EXTHDR_OFFSET], U8_MAX, &offset); in nft_exthdr_init() 440 err = nft_parse_u32_check(tb[NFTA_EXTHDR_LEN], U8_MAX, &len); in nft_exthdr_init() 444 if (tb[NFTA_EXTHDR_FLAGS]) { in nft_exthdr_init() 445 err = nft_parse_u32_check(tb[NFTA_EXTHDR_FLAGS], U8_MAX, &flags); in nft_exthdr_init() 453 if (tb[NFTA_EXTHDR_OP]) { in nft_exthdr_init() [all …]
|
D | nft_ct.c | 388 const struct nlattr * const tb[]) in nft_ct_get_init() argument 394 priv->key = ntohl(nla_get_be32(tb[NFTA_CT_KEY])); in nft_ct_get_init() 398 if (tb[NFTA_CT_DIRECTION] != NULL) in nft_ct_get_init() 411 if (tb[NFTA_CT_DIRECTION] != NULL) in nft_ct_get_init() 417 if (tb[NFTA_CT_DIRECTION] != NULL) in nft_ct_get_init() 423 if (tb[NFTA_CT_DIRECTION] != NULL) in nft_ct_get_init() 437 if (tb[NFTA_CT_DIRECTION] == NULL) in nft_ct_get_init() 456 if (tb[NFTA_CT_DIRECTION] == NULL) in nft_ct_get_init() 463 if (tb[NFTA_CT_DIRECTION] == NULL) in nft_ct_get_init() 470 if (tb[NFTA_CT_DIRECTION] == NULL) in nft_ct_get_init() [all …]
|
/net/ethtool/ |
D | bitset.c | 330 struct nlattr *tb[ARRAY_SIZE(bitset_policy)]; in ethnl_bitset_is_compact() local 333 ret = nla_parse_nested(tb, ARRAY_SIZE(bitset_policy) - 1, bitset, in ethnl_bitset_is_compact() 338 if (tb[ETHTOOL_A_BITSET_BITS]) { in ethnl_bitset_is_compact() 339 if (tb[ETHTOOL_A_BITSET_VALUE] || tb[ETHTOOL_A_BITSET_MASK]) in ethnl_bitset_is_compact() 344 if (!tb[ETHTOOL_A_BITSET_SIZE] || !tb[ETHTOOL_A_BITSET_VALUE]) in ethnl_bitset_is_compact() 382 struct nlattr *tb[ARRAY_SIZE(bit_policy)]; in ethnl_parse_bit() local 385 ret = nla_parse_nested(tb, ARRAY_SIZE(bit_policy) - 1, bit_attr, in ethnl_parse_bit() 390 if (tb[ETHTOOL_A_BITSET_BIT_INDEX]) { in ethnl_parse_bit() 393 idx = nla_get_u32(tb[ETHTOOL_A_BITSET_BIT_INDEX]); in ethnl_parse_bit() 396 tb[ETHTOOL_A_BITSET_BIT_INDEX], in ethnl_parse_bit() [all …]
|
D | coalesce.c | 224 struct nlattr **tb = info->attrs; in ethnl_set_coalesce() local 233 tb[ETHTOOL_A_COALESCE_HEADER], in ethnl_set_coalesce() 247 if (tb[a] && !(supported_params & attr_to_mask(a))) { in ethnl_set_coalesce() 249 NL_SET_ERR_MSG_ATTR(info->extack, tb[a], in ethnl_set_coalesce() 263 tb[ETHTOOL_A_COALESCE_RX_USECS], &mod); in ethnl_set_coalesce() 265 tb[ETHTOOL_A_COALESCE_RX_MAX_FRAMES], &mod); in ethnl_set_coalesce() 267 tb[ETHTOOL_A_COALESCE_RX_USECS_IRQ], &mod); in ethnl_set_coalesce() 269 tb[ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ], &mod); in ethnl_set_coalesce() 271 tb[ETHTOOL_A_COALESCE_TX_USECS], &mod); in ethnl_set_coalesce() 273 tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES], &mod); in ethnl_set_coalesce() [all …]
|
/net/netfilter/ipset/ |
D | ip_set_hash_ipportnet.c | 159 hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipportnet4_uadt() argument 172 if (tb[IPSET_ATTR_LINENO]) in hash_ipportnet4_uadt() 173 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipportnet4_uadt() 175 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_ipportnet4_uadt() 176 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipportnet4_uadt() 177 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_ipportnet4_uadt() 178 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_ipportnet4_uadt() 181 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_ipportnet4_uadt() 185 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipportnet4_uadt() 189 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP2], &ip2_from); in hash_ipportnet4_uadt() [all …]
|
D | ip_set_hash_ipportip.c | 107 hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipportip4_uadt() argument 118 if (tb[IPSET_ATTR_LINENO]) in hash_ipportip4_uadt() 119 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipportip4_uadt() 121 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_ipportip4_uadt() 122 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipportip4_uadt() 123 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) in hash_ipportip4_uadt() 126 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipportip4_uadt() 130 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipportip4_uadt() 134 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP2], &e.ip2); in hash_ipportip4_uadt() 138 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipportip4_uadt() [all …]
|
D | ip_set_hash_netportnet.c | 187 hash_netportnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netportnet4_uadt() argument 199 if (tb[IPSET_ATTR_LINENO]) in hash_netportnet4_uadt() 200 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_netportnet4_uadt() 203 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_netportnet4_uadt() 204 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_netportnet4_uadt() 205 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_netportnet4_uadt() 206 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_netportnet4_uadt() 209 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_netportnet4_uadt() 213 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP2], &ip2_from); in hash_netportnet4_uadt() 217 ret = ip_set_get_extensions(set, tb, &ext); in hash_netportnet4_uadt() [all …]
|
D | ip_set_hash_ipmac.c | 110 hash_ipmac4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipmac4_uadt() argument 118 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipmac4_uadt() 119 !tb[IPSET_ATTR_ETHER] || in hash_ipmac4_uadt() 120 nla_len(tb[IPSET_ATTR_ETHER]) != ETH_ALEN || in hash_ipmac4_uadt() 121 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_ipmac4_uadt() 122 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_ipmac4_uadt() 123 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_ipmac4_uadt() 124 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_ipmac4_uadt() 125 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_ipmac4_uadt() 126 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_ipmac4_uadt() [all …]
|
D | ip_set_hash_ipport.c | 104 hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipport4_uadt() argument 115 if (tb[IPSET_ATTR_LINENO]) in hash_ipport4_uadt() 116 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipport4_uadt() 118 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipport4_uadt() 119 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipport4_uadt() 120 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) in hash_ipport4_uadt() 123 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipport4_uadt() 127 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipport4_uadt() 131 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipport4_uadt() 133 if (tb[IPSET_ATTR_PROTO]) { in hash_ipport4_uadt() [all …]
|
D | ip_set_hash_netport.c | 153 hash_netport4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netport4_uadt() argument 165 if (tb[IPSET_ATTR_LINENO]) in hash_netport4_uadt() 166 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_netport4_uadt() 168 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_netport4_uadt() 169 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_netport4_uadt() 170 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_netport4_uadt() 171 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_netport4_uadt() 174 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_netport4_uadt() 178 ret = ip_set_get_extensions(set, tb, &ext); in hash_netport4_uadt() 182 if (tb[IPSET_ATTR_CIDR]) { in hash_netport4_uadt() [all …]
|
D | ip_set_hash_netnet.c | 162 hash_netnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netnet4_uadt() argument 173 if (tb[IPSET_ATTR_LINENO]) in hash_netnet4_uadt() 174 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_netnet4_uadt() 177 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_netnet4_uadt() 178 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_netnet4_uadt() 181 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_netnet4_uadt() 185 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP2], &ip2_from); in hash_netnet4_uadt() 189 ret = ip_set_get_extensions(set, tb, &ext); in hash_netnet4_uadt() 193 if (tb[IPSET_ATTR_CIDR]) { in hash_netnet4_uadt() 194 e.cidr[0] = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_netnet4_uadt() [all …]
|
D | ip_set_hash_ipmark.c | 96 hash_ipmark4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipmark4_uadt() argument 106 if (tb[IPSET_ATTR_LINENO]) in hash_ipmark4_uadt() 107 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipmark4_uadt() 109 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipmark4_uadt() 110 !ip_set_attr_netorder(tb, IPSET_ATTR_MARK))) in hash_ipmark4_uadt() 113 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipmark4_uadt() 117 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipmark4_uadt() 121 e.mark = ntohl(nla_get_be32(tb[IPSET_ATTR_MARK])); in hash_ipmark4_uadt() 127 !(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_CIDR])) { in hash_ipmark4_uadt() 133 if (tb[IPSET_ATTR_IP_TO]) { in hash_ipmark4_uadt() [all …]
|
D | ip_set_hash_net.c | 135 hash_net4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_net4_uadt() argument 145 if (tb[IPSET_ATTR_LINENO]) in hash_net4_uadt() 146 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_net4_uadt() 148 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_net4_uadt() 149 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) in hash_net4_uadt() 152 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_net4_uadt() 156 ret = ip_set_get_extensions(set, tb, &ext); in hash_net4_uadt() 160 if (tb[IPSET_ATTR_CIDR]) { in hash_net4_uadt() 161 e.cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_net4_uadt() 166 if (tb[IPSET_ATTR_CADT_FLAGS]) { in hash_net4_uadt() [all …]
|
/net/sched/ |
D | cls_flower.c | 751 static void fl_set_key_val(struct nlattr **tb, in fl_set_key_val() argument 755 if (!tb[val_type]) in fl_set_key_val() 757 nla_memcpy(val, tb[val_type], len); in fl_set_key_val() 758 if (mask_type == TCA_FLOWER_UNSPEC || !tb[mask_type]) in fl_set_key_val() 761 nla_memcpy(mask, tb[mask_type], len); in fl_set_key_val() 764 static int fl_set_key_port_range(struct nlattr **tb, struct fl_flow_key *key, in fl_set_key_port_range() argument 768 fl_set_key_val(tb, &key->tp_range.tp_min.dst, in fl_set_key_port_range() 771 fl_set_key_val(tb, &key->tp_range.tp_max.dst, in fl_set_key_port_range() 774 fl_set_key_val(tb, &key->tp_range.tp_min.src, in fl_set_key_port_range() 777 fl_set_key_val(tb, &key->tp_range.tp_max.src, in fl_set_key_port_range() [all …]
|
D | act_tunnel_key.c | 90 struct nlattr *tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX + 1]; in tunnel_key_copy_geneve_opt() local 94 err = nla_parse_nested_deprecated(tb, in tunnel_key_copy_geneve_opt() 100 if (!tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_CLASS] || in tunnel_key_copy_geneve_opt() 101 !tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_TYPE] || in tunnel_key_copy_geneve_opt() 102 !tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_DATA]) { in tunnel_key_copy_geneve_opt() 107 data = nla_data(tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_DATA]); in tunnel_key_copy_geneve_opt() 108 data_len = nla_len(tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_DATA]); in tunnel_key_copy_geneve_opt() 125 nla_get_be16(tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_CLASS]); in tunnel_key_copy_geneve_opt() 126 opt->type = nla_get_u8(tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_TYPE]); in tunnel_key_copy_geneve_opt() 142 struct nlattr *tb[TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX + 1]; in tunnel_key_copy_vxlan_opt() local [all …]
|
D | act_mpls.c | 166 struct nlattr *tb[TCA_MPLS_MAX + 1]; in tcf_mpls_init() local 181 err = nla_parse_nested(tb, TCA_MPLS_MAX, nla, mpls_policy, extack); in tcf_mpls_init() 185 if (!tb[TCA_MPLS_PARMS]) { in tcf_mpls_init() 189 parm = nla_data(tb[TCA_MPLS_PARMS]); in tcf_mpls_init() 195 if (!tb[TCA_MPLS_PROTO]) { in tcf_mpls_init() 199 if (!eth_proto_is_802_3(nla_get_be16(tb[TCA_MPLS_PROTO]))) { in tcf_mpls_init() 203 if (tb[TCA_MPLS_LABEL] || tb[TCA_MPLS_TTL] || tb[TCA_MPLS_TC] || in tcf_mpls_init() 204 tb[TCA_MPLS_BOS]) { in tcf_mpls_init() 210 if (tb[TCA_MPLS_PROTO] || tb[TCA_MPLS_LABEL] || in tcf_mpls_init() 211 tb[TCA_MPLS_TTL] || tb[TCA_MPLS_TC] || tb[TCA_MPLS_BOS]) { in tcf_mpls_init() [all …]
|
D | em_ipt.c | 30 int (*validate_match_data)(struct nlattr **tb, u8 mrev); 60 static int policy_validate_match_data(struct nlattr **tb, u8 mrev) in policy_validate_match_data() argument 67 if (nla_get_u32(tb[TCA_EM_IPT_HOOK]) != NF_INET_PRE_ROUTING) { in policy_validate_match_data() 75 static int addrtype_validate_match_data(struct nlattr **tb, u8 mrev) in addrtype_validate_match_data() argument 97 static struct xt_match *get_xt_match(struct nlattr **tb) in get_xt_match() argument 104 mname_attr = tb[TCA_EM_IPT_MATCH_NAME]; in get_xt_match() 115 if (tb[TCA_EM_IPT_MATCH_REVISION]) in get_xt_match() 116 mrev = nla_get_u8(tb[TCA_EM_IPT_MATCH_REVISION]); in get_xt_match() 118 ret = m->validate_match_data(tb, mrev); in get_xt_match() 122 nfproto = nla_get_u8(tb[TCA_EM_IPT_NFPROTO]); in get_xt_match() [all …]
|
/net/wireless/ |
D | pmsr.c | 18 struct nlattr *tb[NL80211_PMSR_FTM_REQ_ATTR_MAX + 1]; in pmsr_parse_ftm() local 28 nla_parse_nested_deprecated(tb, NL80211_PMSR_FTM_REQ_ATTR_MAX, ftmreq, in pmsr_parse_ftm() 31 if (tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE]) in pmsr_parse_ftm() 32 preamble = nla_get_u32(tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE]); in pmsr_parse_ftm() 42 if (!tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE]) { in pmsr_parse_ftm() 51 tb[NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE], in pmsr_parse_ftm() 59 if (tb[NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD]) in pmsr_parse_ftm() 61 nla_get_u32(tb[NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD]); in pmsr_parse_ftm() 63 out->ftm.asap = !!tb[NL80211_PMSR_FTM_REQ_ATTR_ASAP]; in pmsr_parse_ftm() 66 tb[NL80211_PMSR_FTM_REQ_ATTR_ASAP], in pmsr_parse_ftm() [all …]
|
/net/core/ |
D | rtnetlink.c | 2019 bool strict_check, struct nlattr **tb, in rtnl_valid_dump_ifinfo_req() argument 2043 return nlmsg_parse_deprecated_strict(nlh, sizeof(*ifm), tb, in rtnl_valid_dump_ifinfo_req() 2058 return nlmsg_parse_deprecated(nlh, hdrlen, tb, IFLA_MAX, ifla_policy, in rtnl_valid_dump_ifinfo_req() 2072 struct nlattr *tb[IFLA_MAX+1]; in rtnl_dump_ifinfo() local 2083 err = rtnl_valid_dump_ifinfo_req(nlh, cb->strict_check, tb, extack); in rtnl_dump_ifinfo() 2092 if (!tb[i]) in rtnl_dump_ifinfo() 2098 netnsid = nla_get_s32(tb[i]); in rtnl_dump_ifinfo() 2106 ext_filter_mask = nla_get_u32(tb[i]); in rtnl_dump_ifinfo() 2109 master_idx = nla_get_u32(tb[i]); in rtnl_dump_ifinfo() 2112 kind_ops = linkinfo_to_kind_ops(tb[i]); in rtnl_dump_ifinfo() [all …]
|
/net/ipv4/ |
D | ip_tunnel_core.c | 482 struct nlattr *tb[LWTUNNEL_IP_OPT_GENEVE_MAX + 1]; in ip_tun_parse_opts_geneve() local 485 err = nla_parse_nested(tb, LWTUNNEL_IP_OPT_GENEVE_MAX, attr, in ip_tun_parse_opts_geneve() 490 if (!tb[LWTUNNEL_IP_OPT_GENEVE_CLASS] || in ip_tun_parse_opts_geneve() 491 !tb[LWTUNNEL_IP_OPT_GENEVE_TYPE] || in ip_tun_parse_opts_geneve() 492 !tb[LWTUNNEL_IP_OPT_GENEVE_DATA]) in ip_tun_parse_opts_geneve() 495 attr = tb[LWTUNNEL_IP_OPT_GENEVE_DATA]; in ip_tun_parse_opts_geneve() 505 attr = tb[LWTUNNEL_IP_OPT_GENEVE_CLASS]; in ip_tun_parse_opts_geneve() 507 attr = tb[LWTUNNEL_IP_OPT_GENEVE_TYPE]; in ip_tun_parse_opts_geneve() 519 struct nlattr *tb[LWTUNNEL_IP_OPT_VXLAN_MAX + 1]; in ip_tun_parse_opts_vxlan() local 522 err = nla_parse_nested(tb, LWTUNNEL_IP_OPT_VXLAN_MAX, attr, in ip_tun_parse_opts_vxlan() [all …]
|