FD.io VPP  v21.06-3-gbb25fbf28
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 422 of file socket_client.c.

◆ vl_endianfun

#define vl_endianfun   /* define message structures */

Definition at line 35 of file socket_client.c.

◆ vl_print

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

Definition at line 40 of file socket_client.c.

◆ vl_printfun

#define vl_printfun

Definition at line 41 of file socket_client.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 31 of file socket_client.c.

Function Documentation

◆ noop_handler()

static void noop_handler ( void *  notused)
static

Definition at line 427 of file socket_client.c.

◆ vl()

u32 vl ( void *  p)

Definition at line 52 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 352 of file socket_client.c.

+ Here is the call 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 412 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 332 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 339 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 265 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 432 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 502 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 510 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 447 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 66 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 58 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 247 of file socket_client.c.

+ Here is the call graph for this function:

◆ vl_socket_client_disconnect2()

void vl_socket_client_disconnect2 ( socket_client_main_t scm)

Definition at line 234 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 259 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 253 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 561 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 569 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 524 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 228 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 221 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 157 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 163 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 72 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 593 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 584 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 203 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 209 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 175 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 46 of file socket_client.c.

◆ socket_client_main

socket_client_main_t socket_client_main

Definition at line 45 of file socket_client.c.