aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/application.h')
-rw-r--r--src/vnet/session/application.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vnet/session/application.h b/src/vnet/session/application.h
index 4938bef08bd..6fb0f066ad3 100644
--- a/src/vnet/session/application.h
+++ b/src/vnet/session/application.h
@@ -209,7 +209,7 @@ local_session_parse_handle (session_handle_t handle, u32 * server_index,
u32 * session_index)
{
u32 bottom;
- ASSERT ((handle >> 32) == SESSION_LOCAL_TABLE_PREFIX);
+ ASSERT ((handle >> 32) == SESSION_LOCAL_HANDLE_PREFIX);
bottom = (handle & 0xFFFFFFFF);
local_session_parse_id (bottom, server_index, session_index);
}
@@ -217,7 +217,8 @@ local_session_parse_handle (session_handle_t handle, u32 * server_index,
always_inline session_handle_t
application_local_session_handle (local_session_t * ls)
{
- return ((u64) SESSION_LOCAL_TABLE_PREFIX << 32) | local_session_id (ls);
+ return ((u64) SESSION_LOCAL_HANDLE_PREFIX << 32)
+ | (u64) local_session_id (ls);
}
always_inline local_session_t *
@@ -226,6 +227,16 @@ application_get_local_listen_session (application_t * app, u32 session_index)
return pool_elt_at_index (app->local_listen_sessions, session_index);
}
+always_inline local_session_t *
+application_get_local_listener_w_handle (session_handle_t handle)
+{
+ u32 server_index, session_index;
+ application_t *app;
+ local_session_parse_handle (handle, &server_index, &session_index);
+ app = application_get (server_index);
+ return application_get_local_listen_session (app, session_index);
+}
+
always_inline u8
application_local_session_listener_has_transport (local_session_t * ls)
{