summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.api
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/session.api
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/session.api')
-rw-r--r--src/vnet/session/session.api39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/vnet/session/session.api b/src/vnet/session/session.api
index 53e2834e839..43bde1afbbd 100644
--- a/src/vnet/session/session.api
+++ b/src/vnet/session/session.api
@@ -217,6 +217,7 @@ autoreply define session_enable_disable {
@param namespace_id - namespace id
*/
define app_namespace_add_del {
+ option deprecated;
u32 client_index;
u32 context;
u64 secret;
@@ -226,6 +227,31 @@ define app_namespace_add_del {
string namespace_id[];
};
+/** \brief add/del application namespace
+ @param client_index - opaque cookie to identify the sender
+ client to vpp direction only
+ @param context - sender context, to match reply w/ request
+ @param secret - secret shared between app and vpp
+ @param sw_if_index - local interface that "supports" namespace. Set to
+ ~0 if no preference
+ @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
+ if sw_if_index set.
+ @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
+ if sw_if_index set.
+ @param namespace_id - namespace id
+ @param netns - linux net namespace
+*/
+define app_namespace_add_del_v2 {
+ u32 client_index;
+ u32 context;
+ u64 secret;
+ vl_api_interface_index_t sw_if_index [default=0xffffffff];
+ u32 ip4_fib_id;
+ u32 ip6_fib_id;
+ string namespace_id[64];
+ string netns[64];
+};
+
/** \brief Reply for app namespace add/del
@param context - returned sender context, to match reply w/ request
@param retval - return code
@@ -233,6 +259,19 @@ define app_namespace_add_del {
*/
define app_namespace_add_del_reply
{
+ option deprecated;
+ u32 context;
+ i32 retval;
+ u32 appns_index;
+};
+
+/** \brief Reply for app namespace add/del
+ @param context - returned sender context, to match reply w/ request
+ @param retval - return code
+ @param appns_index - app namespace index
+*/
+define app_namespace_add_del_v2_reply
+{
u32 context;
i32 retval;
u32 appns_index;