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
diff --git a/src/vnet/session/application_namespace.h b/src/vnet/session/application_namespace.h
index ddc6d08..313b2d0 100644
--- a/src/vnet/session/application_namespace.h
+++ b/src/vnet/session/application_namespace.h
@@ -51,6 +51,11 @@
   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 _vnet_app_namespace_add_del_args
 {
   u8 *ns_id;
+  u8 *netns;
   u64 secret;
   u32 sw_if_index;
   u32 ip4_fib_id;