FD.io VPP  v21.01
Vector Packet Processing
client.c File Reference
+ Include dependency graph for client.c:

Go to the source code of this file.

Data Structures

struct  vac_main_t
 

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 

Functions

static void init (void)
 
static void cleanup (void)
 
void vlib_cli_output (struct vlib_main_t *vm, char *fmt,...)
 
void vac_free (void *msg)
 
static void vac_api_handler (void *msg)
 
static void * vac_rx_thread_fn (void *arg)
 
static void * vac_timeout_thread_fn (void *arg)
 
void vac_rx_suspend (void)
 
void vac_rx_resume (void)
 
static uwordvac_msg_table_get_hash (void)
 
int vac_msg_table_size (void)
 
int vac_connect (char *name, char *chroot_prefix, vac_callback_t cb, int rx_qlen)
 
static void set_timeout (unsigned short timeout)
 
static void unset_timeout (void)
 
int vac_disconnect (void)
 
int vac_read (char **p, int *l, u16 timeout)
 
typedef VL_API_PACKED (struct _vl_api_header { u16 _vl_msg_id;u32 client_index;})
 
int vac_write (char *p, int l)
 
int vac_get_msg_index (char *name)
 
int vac_msg_table_max_index (void)
 
void vac_set_error_handler (vac_error_callback_t cb)
 
void vac_mem_init (size_t size)
 

Variables

bool timeout_cancelled
 
bool timeout_in_progress
 
bool rx_thread_done
 
vlib_main_t vlib_global_main
 
vlib_main_t ** vlib_mains
 
vac_main_t vac_main
 
vac_callback_t vac_callback
 
u16 read_timeout = 0
 
bool rx_is_running = false
 
bool timeout_thread_cancelled = false
 
bool mem_initialized = false
 

Macro Definition Documentation

◆ vl_endianfun

#define vl_endianfun   /* define message structures */

Definition at line 55 of file client.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 51 of file client.c.

Function Documentation

◆ cleanup()

static void cleanup ( void  )
static

Definition at line 101 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

static void init ( void  )
static

Definition at line 86 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_timeout()

static void set_timeout ( unsigned short  timeout)
static

Definition at line 339 of file client.c.

+ Here is the caller graph for this function:

◆ unset_timeout()

static void unset_timeout ( void  )
static

Definition at line 351 of file client.c.

+ Here is the caller graph for this function:

◆ vac_api_handler()

static void vac_api_handler ( void *  msg)
static

Definition at line 129 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vac_connect()

int vac_connect ( char *  name,
char *  chroot_prefix,
vac_callback_t  cb,
int  rx_qlen 
)

Definition at line 291 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vac_disconnect()

int vac_disconnect ( void  )

Definition at line 362 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vac_free()

void vac_free ( void *  msg)

Definition at line 123 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vac_get_msg_index()

int vac_get_msg_index ( char *  name)

Definition at line 537 of file client.c.

+ Here is the call graph for this function:

◆ vac_mem_init()

void vac_mem_init ( size_t  size)

Definition at line 568 of file client.c.

+ Here is the call graph for this function:

◆ vac_msg_table_get_hash()

static uword* vac_msg_table_get_hash ( void  )
static

Definition at line 277 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vac_msg_table_max_index()

int vac_msg_table_max_index ( void  )

Definition at line 543 of file client.c.

+ Here is the call graph for this function:

◆ vac_msg_table_size()

int vac_msg_table_size ( void  )

Definition at line 284 of file client.c.

+ Here is the call graph for this function:

◆ vac_read()

int vac_read ( char **  p,
int *  l,
u16  timeout 
)

Definition at line 413 of file client.c.

+ Here is the call graph for this function:

◆ vac_rx_resume()

void vac_rx_resume ( void  )

Definition at line 264 of file client.c.

+ Here is the caller graph for this function:

◆ vac_rx_suspend()

void vac_rx_suspend ( void  )

Definition at line 243 of file client.c.

+ Here is the call graph for this function:

◆ vac_rx_thread_fn()

static void* vac_rx_thread_fn ( void *  arg)
static

Definition at line 144 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vac_set_error_handler()

void vac_set_error_handler ( vac_error_callback_t  cb)

Definition at line 558 of file client.c.

+ Here is the call graph for this function:

◆ vac_timeout_thread_fn()

static void* vac_timeout_thread_fn ( void *  arg)
static

Definition at line 206 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vac_write()

int vac_write ( char *  p,
int  l 
)

Definition at line 513 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VL_API_PACKED()

typedef VL_API_PACKED ( struct _vl_api_header { u16 _vl_msg_id;u32 client_index;}  )

Definition at line 501 of file client.c.

+ Here is the call graph for this function:

◆ vlib_cli_output()

void vlib_cli_output ( struct vlib_main_t vm,
char *  fmt,
  ... 
)

Definition at line 117 of file client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ mem_initialized

bool mem_initialized = false

Definition at line 83 of file client.c.

◆ read_timeout

u16 read_timeout = 0

Definition at line 78 of file client.c.

◆ rx_is_running

bool rx_is_running = false

Definition at line 79 of file client.c.

◆ rx_thread_done

bool rx_thread_done

Definition at line 39 of file client.c.

◆ timeout_cancelled

bool timeout_cancelled

Definition at line 37 of file client.c.

◆ timeout_in_progress

bool timeout_in_progress

Definition at line 38 of file client.c.

◆ timeout_thread_cancelled

bool timeout_thread_cancelled = false

Definition at line 80 of file client.c.

◆ vac_callback

vac_callback_t vac_callback

Definition at line 77 of file client.c.

◆ vac_main

vac_main_t vac_main

Definition at line 76 of file client.c.

◆ vlib_global_main

vlib_main_t vlib_global_main

Definition at line 59 of file client.c.

◆ vlib_mains

vlib_main_t** vlib_mains

Definition at line 60 of file client.c.