Add trace debugging of inbound packet type

pull/1576/head
Jason Rhinelander 3 years ago committed by Jeff Becker
parent 35ead9dc6b
commit 2a809c7a30
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -47,6 +47,7 @@ namespace llarp
service::ProtocolType t,
uint64_t seqno) override
{
LogTrace("Inbound ", t, " packet (", buf.sz, "B) on convo ", tag);
if (t == service::ProtocolType::Control)
{
MarkConvoTagActive(tag);

@ -984,6 +984,7 @@ namespace llarp
service::ProtocolType t,
uint64_t seqno)
{
LogTrace("Inbound ", t, " packet (", buf.sz, "B) on convo ", tag);
if (t == service::ProtocolType::QUIC)
{
auto* quic = GetQUICTunnel();

@ -12,6 +12,17 @@ namespace llarp
{
namespace service
{
std::ostream& operator<<(std::ostream& o, ProtocolType t) {
return o <<
(t == ProtocolType::Control ? "Control" :
t == ProtocolType::TrafficV4 ? "TrafficV4" :
t == ProtocolType::TrafficV6 ? "TrafficV6" :
t == ProtocolType::Exit ? "Exit" :
t == ProtocolType::Auth ? "Auth" :
t == ProtocolType::QUIC ? "QUIC" :
"(unknown-protocol-type)");
}
ProtocolMessage::ProtocolMessage()
{
tag.Zero();

@ -31,6 +31,8 @@ namespace llarp
constexpr std::size_t MAX_PROTOCOL_MESSAGE_SIZE = 2048 * 2;
std::ostream& operator<<(std::ostream& o, ProtocolType t);
/// inner message
struct ProtocolMessage
{

Loading…
Cancel
Save