Searched refs:nlmsg_len (Results 1 - 25 of 66) sorted by relevance

123

/external/libnl/include/linux/
H A Dnetlink.h40 __u32 nlmsg_len; /* Length of message including header */ member in struct:nlmsghdr
81 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
82 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
84 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
85 (nlh)->nlmsg_len <= (len))
86 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
/external/wpa_supplicant_8/hostapd/src/drivers/
H A Dpriv_netlink.h54 #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)))
85 u32 nlmsg_len; member in struct:nlmsghdr
H A Dnetlink.c183 req.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
197 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)),
202 req.hdr.nlmsg_len = NLMSG_ALIGN(req.hdr.nlmsg_len) +
207 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)),
212 req.hdr.nlmsg_len = NLMSG_ALIGN(req.hdr.nlmsg_len) +
220 ret = send(netlink->sock, &req, req.hdr.nlmsg_len, 0);
/external/wpa_supplicant_8/src/drivers/
H A Dpriv_netlink.h54 #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)))
85 u32 nlmsg_len; member in struct:nlmsghdr
H A Dnetlink.c183 req.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
197 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)),
202 req.hdr.nlmsg_len = NLMSG_ALIGN(req.hdr.nlmsg_len) +
207 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)),
212 req.hdr.nlmsg_len = NLMSG_ALIGN(req.hdr.nlmsg_len) +
220 ret = send(netlink->sock, &req, req.hdr.nlmsg_len, 0);
/external/wpa_supplicant_8/wpa_supplicant/src/drivers/
H A Dpriv_netlink.h54 #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)))
85 u32 nlmsg_len; member in struct:nlmsghdr
H A Dnetlink.c183 req.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
197 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)),
202 req.hdr.nlmsg_len = NLMSG_ALIGN(req.hdr.nlmsg_len) +
207 ((char *) &req + NLMSG_ALIGN(req.hdr.nlmsg_len)),
212 req.hdr.nlmsg_len = NLMSG_ALIGN(req.hdr.nlmsg_len) +
220 ret = send(netlink->sock, &req, req.hdr.nlmsg_len, 0);
/external/iproute2/include/linux/
H A Dnetlink.h42 __u32 nlmsg_len; /* Length of message including header */ member in struct:nlmsghdr
84 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
85 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
87 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
88 (nlh)->nlmsg_len <= (len))
89 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
/external/kernel-headers/original/uapi/linux/
H A Dnetlink.h43 __u32 nlmsg_len; /* Length of message including header */ member in struct:nlmsghdr
85 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
86 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
88 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
89 (nlh)->nlmsg_len <= (len))
90 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
/external/libnl/lib/
H A Dmsg.c71 * <---------------------- nlmsg_len(nlh) --------------------->
225 return (unsigned char *) nlh + NLMSG_ALIGN(nlh->nlmsg_len);
232 int nlmsg_len(const struct nlmsghdr *nlh) function
234 return nlh->nlmsg_len - NLMSG_HDRLEN;
262 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen);
274 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
288 nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&
289 nlh->nlmsg_len <= remaining);
302 int totlen = NLMSG_ALIGN(nlh->nlmsg_len);
385 nm->nm_nlh->nlmsg_len
518 size_t nlmsg_len = n->nm_nlh->nlmsg_len; local
[all...]
H A Dattr.c803 tlen = NLMSG_ALIGN(msg->nm_nlh->nlmsg_len) + nla_total_size(attrlen);
805 if ((tlen + msg->nm_nlh->nlmsg_len) > msg->nm_size)
813 msg->nm_nlh->nlmsg_len = tlen;
816 "nlmsg_len=%d\n", msg, attrlen,
818 attrtype, msg->nm_nlh->nlmsg_len);
1110 return nla_put(msg, attrtype, nlmsg_len(nested->nm_nlh),
/external/iproute2/lib/
H A Dlibnetlink.c103 req.nlh.nlmsg_len = sizeof(req);
144 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr)))
170 nlh.nlmsg_len = NLMSG_LENGTH(len);
233 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) {
286 .iov_len = n->nlmsg_len
337 int len = h->nlmsg_len;
366 memcpy(answer, h, h->nlmsg_len);
374 memcpy(answer, h, h->nlmsg_len);
439 int len = h->nlmsg_len;
497 len = h->nlmsg_len;
[all...]
/external/iproute2/ip/
H A Dlink_veth.c43 hdr->nlmsg_len += sizeof(struct ifinfomsg);
H A Dipprefix.c40 int len = n->nlmsg_len;
46 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
H A Drtmon.c41 n1->nlmsg_len = NLMSG_LENGTH(4*2);
45 fwrite((void*)n1, 1, NLMSG_ALIGN(n1->nlmsg_len), fp);
54 fwrite((void*)n, 1, NLMSG_ALIGN(n->nlmsg_len), fp);
H A Dipneigh.c110 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg));
188 int len = n->nlmsg_len;
194 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
217 parse_rtattr(tb, NDA_MAX, NDA_RTA(r), n->nlmsg_len - NLMSG_LENGTH(sizeof(*r)));
237 if (NLMSG_ALIGN(filter.flushp) + n->nlmsg_len > filter.flushe) {
242 memcpy(fn, n, n->nlmsg_len);
246 filter.flushp = (((char*)fn) + n->nlmsg_len) - filter.flushb;
/external/libnl/include/netlink/
H A Dnetlink-kernel.h32 uint32_t nlmsg_len; member in struct:nlmsghdr
H A Dmsg.h54 extern int nlmsg_len(const struct nlmsghdr *);
/external/iproute2/tc/
H A Df_cgroup.c43 tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
79 tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail;
H A Df_basic.c59 tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
105 tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail;
H A Dtc_monitor.c62 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
/external/libpcap/
H A Dpcap-netfilter-linux.c114 if (nlh->nlmsg_len < sizeof(struct nlmsghdr) || len < nlh->nlmsg_len) {
115 snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Message truncated: (got: %d) (nlmsg_len: %u)", len, nlh->nlmsg_len);
137 if (nlh->nlmsg_len < HDR_LENGTH) {
138 snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Malformed message: (nlmsg_len: %u)", nlh->nlmsg_len);
143 if (nlh->nlmsg_len > HDR_LENGTH) {
145 int attr_len = nlh->nlmsg_len - NLMSG_ALIGN(HDR_LENGTH);
180 pkth.caplen = pkth.len = nlh->nlmsg_len
[all...]
/external/dhcpcd/
H A Dif-linux.c216 l = nlm->nlmsg_len - sizeof(*nlm);
240 len = nlm->nlmsg_len - sizeof(*nlm);
302 len = nlm->nlmsg_len - sizeof(*nlm);
356 len = nlm->nlmsg_len - sizeof(*nlm);
417 iov.iov_len = hdr->nlmsg_len;
435 ((struct rtattr *)(((ptrdiff_t)(nmsg))+NLMSG_ALIGN((nmsg)->nlmsg_len)))
444 if (NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) {
453 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len);
464 if (NLMSG_ALIGN(n->nlmsg_len)
[all...]
/external/iproute2/genl/
H A Dctrl.c56 nlh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
78 int len = nlh->nlmsg_len;
82 fprintf(stderr, "Not a controller message, nlmsg_len=%d "
83 "nlmsg_type=0x%x\n", nlh->nlmsg_len, nlh->nlmsg_type);
185 int len = n->nlmsg_len;
191 fprintf(stderr, "Not a controller message, nlmsg_len=%d "
192 "nlmsg_type=0x%x\n", n->nlmsg_len, n->nlmsg_type);
299 nlh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
353 if (rtnl_send(&rth, nlh, nlh->nlmsg_len) < 0) {
/external/iptables/libipq/
H A Dlibipq.c186 if (nlh->nlmsg_flags & MSG_TRUNC || nlh->nlmsg_len > status) {
277 req.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(req));
283 return ipq_netlink_sendto(h, (void *)&req, req.nlh.nlmsg_len);
353 nlh.nlmsg_len = tlen;

Completed in 187 milliseconds

123