Motr
M0
|
#include <net.h>
Data Fields | |
enum m0_net_tm_ev_type | nte_type |
struct m0_net_transfer_mc * | nte_tm |
m0_time_t | nte_time |
int32_t | nte_status |
enum m0_net_tm_state | nte_next_state |
struct m0_net_end_point * | nte_ep |
void * | nte_payload |
Data structure used to provide asynchronous notification of significant events, such as the completion of buffer operations, transfer machine state changes and general errors.
All events have the following fields set:
The nte_type field should be referenced to determine the type of event, and which other fields of this structure get set:
This data structure is typically allocated on the stack of the thread that invokes the m0_net_tm_event_post() subroutine. Applications should not attempt to save a reference to it from their callback functions.
struct m0_net_end_point* nte_ep |
enum m0_net_tm_state nte_next_state |
void* nte_payload |
Valid only if the nte_type is M0_NET_TEV_STATE_DIAGNOSTIC.
Transports may use this to point to internal data; they could also choose to embed the event data structure in a transport specific structure appropriate to the event. Either approach would be of use to a diagnostic application.
int32_t nte_status |
Status or error code associated with the event.
In all event types other than M0_NET_TEV_DIAGNOSTIC, 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:
Diagnostic events are free to make any use of this field.
struct m0_net_transfer_mc* nte_tm |
enum m0_net_tm_ev_type nte_type |