FD.io VPP  v17.10-9-gd594711
Vector Packet Processing
vppcom.h File Reference
+ Include dependency graph for vppcom.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vppcom_endpt_t_
 

Macros

#define INVALID_SESSION_ID   (~0)
 
#define VPPCOM_VRF_DEFAULT   0
 
#define VPPCOM_CONF_ENV   "VPPCOM_CONF"
 
#define VPPCOM_CONF_DEFAULT   "/etc/vpp/vppcom.conf"
 
#define VPPCOM_FD_OFFSET   (1 << 30)
 

Typedefs

typedef struct vppcom_endpt_t_ vppcom_endpt_t
 

Enumerations

enum  vppcom_proto_t { VPPCOM_PROTO_TCP = 0, VPPCOM_PROTO_UDP }
 
enum  vppcom_is_ip4_t { VPPCOM_IS_IP6 = 0, VPPCOM_IS_IP4 }
 
enum  vppcom_error_t {
  VPPCOM_OK = 0, VPPCOM_EAGAIN = -EAGAIN, VPPCOM_EINVAL = -EINVAL, VPPCOM_EBADFD = -EBADFD,
  VPPCOM_EAFNOSUPPORT = -EAFNOSUPPORT, VPPCOM_ECONNRESET = -ECONNRESET, VPPCOM_ECONNREFUSED = -ECONNREFUSED, VPPCOM_ETIMEDOUT = -ETIMEDOUT
}
 

Functions

static const char * vppcom_retval_str (int retval)
 
static int is_vcom_fd (int fd)
 
int vppcom_app_create (char *app_name)
 
void vppcom_app_destroy (void)
 
int vppcom_session_create (uint32_t vrf, uint8_t proto, uint8_t is_nonblocking)
 
int vppcom_session_close (uint32_t session_index)
 
int vppcom_session_bind (uint32_t session_index, vppcom_endpt_t *ep)
 
int vppcom_session_listen (uint32_t session_index, uint32_t q_len)
 
int vppcom_session_accept (uint32_t session_index, vppcom_endpt_t *client_ep, double wait_for_time)
 
int vppcom_session_connect (uint32_t session_index, vppcom_endpt_t *server_ep)
 
int vppcom_session_read (uint32_t session_index, void *buf, int n)
 
int vppcom_session_write (uint32_t session_index, void *buf, int n)
 
int vppcom_select (unsigned long n_bits, unsigned long *read_map, unsigned long *write_map, unsigned long *except_map, double wait_for_time)
 

Macro Definition Documentation

#define INVALID_SESSION_ID   (~0)

Definition at line 25 of file vppcom.h.

#define VPPCOM_CONF_DEFAULT   "/etc/vpp/vppcom.conf"

Definition at line 28 of file vppcom.h.

#define VPPCOM_CONF_ENV   "VPPCOM_CONF"

Definition at line 27 of file vppcom.h.

#define VPPCOM_FD_OFFSET   (1 << 30)
#define VPPCOM_VRF_DEFAULT   0

Definition at line 26 of file vppcom.h.

Typedef Documentation

Enumeration Type Documentation

Enumerator
VPPCOM_OK 
VPPCOM_EAGAIN 
VPPCOM_EINVAL 
VPPCOM_EBADFD 
VPPCOM_EAFNOSUPPORT 
VPPCOM_ECONNRESET 
VPPCOM_ECONNREFUSED 
VPPCOM_ETIMEDOUT 

Definition at line 51 of file vppcom.h.

Enumerator
VPPCOM_IS_IP6 
VPPCOM_IS_IP4 

Definition at line 36 of file vppcom.h.

Enumerator
VPPCOM_PROTO_TCP 
VPPCOM_PROTO_UDP 

Definition at line 30 of file vppcom.h.

Function Documentation

static int is_vcom_fd ( int  fd)
inlinestatic

Definition at line 114 of file vppcom.h.

+ Here is the call graph for this function:

int vppcom_app_create ( char *  app_name)

Definition at line 1690 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vppcom_app_destroy ( void  )

Definition at line 1776 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static const char* vppcom_retval_str ( int  retval)
inlinestatic

Definition at line 67 of file vppcom.h.

+ Here is the caller graph for this function:

int vppcom_select ( unsigned long  n_bits,
unsigned long *  read_map,
unsigned long *  write_map,
unsigned long *  except_map,
double  wait_for_time 
)

Definition at line 2306 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vppcom_session_accept ( uint32_t  session_index,
vppcom_endpt_t client_ep,
double  wait_for_time 
)

Definition at line 1972 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vppcom_session_bind ( uint32_t  session_index,
vppcom_endpt_t ep 
)

Definition at line 1882 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vppcom_session_close ( uint32_t  session_index)

Definition at line 1825 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vppcom_session_connect ( uint32_t  session_index,
vppcom_endpt_t server_ep 
)

Definition at line 2052 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vppcom_session_create ( uint32_t  vrf,
uint8_t  proto,
uint8_t  is_nonblocking 
)

+ Here is the caller graph for this function:

int vppcom_session_listen ( uint32_t  session_index,
uint32_t  q_len 
)

Definition at line 1918 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vppcom_session_read ( uint32_t  session_index,
void *  buf,
int  n 
)

Definition at line 2111 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vppcom_session_write ( uint32_t  session_index,
void *  buf,
int  n 
)

Definition at line 2194 of file vppcom.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: