FD.io VPP  v18.11-rc0-18-g2a3fb1a
Vector Packet Processing
application_interface.c File Reference

VPP's application/session API bind/unbind/connect/disconnect calls. More...

+ Include dependency graph for application_interface.c:

Go to the source code of this file.

Functions

static u8 session_endpoint_is_local (session_endpoint_t *sep)
 
static u8 session_endpoint_is_zero (session_endpoint_t *sep)
 
u8 session_endpoint_in_ns (session_endpoint_t *sep)
 
int api_parse_session_handle (u64 handle, u32 *session_index, u32 *thread_index)
 
static void session_endpoint_update_for_app (session_endpoint_t *sep, application_t *app)
 
static int vnet_bind_i (u32 app_index, session_endpoint_t *sep, u64 *handle)
 
int vnet_unbind_i (u32 app_index, session_handle_t handle)
 
int application_connect (u32 client_index, u32 api_context, session_endpoint_t *sep)
 
uword unformat_vnet_uri (unformat_input_t *input, va_list *args)
 unformat a vnet URI More...
 
int parse_uri (char *uri, session_endpoint_extended_t *sep)
 
static int session_validate_namespace (u8 *namespace_id, u64 secret, u32 *app_ns_index)
 
clib_error_tvnet_application_attach (vnet_app_attach_args_t *a)
 Attach application to vpp. More...
 
int vnet_application_detach (vnet_app_detach_args_t *a)
 Detach application from vpp. More...
 
int vnet_bind_uri (vnet_bind_args_t *a)
 
int vnet_unbind_uri (vnet_unbind_args_t *a)
 
clib_error_tvnet_connect_uri (vnet_connect_args_t *a)
 
int vnet_disconnect_session (vnet_disconnect_args_t *a)
 
clib_error_tvnet_bind (vnet_bind_args_t *a)
 
clib_error_tvnet_unbind (vnet_unbind_args_t *a)
 
clib_error_tvnet_connect (vnet_connect_args_t *a)
 

Variables

const char test_srv_crt_rsa []
 
const u32 test_srv_crt_rsa_len = sizeof (test_srv_crt_rsa)
 
const char test_srv_key_rsa []
 
const u32 test_srv_key_rsa_len = sizeof (test_srv_key_rsa)
 
static u8cache_uri
 
static session_endpoint_extended_tcache_sep
 

Detailed Description

VPP's application/session API bind/unbind/connect/disconnect calls.

Definition in file application_interface.c.

Function Documentation

int api_parse_session_handle ( u64  handle,
u32 session_index,
u32 thread_index 
)

Definition at line 113 of file application_interface.c.

+ Here is the call graph for this function:

int application_connect ( u32  client_index,
u32  api_context,
session_endpoint_t sep 
)

Definition at line 241 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int parse_uri ( char *  uri,
session_endpoint_extended_t sep 
)

Definition at line 385 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 session_endpoint_in_ns ( session_endpoint_t sep)

Definition at line 98 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 session_endpoint_is_local ( session_endpoint_t sep)
static

Definition at line 85 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 session_endpoint_is_zero ( session_endpoint_t sep)
static

Definition at line 92 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_endpoint_update_for_app ( session_endpoint_t sep,
application_t app 
)
static

Definition at line 133 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int session_validate_namespace ( u8 namespace_id,
u64  secret,
u32 app_ns_index 
)
static

Definition at line 418 of file application_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_vnet_uri ( unformat_input_t input,
va_list *  args 
)

unformat a vnet URI

transport-proto://[hostname]ip46-addr:port eg. tcp://ip46-addr:port tls://[testtsl.fd.io]ip46-addr:port

u8 ip46_address[16]; u16 port_in_host_byte_order; stream_session_type_t sst; u8 *fifo_name;

if (unformat (input, "%U", unformat_vnet_uri(), &ip46_address, &sst, &port, &fifo_name)) etc...

Definition at line 337 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_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:

static int vnet_bind_i ( u32  app_index,
session_endpoint_t sep,
u64 handle 
)
static

Definition at line 151 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 a)

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_i ( u32  app_index,
session_handle_t  handle 
)

Definition at line 215 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

session_endpoint_extended_t* cache_sep
static

Definition at line 382 of file application_interface.c.

u8* cache_uri
static

Definition at line 381 of file application_interface.c.

const char test_srv_crt_rsa[]
Initial value:
=
"-----BEGIN CERTIFICATE-----\r\n"
"MIID5zCCAs+gAwIBAgIJALeMYCEHrTtJMA0GCSqGSIb3DQEBCwUAMIGJMQswCQYD\r\n"
"VQQGEwJVUzELMAkGA1UECAwCQ0ExETAPBgNVBAcMCFNhbiBKb3NlMQ4wDAYDVQQK\r\n"
"DAVDaXNjbzEOMAwGA1UECww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Bo+i6I8u4HiiQ4rYmG0Hv6+sXn3of0HsbtDPGgWZoipPWDljPYEURu3e\r\n"
"3HRe/Dtsj9CakBoSDzs8ndWaBR+f4sM9Tk1cjD46Gq2T/qpSPXqKxEUXlzhdCAn4\r\n"
"twub17Bq2kykHpppCwPg5M+v30tHG/R2Go15MeFWbEJthFk3TZMjKL7UFs7fH+x2\r\n"
"wSonXb++jY+KmCb93C+soABBizE57g/KmiR2IxQ/LMjDik01RSUIaM0lLA==\r\n"
"-----END CERTIFICATE-----\r\n"

Definition at line 28 of file application_interface.c.

const u32 test_srv_crt_rsa_len = sizeof (test_srv_crt_rsa)

Definition at line 52 of file application_interface.c.

const char test_srv_key_rsa[]
Initial value:
=
"-----BEGIN PRIVATE KEY-----\r\n"
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDgLWTxrUO5K2CC\r\n"
"CpPijT18/2wnZ0LnhvGFL9eTZUR9ohnbbZZKjhf+zJFV9XL1hqFykjXMn9EPFplI\r\n"
"WGAD6c9kGsUyytQuSt0A6k5WPx4MSn0m5Z07Y4NKgWcK8vFxhYFhzmQevImkRoYm\r\n"
"XWwVBJ6yfMwW3L/n21rSy2TQWnyvk2EiNa9Ki8bM+joGHP5VLZx5shmHjHW3aEdo\r\n"
"VyCbSomgnoNx5F5YJbzD7I5Wi9OiUYar5ulvYefsydFJnYrY10v5otemRltL8A4M\r\n"
"/UUXa9M7WZgvb3Qs7v/nW8mY9c0pINgzLkS8guvn9Wq2OwULBEtDiNwz/4Z4dIAV\r\n"
"bHioi/QHAgMBAAECggEBAMzGipP8+oT166U+NlJXRFifFVN1DvdhG9PWnOxGL+c3\r\n"
"ILmBBC08WQzmHshPemBvR6DZkA1H23cV5JTiLWrFtC00CvhXsLRMrE5+uWotI6yE\r\n"
"iofybMroHvD6/X5R510UX9hQ6MHu5ShLR5VZ9zXHz5MpTmB/60jG5dLx+jgcwBK8\r\n"
"LuGv2YB/WCUwT9QJ3YU2eaing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+FRWV8yYkHAnXYW3tNoweDIwixE0hkPR1bc\r\n"
"oEjPLVNtx8SOj/M4rhaPT3I=\r\n" "-----END PRIVATE KEY-----\r\n"

Definition at line 54 of file application_interface.c.

const u32 test_srv_key_rsa_len = sizeof (test_srv_key_rsa)

Definition at line 82 of file application_interface.c.