- if (VPPCOM_DEBUG > 0)
- clib_warning ("VCL<%d>: vpp handle 0x%llx, sid %u: accepted vpp handle "
- "0x%llx, sid %u connection to local %s address "
- "%U port %u", getpid (), listen_vpp_handle,
- listen_session_index, client_session->vpp_handle,
- client_session_index,
- client_session->lcl_addr.is_ip4 ? "IPv4" : "IPv6",
- format_ip46_address, &client_session->lcl_addr.ip46,
- client_session->lcl_addr.is_ip4 ?
- IP46_TYPE_IP4 : IP46_TYPE_IP6,
- clib_net_to_host_u16 (client_session->lcl_port));
-
- if (VPPCOM_DEBUG > 0)
- {
- client_session->elog_track.name =
- (char *) format (0, "C:%d:S:%d%c", vcm->my_client_index,
- client_session_index, 0);
- elog_track_register (&vcm->elog_main, &client_session->elog_track);
-
- // Two elog entries due to 20-byte per entry constraint.
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "accept: listen_handle:%x from_handle:%x",
- .format_args = "i8i8",
- };
-
- struct
- {
- u64 handle[2];
- } *ed;
-
- ed = ELOG_TRACK_DATA (&vcm->elog_main, e, client_session->elog_track);
- ed->handle[0] = listen_vpp_handle;
- ed->handle[1] = client_session->vpp_handle;
- /* *INDENT-ON* */
-
- if (client_session->lcl_addr.is_ip4)
- {
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e2) =
- {
- .format = "accept: S:%d %d.%d.%d.%d:%d ",
- .format_args = "i4i1i1i1i1i2",
- };
-
- CLIB_PACKED (struct {
- u32 session;
- u8 addr[4];
- u16 port;
- }) *ed2;
-
- ed2 =
- ELOG_TRACK_DATA (&vcm->elog_main, e2, client_session->elog_track);
- ed2->session = client_session_index;
- ed2->addr[0] = client_session->lcl_addr.ip46.ip4.as_u8[0];
- ed2->addr[1] = client_session->lcl_addr.ip46.ip4.as_u8[1];
- ed2->addr[2] = client_session->lcl_addr.ip46.ip4.as_u8[2];
- ed2->addr[3] = client_session->lcl_addr.ip46.ip4.as_u8[3];
- ed2->port = clib_net_to_host_u16 (client_session->lcl_port);
- /* *INDENT-ON* */
- }
- }
-
+ VDBG (0, "VCL<%d>: vpp handle 0x%llx, sid %u: accepted vpp handle 0x%llx,"
+ " sid %u connection from peer %s address %U port %u to local %s address"
+ " %U port %u",
+ getpid (), listen_vpp_handle,
+ listen_session_index, client_session->vpp_handle,
+ client_session_index,
+ client_session->peer_addr.is_ip4 ? "IPv4" : "IPv6",
+ format_ip46_address, &client_session->peer_addr.ip46,
+ client_session->peer_addr.is_ip4 ?
+ IP46_TYPE_IP4 : IP46_TYPE_IP6,
+ clib_net_to_host_u16 (client_session->peer_port),
+ client_session->lcl_addr.is_ip4 ? "IPv4" : "IPv6",
+ format_ip46_address, &client_session->lcl_addr.ip46,
+ client_session->lcl_addr.is_ip4 ?
+ IP46_TYPE_IP4 : IP46_TYPE_IP6,
+ clib_net_to_host_u16 (client_session->lcl_port));
+ vcl_evt (VCL_EVT_ACCEPT, client_session, listen_session,
+ client_session_index);