@@ -406,6 +406,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
406
406
std::string conn_type;
407
407
std::string network;
408
408
std::string age;
409
+ std::string transport_protocol_type;
409
410
double min_ping;
410
411
double ping;
411
412
int64_t addr_processed;
@@ -517,10 +518,11 @@ class NetinfoRequestHandler : public BaseRequestHandler
517
518
const std::string addr{peer[" addr" ].get_str ()};
518
519
const std::string age{conn_time == 0 ? " " : ToString ((time_now - conn_time) / 60 )};
519
520
const std::string sub_version{peer[" subver" ].get_str ()};
521
+ const std::string transport{peer[" transport_protocol_type" ].get_str ()};
520
522
const bool is_addr_relay_enabled{peer[" addr_relay_enabled" ].isNull () ? false : peer[" addr_relay_enabled" ].get_bool ()};
521
523
const bool is_bip152_hb_from{peer[" bip152_hb_from" ].get_bool ()};
522
524
const bool is_bip152_hb_to{peer[" bip152_hb_to" ].get_bool ()};
523
- m_peers.push_back ({addr, sub_version, conn_type, NETWORK_SHORT_NAMES[network_id], age, min_ping, ping, addr_processed, addr_rate_limited, last_blck, last_recv, last_send, last_trxn, peer_id, mapped_as, version, is_addr_relay_enabled, is_bip152_hb_from, is_bip152_hb_to, is_outbound, is_tx_relay});
525
+ m_peers.push_back ({addr, sub_version, conn_type, NETWORK_SHORT_NAMES[network_id], age, transport, min_ping, ping, addr_processed, addr_rate_limited, last_blck, last_recv, last_send, last_trxn, peer_id, mapped_as, version, is_addr_relay_enabled, is_bip152_hb_from, is_bip152_hb_to, is_outbound, is_tx_relay});
524
526
m_max_addr_length = std::max (addr.length () + 1 , m_max_addr_length);
525
527
m_max_addr_processed_length = std::max (ToString (addr_processed).length (), m_max_addr_processed_length);
526
528
m_max_addr_rate_limited_length = std::max (ToString (addr_rate_limited).length (), m_max_addr_rate_limited_length);
@@ -536,7 +538,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
536
538
// Report detailed peer connections list sorted by direction and minimum ping time.
537
539
if (DetailsRequested () && !m_peers.empty ()) {
538
540
std::sort (m_peers.begin (), m_peers.end ());
539
- result += strprintf (" <-> type net mping ping send recv txn blk hb %*s%*s%*s " ,
541
+ result += strprintf (" <-> type net tp mping ping send recv txn blk hb %*s%*s%*s " ,
540
542
m_max_addr_processed_length, " addrp" ,
541
543
m_max_addr_rate_limited_length, " addrl" ,
542
544
m_max_age_length, " age" );
@@ -545,10 +547,11 @@ class NetinfoRequestHandler : public BaseRequestHandler
545
547
for (const Peer& peer : m_peers) {
546
548
std::string version{ToString (peer.version ) + peer.sub_version };
547
549
result += strprintf (
548
- " %3s %6s %5s%7s%7s%5s%5s%5s%5s %2s %*s%*s%*s%*i %*s %-*s%s\n " ,
550
+ " %3s %6s %5s %2s %7s%7s%5s%5s%5s%5s %2s %*s%*s%*s%*i %*s %-*s%s\n " ,
549
551
peer.is_outbound ? " out" : " in" ,
550
552
ConnectionTypeForNetinfo (peer.conn_type ),
551
553
peer.network ,
554
+ peer.transport_protocol_type == " detecting" ? " *" : peer.transport_protocol_type ,
552
555
PingTimeToString (peer.min_ping ),
553
556
PingTimeToString (peer.ping ),
554
557
peer.last_send ? ToString (time_now - peer.last_send ) : " " ,
@@ -570,7 +573,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
570
573
IsAddressSelected () ? peer.addr : " " ,
571
574
IsVersionSelected () && version != " 0" ? version : " " );
572
575
}
573
- result += strprintf (" ms ms sec sec min min %*s\n\n " , m_max_age_length, " min" );
576
+ result += strprintf (" ms ms sec sec min min %*s\n\n " , m_max_age_length, " min" );
574
577
}
575
578
576
579
// Report peer connection totals by type.
@@ -658,6 +661,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
658
661
" \" feeler\" - short-lived connection for testing addresses\n "
659
662
" \" addr\" - address fetch; short-lived connection for requesting addresses\n "
660
663
" net Network the peer connected through (\" ipv4\" , \" ipv6\" , \" onion\" , \" i2p\" , \" cjdns\" , or \" npr\" (not publicly routable))\n "
664
+ " tp Transport protocol used for the connection (\" v1\" , \" v2\" or \" *\" if detecting)\n "
661
665
" mping Minimum observed ping time, in milliseconds (ms)\n "
662
666
" ping Last observed ping time, in milliseconds (ms)\n "
663
667
" send Time since last message sent to the peer, in seconds\n "
0 commit comments