diff options
author | Aloys Augustin <aloaugus@cisco.com> | 2019-04-08 17:54:39 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-04-24 17:54:38 +0000 |
commit | cdb7170ab44affe51c574eb2218744fff1bdd369 (patch) | |
tree | 56b852f5a203f96126df528198324baaead9317e /src/vnet/session/session.h | |
parent | 689f5b5425ea0f179f7c5400e79440927b10198c (diff) |
Add get_endpoint in transport vft
This allows QUIC & TLS specific logic to be implemented, and meaningfull
IP/port to be returned when connection is overridden.
Change-Id: Id79c59fe4d7b16d36f0e96ad3e281c4026b5fe65
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r-- | src/vnet/session/session.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h index 997d15395ef..375b47a60cd 100644 --- a/src/vnet/session/session.h +++ b/src/vnet/session/session.h @@ -338,7 +338,8 @@ void session_send_rpc_evt_to_thread (u32 thread_index, void *fp, void session_send_rpc_evt_to_thread_force (u32 thread_index, void *fp, void *rpc_args); transport_connection_t *session_get_transport (session_t * s); - +void session_get_endpoint (session_t * s, ip46_address_t * ip, u16 * port, + u8 * is_ip4, u8 is_lcl); u8 *format_session (u8 * s, va_list * args); uword unformat_session (unformat_input_t * input, va_list * args); @@ -444,7 +445,8 @@ transport_add_tx_event (transport_connection_t * tc) always_inline u64 listen_session_get_handle (session_t * s) { - ASSERT (s->session_state == SESSION_STATE_LISTENING); + ASSERT (s->session_state == SESSION_STATE_LISTENING || + session_get_transport_proto (s) == TRANSPORT_PROTO_QUIC); return session_handle (s); } |