| /tools/lib/bpf/ |
| A D | nlattr.h | 84 static inline void *libbpf_nla_data(const struct nlattr *nla) in libbpf_nla_data() 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, 131 static inline struct nlattr *nla_data(struct nlattr *nla) in nla_data() 133 return (struct nlattr *)((void *)nla + NLA_HDRLEN); in nla_data() 136 static inline struct nlattr *req_tail(struct libbpf_nla_req *req) in req_tail() 144 struct nlattr *nla; in nlattr_add() 162 struct nlattr *tail; in nlattr_begin_nested() [all …]
|
| A D | nlattr.c | 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 *nla; in libbpf_nla_parse() 110 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); in libbpf_nla_parse() 149 struct nlattr *nla, in libbpf_nla_parse_nested() 163 struct nlattr *tb[NLMSGERR_ATTR_MAX + 1], *attr; in libbpf_nla_dump_errormsg() [all …]
|
| A D | netlink.c | 253 struct nlattr *na = (struct nlattr *)((void *)gnl + GENL_HDRLEN); in parse_genl_family_id() 254 struct nlattr *tb[CTRL_ATTR_FAMILY_ID + 1]; in parse_genl_family_id() 289 struct nlattr *nla; in __bpf_set_link_xdp_fd_replace() 347 struct nlattr *tb[IFLA_MAX + 1], *attr; in __dump_link_nlmsg() 362 struct nlattr *xdp_tb[IFLA_XDP_MAX + 1]; in get_xdp_info() 409 struct nlattr *na = (struct nlattr *)((void *)gnl + GENL_HDRLEN); in parse_xdp_features() 410 struct nlattr *tb[NETDEV_CMD_MAX + 1]; in parse_xdp_features() 673 struct nlattr *tbb[TCA_BPF_MAX + 1]; in __get_tc_info() 699 struct nlattr *tb[TCA_MAX + 1]; in get_tc_info() 702 (struct nlattr *)((void *)tc + NLMSG_ALIGN(sizeof(*tc))), in get_tc_info() [all …]
|
| A D | Build | 1 libbpf-y := libbpf.o bpf.o nlattr.o btf.o libbpf_errno.o str_error.o \
|
| /tools/net/ynl/lib/ |
| A D | ynl-priv.h | 218 sizeof(struct nlattr) + offset); \ 229 static inline struct nlattr * 232 if (attr + 1 > (const struct nlattr *)end) in ynl_attr_if_good() 239 static inline struct nlattr * 242 struct nlattr *attr; in ynl_attr_next() 248 static inline struct nlattr * 251 struct nlattr *attr; in ynl_attr_first() 272 static inline struct nlattr * 275 struct nlattr *attr; in ynl_attr_nest_start() 297 struct nlattr *attr; in ynl_attr_put() [all …]
|
| A D | ynl.c | 50 const struct nlattr *attr) in ynl_err_walk_is_sel() 60 const struct nlattr *selector) in ynl_err_walk_sel_policy() 80 const struct nlattr *selector, unsigned int type, in ynl_err_walk_report_one() 138 const struct nlattr *selector = NULL; in ynl_err_walk() 140 const struct nlattr *attr; in ynl_err_walk() 193 off -= sizeof(struct nlattr); in ynl_err_walk() 209 const struct nlattr *tb[NLMSGERR_ATTR_MAX + 1] = {}; in ynl_ext_ack_check() 212 const struct nlattr *attr; in ynl_ext_ack_check() 363 int ynl_attr_validate(struct ynl_parse_arg *yarg, const struct nlattr *attr) in ynl_attr_validate() 637 const struct nlattr *entry, *attr; in ynl_get_family_info_mcast() [all …]
|
| /tools/bpf/bpftool/ |
| A D | netlink_dumper.c | 14 static void xdp_dump_prog_id(struct nlattr **tb, int attr, in xdp_dump_prog_id() 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() 138 static int do_bpf_filter_dump(struct nlattr *attr) in do_bpf_filter_dump() [all …]
|
| A D | net.c | 105 typedef int (*dump_nlmsg_t)(void *cookie, void *msg, struct nlattr **tb); 214 struct nlattr *tb[TCA_MAX + 1], *attr; in __dump_class_nlmsg() 219 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_class_nlmsg() 253 struct nlattr *tb[TCA_MAX + 1], *attr; in __dump_qdisc_nlmsg() 258 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_qdisc_nlmsg() 292 struct nlattr *tb[TCA_MAX + 1], *attr; in __dump_filter_nlmsg() 297 attr = (struct nlattr *) ((void *) t + NLMSG_ALIGN(sizeof(*t))); in __dump_filter_nlmsg() 331 struct nlattr *tb[IFLA_MAX + 1], *attr; in __dump_link_nlmsg() 336 attr = (struct nlattr *) ((void *) ifi + NLMSG_ALIGN(sizeof(*ifi))); in __dump_link_nlmsg() 365 static int dump_link_nlmsg(void *cookie, void *msg, struct nlattr **tb) in dump_link_nlmsg() [all …]
|
| A D | main.h | 239 struct nlattr; 242 int do_xdp_dump(struct ifinfomsg *ifinfo, struct nlattr **tb); 243 int do_filter_dump(struct tcmsg *ifinfo, struct nlattr **tb, const char *kind,
|
| A D | Makefile | 33 LIBBPF_INTERNAL_HDRS := $(addprefix $(LIBBPF_HDRS_DIR)/,hashmap.h nlattr.h relo_core.h libbpf_inter…
|
| /tools/accounting/ |
| A D | procacct.c | 129 struct nlattr *na; in send_cmd() 143 na = (struct nlattr *) GENLMSG_DATA(&msg); in send_cmd() 178 struct nlattr *na; in get_family_id() 193 na = (struct nlattr *) GENLMSG_DATA(&ans); in get_family_id() 194 na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); in get_family_id() 224 void handle_aggr(int mother, struct nlattr *na, int fd) in handle_aggr() 230 na = (struct nlattr *) NLA_DATA(na); in handle_aggr() 257 na = (struct nlattr *)((char *)na + in handle_aggr() 268 struct nlattr *na; in main() 373 na = (struct nlattr *) GENLMSG_DATA(&msg); in main() [all …]
|
| A D | getdelays.c | 122 struct nlattr *na; in send_cmd() 136 na = (struct nlattr *) GENLMSG_DATA(&msg); in send_cmd() 171 struct nlattr *na; in get_family_id() 186 na = (struct nlattr *) GENLMSG_DATA(&ans); in get_family_id() 187 na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); in get_family_id() 336 struct nlattr *na; in main() 540 na = (struct nlattr *) GENLMSG_DATA(&msg); in main() 551 na = (struct nlattr *) NLA_DATA(na); in main() 588 na = (struct nlattr *)((char *)na + in main() 602 na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); in main()
|
| A D | delaytop.c | 285 struct nlattr *na; in send_cmd() 302 na = (struct nlattr *) GENLMSG_DATA(&msg); in send_cmd() 333 struct nlattr *na; in get_family_id() 354 na = (struct nlattr *) GENLMSG_DATA(&ans); in get_family_id() 355 na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); in get_family_id() 478 struct nlattr *nested; in fetch_and_fill_task_info() 479 struct nlattr *na; in fetch_and_fill_task_info() 500 na = (struct nlattr *) GENLMSG_DATA(&resp); in fetch_and_fill_task_info() 503 nested = (struct nlattr *) NLA_DATA(na); in fetch_and_fill_task_info() 621 struct nlattr *na; in get_container_stats() [all …]
|
| /tools/testing/selftests/nci/ |
| A D | nci_dev.c | 117 struct nlattr *na; 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() 280 struct nlattr *na; in get_dev_enable_state() 285 na = (struct nlattr *)GENLMSG_DATA(msg); in get_dev_enable_state() 646 struct nlattr *na; in get_taginfo() 669 na = (struct nlattr *)GENLMSG_DATA(&ans); in get_taginfo() 722 struct nlattr *na; in connect_tag() [all …]
|
| /tools/power/x86/intel-speed-select/ |
| A D | hfi-events.c | 125 struct nlattr *tb[CTRL_ATTR_MAX + 1]; in family_handler() 127 struct nlattr *mcgrp; in family_handler() 136 struct nlattr *tb2[CTRL_ATTR_MCAST_GRP_MAX + 1]; in family_handler() 194 struct nlattr *attrs[THERMAL_GENL_ATTR_MAX + 1]; in handle_event() 202 struct nlattr *cap; in handle_event()
|
| /tools/lib/thermal/ |
| A D | thermal_nl.c | 78 struct nlattr *tb[CTRL_ATTR_MAX + 1]; in nl_family_handler() 80 struct nlattr *mcgrp; in nl_family_handler() 91 struct nlattr *tb_mcgrp[CTRL_ATTR_MCAST_GRP_MAX + 1]; in nl_family_handler()
|
| A D | commands.c | 46 struct nlattr *attr; in parse_tz_get() 80 struct nlattr *attr; in parse_cdev_get() 120 struct nlattr *attr; in parse_tz_get_trip() 193 struct nlattr *attr; in parse_threshold_get()
|
| A D | sampling.c | 15 struct nlattr *attrs[THERMAL_GENL_ATTR_MAX + 1]; in handle_thermal_sample()
|
| A D | events.c | 25 struct nlattr *attrs[THERMAL_GENL_ATTR_MAX + 1]; in handle_thermal_event()
|
| /tools/testing/selftests/net/ |
| A D | netlink-dumps.c | 38 const struct nlattr *attr; in nl_get_extack() 80 struct nlattr ahdr; 152 struct nlattr ahdr;
|
| /tools/include/uapi/linux/ |
| A D | netlink.h | 211 struct nlattr { struct 232 #define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) argument
|
| /tools/testing/selftests/net/netfilter/ |
| A D | conntrack_dump_flush.c | 24 struct nlattr *nest, *nest_ip, *nest_proto; in build_cta_tuple_v4() 54 struct nlattr *nest, *nest_ip, *nest_proto; in build_cta_tuple_v6() 82 struct nlattr *nest, *nest_proto; in build_cta_proto() 224 struct nlattr *nest; in conntracK_count_zone() 271 struct nlattr *nest; in conntrack_flush_zone()
|
| A D | nf_queue.c | 36 static int parse_attr_cb(const struct nlattr *attr, void *data) in parse_attr_cb() 38 const struct nlattr **tb = data; in parse_attr_cb() 79 struct nlattr *tb[NFQA_MAX+1] = { 0 }; in queue_cb()
|
| /tools/testing/selftests/net/ovpn/ |
| A D | ovpn-cli.c | 255 struct nlattr *attrs; in ovpn_nl_cb_error() 641 struct nlattr *attr; in ovpn_new_peer() 705 struct nlattr *attr; in ovpn_set_peer() 729 struct nlattr *attr; in ovpn_del_peer() 751 struct nlattr *attrs[OVPN_A_MAX + 1]; in ovpn_handle_peer() 882 struct nlattr *attr; in ovpn_get_peer() 906 struct nlattr *keyconf, *key_dir; in ovpn_new_key() 940 struct nlattr *keyconf; in ovpn_del_key() 1021 struct nlattr *keyconf; in ovpn_get_key() 1043 struct nlattr *kc; in ovpn_swap_keys() [all …]
|
| /tools/testing/selftests/bpf/progs/ |
| A D | bpf_qdisc_fifo.c | 78 int BPF_PROG(bpf_fifo_init, struct Qdisc *sch, struct nlattr *opt, in BPF_PROG()
|