mirror of
https://github.com/PurpleI2P/i2pd-tools.git
synced 2025-01-22 13:27:17 +01:00
fixed build error for LocalRouterInfo and SSU2
This commit is contained in:
parent
4835013d9e
commit
aadc780b44
|
@ -319,7 +319,7 @@ int main(int argc, char * argv[])
|
||||||
delete [] k;
|
delete [] k;
|
||||||
}
|
}
|
||||||
|
|
||||||
RouterInfo ri(infofile);
|
LocalRouterInfo ri(infofile);
|
||||||
auto ident = ri.GetIdentHash();
|
auto ident = ri.GetIdentHash();
|
||||||
|
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ int main(int argc, char * argv[])
|
||||||
|
|
||||||
if (verbose) std::cout << "load " << infofile << std::endl;
|
if (verbose) std::cout << "load " << infofile << std::endl;
|
||||||
|
|
||||||
RouterInfo ri(infofile);
|
LocalRouterInfo ri(infofile);
|
||||||
auto sig = ri.GetProperty(ROUTER_INFO_PROPERTY_FAMILY_SIG);
|
auto sig = ri.GetProperty(ROUTER_INFO_PROPERTY_FAMILY_SIG);
|
||||||
if (ri.GetProperty(ROUTER_INFO_PROPERTY_FAMILY) != fam) {
|
if (ri.GetProperty(ROUTER_INFO_PROPERTY_FAMILY) != fam) {
|
||||||
std::cout << infofile << " does not belong to " << fam << std::endl;
|
std::cout << infofile << " does not belong to " << fam << std::endl;
|
||||||
|
|
2
i2pd
2
i2pd
|
@ -1 +1 @@
|
||||||
Subproject commit 3c076654794c619eed228adcac075e9c1dea732f
|
Subproject commit aead9db9712f8b07828a264a40898643385d7553
|
|
@ -12,10 +12,10 @@ static void usage(const char * argv)
|
||||||
template<typename Addr>
|
template<typename Addr>
|
||||||
static std::string address_style_string(Addr addr)
|
static std::string address_style_string(Addr addr)
|
||||||
{
|
{
|
||||||
if(addr->transportStyle == i2p::data::RouterInfo::eTransportNTCP) {
|
if(addr->transportStyle == i2p::data::RouterInfo::eTransportNTCP2) {
|
||||||
return "NTCP";
|
return "NTCP2";
|
||||||
} else if (addr->transportStyle == i2p::data::RouterInfo::eTransportSSU) {
|
} else if (addr->transportStyle == i2p::data::RouterInfo::eTransportSSU2) {
|
||||||
return "SSU";
|
return "SSU2";
|
||||||
}
|
}
|
||||||
return "???";
|
return "???";
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ static void write_firewall_entry(std::ostream & o, Addr addr)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::string proto;
|
std::string proto;
|
||||||
if(addr->transportStyle == i2p::data::RouterInfo::eTransportNTCP) {
|
if(addr->transportStyle == i2p::data::RouterInfo::eTransportNTCP2) {
|
||||||
proto = "tcp";
|
proto = "tcp";
|
||||||
} else if (addr->transportStyle == i2p::data::RouterInfo::eTransportSSU) {
|
} else if (addr->transportStyle == i2p::data::RouterInfo::eTransportSSU2) {
|
||||||
proto = "udp";
|
proto = "udp";
|
||||||
} else {
|
} else {
|
||||||
// bail
|
// bail
|
||||||
|
@ -76,6 +76,9 @@ int main(int argc, char * argv[])
|
||||||
|
|
||||||
std::vector<std::shared_ptr<const i2p::data::RouterInfo::Address> > addrs;
|
std::vector<std::shared_ptr<const i2p::data::RouterInfo::Address> > addrs;
|
||||||
auto a = ri.GetPublishedNTCP2V4Address();
|
auto a = ri.GetPublishedNTCP2V4Address();
|
||||||
|
if(a)
|
||||||
|
addrs.push_back(a);
|
||||||
|
a = ri.GetSSU2V4Address();
|
||||||
if(a)
|
if(a)
|
||||||
addrs.push_back(a);
|
addrs.push_back(a);
|
||||||
if (ipv6)
|
if (ipv6)
|
||||||
|
@ -83,10 +86,10 @@ int main(int argc, char * argv[])
|
||||||
a = ri.GetPublishedNTCP2V6Address();
|
a = ri.GetPublishedNTCP2V6Address();
|
||||||
if(a)
|
if(a)
|
||||||
addrs.push_back(a);
|
addrs.push_back(a);
|
||||||
|
a = ri.GetSSU2V6Address();
|
||||||
|
if(a)
|
||||||
|
addrs.push_back(a);
|
||||||
}
|
}
|
||||||
a = ri.GetSSUAddress(!ipv6);
|
|
||||||
if(a)
|
|
||||||
addrs.push_back(a);
|
|
||||||
|
|
||||||
if(firewall)
|
if(firewall)
|
||||||
std::cout << "# ";
|
std::cout << "# ";
|
||||||
|
|
Loading…
Reference in a new issue