session: add unix socket api for app attachment

This is an af_unix socket alternative to the binary api. To enable it,
add use-app-socket-api under session stanza in startup.conf. When the
socket api is enabled, attachments through the binary api are disabled.

The socket api only works with memfd fifo segments, i.e., shm segments
are not supported.

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I55ffcee201d004846daeeec85c700c7e7a578d43
This commit is contained in:
Florin Coras
2020-09-02 19:10:28 -07:00
committed by Dave Barach
parent 4a2c794c43
commit 61ae056bdb
6 changed files with 743 additions and 18 deletions

View File

@ -1904,6 +1904,8 @@ session_config_fn (vlib_main_t * vm, unformat_input_t * input)
;
else if (unformat (input, "enable"))
smm->session_enable_asap = 1;
else if (unformat (input, "use-app-socket-api"))
appns_sapi_enable ();
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, input);