Home
last modified time | relevance | path

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

123

/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/
Dnetlink.h42 __u32 nlmsg_len; member
71 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
72 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
74 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
75 (nlh)->nlmsg_len <= (len))
76 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
/kernel/linux/linux-5.10/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)))
/kernel/linux/linux-5.10/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)))
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/
Dnetlink.h55 __u32 nlmsg_len; member
84 …h,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr *) (((char *) (nlh)) + NLMSG_ALIG…
85 …len) >= (int) sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlm…
86 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
/kernel/linux/linux-5.10/drivers/scsi/
Dscsi_netlink.c43 if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) || in scsi_nl_rcv_msg()
44 (skb->len < nlh->nlmsg_len)) { in scsi_nl_rcv_msg()
50 rlen = NLMSG_ALIGN(nlh->nlmsg_len); in scsi_nl_rcv_msg()
71 if (nlh->nlmsg_len < (sizeof(*nlh) + hdr->msglen)) { in scsi_nl_rcv_msg()
/kernel/linux/linux-5.10/drivers/staging/gdm724x/
Dnetlink_k.c23 #define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len - ND_IFINDEX_LEN)
49 if (skb->len < nlh->nlmsg_len || nlh->nlmsg_len > ND_MAX_MSG_LEN) { in netlink_rcv_cb()
51 skb->len, nlh->nlmsg_len); in netlink_rcv_cb()
/kernel/linux/linux-5.10/tools/bpf/bpftool/
Dnet.c205 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*t)); in __dump_class_nlmsg()
220 .nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg)), in netlink_get_class()
229 if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0) in netlink_get_class()
244 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*t)); in __dump_qdisc_nlmsg()
259 .nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg)), in netlink_get_qdisc()
268 if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0) in netlink_get_qdisc()
283 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*t)); in __dump_filter_nlmsg()
298 .nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg)), in netlink_get_filter()
308 if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0) in netlink_get_filter()
322 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi)); in __dump_link_nlmsg()
[all …]
/kernel/linux/linux-5.10/tools/lib/bpf/
Dnlattr.c81 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() function
83 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
178 hlen += nlmsg_len(&err->msg); in libbpf_nla_dump_errormsg()
181 alen = nlh->nlmsg_len - hlen; in libbpf_nla_dump_errormsg()
Dnetlink.c151 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in __bpf_set_link_xdp_fd_replace()
161 + NLMSG_ALIGN(req.nh.nlmsg_len)); in __bpf_set_link_xdp_fd_replace()
189 req.nh.nlmsg_len += NLA_ALIGN(nla->nla_len); in __bpf_set_link_xdp_fd_replace()
191 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in __bpf_set_link_xdp_fd_replace()
232 len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi)); in __dump_link_nlmsg()
359 .nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)), in libbpf_nl_get_link()
367 if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0) in libbpf_nl_get_link()
/kernel/linux/linux-5.10/net/netfilter/
Dnfnetlink.c191 if (nlmsg_len(nlh) < sizeof(struct nfgenmsg)) in nfnetlink_rcv_msg()
223 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_msg()
393 if (nlh->nlmsg_len < NLMSG_HDRLEN || in nfnetlink_rcv_batch()
394 skb->len < nlh->nlmsg_len || in nfnetlink_rcv_batch()
395 nlmsg_len(nlh) < sizeof(struct nfgenmsg)) { in nfnetlink_rcv_batch()
440 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_batch()
495 msglen = NLMSG_ALIGN(nlh->nlmsg_len); in nfnetlink_rcv_batch()
550 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_skb_batch()
556 msglen = NLMSG_ALIGN(nlh->nlmsg_len); in nfnetlink_rcv_skb_batch()
588 nlh->nlmsg_len < NLMSG_HDRLEN || in nfnetlink_rcv()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/net/
Dipsec.c174 return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len)); in rtattr_hdr()
182 size_t nl_size = RTA_ALIGN(nh->nlmsg_len) + RTA_LENGTH(size); in rtattr_pack()
188 nh->nlmsg_len = nl_size; in rtattr_pack()
216 char *nlmsg_end = (char *)nh + nh->nlmsg_len; in rtattr_end()
282 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info)); in veth_add()
312 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in veth_add()
330 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info)); in ip4_addr_set()
354 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in ip4_addr_set()
370 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info)); in link_set_up()
380 if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) { in link_set_up()
[all …]
/kernel/linux/linux-5.10/net/decnet/netfilter/
Ddn_rtmsg.c58 nlh->nlmsg_len = skb->tail - old_tail; in dnrmg_build_message()
104 nlh->nlmsg_len < sizeof(*nlh) || in dnrmg_receive_user_skb()
105 skb->len < nlh->nlmsg_len) in dnrmg_receive_user_skb()
/kernel/linux/linux-5.10/tools/testing/selftests/net/mptcp/
Dpm_nl_ctl.c45 nh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in init_genl_req()
58 int len = nh->nlmsg_len - sizeof(*nh); in nl_error()
94 nh->nlmsg_len = len; in do_nl_req()
121 int len = nlh->nlmsg_len; in genl_parse_getfamily()
126 nlh->nlmsg_len, nlh->nlmsg_type); in genl_parse_getfamily()
403 int len = nh->nlmsg_len; in print_addrs()
481 nh->nlmsg_len = off; in dump_addrs()
510 int len = nh->nlmsg_len; in print_limits()
/kernel/linux/linux-5.10/drivers/connector/
Dconnector.c142 if (nlh->nlmsg_len < NLMSG_HDRLEN + sizeof(struct cn_msg) + msg->len) in cn_call_callback()
177 len = nlmsg_len(nlh); in cn_rx_skb()
180 skb->len < nlh->nlmsg_len || in cn_rx_skb()
/kernel/linux/linux-5.10/include/net/
Dnetlink.h577 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() function
579 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
601 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen); in nlmsg_attrlen()
612 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && in nlmsg_ok()
613 nlh->nlmsg_len <= remaining); in nlmsg_ok()
627 int totlen = NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_next()
728 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) { in __nlmsg_parse()
870 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) in nlmsg_validate_deprecated()
967 nlh->nlmsg_len = skb_tail_pointer(skb) - (unsigned char *)nlh; in nlmsg_end()
Drtnetlink.h25 if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg)) in rtnl_msg_family()
/kernel/linux/linux-5.10/drivers/infiniband/core/
Dnetlink.c221 if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len) in rdma_nl_rcv_skb()
248 msglen = NLMSG_ALIGN(nlh->nlmsg_len); in rdma_nl_rcv_skb()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/tools/testing/selftests/netfilter/
Dnf-queue.c230 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { in open_queue()
242 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { in open_queue()
317 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { in mainloop()
/kernel/linux/linux-5.10/tools/testing/vsock/
Dvsock_diag_test.c174 .nlmsg_len = sizeof(req), in send_req()
288 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) in read_vsock_stat()
303 if (h->nlmsg_len < in read_vsock_stat()
/kernel/linux/linux-5.10/net/xfrm/
Dxfrm_compat.c357 size_t len = nlmsg_len(src); in xfrm_user_rcv_calculate_len64()
419 nlmsg->nlmsg_len += nla->nla_len; in xfrm_attr_cpy32()
471 dst->nlmsg_len = NLMSG_HDRLEN + xfrm_msg_min[type]; in xfrm_xlate32()
543 pos = dst->nlmsg_len; in xfrm_xlate32()
610 if (len == nlmsg_len(h32)) in xfrm_user_rcv_msg_compat()
/kernel/linux/linux-5.10/net/tipc/
Ddiag.c82 if (nlmsg_len(h) < hdrlen) in tipc_sock_diag_handler_dump()
/kernel/linux/linux-5.10/security/selinux/
Dnetlink.c85 nlh->nlmsg_len = skb->tail - tmp; in selnl_notify()
/kernel/linux/linux-5.10/samples/bpf/
Dxdp_router_ipv4_user.c341 req.nl.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg)); in get_route_table()
351 iov.iov_len = req.nl.nlmsg_len; in get_route_table()
480 req.nl.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg)); in get_arp_table()
489 iov.iov_len = req.nl.nlmsg_len; in get_arp_table()
/kernel/linux/linux-5.10/net/vmw_vsock/
Ddiag.c146 if (nlmsg_len(h) < hdrlen) in vsock_diag_handler_dump()

123