aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/application.c7
-rw-r--r--src/vnet/session/application_worker.c2
-rw-r--r--src/vnet/session/session.api2
-rwxr-xr-xsrc/vnet/session/session_api.c3
-rw-r--r--src/vnet/session/transport.c18
5 files changed, 26 insertions, 6 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 4bae8dba4de..30957870860 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -582,7 +582,7 @@ application_alloc_and_init (app_init_args_t * a)
a->app_index = app->app_index;
APP_DBG ("New app name: %v api index: %u index %u", app->name,
- app->api_client_index, app->app_index);
+ a->api_client_index, app->app_index);
return 0;
}
@@ -597,8 +597,7 @@ application_free (application_t * app)
* The app event queue allocated in first segment is cleared with
* the segment manager. No need to explicitly free it.
*/
- APP_DBG ("Delete app name %v api index: %d index: %d", app->name,
- app->api_client_index, app->app_index);
+ APP_DBG ("Delete app name %v index: %d", app->name, app->app_index);
if (application_is_proxy (app))
application_remove_proxy (app);
@@ -641,7 +640,7 @@ application_detach_process (application_t * app, u32 api_client_index)
}
APP_DBG ("Detaching for app %v index %u api client index %u", app->name,
- app->app_index, app->api_client_index);
+ app->app_index, api_client_index);
/* *INDENT-OFF* */
pool_foreach (wrk_map, app->worker_maps, ({
diff --git a/src/vnet/session/application_worker.c b/src/vnet/session/application_worker.c
index 081dbbecdac..a30191c7cd0 100644
--- a/src/vnet/session/application_worker.c
+++ b/src/vnet/session/application_worker.c
@@ -33,7 +33,7 @@ app_worker_alloc (application_t * app)
app_wrk->wrk_map_index = ~0;
app_wrk->connects_seg_manager = APP_INVALID_SEGMENT_MANAGER_INDEX;
app_wrk->first_segment_manager = APP_INVALID_SEGMENT_MANAGER_INDEX;
- APP_DBG ("New app %v worker %u", app_get_name (app), app_wrk->wrk_index);
+ APP_DBG ("New app %v worker %u", app->name, app_wrk->wrk_index);
return app_wrk;
}
diff --git a/src/vnet/session/session.api b/src/vnet/session/session.api
index c22c18fe3cf..53d05dfe426 100644
--- a/src/vnet/session/session.api
+++ b/src/vnet/session/session.api
@@ -250,6 +250,7 @@ autoreply define unbind_sock {
@param hostname-len - length of hostname
@param hostname - destination's hostname. If present, used by protocols
like tls.
+ @param transport_opts - transport option (e.g. session id for quic).
*/
autoreply define connect_sock {
u32 client_index;
@@ -264,6 +265,7 @@ autoreply define connect_sock {
u8 proto;
u8 hostname_len;
u8 hostname[hostname_len];
+ u64 transport_opts;
};
/** \brief ask app to add a new cut-through registration
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 85a4c6197ec..ed716678f2a 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -891,6 +891,7 @@ vl_api_connect_sock_t_handler (vl_api_connect_sock_t * mp)
a->sep.transport_proto = mp->proto;
a->sep.peer.fib_index = mp->vrf;
a->sep.peer.sw_if_index = ENDPOINT_INVALID_INDEX;
+ a->sep_ext.transport_opts = mp->transport_opts;
if (mp->hostname_len)
{
vec_validate (a->sep_ext.hostname, mp->hostname_len - 1);
@@ -901,7 +902,7 @@ vl_api_connect_sock_t_handler (vl_api_connect_sock_t * mp)
a->app_index = app->app_index;
a->wrk_map_index = mp->wrk_index;
if ((rv = vnet_connect (a)))
- clib_warning ("connect returned: %u", rv);
+ clib_warning ("connect returned: %U", format_vnet_api_errno, rv);
vec_free (a->sep_ext.hostname);
}
else
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 0679eaa1079..6077ab19070 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -66,12 +66,21 @@ format_transport_proto (u8 * s, va_list * args)
case TRANSPORT_PROTO_SCTP:
s = format (s, "SCTP");
break;
+ case TRANSPORT_PROTO_NONE:
+ s = format (s, "NONE");
+ break;
+ case TRANSPORT_PROTO_TLS:
+ s = format (s, "TLS");
+ break;
case TRANSPORT_PROTO_UDPC:
s = format (s, "UDPC");
break;
case TRANSPORT_PROTO_QUIC:
s = format (s, "QUIC");
break;
+ default:
+ s = format (s, "UNKNOWN");
+ break;
}
return s;
}
@@ -91,12 +100,21 @@ format_transport_proto_short (u8 * s, va_list * args)
case TRANSPORT_PROTO_SCTP:
s = format (s, "S");
break;
+ case TRANSPORT_PROTO_NONE:
+ s = format (s, "N");
+ break;
+ case TRANSPORT_PROTO_TLS:
+ s = format (s, "J");
+ break;
case TRANSPORT_PROTO_UDPC:
s = format (s, "U");
break;
case TRANSPORT_PROTO_QUIC:
s = format (s, "Q");
break;
+ default:
+ s = format (s, "?");
+ break;
}
return s;
}