|
libnetfilter_conntrack
1.0.6
|
Functions | |
| int | nfct_callback_register (struct nfct_handle *h, enum nf_conntrack_msg_type type, int(*cb)(enum nf_conntrack_msg_type type, struct nf_conntrack *ct, void *data), void *data) |
| void | nfct_callback_unregister (struct nfct_handle *h) |
| int | nfct_callback_register2 (struct nfct_handle *h, enum nf_conntrack_msg_type type, int(*cb)(const struct nlmsghdr *nlh, enum nf_conntrack_msg_type type, struct nf_conntrack *ct, void *data), void *data) |
| void | nfct_callback_unregister2 (struct nfct_handle *h) |
| int | nfexp_callback_register (struct nfct_handle *h, enum nf_conntrack_msg_type type, int(*cb)(enum nf_conntrack_msg_type type, struct nf_expect *exp, void *data), void *data) |
| void | nfexp_callback_unregister (struct nfct_handle *h) |
| int | nfexp_callback_register2 (struct nfct_handle *h, enum nf_conntrack_msg_type type, int(*cb)(const struct nlmsghdr *nlh, enum nf_conntrack_msg_type type, struct nf_expect *exp, void *data), void *data) |
| void | nfexp_callback_unregister2 (struct nfct_handle *h) |
| struct nfct_handle * | nfct_open (uint8_t subsys_id, unsigned subscriptions) |
| int | nfct_close (struct nfct_handle *cth) |
| int | nfct_fd (struct nfct_handle *cth) |
| const struct nfnl_handle * | nfct_nfnlh (struct nfct_handle *cth) |
| int nfct_callback_register | ( | struct nfct_handle * | h, |
| enum nf_conntrack_msg_type | type, | ||
| int(*)(enum nf_conntrack_msg_type type, struct nf_conntrack *ct, void *data) | cb, | ||
| void * | data | ||
| ) |
nf_callback_register - register a callback
| h | library handler |
| type | message type (see enum nf_conntrack_msg_type definition) |
| cb | callback used to process conntrack received |
| data | data used by the callback, if any. |
This function register a callback to handle the conntrack received, in case of error -1 is returned and errno is set appropiately, otherwise 0 is returned.
Note that the data parameter is optional, if you do not want to pass any data to your callback, then use NULL.
Definition at line 223 of file conntrack/api.c.
| int nfct_callback_register2 | ( | struct nfct_handle * | h, |
| enum nf_conntrack_msg_type | type, | ||
| int(*)(const struct nlmsghdr *nlh, enum nf_conntrack_msg_type type, struct nf_conntrack *ct, void *data) | cb, | ||
| void * | data | ||
| ) |
nf_callback_register2 - register a callback
| h | library handler |
| cb | callback used to process conntrack received |
| data | data used by the callback, if any. |
This function register a callback to handle the conntrack received, in case of error -1 is returned and errno is set appropiately, otherwise 0 is returned.
Note that the data parameter is optional, if you do not want to pass any data to your callback, then use NULL.
NOTICE: The difference with nf_callback_register() is that this function uses the new callback interface that includes the Netlink header.
WARNING: Don't mix nf_callback_register() and nf_callback_register2() calls, use only once at a time.
Definition at line 297 of file conntrack/api.c.
| void nfct_callback_unregister | ( | struct nfct_handle * | h | ) |
nfct_callback_unregister - unregister a callback
| h | library handler |
Definition at line 263 of file conntrack/api.c.
| void nfct_callback_unregister2 | ( | struct nfct_handle * | h | ) |
nfct_callback_unregister2 - unregister a callback
| h | library handler |
Definition at line 337 of file conntrack/api.c.
| int nfct_close | ( | struct nfct_handle * | cth | ) |
nfct_close - close a ctnetlink handler
| cth | handler obtained via nfct_open() |
This function returns -1 on error and errno is explicitly set.
| int nfct_fd | ( | struct nfct_handle * | cth | ) |
nfct_fd - get the Netlink file descriptor of one existing ctnetlink handler
| cth | handler obtained via nfct_open() |
| struct nfct_handle* nfct_open | ( | uint8_t | subsys_id, |
| unsigned | subscriptions | ||
| ) |
nfct_open - open a ctnetlink handler
| subsys_id | can be NFNL_SUBSYS_CTNETLINK or NFNL_SUBSYS_CTNETLINK_EXP |
| subscriptions | ctnetlink groups to subscribe to events |
This function returns a handler to send commands to and receive replies from kernel-space. You can pass the following subsystem IDs:
On error, NULL is returned and errno is explicitly set.
| int nfexp_callback_register | ( | struct nfct_handle * | h, |
| enum nf_conntrack_msg_type | type, | ||
| int(*)(enum nf_conntrack_msg_type type, struct nf_expect *exp, void *data) | cb, | ||
| void * | data | ||
| ) |
nfexp_callback_register - register a callback
| h | library handler |
| cb | callback used to process expect received |
| data | data used by the callback, if any. |
This function register a callback to handle the expect received, in case of error -1 is returned and errno is set appropiately, otherwise 0 is returned.
Note that the data parameter is optional, if you do not want to pass any data to your callback, then use NULL.
Definition at line 157 of file expect/api.c.
| int nfexp_callback_register2 | ( | struct nfct_handle * | h, |
| enum nf_conntrack_msg_type | type, | ||
| int(*)(const struct nlmsghdr *nlh, enum nf_conntrack_msg_type type, struct nf_expect *exp, void *data) | cb, | ||
| void * | data | ||
| ) |
nfexp_callback_register2 - register a callback
| h | library handler |
| cb | callback used to process expect received |
| data | data used by the callback, if any. |
This function register a callback to handle the expect received, in case of error -1 is returned and errno is set appropiately, otherwise 0 is returned.
Note that the data parameter is optional, if you do not want to pass any data to your callback, then use NULL.
NOTICE: The difference with nfexp_callback_register() is that this function uses the new callback interface that includes the Netlink header.
WARNING: Don't mix nfexp_callback_register() and nfexp_callback_register2() calls, use only once at a time.
Definition at line 231 of file expect/api.c.
| void nfexp_callback_unregister | ( | struct nfct_handle * | h | ) |
nfexp_callback_unregister - unregister a callback
| h | library handler |
Definition at line 197 of file expect/api.c.
| void nfexp_callback_unregister2 | ( | struct nfct_handle * | h | ) |
nfexp_callback_unregister2 - unregister a callback
| h | library handler |
Definition at line 272 of file expect/api.c.
1.8.8