Motr
M0
|
#include <net.h>
Data Fields | |
struct m0_net_buffer * | nbe_buffer |
m0_time_t | nbe_time |
int32_t | nbe_status |
m0_bcount_t | nbe_length |
m0_bindex_t | nbe_offset |
struct m0_net_end_point * | nbe_ep |
Buffer completion events are described by this data structure.
struct m0_net_buffer* nbe_buffer |
struct m0_net_end_point* nbe_ep |
This field is used only in successful completion of buffers in the received message queue (M0_NET_QT_MSG_RECV). The transport will set the end point to identify the sender of the message before invoking the completion callback on the buffer.
The end point will be released when the callback returns, so applications should increment the reference count on the end point with m0_net_end_point_get(), if they wish to dereference the pointer in a different context.
m0_bcount_t nbe_length |
m0_bindex_t nbe_offset |
Starting offset of the buffer data associated with this event, if the event is posted for the M0_NET_QT_MSG_RECV, M0_NET_QT_PASSIVE_BULK_RECV or M0_NET_QT_ACTIVE_BULK_RECV queues.
Provided for future support of multi-delivery buffer transports. Applications should take it into consideration when determining the starting location of the event data in the buffer.
int32_t nbe_status |
Status or error code associated with the event.
A 0 in this field implies successful completion, and a negative error number is used to indicate the reasons for failure.
The following errors are well defined:
- -ECANCELED. This is used in buffer release events to indicate that the associated buffer operation was cancelled by a call to m0_net_buffer_del(). - -ETIMEDOUT. This is used in buffer release events to indicate that the associated buffer operation did not complete before the current time exceeded the nb_timeout value. The support for this feature is transport specific. The nb_timeout value is always reset to M0_TIME_NEVER by the time the buffer callback is invoked.