Improved path utility output

This commit is contained in:
Mark Qvist 2021-09-25 11:27:43 +02:00
parent dd5133751e
commit f25906d44e
4 changed files with 33 additions and 3 deletions

View file

@ -0,0 +1,5 @@
import os
import glob
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]

View file

@ -37,8 +37,8 @@ def program_setup(configdir, destination_hexhash, verbosity):
i = (i+1)%len(syms)
hops = RNS.Transport.hops_to(destination_hash)
next_hop = RNS.prettyhexrep(RNS.Transport.next_hop(destination_hash))
next_hop_interface = str(RNS.Transport.next_hop_interface(destination_hash))
next_hop = RNS.prettyhexrep(reticulum.get_next_hop(destination_hash))
next_hop_interface = reticulum.get_next_hop_if_name(destination_hash)
if hops > 1:
ms = "s"

View file

@ -32,6 +32,7 @@ def program_setup(configdir, dispall=False, verbosity = 0):
for ifstat in ifstats:
name = ifstat["name"]
print("")
if dispall or not (name.startswith("LocalInterface[") or name.startswith("TCPInterface[Client")):
if ifstat["status"]:
ss = "Up"
@ -53,7 +54,7 @@ def program_setup(configdir, dispall=False, verbosity = 0):
if clients != None:
print("\t"+clients_string)
print("\tRX: {rxb}\n\tTX: {txb}".format(rxb=size_str(ifstat["rxb"]), txb=size_str(ifstat["txb"])))
print("")
else:
print("Could not get RNS status")