mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
MTU size of 1488 for ipv6
This commit is contained in:
parent
1ddc96f965
commit
c231eff4b1
2
SSU.h
2
SSU.h
@ -30,7 +30,7 @@ namespace transport
|
|||||||
|
|
||||||
struct SSUPacket
|
struct SSUPacket
|
||||||
{
|
{
|
||||||
i2p::crypto::AESAlignedBuffer<SSU_MTU_V4 + 18> buf; // max MTU + iv + size
|
i2p::crypto::AESAlignedBuffer<SSU_MTU_V6 + 18> buf; // max MTU + iv + size
|
||||||
boost::asio::ip::udp::endpoint from;
|
boost::asio::ip::udp::endpoint from;
|
||||||
size_t len;
|
size_t len;
|
||||||
};
|
};
|
||||||
|
@ -21,13 +21,13 @@ namespace transport
|
|||||||
#ifdef MESHNET
|
#ifdef MESHNET
|
||||||
const size_t SSU_MTU_V6 = 1286;
|
const size_t SSU_MTU_V6 = 1286;
|
||||||
#else
|
#else
|
||||||
const size_t SSU_MTU_V6 = 1472;
|
const size_t SSU_MTU_V6 = 1488;
|
||||||
#endif
|
#endif
|
||||||
const size_t IPV4_HEADER_SIZE = 20;
|
const size_t IPV4_HEADER_SIZE = 20;
|
||||||
const size_t IPV6_HEADER_SIZE = 40;
|
const size_t IPV6_HEADER_SIZE = 40;
|
||||||
const size_t UDP_HEADER_SIZE = 8;
|
const size_t UDP_HEADER_SIZE = 8;
|
||||||
const size_t SSU_V4_MAX_PACKET_SIZE = SSU_MTU_V4 - IPV4_HEADER_SIZE - UDP_HEADER_SIZE; // 1456
|
const size_t SSU_V4_MAX_PACKET_SIZE = SSU_MTU_V4 - IPV4_HEADER_SIZE - UDP_HEADER_SIZE; // 1456
|
||||||
const size_t SSU_V6_MAX_PACKET_SIZE = SSU_MTU_V6 - IPV6_HEADER_SIZE - UDP_HEADER_SIZE; // 1424
|
const size_t SSU_V6_MAX_PACKET_SIZE = SSU_MTU_V6 - IPV6_HEADER_SIZE - UDP_HEADER_SIZE; // 1440
|
||||||
const int RESEND_INTERVAL = 3; // in seconds
|
const int RESEND_INTERVAL = 3; // in seconds
|
||||||
const int MAX_NUM_RESENDS = 5;
|
const int MAX_NUM_RESENDS = 5;
|
||||||
const int DECAY_INTERVAL = 20; // in seconds
|
const int DECAY_INTERVAL = 20; // in seconds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user