+int
+listen_session_get_local_session_endpoint (stream_session_t * listener,
+ session_endpoint_t * sep)
+{
+ transport_connection_t *tc;
+ tc =
+ tp_vfts[listener->session_type].get_listener (listener->connection_index);
+ if (!tc)
+ {
+ clib_warning ("no transport");
+ return -1;
+ }
+
+ /* N.B. The ip should not be copied because this is the local endpoint */
+ sep->port = tc->lcl_port;
+ sep->transport_proto = tc->transport_proto;
+ sep->is_ip4 = tc->is_ip4;
+ return 0;
+}
+