Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
session: first approximation implementation of tls
[vpp.git]
/
src
/
vnet
/
session
/
application_interface.h
diff --git
a/src/vnet/session/application_interface.h
b/src/vnet/session/application_interface.h
index
686b418
..
2ab09d6
100644
(file)
--- a/
src/vnet/session/application_interface.h
+++ b/
src/vnet/session/application_interface.h
@@
-30,7
+30,7
@@
typedef struct _vnet_app_attach_args_t
/** Application and segment manager options */
u64 *options;
/** Application and segment manager options */
u64 *options;
- /*
Namespace id
*/
+ /*
* ID of the namespace the app has access to
*/
u8 *namespace_id;
/** Session to application callback functions */
u8 *namespace_id;
/** Session to application callback functions */
@@
-39,9
+39,7
@@
typedef struct _vnet_app_attach_args_t
/*
* Results
*/
/*
* Results
*/
- u8 *segment_name;
- u32 segment_name_length;
- u32 segment_size;
+ ssvm_private_t *segment;
u64 app_event_queue_address;
u32 app_index;
} vnet_app_attach_args_t;
u64 app_event_queue_address;
u32 app_index;
} vnet_app_attach_args_t;
@@
-82,40
+80,53
@@
typedef struct _vnet_unbind_args_t
typedef struct _vnet_connect_args
{
typedef struct _vnet_connect_args
{
- char *uri;
- session_endpoint_t sep;
+ union
+ {
+ char *uri;
+ session_endpoint_t sep;
+ };
u32 app_index;
u32 api_context;
/* Used for redirects */
void *mp;
u32 app_index;
u32 api_context;
/* Used for redirects */
void *mp;
-
u64
session_handle;
+
session_handle_t
session_handle;
} vnet_connect_args_t;
typedef struct _vnet_disconnect_args_t
{
} vnet_connect_args_t;
typedef struct _vnet_disconnect_args_t
{
-
u64
handle;
+
session_handle_t
handle;
u32 app_index;
} vnet_disconnect_args_t;
u32 app_index;
} vnet_disconnect_args_t;
+typedef struct _vnet_application_add_tls_cert_args_t
+{
+ u32 app_index;
+ u8 *cert;
+} vnet_app_add_tls_cert_args_t;
+
+typedef struct _vnet_application_add_tls_key_args_t
+{
+ u32 app_index;
+ u8 *key;
+} vnet_app_add_tls_key_args_t;
+
/* Application attach options */
typedef enum
{
/* Application attach options */
typedef enum
{
- APP_EVT_QUEUE_SIZE,
APP_OPTIONS_FLAGS,
APP_OPTIONS_FLAGS,
- APP_OPTIONS_PREALLOC_FIFO_PAIRS,
+ APP_OPTIONS_EVT_QUEUE_SIZE,
+ APP_OPTIONS_SEGMENT_SIZE,
+ APP_OPTIONS_ADD_SEGMENT_SIZE,
APP_OPTIONS_PRIVATE_SEGMENT_COUNT,
APP_OPTIONS_PRIVATE_SEGMENT_COUNT,
- APP_OPTIONS_PRIVATE_SEGMENT_SIZE,
+ 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_NAMESPACE,
APP_OPTIONS_NAMESPACE_SECRET,
APP_OPTIONS_PROXY_TRANSPORT,
- SESSION_OPTIONS_SEGMENT_SIZE,
- SESSION_OPTIONS_ADD_SEGMENT_SIZE,
- SESSION_OPTIONS_RX_FIFO_SIZE,
- SESSION_OPTIONS_TX_FIFO_SIZE,
- SESSION_OPTIONS_PREALLOCATED_FIFO_PAIRS,
- SESSION_OPTIONS_ACCEPT_COOKIE,
- SESSION_OPTIONS_N_OPTIONS
+ APP_OPTIONS_ACCEPT_COOKIE,
+ APP_OPTIONS_N_OPTIONS
} app_attach_options_index_t;
#define foreach_app_options_flags \
} app_attach_options_index_t;
#define foreach_app_options_flags \
@@
-140,21
+151,24
@@
typedef enum _app_options_flags
#undef _
} app_options_flags_t;
#undef _
} app_options_flags_t;
-clib_error_t *vnet_application_attach (vnet_app_attach_args_t * a);
-int vnet_application_detach (vnet_app_detach_args_t * a);
-
int vnet_bind_uri (vnet_bind_args_t *);
int vnet_unbind_uri (vnet_unbind_args_t * a);
clib_error_t *vnet_connect_uri (vnet_connect_args_t * a);
int vnet_bind_uri (vnet_bind_args_t *);
int vnet_unbind_uri (vnet_unbind_args_t * a);
clib_error_t *vnet_connect_uri (vnet_connect_args_t * a);
-int vnet_disconnect_session (vnet_disconnect_args_t * a);
+clib_error_t *vnet_application_attach (vnet_app_attach_args_t * a);
clib_error_t *vnet_bind (vnet_bind_args_t * a);
clib_error_t *vnet_connect (vnet_connect_args_t * a);
clib_error_t *vnet_unbind (vnet_unbind_args_t * a);
clib_error_t *vnet_bind (vnet_bind_args_t * a);
clib_error_t *vnet_connect (vnet_connect_args_t * a);
clib_error_t *vnet_unbind (vnet_unbind_args_t * a);
+int vnet_application_detach (vnet_app_detach_args_t * a);
+int vnet_disconnect_session (vnet_disconnect_args_t * a);
+
+clib_error_t *vnet_app_add_tls_cert (vnet_app_add_tls_cert_args_t * a);
+clib_error_t *vnet_app_add_tls_key (vnet_app_add_tls_key_args_t * a);
-int
-api_parse_session_handle (u64 handle, u32 * session_index,
- u32 * thread_index);
+extern const char test_srv_crt_rsa[];
+extern const u32 test_srv_crt_rsa_len;
+extern const char test_srv_key_rsa[];
+extern const u32 test_srv_key_rsa_len;
#endif /* __included_uri_h__ */
#endif /* __included_uri_h__ */