/external/libnetfilter_conntrack/src/conntrack/ |
build_mnl.c | 17 nfct_build_tuple_ip(struct nlmsghdr *nlh, const struct __nfct_tuple *t) 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) 49 nest = mnl_attr_nest_start(nlh, CTA_TUPLE_PROTO) [all...] |
/external/libnetfilter_conntrack/src/expect/ |
build_mnl.c | 16 nfexp_nlmsg_build(struct nlmsghdr *nlh, const struct nf_expect *exp) 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/ |
msg.c | 33 static int family_id_cb(const struct nlmsghdr *nlh, void *data) 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) 65 ret = mnl_socket_sendto(nl, nlh, nlh->nlmsg_len); 97 static int msg_query(struct nlmsghdr *nlh, mnl_cb_t callback, void *data) 103 nlh->nlmsg_seq = seq; 105 nl = msg_send(nlh); 116 struct nlmsghdr *nlh; local 152 struct nlmsghdr *nlh; local [all...] |
peer.c | 27 static int cmd_peer_rm_addr(struct nlmsghdr *nlh, const struct cmd *cmd, 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, 72 return run_cmd(nlh, cmd, cmds, cmdl, NULL); 84 int cmd_peer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, 92 return run_cmd(nlh, cmd, cmds, cmdl, NULL) [all...] |
socket.c | 26 static int publ_list_cb(const struct nlmsghdr *nlh, void *data) 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, void *data [all...] |
bearer.h | 19 int cmd_bearer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data);
|
link.h | 17 int cmd_link(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
|
media.h | 17 int cmd_media(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
|
nametable.h | 18 int cmd_nametable(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
|
node.h | 17 int cmd_node(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
|
peer.h | 17 int cmd_peer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
|
socket.h | 18 int cmd_socket(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
|
/external/libnl/lib/genl/ |
genl.c | 104 * @arg nlh Pointer to Netlink message header 117 int genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen) 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, 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, int hdrlen, struct nlattr *tb[] 226 const struct nlmsghdr *nlh; local 351 struct nlmsghdr *nlh; local [all...] |
/development/ndk/platforms/android-9/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/external/libnetfilter_conntrack/src/ |
callback.c | 12 static int __parse_message(const struct nlmsghdr *nlh) 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) 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, nfa, exp) [all...] |
/external/wpa_supplicant_8/src/drivers/ |
priv_netlink.h | 53 #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,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8/sysroot/usr/include/linux/ |
netlink.h | 82 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 83 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 84 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 85 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ 86 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ 87 (nlh)->nlmsg_len <= (len)) 88 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/ndk/r10/platforms/android-12/arch-arm/usr/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/ndk/r10/platforms/android-12/arch-mips/usr/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/ndk/r10/platforms/android-12/arch-x86/usr/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/ndk/r10/platforms/android-13/arch-arm/usr/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/ndk/r10/platforms/android-13/arch-mips/usr/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/ndk/r10/platforms/android-13/arch-x86/usr/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/ndk/r10/platforms/android-14/arch-arm/usr/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |
/prebuilts/ndk/r10/platforms/android-14/arch-mips/usr/include/linux/ |
netlink.h | 75 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 76 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 77 #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 78 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)) [all...] |