session: extend connect api for internal apps

Change-Id: Ie4c5cfc4c97acb321a46b4df589dc44de1b616ba
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/stream_session.h b/src/vnet/session/stream_session.h
index 287a892..c335c5b 100644
--- a/src/vnet/session/stream_session.h
+++ b/src/vnet/session/stream_session.h
@@ -153,8 +153,8 @@
 } 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 @@
 #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 @@
   u32 app_wrk_index;
   u32 opaque;
   u8 *hostname;
-} session_endpoint_extended_t;
+} session_endpoint_cfg_t;
 
 #define SESSION_IP46_ZERO			\
 {						\
@@ -179,6 +179,15 @@
 	{ 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 @@
   .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 @@
 }
 
 #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)