/linux-2.6.39/lib/ |
D | nlattr.c | 26 static int validate_nla(const 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 const 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() 179 const struct nlattr *nla; in nla_parse() local [all …]
|
/linux-2.6.39/include/net/ |
D | netlink.h | 237 extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, 240 extern int nla_memcmp(const struct nlattr *nla, const void *data, 242 extern int nla_strcmp(const struct nlattr *nla, const char *str); 676 static inline int nla_type(const struct nlattr *nla) in nla_type() argument 678 return nla->nla_type & NLA_TYPE_MASK; in nla_type() 685 static inline void *nla_data(const struct nlattr *nla) in nla_data() argument 687 return (char *) nla + NLA_HDRLEN; in nla_data() 694 static inline int nla_len(const struct nlattr *nla) in nla_len() argument 696 return nla->nla_len - NLA_HDRLEN; in nla_len() 704 static inline int nla_ok(const struct nlattr *nla, int remaining) in nla_ok() argument [all …]
|
D | fib_rules.h | 102 static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla) in frh_get_table() argument 104 if (nla[FRA_TABLE]) in frh_get_table() 105 return nla_get_u32(nla[FRA_TABLE]); in frh_get_table()
|
D | act_api.h | 119 extern struct tc_action *tcf_action_init(struct nlattr *nla, struct nlattr *est, char *n, int ovr, … 120 extern struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est, char *n, int ovr…
|
/linux-2.6.39/net/wimax/ |
D | op-msg.c | 186 struct nlattr *nla; in wimax_msg_data_len() local 188 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_data_len() 190 if (nla == NULL) { in wimax_msg_data_len() 194 *size = nla_len(nla); in wimax_msg_data_len() 195 return nla_data(nla); in wimax_msg_data_len() 208 struct nlattr *nla; in wimax_msg_data() local 210 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_data() 212 if (nla == NULL) { in wimax_msg_data() 216 return nla_data(nla); in wimax_msg_data() 229 struct nlattr *nla; in wimax_msg_len() local [all …]
|
/linux-2.6.39/net/sched/ |
D | sch_fifo.c | 142 struct nlattr *nla; in fifo_set_limit() local 149 nla = kmalloc(nla_attr_size(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); in fifo_set_limit() 150 if (nla) { in fifo_set_limit() 151 nla->nla_type = RTM_NEWQDISC; in fifo_set_limit() 152 nla->nla_len = nla_attr_size(sizeof(struct tc_fifo_qopt)); in fifo_set_limit() 153 ((struct tc_fifo_qopt *)nla_data(nla))->limit = limit; in fifo_set_limit() 155 ret = q->ops->change(q, nla); in fifo_set_limit() 156 kfree(nla); in fifo_set_limit()
|
D | em_meta.c | 568 static int meta_var_change(struct meta_value *dst, struct nlattr *nla) in meta_var_change() argument 570 int len = nla_len(nla); in meta_var_change() 572 dst->val = (unsigned long)kmemdup(nla_data(nla), len, GFP_KERNEL); in meta_var_change() 620 static int meta_int_change(struct meta_value *dst, struct nlattr *nla) in meta_int_change() argument 622 if (nla_len(nla) >= sizeof(unsigned long)) { in meta_int_change() 623 dst->val = *(unsigned long *) nla_data(nla); in meta_int_change() 625 } else if (nla_len(nla) == sizeof(u32)) { in meta_int_change() 626 dst->val = nla_get_u32(nla); in meta_int_change() 754 static inline int meta_change_data(struct meta_value *dst, struct nlattr *nla) in meta_change_data() argument 756 if (nla) { in meta_change_data() [all …]
|
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() 301 int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla, in tcf_em_tree_validate() argument 311 if (!nla) in tcf_em_tree_validate() 314 err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy); in tcf_em_tree_validate()
|
D | act_api.c | 489 struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est, in tcf_action_init_1() argument 500 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tcf_action_init_1() 548 err = a_o->init(nla, est, a, ovr, bind); in tcf_action_init_1() 570 struct tc_action *tcf_action_init(struct nlattr *nla, struct nlattr *est, in tcf_action_init() argument 578 err = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL); in tcf_action_init() 699 tcf_action_get_1(struct nlattr *nla, struct nlmsghdr *n, u32 pid) in tcf_action_get_1() argument 706 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tcf_action_get_1() 765 static int tca_action_flush(struct net *net, struct nlattr *nla, in tca_action_flush() argument 793 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL); in tca_action_flush() 843 tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n, in tca_action_gd() argument [all …]
|
D | act_simple.c | 97 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()
|
D | act_gact.c | 61 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()
|
D | act_skbedit.c | 70 static int tcf_skbedit_init(struct nlattr *nla, struct nlattr *est, in tcf_skbedit_init() argument 81 if (nla == NULL) in tcf_skbedit_init() 84 err = nla_parse_nested(tb, TCA_SKBEDIT_MAX, nla, skbedit_policy); in tcf_skbedit_init()
|
D | act_mirred.c | 65 static int tcf_mirred_init(struct nlattr *nla, struct nlattr *est, in tcf_mirred_init() argument 75 if (nla == NULL) in tcf_mirred_init() 77 ret = nla_parse_nested(tb, TCA_MIRRED_MAX, nla, mirred_policy); in tcf_mirred_init()
|
D | act_pedit.c | 41 static int tcf_pedit_init(struct nlattr *nla, struct nlattr *est, in tcf_pedit_init() argument 52 if (nla == NULL) in tcf_pedit_init() 55 err = nla_parse_nested(tb, TCA_PEDIT_MAX, nla, pedit_policy); in tcf_pedit_init()
|
D | act_nat.c | 47 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()
|
D | act_ipt.c | 105 static int tcf_ipt_init(struct nlattr *nla, struct nlattr *est, in tcf_ipt_init() argument 117 if (nla == NULL) in tcf_ipt_init() 120 err = nla_parse_nested(tb, TCA_IPT_MAX, nla, ipt_policy); in tcf_ipt_init()
|
D | sch_netem.c | 599 static int parse_attr(struct nlattr *tb[], int maxtype, struct nlattr *nla, in parse_attr() argument 602 int nested_len = nla_len(nla) - NLA_ALIGN(len); in parse_attr() 610 return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), in parse_attr() 843 struct nlattr *nla = (struct nlattr *) skb_tail_pointer(skb); in netem_dump() local 873 return nla_nest_end(skb, nla); in netem_dump() 876 nlmsg_trim(skb, nla); in netem_dump()
|
D | act_police.c | 138 static int tcf_act_police_locate(struct nlattr *nla, struct nlattr *est, in tcf_act_police_locate() argument 149 if (nla == NULL) in tcf_act_police_locate() 152 err = nla_parse_nested(tb, TCA_POLICE_MAX, nla, police_policy); in tcf_act_police_locate()
|
/linux-2.6.39/net/core/ |
D | drop_monitor.c | 81 struct nlattr *nla; in reset_per_cpu_data() local 90 nla = nla_reserve(data->skb, NLA_UNSPEC, sizeof(struct net_dm_alert_msg)); in reset_per_cpu_data() 91 msg = nla_data(nla); in reset_per_cpu_data() 135 struct nlattr *nla; in trace_drop_common() local 148 nla = genlmsg_data(nlmsg_data(nlh)); in trace_drop_common() 149 msg = nla_data(nla); in trace_drop_common() 161 nla->nla_len += NLA_ALIGN(sizeof(struct net_dm_drop_point)); in trace_drop_common()
|
D | filter.c | 377 struct nlattr *nla; in sk_run_filter() local 384 nla = nla_find((struct nlattr *)&skb->data[A], in sk_run_filter() 386 if (nla) in sk_run_filter() 387 A = (void *)nla - (void *)skb->data; in sk_run_filter() 393 struct nlattr *nla; in sk_run_filter() local 400 nla = (struct nlattr *)&skb->data[A]; in sk_run_filter() 401 if (nla->nla_len > A - skb->len) in sk_run_filter() 404 nla = nla_find_nested(nla, X); in sk_run_filter() 405 if (nla) in sk_run_filter() 406 A = (void *)nla - (void *)skb->data; in sk_run_filter()
|
/linux-2.6.39/net/ipv4/ |
D | fib_semantics.c | 420 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in fib_get_nhs() local 422 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_get_nhs() 423 nexthop_nh->nh_gw = nla ? nla_get_be32(nla) : 0; in fib_get_nhs() 425 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_get_nhs() 426 nexthop_nh->nh_tclassid = nla ? nla_get_u32(nla) : 0; in fib_get_nhs() 473 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in fib_nh_match() local 475 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_nh_match() 476 if (nla && nla_get_be32(nla) != nh->nh_gw) in fib_nh_match() 479 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_nh_match() 480 if (nla && nla_get_u32(nla) != nh->nh_tclassid) in fib_nh_match() [all …]
|
/linux-2.6.39/net/netfilter/ipset/ |
D | ip_set_core.c | 244 flag_nested(const struct nlattr *nla) in flag_nested() argument 246 return nla->nla_type & NLA_F_NESTED; in flag_nested() 256 ip_set_get_ipaddr4(struct nlattr *nla, __be32 *ipaddr) in ip_set_get_ipaddr4() argument 260 if (unlikely(!flag_nested(nla))) in ip_set_get_ipaddr4() 262 if (nla_parse_nested(tb, IPSET_ATTR_IPADDR_MAX, nla, ipaddr_policy)) in ip_set_get_ipaddr4() 273 ip_set_get_ipaddr6(struct nlattr *nla, union nf_inet_addr *ipaddr) in ip_set_get_ipaddr6() argument 277 if (unlikely(!flag_nested(nla))) in ip_set_get_ipaddr6() 280 if (nla_parse_nested(tb, IPSET_ATTR_IPADDR_MAX, nla, ipaddr_policy)) in ip_set_get_ipaddr6() 1200 const struct nlattr *nla; in ip_set_uadd() local 1231 nla_for_each_nested(nla, attr[IPSET_ATTR_ADT], nla_rem) { in ip_set_uadd() [all …]
|
/linux-2.6.39/include/linux/netfilter/ipset/ |
D | ip_set.h | 326 extern int ip_set_get_ipaddr4(struct nlattr *nla, __be32 *ipaddr); 327 extern int ip_set_get_ipaddr6(struct nlattr *nla, union nf_inet_addr *ipaddr); 330 ip_set_get_hostipaddr4(struct nlattr *nla, u32 *ipaddr) in ip_set_get_hostipaddr4() argument 333 int ret = ip_set_get_ipaddr4(nla, &ip); in ip_set_get_hostipaddr4()
|
/linux-2.6.39/net/wireless/ |
D | wext-core.c | 433 struct nlattr *nla; in wireless_send_event() local 534 nla = nla_reserve(skb, IFLA_WIRELESS, event_len); in wireless_send_event() 535 if (!nla) { in wireless_send_event() 539 event = nla_data(nla); in wireless_send_event() 569 nla = nla_reserve(compskb, IFLA_WIRELESS, event_len); in wireless_send_event() 570 if (!nla) { in wireless_send_event() 575 compat_event = nla_data(nla); in wireless_send_event()
|
/linux-2.6.39/net/netfilter/ |
D | nfnetlink_queue.c | 357 struct nlattr *nla; in nfqnl_build_packet_message() local 365 nla = (struct nlattr *)skb_put(skb, nla_total_size(data_len)); in nfqnl_build_packet_message() 366 nla->nla_type = NFQA_PAYLOAD; in nfqnl_build_packet_message() 367 nla->nla_len = sz; in nfqnl_build_packet_message() 369 if (skb_copy_bits(entskb, 0, nla_data(nla), data_len)) in nfqnl_build_packet_message()
|