Home
last modified time | relevance | path

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

123

/external/libnl/lib/
Dmsg.c225 return (unsigned char *) nlh + NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_tail()
232 int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() function
234 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
262 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen); in nlmsg_attrlen()
274 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) in nlmsg_valid_hdr()
288 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && in nlmsg_ok()
289 nlh->nlmsg_len <= remaining); in nlmsg_ok()
302 int totlen = NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_next()
385 nm->nm_nlh->nlmsg_len = nlmsg_total_size(0); in __nlmsg_alloc()
491 nm = __nlmsg_alloc(NLMSG_ALIGN(hdr->nlmsg_len)); in nlmsg_convert()
[all …]
Dattr.c803 tlen = NLMSG_ALIGN(msg->nm_nlh->nlmsg_len) + nla_total_size(attrlen); in nla_reserve()
805 if ((tlen + msg->nm_nlh->nlmsg_len) > msg->nm_size) in nla_reserve()
813 msg->nm_nlh->nlmsg_len = tlen; in nla_reserve()
818 attrtype, msg->nm_nlh->nlmsg_len); in nla_reserve()
1110 return nla_put(msg, attrtype, nlmsg_len(nested->nm_nlh), in nla_put_nested()
/external/libnl/include/linux/
Dnetlink.h40 __u32 nlmsg_len; /* Length of message including header */ member
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/src/drivers/
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)))
86 u32 nlmsg_len; member
Dnetlink.c183 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()
/external/iproute2/include/linux/
Dnetlink.h42 __u32 nlmsg_len; /* Length of message including header */ member
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/
Dnetlink.h43 __u32 nlmsg_len; /* Length of message including header */ member
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/iproute2/lib/
Dlibnetlink.c103 req.nlh.nlmsg_len = sizeof(req); in rtnl_wilddump_request()
144 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) in rtnl_send_check()
170 nlh.nlmsg_len = NLMSG_LENGTH(len); in rtnl_dump_request()
233 if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) { in rtnl_dump_filter_l()
286 .iov_len = n->nlmsg_len in rtnl_talk()
337 int len = h->nlmsg_len; in rtnl_talk()
366 memcpy(answer, h, h->nlmsg_len); in rtnl_talk()
374 memcpy(answer, h, h->nlmsg_len); in rtnl_talk()
439 int len = h->nlmsg_len; in rtnl_listen()
497 len = h->nlmsg_len; in rtnl_from_file()
[all …]
/external/libpcap/
Dpcap-netfilter-linux.c114 if (nlh->nlmsg_len < sizeof(struct nlmsghdr) || len < nlh->nlmsg_len) { in netfilter_read_linux()
115 …le->errbuf, PCAP_ERRBUF_SIZE, "Message truncated: (got: %d) (nlmsg_len: %u)", len, nlh->nlmsg_len); in netfilter_read_linux()
137 if (nlh->nlmsg_len < HDR_LENGTH) { in netfilter_read_linux()
138 … snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Malformed message: (nlmsg_len: %u)", nlh->nlmsg_len); in netfilter_read_linux()
143 if (nlh->nlmsg_len > HDR_LENGTH) { in netfilter_read_linux()
145 int attr_len = nlh->nlmsg_len - NLMSG_ALIGN(HDR_LENGTH); in netfilter_read_linux()
180 pkth.caplen = pkth.len = nlh->nlmsg_len-NLMSG_ALIGN(sizeof(struct nlmsghdr)); in netfilter_read_linux()
202 msg_len = NLMSG_ALIGN(nlh->nlmsg_len); in netfilter_read_linux()
258 nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nfgenmsg)); in netfilter_send_config_msg()
269 struct nfattr *nfa = (struct nfattr *) (buf + NLMSG_ALIGN(nlh->nlmsg_len)); in netfilter_send_config_msg()
[all …]
/external/dhcpcd/
Dif-linux.c218 l = nlm->nlmsg_len - sizeof(*nlm); in err_netlink()
242 len = nlm->nlmsg_len - sizeof(*nlm); in link_route()
304 len = nlm->nlmsg_len - sizeof(*nlm); in link_addr()
358 len = nlm->nlmsg_len - sizeof(*nlm); in link_netlink()
419 iov.iov_len = hdr->nlmsg_len; in send_netlink()
437 ((struct rtattr *)(((ptrdiff_t)(nmsg))+NLMSG_ALIGN((nmsg)->nlmsg_len)))
446 if (NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) { in add_attr_l()
455 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len); in add_attr_l()
466 if (NLMSG_ALIGN(n->nlmsg_len) + len > maxlen) { in add_attr_32()
475 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len; in add_attr_32()
[all …]
/external/iproute2/genl/
Dctrl.c56 nlh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in genl_ctrl_resolve_family()
78 int len = nlh->nlmsg_len; in genl_ctrl_resolve_family()
83 "nlmsg_type=0x%x\n", nlh->nlmsg_len, nlh->nlmsg_type); in genl_ctrl_resolve_family()
185 int len = n->nlmsg_len; in print_ctrl()
192 "nlmsg_type=0x%x\n", n->nlmsg_len, n->nlmsg_type); in print_ctrl()
299 nlh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in ctrl_list()
353 if (rtnl_send(&rth, nlh, nlh->nlmsg_len) < 0) { in ctrl_list()
/external/iproute2/ip/
Dipneigh.c110 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg)); in ipneigh_modify()
188 int len = n->nlmsg_len; in print_neigh()
194 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); in print_neigh()
217 parse_rtattr(tb, NDA_MAX, NDA_RTA(r), n->nlmsg_len - NLMSG_LENGTH(sizeof(*r))); in print_neigh()
237 if (NLMSG_ALIGN(filter.flushp) + n->nlmsg_len > filter.flushe) { in print_neigh()
242 memcpy(fn, n, n->nlmsg_len); in print_neigh()
246 filter.flushp = (((char*)fn) + n->nlmsg_len) - filter.flushb; in print_neigh()
Dipl2tp.c104 req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in create_tunnel()
137 req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in delete_tunnel()
160 req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in create_session()
202 req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in delete_session()
281 len = n->nlmsg_len - NLMSG_LENGTH(sizeof(*ghdr)); in get_response()
377 req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in get_session()
390 if (rtnl_send(&genl_rth, &req, req.n.nlmsg_len) < 0) in get_session()
420 req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in get_tunnel()
431 if (rtnl_send(&genl_rth, &req, req.n.nlmsg_len) < 0) in get_tunnel()
723 int len = nlh->nlmsg_len; in genl_parse_getfamily()
[all …]
Drtmon.c41 n1->nlmsg_len = NLMSG_LENGTH(4*2); in write_stamp()
45 fwrite((void*)n1, 1, NLMSG_ALIGN(n1->nlmsg_len), fp); in write_stamp()
54 fwrite((void*)n, 1, NLMSG_ALIGN(n->nlmsg_len), fp); in dump_msg()
Dxfrm_monitor.c50 int len = n->nlmsg_len; in xfrm_acquire_print()
111 int len = n->nlmsg_len; in xfrm_state_flush_print()
141 int len = n->nlmsg_len; in xfrm_policy_flush_print()
179 int len = n->nlmsg_len; in xfrm_report_print()
338 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); in xfrm_accept_msg()
Dxfrm_policy.c274 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xpinfo)); in xfrm_policy_modify()
473 int len = n->nlmsg_len; in xfrm_policy_print()
480 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); in xfrm_policy_print()
586 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xpid)); in xfrm_policy_get_or_delete()
717 int len = n->nlmsg_len; in xfrm_policy_keep()
725 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); in xfrm_policy_keep()
757 new_n->nlmsg_len = NLMSG_LENGTH(sizeof(*xpid)); in xfrm_policy_keep()
767 xb->offset += new_n->nlmsg_len; in xfrm_policy_keep()
909 int len = n->nlmsg_len; in print_spdinfo()
973 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(__u32)); in xfrm_spd_getinfo()
[all …]
Dipprefix.c40 int len = n->nlmsg_len; in print_prefix()
46 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); in print_prefix()
Dxfrm_state.c262 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsinfo)); in xfrm_state_modify()
578 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xspi)); in xfrm_state_allocspi()
738 int len = n->nlmsg_len; in xfrm_state_print()
745 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); in xfrm_state_print()
830 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsid)); in xfrm_state_get_or_delete()
911 int len = n->nlmsg_len; in xfrm_state_keep()
917 n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); in xfrm_state_keep()
936 new_n->nlmsg_len = NLMSG_LENGTH(sizeof(*xsid)); in xfrm_state_keep()
950 xb->offset += new_n->nlmsg_len; in xfrm_state_keep()
1068 int len = n->nlmsg_len; in print_sadinfo()
[all …]
Dipaddrlabel.c61 int len = n->nlmsg_len; in print_addrlabel()
143 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrlblmsg)); in ipaddrlabel_modify()
197 int len = n->nlmsg_len; in flush_addrlabel()
/external/iproute2/tc/
Dm_action.c337 int len = n->nlmsg_len; in print_action()
398 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcamsg)); in tc_action_gd()
500 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcamsg)); in tc_action_modify()
539 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcamsg)); in tc_act_list_or_flush()
567 msg_size = NLMSG_ALIGN(req.n.nlmsg_len) - NLMSG_ALIGN(sizeof(struct nlmsghdr)); in tc_act_list_or_flush()
578 req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len); in tc_act_list_or_flush()
Df_cgroup.c43 tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len)); in cgroup_parse_opt()
79 tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail; in cgroup_parse_opt()
Df_basic.c59 tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len)); in basic_parse_opt()
105 tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail; in basic_parse_opt()
/external/iptables/libipq/
Dlibipq.c186 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()
/external/toybox/toys/pending/
Dip.c156 req.nlh.nlmsg_len = sizeof(req); in send_nlmesg()
439 if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) return; in add_string_to_rtattr()
440 rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); in add_string_to_rtattr()
444 n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len; in add_string_to_rtattr()
454 ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
584 request.mhdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in linkupdate()
634 send_nlmesg(0, 0, 0, (void *)&request, request.mhdr.nlmsg_len); in linkupdate()
812 int len = h->nlmsg_len - NLMSG_LENGTH(sizeof(*iface)); in get_link_info()
925 request.mhdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in link_show()
962 if ((len = h->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa))) < 0) { in print_addrinfo()
[all …]
/external/strace/
Dsocketutils.c31 .nlmsg_len = sizeof(req), in inet_send_query()
152 if (parser(proto_name, NLMSG_DATA(h), h->nlmsg_len, inode)) in receive_responses()
177 .nlmsg_len = sizeof(req), in unix_send_query()

123