/external/libnetfilter_conntrack/src/expect/ |
H A D | build_mnl.c | 16 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);
|
H A D | parse.c | 12 int __parse_expect_message_type(const struct nlmsghdr *nlh) argument 14 uint16_t type = NFNL_MSG_TYPE(nlh->nlmsg_type); 15 uint16_t flags = nlh->nlmsg_flags; 29 void __parse_expect(const struct nlmsghdr *nlh, argument 33 struct nfgenmsg *nfhdr = NLMSG_DATA(nlh);
|
H A D | parse_mnl.c | 50 int nfexp_nlmsg_parse(const struct nlmsghdr *nlh, struct nf_expect *exp) argument 53 struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); 55 mnl_attr_parse(nlh, sizeof(struct nfgenmsg),
|
/external/iproute2/lib/ |
H A D | libgenl.c | 12 static int genl_parse_getfamily(struct nlmsghdr *nlh) argument 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/libnetfilter_conntrack/examples/ |
H A D | nfct-mnl-create.c | 15 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);
|
H A D | nfct-mnl-del.c | 15 struct nlmsghdr *nlh; local 34 nlh = mnl_nlmsg_put_header(buf); 35 nlh->nlmsg_type = (NFNL_SUBSYS_CTNETLINK << 8) | IPCTNL_MSG_CT_DELETE; 36 nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_ACK; 37 nlh->nlmsg_seq = seq = time(NULL); 39 nfh = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg)); 58 nfct_nlmsg_build(nlh, ct); 60 ret = mnl_socket_sendto(nl, nlh, nlh->nlmsg_len);
|
H A D | nfct-mnl-event.c | 9 static int data_cb(const struct nlmsghdr *nlh, void *data) argument 15 switch(nlh->nlmsg_type & 0xFF) { 17 if (nlh->nlmsg_flags & (NLM_F_CREATE|NLM_F_EXCL)) 31 nfct_nlmsg_parse(nlh, ct);
|
H A D | nfct-mnl-flush.c | 15 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 D | nfexp-mnl-event.c | 9 static int data_cb(const struct nlmsghdr *nlh, void *data) argument 15 switch(nlh->nlmsg_type & 0xFF) { 17 if (nlh->nlmsg_flags & (NLM_F_CREATE|NLM_F_EXCL)) 31 nfexp_nlmsg_parse(nlh, exp);
|
H A D | nfct-mnl-dump.c | 10 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 D | nfct-mnl-get.c | 12 static int data_cb(const struct nlmsghdr *nlh, void *data) argument 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, nl [all...] |
H A D | nfexp-mnl-dump.c | 10 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 D | nfct-mnl-dump-labels.c | 23 static int data_cb(const struct nlmsghdr *nlh, void *data) argument 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 [all...] |
/external/libnl/tests/ |
H A D | check-attr.c | 54 struct nlmsghdr *nlh; local 66 nlh = nlmsg_hdr(msg); 68 nlmsg_for_each_attr(a, nlh, 0, rem) {
|
/external/iproute2/tipc/ |
H A D | peer.c | 27 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 D | nametable.c | 26 static int nametable_show_cb(const struct nlmsghdr *nlh, void *data) argument 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, argument 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, argument 108 return run_cmd(nlh, cmd, cmds, cmdl, NULL);
|
H A D | socket.c | 26 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 D | cmdl.c | 100 int run_cmd(struct nlmsghdr *nlh, const struct cmd *caller, argument 126 return (cmd->func)(nlh, cmd, cmdl, data);
|
H A D | media.c | 26 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...] |
H A D | msg.c | 33 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...] |
/external/libnetfilter_conntrack/src/ |
H A D | callback.c | 12 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/libnl/src/ |
H A D | nl-fib-lookup.c | 28 struct nl_sock *nlh; local 76 nlh = nl_cli_alloc_socket(); 100 nl_cli_connect(nlh, NETLINK_FIB_LOOKUP); 102 err = flnl_lookup(nlh, request, result);
|
/external/strace/tests/ |
H A D | netlink_netlink_diag.c | 51 struct nlmsghdr nlh; member in struct:__anon17950 54 .nlh = {
|
/external/strace/tests-m32/ |
H A D | netlink_netlink_diag.c | 51 struct nlmsghdr nlh; member in struct:__anon18018 54 .nlh = {
|
/external/strace/tests-mx32/ |
H A D | netlink_netlink_diag.c | 51 struct nlmsghdr nlh; member in struct:__anon18086 54 .nlh = {
|