Motr  M0
m0_net_buffer_event Struct Reference

#include <net.h>

Collaboration diagram for m0_net_buffer_event:
Collaboration graph

Data Fields

struct m0_net_buffernbe_buffer
 
m0_time_t nbe_time
 
int32_t nbe_status
 
m0_bcount_t nbe_length
 
m0_bindex_t nbe_offset
 
struct m0_net_end_pointnbe_ep
 

Detailed Description

Buffer completion events are described by this data structure.

Definition at line 1192 of file net.h.

Field Documentation

◆ nbe_buffer

struct m0_net_buffer* nbe_buffer

Pointer to the buffer

Definition at line 1194 of file net.h.

◆ nbe_ep

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.

Definition at line 1251 of file net.h.

◆ nbe_length

m0_bcount_t nbe_length

Length of the buffer data associated with this event. The field is valid only 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.

Definition at line 1226 of file net.h.

◆ nbe_offset

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.

Definition at line 1238 of file net.h.

◆ nbe_status

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.

Definition at line 1218 of file net.h.

◆ nbe_time

m0_time_t nbe_time

Time the event is posted.

Definition at line 1197 of file net.h.


The documentation for this struct was generated from the following file: