aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/vnet
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/tests/vnet
parente8915fc707a03260c05624425f9548d796c089fb (diff)
session: use teps in accept/connect notifications
Change-Id: I58e713661a38cecbfdebd4609292d9d12e880cd2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/tests/vnet')
-rw-r--r--src/tests/vnet/session/quic_echo.c8
-rw-r--r--src/tests/vnet/session/tcp_echo.c8
-rw-r--r--src/tests/vnet/session/udp_echo.c12
3 files changed, 14 insertions, 14 deletions
diff --git a/src/tests/vnet/session/quic_echo.c b/src/tests/vnet/session/quic_echo.c
index 41ea5aae19f..4d1288f66d5 100644
--- a/src/tests/vnet/session/quic_echo.c
+++ b/src/tests/vnet/session/quic_echo.c
@@ -655,9 +655,9 @@ session_accepted_handler (session_accepted_msg_t * mp)
if (start_time == 0.0)
start_time = clib_time_now (&em->clib_time);
- ip_str = format (0, "%U", format_ip46_address, &mp->ip, mp->is_ip4);
+ ip_str = format (0, "%U", format_ip46_address, &mp->rmt.ip, mp->rmt.is_ip4);
clib_warning ("Accepted session from: %s:%d", ip_str,
- clib_net_to_host_u16 (mp->port));
+ clib_net_to_host_u16 (mp->rmt.port));
/* Allocate local session and set it up */
pool_get (em->sessions, session);
@@ -755,8 +755,8 @@ session_connected_handler (session_connected_msg_t * mp)
em->n_clients_connected += 1;
clib_warning ("session %u (0x%llx) connected with local ip %U port %d",
- session_index, mp->handle, format_ip46_address, mp->lcl_ip,
- mp->is_ip4, clib_net_to_host_u16 (mp->lcl_port));
+ session_index, mp->handle, format_ip46_address, &mp->lcl.ip,
+ mp->lcl.is_ip4, clib_net_to_host_u16 (mp->lcl.port));
}
static void
diff --git a/src/tests/vnet/session/tcp_echo.c b/src/tests/vnet/session/tcp_echo.c
index 99b6765cdf5..3fcc285dc11 100644
--- a/src/tests/vnet/session/tcp_echo.c
+++ b/src/tests/vnet/session/tcp_echo.c
@@ -655,9 +655,9 @@ session_accepted_handler (session_accepted_msg_t * mp)
if (start_time == 0.0)
start_time = clib_time_now (&em->clib_time);
- ip_str = format (0, "%U", format_ip46_address, &mp->ip, mp->is_ip4);
+ ip_str = format (0, "%U", format_ip46_address, &mp->rmt.ip, mp->rmt.is_ip4);
clib_warning ("Accepted session from: %s:%d", ip_str,
- clib_net_to_host_u16 (mp->port));
+ clib_net_to_host_u16 (mp->rmt.port));
/* Allocate local session and set it up */
pool_get (em->sessions, session);
@@ -755,8 +755,8 @@ session_connected_handler (session_connected_msg_t * mp)
em->n_clients_connected += 1;
clib_warning ("session %u (0x%llx) connected with local ip %U port %d",
- session_index, mp->handle, format_ip46_address, mp->lcl_ip,
- mp->is_ip4, clib_net_to_host_u16 (mp->lcl_port));
+ session_index, mp->handle, format_ip46_address, &mp->lcl.ip,
+ mp->lcl.is_ip4, clib_net_to_host_u16 (mp->lcl.port));
}
static void
diff --git a/src/tests/vnet/session/udp_echo.c b/src/tests/vnet/session/udp_echo.c
index 91d5dccedcc..c949d4cbf6d 100644
--- a/src/tests/vnet/session/udp_echo.c
+++ b/src/tests/vnet/session/udp_echo.c
@@ -514,10 +514,10 @@ session_accepted_handler (session_accepted_msg_t * mp)
tx_fifo->client_session_index = session_index;
session->rx_fifo = rx_fifo;
session->tx_fifo = tx_fifo;
- clib_memcpy_fast (&session->transport.rmt_ip, mp->ip,
+ clib_memcpy_fast (&session->transport.rmt_ip, &mp->rmt.ip,
sizeof (ip46_address_t));
- session->transport.is_ip4 = mp->is_ip4;
- session->transport.rmt_port = mp->port;
+ session->transport.is_ip4 = mp->rmt.is_ip4;
+ session->transport.rmt_port = mp->rmt.port;
hash_set (utm->session_index_by_vpp_handles, mp->handle, session_index);
if (pool_elts (utm->sessions) && (pool_elts (utm->sessions) % 20000) == 0)
@@ -618,10 +618,10 @@ session_connected_handler (session_connected_msg_t * mp)
session->rx_fifo->client_session_index = session->session_index;
session->tx_fifo->client_session_index = session->session_index;
- clib_memcpy_fast (&session->transport.lcl_ip, mp->lcl_ip,
+ clib_memcpy_fast (&session->transport.lcl_ip, &mp->lcl.ip,
sizeof (ip46_address_t));
- session->transport.is_ip4 = mp->is_ip4;
- session->transport.lcl_port = mp->lcl_port;
+ session->transport.is_ip4 = mp->lcl.is_ip4;
+ session->transport.lcl_port = mp->lcl.port;
unformat_init_vector (input, utm->connect_uri);
if (!unformat (input, "%U", unformat_uri, sep))