mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
initial LeaseSet2 support in I2CP
This commit is contained in:
parent
a3344c4290
commit
08ddc98303
4 changed files with 53 additions and 2 deletions
|
@ -630,5 +630,14 @@ namespace data
|
|||
htobe16buf (expiresBuf, expires > 0 ? expires : 0);
|
||||
// we don't sign it yet. must be signed later on
|
||||
}
|
||||
|
||||
LocalLeaseSet2::LocalLeaseSet2 (uint8_t storeType, std::shared_ptr<const IdentityEx> identity, const uint8_t * buf, size_t len):
|
||||
LocalLeaseSet (identity, nullptr, 0)
|
||||
{
|
||||
m_BufferLen = len;
|
||||
m_Buffer = new uint8_t[m_BufferLen + 1];
|
||||
memcpy (m_Buffer + 1, buf, len);
|
||||
m_Buffer[0] = storeType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,6 +189,7 @@ namespace data
|
|||
LocalLeaseSet2 (uint8_t storeType, std::shared_ptr<const IdentityEx> identity,
|
||||
uint16_t keyType, uint16_t keyLen, const uint8_t * encryptionPublicKey,
|
||||
std::vector<std::shared_ptr<i2p::tunnel::InboundTunnel> > tunnels);
|
||||
LocalLeaseSet2 (uint8_t storeType, std::shared_ptr<const IdentityEx> identity, const uint8_t * buf, size_t len);
|
||||
virtual ~LocalLeaseSet2 () { delete[] m_Buffer; };
|
||||
|
||||
uint8_t * GetBuffer () const { return m_Buffer + 1; };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue