FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
socket_client.c File Reference
+ Include dependency graph for socket_client.c:

Go to the source code of this file.

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define vl_print(handle, ...)   clib_warning (__VA_ARGS__)
 
#define vl_printfun
 
#define foreach_sock_client_api_msg
 

Functions

u32 vl (void *p)
 
static socket_client_main_tvl_socket_client_ctx_push (socket_client_main_t *ctx)
 
static void vl_socket_client_ctx_pop (socket_client_main_t *old_ctx)
 
static int vl_socket_client_read_internal (socket_client_main_t *scm, int wait)
 
int vl_socket_client_read (int wait)
 
int vl_socket_client_read2 (socket_client_main_t *scm, int wait)
 
static int vl_socket_client_write_internal (socket_client_main_t *scm)
 
int vl_socket_client_write (void)
 
int vl_socket_client_write2 (socket_client_main_t *scm)
 
void * vl_socket_client_msg_alloc2 (socket_client_main_t *scm, int nbytes)
 
void * vl_socket_client_msg_alloc (int nbytes)
 
void vl_socket_client_disconnect2 (socket_client_main_t *scm)
 
void vl_socket_client_disconnect (void)
 
void vl_socket_client_enable_disable2 (socket_client_main_t *scm, int enable)
 
void vl_socket_client_enable_disable (int enable)
 
static clib_error_tvl_sock_api_recv_fd_msg_internal (socket_client_main_t *scm, int fds[], int n_fds, u32 wait)
 
clib_error_tvl_sock_api_recv_fd_msg (int socket_fd, int fds[], int n_fds, u32 wait)
 
clib_error_tvl_sock_api_recv_fd_msg2 (socket_client_main_t *scm, int socket_fd, int fds[], int n_fds, u32 wait)
 
static void vl_api_sock_init_shm_reply_t_handler (vl_api_sock_init_shm_reply_t *mp)
 
static void vl_api_sockclnt_create_reply_t_handler (vl_api_sockclnt_create_reply_t *mp)
 
static void noop_handler (void *notused)
 
void vl_sock_client_install_message_handlers (void)
 
int vl_socket_client_connect_internal (socket_client_main_t *scm, char *socket_path, char *client_name, u32 socket_buffer_size)
 
int vl_socket_client_connect (char *socket_path, char *client_name, u32 socket_buffer_size)
 
int vl_socket_client_connect2 (socket_client_main_t *scm, char *socket_path, char *client_name, u32 socket_buffer_size)
 
int vl_socket_client_init_shm_internal (socket_client_main_t *scm, vl_api_shm_elem_config_t *config, int want_pthread)
 
int vl_socket_client_init_shm (vl_api_shm_elem_config_t *config, int want_pthread)
 
int vl_socket_client_init_shm2 (socket_client_main_t *scm, vl_api_shm_elem_config_t *config, int want_pthread)
 
clib_error_tvl_socket_client_recv_fd_msg2 (socket_client_main_t *scm, int fds[], int n_fds, u32 wait)
 
clib_error_tvl_socket_client_recv_fd_msg (int fds[], int n_fds, u32 wait)
 

Variables

socket_client_main_t socket_client_main
 
__thread socket_client_main_tsocket_client_ctx = &socket_client_main
 

Macro Definition Documentation

◆ foreach_sock_client_api_msg

#define foreach_sock_client_api_msg
Value:
_(SOCKCLNT_CREATE_REPLY, sockclnt_create_reply) \
_(SOCK_INIT_SHM_REPLY, sock_init_shm_reply) \

Definition at line 421 of file socket_client.c.

◆ vl_endianfun

#define vl_endianfun   /* define message structures */

Definition at line 34 of file socket_client.c.

◆ vl_print

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

Definition at line 39 of file socket_client.c.

◆ vl_printfun

#define vl_printfun

Definition at line 40 of file socket_client.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 30 of file socket_client.c.

Function Documentation

◆ noop_handler()

static void noop_handler ( void *  notused)
static

Definition at line 426 of file socket_client.c.

◆ vl()

u32 vl ( void *  p)

Definition at line 51 of file socket_client.c.

◆ vl_api_sock_init_shm_reply_t_handler()

static void vl_api_sock_init_shm_reply_t_handler ( vl_api_sock_init_shm_reply_t mp)
static

Definition at line 351 of file socket_client.c.

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

◆ vl_api_sockclnt_create_reply_t_handler()

static void vl_api_sockclnt_create_reply_t_handler ( vl_api_sockclnt_create_reply_t mp)
static

Definition at line 411 of file socket_client.c.

◆ vl_sock_api_recv_fd_msg()

clib_error_t* vl_sock_api_recv_fd_msg ( int  socket_fd,
int  fds[],
int  n_fds,
u32  wait 
)

Definition at line 331 of file socket_client.c.

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

◆ vl_sock_api_recv_fd_msg2()

clib_error_t* vl_sock_api_recv_fd_msg2 ( socket_client_main_t scm,
int  socket_fd,
int  fds[],
int  n_fds,
u32  wait 
)

Definition at line 338 of file socket_client.c.

+ Here is the call graph for this function:

◆ vl_sock_api_recv_fd_msg_internal()

static clib_error_t* vl_sock_api_recv_fd_msg_internal ( socket_client_main_t scm,
int  fds[],
int  n_fds,
u32  wait 
)
static

Definition at line 264 of file socket_client.c.

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

◆ vl_sock_client_install_message_handlers()

void vl_sock_client_install_message_handlers ( void  )

Definition at line 431 of file socket_client.c.

+ Here is the caller graph for this function:

◆ vl_socket_client_connect()

int vl_socket_client_connect ( char *  socket_path,
char *  client_name,
u32  socket_buffer_size 
)

Definition at line 501 of file socket_client.c.

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

◆ vl_socket_client_connect2()

int vl_socket_client_connect2 ( socket_client_main_t scm,
char *  socket_path,
char *  client_name,
u32  socket_buffer_size 
)

Definition at line 509 of file socket_client.c.

+ Here is the call graph for this function:

◆ vl_socket_client_connect_internal()

int vl_socket_client_connect_internal ( socket_client_main_t scm,
char *  socket_path,
char *  client_name,
u32  socket_buffer_size 
)

Definition at line 446 of file socket_client.c.

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

◆ vl_socket_client_ctx_pop()

static void vl_socket_client_ctx_pop ( socket_client_main_t old_ctx)
static

Definition at line 65 of file socket_client.c.

+ Here is the caller graph for this function:

◆ vl_socket_client_ctx_push()

static socket_client_main_t* vl_socket_client_ctx_push ( socket_client_main_t ctx)
static

Definition at line 57 of file socket_client.c.

+ Here is the caller graph for this function:

◆ vl_socket_client_disconnect()

void vl_socket_client_disconnect ( void  )

Definition at line 246 of file socket_client.c.

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

◆ vl_socket_client_disconnect2()

void vl_socket_client_disconnect2 ( socket_client_main_t scm)

Definition at line 233 of file socket_client.c.

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

◆ vl_socket_client_enable_disable()

void vl_socket_client_enable_disable ( int  enable)

Definition at line 258 of file socket_client.c.

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

◆ vl_socket_client_enable_disable2()

void vl_socket_client_enable_disable2 ( socket_client_main_t scm,
int  enable 
)

Definition at line 252 of file socket_client.c.

+ Here is the caller graph for this function:

◆ vl_socket_client_init_shm()

int vl_socket_client_init_shm ( vl_api_shm_elem_config_t config,
int  want_pthread 
)

Definition at line 560 of file socket_client.c.

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

◆ vl_socket_client_init_shm2()

int vl_socket_client_init_shm2 ( socket_client_main_t scm,
vl_api_shm_elem_config_t config,
int  want_pthread 
)

Definition at line 568 of file socket_client.c.

+ Here is the call graph for this function:

◆ vl_socket_client_init_shm_internal()

int vl_socket_client_init_shm_internal ( socket_client_main_t scm,
vl_api_shm_elem_config_t config,
int  want_pthread 
)

Definition at line 523 of file socket_client.c.

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

◆ vl_socket_client_msg_alloc()

void* vl_socket_client_msg_alloc ( int  nbytes)

Definition at line 227 of file socket_client.c.

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

◆ vl_socket_client_msg_alloc2()

void* vl_socket_client_msg_alloc2 ( socket_client_main_t scm,
int  nbytes 
)

Definition at line 220 of file socket_client.c.

+ Here is the caller graph for this function:

◆ vl_socket_client_read()

int vl_socket_client_read ( int  wait)

Definition at line 156 of file socket_client.c.

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

◆ vl_socket_client_read2()

int vl_socket_client_read2 ( socket_client_main_t scm,
int  wait 
)

Definition at line 162 of file socket_client.c.

+ Here is the call graph for this function:

◆ vl_socket_client_read_internal()

static int vl_socket_client_read_internal ( socket_client_main_t scm,
int  wait 
)
static

Definition at line 71 of file socket_client.c.

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

◆ vl_socket_client_recv_fd_msg()

clib_error_t* vl_socket_client_recv_fd_msg ( int  fds[],
int  n_fds,
u32  wait 
)

Definition at line 592 of file socket_client.c.

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

◆ vl_socket_client_recv_fd_msg2()

clib_error_t* vl_socket_client_recv_fd_msg2 ( socket_client_main_t scm,
int  fds[],
int  n_fds,
u32  wait 
)

Definition at line 583 of file socket_client.c.

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

◆ vl_socket_client_write()

int vl_socket_client_write ( void  )

Definition at line 202 of file socket_client.c.

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

◆ vl_socket_client_write2()

int vl_socket_client_write2 ( socket_client_main_t scm)

Definition at line 208 of file socket_client.c.

+ Here is the call graph for this function:

◆ vl_socket_client_write_internal()

static int vl_socket_client_write_internal ( socket_client_main_t scm)
static

Definition at line 174 of file socket_client.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ socket_client_ctx

__thread socket_client_main_t* socket_client_ctx = &socket_client_main

Definition at line 45 of file socket_client.c.

◆ socket_client_main

socket_client_main_t socket_client_main

Definition at line 44 of file socket_client.c.