/external/libnl/lib/ |
D | msg.c | 218 void *nlmsg_data(const struct nlmsghdr *nlh) in nlmsg_data() argument 220 return (unsigned char *) nlh + NLMSG_HDRLEN; in nlmsg_data() 223 void *nlmsg_tail(const struct nlmsghdr *nlh) in nlmsg_tail() argument 225 return (unsigned char *) nlh + NLMSG_ALIGN(nlh->nlmsg_len); in nlmsg_tail() 232 int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() argument 234 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len() 249 struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh, int hdrlen) in nlmsg_attrdata() argument 251 unsigned char *data = nlmsg_data(nlh); in nlmsg_attrdata() 260 int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen) in nlmsg_attrlen() argument 262 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen); in nlmsg_attrlen() [all …]
|
/external/libnl/lib/genl/ |
D | genl.c | 146 int genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen) in genlmsg_valid_hdr() argument 150 if (!nlmsg_valid_hdr(nlh, GENL_HDRLEN)) in genlmsg_valid_hdr() 153 ghdr = nlmsg_data(nlh); in genlmsg_valid_hdr() 160 int genlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype, in genlmsg_validate() argument 165 if (!genlmsg_valid_hdr(nlh, hdrlen)) in genlmsg_validate() 168 ghdr = nlmsg_data(nlh); in genlmsg_validate() 173 int genlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[], in genlmsg_parse() argument 178 if (!genlmsg_valid_hdr(nlh, hdrlen)) in genlmsg_parse() 181 ghdr = nlmsg_data(nlh); in genlmsg_parse() 201 struct nlmsghdr *nlh = (struct nlmsghdr *)((unsigned char *)gnlh - in genlmsg_len() local [all …]
|
D | mngt.c | 94 struct nlmsghdr *nlh, struct nl_parser_param *pp) in genl_msg_parser() argument 100 ghdr = nlmsg_data(nlh); in genl_msg_parser() 121 .nlh = nlh, in genl_msg_parser() 127 err = nlmsg_parse(nlh, ops->co_hdrsize, tb, cmd->c_maxattr, in genl_msg_parser()
|
/external/iproute2/genl/ |
D | ctrl.c | 45 struct nlmsghdr *nlh; in genl_ctrl_resolve_family() local 55 nlh = &req.n; in genl_ctrl_resolve_family() 56 nlh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in genl_ctrl_resolve_family() 57 nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in genl_ctrl_resolve_family() 58 nlh->nlmsg_type = GENL_ID_CTRL; in genl_ctrl_resolve_family() 68 addattr_l(nlh, 128, CTRL_ATTR_FAMILY_NAME, family, strlen(family) + 1); in genl_ctrl_resolve_family() 70 if (rtnl_talk(&rth, nlh, 0, 0, nlh) < 0) { in genl_ctrl_resolve_family() 77 struct genlmsghdr *ghdr = NLMSG_DATA(nlh); in genl_ctrl_resolve_family() 78 int len = nlh->nlmsg_len; in genl_ctrl_resolve_family() 81 if (nlh->nlmsg_type != GENL_ID_CTRL) { in genl_ctrl_resolve_family() [all …]
|
/external/libpcap/ |
D | pcap-netfilter-linux.c | 110 const struct nlmsghdr *nlh = (const struct nlmsghdr *) buf; in netfilter_read_linux() local 114 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() 119 if (NFNL_SUBSYS_ID(nlh->nlmsg_type) == NFNL_SUBSYS_ULOG && in netfilter_read_linux() 120 NFNL_MSG_TYPE(nlh->nlmsg_type) == NFULNL_MSG_PACKET) in netfilter_read_linux() 123 if (NFNL_SUBSYS_ID(nlh->nlmsg_type) == NFNL_SUBSYS_QUEUE && in netfilter_read_linux() 124 NFNL_MSG_TYPE(nlh->nlmsg_type) == NFQNL_MSG_PACKET) 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() 142 nfg = NLMSG_DATA(nlh); in netfilter_read_linux() [all …]
|
/external/libnl/include/linux/ |
D | netlink.h | 80 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) argument 81 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument 82 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 83 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ argument 84 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 85 (nlh)->nlmsg_len <= (len)) 86 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument
|
/external/wpa_supplicant_8/src/drivers/ |
D | priv_netlink.h | 53 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0))) argument 54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument 56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \ argument 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))) argument
|
/external/iproute2/include/linux/ |
D | netlink.h | 83 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) argument 84 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument 85 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 86 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ argument 87 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 88 (nlh)->nlmsg_len <= (len)) 89 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument
|
/external/libnl/lib/netfilter/ |
D | nfnl.c | 131 uint8_t nfnlmsg_subsys(struct nlmsghdr *nlh) in nfnlmsg_subsys() argument 133 return NFNL_SUBSYS_ID(nlh->nlmsg_type); in nfnlmsg_subsys() 140 uint8_t nfnlmsg_subtype(struct nlmsghdr *nlh) in nfnlmsg_subtype() argument 142 return NFNL_MSG_TYPE(nlh->nlmsg_type); in nfnlmsg_subtype() 149 uint8_t nfnlmsg_family(struct nlmsghdr *nlh) in nfnlmsg_family() argument 151 struct nfgenmsg *nfg = nlmsg_data(nlh); in nfnlmsg_family() 160 uint16_t nfnlmsg_res_id(struct nlmsghdr *nlh) in nfnlmsg_res_id() argument 162 struct nfgenmsg *nfg = nlmsg_data(nlh); in nfnlmsg_res_id() 234 struct nlmsghdr *nlh; in nfnlmsg_put() local 236 nlh = nlmsg_put(msg, pid, seq, NFNLMSG_TYPE(subsys_id, type), 0, flags); in nfnlmsg_put() [all …]
|
D | queue_msg.c | 62 int nfnlmsg_queue_msg_parse(struct nlmsghdr *nlh, in nfnlmsg_queue_msg_parse() argument 74 msg->ce_msgtype = nlh->nlmsg_type; in nfnlmsg_queue_msg_parse() 76 err = nlmsg_parse(nlh, sizeof(struct nfgenmsg), tb, NFQA_MAX, in nfnlmsg_queue_msg_parse() 81 nfnl_queue_msg_set_group(msg, nfnlmsg_res_id(nlh)); in nfnlmsg_queue_msg_parse() 82 nfnl_queue_msg_set_family(msg, nfnlmsg_family(nlh)); in nfnlmsg_queue_msg_parse() 149 struct nlmsghdr *nlh, struct nl_parser_param *pp) in queue_msg_parser() argument 154 if ((err = nfnlmsg_queue_msg_parse(nlh, &msg)) < 0) in queue_msg_parser() 199 int nfnl_queue_msg_send_verdict(struct nl_sock *nlh, in nfnl_queue_msg_send_verdict() argument 209 err = nl_send_auto_complete(nlh, nlmsg); in nfnl_queue_msg_send_verdict() 213 return wait_for_ack(nlh); in nfnl_queue_msg_send_verdict() [all …]
|
D | log.c | 74 int nfnl_log_pf_bind(struct nl_sock *nlh, uint8_t pf) in nfnl_log_pf_bind() argument 82 return send_log_request(nlh, msg); in nfnl_log_pf_bind() 90 int nfnl_log_pf_unbind(struct nl_sock *nlh, uint8_t pf) in nfnl_log_pf_unbind() argument 98 return send_log_request(nlh, msg); in nfnl_log_pf_unbind() 182 int nfnl_log_create(struct nl_sock *nlh, const struct nfnl_log *log) in nfnl_log_create() argument 190 return send_log_request(nlh, msg); in nfnl_log_create() 199 int nfnl_log_change(struct nl_sock *nlh, const struct nfnl_log *log) in nfnl_log_change() argument 207 return send_log_request(nlh, msg); in nfnl_log_change() 220 int nfnl_log_delete(struct nl_sock *nlh, const struct nfnl_log *log) in nfnl_log_delete() argument 228 return send_log_request(nlh, msg); in nfnl_log_delete()
|
D | queue.c | 84 int nfnl_queue_pf_bind(struct nl_sock *nlh, uint8_t pf) in nfnl_queue_pf_bind() argument 92 return send_queue_request(nlh, msg); in nfnl_queue_pf_bind() 100 int nfnl_queue_pf_unbind(struct nl_sock *nlh, uint8_t pf) in nfnl_queue_pf_unbind() argument 108 return send_queue_request(nlh, msg); in nfnl_queue_pf_unbind() 182 int nfnl_queue_create(struct nl_sock *nlh, const struct nfnl_queue *queue) in nfnl_queue_create() argument 190 return send_queue_request(nlh, msg); in nfnl_queue_create() 199 int nfnl_queue_change(struct nl_sock *nlh, const struct nfnl_queue *queue) in nfnl_queue_change() argument 207 return send_queue_request(nlh, msg); in nfnl_queue_change() 220 int nfnl_queue_delete(struct nl_sock *nlh, const struct nfnl_queue *queue) in nfnl_queue_delete() argument 228 return send_queue_request(nlh, msg); in nfnl_queue_delete()
|
D | log_msg.c | 65 int nfnlmsg_log_msg_parse(struct nlmsghdr *nlh, struct nfnl_log_msg **result) in nfnlmsg_log_msg_parse() argument 76 msg->ce_msgtype = nlh->nlmsg_type; in nfnlmsg_log_msg_parse() 78 err = nlmsg_parse(nlh, sizeof(struct nfgenmsg), tb, NFULA_MAX, in nfnlmsg_log_msg_parse() 83 nfnl_log_msg_set_family(msg, nfnlmsg_family(nlh)); in nfnlmsg_log_msg_parse() 170 struct nlmsghdr *nlh, struct nl_parser_param *pp) in log_msg_parser() argument 175 if ((err = nfnlmsg_log_msg_parse(nlh, &msg)) < 0) in log_msg_parser()
|
D | ct.c | 275 int nfnlmsg_ct_group(struct nlmsghdr *nlh) in nfnlmsg_ct_group() argument 277 switch (nfnlmsg_subtype(nlh)) { in nfnlmsg_ct_group() 279 if (nlh->nlmsg_flags & (NLM_F_CREATE|NLM_F_EXCL)) in nfnlmsg_ct_group() 290 int nfnlmsg_ct_parse(struct nlmsghdr *nlh, struct nfnl_ct **result) in nfnlmsg_ct_parse() argument 300 ct->ce_msgtype = nlh->nlmsg_type; in nfnlmsg_ct_parse() 302 err = nlmsg_parse(nlh, sizeof(struct nfgenmsg), tb, CTA_MAX, in nfnlmsg_ct_parse() 307 nfnl_ct_set_family(ct, nfnlmsg_family(nlh)); in nfnlmsg_ct_parse() 358 struct nlmsghdr *nlh, struct nl_parser_param *pp) in ct_msg_parser() argument 363 if ((err = nfnlmsg_ct_parse(nlh, &ct)) < 0) in ct_msg_parser()
|
/external/kernel-headers/original/uapi/linux/ |
D | netlink.h | 84 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) argument 85 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument 86 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 87 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ argument 88 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 89 (nlh)->nlmsg_len <= (len)) 90 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument
|
/external/iptables/libipq/ |
D | libipq.c | 129 struct nlmsghdr *nlh; in ipq_netlink_recvfrom() local 185 nlh = (struct nlmsghdr *)buf; in ipq_netlink_recvfrom() 186 if (nlh->nlmsg_flags & MSG_TRUNC || nlh->nlmsg_len > status) { in ipq_netlink_recvfrom() 272 struct nlmsghdr nlh; in ipq_set_mode() member 277 req.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(req)); in ipq_set_mode() 278 req.nlh.nlmsg_flags = NLM_F_REQUEST; in ipq_set_mode() 279 req.nlh.nlmsg_type = IPQM_MODE; in ipq_set_mode() 280 req.nlh.nlmsg_pid = h->local.nl_pid; in ipq_set_mode() 283 return ipq_netlink_sendto(h, (void *)&req, req.nlh.nlmsg_len); in ipq_set_mode() 321 struct nlmsghdr nlh; in ipq_set_verdict() local [all …]
|
/external/iputils/ninfod/ |
D | ni_ifaddrs.c | 96 struct nlmsghdr *nlh; member 220 struct nlmsghdr *nlh = NULL; in nl_getlist() local 230 status = nl_getmsg(sd, request, seq, &nlh, &done); in nl_getlist() 233 if (nlh) { in nl_getlist() 237 free(nlh); in nl_getlist() 242 nlm_next->nlh = (struct nlmsghdr *) nlh; in nl_getlist() 268 if(nlm->nlh) in free_nlmsglist() 269 free(nlm->nlh); in free_nlmsglist() 353 struct nlmsghdr *nlh, *nlh0; in ni_ifaddrs() local 383 if (!(nlh0 = nlm->nlh)) in ni_ifaddrs() [all …]
|
/external/libselinux/src/ |
D | avc_internal.c | 105 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; in avc_netlink_receive() local 148 if (nlh->nlmsg_flags & MSG_TRUNC || nlh->nlmsg_len > (unsigned)rc) { in avc_netlink_receive() 161 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; in avc_netlink_process() local 163 switch (nlh->nlmsg_type) { in avc_netlink_process() 165 struct nlmsgerr *err = NLMSG_DATA(nlh); in avc_netlink_process() 178 struct selnl_msg_setenforce *msg = NLMSG_DATA(nlh); in avc_netlink_process() 198 struct selnl_msg_policyload *msg = NLMSG_DATA(nlh); in avc_netlink_process() 218 avc_prefix, nlh->nlmsg_type); in avc_netlink_process()
|
/external/selinux/libselinux/src/ |
D | avc_internal.c | 105 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; in avc_netlink_receive() local 148 if (nlh->nlmsg_flags & MSG_TRUNC || nlh->nlmsg_len > (unsigned)rc) { in avc_netlink_receive() 161 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; in avc_netlink_process() local 163 switch (nlh->nlmsg_type) { in avc_netlink_process() 165 struct nlmsgerr *err = NLMSG_DATA(nlh); in avc_netlink_process() 178 struct selnl_msg_setenforce *msg = NLMSG_DATA(nlh); in avc_netlink_process() 198 struct selnl_msg_policyload *msg = NLMSG_DATA(nlh); in avc_netlink_process() 218 avc_prefix, nlh->nlmsg_type); in avc_netlink_process()
|
/external/libnl/src/ |
D | disabled-nl-qdisc-add.c | 128 struct nl_sock *nlh; in main() local 139 nlh = nltool_alloc_handle(); in main() 140 if (!nlh) in main() 179 if (nltool_connect(nlh, NETLINK_ROUTE) < 0) in main() 182 if (rtnl_qdisc_add(nlh, qdisc, NLM_F_REPLACE) < 0) { in main() 189 nl_close(nlh); in main() 193 nl_handle_destroy(nlh); in main()
|
D | nl-fib-lookup.c | 28 struct nl_sock *nlh; in main() local 76 nlh = nl_cli_alloc_socket(); in main() 100 nl_cli_connect(nlh, NETLINK_FIB_LOOKUP); in main() 102 err = flnl_lookup(nlh, request, result); in main()
|
/external/iproute2/lib/ |
D | libnetlink.c | 95 struct nlmsghdr nlh; in rtnl_wilddump_request() member 103 req.nlh.nlmsg_len = sizeof(req); in rtnl_wilddump_request() 104 req.nlh.nlmsg_type = type; in rtnl_wilddump_request() 105 req.nlh.nlmsg_flags = NLM_F_DUMP|NLM_F_REQUEST; in rtnl_wilddump_request() 106 req.nlh.nlmsg_pid = 0; in rtnl_wilddump_request() 107 req.nlh.nlmsg_seq = rth->dump = ++rth->seq; in rtnl_wilddump_request() 157 struct nlmsghdr nlh; in rtnl_dump_request() local 160 { .iov_base = &nlh, .iov_len = sizeof(nlh) }, in rtnl_dump_request() 170 nlh.nlmsg_len = NLMSG_LENGTH(len); in rtnl_dump_request() 171 nlh.nlmsg_type = type; in rtnl_dump_request() [all …]
|
/external/dnsmasq/src/ |
D | netlink.c | 134 struct nlmsghdr nlh; in iface_enumerate() member 144 req.nlh.nlmsg_len = sizeof(req); in iface_enumerate() 145 req.nlh.nlmsg_type = RTM_GETADDR; in iface_enumerate() 146 req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST | NLM_F_ACK; in iface_enumerate() 147 req.nlh.nlmsg_pid = 0; in iface_enumerate() 148 req.nlh.nlmsg_seq = ++seq; in iface_enumerate()
|
/external/dnsmasq/contrib/wrt/ |
D | dhcp_release.c | 188 struct nlmsghdr nlh; in find_interface() member 197 req.nlh.nlmsg_len = sizeof(req); in find_interface() 198 req.nlh.nlmsg_type = RTM_GETADDR; in find_interface() 199 req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST | NLM_F_ACK; in find_interface() 200 req.nlh.nlmsg_pid = 0; in find_interface() 201 req.nlh.nlmsg_seq = 1; in find_interface()
|
/external/libnl/include/netlink/ |
D | msg.h | 122 #define nlmsg_for_each_attr(pos, nlh, hdrlen, rem) \ argument 123 nla_for_each_attr(pos, nlmsg_attrdata(nlh, hdrlen), \ 124 nlmsg_attrlen(nlh, hdrlen), rem)
|