summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_namespace.h
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-07-28 19:35:08 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-09-16 14:14:38 +0000
commit1a9e2f96d48e346311bbc584510a14e3f721b41c (patch)
treeaefbc08b91c0c87d54792d4b32b785a5fe784b31 /src/vnet/session/application_namespace.h
parent4fd9f10c4535724fd52b05d703fb56a33edc1138 (diff)
session: Add sock_name option to add_ns
This adds a new API call to add session namespaces It now takes a netns and a sock_name. (1) If no netns is passed, sock_name will be used as socket path. Defaulting to /run/vpp/app_ns_sockets/${ns_id} (2) If a netns is passed, the sock_name has to be abstract (i.e. start with '@'). It will default to `@vpp/session/${ns_id}` and will be created in the provided netns. Type: feature Change-Id: I90e9a8e5ecca2cabe7c05335663e33c8506dc9e7 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/session/application_namespace.h')
-rw-r--r--src/vnet/session/application_namespace.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/session/application_namespace.h b/src/vnet/session/application_namespace.h
index 313b2d0e63d..5449d4755c3 100644
--- a/src/vnet/session/application_namespace.h
+++ b/src/vnet/session/application_namespace.h
@@ -70,6 +70,7 @@ typedef struct _vnet_app_namespace_add_del_args
{
u8 *ns_id;
u8 *netns;
+ u8 *sock_name;
u64 secret;
u32 sw_if_index;
u32 ip4_fib_id;
@@ -79,13 +80,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);