Home
last modified time | relevance | path

Searched refs:nlattr (Results 1 – 10 of 10) sorted by relevance

/tools/lib/bpf/
Dnlattr.h69 static inline void *libbpf_nla_data(const struct nlattr *nla) in libbpf_nla_data()
74 static inline uint8_t libbpf_nla_getattr_u8(const struct nlattr *nla) in libbpf_nla_getattr_u8()
79 static inline uint32_t libbpf_nla_getattr_u32(const struct nlattr *nla) in libbpf_nla_getattr_u32()
84 static inline const char *libbpf_nla_getattr_str(const struct nlattr *nla) in libbpf_nla_getattr_str()
93 static inline int libbpf_nla_len(const struct nlattr *nla) in libbpf_nla_len()
98 int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head,
100 int libbpf_nla_parse_nested(struct nlattr *tb[], int maxtype,
101 struct nlattr *nla,
Dnlattr.c24 static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) in nla_next()
29 return (struct nlattr *) ((char *) nla + totlen); in nla_next()
32 static int nla_ok(const struct nlattr *nla, int remaining) in nla_ok()
39 static int nla_type(const struct nlattr *nla) in nla_type()
44 static int validate_nla(struct nlattr *nla, int maxtype, in validate_nla()
103 int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, in libbpf_nla_parse()
106 struct nlattr *nla; in libbpf_nla_parse()
109 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); in libbpf_nla_parse()
148 int libbpf_nla_parse_nested(struct nlattr *tb[], int maxtype, in libbpf_nla_parse_nested()
149 struct nlattr *nla, in libbpf_nla_parse_nested()
[all …]
Dnetlink.c134 struct nlattr *nla, *nla_xdp; in bpf_set_link_xdp_fd()
156 nla = (struct nlattr *)(((char *)&req) in bpf_set_link_xdp_fd()
162 nla_xdp = (struct nlattr *)((char *)nla + nla->nla_len); in bpf_set_link_xdp_fd()
170 nla_xdp = (struct nlattr *)((char *)nla + nla->nla_len); in bpf_set_link_xdp_fd()
193 struct nlattr *tb[IFLA_MAX + 1], *attr; in __dump_link_nlmsg()
198 attr = (struct nlattr *) ((void *) ifi + NLMSG_ALIGN(sizeof(*ifi))); in __dump_link_nlmsg()
219 static int get_xdp_id(void *cookie, void *msg, struct nlattr **tb) in get_xdp_id()
221 struct nlattr *xdp_tb[IFLA_XDP_MAX + 1]; in get_xdp_id()
310 struct nlattr *tb[TCA_MAX + 1], *attr; in __dump_class_nlmsg()
315 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_class_nlmsg()
[all …]
DBuild1 libbpf-y := libbpf.o bpf.o nlattr.o btf.o libbpf_errno.o str_error.o \
Dlibbpf.h426 struct nlattr;
427 typedef int (*libbpf_dump_nlmsg_t)(void *cookie, void *msg, struct nlattr **tb);
/tools/bpf/bpftool/
Dnetlink_dumper.c14 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 *attr) in do_bpf_act_dump()
121 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1]; in do_bpf_act_dump()
[all …]
Dmain.h222 struct nlattr;
225 int do_xdp_dump(struct ifinfomsg *ifinfo, struct nlattr **tb);
226 int do_filter_dump(struct tcmsg *ifinfo, struct nlattr **tb, const char *kind,
Dnet.c86 static int dump_link_nlmsg(void *cookie, void *msg, struct nlattr **tb) in dump_link_nlmsg()
115 static int dump_class_qdisc_nlmsg(void *cookie, void *msg, struct nlattr **tb) in dump_class_qdisc_nlmsg()
149 static int dump_filter_nlmsg(void *cookie, void *msg, struct nlattr **tb) in dump_filter_nlmsg()
/tools/accounting/
Dgetdelays.c123 struct nlattr *na; in send_cmd()
137 na = (struct nlattr *) GENLMSG_DATA(&msg); in send_cmd()
172 struct nlattr *na; in get_family_id()
187 na = (struct nlattr *) GENLMSG_DATA(&ans); in get_family_id()
188 na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); in get_family_id()
269 struct nlattr *na; in main()
474 na = (struct nlattr *) GENLMSG_DATA(&msg); in main()
485 na = (struct nlattr *) NLA_DATA(na); in main()
524 na = (struct nlattr *)((char *)na + in main()
538 na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); in main()
/tools/include/uapi/linux/
Dnetlink.h211 struct nlattr { struct
232 #define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) argument