+static transport_proto_t
+api_session_transport_proto_decode (const vl_api_transport_proto_t * api_tp)
+{
+ switch (*api_tp)
+ {
+ case TRANSPORT_PROTO_API_TCP:
+ return TRANSPORT_PROTO_TCP;
+ case TRANSPORT_PROTO_API_UDP:
+ return TRANSPORT_PROTO_UDP;
+ case TRANSPORT_PROTO_API_SCTP:
+ return TRANSPORT_PROTO_SCTP;
+ case TRANSPORT_PROTO_API_TLS:
+ return TRANSPORT_PROTO_TLS;
+ case TRANSPORT_PROTO_API_UDPC:
+ return TRANSPORT_PROTO_UDPC;
+ case TRANSPORT_PROTO_API_QUIC:
+ return TRANSPORT_PROTO_QUIC;
+ default:
+ return TRANSPORT_PROTO_NONE;
+ }
+}
+
+static vl_api_transport_proto_t
+api_session_transport_proto_encode (const transport_proto_t tp)
+{
+ switch (tp)
+ {
+ case TRANSPORT_PROTO_TCP:
+ return TRANSPORT_PROTO_API_TCP;
+ case TRANSPORT_PROTO_UDP:
+ return TRANSPORT_PROTO_API_UDP;
+ case TRANSPORT_PROTO_SCTP:
+ return TRANSPORT_PROTO_API_SCTP;
+ case TRANSPORT_PROTO_TLS:
+ return TRANSPORT_PROTO_API_TLS;
+ case TRANSPORT_PROTO_UDPC:
+ return TRANSPORT_PROTO_API_UDPC;
+ case TRANSPORT_PROTO_QUIC:
+ return TRANSPORT_PROTO_API_QUIC;
+ default:
+ return TRANSPORT_PROTO_API_NONE;
+ }
+}
+