2 * Copyright (c) 2019 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
17 #ifndef SRC_VNET_SESSION_APPLICATION_LOCAL_H_
18 #define SRC_VNET_SESSION_APPLICATION_LOCAL_H_
20 #include <vnet/session/application.h>
22 local_session_t *application_local_listen_session_alloc (application_t * app);
23 void application_local_listener_session_endpoint (session_t * ll,
24 session_endpoint_t * sep);
26 local_session_t *app_worker_local_session_alloc (app_worker_t * app_wrk);
27 void app_worker_local_session_free (app_worker_t * app_wrk,
29 local_session_t *app_worker_get_local_session (app_worker_t * app_wrk,
31 local_session_t *app_worker_get_local_session_from_handle (session_handle_t
34 void app_worker_local_sessions_free (app_worker_t * app_wrk);
35 int app_worker_local_session_cleanup (app_worker_t * client_wrk,
36 app_worker_t * server_wrk,
37 local_session_t * ls);
39 int app_worker_local_session_connect_notify (local_session_t * ls);
40 int app_worker_local_session_connect (app_worker_t * client,
41 app_worker_t * server,
42 session_t * ls, u32 opaque);
43 int app_worker_local_session_disconnect (u32 app_or_wrk,
44 local_session_t * ls);
45 int app_worker_local_session_disconnect_w_index (u32 app_or_wrk,
48 void app_worker_format_local_sessions (app_worker_t * app_wrk, int verbose);
49 void app_worker_format_local_connects (app_worker_t * app, int verbose);
51 void mq_send_local_session_disconnected_cb (u32 app_or_wrk,
52 local_session_t * ls);
55 application_local_session_listener_has_transport (local_session_t * ls)
58 tp = session_type_transport_proto (ls->listener_session_type);
59 return (tp != TRANSPORT_PROTO_NONE);
62 #endif /* SRC_VNET_SESSION_APPLICATION_LOCAL_H_ */
65 * fd.io coding-style-patch-verification: ON
68 * eval: (c-set-style "gnu")