mirror of
https://github.com/PurpleI2P/i2pd-tools
synced 2025-01-15 17:20:08 +00:00
print yggdrasil address
This commit is contained in:
parent
f605231005
commit
049ad0802b
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
static void usage(const char * argv)
|
static void usage(const char * argv)
|
||||||
{
|
{
|
||||||
std::cout << "usage: " << argv << " [-6|-f|-p] routerinfo.dat" << std::endl;
|
std::cout << "usage: " << argv << " [-6|-f|-p|-y] routerinfo.dat" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Addr>
|
template<typename Addr>
|
||||||
@ -51,7 +51,8 @@ int main(int argc, char * argv[])
|
|||||||
bool ipv6 = false;
|
bool ipv6 = false;
|
||||||
bool firewall = false;
|
bool firewall = false;
|
||||||
bool port = false;
|
bool port = false;
|
||||||
while((opt = getopt(argc, argv, "6fp")) != -1) {
|
bool yggdrasil = false;
|
||||||
|
while((opt = getopt(argc, argv, "6fpy")) != -1) {
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case '6':
|
case '6':
|
||||||
ipv6 = true;
|
ipv6 = true;
|
||||||
@ -62,6 +63,9 @@ int main(int argc, char * argv[])
|
|||||||
case 'p':
|
case 'p':
|
||||||
port = true;
|
port = true;
|
||||||
break;
|
break;
|
||||||
|
case 'y':
|
||||||
|
yggdrasil = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
@ -89,7 +93,13 @@ int main(int argc, char * argv[])
|
|||||||
a = ri.GetSSU2V6Address();
|
a = ri.GetSSU2V6Address();
|
||||||
if(a)
|
if(a)
|
||||||
addrs.push_back(a);
|
addrs.push_back(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(yggdrasil){
|
||||||
|
a = ri.GetYggdrasilAddress();
|
||||||
|
if(a)
|
||||||
|
addrs.push_back(a);
|
||||||
|
}
|
||||||
|
|
||||||
if(firewall)
|
if(firewall)
|
||||||
std::cout << "# ";
|
std::cout << "# ";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user