Home
last modified time | relevance | path

Searched refs:nlmsghdr (Results 1 – 25 of 186) sorted by relevance

12345678

/openbmc/linux/tools/testing/selftests/bpf/
H A Dnetlink_helpers.h27 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);
41 int addattrstrz(struct nlmsghdr *n, int maxlen, int type, const char *data);
42 int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data, int alen);
[all …]
H A Dnetlink_helpers.c141 static void rtnl_talk_error(struct nlmsghdr *h, struct nlmsgerr *err, in rtnl_talk_error()
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()
264 static int __rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, in __rtnl_talk()
265 struct nlmsghdr **answer, bool show_rtnl_err, in __rtnl_talk()
[all …]
/openbmc/phosphor-networkd/test/
H A Dtest_netlink.cpp29 static_assert(sizeof(buf) < sizeof(nlmsghdr)); in TEST()
33 auto cb = [&](const nlmsghdr&, std::string_view) { cbCalls++; }; in TEST() argument
43 nlmsghdr hdr{}; in TEST()
48 auto cb = [&](const nlmsghdr&, std::string_view) { cbCalls++; }; in TEST() argument
58 nlmsghdr hdr{}; in TEST()
63 auto cb = [&](const nlmsghdr&, std::string_view) { cbCalls++; }; in TEST() argument
73 nlmsghdr hdr{}; in TEST()
79 auto cb = [&](const nlmsghdr&, std::string_view) { cbCalls++; }; in TEST() argument
90 nlmsghdr hdr{}; in TEST()
100 auto cb = [&](const nlmsghdr&, std::string_view) { cbCalls++; }; in TEST() argument
[all …]
/openbmc/linux/tools/net/ynl/lib/
H A Dynl.h11 struct nlmsghdr;
84 struct nlmsghdr *nlh;
194 struct nlmsghdr *
196 struct nlmsghdr *
202 int ynl_cb_null(const struct nlmsghdr *nlh, void *data);
229 int ynl_exec(struct ynl_sock *ys, struct nlmsghdr *req_nlh,
231 int ynl_exec_dump(struct ynl_sock *ys, struct nlmsghdr *req_nlh,
H A Dynl.c139 ynl_ext_ack_check(struct ynl_sock *ys, const struct nlmsghdr *nlh, in ynl_ext_ack_check()
196 off -= sizeof(struct nlmsghdr); in ynl_ext_ack_check()
224 off -= sizeof(struct nlmsghdr); in ynl_ext_ack_check()
256 static int ynl_cb_error(const struct nlmsghdr *nlh, void *data) in ynl_cb_error()
276 static int ynl_cb_done(const struct nlmsghdr *nlh, void *data) in ynl_cb_done()
293 static int ynl_cb_noop(const struct nlmsghdr *nlh, void *data) in ynl_cb_noop()
394 struct nlmsghdr *ynl_msg_start(struct ynl_sock *ys, __u32 id, __u16 flags) in ynl_msg_start()
396 struct nlmsghdr *nlh; in ynl_msg_start()
408 struct nlmsghdr *
413 struct nlmsghdr *nlh; in ynl_gemsg_start()
[all …]
/openbmc/linux/tools/include/uapi/linux/
H A Dnetlink.h44 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;
/openbmc/linux/include/net/
H A Dnetlink.h466 struct nlmsghdr *nlh;
508 int (*cb)(struct sk_buff *, struct nlmsghdr *,
580 static inline void *nlmsg_data(const struct nlmsghdr *nlh) in nlmsg_data()
589 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len()
599 static inline struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh, in nlmsg_attrdata()
611 static inline int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen) in nlmsg_attrlen()
621 static inline int nlmsg_ok(const struct nlmsghdr *nlh, int remaining) in nlmsg_ok()
623 return (remaining >= (int) sizeof(struct nlmsghdr) && in nlmsg_ok()
624 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && in nlmsg_ok()
636 static inline struct nlmsghdr *
[all …]
H A Dgenetlink.h110 const struct nlmsghdr * nlhdr;
341 static inline struct nlmsghdr *genlmsg_nlhdr(void *user_hdr) in genlmsg_nlhdr()
343 return (struct nlmsghdr *)((char *)user_hdr - in genlmsg_nlhdr()
357 static inline int genlmsg_parse_deprecated(const struct nlmsghdr *nlh, in genlmsg_parse_deprecated()
376 static inline int genlmsg_parse(const struct nlmsghdr *nlh, in genlmsg_parse()
524 struct nlmsghdr *nlh = (struct nlmsghdr *)((unsigned char *)gnlh - in genlmsg_len()
/openbmc/linux/include/uapi/linux/
H A Dnetlink.h52 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;
/openbmc/linux/tools/testing/selftests/netfilter/
H A Dnf-queue.c77 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()
/openbmc/linux/tools/testing/selftests/net/mptcp/
H A Dpm_nl_ctl.c53 struct nlmsghdr *nh = (void *)data; in init_genl_req()
69 static int nl_error(struct nlmsghdr *nh) in nl_error()
107 u_int8_t buffer[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + in capture_events()
111 struct nlmsghdr *nh; in capture_events()
124 res_len = NLMSG_ALIGN(sizeof(struct nlmsghdr)) + in capture_events()
136 nh = (struct nlmsghdr *)buffer; in capture_events()
208 static int do_nl_req(int fd, struct nlmsghdr *nh, int len, int max) in do_nl_req()
245 static int genl_parse_getfamily(struct nlmsghdr *nlh, int *pm_family, in genl_parse_getfamily()
316 char data[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + in resolve_mptcp_pm_netlink()
319 struct nlmsghdr *nh; in resolve_mptcp_pm_netlink()
[all …]
/openbmc/linux/include/linux/
H A Dsock_diag.h12 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);
H A Dnetlink.h16 static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) in nlmsg_hdr()
18 return (struct nlmsghdr *)skb->data; in nlmsg_hdr()
223 void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err,
280 const struct nlmsghdr *nlh;
314 struct nlmsghdr *
329 const struct nlmsghdr *nlh,
332 const struct nlmsghdr *nlh, in netlink_dump_start()
H A Drtnetlink.h15 u32 group, const struct nlmsghdr *nlh, gfp_t flags);
22 u32 portid, const struct nlmsghdr *nlh);
29 const struct nlmsghdr *nlh);
31 gfp_t flags, u32 portid, const struct nlmsghdr *nlh);
/openbmc/linux/tools/testing/selftests/net/
H A Dtap.c33 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 …]
/openbmc/linux/include/linux/netfilter/
H A Dnfnetlink.h13 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()
/openbmc/linux/net/xfrm/
H A Dxfrm_compat.c134 static struct nlmsghdr *xfrm_nlmsg_put_compat(struct sk_buff *skb, in xfrm_nlmsg_put_compat()
135 const struct nlmsghdr *nlh_src, u16 type) in xfrm_nlmsg_put_compat()
139 struct nlmsghdr *nlh_dst; in xfrm_nlmsg_put_compat()
289 static int xfrm_xlate64(struct sk_buff *dst, const struct nlmsghdr *nlh_src) in xfrm_xlate64()
293 struct nlmsghdr *nlh_dst; in xfrm_xlate64()
323 static int xfrm_alloc_compat(struct sk_buff *skb, const struct nlmsghdr *nlh_src) in xfrm_alloc_compat()
354 static size_t xfrm_user_rcv_calculate_len64(const struct nlmsghdr *src, in xfrm_user_rcv_calculate_len64()
402 struct nlmsghdr *nlmsg = dst; in xfrm_attr_cpy32()
464 static int xfrm_xlate32(struct nlmsghdr *dst, const struct nlmsghdr *src, in xfrm_xlate32()
583 static struct nlmsghdr *xfrm_user_rcv_msg_compat(const struct nlmsghdr *h32, in xfrm_user_rcv_msg_compat()
[all …]
/openbmc/linux/samples/bpf/
H A Dxdp_router_ipv4_user.c63 struct nlmsghdr *nh; in recv_msg()
73 nh = (struct nlmsghdr *)buf_ptr; in recv_msg()
91 static void read_route(struct nlmsghdr *nh, int nll) in read_route()
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()
316 static void read_arp(struct nlmsghdr *nh, int nll) in read_arp()
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()
[all …]
/openbmc/linux/include/rdma/
H A Drdma_netlink.h16 int (*doit)(struct sk_buff *skb, struct nlmsghdr *nlh,
63 void *ibnl_put_msg(struct sk_buff *skb, struct nlmsghdr **nlh, int seq,
74 int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh,
/openbmc/linux/tools/testing/selftests/connector/
H A Dproc_filter.c21 #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()
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dxfrm_info.c171 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()
/openbmc/linux/tools/net/ynl/generated/
H A Ddevlink-user.c438 int devlink_get_rsp_parse(const struct nlmsghdr *nlh, void *data) in devlink_get_rsp_parse()
503 struct nlmsghdr *nlh; in devlink_get()
550 struct nlmsghdr *nlh; in devlink_get_dump()
588 int devlink_port_get_rsp_parse(const struct nlmsghdr *nlh, void *data) in devlink_port_get_rsp_parse()
637 struct nlmsghdr *nlh; in devlink_port_get()
668 int devlink_port_get_rsp_dump_parse(const struct nlmsghdr *nlh, void *data) in devlink_port_get_rsp_dump_parse()
731 struct nlmsghdr *nlh; in devlink_port_get_dump()
775 int devlink_sb_get_rsp_parse(const struct nlmsghdr *nlh, void *data) in devlink_sb_get_rsp_parse()
824 struct nlmsghdr *nlh; in devlink_sb_get()
873 struct nlmsghdr *nlh; in devlink_sb_get_dump()
[all …]
H A Dethtool-user.c675 int ethtool_header_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_header_put()
732 int ethtool_pause_stat_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_pause_stat_put()
783 int ethtool_fec_stat_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_fec_stat_put()
957 int ethtool_bitset_bit_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_bitset_bit_put()
1043 int ethtool_string_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_string_put()
1140 int ethtool_bitset_bits_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_bitset_bits_put()
1202 int ethtool_strings_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_strings_put()
1260 int ethtool_bitset_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_bitset_put()
1322 int ethtool_stringset_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_stringset_put()
1462 int ethtool_stringsets_put(struct nlmsghdr *nlh, unsigned int attr_type, in ethtool_stringsets_put()
[all …]
/openbmc/linux/net/dcb/
H A Ddcbnl.c217 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()
252 static int dcbnl_getpfccfg(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getpfccfg()
297 static int dcbnl_getperm_hwaddr(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getperm_hwaddr()
311 static int dcbnl_getcap(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getcap()
356 static int dcbnl_getnumtcs(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getnumtcs()
403 static int dcbnl_setnumtcs(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_setnumtcs()
437 static int dcbnl_getpfcstate(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getpfcstate()
447 static int dcbnl_setpfcstate(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_setpfcstate()
[all …]
/openbmc/linux/samples/connector/
H A Ducon.c48 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()

12345678