mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
recreate session tags
This commit is contained in:
parent
869479e566
commit
b437bd8cf4
3 changed files with 73 additions and 51 deletions
13
Garlic.h
13
Garlic.h
|
@ -40,7 +40,7 @@ namespace garlic
|
|||
GarlicRoutingSession (const i2p::data::RoutingDestination * destination, int numTags);
|
||||
~GarlicRoutingSession ();
|
||||
I2NPMessage * WrapSingleMessage (I2NPMessage * msg, I2NPMessage * leaseSet);
|
||||
int GetNumRemainingSessionTags () const { return m_NumTags - m_NextTag; };
|
||||
int GetNextTag () const { return m_NextTag; };
|
||||
uint32_t GetFirstMsgID () const { return m_FirstMsgID; };
|
||||
|
||||
bool IsAcknowledged () const { return m_IsAcknowledged; };
|
||||
|
@ -48,11 +48,13 @@ namespace garlic
|
|||
|
||||
private:
|
||||
|
||||
size_t CreateAESBlock (uint8_t * buf, I2NPMessage * msg, I2NPMessage * leaseSet, bool isNewSession);
|
||||
size_t CreateGarlicPayload (uint8_t * payload, I2NPMessage * msg, I2NPMessage * leaseSet, bool isNewSession);
|
||||
size_t CreateAESBlock (uint8_t * buf, I2NPMessage * msg, I2NPMessage * leaseSet);
|
||||
size_t CreateGarlicPayload (uint8_t * payload, I2NPMessage * msg, I2NPMessage * leaseSet);
|
||||
size_t CreateGarlicClove (uint8_t * buf, I2NPMessage * msg, bool isDestination);
|
||||
size_t CreateDeliveryStatusClove (uint8_t * buf, uint32_t msgID);
|
||||
|
||||
void GenerateSessionTags ();
|
||||
|
||||
private:
|
||||
|
||||
const i2p::data::RoutingDestination * m_Destination;
|
||||
|
@ -76,8 +78,9 @@ namespace garlic
|
|||
void HandleGarlicMessage (uint8_t * buf, size_t len, bool isFromTunnel);
|
||||
void HandleDeliveryStatusMessage (uint8_t * buf, size_t len);
|
||||
|
||||
I2NPMessage * WrapSingleMessage (const i2p::data::RoutingDestination * destination,
|
||||
I2NPMessage * msg, I2NPMessage * leaseSet = nullptr);
|
||||
I2NPMessage * WrapSingleMessage (const i2p::data::RoutingDestination * destination, I2NPMessage * msg);
|
||||
I2NPMessage * WrapMessage (const i2p::data::RoutingDestination * destination,
|
||||
I2NPMessage * msg, I2NPMessage * leaseSet = nullptr);
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue