summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_namespace.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-07-23 08:39:26 -0700
committerFlorin Coras <florin.coras@gmail.com>2021-07-23 17:42:48 +0000
commit7cb471a0279ab2a3740a49d6ce9cf7b24f0a3f4d (patch)
tree244a17d7b4c4e138b51fe5226db414f206562172 /src/vnet/session/application_namespace.h
parentf6e284b20c7a5b774ae21934fbf3f07801d61fc2 (diff)
session vcl: support abstract sockets for app ns
App namespaces can now be associated to a linux ip netns, e.g.: app ns add id <ns_id> secret <n> sw_if_index <n> netns <netns> If session layer's app sock api is enabled, this triggers the creation of an abstract listening socket in the netns that has been configured. For the example above that would be @vpp/session/<ns_id>. Consequently, vcl, or other apps attaching to vpp, can connect to said abstract socket from an ip netns without the need to share unix domain socket files. In particular, for vcl it's enough to set app-socket-api to @vpp/session/<ns_id> in the conf file. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I26fdc626a760a3f423c5b8be4251623f6e9cd73a
Diffstat (limited to 'src/vnet/session/application_namespace.h')
-rw-r--r--src/vnet/session/application_namespace.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/session/application_namespace.h b/src/vnet/session/application_namespace.h
index ddc6d08c2fc..313b2d0e63d 100644
--- a/src/vnet/session/application_namespace.h
+++ b/src/vnet/session/application_namespace.h
@@ -51,6 +51,11 @@ typedef struct _app_namespace
u8 *ns_id;
/**
+ * Linux netns if one was provided
+ */
+ u8 *netns;
+
+ /**
* Name of socket applications can use to attach to session layer
*/
u8 *sock_name;
@@ -64,6 +69,7 @@ typedef struct _app_namespace
typedef struct _vnet_app_namespace_add_del_args
{
u8 *ns_id;
+ u8 *netns;
u64 secret;
u32 sw_if_index;
u32 ip4_fib_id;