20 #ifndef SRC_VNET_SESSION_APPLICATION_NAMESPACE_H_ 21 #define SRC_VNET_SESSION_APPLICATION_NAMESPACE_H_ 23 typedef struct _app_namespace
41 u32 local_table_index;
64 typedef struct _vnet_app_namespace_add_del_args
74 #define APP_NAMESPACE_INVALID_INDEX ((u32)~0) 107 #define aah_app_ns_index l_index 108 #define aah_app_wrk_index l_index 109 #define aah_sock_index u_index 110 #define aah_file_index u_index 140 return (cs - app_ns->app_sockets);
152 return sapi_sock_handle & 0xffff;
u8 appns_sapi_enabled(void)
u32 l_index
app_ns index for files and app_index for sockets
void app_namespaces_init(void)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
static clib_socket_t * appns_sapi_alloc_socket(app_namespace_t *app_ns)
static u32 appns_sapi_socket_index(app_namespace_t *app_ns, clib_socket_t *cs)
struct _vnet_app_namespace_add_del_args vnet_app_namespace_add_del_args_t
void appns_sapi_enable(void)
static clib_socket_t * appns_sapi_get_socket(app_namespace_t *app_ns, u32 sock_index)
int appns_sapi_add_ns_socket(app_namespace_t *app_ns)
app_namespace_t * app_namespace_alloc(u8 *ns_id)
STATIC_ASSERT(sizeof(app_ns_api_handle_t)==sizeof(u64), "not u64")
static u32 appns_sapi_socket_handle(app_namespace_t *app_ns, clib_socket_t *cs)
session_table_t * app_namespace_get_local_table(app_namespace_t *app_ns)
static void appns_sapi_free_socket(app_namespace_t *app_ns, clib_socket_t *cs)
u32 app_namespace_index_from_id(const u8 *ns_id)
const u8 * app_namespace_id(app_namespace_t *app_ns)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
struct app_ns_api_handle_ app_ns_api_handle_t
static app_namespace_t * app_namespace_get_default(void)
#define pool_put(P, E)
Free an object E in pool P.
app_namespace_t * app_namespace_get(u32 index)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
u32 app_namespace_get_fib_index(app_namespace_t *app_ns, u8 fib_proto)
struct _app_namespace app_namespace_t
const u8 * app_namespace_id_from_index(u32 index)
static u32 appns_sapi_handle_sock_index(u32 sapi_sock_handle)
struct _socket_t clib_socket_t
u32 u_index
socket index for files and clib file index for sockets
struct _session_lookup_table session_table_t
app_namespace_t * app_namespace_get_from_id(const u8 *ns_id)
u32 app_namespace_index(app_namespace_t *app_ns)
vl_api_interface_index_t sw_if_index
int vnet_app_namespace_add_del(vnet_app_namespace_add_del_args_t *a)