FD.io VPP  v18.01-8-g0eacf49
Vector Packet Processing
memif_api.c File Reference
+ Include dependency graph for memif_api.c:

Go to the source code of this file.

Macros

#define vl_typedefs
 
#define vl_endianfun
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define vl_api_version(n, v)   static u32 api_version=(v);
 
#define REPLY_MACRO(t)
 
#define REPLY_MACRO2(t, body)
 
#define foreach_memif_plugin_api_msg
 
#define vl_msg_name_crc_list
 

Functions

void vl_api_memif_create_t_handler (vl_api_memif_create_t *mp)
 Message handler for memif_create API. More...
 
void vl_api_memif_delete_t_handler (vl_api_memif_delete_t *mp)
 Message handler for memif_delete API. More...
 
static void send_memif_details (unix_shared_memory_queue_t *q, memif_if_t *mif, vnet_sw_interface_t *swif, u8 *interface_name, u32 context)
 
void vl_api_memif_dump_t_handler (vl_api_memif_dump_t *mp)
 Message handler for memif_dump API. More...
 
static void setup_message_id_table (memif_main_t *mm, api_main_t *am)
 
clib_error_tmemif_plugin_api_hookup (vlib_main_t *vm)
 

Macro Definition Documentation

#define foreach_memif_plugin_api_msg
Value:
_(MEMIF_CREATE, memif_create) \
_(MEMIF_DELETE, memif_delete) \
_(MEMIF_DUMP, memif_dump) \
int memif_create(memif_conn_handle_t *conn, memif_conn_args_t *args, memif_connection_update_t *on_connect, memif_connection_update_t *on_disconnect, memif_interrupt_t *on_interrupt, void *private_ctx)
Memory interface create function.
Definition: main.c:538
int memif_delete(memif_conn_handle_t *conn)
Memif delete.
Definition: main.c:1111

Definition at line 91 of file memif_api.c.

#define REPLY_MACRO (   t)
Value:
do { \
if (!q) \
return; \
\
rmp = vl_msg_api_alloc (sizeof (*rmp)); \
rmp->_vl_msg_id = htons ((t)+mm->msg_id_base); \
rmp->context = mp->context; \
rmp->retval = htonl (rv); \
vl_msg_api_send_shmem (q, (u8 *)&rmp); \
} while(0);
void * vl_msg_api_alloc(int nbytes)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
unsigned char u8
Definition: types.h:56
struct _unix_shared_memory_queue unix_shared_memory_queue_t

Definition at line 61 of file memif_api.c.

#define REPLY_MACRO2 (   t,
  body 
)
Value:
do { \
if (!q) \
return; \
\
rmp = vl_msg_api_alloc (sizeof (*rmp)); \
rmp->_vl_msg_id = htons ((t)+mm->msg_id_base); \
rmp->context = mp->context; \
rmp->retval = htonl (rv); \
do {body;} while (0); \
vl_msg_api_send_shmem (q, (u8 *)&rmp); \
} while(0);
void * vl_msg_api_alloc(int nbytes)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
unsigned char u8
Definition: types.h:56
struct _unix_shared_memory_queue unix_shared_memory_queue_t

Definition at line 76 of file memif_api.c.

#define vl_api_version (   n,
  v 
)    static u32 api_version=(v);

Definition at line 50 of file memif_api.c.

#define vl_endianfun

Definition at line 39 of file memif_api.c.

#define vl_msg_name_crc_list

Definition at line 296 of file memif_api.c.

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 44 of file memif_api.c.

#define vl_printfun

Definition at line 45 of file memif_api.c.

#define vl_typedefs

Definition at line 34 of file memif_api.c.

Function Documentation

clib_error_t* memif_plugin_api_hookup ( vlib_main_t vm)

Definition at line 311 of file memif_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_memif_details ( unix_shared_memory_queue_t q,
memif_if_t mif,
vnet_sw_interface_t swif,
u8 interface_name,
u32  context 
)
static

Definition at line 222 of file memif_api.c.

+ Here is the call graph for this function:

static void setup_message_id_table ( memif_main_t mm,
api_main_t am 
)
static

Definition at line 301 of file memif_api.c.

+ Here is the caller graph for this function:

void vl_api_memif_create_t_handler ( vl_api_memif_create_t mp)

Message handler for memif_create API.

Parameters
mpvl_api_memif_create_t * mp the api message

Definition at line 101 of file memif_api.c.

+ Here is the call graph for this function:

void vl_api_memif_delete_t_handler ( vl_api_memif_delete_t mp)

Message handler for memif_delete API.

Parameters
mpvl_api_memif_delete_t * mp the api message

Definition at line 199 of file memif_api.c.

+ Here is the call graph for this function:

void vl_api_memif_dump_t_handler ( vl_api_memif_dump_t mp)

Message handler for memif_dump API.

Parameters
mpvl_api_memif_dump_t * mp the api message

Definition at line 266 of file memif_api.c.

+ Here is the call graph for this function: