FD.io VPP  v18.07-34-g55fbdb9
Vector Packet Processing
application_interface.h File Reference
+ Include dependency graph for application_interface.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  app_session_transport_
 
struct  app_session_t
 

Macros

#define foreach_app_options_flags
 
#define foreach_app_session_field
 flag for dgram mode More...
 

Typedefs

typedef struct _vnet_app_attach_args_t vnet_app_attach_args_t
 
typedef struct _vnet_app_detach_args_t vnet_app_detach_args_t
 
typedef struct _vnet_bind_args_t vnet_bind_args_t
 
typedef struct _vnet_unbind_args_t vnet_unbind_args_t
 
typedef struct _vnet_connect_args vnet_connect_args_t
 
typedef struct _vnet_disconnect_args_t vnet_disconnect_args_t
 
typedef struct _vnet_application_add_tls_cert_args_t vnet_app_add_tls_cert_args_t
 
typedef struct _vnet_application_add_tls_key_args_t vnet_app_add_tls_key_args_t
 
typedef enum _app_options app_options_t
 
typedef enum _app_options_flags app_options_flags_t
 
typedef struct app_session_transport_ app_session_transport_t
 

Enumerations

enum  app_attach_options_index_t {
  APP_OPTIONS_FLAGS, APP_OPTIONS_EVT_QUEUE_SIZE, APP_OPTIONS_SEGMENT_SIZE, APP_OPTIONS_ADD_SEGMENT_SIZE,
  APP_OPTIONS_PRIVATE_SEGMENT_COUNT, APP_OPTIONS_RX_FIFO_SIZE, APP_OPTIONS_TX_FIFO_SIZE, APP_OPTIONS_PREALLOC_FIFO_PAIRS,
  APP_OPTIONS_NAMESPACE, APP_OPTIONS_NAMESPACE_SECRET, APP_OPTIONS_PROXY_TRANSPORT, APP_OPTIONS_ACCEPT_COOKIE,
  APP_OPTIONS_TLS_ENGINE, APP_OPTIONS_N_OPTIONS
}
 

Functions

int vnet_bind_uri (vnet_bind_args_t *)
 
int vnet_unbind_uri (vnet_unbind_args_t *a)
 
clib_error_tvnet_connect_uri (vnet_connect_args_t *a)
 
clib_error_tvnet_application_attach (vnet_app_attach_args_t *a)
 Attach application to vpp. More...
 
clib_error_tvnet_bind (vnet_bind_args_t *a)
 
clib_error_tvnet_connect (vnet_connect_args_t *a)
 
clib_error_tvnet_unbind (vnet_unbind_args_t *a)
 
int vnet_application_detach (vnet_app_detach_args_t *a)
 Detach application from vpp. More...
 
int vnet_disconnect_session (vnet_disconnect_args_t *a)
 
clib_error_tvnet_app_add_tls_cert (vnet_app_add_tls_cert_args_t *a)
 
clib_error_tvnet_app_add_tls_key (vnet_app_add_tls_key_args_t *a)
 
static int app_send_dgram_raw (svm_fifo_t *f, app_session_transport_t *at, svm_queue_t *vpp_evt_q, u8 *data, u32 len, u8 noblock)
 
static int app_send_dgram (app_session_t *s, u8 *data, u32 len, u8 noblock)
 
static int app_send_stream_raw (svm_fifo_t *f, svm_queue_t *vpp_evt_q, u8 *data, u32 len, u8 noblock)
 
static int app_send_stream (app_session_t *s, u8 *data, u32 len, u8 noblock)
 
static int app_send (app_session_t *s, u8 *data, u32 len, u8 noblock)
 
static int app_recv_dgram_raw (svm_fifo_t *f, u8 *buf, u32 len, app_session_transport_t *at, u8 clear_evt)
 
static int app_recv_dgram (app_session_t *s, u8 *buf, u32 len)
 
static int app_recv_stream_raw (svm_fifo_t *f, u8 *buf, u32 len, u8 clear_evt)
 
static int app_recv_stream (app_session_t *s, u8 *buf, u32 len)
 
static int app_recv (app_session_t *s, u8 *data, u32 len)
 

Variables

const char test_srv_crt_rsa []
 
const u32 test_srv_crt_rsa_len
 
const char test_srv_key_rsa []
 
const u32 test_srv_key_rsa_len
 

Macro Definition Documentation

foreach_app_options_flags
Value:
_(ACCEPT_REDIRECT, "Use FIFO with redirects") \
_(ADD_SEGMENT, "Add segment and signal app if needed") \
_(IS_BUILTIN, "Application is builtin") \
_(IS_PROXY, "Application is proxying") \
_(USE_GLOBAL_SCOPE, "App can use global session scope") \
_(USE_LOCAL_SCOPE, "App can use local session scope")

Definition at line 133 of file application_interface.h.

#define foreach_app_session_field
Value:
_(svm_fifo_t, *rx_fifo) /**< rx fifo */ \
_(svm_fifo_t, *tx_fifo) /**< tx fifo */ \
_(session_type_t, session_type) /**< session type */ \
_(volatile u8, session_state) /**< session state */ \
_(u32, session_index) /**< index in owning pool */ \
_(app_session_transport_t, transport) /**< transport info */ \
_(svm_queue_t, *vpp_evt_q) /**< vpp event queue */ \
_(u8, is_dgram)
unsigned char u8
Definition: types.h:56
struct _svm_fifo svm_fifo_t
unsigned int u32
Definition: types.h:88
u8 session_type_t
struct _svm_queue svm_queue_t

flag for dgram mode

Definition at line 183 of file application_interface.h.

Typedef Documentation

typedef enum _app_options_flags app_options_flags_t
typedef enum _app_options app_options_t
typedef struct _vnet_application_add_tls_cert_args_t vnet_app_add_tls_cert_args_t
typedef struct _vnet_application_add_tls_key_args_t vnet_app_add_tls_key_args_t
typedef struct _vnet_app_attach_args_t vnet_app_attach_args_t
typedef struct _vnet_app_detach_args_t vnet_app_detach_args_t
typedef struct _vnet_bind_args_t vnet_bind_args_t
typedef struct _vnet_connect_args vnet_connect_args_t
typedef struct _vnet_disconnect_args_t vnet_disconnect_args_t
typedef struct _vnet_unbind_args_t vnet_unbind_args_t

Enumeration Type Documentation

Enumerator
APP_OPTIONS_FLAGS 
APP_OPTIONS_EVT_QUEUE_SIZE 
APP_OPTIONS_SEGMENT_SIZE 
APP_OPTIONS_ADD_SEGMENT_SIZE 
APP_OPTIONS_PRIVATE_SEGMENT_COUNT 
APP_OPTIONS_RX_FIFO_SIZE 
APP_OPTIONS_TX_FIFO_SIZE 
APP_OPTIONS_PREALLOC_FIFO_PAIRS 
APP_OPTIONS_NAMESPACE 
APP_OPTIONS_NAMESPACE_SECRET 
APP_OPTIONS_PROXY_TRANSPORT 
APP_OPTIONS_ACCEPT_COOKIE 
APP_OPTIONS_TLS_ENGINE 
APP_OPTIONS_N_OPTIONS 

Definition at line 115 of file application_interface.h.

Function Documentation

static int app_recv ( app_session_t s,
u8 data,
u32  len 
)
inlinestatic

Definition at line 328 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_recv_dgram ( app_session_t s,
u8 buf,
u32  len 
)
inlinestatic

Definition at line 308 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_recv_dgram_raw ( svm_fifo_t f,
u8 buf,
u32  len,
app_session_transport_t at,
u8  clear_evt 
)
inlinestatic

Definition at line 280 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_recv_stream ( app_session_t s,
u8 buf,
u32  len 
)
inlinestatic

Definition at line 322 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_recv_stream_raw ( svm_fifo_t f,
u8 buf,
u32  len,
u8  clear_evt 
)
inlinestatic

Definition at line 314 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_send ( app_session_t s,
u8 data,
u32  len,
u8  noblock 
)
inlinestatic

Definition at line 272 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_send_dgram ( app_session_t s,
u8 data,
u32  len,
u8  noblock 
)
inlinestatic

Definition at line 240 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_send_dgram_raw ( svm_fifo_t f,
app_session_transport_t at,
svm_queue_t vpp_evt_q,
u8 data,
u32  len,
u8  noblock 
)
inlinestatic

Definition at line 202 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_send_stream ( app_session_t s,
u8 data,
u32  len,
u8  noblock 
)
inlinestatic

Definition at line 266 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_send_stream_raw ( svm_fifo_t f,
svm_queue_t vpp_evt_q,
u8 data,
u32  len,
u8  noblock 
)
inlinestatic

Definition at line 247 of file application_interface.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_app_add_tls_cert ( vnet_app_add_tls_cert_args_t a)

Definition at line 1233 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_app_add_tls_key ( vnet_app_add_tls_key_args_t a)

Definition at line 1245 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_application_attach ( vnet_app_attach_args_t a)

Attach application to vpp.

Allocates a vpp app, i.e., a structure that keeps back pointers to external app and a segment manager for shared memory fifo based communication with the external app.

Definition at line 447 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_application_detach ( vnet_app_detach_args_t a)

Detach application from vpp.

Definition at line 498 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_bind ( vnet_bind_args_t a)

Definition at line 597 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_bind_uri ( vnet_bind_args_t )

Definition at line 514 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_connect ( vnet_connect_args_t a)

Definition at line 615 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_connect_uri ( vnet_connect_args_t a)

Definition at line 550 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_disconnect_session ( vnet_disconnect_args_t a)

Definition at line 567 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_unbind ( vnet_unbind_args_t a)

Definition at line 606 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_unbind_uri ( vnet_unbind_args_t a)

Definition at line 527 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const char test_srv_crt_rsa[]

Definition at line 28 of file application_interface.c.

const u32 test_srv_crt_rsa_len

Definition at line 52 of file application_interface.c.

const char test_srv_key_rsa[]

Definition at line 54 of file application_interface.c.

const u32 test_srv_key_rsa_len

Definition at line 82 of file application_interface.c.