| /linux/tools/lib/bpf/ |
| H A D | nlattr.h | 84 static inline void *libbpf_nla_data(const struct nlattr *nla) in libbpf_nla_data() 89 static inline uint8_t libbpf_nla_getattr_u8(const struct nlattr *nla) in libbpf_nla_getattr_u8() 94 static inline uint16_t libbpf_nla_getattr_u16(const struct nlattr *nla) in libbpf_nla_getattr_u16() 99 static inline uint32_t libbpf_nla_getattr_u32(const struct nlattr *nla) in libbpf_nla_getattr_u32() 104 static inline uint64_t libbpf_nla_getattr_u64(const struct nlattr *nla) in libbpf_nla_getattr_u64() 109 static inline const char *libbpf_nla_getattr_str(const struct nlattr *nla) in libbpf_nla_getattr_str() 118 static inline int libbpf_nla_len(const struct nlattr *nla) in libbpf_nla_len() 123 int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, 125 int libbpf_nla_parse_nested(struct nlattr *tb[], int maxtype, 126 struct nlattr *nla, [all …]
|
| H A D | nlattr.c | 13 #include "nlattr.h" 25 static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) 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() 40 static int nla_type(const struct nlattr *nla) in nla_type() 45 static int validate_nla(struct nlattr *nla, int maxtype, in validate_nla() 104 int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, in libbpf_nla_parse() 107 struct nlattr *nl in libbpf_nla_parse() [all...] |
| /linux/tools/net/ynl/lib/ |
| H A D | ynl-priv.h | 190 static inline unsigned int ynl_attr_type(const struct nlattr *attr) in ynl_attr_type() 195 static inline unsigned int ynl_attr_data_len(const struct nlattr *attr) in ynl_attr_data_len() 200 static inline void *ynl_attr_data(const struct nlattr *attr) in ynl_attr_data() 205 static inline void *ynl_attr_data_end(const struct nlattr *attr) in ynl_attr_data_end() 217 sizeof(struct nlattr) + offset); \ 228 static inline struct nlattr * 229 ynl_attr_if_good(const void *end, struct nlattr *attr) in ynl_attr_if_good() 231 if (attr + 1 > (const struct nlattr *)end) in ynl_attr_if_good() 238 static inline struct nlattr * 239 ynl_attr_next(const void *end, const struct nlattr *prev) in ynl_attr_next() [all …]
|
| /linux/net/openvswitch/ |
| H A D | flow_netlink.h | 35 int parse_flow_nlattrs(const struct nlattr *attr, const struct nlattr *a[], 38 const struct nlattr *a[OVS_KEY_ATTR_MAX + 1], 46 const struct nlattr *key, const struct nlattr *mask, 52 bool ovs_nla_get_ufid(struct sw_flow_id *, const struct nlattr *, bool log); 53 int ovs_nla_get_identifier(struct sw_flow_id *sfid, const struct nlattr *ufid, 55 u32 ovs_nla_get_ufid_flags(const struct nlattr *attr); 57 int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, 62 int ovs_nla_put_actions(const struct nlattr *attr, 68 int nsh_hdr_from_nlattr(const struct nlattr *attr, struct nshhdr *nh,
|
| H A D | flow_netlink.c | 53 static bool actions_may_change_flow(const struct nlattr *actions) in actions_may_change_flow() 55 struct nlattr *nla; in actions_may_change_flow() 477 static int __parse_flow_nlattrs(const struct nlattr *attr, in __parse_flow_nlattrs() 478 const struct nlattr *a[], in __parse_flow_nlattrs() 481 const struct nlattr *nla; in __parse_flow_nlattrs() 529 static int parse_flow_mask_nlattrs(const struct nlattr *attr, in parse_flow_mask_nlattrs() 530 const struct nlattr *a[], u64 *attrsp, in parse_flow_mask_nlattrs() 536 int parse_flow_nlattrs(const struct nlattr *attr, const struct nlattr *a[], in parse_flow_nlattrs() 542 static int genev_tun_opt_from_nlattr(const struct nlattr *a, in genev_tun_opt_from_nlattr() 593 static int vxlan_tun_opt_from_nlattr(const struct nlattr *attr, in vxlan_tun_opt_from_nlattr() [all …]
|
| H A D | vport-vxlan.c | 31 struct nlattr *exts; in vxlan_get_options() 51 static int vxlan_configure_exts(struct vport *vport, struct nlattr *attr, in vxlan_configure_exts() 54 struct nlattr *exts[OVS_VXLAN_EXT_MAX + 1]; in vxlan_configure_exts() 57 if (nla_len(attr) < sizeof(struct nlattr)) in vxlan_configure_exts() 74 struct nlattr *options = parms->options; in vxlan_tnl_create() 77 struct nlattr *a; in vxlan_tnl_create()
|
| H A D | vport.h | 37 int ovs_vport_set_options(struct vport *, struct nlattr *options); 40 int ovs_vport_set_upcall_portids(struct vport *, const struct nlattr *pids); 107 struct nlattr *options; 112 struct nlattr *upcall_portids; 140 int (*set_options)(struct vport *, struct nlattr *);
|
| /linux/tools/bpf/bpftool/ |
| H A D | netlink_dumper.c | 10 #include "bpf/nlattr.h" 14 static void xdp_dump_prog_id(struct nlattr **tb, int attr, in xdp_dump_prog_id() 29 static int do_xdp_dump_one(struct nlattr *attr, unsigned int ifindex, in do_xdp_dump_one() 32 struct nlattr *tb[IFLA_XDP_MAX + 1]; in do_xdp_dump_one() 72 int do_xdp_dump(struct ifinfomsg *ifinfo, struct nlattr **tb) in do_xdp_dump() 81 static int do_bpf_dump_one_act(struct nlattr *attr) in do_bpf_dump_one_act() 83 struct nlattr *tb[TCA_ACT_BPF_MAX + 1]; in do_bpf_dump_one_act() 102 static int do_dump_one_act(struct nlattr *attr) in do_dump_one_act() 104 struct nlattr *tb[TCA_ACT_MAX + 1]; in do_dump_one_act() 119 static int do_bpf_act_dump(struct nlattr *att [all...] |
| /linux/include/net/ |
| H A D | rtnetlink.h | 85 struct nlattr **tb; 86 struct nlattr **data; 147 struct net_device *(*alloc)(struct nlattr *tb[], 158 int (*validate)(struct nlattr *tb[], 159 struct nlattr *data[], 166 struct nlattr *tb[], 167 struct nlattr *data[], 186 struct nlattr *tb[], 187 struct nlattr *data[], 233 const struct nlattr *attr, [all …]
|
| H A D | act_api.h | 127 int (*init)(struct net *net, struct nlattr *nla, 128 struct nlattr *est, struct tc_action **act, 195 int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est, 199 struct nlattr *est, struct tc_action **a, 216 int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla, 217 struct nlattr *est, 220 struct tc_action_ops *tc_action_load_ops(struct nlattr *nla, u32 flags, 223 struct nlattr *nla, struct nlattr *est,
|
| /linux/lib/ |
| H A D | nlattr.c | 60 static int __nla_validate_parse(const struct nlattr *head, int len, int maxtype, 64 struct nlattr **tb, unsigned int depth); 66 static int validate_nla_bitfield32(const struct nlattr *nla, in validate_nla_bitfield32() 89 static int nla_validate_array(const struct nlattr *head, int len, int maxtype, in nla_validate_array() 94 const struct nlattr *entry; in nla_validate_array() 171 const struct nlattr *nla, in nla_validate_range_unsigned() 288 const struct nlattr *nla, in nla_validate_int_range_signed() 326 const struct nlattr *nla, in nla_validate_int_range() 354 const struct nlattr *nla, in nla_validate_mask() 393 static int validate_nla(const struct nlattr *nla, int maxtype, in validate_nla() [all …]
|
| /linux/net/bridge/ |
| H A D | br_mrp_netlink.c | 31 static int br_mrp_instance_parse(struct net_bridge *br, struct nlattr *attr, in br_mrp_instance_parse() 34 struct nlattr *tb[IFLA_BRIDGE_MRP_INSTANCE_MAX + 1]; in br_mrp_instance_parse() 76 struct nlattr *attr, in br_mrp_port_state_parse() 79 struct nlattr *tb[IFLA_BRIDGE_MRP_PORT_STATE_MAX + 1]; in br_mrp_port_state_parse() 105 struct nlattr *attr, in br_mrp_port_role_parse() 108 struct nlattr *tb[IFLA_BRIDGE_MRP_PORT_ROLE_MAX + 1]; in br_mrp_port_role_parse() 134 static int br_mrp_ring_state_parse(struct net_bridge *br, struct nlattr *attr, in br_mrp_ring_state_parse() 137 struct nlattr *tb[IFLA_BRIDGE_MRP_RING_STATE_MAX + 1]; in br_mrp_ring_state_parse() 168 static int br_mrp_ring_role_parse(struct net_bridge *br, struct nlattr *attr, in br_mrp_ring_role_parse() 171 struct nlattr *t in br_mrp_ring_role_parse() [all...] |
| H A D | br_cfm_netlink.c | 92 static int br_mep_create_parse(struct net_bridge *br, struct nlattr *attr, in br_mep_create_parse() 95 struct nlattr *tb[IFLA_BRIDGE_CFM_MEP_CREATE_MAX + 1]; in br_mep_create_parse() 132 static int br_mep_delete_parse(struct net_bridge *br, struct nlattr *attr, in br_mep_delete_parse() 135 struct nlattr *tb[IFLA_BRIDGE_CFM_MEP_DELETE_MAX + 1]; in br_mep_delete_parse() 155 static int br_mep_config_parse(struct net_bridge *br, struct nlattr *attr, in br_mep_config_parse() 158 struct nlattr *tb[IFLA_BRIDGE_CFM_MEP_CONFIG_MAX + 1]; in br_mep_config_parse() 197 static int br_cc_config_parse(struct net_bridge *br, struct nlattr *attr, in br_cc_config_parse() 200 struct nlattr *tb[IFLA_BRIDGE_CFM_CC_CONFIG_MAX + 1]; in br_cc_config_parse() 238 static int br_cc_peer_mep_add_parse(struct net_bridge *br, struct nlattr *attr, in br_cc_peer_mep_add_parse() 241 struct nlattr *t in br_cc_peer_mep_add_parse() [all...] |
| /linux/net/tipc/ |
| H A D | netlink_compat.c | 69 int (*format)(struct tipc_nl_compat_msg *msg, struct nlattr **attrs); 188 struct nlattr **attrbuf; in __tipc_nl_compat_dumpit() 205 attrbuf = kzalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1); in __tipc_nl_compat_dumpit() 333 struct nlattr **attrbuf; in __tipc_nl_compat_doit() 340 attrbuf = kmalloc_objs(struct nlattr *, tipc_genl_family.maxattr + 1); in __tipc_nl_compat_doit() 361 (const struct nlattr *)trans_buf->data, in __tipc_nl_compat_doit() 403 struct nlattr **attrs) in tipc_nl_compat_bearer_dump() 405 struct nlattr *bearer[TIPC_NLA_BEARER_MAX + 1]; in tipc_nl_compat_bearer_dump() 425 struct nlattr *prop; in tipc_nl_compat_bearer_enable() 426 struct nlattr *bearer; in tipc_nl_compat_bearer_enable() [all …]
|
| /linux/net/dcb/ |
| H A D | dcbnl.c | 242 u32 seq, struct nlattr **tb, struct sk_buff *skb) in dcbnl_getstate() 253 u32 seq, struct nlattr **tb, struct sk_buff *skb) in dcbnl_getpfccfg() 255 struct nlattr *data[DCB_PFC_UP_ATTR_MAX + 1], *nest; in dcbnl_getpfccfg() 298 u32 seq, struct nlattr **tb, struct sk_buff *skb) in dcbnl_getperm_hwaddr() 312 u32 seq, struct nlattr **tb, struct sk_buff *skb) in dcbnl_getcap() 314 struct nlattr *data[DCB_CAP_ATTR_MAX + 1], *nest; in dcbnl_getcap() 357 u32 seq, struct nlattr **tb, struct sk_buff *skb) in dcbnl_getnumtcs() 359 struct nlattr *data[DCB_NUMTCS_ATTR_MAX + 1], *nest; in dcbnl_getnumtcs() 404 u32 seq, struct nlattr **tb, struct sk_buff *skb) in dcbnl_setnumtcs() 406 struct nlattr *data[DCB_NUMTCS_ATTR_MAX + 1]; in dcbnl_setnumtcs() [all …]
|
| /linux/include/linux/netfilter/ipset/ |
| H A D | ip_set.h | 163 int (*uadt)(struct ip_set *set, struct nlattr *tb[], 231 struct nlattr *tb[], u32 flags); 312 const struct nlattr *name, struct ip_set **set); 333 extern int ip_set_get_ipaddr4(struct nlattr *nla, __be32 *ipaddr); 334 extern int ip_set_get_ipaddr6(struct nlattr *nla, union nf_inet_addr *ipaddr); 335 extern size_t ip_set_elem_len(struct ip_set *set, struct nlattr *tb[], 337 extern int ip_set_get_extensions(struct ip_set *set, struct nlattr *tb[], 347 ip_set_get_hostipaddr4(struct nlattr *nla, u32 *ipaddr) in ip_set_get_hostipaddr4() 377 ip_set_attr_netorder(struct nlattr *tb[], int type) in ip_set_attr_netorder() 383 ip_set_optattr_netorder(struct nlattr *tb[], int type) in ip_set_optattr_netorder() [all …]
|
| /linux/net/ethtool/ |
| H A D | bitset.c | 237 struct nlattr *nest; in ethnl_put_bitset32() 238 struct nlattr *attr; in ethnl_put_bitset32() 271 struct nlattr *bits; in ethnl_put_bitset32() 329 int ethnl_bitset_is_compact(const struct nlattr *bitset, bool *compact) in ethnl_bitset_is_compact() 331 struct nlattr *tb[ARRAY_SIZE(bitset_policy)]; in ethnl_bitset_is_compact() 379 const struct nlattr *bit_attr, bool no_mask, in ethnl_parse_bit() 383 struct nlattr *tb[ARRAY_SIZE(bit_policy)]; in ethnl_parse_bit() 450 const struct nlattr *attr, struct nlattr **tb, in ethnl_update_bitset32_verbose() 455 struct nlattr *bit_attr; in ethnl_update_bitset32_verbose() 522 const struct nlattr *nest, in ethnl_compact_sanity_checks() [all …]
|
| H A D | netlink.h | 14 const struct nlattr *nest, struct net *net, 54 struct nlattr *attr; in ethnl_put_strz() 76 static inline void ethnl_update_u32(u32 *dst, const struct nlattr *attr, 102 static inline void ethnl_update_u8(u8 *dst, const struct nlattr *attr, 128 static inline void ethnl_update_bool32(u32 *dst, const struct nlattr *attr, 154 static inline void ethnl_update_bool(bool *dst, const struct nlattr *attr, 182 const struct nlattr *attr, bool *mod) in ethnl_update_binary() 205 static inline void ethnl_update_bitfield32(u32 *dst, const struct nlattr *attr, 296 struct nlattr **tb, unsigned int header, 402 struct nlattr **t [all...] |
| H A D | strset.c | 171 static int strset_get_id(const struct nlattr *nest, u32 *val, in strset_get_id() 174 struct nlattr *tb[ARRAY_SIZE(get_stringset_policy)]; in strset_get_id() 194 struct nlattr **tb, in strset_parse_request() 198 struct nlattr *nest = tb[ETHTOOL_A_STRSET_STRINGSETS]; in strset_parse_request() 199 struct nlattr *attr; in strset_parse_request() 295 struct nlattr **tb = info->attrs; in strset_prepare_data() 398 struct nlattr *string_attr; in strset_fill_string() 422 struct nlattr *stringset_attr; in strset_fill_set() 423 struct nlattr *strings_attr; in strset_fill_set() 464 struct nlattr *nest; in strset_fill_reply()
|
| /linux/net/netfilter/ |
| H A D | nf_conntrack_netlink.c | 72 struct nlattr *nest_parms; in ctnetlink_dump_tuples_proto() 113 struct nlattr *nest_parms; in ctnetlink_dump_tuples_ip() 201 struct nlattr *nest_proto; in ctnetlink_dump_protoinfo() 225 struct nlattr *nest_helper; in ctnetlink_dump_helpinfo() 263 struct nlattr *nest_count; in dump_counters() 311 struct nlattr *nest_count; in ctnetlink_dump_timestamp() 359 struct nlattr *nest_secctx; in ctnetlink_dump_secctx() 437 struct nlattr *nest_parms; in ctnetlink_dump_master() 458 struct nlattr *nest_parms; in dump_ct_seq_adj() 507 struct nlattr *nest_parm in ctnetlink_dump_ct_synproxy() [all...] |
| H A D | nfnetlink_cthelper.c | 76 const struct nlattr *attr) in nfnl_cthelper_parse_tuple() 79 struct nlattr *tb[NFCTH_TUPLE_MAX+1]; in nfnl_cthelper_parse_tuple() 99 nfnl_cthelper_from_nlattr(struct nlattr *attr, struct nf_conn *ct) in nfnl_cthelper_from_nlattr() 147 const struct nlattr *attr) in nfnl_cthelper_expect_policy() 150 struct nlattr *tb[NFCTH_POLICY_MAX+1]; in nfnl_cthelper_expect_policy() 182 const struct nlattr *attr) in nfnl_cthelper_parse_expect_policy() 185 struct nlattr *tb[NFCTH_POLICY_SET_MAX+1]; in nfnl_cthelper_parse_expect_policy() 220 nfnl_cthelper_create(const struct nlattr * const tb[], in nfnl_cthelper_create() 297 const struct nlattr *attr) in nfnl_cthelper_update_policy_one() 299 struct nlattr *t in nfnl_cthelper_update_policy_one() [all...] |
| H A D | nft_tunnel.c | 76 const struct nlattr * const tb[]) in nft_tunnel_get_init() 166 const struct nlattr *attr, in nft_tunnel_obj_ip_init() 169 struct nlattr *tb[NFTA_TUNNEL_KEY_IP_MAX + 1]; in nft_tunnel_obj_ip_init() 195 const struct nlattr *attr, in nft_tunnel_obj_ip6_init() 198 struct nlattr *tb[NFTA_TUNNEL_KEY_IP6_MAX + 1]; in nft_tunnel_obj_ip6_init() 231 static int nft_tunnel_obj_vxlan_init(const struct nlattr *attr, in nft_tunnel_obj_vxlan_init() 234 struct nlattr *tb[NFTA_TUNNEL_KEY_VXLAN_MAX + 1]; in nft_tunnel_obj_vxlan_init() 261 static int nft_tunnel_obj_erspan_init(const struct nlattr *attr, in nft_tunnel_obj_erspan_init() 264 struct nlattr *tb[NFTA_TUNNEL_KEY_ERSPAN_MAX + 1]; in nft_tunnel_obj_erspan_init() 315 static int nft_tunnel_obj_geneve_init(const struct nlattr *att [all...] |
| /linux/net/8021q/ |
| H A D | vlan_netlink.c | 31 static inline int vlan_validate_qos_map(struct nlattr *attr) in vlan_validate_qos_map() 39 static int vlan_validate(struct nlattr *tb[], struct nlattr *data[], in vlan_validate() 104 static int vlan_changelink(struct net_device *dev, struct nlattr *tb[], in vlan_changelink() 105 struct nlattr *data[], in vlan_changelink() 110 struct nlattr *attr; in vlan_changelink() 144 struct nlattr **data = params->data; in vlan_newlink() 145 struct nlattr **tb = params->tb; in vlan_newlink() 206 return nla_total_size(sizeof(struct nlattr)) + in vlan_qos_map_size() 227 struct nlattr *nes in vlan_fill_info() [all...] |
| /linux/tools/testing/selftests/nci/ |
| H A D | nci_dev.c | 117 struct nlattr *na; in send_cmd_mt_nla() 132 na = (struct nlattr *)(GENLMSG_DATA(&msg) + prv_len); in send_cmd_mt_nla() 183 struct nlattr *na; in get_family_id() 202 na = (struct nlattr *)GENLMSG_DATA(&ans); in get_family_id() 209 struct nlattr *nested_na; in get_family_id() 210 struct nlattr *group_na; in get_family_id() 214 nested_na = (struct nlattr *)((char *)na + NLA_HDRLEN); in get_family_id() 215 group_na = (struct nlattr *)((char *)nested_na + NLA_HDRLEN); in get_family_id() 231 group_na = (struct nlattr *)((char *)group_na + in get_family_id() 235 na = (struct nlattr *)(GENLMSG_DATA(&ans) + len); in get_family_id() [all …]
|
| /linux/drivers/net/can/dev/ |
| H A D | netlink.c | 55 static int can_validate_bittiming(struct nlattr *data[], in can_validate_bittiming() 76 static int can_validate_tdc(struct nlattr *data_tdc, in can_validate_tdc() 105 struct nlattr *tb_tdc[IFLA_CAN_TDC_MAX + 1]; in can_validate_tdc() 135 static int can_validate_pwm(struct nlattr *data[], in can_validate_pwm() 138 struct nlattr *tb_pwm[IFLA_CAN_PWM_MAX + 1]; in can_validate_pwm() 169 static int can_validate_databittiming(struct nlattr *data[], in can_validate_databittiming() 173 struct nlattr *data_tdc; in can_validate_databittiming() 257 static int can_validate(struct nlattr *tb[], struct nlattr *data[], in can_validate() 305 struct nlattr *data[], in can_ctrlmode_changelink() 386 const struct nlattr *nla, in can_tdc_changelink() [all …]
|