Searched refs:nlh (Results 1 - 25 of 110) sorted by relevance

12345

/external/libnetfilter_conntrack/src/conntrack/
H A Dbuild_mnl.c17 nfct_build_tuple_ip(struct nlmsghdr *nlh, const struct __nfct_tuple *t) argument
21 nest = mnl_attr_nest_start(nlh, CTA_TUPLE_IP);
27 mnl_attr_put_u32(nlh, CTA_IP_V4_SRC, t->src.v4);
28 mnl_attr_put_u32(nlh, CTA_IP_V4_DST, t->dst.v4);
31 mnl_attr_put(nlh, CTA_IP_V6_SRC, sizeof(struct in6_addr),
33 mnl_attr_put(nlh, CTA_IP_V6_DST, sizeof(struct in6_addr),
37 mnl_attr_nest_cancel(nlh, nest);
40 mnl_attr_nest_end(nlh, nest);
45 nfct_build_tuple_proto(struct nlmsghdr *nlh, const struct __nfct_tuple *t) argument
49 nest = mnl_attr_nest_start(nlh, CTA_TUPLE_PROT
84 nfct_build_tuple_raw(struct nlmsghdr *nlh, const struct __nfct_tuple *t) argument
95 nfct_build_tuple(struct nlmsghdr *nlh, const struct __nfct_tuple *t, int type) argument
114 nfct_build_protoinfo(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
219 nfct_nat_seq_adj(struct nlmsghdr *nlh, const struct nf_conntrack *ct, int dir) argument
231 nfct_build_nat_seq_adj(struct nlmsghdr *nlh, const struct nf_conntrack *ct, int dir) argument
246 nfct_build_protonat(struct nlmsghdr *nlh, const struct nf_conntrack *ct, const struct __nfct_nat *nat) argument
267 nfct_build_nat(struct nlmsghdr *nlh, const struct __nfct_nat *nat, uint8_t l3protonum) argument
285 nfct_build_snat(struct nlmsghdr *nlh, const struct nf_conntrack *ct, uint8_t l3protonum) argument
298 nfct_build_snat_ipv4(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
309 nfct_build_snat_ipv6(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
320 nfct_build_snat_port(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
331 nfct_build_dnat(struct nlmsghdr *nlh, const struct nf_conntrack *ct, uint8_t l3protonum) argument
344 nfct_build_dnat_ipv4(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
355 nfct_build_dnat_ipv6(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
366 nfct_build_dnat_port(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
377 nfct_build_status(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
384 nfct_build_timeout(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
391 nfct_build_mark(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
398 nfct_build_secmark(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
405 nfct_build_helper_name(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
421 nfct_build_zone(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
428 nfct_build_labels(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
442 nfct_nlmsg_build(struct nlmsghdr *nlh, const struct nf_conntrack *ct) argument
[all...]
/external/libnetfilter_conntrack/src/expect/
H A Dbuild_mnl.c16 nfexp_nlmsg_build(struct nlmsghdr *nlh, const struct nf_expect *exp) argument
19 nfct_build_tuple(nlh, &exp->expected.orig, CTA_EXPECT_TUPLE);
22 nfct_build_tuple(nlh, &exp->master.orig, CTA_EXPECT_MASTER);
25 nfct_build_tuple(nlh, &exp->mask.orig, CTA_EXPECT_MASK);
28 mnl_attr_put_u32(nlh, CTA_EXPECT_TIMEOUT, htonl(exp->timeout));
31 mnl_attr_put_u32(nlh, CTA_EXPECT_FLAGS, htonl(exp->flags));
34 mnl_attr_put_u16(nlh, CTA_EXPECT_ZONE, htons(exp->zone));
37 mnl_attr_put_strz(nlh, CTA_EXPECT_HELP_NAME, exp->helper_name);
/external/iproute2/tipc/
H A Dmsg.c33 static int family_id_cb(const struct nlmsghdr *nlh, void *data) argument
36 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
39 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, tb);
48 static struct mnl_socket *msg_send(struct nlmsghdr *nlh) argument
65 ret = mnl_socket_sendto(nl, nlh, nlh->nlmsg_len);
97 static int msg_query(struct nlmsghdr *nlh, mnl_cb_t callback, void *data) argument
103 nlh->nlmsg_seq = seq;
105 nl = msg_send(nlh);
116 struct nlmsghdr *nlh; local
137 msg_doit(struct nlmsghdr *nlh, mnl_cb_t callback, void *data) argument
143 msg_dumpit(struct nlmsghdr *nlh, mnl_cb_t callback, void *data) argument
152 struct nlmsghdr *nlh; local
[all...]
H A Dpeer.c27 static int cmd_peer_rm_addr(struct nlmsghdr *nlh, const struct cmd *cmd, argument
46 if (!(nlh = msg_init(buf, TIPC_NL_PEER_REMOVE))) {
51 nest = mnl_attr_nest_start(nlh, TIPC_NLA_NET);
52 mnl_attr_put_u32(nlh, TIPC_NLA_NET_ADDR, addr);
53 mnl_attr_nest_end(nlh, nest);
55 return msg_doit(nlh, NULL, NULL);
64 static int cmd_peer_rm(struct nlmsghdr *nlh, const struct cmd *cmd, argument
72 return run_cmd(nlh, cmd, cmds, cmdl, NULL);
84 int cmd_peer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, argument
92 return run_cmd(nlh, cm
[all...]
H A Dsocket.c26 static int publ_list_cb(const struct nlmsghdr *nlh, void *data) argument
28 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
32 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
48 struct nlmsghdr *nlh; local
52 if (!(nlh = msg_init(buf, TIPC_NL_PUBL_GET))) {
57 nest = mnl_attr_nest_start(nlh, TIPC_NLA_SOCK);
58 mnl_attr_put_u32(nlh, TIPC_NLA_SOCK_REF, sock);
59 mnl_attr_nest_end(nlh, nest);
61 return msg_dumpit(nlh, publ_list_cb, NULL);
64 static int sock_list_cb(const struct nlmsghdr *nlh, voi argument
104 cmd_socket_list(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
131 cmd_socket(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
[all...]
H A Dbearer.h19 int cmd_bearer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data);
H A Dlink.h17 int cmd_link(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
H A Dmedia.h17 int cmd_media(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
H A Dnametable.h18 int cmd_nametable(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
H A Dnode.h17 int cmd_node(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
H A Dpeer.h17 int cmd_peer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
H A Dsocket.h18 int cmd_socket(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
H A Dmsg.h16 int msg_doit(struct nlmsghdr *nlh, mnl_cb_t callback, void *data);
17 int msg_dumpit(struct nlmsghdr *nlh, mnl_cb_t callback, void *data);
H A Dnode.c27 static int node_list_cb(const struct nlmsghdr *nlh, void *data) argument
30 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
34 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
56 static int cmd_node_list(struct nlmsghdr *nlh, const struct cmd *cmd, argument
66 if (!(nlh = msg_init(buf, TIPC_NL_NODE_GET))) {
71 return msg_dumpit(nlh, node_list_cb, NULL);
74 static int cmd_node_set_addr(struct nlmsghdr *nlh, const struct cmd *cmd, argument
93 if (!(nlh = msg_init(buf, TIPC_NL_NET_SET))) {
98 nest = mnl_attr_nest_start(nlh, TIPC_NLA_NET);
99 mnl_attr_put_u32(nlh, TIPC_NLA_NET_ADD
105 cmd_node_get_addr(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
133 netid_get_cb(const struct nlmsghdr *nlh, void *data) argument
152 cmd_node_get_netid(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
170 cmd_node_set_netid(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
211 cmd_node_set(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
233 cmd_node_get(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
256 cmd_node(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
[all...]
H A Dmedia.c26 static int media_list_cb(const struct nlmsghdr *nlh, void *data) argument
28 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
32 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
45 static int cmd_media_list(struct nlmsghdr *nlh, const struct cmd *cmd, argument
55 if (!(nlh = msg_init(buf, TIPC_NL_MEDIA_GET))) {
60 return msg_dumpit(nlh, media_list_cb, NULL);
63 static int media_get_cb(const struct nlmsghdr *nlh, void *data) argument
66 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
71 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
88 static int cmd_media_get_prop(struct nlmsghdr *nlh, cons argument
143 cmd_media_get(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
166 cmd_media_set_prop(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
224 cmd_media_set(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
249 cmd_media(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data) argument
[all...]
/external/libnl/lib/genl/
H A Dgenl.c104 * @arg nlh Pointer to Netlink message header
117 int genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen) argument
121 if (!nlmsg_valid_hdr(nlh, GENL_HDRLEN))
124 ghdr = nlmsg_data(nlh);
133 * @arg nlh Pointer to Netlink message header
151 int genlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype, argument
156 if (!genlmsg_valid_hdr(nlh, hdrlen))
159 ghdr = nlmsg_data(nlh);
166 * @arg nlh Pointer to Netlink message header
191 int genlmsg_parse(struct nlmsghdr *nlh, in argument
210 genlmsg_hdr(struct nlmsghdr *nlh) argument
226 const struct nlmsghdr *nlh; local
351 struct nlmsghdr *nlh; local
[all...]
/external/libnetfilter_conntrack/src/
H A Dcallback.c12 static int __parse_message(const struct nlmsghdr *nlh) argument
14 uint16_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
15 uint16_t flags = nlh->nlmsg_flags;
32 int __callback(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data) argument
39 uint8_t subsys = NFNL_SUBSYS_ID(nlh->nlmsg_type);
41 if (nlh->nlmsg_len < NLMSG_LENGTH(sizeof(struct nfgenmsg))) {
45 type = __parse_message(nlh);
55 __parse_conntrack(nlh, nfa, ct);
60 ret = container->h->cb2(nlh, type, ct,
69 __parse_expect(nlh, nf
[all...]
/external/wpa_supplicant_8/hostapd/src/drivers/
H A Dpriv_netlink.h53 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \
58 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
59 (int) (nlh)->nlmsg_len <= (len))
60 #define NLMSG_PAYLOAD(nlh,le
[all...]
/external/wpa_supplicant_8/src/drivers/
H A Dpriv_netlink.h53 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \
58 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
59 (int) (nlh)->nlmsg_len <= (len))
60 #define NLMSG_PAYLOAD(nlh,le
[all...]
/external/wpa_supplicant_8/wpa_supplicant/src/drivers/
H A Dpriv_netlink.h53 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
56 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \
58 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
59 (int) (nlh)->nlmsg_len <= (len))
60 #define NLMSG_PAYLOAD(nlh,le
[all...]
/external/libnetfilter_conntrack/examples/
H A Dnfct-mnl-flush.c15 struct nlmsghdr *nlh; local
33 nlh = mnl_nlmsg_put_header(buf);
34 nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK << 8) | IPCTNL_MSG_CT_DELETE;
35 nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_ACK;
36 nlh->nlmsg_seq = seq = time(NULL);
38 nfh = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg));
43 ret = mnl_socket_sendto(nl, nlh, nlh->nlmsg_len);
H A Dnfct-mnl-dump.c10 static int data_cb(const struct nlmsghdr *nlh, void *data) argument
19 nfct_nlmsg_parse(nlh, ct);
32 struct nlmsghdr *nlh; local
50 nlh = mnl_nlmsg_put_header(buf);
51 nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK << 8) | IPCTNL_MSG_CT_GET;
52 nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP;
53 nlh->nlmsg_seq = seq = time(NULL);
55 nfh = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg));
60 ret = mnl_socket_sendto(nl, nlh, nlh
[all...]
H A Dnfexp-mnl-dump.c10 static int data_cb(const struct nlmsghdr *nlh, void *data) argument
20 if (nfexp_nlmsg_parse(nlh, exp) < 0) {
37 struct nlmsghdr *nlh; local
55 nlh = mnl_nlmsg_put_header(buf);
56 nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK_EXP << 8) | IPCTNL_MSG_EXP_GET;
57 nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP|NLM_F_ACK;
58 nlh->nlmsg_seq = seq = time(NULL);
60 nfh = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg));
65 ret = mnl_socket_sendto(nl, nlh, nlh
[all...]
H A Dnfct-mnl-set-label.c20 struct nlmsghdr *nlh; local
48 nlh = mnl_nlmsg_put_header(buf);
49 nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK << 8) | IPCTNL_MSG_CT_NEW;
50 nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_CREATE;
51 nlh->nlmsg_seq = cbargs->seq;
53 nfh = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg));
58 nfct_nlmsg_build(nlh, ct);
60 if (mnl_socket_sendto(cbargs->nl, nlh, nlh->nlmsg_len) < 0)
64 static int data_cb(const struct nlmsghdr *nlh, voi argument
124 struct nlmsghdr *nlh; local
[all...]
H A Dnfct-mnl-create.c15 struct nlmsghdr *nlh; local
34 nlh = mnl_nlmsg_put_header(buf);
35 nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK << 8) | IPCTNL_MSG_CT_NEW;
36 nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_CREATE|NLM_F_EXCL|NLM_F_ACK;
37 nlh->nlmsg_seq = seq = time(NULL);
39 nfh = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg));
63 nfct_nlmsg_build(nlh, ct);
65 ret = mnl_socket_sendto(nl, nlh, nlh->nlmsg_len);

Completed in 812 milliseconds

12345