diff options
author | Florin Coras <fcoras@cisco.com> | 2018-10-25 18:03:45 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-28 14:57:26 +0000 |
commit | 5665cedf57165c05d00f28de06b627047902ffce (patch) | |
tree | b9a07ed14844302ac512459df7e851ccf370ef4d /src/vnet/session/stream_session.h | |
parent | 75b39f87119c1df67723798e16f7c18265da4e15 (diff) |
session: extend connect api for internal apps
Change-Id: Ie4c5cfc4c97acb321a46b4df589dc44de1b616ba
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/stream_session.h')
-rw-r--r-- | src/vnet/session/stream_session.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/vnet/session/stream_session.h b/src/vnet/session/stream_session.h index 287a8927339..c335c5b833e 100644 --- a/src/vnet/session/stream_session.h +++ b/src/vnet/session/stream_session.h @@ -153,8 +153,8 @@ typedef struct local_session_ } local_session_t; #define foreach_session_endpoint_fields \ - foreach_transport_connection_fields \ - _(u8, transport_proto) \ + foreach_transport_endpoint_cfg_fields \ + _(u8, transport_proto) \ typedef struct _session_endpoint { @@ -163,7 +163,7 @@ typedef struct _session_endpoint #undef _ } session_endpoint_t; -typedef struct _session_endpoint_extended +typedef struct _session_endpoint_cfg { #define _(type, name) type name; foreach_session_endpoint_fields @@ -171,7 +171,7 @@ typedef struct _session_endpoint_extended u32 app_wrk_index; u32 opaque; u8 *hostname; -} session_endpoint_extended_t; +} session_endpoint_cfg_t; #define SESSION_IP46_ZERO \ { \ @@ -179,6 +179,15 @@ typedef struct _session_endpoint_extended { 0, 0, }, \ }, \ } + +#define TRANSPORT_ENDPOINT_NULL \ +{ \ + .sw_if_index = ENDPOINT_INVALID_INDEX, \ + .ip = SESSION_IP46_ZERO, \ + .fib_index = ENDPOINT_INVALID_INDEX, \ + .is_ip4 = 0, \ + .port = 0, \ +} #define SESSION_ENDPOINT_NULL \ { \ .sw_if_index = ENDPOINT_INVALID_INDEX, \ @@ -186,15 +195,17 @@ typedef struct _session_endpoint_extended .fib_index = ENDPOINT_INVALID_INDEX, \ .is_ip4 = 0, \ .port = 0, \ + .peer = TRANSPORT_ENDPOINT_NULL, \ .transport_proto = 0, \ } -#define SESSION_ENDPOINT_EXT_NULL \ +#define SESSION_ENDPOINT_CFG_NULL \ { \ .sw_if_index = ENDPOINT_INVALID_INDEX, \ .ip = SESSION_IP46_ZERO, \ .fib_index = ENDPOINT_INVALID_INDEX, \ .is_ip4 = 0, \ .port = 0, \ + .peer = TRANSPORT_ENDPOINT_NULL, \ .transport_proto = 0, \ .app_wrk_index = ENDPOINT_INVALID_INDEX, \ .opaque = ENDPOINT_INVALID_INDEX, \ @@ -202,6 +213,8 @@ typedef struct _session_endpoint_extended } #define session_endpoint_to_transport(_sep) ((transport_endpoint_t *)_sep) +#define session_endpoint_to_transport_cfg(_sep) \ + ((transport_endpoint_cfg_t *)_sep) always_inline u8 session_endpoint_fib_proto (session_endpoint_t * sep) |