From cdb7170ab44affe51c574eb2218744fff1bdd369 Mon Sep 17 00:00:00 2001 From: Aloys Augustin Date: Mon, 8 Apr 2019 17:54:39 +0200 Subject: 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 --- src/vnet/session/transport.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/vnet/session/transport.h') diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h index 993b8bd7354..73d7fba3c49 100644 --- a/src/vnet/session/transport.h +++ b/src/vnet/session/transport.h @@ -62,6 +62,11 @@ typedef struct _transport_proto_vft u8 *(*format_listener) (u8 * s, va_list * args); u8 *(*format_half_open) (u8 * s, va_list * args); + /* External API response */ + + void (*get_transport_endpoint) (u32 conn_index, u32 thread_index, ip46_address_t * ip, u16 * port, u8 * is_ip4, u8 is_lcl); + void (*get_transport_listener_endpoint) (u32 conn_index, ip46_address_t * ip, u16 * port, u8 * is_ip4, u8 is_lcl); + /* * Properties */ @@ -86,6 +91,12 @@ u32 transport_start_listen (transport_proto_t tp, u32 session_index, u32 transport_stop_listen (transport_proto_t tp, u32 conn_index); void transport_cleanup (transport_proto_t tp, u32 conn_index, u8 thread_index); +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); +void transport_get_listener_endpoint (transport_proto_t tp, u32 conn_index, + ip46_address_t * ip, u16 * port, + u8 * is_ip4, u8 is_lcl); static inline transport_connection_t * transport_get_connection (transport_proto_t tp, u32 conn_index, -- cgit 1.2.3-korg