libnl 3.7.0
|
Modules | |
Conntrack | |
Expectation | |
Log | |
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... | |
int nfnl_connect | ( | struct nl_sock * | sk | ) |
Create and connect netfilter netlink socket.
sk | Netlink socket. |
Creates a NETLINK_NETFILTER netlink socket, binds the socket and issues a connection attempt.
Definition at line 80 of file nfnl.c.
References 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.
sk | Netlink socket. |
subsys_id | nfnetlink subsystem |
type | nfnetlink message type |
flags | message flags |
family | nfnetlink address family |
res_id | nfnetlink resource id |
Definition at line 104 of file nfnl.c.
References nl_send_simple().
Referenced by nfnl_ct_dump_request(), and nfnl_exp_dump_request().
uint8_t nfnlmsg_subsys | ( | struct nlmsghdr * | nlh | ) |
uint8_t nfnlmsg_subtype | ( | struct nlmsghdr * | nlh | ) |
uint8_t nfnlmsg_family | ( | struct nlmsghdr * | nlh | ) |
Get netfilter family from message.
nlh | netlink messsage header |
Definition at line 146 of file nfnl.c.
References nlmsg_data().
uint16_t nfnlmsg_res_id | ( | struct nlmsghdr * | nlh | ) |
Get netfilter resource id from message.
nlh | netlink messsage header |
Definition at line 157 of file nfnl.c.
References nlmsg_data().
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.
subsys_id | nfnetlink subsystem |
type | nfnetlink message type |
flags | message flags |
family | nfnetlink address family |
res_id | nfnetlink resource id |
Definition at line 197 of file nfnl.c.
References nlmsg_alloc_simple(), and nlmsg_free().
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.
msg | netlink message |
pid | netlink process id |
seq | sequence number of message |
subsys_id | nfnetlink subsystem |
type | nfnetlink message type |
flags | message flags |
family | nfnetlink address family |
res_id | nfnetlink resource id |
Definition at line 227 of file nfnl.c.
References nlmsg_put().