FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
socket.h File Reference
+ Include dependency graph for socket.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SOCKET_IS_SERVER   (1 << 0)
 
#define SOCKET_IS_CLIENT   (0 << 0)
 
#define SOCKET_NON_BLOCKING_CONNECT   (1 << 1)
 
#define SOCKET_RX_END_OF_FILE   (1 << 2)
 

Typedefs

typedef struct _socket_t clib_socket_t
 

Functions

clib_error_tclib_socket_init (clib_socket_t *socket)
 
clib_error_tclib_socket_accept (clib_socket_t *server, clib_socket_t *client)
 
static uword clib_socket_is_server (clib_socket_t *sock)
 
static uword clib_socket_is_client (clib_socket_t *s)
 
static int clib_socket_rx_end_of_file (clib_socket_t *s)
 
static void * clib_socket_tx_add (clib_socket_t *s, int n_bytes)
 
static void clib_socket_tx_add_va_formatted (clib_socket_t *s, char *fmt, va_list *va)
 
static clib_error_tclib_socket_tx (clib_socket_t *s)
 
static clib_error_tclib_socket_rx (clib_socket_t *s, int n_bytes)
 
static void clib_socket_free (clib_socket_t *s)
 
static clib_error_tclib_socket_close (clib_socket_t *sock)
 
void clib_socket_tx_add_formatted (clib_socket_t *s, char *fmt,...)
 

Macro Definition Documentation

#define SOCKET_IS_CLIENT   (0 << 0)

Definition at line 59 of file socket.h.

#define SOCKET_IS_SERVER   (1 << 0)

Definition at line 58 of file socket.h.

#define SOCKET_NON_BLOCKING_CONNECT   (1 << 1)

Definition at line 60 of file socket.h.

#define SOCKET_RX_END_OF_FILE   (1 << 2)

Definition at line 63 of file socket.h.

Typedef Documentation

typedef struct _socket_t clib_socket_t

Function Documentation

clib_error_t* clib_socket_accept ( clib_socket_t server,
clib_socket_t client 
)

Definition at line 379 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* clib_socket_close ( clib_socket_t sock)
inlinestatic

Definition at line 143 of file socket.h.

+ Here is the call graph for this function:

static void clib_socket_free ( clib_socket_t s)
inlinestatic

Definition at line 133 of file socket.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* clib_socket_init ( clib_socket_t socket)

Definition at line 283 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword clib_socket_is_client ( clib_socket_t s)
inlinestatic

Definition at line 95 of file socket.h.

+ Here is the call graph for this function:

static uword clib_socket_is_server ( clib_socket_t sock)
inlinestatic

Definition at line 89 of file socket.h.

+ Here is the caller graph for this function:

static clib_error_t* clib_socket_rx ( clib_socket_t s,
int  n_bytes 
)
inlinestatic

Definition at line 127 of file socket.h.

static int clib_socket_rx_end_of_file ( clib_socket_t s)
inlinestatic

Definition at line 101 of file socket.h.

static clib_error_t* clib_socket_tx ( clib_socket_t s)
inlinestatic

Definition at line 121 of file socket.h.

static void* clib_socket_tx_add ( clib_socket_t s,
int  n_bytes 
)
inlinestatic

Definition at line 107 of file socket.h.

void clib_socket_tx_add_formatted ( clib_socket_t s,
char *  fmt,
  ... 
)

Definition at line 56 of file socket.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void clib_socket_tx_add_va_formatted ( clib_socket_t s,
char *  fmt,
va_list *  va 
)
inlinestatic

Definition at line 115 of file socket.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: