mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
handle garlic message
This commit is contained in:
parent
7f08f782e0
commit
6f1d4f4300
4 changed files with 128 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
|||
#include "Tunnel.h"
|
||||
#include "base64.h"
|
||||
#include "Transports.h"
|
||||
#include "Garlic.h"
|
||||
#include "I2NPProtocol.h"
|
||||
|
||||
namespace i2p
|
||||
|
@ -362,6 +363,12 @@ namespace i2p
|
|||
i2p::DeleteI2NPMessage (msg);
|
||||
}
|
||||
}
|
||||
|
||||
size_t GetI2NPMessageLength (uint8_t * msg)
|
||||
{
|
||||
I2NPHeader * header = (I2NPHeader *)msg;
|
||||
return be16toh (header->size) + sizeof (I2NPHeader);
|
||||
}
|
||||
|
||||
void HandleI2NPMessage (uint8_t * msg, size_t len)
|
||||
{
|
||||
|
@ -375,6 +382,7 @@ namespace i2p
|
|||
{
|
||||
case eI2NPGarlic:
|
||||
LogPrint ("Garlic");
|
||||
i2p::garlic::routing.HandleGarlicMessage (buf, size);
|
||||
break;
|
||||
break;
|
||||
case eI2NPDeliveryStatus:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue