send RelayResponse rejection message

This commit is contained in:
orignal 2022-06-17 19:55:58 -04:00
parent 2067de162a
commit dd602a27b5
2 changed files with 36 additions and 3 deletions

View file

@ -102,6 +102,12 @@ namespace transport
eSSU2PeerTestCodeUnspecified = 128
};
enum SSU2RelayResponseCode
{
eSSU2RelayResponseCodeAccept = 0,
eSSU2RelayResponseCodeBobRelayTagNotFound = 5
};
struct SSU2IncompleteMessage
{
struct Fragment
@ -239,6 +245,7 @@ namespace transport
size_t CreateFollowOnFragmentBlock (uint8_t * buf, size_t len, std::shared_ptr<I2NPMessage> msg, uint8_t& fragmentNum, uint32_t msgID);
size_t CreateRelayIntroBlock (uint8_t * buf, size_t len, const uint8_t * introData, size_t introDataLen);
size_t CreateRelayResponseBlock (uint8_t * buf, size_t len, uint32_t nonce); // Charlie
size_t CreateRelayResponseBlock (uint8_t * buf, size_t len, SSU2RelayResponseCode code, uint32_t nonce); // Bob reject
size_t CreatePeerTestBlock (uint8_t * buf, size_t len, uint8_t msg, SSU2PeerTestCode code, const uint8_t * routerHash, const uint8_t * signedData, size_t signedDataLen);
size_t CreatePeerTestBlock (uint8_t * buf, size_t len, uint32_t nonce); // Alice