diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2021-07-28 19:35:08 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-09-16 14:14:38 +0000 |
commit | 1a9e2f96d48e346311bbc584510a14e3f721b41c (patch) | |
tree | aefbc08b91c0c87d54792d4b32b785a5fe784b31 /src/vnet/session/session.api | |
parent | 4fd9f10c4535724fd52b05d703fb56a33edc1138 (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/session.api')
-rw-r--r-- | src/vnet/session/session.api | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/vnet/session/session.api b/src/vnet/session/session.api index 43bde1afbbd..0eb773c0c28 100644 --- a/src/vnet/session/session.api +++ b/src/vnet/session/session.api @@ -252,6 +252,34 @@ define app_namespace_add_del_v2 { string netns[64]; }; +/** \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 + @param sock_name - socket name (path, abstract socket name) +*/ +define app_namespace_add_del_v3 { + u32 client_index; + u32 context; + u64 secret; + bool is_add [default=true]; + 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]; + string sock_name[]; +}; + /** \brief Reply for app namespace add/del @param context - returned sender context, to match reply w/ request @param retval - return code @@ -277,6 +305,13 @@ define app_namespace_add_del_v2_reply u32 appns_index; }; +define app_namespace_add_del_v3_reply +{ + u32 context; + i32 retval; + u32 appns_index; +}; + enum session_rule_scope { SESSION_RULE_SCOPE_API_GLOBAL = 0, SESSION_RULE_SCOPE_API_LOCAL = 1, |