Traversal: Autoconfigure TTL to use for probe packet

This commit is contained in:
Floogle
2023-01-12 17:45:49 +01:00
parent 4efa10c170
commit 4f11b0d4c9
9 changed files with 268 additions and 33 deletions

View File

@ -31,6 +31,10 @@ enum class TraversalPacketType : u8
ConnectReady = 6,
// [s->c] Alternately, the server might not have heard of this host.
ConnectFailed = 7,
// [c->s] Perform a traveral test. This will send two acks:
// one via the server's alt port, and one to the address corresponding to
// the given host ID.
TestPlease = 8,
};
constexpr u8 TraversalProtoVersion = 0;
@ -91,6 +95,10 @@ struct TraversalPacket
TraversalRequestId requestId;
TraversalConnectFailedReason reason;
} connectFailed;
struct
{
TraversalHostId hostId;
} testPlease;
};
};
#pragma pack(pop)