Modules | |
Conntrack object handling | |
Log | |
nf_tables | |
Queue | |
Socket Creating | |
int | nfnl_connect (struct nl_sock *sk) |
Create and connect netfilter netlink socket. More... | |
Sending | |
int | nfnl_send_simple (struct nl_sock *sk, uint8_t subsys_id, uint8_t type, int flags, uint8_t family, uint16_t res_id) |
Send trivial netfilter netlink message. More... | |
Message Parsing | |
uint8_t | nfnlmsg_subsys (struct nlmsghdr *nlh) |
Get netfilter subsystem id from message. More... | |
uint8_t | nfnlmsg_subtype (struct nlmsghdr *nlh) |
Get netfilter message type from message. More... | |
uint8_t | nfnlmsg_family (struct nlmsghdr *nlh) |
Get netfilter family from message. More... | |
uint16_t | nfnlmsg_res_id (struct nlmsghdr *nlh) |
Get netfilter resource id from message. More... | |
Message Building | |
struct nl_msg * | nfnlmsg_alloc_simple (uint8_t subsys_id, uint8_t type, int flags, uint8_t family, uint16_t res_id) |
Allocate a new netfilter netlink message. More... | |
int | nfnlmsg_put (struct nl_msg *msg, uint32_t pid, uint32_t seq, uint8_t subsys_id, uint8_t type, int flags, uint8_t family, uint16_t res_id) |
Add netlink and netfilter netlink headers to netlink message. More... | |
Create and connect netfilter netlink socket.
Creates a NETLINK_NETFILTER netlink socket, binds the socket and issues a connection attempt.
References NETLINK_NETFILTER, and nl_connect().
int nfnl_send_simple | ( | struct nl_sock * | sk, |
uint8_t | subsys_id, | ||
uint8_t | type, | ||
int | flags, | ||
uint8_t | family, | ||
uint16_t | res_id | ||
) |
Send trivial netfilter netlink message.
References nfgenmsg::nfgen_family, NFNETLINK_V0, NFNLMSG_TYPE, and nl_send_simple().
Referenced by nfnl_ct_dump_request(), nfnl_nft_chain_dump_request(), nfnl_nft_rule_dump_request(), and nfnl_nft_table_dump_request().
struct nl_msg* nfnlmsg_alloc_simple | ( | uint8_t | subsys_id, |
uint8_t | type, | ||
int | flags, | ||
uint8_t | family, | ||
uint16_t | res_id | ||
) |
Allocate a new netfilter netlink message.
References NFNLMSG_TYPE, nlmsg_alloc_simple(), nlmsg_free(), and NULL.
Referenced by nfnl_queue_msg_build_verdict().
Get netfilter family from message.
References nfgenmsg::nfgen_family, and nlmsg_data().
Referenced by nfnlmsg_ct_parse(), nfnlmsg_log_msg_parse(), nfnlmsg_nft_chain_parse(), nfnlmsg_nft_rule_parse(), nfnlmsg_nft_set_parse(), nfnlmsg_nft_table_parse(), and nfnlmsg_queue_msg_parse().
int nfnlmsg_put | ( | struct nl_msg * | msg, |
uint32_t | pid, | ||
uint32_t | seq, | ||
uint8_t | subsys_id, | ||
uint8_t | type, | ||
int | flags, | ||
uint8_t | family, | ||
uint16_t | res_id | ||
) |
Add netlink and netfilter netlink headers to netlink message.
References NFNLMSG_TYPE, NLE_MSGSIZE, nlh, nlmsg_put(), and NULL.
Referenced by nfnl_nft_set_dump_request(), and nfnl_nft_setelem_dump_request().
Get netfilter resource id from message.
References nlmsg_data(), and nfgenmsg::res_id.
Referenced by nfnlmsg_queue_msg_parse().
Get netfilter subsystem id from message.
References NFNL_SUBSYS_ID, and nlmsghdr::nlmsg_type.
Get netfilter message type from message.
References NFNL_MSG_TYPE, and nlmsghdr::nlmsg_type.
Referenced by nfnlmsg_ct_group().