aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-04-24 11:10:02 -0700
committerDamjan Marion <dmarion@me.com>2019-04-25 14:46:26 +0000
commit09d18c2fee0eb96c486f9d112e39dcd34e430b0e (patch)
tree1154321a8d937427c5e1b600b36e94fbbfe73ef4 /src/vnet/session/transport.c
parente8915fc707a03260c05624425f9548d796c089fb (diff)
session: use teps in accept/connect notifications
Change-Id: I58e713661a38cecbfdebd4609292d9d12e880cd2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/transport.c')
-rw-r--r--src/vnet/session/transport.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 9efe0e17307..0679eaa1079 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -321,52 +321,49 @@ transport_protocol_is_cl (transport_proto_t tp)
always_inline void
default_get_transport_endpoint (transport_connection_t * tc,
- ip46_address_t * ip, u16 * port, u8 * is_ip4,
- u8 is_lcl)
+ transport_endpoint_t * tep, u8 is_lcl)
{
if (is_lcl)
{
- *port = tc->lcl_port;
- *is_ip4 = tc->is_ip4;
- clib_memcpy_fast (ip, &tc->lcl_ip, sizeof (tc->lcl_ip));
+ tep->port = tc->lcl_port;
+ tep->is_ip4 = tc->is_ip4;
+ clib_memcpy_fast (&tep->ip, &tc->lcl_ip, sizeof (tc->lcl_ip));
}
else
{
- *port = tc->rmt_port;
- *is_ip4 = tc->is_ip4;
- clib_memcpy_fast (ip, &tc->rmt_ip, sizeof (tc->rmt_ip));
+ tep->port = tc->rmt_port;
+ tep->is_ip4 = tc->is_ip4;
+ clib_memcpy_fast (&tep->ip, &tc->rmt_ip, sizeof (tc->rmt_ip));
}
}
void
transport_get_endpoint (transport_proto_t tp, u32 conn_index,
- u32 thread_index, ip46_address_t * ip, u16 * port,
- u8 * is_ip4, u8 is_lcl)
+ u32 thread_index, transport_endpoint_t * tep,
+ u8 is_lcl)
{
if (tp_vfts[tp].get_transport_endpoint)
- tp_vfts[tp].get_transport_endpoint (conn_index, thread_index, ip, port,
- is_ip4, is_lcl);
+ tp_vfts[tp].get_transport_endpoint (conn_index, thread_index, tep,
+ is_lcl);
else
{
transport_connection_t *tc;
tc = transport_get_connection (tp, conn_index, thread_index);
- default_get_transport_endpoint (tc, ip, port, is_ip4, is_lcl);
+ default_get_transport_endpoint (tc, tep, is_lcl);
}
}
void
transport_get_listener_endpoint (transport_proto_t tp, u32 conn_index,
- ip46_address_t * ip, u16 * port, u8 * is_ip4,
- u8 is_lcl)
+ transport_endpoint_t * tep, u8 is_lcl)
{
if (tp_vfts[tp].get_transport_listener_endpoint)
- tp_vfts[tp].get_transport_listener_endpoint (conn_index, ip, port, is_ip4,
- is_lcl);
+ tp_vfts[tp].get_transport_listener_endpoint (conn_index, tep, is_lcl);
else
{
transport_connection_t *tc;
tc = transport_get_listener (tp, conn_index);
- default_get_transport_endpoint (tc, ip, port, is_ip4, is_lcl);
+ default_get_transport_endpoint (tc, tep, is_lcl);
}
}