session: add support for application namespacing 11/8611/22
authorFlorin Coras <fcoras@cisco.com>
Mon, 2 Oct 2017 07:18:51 +0000 (00:18 -0700)
committerDave Barach <openvpp@barachs.net>
Tue, 10 Oct 2017 20:42:50 +0000 (20:42 +0000)
commitcea194d8f973a2f2b5ef72d212533057174cc70a
tree6fdd2e8a929c62625d1ad35bfbec342129989aef
parent1f36a93d3d68f5ba6dcda08809394ce757cefd72
session: add support for application namespacing

Applications are now provided the option to select the namespace they
are to be attached to and the scope of their attachement. Application
namespaces are meant to:
1) constrain the scope of communication through the network by
association with source interfaces and/or fib tables that provide the
source ips to be used and limit the scope of routing
2) provide a namespace local scope to session layer communication, as
opposed to the global scope provided by 1). That is, sessions can be
established without assistance from transport and network layers.
Albeit, zero/local-host ip addresses must still be provided in session
establishment messages due to existing application idiosyncrasies. This
mode of communication uses shared-memory fifos (cut-through sessions)
exclusively.

If applications request no namespace, they are assigned to the default
one, which at its turn uses the default fib. Applications can request
access to both local and global scopes for a namespace. If no scope is
specified, session layer defaults to the global one.

When a sw_if_index is provided for a namespace, zero-ip (INADDR_ANY)
binds are converted to binds to the requested interface.

Change-Id: Ia0f660bbf7eec7f89673f75b4821fc7c3d58e3d1
Signed-off-by: Florin Coras <fcoras@cisco.com>
43 files changed:
src/uri/uri_tcp_test.c
src/uri/uri_udp_test.c
src/uri/vppcom.c
src/vat/api_format.c
src/vnet.am
src/vnet/api_errno.h
src/vnet/buffer.h
src/vnet/ip/ip.c [new file with mode: 0644]
src/vnet/ip/ip.h
src/vnet/ip/ip4_forward.c
src/vnet/ip/ip6_forward.c
src/vnet/session/application.c
src/vnet/session/application.h
src/vnet/session/application_interface.c
src/vnet/session/application_interface.h
src/vnet/session/application_namespace.c [new file with mode: 0644]
src/vnet/session/application_namespace.h [new file with mode: 0644]
src/vnet/session/segment_manager.c
src/vnet/session/session.api
src/vnet/session/session.c
src/vnet/session/session.h
src/vnet/session/session_api.c
src/vnet/session/session_cli.c
src/vnet/session/session_debug.h
src/vnet/session/session_lookup.c
src/vnet/session/session_lookup.h
src/vnet/session/session_node.c
src/vnet/session/session_table.c [new file with mode: 0644]
src/vnet/session/session_table.h [new file with mode: 0644]
src/vnet/session/session_test.c [new file with mode: 0644]
src/vnet/session/stream_session.h
src/vnet/session/transport.h
src/vnet/tcp/builtin_client.c
src/vnet/tcp/builtin_http_server.c
src/vnet/tcp/builtin_proxy.c
src/vnet/tcp/builtin_server.c
src/vnet/tcp/tcp.c
src/vnet/tcp/tcp_input.c
src/vnet/tcp/tcp_output.c
src/vnet/tcp/tcp_test.c
src/vnet/udp/builtin_server.c
src/vnet/udp/udp_input.c
src/vpp/api/custom_dump.c