Home
last modified time | relevance | path

Searched refs:nla (Results 1 – 25 of 29) sorted by relevance

12

/net/netlink/
Dattr.c26 static int validate_nla(struct nlattr *nla, int maxtype, in validate_nla() argument
30 int minlen = 0, attrlen = nla_len(nla), type = nla_type(nla); in validate_nla()
51 if (!minlen || memchr(nla_data(nla), '\0', minlen) == NULL) in validate_nla()
60 char *buf = nla_data(nla); in validate_nla()
82 nla = nla_data(nla) + NLA_ALIGN(pt->len); in validate_nla()
83 if (attrlen < NLA_ALIGN(pt->len) + NLA_HDRLEN + nla_len(nla)) in validate_nla()
121 struct nlattr *nla; in nla_validate() local
124 nla_for_each_attr(nla, head, len, rem) { in nla_validate()
125 err = validate_nla(nla, maxtype, policy); in nla_validate()
153 struct nlattr *nla; in nla_parse() local
[all …]
/net/wimax/
Dop-msg.c179 struct nlattr *nla; in wimax_msg_data_len() local
181 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_data_len()
183 if (nla == NULL) { in wimax_msg_data_len()
187 *size = nla_len(nla); in wimax_msg_data_len()
188 return nla_data(nla); in wimax_msg_data_len()
201 struct nlattr *nla; in wimax_msg_data() local
203 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_data()
205 if (nla == NULL) { in wimax_msg_data()
209 return nla_data(nla); in wimax_msg_data()
222 struct nlattr *nla; in wimax_msg_len() local
[all …]
/net/sched/
Dsch_fifo.c114 struct nlattr *nla; in fifo_set_limit() local
121 nla = kmalloc(nla_attr_size(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); in fifo_set_limit()
122 if (nla) { in fifo_set_limit()
123 nla->nla_type = RTM_NEWQDISC; in fifo_set_limit()
124 nla->nla_len = nla_attr_size(sizeof(struct tc_fifo_qopt)); in fifo_set_limit()
125 ((struct tc_fifo_qopt *)nla_data(nla))->limit = limit; in fifo_set_limit()
127 ret = q->ops->change(q, nla); in fifo_set_limit()
128 kfree(nla); in fifo_set_limit()
Dem_meta.c562 static int meta_var_change(struct meta_value *dst, struct nlattr *nla) in meta_var_change() argument
564 int len = nla_len(nla); in meta_var_change()
566 dst->val = (unsigned long)kmemdup(nla_data(nla), len, GFP_KERNEL); in meta_var_change()
614 static int meta_int_change(struct meta_value *dst, struct nlattr *nla) in meta_int_change() argument
616 if (nla_len(nla) >= sizeof(unsigned long)) { in meta_int_change()
617 dst->val = *(unsigned long *) nla_data(nla); in meta_int_change()
619 } else if (nla_len(nla) == sizeof(u32)) { in meta_int_change()
620 dst->val = nla_get_u32(nla); in meta_int_change()
750 static inline int meta_change_data(struct meta_value *dst, struct nlattr *nla) in meta_change_data() argument
752 if (nla) { in meta_change_data()
[all …]
Dact_api.c477 struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est, in tcf_action_init_1() argument
488 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tcf_action_init_1()
536 err = a_o->init(nla, est, a, ovr, bind); in tcf_action_init_1()
558 struct tc_action *tcf_action_init(struct nlattr *nla, struct nlattr *est, in tcf_action_init() argument
566 err = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL); in tcf_action_init()
685 tcf_action_get_1(struct nlattr *nla, struct nlmsghdr *n, u32 pid) in tcf_action_get_1() argument
692 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tcf_action_get_1()
751 static int tca_action_flush(struct nlattr *nla, struct nlmsghdr *n, u32 pid) in tca_action_flush() argument
778 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tca_action_flush()
827 tca_action_gd(struct nlattr *nla, struct nlmsghdr *n, u32 pid, int event) in tca_action_gd() argument
[all …]
Dematch.c174 struct tcf_ematch *em, struct nlattr *nla, int idx) in tcf_em_validate() argument
177 struct tcf_ematch_hdr *em_hdr = nla_data(nla); in tcf_em_validate()
178 int data_len = nla_len(nla) - sizeof(*em_hdr); in tcf_em_validate()
294 int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla, in tcf_em_tree_validate() argument
304 if (!nla) in tcf_em_tree_validate()
307 err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy); in tcf_em_tree_validate()
Dact_simple.c97 static int tcf_simp_init(struct nlattr *nla, struct nlattr *est, in tcf_simp_init() argument
107 if (nla == NULL) in tcf_simp_init()
110 err = nla_parse_nested(tb, TCA_DEF_MAX, nla, simple_policy); in tcf_simp_init()
Dact_skbedit.c68 static int tcf_skbedit_init(struct nlattr *nla, struct nlattr *est, 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()
Dact_gact.c61 static int tcf_gact_init(struct nlattr *nla, struct nlattr *est, in tcf_gact_init() argument
71 if (nla == NULL) in tcf_gact_init()
74 err = nla_parse_nested(tb, TCA_GACT_MAX, nla, gact_policy); in tcf_gact_init()
Dact_mirred.c61 static int tcf_mirred_init(struct nlattr *nla, struct nlattr *est, in tcf_mirred_init() argument
72 if (nla == NULL) in tcf_mirred_init()
75 err = nla_parse_nested(tb, TCA_MIRRED_MAX, nla, mirred_policy); in tcf_mirred_init()
Dact_pedit.c40 static int tcf_pedit_init(struct nlattr *nla, struct nlattr *est, in tcf_pedit_init() argument
51 if (nla == NULL) in tcf_pedit_init()
54 err = nla_parse_nested(tb, TCA_PEDIT_MAX, nla, pedit_policy); in tcf_pedit_init()
Dsch_netem.c370 static int parse_attr(struct nlattr *tb[], int maxtype, struct nlattr *nla, in parse_attr() argument
373 int nested_len = nla_len(nla) - NLA_ALIGN(len); in parse_attr()
378 return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), in parse_attr()
561 struct nlattr *nla = (struct nlattr *) b; in netem_dump() local
588 nla->nla_len = skb_tail_pointer(skb) - b; in netem_dump()
Dact_nat.c47 static int tcf_nat_init(struct nlattr *nla, struct nlattr *est, in tcf_nat_init() argument
56 if (nla == NULL) in tcf_nat_init()
59 err = nla_parse_nested(tb, TCA_NAT_MAX, nla, nat_policy); in tcf_nat_init()
Dact_ipt.c104 static int tcf_ipt_init(struct nlattr *nla, struct nlattr *est, in tcf_ipt_init() argument
116 if (nla == NULL) in tcf_ipt_init()
119 err = nla_parse_nested(tb, TCA_IPT_MAX, nla, ipt_policy); in tcf_ipt_init()
Dact_police.c129 static int tcf_act_police_locate(struct nlattr *nla, struct nlattr *est, in tcf_act_police_locate() argument
140 if (nla == NULL) in tcf_act_police_locate()
143 err = nla_parse_nested(tb, TCA_POLICE_MAX, nla, police_policy); in tcf_act_police_locate()
Dsch_htb.c1314 struct nlattr nla; in htb_change_class() member
1317 .nla = { in htb_change_class()
1344 tca[TCA_RATE] ? : &est.nla); in htb_change_class()
/net/core/
Dfilter.c307 struct nlattr *nla; in sk_run_filter() local
314 nla = nla_find((struct nlattr *)&skb->data[A], in sk_run_filter()
316 if (nla) in sk_run_filter()
317 A = (void *)nla - (void *)skb->data; in sk_run_filter()
323 struct nlattr *nla; in sk_run_filter() local
330 nla = (struct nlattr *)&skb->data[A]; in sk_run_filter()
331 if (nla->nla_len > A - skb->len) in sk_run_filter()
334 nla = nla_find_nested(nla, X); in sk_run_filter()
335 if (nla) in sk_run_filter()
336 A = (void *)nla - (void *)skb->data; in sk_run_filter()
/net/ipv4/
Dfib_semantics.c403 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in fib_get_nhs() local
405 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_get_nhs()
406 nh->nh_gw = nla ? nla_get_be32(nla) : 0; in fib_get_nhs()
408 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_get_nhs()
409 nh->nh_tclassid = nla ? nla_get_u32(nla) : 0; in fib_get_nhs()
456 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in fib_nh_match() local
458 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_nh_match()
459 if (nla && nla_get_be32(nla) != nh->nh_gw) in fib_nh_match()
462 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_nh_match()
463 if (nla && nla_get_u32(nla) != nh->nh_tclassid) in fib_nh_match()
[all …]
Dfib_frontend.c312 struct nlattr *nla; in put_rtax() local
314 nla = (struct nlattr *) ((char *) mx + len); in put_rtax()
315 nla->nla_type = type; in put_rtax()
316 nla->nla_len = nla_attr_size(4); in put_rtax()
317 *(u32 *) nla_data(nla) = value; in put_rtax()
/net/netfilter/
Dnfnetlink_queue.c361 struct nlattr *nla; in nfqnl_build_packet_message() local
369 nla = (struct nlattr *)skb_put(skb, nla_total_size(data_len)); in nfqnl_build_packet_message()
370 nla->nla_type = NFQA_PAYLOAD; in nfqnl_build_packet_message()
371 nla->nla_len = sz; in nfqnl_build_packet_message()
373 if (skb_copy_bits(entskb, 0, nla_data(nla), data_len)) in nfqnl_build_packet_message()
Dnfnetlink_log.c499 struct nlattr *nla; in __build_packet_message() local
507 nla = (struct nlattr *)skb_put(inst->skb, nla_total_size(data_len)); in __build_packet_message()
508 nla->nla_type = NFULA_PAYLOAD; in __build_packet_message()
509 nla->nla_len = size; in __build_packet_message()
511 if (skb_copy_bits(skb, 0, nla_data(nla), data_len)) in __build_packet_message()
/net/netlabel/
Dnetlabel_cipso_v4.c103 struct nlattr *nla; in netlbl_cipsov4_add_common() local
114 nla_for_each_nested(nla, info->attrs[NLBL_CIPSOV4_A_TAGLST], nla_rem) in netlbl_cipsov4_add_common()
115 if (nla_type(nla) == NLBL_CIPSOV4_A_TAG) { in netlbl_cipsov4_add_common()
118 doi_def->tags[iter++] = nla_get_u8(nla); in netlbl_cipsov4_add_common()
/net/ipv6/
Daddrconf.c3750 struct nlattr *nla; in inet6_fill_ifinfo() local
3790 nla = nla_reserve(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(s32)); in inet6_fill_ifinfo()
3791 if (nla == NULL) in inet6_fill_ifinfo()
3793 ipv6_store_devconf(&idev->cnf, nla_data(nla), nla_len(nla)); in inet6_fill_ifinfo()
3797 nla = nla_reserve(skb, IFLA_INET6_STATS, IPSTATS_MIB_MAX * sizeof(u64)); in inet6_fill_ifinfo()
3798 if (nla == NULL) in inet6_fill_ifinfo()
3800 snmp6_fill_stats(nla_data(nla), idev, IFLA_INET6_STATS, nla_len(nla)); in inet6_fill_ifinfo()
3802 nla = nla_reserve(skb, IFLA_INET6_ICMP6STATS, ICMP6_MIB_MAX * sizeof(u64)); in inet6_fill_ifinfo()
3803 if (nla == NULL) in inet6_fill_ifinfo()
3805 snmp6_fill_stats(nla_data(nla), idev, IFLA_INET6_ICMP6STATS, nla_len(nla)); in inet6_fill_ifinfo()
/net/netfilter/ipvs/
Dip_vs_ctl.c2697 struct nlattr *nla, int full_entry) in ip_vs_genl_parse_service() argument
2703 if (nla == NULL || in ip_vs_genl_parse_service()
2704 nla_parse_nested(attrs, IPVS_SVC_ATTR_MAX, nla, ip_vs_svc_policy)) in ip_vs_genl_parse_service()
2774 static struct ip_vs_service *ip_vs_genl_find_service(struct nlattr *nla) in ip_vs_genl_find_service() argument
2779 ret = ip_vs_genl_parse_service(&usvc, nla, 0); in ip_vs_genl_find_service()
2887 struct nlattr *nla, int full_entry) in ip_vs_genl_parse_dest() argument
2893 if (nla == NULL || in ip_vs_genl_parse_dest()
2894 nla_parse_nested(attrs, IPVS_DEST_ATTR_MAX, nla, ip_vs_dest_policy)) in ip_vs_genl_parse_dest()
/net/wireless/
Dnl80211.c538 static int parse_monitor_flags(struct nlattr *nla, u32 *mntrflags) in parse_monitor_flags() argument
545 if (!nla) in parse_monitor_flags()
549 nla, mntr_flags_policy)) in parse_monitor_flags()
1070 static int parse_station_flags(struct nlattr *nla, u32 *staflags) in parse_station_flags() argument
1077 if (!nla) in parse_station_flags()
1081 nla, sta_flags_policy)) in parse_station_flags()

12