FD.io VPP  v18.04-17-g3a0d853
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_socket_filename_add_del_t_handler (vl_api_memif_socket_filename_add_del_t *mp)
 Message handler for memif_socket_filename_add_del API. More...
 
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 (vl_api_registration_t *reg, 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 send_memif_socket_filename_details (vl_api_registration_t *reg, u32 socket_id, u8 *socket_filename, u32 context)
 
void vl_api_memif_socket_filename_dump_t_handler (vl_api_memif_socket_filename_dump_t *mp)
 Message handler for memif_socket_filename_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_SOCKET_FILENAME_ADD_DEL, memif_socket_filename_add_del) \
_(MEMIF_CREATE, memif_create) \
_(MEMIF_DELETE, memif_delete) \
_(MEMIF_SOCKET_FILENAME_DUMP, memif_socket_filename_dump) \
_(MEMIF_DUMP, memif_dump) \
int memif_socket_filename_add_del(u8 is_add, u32 sock_id, u8 *sock_filename)
Definition: memif.c:590
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:593
int memif_delete(memif_conn_handle_t *conn)
Memif delete.
Definition: main.c:1183

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)
void vl_msg_api_send_shmem(svm_queue_t *q, u8 *elem)
svm_queue_t * vl_api_client_index_to_input_queue(u32 index)
Definition: memory_api.c:739
unsigned char u8
Definition: types.h:56
struct _svm_queue svm_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)
void vl_msg_api_send_shmem(svm_queue_t *q, u8 *elem)
svm_queue_t * vl_api_client_index_to_input_queue(u32 index)
Definition: memory_api.c:739
unsigned char u8
Definition: types.h:56
struct _svm_queue svm_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 393 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 408 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 ( vl_api_registration_t reg,
memif_if_t mif,
vnet_sw_interface_t swif,
u8 interface_name,
u32  context 
)
static

Definition at line 263 of file memif_api.c.

+ Here is the call graph for this function:

static void send_memif_socket_filename_details ( vl_api_registration_t reg,
u32  socket_id,
u8 socket_filename,
u32  context 
)
static

Definition at line 342 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 398 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 150 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 240 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 311 of file memif_api.c.

+ Here is the call graph for this function:

void vl_api_memif_socket_filename_add_del_t_handler ( vl_api_memif_socket_filename_add_del_t mp)

Message handler for memif_socket_filename_add_del API.

Parameters
mpthe vl_api_memif_socket_filename_add_del_t API message

Definition at line 105 of file memif_api.c.

+ Here is the call graph for this function:

void vl_api_memif_socket_filename_dump_t_handler ( vl_api_memif_socket_filename_dump_t mp)

Message handler for memif_socket_filename_dump API.

Parameters
mpvl_api_memif_socket_filename_dump_t api message

Definition at line 369 of file memif_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: