| /linux/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 …]
|
| /linux/tools/net/ynl/lib/ |
| A D | ynl-priv.h | 41 typedef int (*ynl_parse_cb_t)(const struct nlmsghdr *nlh, 97 struct nlmsghdr * 99 struct nlmsghdr * 128 int ynl_exec(struct ynl_sock *ys, struct nlmsghdr *req_nlh, 130 int ynl_exec_dump(struct ynl_sock *ys, struct nlmsghdr *req_nlh, 140 static inline struct nlmsghdr *ynl_nlmsg_put_header(void *buf) in ynl_nlmsg_put_header() 142 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; in ynl_nlmsg_put_header() 155 static inline void *ynl_nlmsg_data(const struct nlmsghdr *nlh) in ynl_nlmsg_data() 245 __ynl_attr_put_overflow(struct nlmsghdr *nlh, size_t size) in __ynl_attr_put_overflow() 275 ynl_attr_nest_end(struct nlmsghdr *nlh, struct nlattr *attr) in ynl_attr_nest_end() [all …]
|
| A D | ynl.c | 198 off -= sizeof(struct nlmsghdr); in ynl_ext_ack_check() 225 off -= sizeof(struct nlmsghdr); in ynl_ext_ack_check() 398 struct nlmsghdr *nlh; in ynl_msg_start() 434 struct nlmsghdr * 439 struct nlmsghdr *nlh; in ynl_gemsg_start() 464 struct nlmsghdr * 470 struct nlmsghdr * 489 const struct nlmsghdr *nlh; in __ynl_sock_read_msgs() 502 nlh = (struct nlmsghdr *)&ys->rx_buf[len - rem]; in __ynl_sock_read_msgs() 628 struct nlmsghdr *nlh; in ynl_sock_read_family() [all …]
|
| /linux/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;
|
| /linux/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 …]
|
| /linux/include/uapi/linux/ |
| A D | netlink.h | 52 struct nlmsghdr { struct 100 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) 105 (struct nlmsghdr *)(((char *)(nlh)) + \ 107 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 108 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 121 struct nlmsghdr msg;
|
| /linux/include/net/ |
| A D | netlink.h | 482 struct nlmsghdr *nlh; 524 int (*cb)(struct sk_buff *, struct nlmsghdr *, 596 static inline void *nlmsg_data(const struct nlmsghdr *nlh) in nlmsg_data() 605 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() 639 return (remaining >= (int) sizeof(struct nlmsghdr) && in nlmsg_ok() 640 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && in nlmsg_ok() 652 static inline struct nlmsghdr * 653 nlmsg_next(const struct nlmsghdr *nlh, int *remaining) in nlmsg_next() 916 static inline int nlmsg_report(const struct nlmsghdr *nlh) in nlmsg_report() 927 static inline u32 nlmsg_seq(const struct nlmsghdr *nlh) in nlmsg_seq() [all …]
|
| A D | genetlink.h | 134 const struct nlmsghdr * nlhdr; 367 static inline struct nlmsghdr *genlmsg_nlhdr(void *user_hdr) in genlmsg_nlhdr() 369 return (struct nlmsghdr *)((char *)user_hdr - in genlmsg_nlhdr() 383 static inline int genlmsg_parse_deprecated(const struct nlmsghdr *nlh, in genlmsg_parse_deprecated() 402 static inline int genlmsg_parse(const struct nlmsghdr *nlh, in genlmsg_parse() 577 struct nlmsghdr *nlh = (struct nlmsghdr *)((unsigned char *)gnlh - in genlmsg_len()
|
| /linux/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() 48 static int build_cta_tuple_v6(struct nlmsghdr *nlh, int type, in build_cta_tuple_v6() 76 static int build_cta_proto(struct nlmsghdr *nlh) in build_cta_proto() 95 static int conntrack_data_insert(struct mnl_socket *sock, struct nlmsghdr *nlh, in conntrack_data_insert() 99 struct nlmsghdr *rplnlh; in conntrack_data_insert() 143 struct nlmsghdr *nlh; in conntrack_data_generate_v4() 177 struct nlmsghdr *nlh; in conntrack_data_generate_v6() 207 static int count_entries(const struct nlmsghdr *nlh, void *data) in count_entries() 216 struct nlmsghdr *nlh, *rplnlh; in conntracK_count_zone() 263 struct nlmsghdr *nlh, *rplnlh; in conntrack_flush_zone()
|
| /linux/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 …]
|
| /linux/include/linux/ |
| A D | sock_diag.h | 12 struct nlmsghdr; 18 int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh); 20 int (*destroy)(struct sk_buff *skb, struct nlmsghdr *nlh); 28 int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh);
|
| A D | netlink.h | 16 static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) in nlmsg_hdr() 18 return (struct nlmsghdr *)skb->data; in nlmsg_hdr() 222 void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err, 281 const struct nlmsghdr *nlh; 315 struct nlmsghdr * 330 const struct nlmsghdr *nlh, 333 const struct nlmsghdr *nlh, in netlink_dump_start()
|
| /linux/tools/testing/selftests/net/ |
| 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 | netlink-dumps.c | 21 struct nlmsghdr nlhdr; 59 ASSERT_GE(n, sizeof(struct nlmsghdr)); in TEST() 62 ASSERT_GE(n, sizeof(struct nlmsghdr)); in TEST()
|
| /linux/include/linux/netfilter/ |
| A D | nfnetlink.h | 13 const struct nlmsghdr *nlh; 67 static inline void nfnl_fill_hdr(struct nlmsghdr *nlh, u8 family, u8 version, in nfnl_fill_hdr() 78 static inline struct nlmsghdr *nfnl_msg_put(struct sk_buff *skb, u32 portid, in nfnl_msg_put() 83 struct nlmsghdr *nlh; in nfnl_msg_put()
|
| /linux/net/xfrm/ |
| A D | xfrm_compat.c | 137 static struct nlmsghdr *xfrm_nlmsg_put_compat(struct sk_buff *skb, in xfrm_nlmsg_put_compat() 138 const struct nlmsghdr *nlh_src, u16 type) in xfrm_nlmsg_put_compat() 142 struct nlmsghdr *nlh_dst; in xfrm_nlmsg_put_compat() 294 static int xfrm_xlate64(struct sk_buff *dst, const struct nlmsghdr *nlh_src) in xfrm_xlate64() 298 struct nlmsghdr *nlh_dst; in xfrm_xlate64() 328 static int xfrm_alloc_compat(struct sk_buff *skb, const struct nlmsghdr *nlh_src) in xfrm_alloc_compat() 359 static size_t xfrm_user_rcv_calculate_len64(const struct nlmsghdr *src, in xfrm_user_rcv_calculate_len64() 407 struct nlmsghdr *nlmsg = dst; in xfrm_attr_cpy32() 469 static int xfrm_xlate32(struct nlmsghdr *dst, const struct nlmsghdr *src, in xfrm_xlate32() 588 static struct nlmsghdr *xfrm_user_rcv_msg_compat(const struct nlmsghdr *h32, in xfrm_user_rcv_msg_compat() [all …]
|
| /linux/samples/bpf/ |
| A D | xdp_router_ipv4_user.c | 63 struct nlmsghdr *nh; in recv_msg() 73 nh = (struct nlmsghdr *)buf_ptr; in recv_msg() 254 struct nlmsghdr *nh; in get_route_table() 262 struct nlmsghdr nl; in get_route_table() 306 nh = (struct nlmsghdr *)buf; in get_route_table() 391 struct nlmsghdr *nh; in get_arp_table() 398 struct nlmsghdr nl; in get_arp_table() 441 nh = (struct nlmsghdr *)buf; in get_arp_table() 456 struct nlmsghdr *nh; in monitor_routes_thread() 517 nh = (struct nlmsghdr *)buf; in monitor_routes_thread() [all …]
|
| /linux/include/rdma/ |
| A D | rdma_netlink.h | 18 int (*doit)(struct sk_buff *skb, struct nlmsghdr *nlh, 65 void *ibnl_put_msg(struct sk_buff *skb, struct nlmsghdr **nlh, int seq, 76 int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh,
|
| /linux/crypto/ |
| A D | crypto_user.c | 158 struct nlmsghdr *nlh; in crypto_report_alg() 183 static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, in crypto_report() 259 static int crypto_update_alg(struct sk_buff *skb, struct nlmsghdr *nlh, in crypto_update_alg() 295 static int crypto_del_alg(struct sk_buff *skb, struct nlmsghdr *nlh, in crypto_del_alg() 333 static int crypto_add_alg(struct sk_buff *skb, struct nlmsghdr *nlh, in crypto_add_alg() 381 static int crypto_del_rng(struct sk_buff *skb, struct nlmsghdr *nlh, in crypto_del_rng() 389 static int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, in crypto_reportstat() 414 int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **); 428 static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, in crypto_user_rcv_msg()
|
| /linux/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()
|
| /linux/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()
|
| /linux/samples/connector/ |
| A D | ucon.c | 48 struct nlmsghdr *nlh; in netlink_send() 56 nlh = (struct nlmsghdr *)buf; in netlink_send() 102 struct nlmsghdr *reply; in main() 214 reply = (struct nlmsghdr *)buf; in main()
|
| /linux/net/dcb/ |
| A D | dcbnl.c | 217 u32 flags, struct nlmsghdr **nlhp) in dcbnl_newmsg() 221 struct nlmsghdr *nlh; in dcbnl_newmsg() 241 static int dcbnl_getstate(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getstate() 311 static int dcbnl_getcap(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getcap() 465 static int dcbnl_getapp(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getapp() 535 static int dcbnl_setapp(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_setapp() 781 static int dcbnl_setall(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_setall() 1511 struct nlmsghdr *nlh; in dcbnl_notify() 1877 int (*cb)(struct net_device *, struct nlmsghdr *, u32, 1911 static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, in dcb_doit() [all …]
|