Functions | |
int | mnl_cb_run2 (const void *buf, size_t numbytes, unsigned int seq, unsigned int portid, mnl_cb_t cb_data, void *data, mnl_cb_t *cb_ctl_array, unsigned int cb_ctl_array_len) |
mnl_cb_run2 - callback runqueue for netlink messages More... | |
EXPORT_SYMBOL (mnl_cb_run2) | |
int | mnl_cb_run (const void *buf, size_t numbytes, unsigned int seq, unsigned int portid, mnl_cb_t cb_data, void *data) |
mnl_cb_run - callback runqueue for netlink messages (simplified version) More... | |
EXPORT_SYMBOL (mnl_cb_run) | |
EXPORT_SYMBOL | ( | mnl_cb_run2 | ) |
EXPORT_SYMBOL | ( | mnl_cb_run | ) |
int mnl_cb_run | ( | const void * | buf, |
size_t | numbytes, | ||
unsigned int | seq, | ||
unsigned int | portid, | ||
mnl_cb_t | cb_data, | ||
void * | data | ||
) |
mnl_cb_run - callback runqueue for netlink messages (simplified version)
buf | buffer that contains the netlink messages |
numbytes | number of bytes stored in the buffer |
seq | sequence number that we expect to receive |
portid | Netlink PortID that we expect to receive |
cb_data | callback handler for data messages |
data | pointer to data that will be passed to the data callback handler |
This function is like mnl_cb_run2() but it does not allow you to set the control callback handlers.
Your callback may return three possible values:
This function propagates the callback return value.
References NULL.
Referenced by handle_qacb(), mnl_batch_supported(), mnl_batch_talk(), mnl_talk(), nfct_mnl_talk(), nft_batch_is_supported(), nft_compatible_revision(), and xtables_events_main().
int mnl_cb_run2 | ( | const void * | buf, |
size_t | numbytes, | ||
unsigned int | seq, | ||
unsigned int | portid, | ||
mnl_cb_t | cb_data, | ||
void * | data, | ||
mnl_cb_t * | cb_ctl_array, | ||
unsigned int | cb_ctl_array_len | ||
) |
mnl_cb_run2 - callback runqueue for netlink messages
buf | buffer that contains the netlink messages |
numbytes | number of bytes stored in the buffer |
seq | sequence number that we expect to receive |
portid | Netlink PortID that we expect to receive |
cb_data | callback handler for data messages |
data | pointer to data that will be passed to the data callback handler |
cb_ctl_array | array of custom callback handlers from control messages |
cb_ctl_array_len | array length of custom control callback handlers |
You can set the cb_ctl_array to NULL if you want to use the default control callback handlers, in that case, the parameter cb_ctl_array_len is not checked.
Your callback may return three possible values:
This function propagates the callback return value. On error, it returns -1 and errno is explicitly set. If the portID is not the expected, errno is set to ESRCH. If the sequence number is not the expected, errno is set to EPROTO. If the dump was interrupted, errno is set to EINTR and you should request a new fresh dump again.