Browse Source

show itag for SSU2 sessions

pull/1769/head
orignal 3 years ago
parent
commit
2067de162a
  1. 4
      daemon/HTTPServer.cpp
  2. 1
      libi2pd/SSU2Session.h
  3. 1
      libi2pd/TransportSession.h

4
daemon/HTTPServer.cpp

@ -791,6 +791,8 @@ namespace http { @@ -791,6 +791,8 @@ namespace http {
<< it.second->GetRemoteEndpoint ().address ().to_string ();
if (!it.second->IsOutgoing ()) tmp_s << " &#8658; ";
tmp_s << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]";
if (it.second->GetRelayTag ())
tmp_s << " [itag:" << it.second->GetRelayTag () << "]";
tmp_s << "</div>\r\n" << std::endl;
cnt++;
}
@ -802,6 +804,8 @@ namespace http { @@ -802,6 +804,8 @@ namespace http {
<< "[" << it.second->GetRemoteEndpoint ().address ().to_string () << "]";
if (!it.second->IsOutgoing ()) tmp_s6 << " &#8658; ";
tmp_s6 << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]";
if (it.second->GetRelayTag ())
tmp_s6 << " [itag:" << it.second->GetRelayTag () << "]";
tmp_s6 << "</div>\r\n" << std::endl;
cnt6++;
}

1
libi2pd/SSU2Session.h

@ -176,6 +176,7 @@ namespace transport @@ -176,6 +176,7 @@ namespace transport
void Done () override;
void SendLocalRouterInfo (bool update) override;
void SendI2NPMessages (const std::vector<std::shared_ptr<I2NPMessage> >& msgs) override;
uint32_t GetRelayTag () const override { return m_RelayTag; };
void Resend (uint64_t ts);
bool IsEstablished () const { return m_State == eSSU2SessionStateEstablished; };
uint64_t GetConnID () const { return m_SourceConnID; };

1
libi2pd/TransportSession.h

@ -96,6 +96,7 @@ namespace transport @@ -96,6 +96,7 @@ namespace transport
bool IsTerminationTimeoutExpired (uint64_t ts) const
{ return ts >= m_LastActivityTimestamp + GetTerminationTimeout (); };
virtual uint32_t GetRelayTag () const { return 0; };
virtual void SendLocalRouterInfo (bool update = false) { SendI2NPMessages ({ CreateDatabaseStoreMsg () }); };
virtual void SendI2NPMessages (const std::vector<std::shared_ptr<I2NPMessage> >& msgs) = 0;

Loading…
Cancel
Save