Home
last modified time | relevance | path

Searched refs:nlh (Results 1 – 18 of 18) sorted by relevance

/third_party/musl/src/network/
Dnetlink.h79 #define NLMSG_DATA(nlh) ((void*)((char*)(nlh)+sizeof(struct nlmsghdr))) argument
80 #define NLMSG_DATALEN(nlh) ((nlh)->nlmsg_len-sizeof(struct nlmsghdr)) argument
81 #define NLMSG_DATAEND(nlh) ((char*)(nlh)+(nlh)->nlmsg_len) argument
82 #define NLMSG_NEXT(nlh) (struct nlmsghdr*)((char*)(nlh)+NETLINK_ALIGN((nlh)->nlmsg_len)) argument
83 #define NLMSG_OK(nlh,end) ((char*)(end)-(char*)(nlh) >= sizeof(struct nlmsghdr)) argument
89 #define RTA_OK(nlh,end) ((char*)(end)-(char*)(rta) >= sizeof(struct rtattr)) argument
91 #define NLMSG_RTA(nlh,len) ((void*)((char*)(nlh)+sizeof(struct nlmsghdr)+NETLINK_ALIGN(len))) argument
92 #define NLMSG_RTAOK(rta,nlh) RTA_OK(rta,NLMSG_DATAEND(nlh)) argument
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/
Dpriv_netlink.h53 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0))) argument
54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument
56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \ argument
58 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
59 (int) (nlh)->nlmsg_len <= (len))
60 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument
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/
Dpriv_netlink.h53 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0))) argument
54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument
56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \ argument
58 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
59 (int) (nlh)->nlmsg_len <= (len))
60 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument
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/libbpf/include/uapi/linux/
Dnetlink.h94 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) argument
95 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument
96 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
97 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ argument
98 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
99 (nlh)->nlmsg_len <= (len))
100 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument
/third_party/ltp/testcases/network/stress/route/
Droute-change-netlink.c197 struct nlmsghdr *nlh; in rtnl_route() local
204 nlh = mnl_nlmsg_put_header(buf); in rtnl_route()
205 nlh->nlmsg_type = type; in rtnl_route()
207 nlh->nlmsg_flags = NLM_F_ACK; in rtnl_route()
209 nlh->nlmsg_flags |= NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE; in rtnl_route()
211 nlh->nlmsg_seq = seq = time(NULL); in rtnl_route()
213 rtm = mnl_nlmsg_put_extra_header(nlh, sizeof(struct rtmsg)); in rtnl_route()
226 mnl_attr_put(nlh, RTA_DST, sizeof(struct in6_addr), &dst_in6); in rtnl_route()
229 mnl_attr_put_u32(nlh, RTA_DST, dst_ip); in rtnl_route()
232 mnl_attr_put_u32(nlh, RTA_OIF, iface); in rtnl_route()
[all …]
/third_party/selinux/libselinux/src/
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/libbpf/src/
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 = nlh->nlmsg_len - hlen; in libbpf_nla_dump_errormsg()
Dnlattr.h117 int libbpf_nla_dump_errormsg(struct nlmsghdr *nlh);
Dnetlink.c299 static int __dump_link_nlmsg(struct nlmsghdr *nlh, in __dump_link_nlmsg() argument
303 struct ifinfomsg *ifi = NLMSG_DATA(nlh); in __dump_link_nlmsg()
306 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi)); in __dump_link_nlmsg()
/third_party/ltp/testcases/kernel/containers/netns/
Dnetns_netlink.c49 struct nlmsghdr *nlh; in child_func() local
68 nlh = (struct nlmsghdr *) buffer; in child_func()
70 len = recv(fd, nlh, sizeof(buffer), MSG_DONTWAIT); in child_func()
73 if (nlh->nlmsg_type == RTM_NEWLINK || in child_func()
74 nlh->nlmsg_type == RTM_DELLINK) { in child_func()
/third_party/toybox/toys/pending/
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()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/SystemZ/
DSystemZInstrFormats.td1827 def CondVariantNLH : CondVariant<9, "nlh", 0>;
1853 def IntCondVariantNLH : CondVariant<8, "nlh", 1>;
/third_party/libbpf/.github/actions/build-selftests/
Dvmlinux.h13789 const struct nlmsghdr *nlh; member
14660 struct nlmsghdr *nlh; member
82996 struct nlmsghdr *nlh; member
84260 const struct nlmsghdr *nlh; member
84303 struct nlmsghdr *nlh; member
/third_party/libabigail/tests/data/test-diff-filter/
Dtest-PR27569-v1.abi26104 …<var-decl name="nlh" type-id="390fbe8f" visibility="default" filepath="include/linux/netlink.h" li…
Dtest-PR27569-v0.abi26076 …<var-decl name="nlh" type-id="390fbe8f" visibility="default" filepath="include/linux/netlink.h" li…