mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
published field for SSU addresses
This commit is contained in:
parent
ff89edf127
commit
5c9b478e46
3 changed files with 20 additions and 10 deletions
|
@ -115,7 +115,6 @@ namespace data
|
|||
{
|
||||
Tag<32> staticKey;
|
||||
Tag<16> iv;
|
||||
bool isPublished = false;
|
||||
};
|
||||
|
||||
struct Address
|
||||
|
@ -125,6 +124,7 @@ namespace data
|
|||
int port;
|
||||
uint64_t date;
|
||||
uint8_t cost, caps;
|
||||
bool published = false;
|
||||
std::unique_ptr<SSUExt> ssu; // not null for SSU
|
||||
std::unique_ptr<NTCP2Ext> ntcp2; // not null for NTCP2
|
||||
|
||||
|
@ -146,7 +146,7 @@ namespace data
|
|||
}
|
||||
|
||||
bool IsNTCP2 () const { return (bool)ntcp2; };
|
||||
bool IsPublishedNTCP2 () const { return IsNTCP2 () && ntcp2->isPublished; };
|
||||
bool IsPublishedNTCP2 () const { return IsNTCP2 () && published; };
|
||||
bool IsReachableSSU () const { return (bool)ssu && (!host.is_unspecified () || !ssu->introducers.empty ()); };
|
||||
bool UsesIntroducer () const { return (bool)ssu && !ssu->introducers.empty (); };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue