Home
last modified time | relevance | path

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

12345

/linux/drivers/block/drbd/
H A Ddrbd_nl_gen.c648 struct nlattr *nla; in __drbd_cfg_context_from_attrs() local
662 nla = ntb[DRBD_A_DRBD_CFG_CONTEXT_CTX_VOLUME]; in __drbd_cfg_context_from_attrs()
663 if (nla && s) in __drbd_cfg_context_from_attrs()
664 s->ctx_volume = nla_get_u32(nla); in __drbd_cfg_context_from_attrs()
666 nla = ntb[DRBD_A_DRBD_CFG_CONTEXT_CTX_RESOURCE_NAME]; in __drbd_cfg_context_from_attrs()
667 if (nla && s) in __drbd_cfg_context_from_attrs()
668 s->ctx_resource_name_len = nla_strscpy(s->ctx_resource_name, nla, 128); in __drbd_cfg_context_from_attrs()
670 nla = ntb[DRBD_A_DRBD_CFG_CONTEXT_CTX_MY_ADDR]; in __drbd_cfg_context_from_attrs()
671 if (nla && s) in __drbd_cfg_context_from_attrs()
672 s->ctx_my_addr_len = nla_memcpy(s->ctx_my_addr, nla, 128); in __drbd_cfg_context_from_attrs()
[all …]
/linux/lib/
H A Dnlattr.c66 static int validate_nla_bitfield32(const struct nlattr *nla, in validate_nla_bitfield32() argument
69 const struct nla_bitfield32 *bf = nla_data(nla); in validate_nla_bitfield32()
171 const struct nlattr *nla, in nla_validate_range_unsigned() argument
180 value = nla_get_u8(nla); in nla_validate_range_unsigned()
183 value = nla_get_u16(nla); in nla_validate_range_unsigned()
186 value = nla_get_u32(nla); in nla_validate_range_unsigned()
189 value = nla_get_u64(nla); in nla_validate_range_unsigned()
192 value = nla_get_uint(nla); in nla_validate_range_unsigned()
195 value = nla_get_u64(nla); in nla_validate_range_unsigned()
198 value = nla_len(nla); in nla_validate_range_unsigned()
[all …]
/linux/tools/lib/bpf/
H A Dnlattr.c25 static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) in nla_next() argument
27 int totlen = NLA_ALIGN(nla->nla_len); in nla_next()
30 return (struct nlattr *)((void *)nla + totlen); in nla_next()
33 static int nla_ok(const struct nlattr *nla, int remaining) in nla_ok() argument
35 return remaining >= (int)sizeof(*nla) && in nla_ok()
36 nla->nla_len >= sizeof(*nla) && in nla_ok()
37 nla->nla_len <= remaining; in nla_ok()
40 static int nla_type(const struct nlattr *nla) in nla_type() argument
42 return nla->nla_type & NLA_TYPE_MASK; in nla_type()
45 static int validate_nla(struct nlattr *nla, int maxtype, in validate_nla() argument
[all …]
H A Dnlattr.h84 static inline void *libbpf_nla_data(const struct nlattr *nla) in libbpf_nla_data() argument
86 return (void *)nla + NLA_HDRLEN; in libbpf_nla_data()
89 static inline uint8_t libbpf_nla_getattr_u8(const struct nlattr *nla) in libbpf_nla_getattr_u8() argument
91 return *(uint8_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u8()
94 static inline uint16_t libbpf_nla_getattr_u16(const struct nlattr *nla) in libbpf_nla_getattr_u16() argument
96 return *(uint16_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u16()
99 static inline uint32_t libbpf_nla_getattr_u32(const struct nlattr *nla) in libbpf_nla_getattr_u32() argument
101 return *(uint32_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u32()
104 static inline uint64_t libbpf_nla_getattr_u64(const struct nlattr *nla) in libbpf_nla_getattr_u64() argument
106 return *(uint64_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u64()
[all …]
/linux/net/netfilter/
H A Dnf_tables_api.c160 const struct nlattr * const *nla) in nft_ctx_init() argument
167 ctx->nla = nla; in nft_ctx_init()
670 if (ctx->nla[NFTA_CHAIN_ID]) { in nft_trans_chain_add()
672 ntohl(nla_get_be32(ctx->nla[NFTA_CHAIN_ID])); in nft_trans_chain_add()
742 if (msg_type == NFT_MSG_NEWRULE && ctx->nla[NFTA_RULE_ID] != NULL) { in nft_trans_rule_add()
744 ntohl(nla_get_be32(ctx->nla[NFTA_RULE_ID])); in nft_trans_rule_add()
812 if (msg_type == NFT_MSG_NEWSET && ctx->nla[NFTA_SET_ID] && !desc) { in __nft_trans_set_add()
814 ntohl(nla_get_be32(ctx->nla[NFTA_SET_ID])); in __nft_trans_set_add()
983 const struct nlattr *nla,
985 nft_table_lookup(const struct net * net,const struct nlattr * nla,u8 family,u8 genmask,u32 nlpid) nft_table_lookup() argument
1012 nft_table_lookup_byhandle(const struct net * net,const struct nlattr * nla,int family,u8 genmask,u32 nlpid) nft_table_lookup_byhandle() argument
1052 __nf_tables_chain_type_lookup(const struct nlattr * nla,u8 family) __nf_tables_chain_type_lookup() argument
1122 nf_tables_chain_type_lookup(struct net * net,const struct nlattr * nla,u8 family,bool autoload) nf_tables_chain_type_lookup() argument
1312 nf_tables_gettable(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_gettable() argument
1577 nf_tables_newtable(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_newtable() argument
1750 const struct nlattr * const *nla = ctx->nla; nft_flush() local
1781 nf_tables_deltable(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_deltable() argument
1888 nft_chain_lookup(struct net * net,struct nft_table * table,const struct nlattr * nla,u8 genmask) nft_chain_lookup() argument
2248 nf_tables_getchain(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_getchain() argument
2556 nft_chain_parse_hook(struct net * net,struct nft_base_chain * basechain,const struct nlattr * const nla[],struct nft_chain_hook * hook,u8 family,u32 flags,struct netlink_ext_ack * extack) nft_chain_parse_hook() argument
2756 const struct nlattr * const *nla = ctx->nla; nf_tables_addchain() local
2903 const struct nlattr * const *nla = ctx->nla; nf_tables_updchain() local
3100 nft_chain_lookup_byid(const struct net * net,const struct nft_table * table,const struct nlattr * nla,u8 genmask) nft_chain_lookup_byid() argument
3117 nf_tables_newchain(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_newchain() argument
3248 const struct nlattr * const *nla = ctx->nla; nft_delchain_hook() local
3299 nf_tables_delchain(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_delchain() argument
3425 __nft_expr_type_get(u8 family,struct nlattr * nla) __nft_expr_type_get() argument
3442 nft_expr_type_request_module(struct net * net,u8 family,struct nlattr * nla) nft_expr_type_request_module() argument
3454 nft_expr_type_get(struct net * net,u8 family,struct nlattr * nla) nft_expr_type_get() argument
3536 nf_tables_expr_parse(const struct nft_ctx * ctx,const struct nlattr * nla,struct nft_expr_info * info) nf_tables_expr_parse() argument
3589 nft_expr_inner_parse(const struct nft_ctx * ctx,const struct nlattr * nla,struct nft_expr_info * info) nft_expr_inner_parse() argument
3669 nft_expr_init(const struct nft_ctx * ctx,const struct nlattr * nla) nft_expr_init() argument
3753 nft_rule_lookup(const struct net * net,const struct nft_chain * chain,const struct nlattr * nla) nft_rule_lookup() argument
4005 const struct nlattr * const *nla = cb->data; nf_tables_dump_rules_start() local
4039 nf_tables_getrule_single(u32 portid,const struct nfnl_info * info,const struct nlattr * const nla[],bool reset) nf_tables_getrule_single() argument
4085 nf_tables_getrule(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_getrule() argument
4320 nf_tables_newrule(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_newrule() argument
4559 nft_rule_lookup_byid(const struct net * net,const struct nft_chain * chain,const struct nlattr * nla) nft_rule_lookup_byid() argument
4575 nf_tables_delrule(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_delrule() argument
4786 nft_set_lookup(const struct net * net,const struct nft_table * table,const struct nlattr * nla,u8 genmask) nft_set_lookup() argument
4803 nft_set_lookup_byhandle(const struct nft_table * table,const struct nlattr * nla,u8 genmask) nft_set_lookup_byhandle() argument
4818 nft_set_lookup_byid(const struct net * net,const struct nft_table * table,const struct nlattr * nla,u8 genmask) nft_set_lookup_byid() argument
4912 nf_msecs_to_jiffies64(const struct nlattr * nla,u64 * result) nf_msecs_to_jiffies64() argument
5213 nf_tables_getset(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_getset() argument
5303 nft_set_desc_concat(struct nft_set_desc * desc,const struct nlattr * nla) nft_set_desc_concat() argument
5332 nf_tables_set_desc_parse(struct nft_set_desc * desc,const struct nlattr * nla) nf_tables_set_desc_parse() argument
5351 nft_set_expr_alloc(struct nft_ctx * ctx,struct nft_set * set,const struct nlattr * const * nla,struct nft_expr ** exprs,int * num_exprs,u32 flags) nft_set_expr_alloc() argument
5441 nf_tables_newset(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_newset() argument
5781 nf_tables_delset(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_delset() argument
6544 struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; nft_get_set_elem() local
6604 nft_set_dump_ctx_init(struct nft_set_dump_ctx * dump_ctx,const struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[],bool reset) nft_set_dump_ctx_init() argument
6637 nf_tables_getsetelem(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_getsetelem() argument
7216 nft_setelem_valid_key_end(const struct nft_set * set,struct nlattr ** nla,u32 flags) nft_setelem_valid_key_end() argument
7259 struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; nft_add_set_elem() local
7676 nf_tables_newsetelem(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_newsetelem() argument
7838 struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; nft_del_setelem() local
8017 nf_tables_delsetelem(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_delsetelem() argument
8107 nft_obj_lookup(const struct net * net,struct nft_table * table,const struct nlattr * nla,u32 objtype,u8 genmask) nft_obj_lookup() argument
8139 nft_obj_lookup_byhandle(const struct nft_table * table,const struct nlattr * nla,u32 objtype,u8 genmask) nft_obj_lookup_byhandle() argument
8309 nf_tables_newobj(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_newobj() argument
8551 const struct nlattr * const *nla = cb->data; nf_tables_dump_obj_start() local
8582 nf_tables_getobj_single(u32 portid,const struct nfnl_info * info,const struct nlattr * const nla[],bool reset) nf_tables_getobj_single() argument
8627 nf_tables_getobj(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_getobj() argument
8680 nf_tables_delobj(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_delobj() argument
8831 nft_flowtable_lookup(const struct net * net,const struct nft_table * table,const struct nlattr * nla,u8 genmask) nft_flowtable_lookup() argument
8864 nft_flowtable_lookup_byhandle(const struct nft_table * table,const struct nlattr * nla,u8 genmask) nft_flowtable_lookup_byhandle() argument
8889 nft_flowtable_parse_hook(const struct nft_ctx * ctx,const struct nlattr * const nla[],struct nft_flowtable_hook * flowtable_hook,struct nft_flowtable * flowtable,struct netlink_ext_ack * extack,bool add) nft_flowtable_parse_hook() argument
9127 const struct nlattr * const *nla = ctx->nla; nft_flowtable_update() local
9217 nf_tables_newflowtable(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_newflowtable() argument
9363 const struct nlattr * const *nla = ctx->nla; nft_delflowtable_hook() local
9413 nf_tables_delflowtable(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_delflowtable() argument
9596 const struct nlattr * const *nla = cb->data; nf_tables_dump_flowtable_start() local
9632 nf_tables_getflowtable(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_getflowtable() argument
9924 nf_tables_getgen(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nf_tables_getgen() argument
11777 nft_verdict_init(const struct nft_ctx * ctx,struct nft_data * data,struct nft_data_desc * desc,const struct nlattr * nla) nft_verdict_init() argument
11887 nft_value_init(const struct nft_ctx * ctx,struct nft_data * data,struct nft_data_desc * desc,const struct nlattr * nla) nft_value_init() argument
11934 nft_data_init(const struct nft_ctx * ctx,struct nft_data * data,struct nft_data_desc * desc,const struct nlattr * nla) nft_data_init() argument
[all...]
H A Dnfnetlink_hook.c428 const struct nlattr * const *nla = cb->data; in nfnl_hook_dump_start()
436 hooknum = ntohl(nla_get_be32(nla[NFNLA_HOOK_HOOKNUM])); in nfnl_hook_dump_start()
441 if (!nla[NFNLA_HOOK_DEV]) in nfnl_hook_dump_start()
444 nla_strscpy(name, nla[NFNLA_HOOK_DEV], sizeof(name)); in nfnl_hook_dump_start()
474 const struct nlattr * const nla[]) in nfnl_hook_get()
476 if (!nla[NFNLA_HOOK_HOOKNUM]) in nfnl_hook_get()
485 .data = (void *)nla,
413 const struct nlattr * const *nla = cb->data; nfnl_hook_dump_start() local
462 nfnl_hook_get(struct sk_buff * skb,const struct nfnl_info * info,const struct nlattr * const nla[]) nfnl_hook_get() argument
/linux/net/sched/
H A Dact_tunnel_key.c86 tunnel_key_copy_geneve_opt(const struct nlattr *nla, void *dst, int dst_len, in tunnel_key_copy_geneve_opt() argument
95 nla, geneve_opt_policy, extack); in tunnel_key_copy_geneve_opt()
138 tunnel_key_copy_vxlan_opt(const struct nlattr *nla, void *dst, int dst_len, in tunnel_key_copy_vxlan_opt() argument
144 err = nla_parse_nested(tb, TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX, nla, in tunnel_key_copy_vxlan_opt()
165 tunnel_key_copy_erspan_opt(const struct nlattr *nla, void *dst, int dst_len, in tunnel_key_copy_erspan_opt() argument
172 err = nla_parse_nested(tb, TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX, nla, in tunnel_key_copy_erspan_opt()
204 nla = tb[TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_INDEX]; in tunnel_key_copy_erspan_opt()
205 md->u.index = nla_get_be32(nla); in tunnel_key_copy_erspan_opt()
207 nla = tb[TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_DIR]; in tunnel_key_copy_erspan_opt()
208 md->u.md2.dir = nla_get_u8(nla); in tunnel_key_copy_erspan_opt()
[all …]
H A Dact_bpf.c100 struct nlattr *nla; in tcf_bpf_dump_bpf_info() local
105 nla = nla_reserve(skb, TCA_ACT_BPF_OPS, prog->bpf_num_ops * in tcf_bpf_dump_bpf_info()
107 if (nla == NULL) in tcf_bpf_dump_bpf_info()
110 memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla)); in tcf_bpf_dump_bpf_info()
118 struct nlattr *nla; in tcf_bpf_dump_ebpf_info() local
127 nla = nla_reserve(skb, TCA_ACT_BPF_TAG, sizeof(prog->filter->tag)); in tcf_bpf_dump_ebpf_info()
128 if (nla == NULL) in tcf_bpf_dump_ebpf_info()
131 memcpy(nla_data(nla), prog->filter->tag, nla_len(nla)); in tcf_bpf_dump_ebpf_info()
277 static int tcf_bpf_init(struct net *net, struct nlattr *nla, in tcf_bpf_init() argument
293 if (!nla) in tcf_bpf_init()
[all …]
H A Dsch_fifo.c233 struct nlattr *nla; in fifo_set_limit() local
243 nla = kmalloc(nla_attr_size(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); in fifo_set_limit()
244 if (nla) { in fifo_set_limit()
245 nla->nla_type = RTM_NEWQDISC; in fifo_set_limit()
246 nla->nla_len = nla_attr_size(sizeof(struct tc_fifo_qopt)); in fifo_set_limit()
247 ((struct tc_fifo_qopt *)nla_data(nla))->limit = limit; in fifo_set_limit()
249 ret = q->ops->change(q, nla, NULL); in fifo_set_limit()
250 kfree(nla); in fifo_set_limit()
H A Dem_meta.c695 static int meta_var_change(struct meta_value *dst, struct nlattr *nla) in meta_var_change() argument
697 int len = nla_len(nla); in meta_var_change()
699 dst->val = (unsigned long)kmemdup(nla_data(nla), len, GFP_KERNEL); in meta_var_change()
748 static int meta_int_change(struct meta_value *dst, struct nlattr *nla) in meta_int_change() argument
750 if (nla_len(nla) >= sizeof(unsigned long)) { in meta_int_change()
751 dst->val = *(unsigned long *) nla_data(nla); in meta_int_change()
753 } else if (nla_len(nla) == sizeof(u32)) { in meta_int_change()
754 dst->val = nla_get_u32(nla); in meta_int_change()
885 static inline int meta_change_data(struct meta_value *dst, struct nlattr *nla) in meta_change_data() argument
887 if (nla) { in meta_change_data()
[all …]
H A Dematch.c171 struct tcf_ematch *em, struct nlattr *nla, int idx) in tcf_em_validate() argument
174 struct tcf_ematch_hdr *em_hdr = nla_data(nla); in tcf_em_validate()
175 int data_len = nla_len(nla) - sizeof(*em_hdr); in tcf_em_validate()
293 * @nla: ematch tree configuration TLV
297 * This function validates the given configuration TLV @nla and builds an
305 int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla, in tcf_em_tree_validate() argument
315 if (!nla) in tcf_em_tree_validate()
318 err = nla_parse_nested_deprecated(tb, TCA_EMATCH_TREE_MAX, nla, in tcf_em_tree_validate()
H A Dcls_bpf.c577 struct nlattr *nla; in cls_bpf_dump_ebpf_info()
582 nla = nla_reserve(skb, TCA_BPF_OPS, prog->bpf_num_ops * in cls_bpf_dump_ebpf_info()
584 if (nla == NULL) in cls_bpf_dump_ebpf_info()
587 memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla)); in cls_bpf_dump_ebpf_info()
595 struct nlattr *nla; in cls_bpf_dump()
604 nla = nla_reserve(skb, TCA_BPF_TAG, sizeof(prog->filter->tag)); in cls_bpf_dump()
605 if (nla == NULL) in cls_bpf_dump()
608 memcpy(nla_data(nla), prog->filter->tag, nla_len(nla)); in cls_bpf_dump()
557 struct nlattr *nla; cls_bpf_dump_bpf_info() local
575 struct nlattr *nla; cls_bpf_dump_ebpf_info() local
[all...]
H A Dact_pedit.c45 static struct tcf_pedit_key_ex *tcf_pedit_keys_ex_parse(struct nlattr *nla, in tcf_pedit_keys_ex_parse() argument
54 if (!nla) in tcf_pedit_keys_ex_parse()
63 nla_for_each_nested(ka, nla, rem) { in tcf_pedit_keys_ex_parse()
85 if (NL_REQ_ATTR_CHECK(extack, nla, tb, TCA_PEDIT_KEY_EX_HTYPE)) { in tcf_pedit_keys_ex_parse()
91 if (NL_REQ_ATTR_CHECK(extack, nla, tb, TCA_PEDIT_KEY_EX_CMD)) { in tcf_pedit_keys_ex_parse()
159 static int tcf_pedit_init(struct net *net, struct nlattr *nla, in tcf_pedit_init() argument
176 if (!nla) { in tcf_pedit_init()
181 err = nla_parse_nested_deprecated(tb, TCA_PEDIT_MAX, nla, in tcf_pedit_init()
/linux/net/openvswitch/
H A Dflow_netlink.c53 struct nlattr *nla; in actions_may_change_flow()
56 nla_for_each_nested(nla, actions, rem) { in actions_may_change_flow()
57 u16 action = nla_type(nla); in actions_may_change_flow()
479 const struct nlattr *nla; in __parse_flow_nlattrs()
484 nla_for_each_nested(nla, attr, rem) { in __parse_flow_nlattrs()
485 u16 type = nla_type(nla); in __parse_flow_nlattrs()
507 if (!check_attr_len(nla_len(nla), expected_len)) { in __parse_flow_nlattrs()
509 type, nla_len(nla), expected_len); in __parse_flow_nlattrs()
513 if (!nz || !is_all_zero(nla_data(nla), nla_len(nla))) { in __parse_flow_nlattrs()
55 struct nlattr *nla; actions_may_change_flow() local
481 const struct nlattr *nla; __parse_flow_nlattrs() local
870 struct nlattr *nla; vxlan_opt_to_nlattr() local
963 struct nlattr *nla; ip_tun_to_nlattr() local
1739 struct nlattr *nla; nlattr_set() local
1992 struct nlattr *nla; __ovs_nla_put_key() local
2245 struct nlattr *nla; ovs_nla_put_key() local
3840 struct nlattr *nla; masked_set_action_to_set_action_attr() local
[all...]
H A Dmeter.c240 struct nlattr *nla; in ovs_meter_cmd_reply_stats() local
255 nla = nla_nest_start_noflag(reply, OVS_METER_ATTR_BANDS); in ovs_meter_cmd_reply_stats()
256 if (!nla) in ovs_meter_cmd_reply_stats()
271 nla_nest_end(reply, nla); in ovs_meter_cmd_reply_stats()
282 struct nlattr *nla, *band_nla; in ovs_meter_cmd_features() local
308 nla = nla_nest_start_noflag(reply, OVS_METER_ATTR_BANDS); in ovs_meter_cmd_features()
309 if (!nla) in ovs_meter_cmd_features()
319 nla_nest_end(reply, nla); in ovs_meter_cmd_features()
333 struct nlattr *nla; in dp_meter_create() local
344 nla_for_each_nested(nla, a[OVS_METER_ATTR_BANDS], rem) in dp_meter_create()
[all …]
H A Dvport.c276 struct nlattr *nla; in ovs_vport_get_upcall_stats() local
294 nla = nla_nest_start_noflag(skb, OVS_VPORT_ATTR_UPCALL_STATS); in ovs_vport_get_upcall_stats()
295 if (!nla) in ovs_vport_get_upcall_stats()
300 nla_nest_cancel(skb, nla); in ovs_vport_get_upcall_stats()
306 nla_nest_cancel(skb, nla); in ovs_vport_get_upcall_stats()
309 nla_nest_end(skb, nla); in ovs_vport_get_upcall_stats()
/linux/net/mpls/
H A Daf_mpls.c754 static int nla_get_via(const struct nlattr *nla, u8 *via_alen, u8 *via_table, in nla_get_via() argument
757 struct rtvia *via = nla_data(nla); in nla_get_via()
761 if (nla_len(nla) < offsetof(struct rtvia, rtvia_addr)) { in nla_get_via()
762 NL_SET_ERR_MSG_ATTR(extack, nla, in nla_get_via()
766 alen = nla_len(nla) - in nla_get_via()
769 NL_SET_ERR_MSG_ATTR(extack, nla, in nla_get_via()
881 struct nlattr *nla, *attrs = rtnh_attrs(rtnh); in mpls_count_nexthops() local
886 nla = nla_find(attrs, attrlen, RTA_VIA); in mpls_count_nexthops()
887 if (nla && nla_len(nla) > in mpls_count_nexthops()
1136 struct nlattr *nla; mpls_fill_stats_af() local
1730 struct nlattr *nla; nla_put_via() local
1750 struct nlattr *nla; nla_put_labels() local
1769 nla_get_labels(const struct nlattr * nla,u8 max_labels,u8 * labels,u32 label[],struct netlink_ext_ack * extack) nla_get_labels() argument
1920 struct nlattr *nla = tb[index]; rtm_to_route_config() local
[all...]
/linux/net/psample/
H A Dpsample.c293 struct nlattr *nla; in psample_ip_tun_to_nlattr() local
296 nla = nla_nest_start_noflag(skb, PSAMPLE_ATTR_TUNNEL); in psample_ip_tun_to_nlattr()
297 if (!nla) in psample_ip_tun_to_nlattr()
302 nla_nest_cancel(skb, nla); in psample_ip_tun_to_nlattr()
306 nla_nest_end(skb, nla); in psample_ip_tun_to_nlattr()
480 struct nlattr *nla; in psample_sample_packet() local
482 nla = skb_put(nl_skb, nla_len); in psample_sample_packet()
483 nla->nla_type = PSAMPLE_ATTR_DATA; in psample_sample_packet()
484 nla->nla_len = nla_len; in psample_sample_packet()
486 if (skb_copy_bits(skb, 0, nla_data(nla), data_len)) in psample_sample_packet()
/linux/net/ipv4/
H A Dfib_semantics.c731 static int fib_gw_from_attr(__be32 *gw, struct nlattr *nla, in fib_gw_from_attr() argument
734 if (nla_len(nla) < sizeof(*gw)) { in fib_gw_from_attr()
739 *gw = nla_get_in_addr(nla); in fib_gw_from_attr()
776 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_get_nhs() local
778 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_get_nhs()
780 if (nla && nlav) { in fib_get_nhs()
785 if (nla) { in fib_get_nhs()
786 ret = fib_gw_from_attr(&fib_cfg.fc_gw4, nla, in fib_get_nhs()
799 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_get_nhs()
800 if (nla) { in fib_get_nhs()
1002 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); fib_nh_match() local
1066 struct nlattr *nla; fib_metrics_match() local
1644 struct nlattr *nla; fib_nexthop_info() local
[all...]
H A Dfib_rules.c233 static int fib4_nl2rule_dscp(const struct nlattr *nla, struct fib4_rule *rule4, in fib4_nl2rule_dscp() argument
241 rule4->dscp = inet_dsfield_to_dscp(nla_get_u8(nla) << 2); in fib4_nl2rule_dscp()
248 static int fib4_nl2rule_dscp_mask(const struct nlattr *nla, in fib4_nl2rule_dscp_mask() argument
255 NL_SET_ERR_MSG_ATTR(extack, nla, in fib4_nl2rule_dscp_mask()
260 dscp_mask = inet_dsfield_to_dscp(nla_get_u8(nla) << 2); in fib4_nl2rule_dscp_mask()
262 NL_SET_ERR_MSG_ATTR(extack, nla, "Invalid DSCP mask"); in fib4_nl2rule_dscp_mask()
/linux/net/ipv6/
H A Drpl_iptunnel.c67 static int rpl_build_state(struct net *net, struct nlattr *nla, in rpl_build_state() argument
81 err = nla_parse_nested(tb, RPL_IPTUNNEL_MAX, nla, in rpl_build_state()
328 struct nlattr *nla; in nla_put_rpl_srh() local
333 nla = nla_reserve(skb, attrtype, len); in nla_put_rpl_srh()
334 if (!nla) in nla_put_rpl_srh()
337 data = nla_data(nla); in nla_put_rpl_srh()
/linux/net/handshake/
H A Dtlshd.c66 struct nlattr *nla; in tls_handshake_remote_peerids() local
70 nla_for_each_attr(nla, head, len, rem) { in tls_handshake_remote_peerids()
71 if (nla_type(nla) == HANDSHAKE_A_DONE_REMOTE_AUTH) in tls_handshake_remote_peerids()
80 nla_for_each_attr(nla, head, len, rem) { in tls_handshake_remote_peerids()
81 if (nla_type(nla) == HANDSHAKE_A_DONE_REMOTE_AUTH) in tls_handshake_remote_peerids()
82 treq->th_peerid[i++] = nla_get_u32(nla); in tls_handshake_remote_peerids()
/linux/drivers/net/
H A Dgtp.c1402 const struct nlattr *nla, int family) in gtp_sock_udp_config()
1408 udp_conf->local_ip.s_addr = nla_get_be32(nla); in gtp_sock_udp_config()
1412 udp_conf->local_ip6 = nla_get_in6_addr(nla); in gtp_sock_udp_config()
1423 const struct nlattr *nla, int family) in gtp_create_sock()
1431 if (nla) { in gtp_create_sock()
1432 err = gtp_sock_udp_config(&udp_conf, nla, family); in gtp_create_sock()
1461 static int gtp_create_sockets(struct gtp_dev *gtp, const struct nlattr *nla, in gtp_create_sockets()
1467 sk0 = gtp_create_sock(UDP_ENCAP_GTP0, gtp, nla, family); in gtp_create_sockets()
1471 sk1u = gtp_create_sock(UDP_ENCAP_GTP1U, gtp, nla, family); in gtp_create_sockets()
1767 static struct gtp_dev *gtp_find_dev(struct net *src_net, struct nlattr *nla[]) in gtp_find_dev()
1395 gtp_sock_udp_config(struct udp_port_cfg * udp_conf,const struct nlattr * nla,int family) gtp_sock_udp_config() argument
1416 gtp_create_sock(int type,struct gtp_dev * gtp,const struct nlattr * nla,int family) gtp_create_sock() argument
1454 gtp_create_sockets(struct gtp_dev * gtp,const struct nlattr * nla,int family) gtp_create_sockets() argument
1760 gtp_find_dev(struct net * src_net,struct nlattr * nla[]) gtp_find_dev() argument
2087 gtp_find_pdp_by_link(struct net * net,struct nlattr * nla[]) gtp_find_pdp_by_link() argument
2131 gtp_find_pdp(struct net * net,struct nlattr * nla[]) gtp_find_pdp() argument
[all...]
/linux/include/net/
H A Dfib_rules.h141 static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla) in frh_get_table() argument
143 if (nla[FRA_TABLE]) in frh_get_table()
144 return nla_get_u32(nla[FRA_TABLE]); in frh_get_table()
H A Dact_api.h127 int (*init)(struct net *net, struct nlattr *nla,
216 int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla,
220 struct tc_action_ops *tc_action_load_ops(struct nlattr *nla, u32 flags,
223 struct nlattr *nla, struct nlattr *est,

12345