Skip to content

Commit

Permalink
Added additional information to interface stats
Browse files Browse the repository at this point in the history
  • Loading branch information
markqvist committed Sep 24, 2024
1 parent cdee3b6 commit 42319a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions RNS/Reticulum.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,10 @@ def get_interface_stats(self):
else:
ifstats["clients"] = None

if hasattr(interface, "parent_interface") and interface.parent_interface != None:
ifstats["parent_interface_name"] = str(interface.parent_interface)
ifstats["parent_interface_hash"] = interface.parent_interface.get_hash()

if hasattr(interface, "i2p") and hasattr(interface, "connectable"):
if interface.connectable:
ifstats["i2p_connectable"] = True
Expand Down Expand Up @@ -1323,6 +1327,9 @@ def get_interface_stats(self):
ifstats["announce_queue"] = None

ifstats["name"] = str(interface)
ifstats["short_name"] = str(interface.name)
ifstats["hash"] = interface.get_hash()
ifstats["type"] = str(type(interface).__name__)
ifstats["rxb"] = interface.rxb
ifstats["txb"] = interface.txb
ifstats["incoming_announce_frequency"] = interface.incoming_announce_frequency()
Expand Down

0 comments on commit 42319a0

Please sign in to comment.