udp/session: refactor to support dgram mode

- adds session layer support for datagram based protocols
- updates udp to work in pure connectionless and datagram mode. The
  existing connected mode is now 'accessible' for apps as a dummy UDPC,
  as in, connected udp, protocol.
- updates udp_echo, echo client, echo server code to work in datagram
  mode.

Change-Id: I2960c0d2d246cb166005f545794ec31fe0d546dd
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/transport_interface.h b/src/vnet/session/transport_interface.h
index 04a5ff2..f21e483 100644
--- a/src/vnet/session/transport_interface.h
+++ b/src/vnet/session/transport_interface.h
@@ -23,7 +23,8 @@
 {
   TRANSPORT_TX_PEEK,		/**< reliable transport protos */
   TRANSPORT_TX_DEQUEUE,		/**< unreliable transport protos */
-  TRANSPORT_TX_INTERNAL,		/**< apps acting as transports */
+  TRANSPORT_TX_INTERNAL,	/**< apps acting as transports */
+  TRANSPORT_TX_DGRAM,		/**< datagram mode */
   TRANSPORT_TX_N_FNS
 } transport_tx_fn_type_t;
 
@@ -31,7 +32,7 @@
 {
   TRANSPORT_SERVICE_VC,		/**< virtual circuit service */
   TRANSPORT_SERVICE_CL,		/**< connectionless service */
-  TRANSPORT_SERVICE_APP,		/**< app transport service */
+  TRANSPORT_SERVICE_APP,	/**< app transport service */
   TRANSPORT_N_SERVICES
 } transport_service_type_t;
 
@@ -96,6 +97,7 @@
 				  const transport_proto_vft_t * vft,
 				  fib_protocol_t fib_proto, u32 output_node);
 transport_proto_vft_t *transport_protocol_get_vft (transport_proto_t tp);
+transport_service_type_t transport_protocol_service_type (transport_proto_t);
 void transport_update_time (f64 time_now, u8 thread_index);
 void transport_enable_disable (vlib_main_t * vm, u8 is_en);