mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
print full tunnel path
This commit is contained in:
parent
a7b8b52dbd
commit
badcd64b62
3 changed files with 19 additions and 26 deletions
19
Tunnel.cpp
19
Tunnel.cpp
|
@ -181,6 +181,15 @@ namespace tunnel
|
|||
ret.push_back (it->ident);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Tunnel::PrintHops (std::stringstream& s) const
|
||||
{
|
||||
for (auto& it: m_Hops)
|
||||
{
|
||||
s << "-->";
|
||||
s << i2p::data::GetIdentHashAbbreviation (it->ident->GetIdentHash ());
|
||||
}
|
||||
}
|
||||
|
||||
void InboundTunnel::HandleTunnelDataMsg (std::shared_ptr<const I2NPMessage> msg)
|
||||
{
|
||||
|
@ -193,9 +202,8 @@ namespace tunnel
|
|||
|
||||
void InboundTunnel::Print (std::stringstream& s) const
|
||||
{
|
||||
s << "-->" << i2p::data::GetIdentHashAbbreviation (GetNextIdentHash ()) << ":" << GetNextTunnelID ();
|
||||
s << "-->" << (GetNumHops () - 1) << " hops ";
|
||||
s << GetTunnelID () << ":me";
|
||||
PrintHops (s);
|
||||
s << "-->" << GetTunnelID () << ":me";
|
||||
}
|
||||
|
||||
void OutboundTunnel::SendTunnelDataMsg (const uint8_t * gwHash, uint32_t gwTunnel, std::shared_ptr<i2p::I2NPMessage> msg)
|
||||
|
@ -235,8 +243,9 @@ namespace tunnel
|
|||
|
||||
void OutboundTunnel::Print (std::stringstream& s) const
|
||||
{
|
||||
s << "me-->" << i2p::data::GetIdentHashAbbreviation (GetNextIdentHash ()) << ":" << GetNextTunnelID ();
|
||||
s << "-->" << (GetNumHops () - 1) << " hops-->";
|
||||
s << GetTunnelID () << ":me";
|
||||
PrintHops (s);
|
||||
s << "-->";
|
||||
}
|
||||
|
||||
Tunnels tunnels;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue