Home
last modified time | relevance | path

Searched refs:nlmsg_len (Results 1 – 6 of 6) sorted by relevance

/tools/include/uapi/linux/
Dnetlink.h45 __u32 nlmsg_len; /* Length of message including header */ member
95 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
96 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
98 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
99 (nlh)->nlmsg_len <= (len))
100 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
/tools/lib/bpf/
Dnetlink.c147 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in bpf_set_link_xdp_fd()
157 + NLMSG_ALIGN(req.nh.nlmsg_len)); in bpf_set_link_xdp_fd()
177 req.nh.nlmsg_len += NLA_ALIGN(nla->nla_len); in bpf_set_link_xdp_fd()
179 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in bpf_set_link_xdp_fd()
197 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi)); in __dump_link_nlmsg()
291 .nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)), in libbpf_nl_get_link()
299 if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0) in libbpf_nl_get_link()
314 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*t)); in __dump_class_nlmsg()
329 .nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg)), in libbpf_nl_get_class()
338 if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0) in libbpf_nl_get_class()
[all …]
Dnlattr.c80 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() function
82 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
177 hlen += nlmsg_len(&err->msg); in libbpf_nla_dump_errormsg()
180 alen = (void *)nlh + nlh->nlmsg_len - (void *)attr; in libbpf_nla_dump_errormsg()
/tools/accounting/
Dgetdelays.c130 msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in send_cmd()
141 msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); in send_cmd()
144 buflen = msg.n.nlmsg_len ; in send_cmd()
469 sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len); in main()
/tools/testing/vsock/
Dvsock_diag_test.c184 .nlmsg_len = sizeof(req), in send_req()
298 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) in read_vsock_stat()
313 if (h->nlmsg_len < in read_vsock_stat()
/tools/testing/selftests/net/
Dudpgso.c420 nh->nlmsg_len = off; in set_route_mtu()