+static u8 *
+app_get_name_from_reg_index (application_t * app)
+{
+ u8 *app_name;
+
+ vl_api_registration_t *regp;
+ regp = vl_api_client_index_to_registration (app->api_client_index);
+ if (!regp)
+ app_name = format (0, "builtin-%d%c", app->index, 0);
+ else
+ app_name = format (0, "%s%c", regp->name, 0);
+
+ return app_name;
+}
+
+u32
+application_session_table (application_t * app, u8 fib_proto)
+{
+ app_namespace_t *app_ns;
+ app_ns = app_namespace_get (app->ns_index);
+ if (!application_has_global_scope (app))
+ return APP_INVALID_INDEX;
+ if (fib_proto == FIB_PROTOCOL_IP4)
+ return session_lookup_get_index_for_fib (fib_proto,
+ app_ns->ip4_fib_index);
+ else
+ return session_lookup_get_index_for_fib (fib_proto,
+ app_ns->ip6_fib_index);
+}
+
+u32
+application_local_session_table (application_t * app)
+{
+ app_namespace_t *app_ns;
+ if (!application_has_local_scope (app))
+ return APP_INVALID_INDEX;
+ app_ns = app_namespace_get (app->ns_index);
+ return app_ns->local_table_index;
+}
+