/external/libnetfilter_conntrack/examples/ |
nfct-mnl-get.c | 12 static int data_cb(const struct nlmsghdr *nlh, void *data) 21 nfct_nlmsg_parse(nlh, ct); 34 struct nlmsghdr *nlh; local 53 nlh = mnl_nlmsg_put_header(buf); 54 nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK << 8) | IPCTNL_MSG_CT_GET; 55 nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_ACK; 56 nlh->nlmsg_seq = seq = time(NULL); 58 nfh = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg)); 77 nfct_nlmsg_build(nlh, ct); 79 ret = mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) [all...] |
nfct-mnl-dump-labels.c | 23 static int data_cb(const struct nlmsghdr *nlh, void *data) 32 nfct_nlmsg_parse(nlh, ct); 47 struct nlmsghdr *nlh; local 66 nlh = mnl_nlmsg_put_header(buf); 67 nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK << 8) | IPCTNL_MSG_CT_GET; 68 nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP; 69 nlh->nlmsg_seq = seq = time(NULL); 71 nfh = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg)); 77 ret = mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) [all...] |
/external/libnl/include/linux-private/linux/ |
netlink.h | 80 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 81 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 82 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 83 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 84 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 85 (nlh)->nlmsg_len <= (len)) 86 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/external/libnl/lib/netfilter/ |
nfnl.c | 129 * @arg nlh netlink messsage header 131 uint8_t nfnlmsg_subsys(struct nlmsghdr *nlh) 133 return NFNL_SUBSYS_ID(nlh->nlmsg_type); 138 * @arg nlh netlink messsage header 140 uint8_t nfnlmsg_subtype(struct nlmsghdr *nlh) 142 return NFNL_MSG_TYPE(nlh->nlmsg_type); 147 * @arg nlh netlink messsage header 149 uint8_t nfnlmsg_family(struct nlmsghdr *nlh) 151 struct nfgenmsg *nfg = nlmsg_data(nlh); 158 * @arg nlh netlink messsage heade 234 struct nlmsghdr *nlh; local [all...] |
/hardware/qcom/msm8994/kernel-headers/linux/ |
netlink.h | 92 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 94 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 95 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 96 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/hardware/qcom/msm8994/original-kernel-headers/linux/ |
netlink.h | 83 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 84 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 85 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 86 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 87 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 88 (nlh)->nlmsg_len <= (len)) 89 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/hardware/qcom/msm8996/kernel-headers/linux/ |
netlink.h | 92 #define NLMSG_DATA(nlh) ((void *) (((char *) nlh) + NLMSG_LENGTH(0))) 94 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr *) (((char *) (nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 95 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 96 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/hardware/qcom/msm8996/original-kernel-headers/linux/ |
netlink.h | 83 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 84 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 85 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 86 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 87 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 88 (nlh)->nlmsg_len <= (len)) 89 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot/usr/include/linux/ |
netlink.h | 81 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 82 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 83 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 84 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 85 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 86 (nlh)->nlmsg_len <= (len)) 87 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/external/iproute2/tipc/ |
nametable.c | 26 static int nametable_show_cb(const struct nlmsghdr *nlh, void *data) 30 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh); 36 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info); 72 static int cmd_nametable_show(struct nlmsghdr *nlh, const struct cmd *cmd, 83 if (!(nlh = msg_init(buf, TIPC_NL_NAME_TABLE_GET))) { 88 return msg_dumpit(nlh, nametable_show_cb, &iteration); 100 int cmd_nametable(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, 108 return run_cmd(nlh, cmd, cmds, cmdl, NULL);
|
bearer.c | 36 struct nlmsghdr *nlh; member in struct:cb_data 83 static int get_netid_cb(const struct nlmsghdr *nlh, void *data) 85 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh); 90 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info); 105 struct nlmsghdr *nlh; local 107 if (!(nlh = msg_init(mnl_msg, TIPC_NL_NET_GET))) { 111 if (msg_dumpit(nlh, get_netid_cb, &netid)) { 123 static int nl_add_udp_enable_opts(struct nlmsghdr *nlh, struct opt *opts, 186 nest = mnl_attr_nest_start(nlh, TIPC_NLA_BEARER_UDP_OPTS); 187 mnl_attr_put(nlh, TIPC_NLA_UDP_LOCAL, loc->ai_addrlen, loc->ai_addr) [all...] |
link.c | 27 static int link_list_cb(const struct nlmsghdr *nlh, void *data) 29 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh); 33 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info); 51 static int cmd_link_list(struct nlmsghdr *nlh, const struct cmd *cmd, 61 nlh = msg_init(buf, TIPC_NL_LINK_GET); 62 if (!nlh) { 67 return msg_dumpit(nlh, link_list_cb, NULL); 70 static int link_get_cb(const struct nlmsghdr *nlh, void *data) 73 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh); 78 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info) 699 struct nlmsghdr *nlh; local [all...] |
/external/libnfnetlink/src/ |
libnfnetlink.c | 98 void nfnl_dump_packet(struct nlmsghdr *nlh, int received_len, char *desc) 100 void *nlmsg_data = NLMSG_DATA(nlh); 101 struct nfattr *nfa = NFM_NFA(NLMSG_DATA(nlh)); 102 int len = NFM_PAYLOAD(nlh); 105 printf(" nlmsghdr = %p, received_len = %u\n", nlh, received_len); 106 printf(" NLMSG_DATA(nlh) = %p (+%td bytes)\n", nlmsg_data, 107 (nlmsg_data - (void *)nlh)); 108 printf(" NFM_NFA(NLMSG_DATA(nlh)) = %p (+%td bytes)\n", 109 nfa, ((void *)nfa - (void *)nlh)); 110 printf(" NFM_PAYLOAD(nlh) = %u\n", len) 1132 struct nlmsghdr *nlh; local 1151 struct nlmsghdr *nlh; local 1328 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; local 1454 struct nlmsghdr *nlh = (struct nlmsghdr *)buf; local 1481 struct nlmsghdr *nlh; member in struct:nfnl_iterator 1503 struct nlmsghdr *nlh; local [all...] |
/external/iproute2/devlink/ |
mnlg.c | 36 struct nlmsghdr *nlh; local 39 nlh = mnl_nlmsg_put_header(nlg->buf); 40 nlh->nlmsg_type = id; 41 nlh->nlmsg_flags = flags; 43 nlh->nlmsg_seq = nlg->seq; 45 genl = mnl_nlmsg_put_extra_header(nlh, sizeof(struct genlmsghdr)); 49 return nlh; 58 int mnlg_socket_send(struct mnlg_socket *nlg, const struct nlmsghdr *nlh) 60 return mnl_socket_sendto(nlg->nl, nlh, nlh->nlmsg_len) 160 struct nlmsghdr *nlh; local 222 struct nlmsghdr *nlh; local [all...] |
/external/iproute2/lib/ |
libgenl.c | 12 static int genl_parse_getfamily(struct nlmsghdr *nlh) 15 struct genlmsghdr *ghdr = NLMSG_DATA(nlh); 16 int len = nlh->nlmsg_len; 19 if (nlh->nlmsg_type != GENL_ID_CTRL) { 21 "nlmsg_type=0x%x\n", nlh->nlmsg_len, nlh->nlmsg_type);
|
/external/strace/tests/ |
netlink_selinux.c | 40 struct nlmsghdr nlh = { local 41 .nlmsg_len = sizeof(nlh), 46 rc = sendto(fd, &nlh, sizeof(nlh), MSG_DONTWAIT, NULL, 0); 50 fd, nlh.nlmsg_len, (unsigned) sizeof(nlh), sprintrc(rc));
|
nlattr_br_port_msg.c | 40 init_br_port_msg(struct nlmsghdr *const nlh, const unsigned int msg_len) 42 SET_STRUCT(struct nlmsghdr, nlh, 48 struct br_port_msg *const msg = NLMSG_DATA(nlh);
|
nlattr_dcbmsg.c | 39 init_dcbmsg(struct nlmsghdr *const nlh, const unsigned int msg_len) 41 SET_STRUCT(struct nlmsghdr, nlh, 47 struct dcbmsg *const msg = NLMSG_DATA(nlh);
|
/external/strace/tests-m32/ |
netlink_selinux.c | 40 struct nlmsghdr nlh = { local 41 .nlmsg_len = sizeof(nlh), 46 rc = sendto(fd, &nlh, sizeof(nlh), MSG_DONTWAIT, NULL, 0); 50 fd, nlh.nlmsg_len, (unsigned) sizeof(nlh), sprintrc(rc));
|
/external/strace/tests-mx32/ |
netlink_selinux.c | 40 struct nlmsghdr nlh = { local 41 .nlmsg_len = sizeof(nlh), 46 rc = sendto(fd, &nlh, sizeof(nlh), MSG_DONTWAIT, NULL, 0); 50 fd, nlh.nlmsg_len, (unsigned) sizeof(nlh), sprintrc(rc));
|
/external/libnetfilter_conntrack/src/conntrack/ |
build.c | 18 nest = nfnl_nest(&req->nlh, size, CTA_TUPLE_IP); 22 nfnl_addattr_l(&req->nlh, size, CTA_IP_V4_SRC, &t->src.v4, 24 nfnl_addattr_l(&req->nlh, size, CTA_IP_V4_DST, &t->dst.v4, 28 nfnl_addattr_l(&req->nlh, size, CTA_IP_V6_SRC, &t->src.v6, 30 nfnl_addattr_l(&req->nlh, size, CTA_IP_V6_DST, &t->dst.v6, 37 nfnl_nest_end(&req->nlh, nest); 46 nest = nfnl_nest(&req->nlh, size, CTA_TUPLE_PROTO); 48 nfnl_addattr_l(&req->nlh, size, CTA_PROTO_NUM, &t->protonum, 58 nfnl_addattr_l(&req->nlh, size, CTA_PROTO_SRC_PORT, 60 nfnl_addattr_l(&req->nlh, size, CTA_PROTO_DST_PORT [all...] |
filter_dump.c | 38 nfnl_addattr32(&req->nlh, size, CTA_MARK, 40 nfnl_addattr32(&req->nlh, size, CTA_MARK_MASK, 44 struct nfgenmsg *nfg = NLMSG_DATA(&req->nlh);
|
/system/core/logd/ |
libaudit.c | 48 if (rep.nlh.nlmsg_type == NLMSG_ERROR) { 85 req.nlh.nlmsg_type = type; 86 req.nlh.nlmsg_len = NLMSG_SPACE(size); 87 req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; 104 memcpy(NLMSG_DATA(&req.nlh), data, size); 119 req.nlh.nlmsg_seq = ++sequence; 123 rc = TEMP_FAILURE_RETRY(sendto(fd, &req, req.nlh.nlmsg_len, 0, 130 } else if ((uint32_t)rc != req.nlh.nlmsg_len) { 237 if (!NLMSG_OK(&rep->nlh, (size_t)len)) {
|
/device/google/marlin/dataservices/sockev/src/ |
sockev_cli.c | 50 struct nlmsghdr *nlh = NULL; local 53 nlh = (struct nlmsghdr *) 55 if (!nlh) { 81 recvfrom(skfd, nlh, sizeof(struct sknlsockevmsg) + 16, 0, 83 msg = NLMSG_DATA(nlh);
|
/external/libnl/lib/ |
msg.c | 101 * @arg nlh Netlink message header 105 void *nlmsg_data(const struct nlmsghdr *nlh) 107 return (unsigned char *) nlh + NLMSG_HDRLEN; 110 void *nlmsg_tail(const struct nlmsghdr *nlh) 112 return (unsigned char *) nlh + NLMSG_ALIGN(nlh->nlmsg_len); 117 * @arg nlh Netlink message header 121 int nlmsg_datalen(const struct nlmsghdr *nlh) 123 return nlh->nlmsg_len - NLMSG_HDRLEN; 126 static int nlmsg_len(const struct nlmsghdr *nlh) 349 struct nlmsghdr nlh = { local 509 struct nlmsghdr *nlh; local 798 struct nlmsghdr *nlh = nlmsg_hdr(msg); local [all...] |