NewMadeleine

Documentation

« back to PM2 home.
nm_minidriver_iface_s Struct Reference

Interface driver for the 'NewMad_minidriver' component interface. More...

#include <nm_minidriver.h>

Data Fields

void(* getprops )(puk_context_t context, struct nm_minidriver_properties_s *props)
 get driver properties (profiling and capabilities)
 
void(* init )(puk_context_t context, const void **drv_url, size_t *url_size)
 init the driver and get its url
 
void(* close )(puk_context_t context)
 close the driver
 
void(* connect_async )(void *_status, const void *remote_url, size_t url_size)
 asynchronously start the connect process
 
void(* connect_wait )(void *_status)
 wait for a previously posted connect_async to complete
 
void(* disconnect )(void *_status)
 disconnect this instance
 
int(* send_pkt_buf_get )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 get a buffer from the driver for sending;
 
int(* send_pkt_post )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 post a send request for data described in pkt;
 
int(* send_pkt_poll )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 poll a send operation already posted;
 
int(* send_pkt_wait )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 wait for completion of a send operation already posted
 
int(* recv_pkt_post )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 post a pkt recv
 
int(* recv_pkt_poll )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 poll a recv operation already posted.
 
int(* recv_pkt_buf_release )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 release a buffer for buffer-based receive.
 
int(* recv_pkt_wait )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 wait for completion of a recv operation already posted
 
int(* recv_pkt_cancel )(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
 cancel a posted recv
 
int(* recv_probe_any )(puk_context_t p_context, void **_status) __attribute__((warn_unused_result))
 poll the driver for a pending recv from any source; returns status of instance
 
int(* recv_wait_any )(puk_context_t p_context, void **_status) __attribute__((warn_unused_result))
 passively wait for a pending recv from any source; return status of instance
 
int(* recv_cancel_any )(puk_context_t p_context) __attribute__((warn_unused_result))
 cancel a recv_wait_any
 
void(* send_pkt_prefetch )(void *_status, struct nm_pkt_s *p_pkt)
 prefetch data in driver buffers before send_pkt_post; calling it is optional
 
void(* send_pkt_unfetch )(void *_status, struct nm_pkt_s *p_pkt)
 cancel a prefetch; a prefetch is assumed to always be followed by either 'send' or 'unfetch'
 
void(* recv_pkt_prefetch )(puk_context_t p_context, struct nm_pkt_s *p_pkt)
 prefetch recv, i.e.
 
void(* recv_pkt_unfetch )(puk_context_t p_context, struct nm_pkt_s *p_pkt)
 cancel a prefetch recv; a prefetch is assupmed to always be followed either by 'recv' or 'unfetch'
 

Detailed Description

Interface driver for the 'NewMad_minidriver' component interface.

A simple driver interface, fully encapsulated. See Minidriver interface

Definition at line 351 of file nm_minidriver.h.

Field Documentation

◆ close

void(* nm_minidriver_iface_s::close) (puk_context_t context)

close the driver

Definition at line 360 of file nm_minidriver.h.

Referenced by nm_minidriver_close().

◆ connect_async

void(* nm_minidriver_iface_s::connect_async) (void *_status, const void *remote_url, size_t url_size)

asynchronously start the connect process

Definition at line 365 of file nm_minidriver.h.

◆ connect_wait

void(* nm_minidriver_iface_s::connect_wait) (void *_status)

wait for a previously posted connect_async to complete

Definition at line 367 of file nm_minidriver.h.

◆ disconnect

void(* nm_minidriver_iface_s::disconnect) (void *_status)

disconnect this instance

Definition at line 369 of file nm_minidriver.h.

◆ getprops

void(* nm_minidriver_iface_s::getprops) (puk_context_t context, struct nm_minidriver_properties_s *props)

get driver properties (profiling and capabilities)

Definition at line 356 of file nm_minidriver.h.

Referenced by nm_minidriver_getprops().

◆ init

void(* nm_minidriver_iface_s::init) (puk_context_t context, const void **drv_url, size_t *url_size)

init the driver and get its url

Definition at line 358 of file nm_minidriver.h.

Referenced by nm_minidriver_init().

◆ recv_cancel_any

int(* nm_minidriver_iface_s::recv_cancel_any) (puk_context_t p_context) __attribute__((warn_unused_result))

cancel a recv_wait_any

Returns
status: NM_ESUCCESS in case of successful cancelation -NM_EALREADY in case request already completed (too late to cancel)

Definition at line 451 of file nm_minidriver.h.

◆ recv_pkt_buf_release

int(* nm_minidriver_iface_s::recv_pkt_buf_release) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

release a buffer for buffer-based receive.

Note
called from a locked section. No I/O nor locking may be done in this function

Definition at line 418 of file nm_minidriver.h.

◆ recv_pkt_cancel

int(* nm_minidriver_iface_s::recv_pkt_cancel) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

cancel a posted recv

Returns
status: NM_ESUCCESS in case of successful cancelation -NM_EALREADY in case request already completed (too late to cancel)

Definition at line 430 of file nm_minidriver.h.

◆ recv_pkt_poll

int(* nm_minidriver_iface_s::recv_pkt_poll) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

poll a recv operation already posted.

In case of buffer-based operation, no pkt needs to be posted previously, and recv_pkt_poll fills p_pkt->buf

Returns
status: NM_ESUCCESS in case of completed recv -NM_EAGAIN if no packet is received -NM_EINPROGRESS if posting is still in progress -NM_ENOTPOSTED if the pkt was not posted another error code in case of error

Definition at line 415 of file nm_minidriver.h.

◆ recv_pkt_post

int(* nm_minidriver_iface_s::recv_pkt_post) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

post a pkt recv

Returns
status: NM_ESUCCESS for successfull posting -NM_EINPROGRESS if posting is not completed yet; call recv_pkt_poll for an updated status another error code in case of error

Definition at line 404 of file nm_minidriver.h.

◆ recv_pkt_prefetch

void(* nm_minidriver_iface_s::recv_pkt_prefetch) (puk_context_t p_context, struct nm_pkt_s *p_pkt)

prefetch recv, i.e.

begin memory registration even before rdv is received

Definition at line 460 of file nm_minidriver.h.

◆ recv_pkt_unfetch

void(* nm_minidriver_iface_s::recv_pkt_unfetch) (puk_context_t p_context, struct nm_pkt_s *p_pkt)

cancel a prefetch recv; a prefetch is assupmed to always be followed either by 'recv' or 'unfetch'

Definition at line 462 of file nm_minidriver.h.

◆ recv_pkt_wait

int(* nm_minidriver_iface_s::recv_pkt_wait) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

wait for completion of a recv operation already posted

Returns
status: NM_ESUCCESS in case of success -NM_ECANCELED in case wait was canceled (no pkt available)

Definition at line 424 of file nm_minidriver.h.

◆ recv_probe_any

int(* nm_minidriver_iface_s::recv_probe_any) (puk_context_t p_context, void **_status) __attribute__((warn_unused_result))

poll the driver for a pending recv from any source; returns status of instance

Returns
status: NM_ESUCCESS if a packet is avilable (_status is filled) -NM_EAGAIN if no packet is available

Definition at line 439 of file nm_minidriver.h.

Referenced by nm_minidriver_recv_probe_any().

◆ recv_wait_any

int(* nm_minidriver_iface_s::recv_wait_any) (puk_context_t p_context, void **_status) __attribute__((warn_unused_result))

passively wait for a pending recv from any source; return status of instance

Returns
status: NM_ESUCCESS in case of success -NM_ECANCELED in case wait was canceled (no pkt available)

Definition at line 445 of file nm_minidriver.h.

◆ send_pkt_buf_get

int(* nm_minidriver_iface_s::send_pkt_buf_get) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

get a buffer from the driver for sending;

Returns
status: NM_ESUCCESS in case of success (buffer available, filled in p_pkt) -NM_ENOMEM in case no buffer is available (retry later).
Note
called from a locked section. No I/O nor locking may be done in this function

Definition at line 379 of file nm_minidriver.h.

◆ send_pkt_poll

int(* nm_minidriver_iface_s::send_pkt_poll) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

poll a send operation already posted;

Returns
status: NM_ESUCCESS if send operation completed -NM_EAGAIN if not completed -NM_EINPROGRESS if posting still in progress

Definition at line 392 of file nm_minidriver.h.

◆ send_pkt_post

int(* nm_minidriver_iface_s::send_pkt_post) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

post a send request for data described in pkt;

Returns
status: NM_ESUCCESS in case of success -NM_EINPROGRESS if posting is not completed yet; call send_pkt_poll for an updated status

Definition at line 385 of file nm_minidriver.h.

◆ send_pkt_prefetch

void(* nm_minidriver_iface_s::send_pkt_prefetch) (void *_status, struct nm_pkt_s *p_pkt)

prefetch data in driver buffers before send_pkt_post; calling it is optional

Definition at line 456 of file nm_minidriver.h.

◆ send_pkt_unfetch

void(* nm_minidriver_iface_s::send_pkt_unfetch) (void *_status, struct nm_pkt_s *p_pkt)

cancel a prefetch; a prefetch is assumed to always be followed by either 'send' or 'unfetch'

Definition at line 458 of file nm_minidriver.h.

◆ send_pkt_wait

int(* nm_minidriver_iface_s::send_pkt_wait) (void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))

wait for completion of a send operation already posted

Definition at line 394 of file nm_minidriver.h.


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