aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-05 15:51:15 -0800
committerDamjan Marion <dmarion@me.com>2019-02-06 16:56:39 +0000
commit1ee7830e9ee8a62800822b6f5224d66243b916d4 (patch)
tree4629a50ea18dd0185f5a5de7d57a8120b1913be1 /src/vnet/session/session_api.c
parent696d760865980d8191d11b562a5e431e4c4665af (diff)
transport: cleanup
- move transport specific types to transport_types - add transport wrapper functions for interaction with transport protocol vfts Change-Id: I93f70d884585fc2f41c4a605e310c80e8a8972f2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_api.c')
-rwxr-xr-xsrc/vnet/session/session_api.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index bd809367ce5..8196f4ca142 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -201,7 +201,6 @@ static int
send_session_accept_callback (session_t * s)
{
app_worker_t *server_wrk = app_worker_get (s->app_wrk_index);
- transport_proto_vft_t *tp_vft;
vl_api_accept_session_t *mp;
vl_api_registration_t *reg;
transport_connection_t *tc;
@@ -241,8 +240,8 @@ send_session_accept_callback (session_t * s)
vpp_queue = session_manager_get_vpp_event_queue (s->thread_index);
mp->vpp_event_queue_address = pointer_to_uword (vpp_queue);
mp->handle = session_handle (s);
- tp_vft = transport_protocol_get_vft (session_get_transport_proto (s));
- tc = tp_vft->get_connection (s->connection_index, s->thread_index);
+ tc = transport_get_connection (session_get_transport_proto (s),
+ s->connection_index, s->thread_index);
mp->port = tc->rmt_port;
mp->is_ip4 = tc->is_ip4;
clib_memcpy_fast (&mp->ip, &tc->rmt_ip, sizeof (tc->rmt_ip));
@@ -420,7 +419,6 @@ mq_send_session_accepted_cb (session_t * s)
app_worker_t *app_wrk = app_worker_get (s->app_wrk_index);
svm_msg_q_msg_t _msg, *msg = &_msg;
svm_msg_q_t *vpp_queue, *app_mq;
- transport_proto_vft_t *tp_vft;
transport_connection_t *tc;
session_t *listener;
session_accepted_msg_t *mp;
@@ -457,8 +455,8 @@ mq_send_session_accepted_cb (session_t * s)
vpp_queue = session_manager_get_vpp_event_queue (s->thread_index);
mp->vpp_event_queue_address = pointer_to_uword (vpp_queue);
mp->handle = session_handle (s);
- tp_vft = transport_protocol_get_vft (session_get_transport_proto (s));
- tc = tp_vft->get_connection (s->connection_index, s->thread_index);
+ tc = transport_get_connection (session_get_transport_proto (s),
+ s->connection_index, s->thread_index);
mp->port = tc->rmt_port;
mp->is_ip4 = tc->is_ip4;
clib_memcpy_fast (&mp->ip, &tc->rmt_ip, sizeof (tc->rmt_ip));