| /tools/testing/selftests/bpf/ |
| A D | netlink_helpers.h | 27 const struct nlmsghdr *inner_nlh); 32 int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, 33 struct nlmsghdr **answer) 36 int addattr(struct nlmsghdr *n, int maxlen, int type); 37 int addattr8(struct nlmsghdr *n, int maxlen, int type, __u8 data); 38 int addattr16(struct nlmsghdr *n, int maxlen, int type, __u16 data); 39 int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data); 40 int addattr64(struct nlmsghdr *n, int maxlen, int type, __u64 data); 43 int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len); 44 struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type); [all …]
|
| A D | netlink_helpers.c | 149 size_t iovlen, struct nlmsghdr **answer, in __rtnl_talk_iov() 161 struct nlmsghdr *h; in __rtnl_talk_iov() 192 for (h = (struct nlmsghdr *)buf; status >= sizeof(*h); ) { in __rtnl_talk_iov() 212 h = (struct nlmsghdr *)((char *)h + NLMSG_ALIGN(len)); in __rtnl_talk_iov() 239 *answer = (struct nlmsghdr *)buf; in __rtnl_talk_iov() 245 *answer = (struct nlmsghdr *)buf; in __rtnl_talk_iov() 250 h = (struct nlmsghdr *)((char *)h + NLMSG_ALIGN(len)); in __rtnl_talk_iov() 265 struct nlmsghdr **answer, bool show_rtnl_err, in __rtnl_talk() 276 int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, in rtnl_talk() 277 struct nlmsghdr **answer) in rtnl_talk() [all …]
|
| /tools/net/ynl/lib/ |
| A D | ynl-priv.h | 42 typedef int (*ynl_parse_cb_t)(const struct nlmsghdr *nlh, 104 struct nlmsghdr * 106 struct nlmsghdr * 137 int ynl_exec(struct ynl_sock *ys, struct nlmsghdr *req_nlh, 139 int ynl_exec_dump(struct ynl_sock *ys, struct nlmsghdr *req_nlh, 149 static inline struct nlmsghdr *ynl_nlmsg_put_header(void *buf) in ynl_nlmsg_put_header() 151 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; in ynl_nlmsg_put_header() 164 static inline void *ynl_nlmsg_data(const struct nlmsghdr *nlh) in ynl_nlmsg_data() 258 __ynl_attr_put_overflow(struct nlmsghdr *nlh, size_t size) in __ynl_attr_put_overflow() 288 ynl_attr_nest_end(struct nlmsghdr *nlh, struct nlattr *attr) in ynl_attr_nest_end() [all …]
|
| A D | ynl.c | 264 off -= sizeof(struct nlmsghdr); in ynl_ext_ack_check() 291 off -= sizeof(struct nlmsghdr); in ynl_ext_ack_check() 473 struct nlmsghdr *nlh; in ynl_msg_start() 509 struct nlmsghdr * 514 struct nlmsghdr *nlh; in ynl_gemsg_start() 539 struct nlmsghdr * 545 struct nlmsghdr * 564 const struct nlmsghdr *nlh; in __ynl_sock_read_msgs() 577 nlh = (struct nlmsghdr *)&ys->rx_buf[len - rem]; in __ynl_sock_read_msgs() 703 struct nlmsghdr *nlh; in ynl_sock_read_family() [all …]
|
| A D | ynl.h | 82 struct nlmsghdr *nlh;
|
| /tools/include/uapi/linux/ |
| A D | netlink.h | 44 struct nlmsghdr { struct 91 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) 96 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 97 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 98 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 111 struct nlmsghdr msg;
|
| /tools/testing/selftests/net/ |
| A D | netlink-dumps.c | 37 const struct nlmsghdr *nlh; in nl_get_extack() 42 nlh = (struct nlmsghdr *)&buf[n - rem]; in nl_get_extack() 78 struct nlmsghdr nlhdr; 141 ASSERT_GE(n, (ssize_t)sizeof(struct nlmsghdr)); in TEST() 145 sizeof(struct nlmsghdr) + sizeof(struct ndmsg)); in TEST() 150 struct nlmsghdr nlhdr; 188 ASSERT_GE(n, (ssize_t)sizeof(struct nlmsghdr)); in TEST() 191 ASSERT_GE(n, (ssize_t)sizeof(struct nlmsghdr)); in TEST()
|
| A D | tap.c | 33 static struct rtattr *rtattr_add(struct nlmsghdr *nh, unsigned short type, in rtattr_add() 44 static struct rtattr *rtattr_begin(struct nlmsghdr *nh, unsigned short type) in rtattr_begin() 49 static void rtattr_end(struct nlmsghdr *nh, struct rtattr *attr) in rtattr_end() 56 static struct rtattr *rtattr_add_str(struct nlmsghdr *nh, unsigned short type, in rtattr_add_str() 65 static struct rtattr *rtattr_add_strsz(struct nlmsghdr *nh, unsigned short type, in rtattr_add_strsz() 74 static struct rtattr *rtattr_add_any(struct nlmsghdr *nh, unsigned short type, in rtattr_add_any() 84 int (*fill_rtattr)(struct nlmsghdr *nh), in dev_create() 85 int (*fill_info_data)(struct nlmsghdr *nh)) in dev_create() 88 struct nlmsghdr nh; in dev_create() 146 struct nlmsghdr nh; in dev_delete() [all …]
|
| A D | ipsec.c | 288 struct nlmsghdr hdr; in netlink_check_answer() 313 struct nlmsghdr nh; in veth_add() 363 struct nlmsghdr nh; in ip4_addr_set() 403 struct nlmsghdr nh; in link_set_up() 430 struct nlmsghdr nh; in ip4_route_set() 920 struct nlmsghdr nh; in xfrm_state_add() 1009 struct nlmsghdr nh; in xfrm_state_check() 1013 struct nlmsghdr nh; in xfrm_state_check() 1368 struct nlmsghdr nh; in xfrm_monitor_acquire() 1439 struct nlmsghdr nh; in xfrm_expire_state() [all …]
|
| /tools/testing/selftests/net/tcp_ao/lib/ |
| A D | netlink.c | 37 struct nlmsghdr hdr; in netlink_check_answer() 39 struct nlmsghdr orig_msg; in netlink_check_answer() 60 static inline struct rtattr *rtattr_hdr(struct nlmsghdr *nh) in rtattr_hdr() 65 static int rtattr_pack(struct nlmsghdr *nh, size_t req_sz, in rtattr_pack() 85 static struct rtattr *_rtattr_begin(struct nlmsghdr *nh, size_t req_sz, in _rtattr_begin() 109 static int veth_pack_peerb(struct nlmsghdr *nh, size_t req_sz, in veth_pack_peerb() 139 struct nlmsghdr nh; in __add_veth() 202 struct nlmsghdr nh; in __ip_addr_add() 249 struct nlmsghdr nh; in __ip_route_add() 311 struct nlmsghdr nh; in __link_set_up() [all …]
|
| /tools/testing/selftests/net/netfilter/ |
| A D | nf_queue.c | 77 static int queue_cb(const struct nlmsghdr *nlh, void *data) in queue_cb() 120 static struct nlmsghdr * 123 struct nlmsghdr *nlh = mnl_nlmsg_put_header(buf); in nfq_build_cfg_request() 144 static struct nlmsghdr * 147 struct nlmsghdr *nlh = mnl_nlmsg_put_header(buf); in nfq_build_cfg_params() 167 static struct nlmsghdr * 174 struct nlmsghdr *nlh; in nfq_build_verdict() 212 struct nlmsghdr *nlh; in open_queue() 274 struct nlmsghdr *nlh; in mainloop()
|
| A D | conntrack_dump_flush.c | 20 static int build_cta_tuple_v4(struct nlmsghdr *nlh, int type, in build_cta_tuple_v4() 50 static int build_cta_tuple_v6(struct nlmsghdr *nlh, int type, in build_cta_tuple_v6() 80 static int build_cta_proto(struct nlmsghdr *nlh) in build_cta_proto() 101 static int conntrack_data_insert(struct mnl_socket *sock, struct nlmsghdr *nlh, in conntrack_data_insert() 105 struct nlmsghdr *rplnlh; in conntrack_data_insert() 149 struct nlmsghdr *nlh; in conntrack_data_generate_v4() 183 struct nlmsghdr *nlh; in conntrack_data_generate_v6() 213 static int count_entries(const struct nlmsghdr *nlh, void *data) in count_entries() 222 struct nlmsghdr *nlh, *rplnlh; in conntracK_count_zone() 269 struct nlmsghdr *nlh, *rplnlh; in conntrack_flush_zone()
|
| /tools/testing/selftests/net/mptcp/ |
| A D | pm_nl_ctl.c | 105 struct nlmsghdr *nh; in capture_events() 313 struct nlmsghdr *nh; in resolve_mptcp_pm_netlink() 340 struct nlmsghdr *nh; in dsf() 452 struct nlmsghdr *nh; in csf() 584 struct nlmsghdr *nh; in remove_addr() 637 struct nlmsghdr *nh; in announce_addr() 761 struct nlmsghdr *nh; in add_addr() 892 struct nlmsghdr *nh; in del_addr() 1083 struct nlmsghdr *nh; in get_addr() 1135 struct nlmsghdr *nh; in dump_addrs() [all …]
|
| A D | mptcp_diag.c | 110 struct nlmsghdr nlh; in send_query() 261 static void parse_nlmsg(struct nlmsghdr *nlh, __u32 proto) in parse_nlmsg() 305 struct nlmsghdr *nlh = (struct nlmsghdr *)rcv_buff; in recv_nlmsg()
|
| /tools/testing/selftests/connector/ |
| A D | proc_filter.c | 21 #define NL_MESSAGE_SIZE (sizeof(struct nlmsghdr) + sizeof(struct cn_msg) + \ 23 #define NL_MESSAGE_SIZE_NF (sizeof(struct nlmsghdr) + sizeof(struct cn_msg) + \ 43 struct nlmsghdr *hdr; in send_message() 46 hdr = (struct nlmsghdr *)buff; in send_message() 136 struct nlmsghdr *hdr; in handle_packet() 138 hdr = (struct nlmsghdr *)buff; in handle_packet()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | xfrm_info.c | 171 static struct rtattr *rtattr_add(struct nlmsghdr *nh, unsigned short type, in rtattr_add() 182 static struct rtattr *rtattr_add_str(struct nlmsghdr *nh, unsigned short type, in rtattr_add_str() 191 static struct rtattr *rtattr_begin(struct nlmsghdr *nh, unsigned short type) in rtattr_begin() 196 static void rtattr_end(struct nlmsghdr *nh, struct rtattr *attr) in rtattr_end() 206 struct nlmsghdr nh; in setup_xfrmi_external_dev() 213 struct nlmsghdr *nh; in setup_xfrmi_external_dev()
|
| /tools/testing/selftests/net/af_unix/ |
| A D | diag_uid.c | 81 struct nlmsghdr nlh; in send_request() 151 struct nlmsghdr *nlh; in receive_response() 157 nlh = (struct nlmsghdr *)buf; in receive_response()
|
| /tools/bpf/bpftool/ |
| A D | net.c | 107 typedef int (*__dump_nlmsg_t)(struct nlmsghdr *nlmsg, dump_nlmsg_t, void *cookie); 158 struct nlmsghdr *nh; in netlink_recv() 173 for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, (unsigned int)len); in netlink_recv() 210 static int __dump_class_nlmsg(struct nlmsghdr *nlh, in __dump_class_nlmsg() 230 struct nlmsghdr nlh; in netlink_get_class() 249 static int __dump_qdisc_nlmsg(struct nlmsghdr *nlh, in __dump_qdisc_nlmsg() 269 struct nlmsghdr nlh; in netlink_get_qdisc() 288 static int __dump_filter_nlmsg(struct nlmsghdr *nlh, in __dump_filter_nlmsg() 308 struct nlmsghdr nlh; in netlink_get_filter() 328 static int __dump_link_nlmsg(struct nlmsghdr *nlh, in __dump_link_nlmsg() [all …]
|
| /tools/lib/bpf/ |
| A D | nlattr.h | 58 struct nlmsghdr nh; 129 int libbpf_nla_dump_errormsg(struct nlmsghdr *nlh);
|
| A D | nlattr.c | 81 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() 157 int libbpf_nla_dump_errormsg(struct nlmsghdr *nlh) in libbpf_nla_dump_errormsg()
|
| A D | netlink.c | 28 typedef int (*__dump_nlmsg_t)(struct nlmsghdr *nlmsg, libbpf_dump_nlmsg_t, 143 struct nlmsghdr *nh; in libbpf_netlink_recv() 174 for (nh = (struct nlmsghdr *)iov.iov_base; NLMSG_OK(nh, len); in libbpf_netlink_recv() 249 static int parse_genl_family_id(struct nlmsghdr *nh, libbpf_dump_nlmsg_t fn, in parse_genl_family_id() 344 static int __dump_link_nlmsg(struct nlmsghdr *nlh, in __dump_link_nlmsg() 405 static int parse_xdp_features(struct nlmsghdr *nh, libbpf_dump_nlmsg_t fn, in parse_xdp_features() 695 static int get_tc_info(struct nlmsghdr *nh, libbpf_dump_nlmsg_t fn, in get_tc_info()
|
| /tools/accounting/ |
| A D | procacct.c | 79 struct nlmsghdr n; 172 struct nlmsghdr n; in get_family_id() 368 sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len); in main()
|
| /tools/lib/thermal/ |
| A D | sampling.c | 13 struct nlmsghdr *nlh = nlmsg_hdr(n); in handle_thermal_sample()
|
| /tools/testing/vsock/ |
| A D | vsock_diag_test.c | 172 struct nlmsghdr nlh; in send_req() 270 const struct nlmsghdr *h; in read_vsock_stat() 281 h = (struct nlmsghdr *)buf; in read_vsock_stat()
|
| /tools/testing/selftests/net/ovpn/ |
| A D | ovpn-cli.c | 252 struct nlmsghdr *nlh = (struct nlmsghdr *)err - 1; in ovpn_nl_cb_error() 1061 static int ovpn_addattr(struct nlmsghdr *n, int maxlen, int type, in ovpn_addattr() 1087 static struct rtattr *ovpn_nest_start(struct nlmsghdr *msg, size_t max_size, in ovpn_nest_start() 1098 static void ovpn_nest_end(struct nlmsghdr *msg, struct rtattr *nest) in ovpn_nest_end() 1171 typedef int (*ovpn_parse_reply_cb)(struct nlmsghdr *msg, void *arg); 1174 static int ovpn_rt_send(struct nlmsghdr *payload, pid_t peer, in ovpn_rt_send() 1181 struct nlmsghdr *h; in ovpn_rt_send() 1263 h = (struct nlmsghdr *)buf; in ovpn_rt_send() 1326 h = (struct nlmsghdr *)((uint8_t *)h + in ovpn_rt_send() 1349 struct nlmsghdr n; [all …]
|