session: api to add new transport types
[vpp.git] / src / vnet / session / transport.h
index 3c4e15a..e5c09cd 100644 (file)
@@ -27,6 +27,8 @@
 
 typedef struct _transport_options_t
 {
+  char *name;
+  char *short_name;
   transport_tx_fn_type_t tx_type;
   transport_service_type_t service_type;
   u8 half_open_has_fifos;
@@ -195,9 +197,21 @@ transport_connection_deschedule (transport_connection_t * tc)
 
 void transport_connection_reschedule (transport_connection_t * tc);
 
+/**
+ * Register transport virtual function table.
+ *
+ * @param transport_proto - transport protocol type (i.e., TCP, UDP ..)
+ * @param vft - virtual function table for transport proto
+ * @param fib_proto - network layer protocol
+ * @param output_node - output node index that session layer will hand off
+ *                     buffers to, for requested fib proto
+ */
 void transport_register_protocol (transport_proto_t transport_proto,
                                  const transport_proto_vft_t * vft,
                                  fib_protocol_t fib_proto, u32 output_node);
+transport_proto_t
+transport_register_new_protocol (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);
 void transport_update_time (clib_time_type_t time_now, u8 thread_index);