session: update due to clib_socket refactoring
[vpp.git] / src / vnet / session / application_namespace.h
index 14bea61..02a4a07 100644 (file)
@@ -64,6 +64,7 @@ typedef struct _app_namespace
 typedef struct _vnet_app_namespace_add_del_args
 {
   u8 *ns_id;
+  u8 *sock_name;
   u64 secret;
   u32 sw_if_index;
   u32 ip4_fib_id;
@@ -73,13 +74,13 @@ typedef struct _vnet_app_namespace_add_del_args
 
 #define APP_NAMESPACE_INVALID_INDEX ((u32)~0)
 
-app_namespace_t *app_namespace_alloc (u8 * ns_id);
+app_namespace_t *app_namespace_alloc (const u8 *ns_id);
 app_namespace_t *app_namespace_get (u32 index);
-app_namespace_t *app_namespace_get_from_id (const u8 * ns_id);
+app_namespace_t *app_namespace_get_from_id (const u8 *ns_id);
 u32 app_namespace_index (app_namespace_t * app_ns);
 const u8 *app_namespace_id (app_namespace_t * app_ns);
 const u8 *app_namespace_id_from_index (u32 index);
-u32 app_namespace_index_from_id (const u8 * ns_id);
+u32 app_namespace_index_from_id (const u8 *ns_id);
 void app_namespaces_init (void);
 int vnet_app_namespace_add_del (vnet_app_namespace_add_del_args_t * a);
 u32 app_namespace_get_fib_index (app_namespace_t * app_ns, u8 fib_proto);
@@ -102,15 +103,15 @@ typedef struct app_ns_api_handle_
       /** socket index for files and clib file index for sockets */
       u32 u_index;
     };
-    uword as_uword;
+    u64 as_u64;
   };
 #define aah_app_ns_index l_index
 #define aah_app_wrk_index l_index
 #define aah_sock_index u_index
 #define aah_file_index u_index
-} __attribute__ ((aligned (sizeof (uword)))) app_ns_api_handle_t;
+} __attribute__ ((aligned (sizeof (u64)))) app_ns_api_handle_t;
 
-STATIC_ASSERT (sizeof (app_ns_api_handle_t) == sizeof (uword), "not uword");
+STATIC_ASSERT (sizeof (app_ns_api_handle_t) == sizeof (u64), "not u64");
 
 static inline clib_socket_t *
 appns_sapi_alloc_socket (app_namespace_t * app_ns)
@@ -153,8 +154,9 @@ appns_sapi_handle_sock_index (u32 sapi_sock_handle)
 }
 
 int appns_sapi_add_ns_socket (app_namespace_t * app_ns);
+void appns_sapi_del_ns_socket (app_namespace_t *app_ns);
 u8 appns_sapi_enabled (void);
-void appns_sapi_enable (void);
+int appns_sapi_enable_disable (int is_enable);
 
 #endif /* SRC_VNET_SESSION_APPLICATION_NAMESPACE_H_ */