NewMadeleine

Documentation

« back to PM2 home.
nm_minidriver_interface.h File Reference

frontend to directly use Minidriver components. More...

#include <nm_minidriver.h>
#include <nm_public.h>
#include <nm_errno.h>
#include <nm_parameters.h>
#include <sys/uio.h>
Include dependency graph for nm_minidriver_interface.h:

Go to the source code of this file.

Macros

#define NM_MINIDRIVER_CHECK_RC(OP, RC)
 

Functions

static void nm_minidriver_getprops (const struct nm_minidriver_iface_s *p_minidriver, puk_context_t p_context, struct nm_minidriver_properties_s *p_props)
 
static void nm_minidriver_init (const struct nm_minidriver_iface_s *p_minidriver, puk_context_t p_context, const void **drv_url, size_t *url_size)
 
static void nm_minidriver_close (const struct nm_minidriver_iface_s *p_minidriver, puk_context_t p_context)
 
static void nm_minidriver_connect (struct puk_receptacle_NewMad_minidriver_s *r, const void *remote_url, size_t url_size)
 
static void nm_minidriver_disconnect (struct puk_receptacle_NewMad_minidriver_s *r)
 
static void nm_minidriver_send_pkt_build (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props __attribute__((unused)), struct nm_pkt_s *p_pkt, const void *buf, size_t len)
 build a pkt suitable for sending on the given driver
 
static void nm_minidriver_isend (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props __attribute__((unused)), struct nm_pkt_s *p_pkt)
 
static int nm_minidriver_spoll (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props, struct nm_pkt_s *p_pkt)
 
static void nm_minidriver_send (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props, const void *buf, size_t len)
 
static void nm_minidriver_recv_pkt_build (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props __attribute__((unused)), struct nm_pkt_s *p_pkt, const void *buf, size_t len)
 build a pkt suitable for receive on the given driver
 
static void nm_minidriver_irecv (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props __attribute__((unused)), struct nm_pkt_s *p_pkt)
 
static int nm_minidriver_rpoll (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props __attribute__((unused)), struct nm_pkt_s *p_pkt)
 
static void nm_minidriver_recv (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props, void *buf, size_t len)
 
static void nm_minidriver_recv_probe_any (const struct nm_minidriver_iface_s *p_minidriver, puk_context_t p_context, void **_status)
 
static int nm_minidriver_recv_cancel (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props __attribute__((unused)), struct nm_pkt_s *p_pkt)
 
static void nm_minidriver_recv_rdv (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props __attribute__((unused)), void *buf, size_t len, struct puk_receptacle_NewMad_minidriver_s *rrdv, const struct nm_minidriver_properties_s *p_props_rdv)
 
static void nm_minidriver_send_rdv (struct puk_receptacle_NewMad_minidriver_s *r, const struct nm_minidriver_properties_s *p_props, const void *buf, size_t len, struct puk_receptacle_NewMad_minidriver_s *rrdv, const struct nm_minidriver_properties_s *p_props_rdv)
 

Detailed Description

frontend to directly use Minidriver components.

This is not supposed to be used by end-users.

Definition in file nm_minidriver_interface.h.

Macro Definition Documentation

◆ NM_MINIDRIVER_CHECK_RC

#define NM_MINIDRIVER_CHECK_RC (   OP,
  RC 
)
Value:
{ \
if(((RC) != NM_ESUCCESS) && ((RC) != -NM_EAGAIN) && ((RC) != -NM_EINPROGRESS)) \
NM_FATAL("nm_minidriver: op %s returned rc = %d (%s)", (OP), rc, nm_strerror(rc)); \
}
const char * nm_strerror(int rc)
@ NM_EINPROGRESS
operation in progress
Definition nm_errno.h:45
@ NM_EAGAIN
poll again
Definition nm_errno.h:39
@ NM_ESUCCESS
successful operation
Definition nm_errno.h:36

Definition at line 31 of file nm_minidriver_interface.h.

Function Documentation

◆ nm_minidriver_close()

static void nm_minidriver_close ( const struct nm_minidriver_iface_s *  p_minidriver,
puk_context_t  p_context 
)
inlinestatic

Definition at line 54 of file nm_minidriver_interface.h.

References nm_minidriver_iface_s::close.

◆ nm_minidriver_connect()

static void nm_minidriver_connect ( struct puk_receptacle_NewMad_minidriver_s *  r,
const void *  remote_url,
size_t  url_size 
)
inlinestatic

Definition at line 66 of file nm_minidriver_interface.h.

References assert().

Here is the call graph for this function:

◆ nm_minidriver_disconnect()

static void nm_minidriver_disconnect ( struct puk_receptacle_NewMad_minidriver_s *  r)
inlinestatic

Definition at line 77 of file nm_minidriver_interface.h.

◆ nm_minidriver_getprops()

static void nm_minidriver_getprops ( const struct nm_minidriver_iface_s *  p_minidriver,
puk_context_t  p_context,
struct nm_minidriver_properties_s *  p_props 
)
inlinestatic

Definition at line 40 of file nm_minidriver_interface.h.

References nm_minidriver_iface_s::getprops, nm_minidriver_properties_init(), and nm_minidriver_properties_normalize().

Here is the call graph for this function:

◆ nm_minidriver_init()

static void nm_minidriver_init ( const struct nm_minidriver_iface_s *  p_minidriver,
puk_context_t  p_context,
const void **  drv_url,
size_t *  url_size 
)
inlinestatic

Definition at line 48 of file nm_minidriver_interface.h.

References nm_minidriver_iface_s::init.

◆ nm_minidriver_irecv()

static void nm_minidriver_irecv ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *p_props   __attribute__(unused),
struct nm_pkt_s *  p_pkt 
)
inlinestatic

Definition at line 197 of file nm_minidriver_interface.h.

References NM_MINIDRIVER_CHECK_RC.

Referenced by nm_minidriver_recv(), and nm_minidriver_recv_rdv().

◆ nm_minidriver_isend()

static void nm_minidriver_isend ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *p_props   __attribute__(unused),
struct nm_pkt_s *  p_pkt 
)
inlinestatic

Definition at line 125 of file nm_minidriver_interface.h.

References NM_MINIDRIVER_CHECK_RC.

Referenced by nm_minidriver_send(), and nm_minidriver_send_rdv().

◆ nm_minidriver_recv()

static void nm_minidriver_recv ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *  p_props,
void *  buf,
size_t  len 
)
inlinestatic

Definition at line 228 of file nm_minidriver_interface.h.

References nm_pkt_s::buf, len, NM_ESUCCESS, nm_minidriver_irecv(), nm_minidriver_recv_pkt_build(), and nm_minidriver_rpoll().

Referenced by nm_minidriver_send_rdv().

Here is the call graph for this function:

◆ nm_minidriver_recv_cancel()

static int nm_minidriver_recv_cancel ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *p_props   __attribute__(unused),
struct nm_pkt_s *  p_pkt 
)
inlinestatic

Definition at line 252 of file nm_minidriver_interface.h.

References NM_ENOTIMPL.

◆ nm_minidriver_recv_pkt_build()

static void nm_minidriver_recv_pkt_build ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *p_props   __attribute__(unused),
struct nm_pkt_s *  p_pkt,
const void *  buf,
size_t  len 
)
inlinestatic

◆ nm_minidriver_recv_probe_any()

static void nm_minidriver_recv_probe_any ( const struct nm_minidriver_iface_s *  p_minidriver,
puk_context_t  p_context,
void **  _status 
)
inlinestatic

◆ nm_minidriver_recv_rdv()

static void nm_minidriver_recv_rdv ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *p_props   __attribute__(unused),
void *  buf,
size_t  len,
struct puk_receptacle_NewMad_minidriver_s *  rrdv,
const struct nm_minidriver_properties_s *  p_props_rdv 
)
inlinestatic

◆ nm_minidriver_rpoll()

static int nm_minidriver_rpoll ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *p_props   __attribute__(unused),
struct nm_pkt_s *  p_pkt 
)
inlinestatic

Definition at line 208 of file nm_minidriver_interface.h.

References assert(), nm_pkt_s::buf, nm_pkt_s::iov, nm_pkt_s::len, NM_ESUCCESS, NM_MINIDRIVER_CHECK_RC, nm_pkt_s::p_buf, and nm_pkt_s::v.

Referenced by nm_minidriver_recv(), and nm_minidriver_recv_rdv().

Here is the call graph for this function:

◆ nm_minidriver_send()

static void nm_minidriver_send ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *  p_props,
const void *  buf,
size_t  len 
)
inlinestatic

Definition at line 155 of file nm_minidriver_interface.h.

References nm_pkt_s::buf, len, NM_ESUCCESS, nm_minidriver_isend(), nm_minidriver_send_pkt_build(), and nm_minidriver_spoll().

Referenced by nm_minidriver_recv_rdv().

Here is the call graph for this function:

◆ nm_minidriver_send_pkt_build()

static void nm_minidriver_send_pkt_build ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *p_props   __attribute__(unused),
struct nm_pkt_s *  p_pkt,
const void *  buf,
size_t  len 
)
inlinestatic

◆ nm_minidriver_send_rdv()

static void nm_minidriver_send_rdv ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *  p_props,
const void *  buf,
size_t  len,
struct puk_receptacle_NewMad_minidriver_s *  rrdv,
const struct nm_minidriver_properties_s *  p_props_rdv 
)
inlinestatic

◆ nm_minidriver_spoll()

static int nm_minidriver_spoll ( struct puk_receptacle_NewMad_minidriver_s *  r,
const struct nm_minidriver_properties_s *  p_props,
struct nm_pkt_s *  p_pkt 
)
inlinestatic