Man page - mnl_cb_run(3)
Packages contains this manual
- mnl_nlmsg_batch_next(3)
- mnl_attr_put_str(3)
- mnl_attr_put(3)
- mnl_attr_next(3)
- mnl_attr_get_str(3)
- mnl_attr_ok(3)
- mnl_nlmsg_ok(3)
- mnl_nlmsg_batch_reset(3)
- mnl_nlmsg_next(3)
- mnl_nlmsg_portid_ok(3)
- mnl_nlmsg_batch_is_empty(3)
- mnl_attr_nest_cancel(3)
- mnl_attr_get_u16(3)
- mnl_nlmsg_batch_stop(3)
- mnl_attr_parse_payload(3)
- mnl_nlmsg_seq_ok(3)
- mnl_socket_sendto(3)
- mnl_attr_get_u64(3)
- mnl_attr_put_strz_check(3)
- mnl_cb_run2(3)
- mnl_attr_parse(3)
- mnl_attr_parse_nested(3)
- mnl_nlmsg_put_header(3)
- mnl_nlmsg_fprintf(3)
- mnl_socket_get_portid(3)
- mnl_attr_validate(3)
- mnl_attr_get_u8(3)
- mnl_socket_open(3)
- mnl_nlmsg_put_extra_header(3)
- mnl_attr_put_u64(3)
- mnl_attr_put_str_check(3)
- mnl_attr_put_strz(3)
- mnl_attr_validate2(3)
- mnl_nlmsg_get_payload_len(3)
- mnl_nlmsg_get_payload(3)
- mnl_attr_get_payload(3)
- mnl_socket_fdopen(3)
- mnl_nlmsg_get_payload_offset(3)
- mnl_attr_get_payload_len(3)
- mnl_attr_put_u8_check(3)
- mnl_nlmsg_batch_head(3)
- mnl_attr_nest_end(3)
- mnl_attr_put_u8(3)
- mnl_attr_get_u32(3)
- mnl_attr_type_valid(3)
- mnl_socket_setsockopt(3)
- mnl_socket_close(3)
- mnl_attr_put_u16_check(3)
- mnl_socket_open2(3)
- mnl_cb_run(3)
- mnl_socket_bind(3)
- mnl_attr_put_u32_check(3)
- mnl_socket_getsockopt(3)
- mnl_nlmsg_get_payload_tail(3)
- mnl_attr_nest_start(3)
- mnl_nlmsg_size(3)
- mnl_attr_put_u16(3)
- mnl_socket_get_fd(3)
- mnl_attr_put_check(3)
- mnl_nlmsg_batch_current(3)
- mnl_attr_put_u32(3)
- mnl_attr_put_u64_check(3)
- mnl_attr_get_len(3)
- mnl_nlmsg_batch_size(3)
- mnl_nlmsg_batch_start(3)
- mnl_attr_nest_start_check(3)
- mnl_attr_get_type(3)
- mnl_socket_recvfrom(3)
apt-get install libmnl-doc
Manual
callback
NAMESYNOPSIS
Functions
Detailed Description
Function Documentation
int mnl_cb_run (const void * buf, size_t numbytes, unsigned int seq,unsigned int portid, mnl_cb_t cb_data, void * data)
int mnl_cb_run2 (const void * buf, size_t numbytes, unsigned int seq,unsigned int portid, mnl_cb_t cb_data, void * data, const mnl_cb_t *cb_ctl_array, unsigned int cb_ctl_array_len)
Author
NAME
callback - Callback helpers
SYNOPSIS
Functions
int
mnl_cb_run2
(const void *buf, size_t numbytes,
unsigned int seq, unsigned int portid, mnl_cb_t cb_data,
void *data, const mnl_cb_t *cb_ctl_array, unsigned int
cb_ctl_array_len)
int
mnl_cb_run
(const void *buf, size_t numbytes,
unsigned int seq, unsigned int portid, mnl_cb_t cb_data,
void *data)
Detailed Description
Function Documentation
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)
Parameters
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:
|
• |
MNL_CB_ERROR (<=-1): an error has occurred. Stop callback runqueue. |
|||
|
• |
MNL_CB_STOP (=0): stop callback runqueue. |
|||
|
• |
MNL_CB_OK (>=1): no problems has occurred. |
This function propagates the callback return value.
Definition at line 159 of file callback.c .
int mnl_cb_run2 (const void * buf, size_t numbytes, unsigned int seq,unsigned int portid, mnl_cb_t cb_data, void * data, const mnl_cb_t *cb_ctl_array, unsigned int cb_ctl_array_len)
mnl_cb_run2 - callback runqueue for netlink messages
Parameters
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:
|
• |
MNL_CB_ERROR (<=-1): an error has occurred. Stop callback runqueue. |
|||
|
• |
MNL_CB_STOP (=0): stop callback runqueue. |
|||
|
• |
MNL_CB_OK (>=1): no problem has occurred. |
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.
Definition at line 130 of file callback.c .
Author
Generated automatically by Doxygen for libmnl from the source code.