Home
last modified time | relevance | path

Searched refs:nlh (Results 1 - 15 of 15) sorted by relevance

/third_party/musl/src/network/
H A Dnetlink.h79 #define NLMSG_DATA(nlh) ((void*)((char*)(nlh)+sizeof(struct nlmsghdr)))
80 #define NLMSG_DATALEN(nlh) ((nlh)->nlmsg_len-sizeof(struct nlmsghdr))
81 #define NLMSG_DATAEND(nlh) ((char*)(nlh)+(nlh)->nlmsg_len)
82 #define NLMSG_NEXT(nlh) (struct nlmsghdr*)((char*)(nlh)+NETLINK_ALIGN((nlh)
[all...]
H A Dnetlink.c14 struct nlmsghdr nlh; in __netlink_enumerate() member
22 u.req.nlh.nlmsg_len = sizeof(u.req); in __netlink_enumerate()
23 u.req.nlh.nlmsg_type = type; in __netlink_enumerate()
24 u.req.nlh.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST; in __netlink_enumerate()
25 u.req.nlh.nlmsg_seq = seq; in __netlink_enumerate()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/drivers/
H A Dpriv_netlink.h53 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \
58 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
59 (int) (nlh)->nlmsg_len <= (len))
60 #define NLMSG_PAYLOAD(nlh,le
[all...]
H A Ddriver_nl80211.c332 struct nlmsghdr *nlh = (struct nlmsghdr *) err - 1; in error_handler() local
333 int len = nlh->nlmsg_len; in error_handler()
337 int ack_len = sizeof(*nlh) + sizeof(int) + sizeof(*nlh); in error_handler()
341 if (!(nlh->nlmsg_flags & NLM_F_ACK_TLVS)) in error_handler()
344 if (!(nlh->nlmsg_flags & NLM_F_CAPPED)) in error_handler()
345 ack_len += err->msg.nlmsg_len - sizeof(*nlh); in error_handler()
350 attrs = (void *) ((unsigned char *) nlh + ack_len); in error_handler()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/drivers/
H A Dpriv_netlink.h53 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \
58 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
59 (int) (nlh)->nlmsg_len <= (len))
60 #define NLMSG_PAYLOAD(nlh,le
[all...]
H A Ddriver_nl80211.c350 struct nlmsghdr *nlh = (struct nlmsghdr *) err - 1; in error_handler() local
351 int len = nlh->nlmsg_len; in error_handler()
355 int ack_len = sizeof(*nlh) + sizeof(int) + sizeof(*nlh); in error_handler()
359 if (!(nlh->nlmsg_flags & NLM_F_ACK_TLVS)) in error_handler()
362 if (!(nlh->nlmsg_flags & NLM_F_CAPPED)) in error_handler()
363 ack_len += err->msg.nlmsg_len - sizeof(*nlh); in error_handler()
368 attrs = (void *) ((unsigned char *) nlh + ack_len); in error_handler()
/third_party/libbpf/include/uapi/linux/
H A Dnetlink.h94 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
95 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
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) && \
99 (nlh)->nlmsg_len <= (len))
100 #define NLMSG_PAYLOAD(nlh,le
[all...]
/third_party/ltp/testcases/network/stress/route/
H A Droute-change-netlink.c195 struct nlmsghdr *nlh; in rtnl_route() local
202 nlh = mnl_nlmsg_put_header(buf); in rtnl_route()
203 nlh->nlmsg_type = type; in rtnl_route()
205 nlh->nlmsg_flags = NLM_F_ACK; in rtnl_route()
207 nlh->nlmsg_flags |= NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE; in rtnl_route()
209 nlh->nlmsg_seq = seq = time(NULL); in rtnl_route()
211 rtm = mnl_nlmsg_put_extra_header(nlh, sizeof(struct rtmsg)); in rtnl_route()
224 mnl_attr_put(nlh, RTA_DST, sizeof(struct in6_addr), &dst_in6); in rtnl_route()
227 mnl_attr_put_u32(nlh, RTA_DST, dst_ip); in rtnl_route()
230 mnl_attr_put_u32(nlh, RTA_OI in rtnl_route()
[all...]
/third_party/libbpf/src/
H A Dnlattr.c81 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() argument
83 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
158 int libbpf_nla_dump_errormsg(struct nlmsghdr *nlh) in libbpf_nla_dump_errormsg() argument
170 if (!(nlh->nlmsg_flags & NLM_F_ACK_TLVS)) in libbpf_nla_dump_errormsg()
173 err = (struct nlmsgerr *)NLMSG_DATA(nlh); in libbpf_nla_dump_errormsg()
177 if (!(nlh->nlmsg_flags & NLM_F_CAPPED)) in libbpf_nla_dump_errormsg()
181 alen = (void *)nlh + nlh->nlmsg_len - (void *)attr; in libbpf_nla_dump_errormsg()
H A Dnlattr.h129 int libbpf_nla_dump_errormsg(struct nlmsghdr *nlh);
H A Dnetlink.c344 static int __dump_link_nlmsg(struct nlmsghdr *nlh, in __dump_link_nlmsg() argument
348 struct ifinfomsg *ifi = NLMSG_DATA(nlh); in __dump_link_nlmsg()
351 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi)); in __dump_link_nlmsg()
/third_party/selinux/libselinux/src/
H A Davc_internal.c148 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; in avc_netlink_receive() local
191 if (nlh->nlmsg_flags & MSG_TRUNC || nlh->nlmsg_len > (unsigned)rc) { in avc_netlink_receive()
204 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; in avc_netlink_process() local
206 switch (nlh->nlmsg_type) { in avc_netlink_process()
208 struct nlmsgerr *err = NLMSG_DATA(nlh); in avc_netlink_process()
221 struct selnl_msg_setenforce *msg = NLMSG_DATA(nlh); in avc_netlink_process()
229 struct selnl_msg_policyload *msg = NLMSG_DATA(nlh); in avc_netlink_process()
239 avc_prefix, nlh->nlmsg_type); in avc_netlink_process()
/third_party/ltp/testcases/kernel/containers/netns/
H A Dnetns_netlink.c48 struct nlmsghdr *nlh; in child_func() local
67 nlh = (struct nlmsghdr *) buffer; in child_func()
69 len = recv(fd, nlh, sizeof(buffer), MSG_DONTWAIT); in child_func()
72 if (nlh->nlmsg_type == RTM_NEWLINK || in child_func()
73 nlh->nlmsg_type == RTM_DELLINK) { in child_func()
/third_party/eudev/src/libudev/
H A Dlibudev-monitor.c550 struct udev_monitor_netlink_header nlh; in udev_monitor_receive_device() member
611 if (buf.nlh.magic != htonl(UDEV_MONITOR_MAGIC)) { in udev_monitor_receive_device()
613 buf.nlh.magic, htonl(UDEV_MONITOR_MAGIC)); in udev_monitor_receive_device()
616 if (buf.nlh.properties_off+32 > (size_t)buflen) { in udev_monitor_receive_device()
618 buf.nlh.properties_off+32, buflen); in udev_monitor_receive_device()
622 bufpos = buf.nlh.properties_off; in udev_monitor_receive_device()
674 struct udev_monitor_netlink_header nlh = { in udev_monitor_send_device() local
677 .header_size = sizeof nlh, in udev_monitor_send_device()
680 { .iov_base = &nlh, .iov_len = sizeof nlh }, in udev_monitor_send_device()
[all...]
/third_party/toybox/toys/pending/
H A Dip.c165 struct nlmsghdr nlh; in send_nlmesg() member
171 req.nlh.nlmsg_len = sizeof(req); in send_nlmesg()
172 req.nlh.nlmsg_type = type; in send_nlmesg()
173 req.nlh.nlmsg_flags = flags; in send_nlmesg()

Completed in 37 milliseconds