/net/netfilter/ |
D | nf_tables_api.c | 101 const struct nlattr * const *nla) in nft_ctx_init() argument 107 ctx->nla = nla; in nft_ctx_init() 282 if (msg_type == NFT_MSG_NEWSET && ctx->nla[NFTA_SET_ID] != NULL) { in nft_trans_set_add() 284 ntohl(nla_get_be32(ctx->nla[NFTA_SET_ID])); in nft_trans_set_add() 312 const struct nlattr *nla, in nft_table_lookup() argument 318 if (!nla_strcmp(nla, table->name) && in nft_table_lookup() 326 const struct nlattr *nla, in nf_tables_table_lookup() argument 331 if (nla == NULL) in nf_tables_table_lookup() 334 table = nft_table_lookup(afi, nla, genmask); in nf_tables_table_lookup() 349 __nf_tables_chain_type_lookup(int family, const struct nlattr *nla) in __nf_tables_chain_type_lookup() argument [all …]
|
D | nft_log.c | 55 const struct nlattr *nla; in nft_log_init() local 68 nla = tb[NFTA_LOG_PREFIX]; in nft_log_init() 69 if (nla != NULL) { in nft_log_init() 70 priv->prefix = kmalloc(nla_len(nla) + 1, GFP_KERNEL); in nft_log_init() 73 nla_strlcpy(priv->prefix, nla, nla_len(nla) + 1); in nft_log_init()
|
D | nf_tables_trace.c | 51 struct nlattr *nla; in trace_fill_header() local 56 nla = nla_reserve(nlskb, type, len); in trace_fill_header() 57 if (!nla || skb_copy_bits(skb, off, nla_data(nla), len)) in trace_fill_header()
|
/net/wimax/ |
D | op-msg.c | 187 struct nlattr *nla; in wimax_msg_data_len() local 189 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_data_len() 191 if (nla == NULL) { in wimax_msg_data_len() 195 *size = nla_len(nla); in wimax_msg_data_len() 196 return nla_data(nla); in wimax_msg_data_len() 209 struct nlattr *nla; in wimax_msg_data() local 211 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_data() 213 if (nla == NULL) { in wimax_msg_data() 217 return nla_data(nla); in wimax_msg_data() 230 struct nlattr *nla; in wimax_msg_len() local [all …]
|
/net/openvswitch/ |
D | flow_netlink.c | 385 const struct nlattr *nla; in __parse_flow_nlattrs() local 390 nla_for_each_nested(nla, attr, rem) { in __parse_flow_nlattrs() 391 u16 type = nla_type(nla); in __parse_flow_nlattrs() 406 if (!check_attr_len(nla_len(nla), expected_len)) { in __parse_flow_nlattrs() 408 type, nla_len(nla), expected_len); in __parse_flow_nlattrs() 412 if (!nz || !is_all_zero(nla_data(nla), expected_len)) { in __parse_flow_nlattrs() 414 a[type] = nla; in __parse_flow_nlattrs() 706 struct nlattr *nla; in vxlan_opt_to_nlattr() local 708 nla = nla_nest_start(skb, OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS); in vxlan_opt_to_nlattr() 709 if (!nla) in vxlan_opt_to_nlattr() [all …]
|
D | vport.c | 316 struct nlattr *nla; in ovs_vport_get_options() local 322 nla = nla_nest_start(skb, OVS_VPORT_ATTR_OPTIONS); in ovs_vport_get_options() 323 if (!nla) in ovs_vport_get_options() 328 nla_nest_cancel(skb, nla); in ovs_vport_get_options() 332 nla_nest_end(skb, nla); in ovs_vport_get_options()
|
/net/sched/ |
D | sch_fifo.c | 147 struct nlattr *nla; in fifo_set_limit() local 154 nla = kmalloc(nla_attr_size(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); in fifo_set_limit() 155 if (nla) { in fifo_set_limit() 156 nla->nla_type = RTM_NEWQDISC; in fifo_set_limit() 157 nla->nla_len = nla_attr_size(sizeof(struct tc_fifo_qopt)); in fifo_set_limit() 158 ((struct tc_fifo_qopt *)nla_data(nla))->limit = limit; in fifo_set_limit() 160 ret = q->ops->change(q, nla); in fifo_set_limit() 161 kfree(nla); in fifo_set_limit()
|
D | act_bpf.c | 103 struct nlattr *nla; in tcf_bpf_dump_bpf_info() local 108 nla = nla_reserve(skb, TCA_ACT_BPF_OPS, prog->bpf_num_ops * in tcf_bpf_dump_bpf_info() 110 if (nla == NULL) in tcf_bpf_dump_bpf_info() 113 memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla)); in tcf_bpf_dump_bpf_info() 274 static int tcf_bpf_init(struct net *net, struct nlattr *nla, in tcf_bpf_init() argument 286 if (!nla) in tcf_bpf_init() 289 ret = nla_parse_nested(tb, TCA_ACT_BPF_MAX, nla, act_bpf_policy); in tcf_bpf_init()
|
D | act_api.c | 528 struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla, in tcf_action_init_1() argument 540 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tcf_action_init_1() 583 err = a_o->init(net, nla, est, &a, ovr, bind); in tcf_action_init_1() 613 int tcf_action_init(struct net *net, struct nlattr *nla, struct nlattr *est, in tcf_action_init() argument 621 err = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL); in tcf_action_init() 745 static struct tc_action *tcf_action_get_1(struct net *net, struct nlattr *nla, in tcf_action_get_1() argument 754 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tcf_action_get_1() 781 static int tca_action_flush(struct net *net, struct nlattr *nla, in tca_action_flush() argument 803 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tca_action_flush() 881 tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n, in tca_action_gd() argument [all …]
|
D | em_meta.c | 694 static int meta_var_change(struct meta_value *dst, struct nlattr *nla) in meta_var_change() argument 696 int len = nla_len(nla); in meta_var_change() 698 dst->val = (unsigned long)kmemdup(nla_data(nla), len, GFP_KERNEL); in meta_var_change() 747 static int meta_int_change(struct meta_value *dst, struct nlattr *nla) in meta_int_change() argument 749 if (nla_len(nla) >= sizeof(unsigned long)) { in meta_int_change() 750 dst->val = *(unsigned long *) nla_data(nla); in meta_int_change() 752 } else if (nla_len(nla) == sizeof(u32)) { in meta_int_change() 753 dst->val = nla_get_u32(nla); in meta_int_change() 884 static inline int meta_change_data(struct meta_value *dst, struct nlattr *nla) in meta_change_data() argument 886 if (nla) { in meta_change_data() [all …]
|
D | act_ipt.c | 96 static int __tcf_ipt_init(struct tc_action_net *tn, struct nlattr *nla, in __tcf_ipt_init() argument 109 if (nla == NULL) in __tcf_ipt_init() 112 err = nla_parse_nested(tb, TCA_IPT_MAX, nla, ipt_policy); in __tcf_ipt_init() 194 static int tcf_ipt_init(struct net *net, struct nlattr *nla, in tcf_ipt_init() argument 200 return __tcf_ipt_init(tn, nla, est, a, &act_ipt_ops, ovr, bind); in tcf_ipt_init() 203 static int tcf_xt_init(struct net *net, struct nlattr *nla, in tcf_xt_init() argument 209 return __tcf_ipt_init(tn, nla, est, a, &act_xt_ops, ovr, bind); in tcf_xt_init()
|
D | ematch.c | 175 struct tcf_ematch *em, struct nlattr *nla, int idx) in tcf_em_validate() argument 178 struct tcf_ematch_hdr *em_hdr = nla_data(nla); in tcf_em_validate() 179 int data_len = nla_len(nla) - sizeof(*em_hdr); in tcf_em_validate() 304 int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla, in tcf_em_tree_validate() argument 314 if (!nla) in tcf_em_tree_validate() 317 err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy); in tcf_em_tree_validate()
|
D | act_connmark.c | 99 static int tcf_connmark_init(struct net *net, struct nlattr *nla, in tcf_connmark_init() argument 109 if (!nla) in tcf_connmark_init() 112 ret = nla_parse_nested(tb, TCA_CONNMARK_MAX, nla, connmark_policy); in tcf_connmark_init()
|
D | act_simple.c | 82 static int tcf_simp_init(struct net *net, struct nlattr *nla, in tcf_simp_init() argument 94 if (nla == NULL) in tcf_simp_init() 97 err = nla_parse_nested(tb, TCA_DEF_MAX, nla, simple_policy); in tcf_simp_init()
|
D | act_gact.c | 59 static int tcf_gact_init(struct net *net, struct nlattr *nla, in tcf_gact_init() argument 73 if (nla == NULL) in tcf_gact_init() 76 err = nla_parse_nested(tb, TCA_GACT_MAX, nla, gact_policy); in tcf_gact_init()
|
D | act_skbedit.c | 66 static int tcf_skbedit_init(struct net *net, struct nlattr *nla, in tcf_skbedit_init() argument 79 if (nla == NULL) in tcf_skbedit_init() 82 err = nla_parse_nested(tb, TCA_SKBEDIT_MAX, nla, skbedit_policy); in tcf_skbedit_init()
|
D | act_vlan.c | 106 static int tcf_vlan_init(struct net *net, struct nlattr *nla, in tcf_vlan_init() argument 121 if (!nla) in tcf_vlan_init() 124 err = nla_parse_nested(tb, TCA_VLAN_MAX, nla, vlan_policy); in tcf_vlan_init()
|
D | act_skbmod.c | 87 static int tcf_skbmod_init(struct net *net, struct nlattr *nla, in tcf_skbmod_init() argument 103 if (!nla) in tcf_skbmod_init() 106 err = nla_parse_nested(tb, TCA_SKBMOD_MAX, nla, skbmod_policy); in tcf_skbmod_init()
|
D | act_pedit.c | 35 static int tcf_pedit_init(struct net *net, struct nlattr *nla, in tcf_pedit_init() argument 47 if (nla == NULL) in tcf_pedit_init() 50 err = nla_parse_nested(tb, TCA_PEDIT_MAX, nla, pedit_policy); in tcf_pedit_init()
|
/net/core/ |
D | drop_monitor.c | 80 struct nlattr *nla; in reset_per_cpu_data() local 101 nla = nla_reserve(skb, NLA_UNSPEC, in reset_per_cpu_data() 103 if (!nla) { in reset_per_cpu_data() 108 msg = nla_data(nla); in reset_per_cpu_data() 163 struct nlattr *nla; in trace_drop_common() local 178 nla = genlmsg_data(nlmsg_data(nlh)); in trace_drop_common() 179 msg = nla_data(nla); in trace_drop_common() 192 nla->nla_len += NLA_ALIGN(sizeof(struct net_dm_drop_point)); in trace_drop_common()
|
/net/mpls/ |
D | af_mpls.c | 684 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in mpls_count_nexthops() local 688 nla = nla_find(attrs, attrlen, RTA_VIA); in mpls_count_nexthops() 689 if (nla && nla_len(nla) >= in mpls_count_nexthops() 691 int via_alen = nla_len(nla) - in mpls_count_nexthops() 1093 struct nlattr *nla; in nla_put_via() local 1097 nla = nla_reserve(skb, RTA_VIA, alen + 2); in nla_put_via() 1098 if (!nla) in nla_put_via() 1104 via = nla_data(nla); in nla_put_via() 1113 struct nlattr *nla; in nla_put_labels() local 1117 nla = nla_reserve(skb, attrtype, labels*4); in nla_put_labels() [all …]
|
D | internal.h | 119 int nla_get_labels(const struct nlattr *nla, u32 max_labels, u8 *labels, 121 int nla_get_via(const struct nlattr *nla, u8 *via_alen, u8 *via_table,
|
/net/ipv4/ |
D | fib_semantics.c | 494 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in fib_get_nhs() local 496 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_get_nhs() 497 nexthop_nh->nh_gw = nla ? nla_get_in_addr(nla) : 0; in fib_get_nhs() 499 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_get_nhs() 500 nexthop_nh->nh_tclassid = nla ? nla_get_u32(nla) : 0; in fib_get_nhs() 504 nla = nla_find(attrs, attrlen, RTA_ENCAP); in fib_get_nhs() 505 if (nla) { in fib_get_nhs() 518 nla, AF_INET, cfg, in fib_get_nhs() 672 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in fib_nh_match() local 674 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_nh_match() [all …]
|
/net/netfilter/ipset/ |
D | ip_set_core.c | 280 flag_nested(const struct nlattr *nla) in flag_nested() argument 282 return nla->nla_type & NLA_F_NESTED; in flag_nested() 292 ip_set_get_ipaddr4(struct nlattr *nla, __be32 *ipaddr) in ip_set_get_ipaddr4() argument 296 if (unlikely(!flag_nested(nla))) in ip_set_get_ipaddr4() 298 if (nla_parse_nested(tb, IPSET_ATTR_IPADDR_MAX, nla, ipaddr_policy)) in ip_set_get_ipaddr4() 309 ip_set_get_ipaddr6(struct nlattr *nla, union nf_inet_addr *ipaddr) in ip_set_get_ipaddr6() argument 313 if (unlikely(!flag_nested(nla))) in ip_set_get_ipaddr6() 316 if (nla_parse_nested(tb, IPSET_ATTR_IPADDR_MAX, nla, ipaddr_policy)) in ip_set_get_ipaddr6() 1528 const struct nlattr *nla; in ip_set_uadd() local 1559 nla_for_each_nested(nla, attr[IPSET_ATTR_ADT], nla_rem) { in ip_set_uadd() [all …]
|
/net/wireless/ |
D | wext-core.c | 468 struct nlattr *nla; in wireless_send_event() local 569 nla = nla_reserve(skb, IFLA_WIRELESS, event_len); in wireless_send_event() 570 if (!nla) { in wireless_send_event() 574 event = nla_data(nla); in wireless_send_event() 604 nla = nla_reserve(compskb, IFLA_WIRELESS, event_len); in wireless_send_event() 605 if (!nla) { in wireless_send_event() 610 compat_event = nla_data(nla); in wireless_send_event()
|