/third_party/libnl/lib/ |
D | msg.c | 114 return (unsigned char *) nlh + NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_tail() 125 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_datalen() 128 static int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() function 158 return max_t(int, nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen), 0); in nlmsg_attrlen() 170 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) in nlmsg_valid_hdr() 184 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && in nlmsg_ok() 185 nlh->nlmsg_len <= remaining); in nlmsg_ok() 198 int totlen = NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_next() 282 nm->nm_nlh->nlmsg_len = nlmsg_total_size(0); in __nlmsg_alloc() 390 nm = __nlmsg_alloc(NLMSG_ALIGN(hdr->nlmsg_len)); in nlmsg_convert() [all …]
|
D | attr.c | 465 tlen = NLMSG_ALIGN(msg->nm_nlh->nlmsg_len) + nla_total_size(attrlen); in nla_reserve() 476 msg->nm_nlh->nlmsg_len = tlen; in nla_reserve() 482 msg->nm_nlh->nlmsg_len); in nla_reserve() 936 pad = NLMSG_ALIGN(msg->nm_nlh->nlmsg_len) - msg->nm_nlh->nlmsg_len; in _nest_end() 1003 msg->nm_nlh->nlmsg_len -= len; in nla_nest_cancel()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/drivers/ |
D | priv_netlink.h | 54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 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))) 86 u32 nlmsg_len; member
|
D | netlink.c | 183 req.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in netlink_send_oper_ifla() 197 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)), in netlink_send_oper_ifla() 202 req.hdr.nlmsg_len += RTA_SPACE(sizeof(char)); in netlink_send_oper_ifla() 206 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)), in netlink_send_oper_ifla() 211 req.hdr.nlmsg_len += RTA_SPACE(sizeof(char)); in netlink_send_oper_ifla() 218 ret = send(netlink->sock, &req, req.hdr.nlmsg_len, 0); in netlink_send_oper_ifla()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/drivers/ |
D | priv_netlink.h | 54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 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))) 86 u32 nlmsg_len; member
|
D | netlink.c | 183 req.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in netlink_send_oper_ifla() 197 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)), in netlink_send_oper_ifla() 202 req.hdr.nlmsg_len += RTA_SPACE(sizeof(char)); in netlink_send_oper_ifla() 206 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)), in netlink_send_oper_ifla() 211 req.hdr.nlmsg_len += RTA_SPACE(sizeof(char)); in netlink_send_oper_ifla() 218 ret = send(netlink->sock, &req, req.hdr.nlmsg_len, 0); in netlink_send_oper_ifla()
|
/third_party/libnl/include/linux-private/linux/ |
D | netlink.h | 45 __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)))
|
/third_party/ltp/testcases/kernel/containers/share/ |
D | ns_ifmove.c | 104 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in main() 111 NLMSG_ALIGN(req.nh.nlmsg_len)); in main() 114 req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + in main() 118 if (send(rtnetlink_socket, &req, req.nh.nlmsg_len, 0) == -1) { in main()
|
/third_party/musl/src/network/ |
D | netlink.h | 8 uint32_t nlmsg_len; member 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)->nlmsg_len))
|
D | netlink.c | 22 u.req.nlh.nlmsg_len = sizeof(u.req); in __netlink_enumerate()
|
/third_party/ltp/testcases/cve/ |
D | cve-2017-16939.c | 58 p->msg.nlmsg_len = 0x10; in setup() 70 SAFE_SENDTO(1, fd, (void *) &p->msg, p->msg.nlmsg_len, 0, in run()
|
/third_party/ltp/include/ |
D | tst_netlink.h | 31 {(void *)payload, nh->nlmsg_len - sizeof(*nh)} in safe_netlink_send() 40 return safe_sendmsg(file, lineno, nh->nlmsg_len, fd, &msg, 0); in safe_netlink_send()
|
/third_party/ltp/lib/ |
D | tst_rtnetlink.c | 260 size = NLMSG_ALIGN(ctx->curmsg->nlmsg_len); in tst_rtnl_add_message() 269 ctx->curmsg->nlmsg_len = NLMSG_LENGTH(payload_size); in tst_rtnl_add_message() 277 ctx->datalen += ctx->curmsg->nlmsg_len; in tst_rtnl_add_message() 298 size = NLMSG_ALIGN(ctx->curmsg->nlmsg_len); in tst_rtnl_add_attr() 303 ctx->curmsg->nlmsg_len = size + attr->rta_len; in tst_rtnl_add_attr()
|
D | tst_crypto.c | 72 .nlmsg_len = sizeof(struct nlmsghdr) + sizeof(*alg), in tst_crypto_add_alg() 90 .nlmsg_len = sizeof(struct nlmsghdr) + sizeof(*alg), in tst_crypto_del_alg()
|
/third_party/iptables/libipq/ |
D | libipq.c | 186 if (nlh->nlmsg_flags & MSG_TRUNC || nlh->nlmsg_len > status) { in ipq_netlink_recvfrom() 277 req.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(req)); in ipq_set_mode() 283 return ipq_netlink_sendto(h, (void *)&req, req.nlh.nlmsg_len); in ipq_set_mode() 353 nlh.nlmsg_len = tlen; in ipq_set_verdict()
|
/third_party/toybox/toys/pending/ |
D | ip.c | 170 req.nlh.nlmsg_len = sizeof(req); in send_nlmesg() 482 if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) return; in add_string_to_rtattr() 483 rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); in add_string_to_rtattr() 487 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len; in add_string_to_rtattr() 497 ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len))) 627 request.mhdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in linkupdate() 677 send_nlmesg(0, 0, 0, (void *)&request, request.mhdr.nlmsg_len); in linkupdate() 855 int len = h->nlmsg_len - NLMSG_LENGTH(sizeof(*iface)); in get_link_info() 968 request.mhdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in link_show() 1006 if ((len = h->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa))) < 0) { in print_addrinfo() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/ |
D | vlan_full.c | 639 int attrlen, nlmsg_len, rta_len; in vlan_read_ifnames() local 648 nlmsg_len = NLMSG_ALIGN(sizeof(struct ifinfomsg)); in vlan_read_ifnames() 650 attrlen = h->nlmsg_len - nlmsg_len; in vlan_read_ifnames() 654 attr = (struct rtattr *) (((char *) ifi) + nlmsg_len); in vlan_read_ifnames() 720 len = h->nlmsg_len; in vlan_event_receive()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/ |
D | vlan_full.c | 639 int attrlen, nlmsg_len, rta_len; in vlan_read_ifnames() local 648 nlmsg_len = NLMSG_ALIGN(sizeof(struct ifinfomsg)); in vlan_read_ifnames() 650 attrlen = h->nlmsg_len - nlmsg_len; in vlan_read_ifnames() 654 attr = (struct rtattr *) (((char *) ifi) + nlmsg_len); in vlan_read_ifnames() 720 len = h->nlmsg_len; in vlan_event_receive()
|
/third_party/ltp/testcases/lib/ |
D | tst_net_iface_prefix.c | 61 msg.nlhdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); in read_iface_prefix() 66 SAFE_SEND(1, sock, &msg, msg.nlhdr.nlmsg_len, 0); in read_iface_prefix()
|
/third_party/ltp/testcases/kernel/controllers/cgroup/ |
D | cgroup_regression_getdelays.c | 133 msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in send_cmd() 144 msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); in send_cmd() 147 buflen = msg.n.nlmsg_len; in send_cmd() 431 sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len); in main()
|
/third_party/libnl/include/netlink/ |
D | netlink-kernel.h | 43 uint32_t nlmsg_len;
|
/third_party/libwebsockets/lib/roles/netlink/ |
D | ops-netlink.c | 137 len = (unsigned int)(h->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi))); in rops_handle_POLLIN_netlink() 560 req.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(req.gen)); in rops_pt_init_destroy_netlink() 569 iov.iov_len = req.hdr.nlmsg_len; in rops_pt_init_destroy_netlink()
|
/third_party/libnl/lib/netfilter/ |
D | queue_msg.c | 266 iov[0].iov_len = nlmsg_hdr(nlmsg)->nlmsg_len; in nfnl_queue_msg_send_verdict_payload() 270 nlmsg_hdr(nlmsg)->nlmsg_len += nla.nla_len; in nfnl_queue_msg_send_verdict_payload()
|
/third_party/ltp/testcases/kernel/connectors/pec/ |
D | pec_listener.c | 93 nlhdr->nlmsg_len = NLMSG_LENGTH(sizeof(*cnmsg) + cnmsg->len); in netlink_send() 99 iov.iov_len = nlhdr->nlmsg_len; in netlink_send()
|
/third_party/libnl/lib/genl/ |
D | genl.c | 231 return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN); in genlmsg_len()
|