mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-08-06 13:34:43 -04:00
auto interface working on windows
This commit is contained in:
parent
b81b1de4eb
commit
1564930a51
3 changed files with 66 additions and 47 deletions
7
RNS/vendor/ifaddr/niwrapper.py
vendored
7
RNS/vendor/ifaddr/niwrapper.py
vendored
|
@ -11,6 +11,13 @@ def interfaces() -> List[str]:
|
|||
adapters = RNS.vendor.ifaddr.get_adapters(include_unconfigured=True)
|
||||
return [a.name for a in adapters]
|
||||
|
||||
def interface_names_to_indexes() -> dict:
|
||||
adapters = RNS.vendor.ifaddr.get_adapters(include_unconfigured=True)
|
||||
results = {}
|
||||
for adapter in adapters:
|
||||
results[adapter.name] = adapter.index
|
||||
return results
|
||||
|
||||
def ifaddresses(ifname) -> dict:
|
||||
adapters = RNS.vendor.ifaddr.get_adapters(include_unconfigured=True)
|
||||
ifa = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue