Compare commits

...
44 Commits
Author SHA1 Message Date
Mark Qvist f5420d3be3 Updated changelog 2025-03-13 19:36:39 +01:00
Mark Qvist 50b5ab80c4 Updated manual and changelog 2025-03-13 19:36:17 +01:00
Mark Qvist e6371d74b5 Updated manual 2025-03-13 19:31:38 +01:00
Mark Qvist 0ab38faeac Merge branch 'master' of github.com:markqvist/Reticulum 2025-03-13 19:25:29 +01:00
Mark Qvist b0444104cc Wait for announce timebase tick when announcing via rnid. Fixes #752. 2025-03-13 19:25:10 +01:00
Mark Qvist 4757d6ee87 Remove corrupt ratchet files when cleaning ratchets 2025-03-13 18:59:03 +01:00
markqvist 1780965ef8 Update README.md 2025-03-12 11:29:08 +01:00
Mark Qvist aaa88e9b7d Fixed AutoInterface deferred init 2025-03-09 19:01:54 +01:00
Mark Qvist 17ce91a4a2 Fixed AutoInterface deferred init 2025-03-09 18:39:23 +01:00
Mark Qvist 08751a762a Add timing deviation stats to encrypt/decrypt tests 2025-02-25 12:31:29 +01:00
Mark Qvist 77c0beecf2 Fix X25519 base-point according to RFC7748 2025-02-25 12:27:15 +01:00
Mark Qvist 28bcf6a8ac Cleanup 2025-02-24 12:19:28 +01:00
Mark Qvist 61004b4dfb Updated docs 2025-02-24 12:05:23 +01:00
Mark Qvist e5c22b8a3f Run tests against CRNS 2025-02-24 12:04:10 +01:00
Mark Qvist 001d0f30aa Enabled link MTU discovery 2025-02-24 12:03:54 +01:00
Mark Qvist fbe4bb03d1 Run rnprobe via CRNS shim 2025-02-24 11:48:09 +01:00
Mark Qvist 3469b6beb8 Run rnid via CRNS shim 2025-02-24 11:46:35 +01:00
Mark Qvist c696efe0bc Run rnstatus via CRNS shim 2025-02-24 11:45:19 +01:00
Mark Qvist d0ca61f373 Implemented child interface spawning on AutoInterface 2025-02-24 01:57:39 +01:00
Mark Qvist 350687eda9 Link MTU upgrade on AutoInterface 2025-02-23 22:40:36 +01:00
Mark Qvist d898641e6a Added link API functions 2025-02-23 20:01:40 +01:00
Mark Qvist db576d73bb Cleanup 2025-02-23 15:18:12 +01:00
Mark Qvist 5fcdd17665 Added on-demand object code compilation and loader 2025-02-23 14:45:24 +01:00
Mark Qvist e8f2bd9b0c Updated manual 2025-02-22 21:21:51 +01:00
Mark Qvist 0ff51fed44 Updated docs 2025-02-17 22:11:43 +01:00
Mark Qvist 6e25f96024 Updated changelog 2025-02-17 22:11:38 +01:00
Mark Qvist ad228fb3b3 Copy list structures on persist 2025-02-17 19:29:23 +01:00
Mark Qvist a61b20a066 Updated version 2025-02-17 18:21:58 +01:00
Mark Qvist a49b04af21 Added missing check for path announce emission timestamp in lower hop-count announce processing. Closes #717. 2025-02-17 18:21:38 +01:00
Mark Qvist f030cf6f22 Fixed potential daemon thread IO buffer deadlock on externally mediated shutdown signal 2025-02-09 17:52:49 +01:00
Mark Qvist 9e7641d2d3 Trace application-originated exception frames on LocalInterface 2025-01-27 12:29:28 +01:00
Mark Qvist c909871fb7 Updated issue template 2025-01-27 10:25:46 +01:00
Mark Qvist 47f60b0320 Fixed missing rx/tx stat assignment 2025-01-26 01:13:58 +01:00
Mark Qvist 6797909d90 Updated logging 2025-01-24 21:04:48 +01:00
Mark Qvist fd6d8ffff8 Updated logging 2025-01-21 23:55:49 +01:00
Mark Qvist 06de7f4a3d Updated logging 2025-01-21 23:22:39 +01:00
Mark Qvist 7221becd35 Updated manual 2025-01-19 21:09:50 +01:00
Mark Qvist a51f5f2eaf Updated changelog 2025-01-19 21:09:40 +01:00
Mark Qvist 9e8d71ddaf Updated examples 2025-01-19 20:38:41 +01:00
Mark Qvist 9bc55a9047 Updated manual 2025-01-19 12:56:32 +01:00
Mark Qvist 3e7ab5136e Better thread configuration 2025-01-19 00:57:36 +01:00
Mark Qvist d2cf3c2a7e Added error on configured radio parameter mismatch on Android 2025-01-19 00:10:35 +01:00
Mark Qvist 77519f1a0c Updated version 2025-01-18 21:38:13 +01:00
Mark Qvist e869b3cac9 Added resource reject signalling 2025-01-18 21:37:17 +01:00
56 changed files with 1125 additions and 720 deletions

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ Before creating a bug report on this issue tracker, you **must** read the [Contr
- The issue tracker is used by developers of this project. **Do not use it to ask general questions, or for support requests**. - The issue tracker is used by developers of this project. **Do not use it to ask general questions, or for support requests**.
- Ideas and feature requests can be made on the [Discussions](https://github.com/markqvist/Reticulum/discussions). **Only** feature requests accepted by maintainers and developers are tracked and included on the issue tracker. **Do not post feature requests here**. - Ideas and feature requests can be made on the [Discussions](https://github.com/markqvist/Reticulum/discussions). **Only** feature requests accepted by maintainers and developers are tracked and included on the issue tracker. **Do not post feature requests here**.
- After reading the [Contribution Guidelines](https://github.com/markqvist/Reticulum/blob/master/Contributing.md), delete this section from your bug report. - After reading the [Contribution Guidelines](https://github.com/markqvist/Reticulum/blob/master/Contributing.md), **delete this section only** (*"Read the Contribution Guidelines"*) from your bug report, **and fill in all the other sections**.
**Describe the Bug** **Describe the Bug**
First of all: Is this really a bug? Is it reproducible? First of all: Is this really a bug? Is it reproducible?
+26
View File
@@ -0,0 +1,26 @@
compiling = False
noticed = False
notice_delay = 0.3
import time
import sys
import threading
from importlib.util import find_spec
if find_spec("pyximport") and find_spec("cython"):
import pyximport; pyxloader = pyximport.install(pyimport=True, language_level=3)[1]
def notice_job():
global noticed
started = time.time()
while compiling:
if time.time() > started+notice_delay and compiling:
noticed = True
print("Compiling RNS object code... ", end="")
sys.stdout.flush()
break
time.sleep(0.1)
compiling = True
threading.Thread(target=notice_job, daemon=True).start()
import RNS; compiling = False
if noticed: print("Done."); sys.stdout.flush()
+49
View File
@@ -1,3 +1,52 @@
### 2025-03-13: RNS β 0.9.3
This maintenance release improves performance and fixes a number of bugs.
**Changes**
- Enabled link MTU discovery by default
- Added on-demand object code compilation and loader shim
- Added link API methods
- Added child interface spawning for AutoInterface
- Fixed corrupt ratchet files not being removed on maintenance cleaning
- Fixed `rnid` not waiting for announce timebase tick before announcing
**Release Hashes**
```
0270c988a2b898b28348cd78138667115d4ef3f7e09c86531baaefbee35ef851 rns-0.9.3-py3-none-any.whl
eee1a6c4c9c0f04bb17b12b8fb37b9c4cec12a99c87a046730eb7c9a6ffd999f rnspure-0.9.3-py3-none-any.whl
```
### 2025-01-19: RNS β 0.9.2
This maintenance release fixes a number of bugs.
**Changes**
- Fixed missing RX/TX bytes statistics assignment
- Fixed potential daemon thread IO buffer deadlock on externally mediated shutdown signal
- Fixed missing check for path announce emission timestamp in lower hop-count announce processing
**Release Hashes**
```
068eb4408b332ea6eec1a58fb4644fba3531c9ca10dcd79ecf893aaaf40e720d rns-0.9.2-py3-none-any.whl
1e7c123d244cc14c287568f3a99953cc11ffc1e79a72a029aa1be72fa8eff24e rnspure-0.9.2-py3-none-any.whl
```
### 2025-01-19: RNS β 0.9.1
This maintenance release adds reject signalling mechanism to resource transfers, fixes inconsistencies in the code examples, and improves thread configuration in the transport core.
**Changes**
- Added resource reject signalling
- Added error reporting on configured radio parameter mismatch on Android
- Improved thread configuration for transport core threads
- Updated examples
**Release Hashes**
```
49288a562ad6d4b5647c3afec051a6bb6497b75e3f165a972436134d4a93ad76 rns-0.9.1-py3-none-any.whl
abd6c4bdead2fc25d0b9b2cda5708586e8cb776b088f2a901a5f262e2ed901ae rnspure-0.9.1-py3-none-any.whl
```
### 2025-01-17: RNS β 0.9.0 ### 2025-01-17: RNS β 0.9.0
This release lays the groundwork for future performance and resource utilisation optimisations. Most importantly, this release adds **link MTU autodiscovery**, which allow established links to use much higher MTUs than the base MTU of 500 bytes. This release lays the groundwork for future performance and resource utilisation optimisations. Most importantly, this release adds **link MTU autodiscovery**, which allow established links to use much higher MTUs than the base MTU of 500 bytes.
+2 -1
View File
@@ -6,6 +6,7 @@
import argparse import argparse
import random import random
import sys
import RNS import RNS
# Let's define an app name. We'll use this for all # Let's define an app name. We'll use this for all
@@ -168,4 +169,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+1 -1
View File
@@ -118,4 +118,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+3 -4
View File
@@ -157,7 +157,7 @@ def client(destination_hexhash, configpath):
destination_hash = bytes.fromhex(destination_hexhash) destination_hash = bytes.fromhex(destination_hexhash)
except: except:
RNS.log("Invalid destination entered. Check your input!\n") RNS.log("Invalid destination entered. Check your input!\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -254,9 +254,8 @@ def link_closed(link):
else: else:
RNS.log("Link closed, exiting now") RNS.log("Link closed, exiting now")
RNS.Reticulum.exit_handler()
time.sleep(1.5) time.sleep(1.5)
os._exit(0) sys.exit(0)
# When the buffer has new data, read it and write it to the terminal. # When the buffer has new data, read it and write it to the terminal.
def client_buffer_ready(ready_bytes: int): def client_buffer_ready(ready_bytes: int):
@@ -320,4 +319,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+5 -6
View File
@@ -124,7 +124,7 @@ def server(configpath):
def server_loop(destination): def server_loop(destination):
# Let the user know that everything is ready # Let the user know that everything is ready
RNS.log( RNS.log(
"Link example "+ "Channel example "+
RNS.prettyhexrep(destination.hash)+ RNS.prettyhexrep(destination.hash)+
" running, waiting for a connection." " running, waiting for a connection."
) )
@@ -212,7 +212,7 @@ def client(destination_hexhash, configpath):
destination_hash = bytes.fromhex(destination_hexhash) destination_hash = bytes.fromhex(destination_hexhash)
except: except:
RNS.log("Invalid destination entered. Check your input!\n") RNS.log("Invalid destination entered. Check your input!\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -276,7 +276,7 @@ def client_loop():
packed_size = len(message.pack()) packed_size = len(message.pack())
channel = server_link.get_channel() channel = server_link.get_channel()
if channel.is_ready_to_send(): if channel.is_ready_to_send():
if packed_size <= channel.MDU: if packed_size <= channel.mdu:
channel.send(message) channel.send(message)
else: else:
RNS.log( RNS.log(
@@ -321,9 +321,8 @@ def link_closed(link):
else: else:
RNS.log("Link closed, exiting now") RNS.log("Link closed, exiting now")
RNS.Reticulum.exit_handler()
time.sleep(1.5) time.sleep(1.5)
os._exit(0) sys.exit(0)
# When a packet is received over the channel, we # When a packet is received over the channel, we
# simply print out the data. # simply print out the data.
@@ -387,4 +386,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+3 -2
View File
@@ -6,6 +6,7 @@
########################################################## ##########################################################
import argparse import argparse
import sys
import RNS import RNS
# Let's define an app name. We'll use this for all # Let's define an app name. We'll use this for all
@@ -130,7 +131,7 @@ def client(destination_hexhash, configpath, timeout=None):
except Exception as e: except Exception as e:
RNS.log("Invalid destination entered. Check your input!") RNS.log("Invalid destination entered. Check your input!")
RNS.log(str(e)+"\n") RNS.log(str(e)+"\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -328,4 +329,4 @@ if __name__ == "__main__":
client(args.destination, configarg, timeout=timeoutarg) client(args.destination, configarg, timeout=timeoutarg)
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+4 -5
View File
@@ -224,7 +224,7 @@ def client(destination_hexhash, configpath):
destination_hash = bytes.fromhex(destination_hexhash) destination_hash = bytes.fromhex(destination_hexhash)
except: except:
RNS.log("Invalid destination entered. Check your input!\n") RNS.log("Invalid destination entered. Check your input!\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -462,7 +462,7 @@ def filelist_timeout_job():
global server_files global server_files
if len(server_files) == 0: if len(server_files) == 0:
RNS.log("Timed out waiting for filelist, exiting") RNS.log("Timed out waiting for filelist, exiting")
os._exit(0) sys.exit(0)
# When a link is closed, we'll inform the # When a link is closed, we'll inform the
@@ -475,9 +475,8 @@ def link_closed(link):
else: else:
RNS.log("Link closed, exiting now") RNS.log("Link closed, exiting now")
RNS.Reticulum.exit_handler()
time.sleep(1.5) time.sleep(1.5)
os._exit(0) sys.exit(0)
# When RNS detects that the download has # When RNS detects that the download has
# started, we'll update our menu state # started, we'll update our menu state
@@ -601,4 +600,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+3 -4
View File
@@ -133,7 +133,7 @@ def client(destination_hexhash, configpath):
destination_hash = bytes.fromhex(destination_hexhash) destination_hash = bytes.fromhex(destination_hexhash)
except: except:
RNS.log("Invalid destination entered. Check your input!\n") RNS.log("Invalid destination entered. Check your input!\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -245,9 +245,8 @@ def link_closed(link):
else: else:
RNS.log("Link closed, exiting now") RNS.log("Link closed, exiting now")
RNS.Reticulum.exit_handler()
time.sleep(1.5) time.sleep(1.5)
os._exit(0) sys.exit(0)
# When a packet is received over the link, we # When a packet is received over the link, we
# simply print out the data. # simply print out the data.
@@ -311,4 +310,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+3 -4
View File
@@ -119,7 +119,7 @@ def client(destination_hexhash, configpath):
destination_hash = bytes.fromhex(destination_hexhash) destination_hash = bytes.fromhex(destination_hexhash)
except: except:
RNS.log("Invalid destination entered. Check your input!\n") RNS.log("Invalid destination entered. Check your input!\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -222,9 +222,8 @@ def link_closed(link):
else: else:
RNS.log("Link closed, exiting now") RNS.log("Link closed, exiting now")
RNS.Reticulum.exit_handler()
time.sleep(1.5) time.sleep(1.5)
os._exit(0) sys.exit(0)
# When a packet is received over the link, we # When a packet is received over the link, we
# simply print out the data. # simply print out the data.
@@ -288,4 +287,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+2 -1
View File
@@ -5,6 +5,7 @@
########################################################## ##########################################################
import argparse import argparse
import sys
import RNS import RNS
# Let's define an app name. We'll use this for all # Let's define an app name. We'll use this for all
@@ -98,4 +99,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+3 -2
View File
@@ -5,6 +5,7 @@
########################################################## ##########################################################
import argparse import argparse
import sys
import RNS import RNS
# Let's define an app name. We'll use this for all # Let's define an app name. We'll use this for all
@@ -138,7 +139,7 @@ def client(destination_hexhash, configpath, timeout=None):
except Exception as e: except Exception as e:
RNS.log("Invalid destination entered. Check your input!") RNS.log("Invalid destination entered. Check your input!")
RNS.log(str(e)+"\n") RNS.log(str(e)+"\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -337,4 +338,4 @@ if __name__ == "__main__":
client(args.destination, configarg, timeout=timeoutarg) client(args.destination, configarg, timeout=timeoutarg)
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+3 -4
View File
@@ -119,7 +119,7 @@ def client(destination_hexhash, configpath):
destination_hash = bytes.fromhex(destination_hexhash) destination_hash = bytes.fromhex(destination_hexhash)
except: except:
RNS.log("Invalid destination entered. Check your input!\n") RNS.log("Invalid destination entered. Check your input!\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -226,9 +226,8 @@ def link_closed(link):
else: else:
RNS.log("Link closed, exiting now") RNS.log("Link closed, exiting now")
RNS.Reticulum.exit_handler()
time.sleep(1.5) time.sleep(1.5)
os._exit(0) sys.exit(0)
########################################################## ##########################################################
@@ -284,4 +283,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+8 -18
View File
@@ -149,8 +149,6 @@ def server_packet_received(message, packet):
time.sleep(0.2) time.sleep(0.2)
rc = 0 rc = 0
received_data = 0 received_data = 0
# latest_client_link.teardown()
# os._exit(0)
########################################################## ##########################################################
@@ -159,6 +157,7 @@ def server_packet_received(message, packet):
# A reference to the server link # A reference to the server link
server_link = None server_link = None
should_quit = False
# This initialisation is executed when the users chooses # This initialisation is executed when the users chooses
# to run as a client # to run as a client
@@ -175,7 +174,7 @@ def client(destination_hexhash, configpath):
destination_hash = bytes.fromhex(destination_hexhash) destination_hash = bytes.fromhex(destination_hexhash)
except: except:
RNS.log("Invalid destination entered. Check your input!\n") RNS.log("Invalid destination entered. Check your input!\n")
exit() sys.exit(0)
# We must first initialise Reticulum # We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath) reticulum = RNS.Reticulum(configpath)
@@ -216,7 +215,7 @@ def client(destination_hexhash, configpath):
client_loop() client_loop()
def client_loop(): def client_loop():
global server_link global server_link, should_quit
# Wait for the link to become active # Wait for the link to become active
while not server_link: while not server_link:
@@ -224,16 +223,7 @@ def client_loop():
should_quit = False should_quit = False
while not should_quit: while not should_quit:
try: time.sleep(0.2)
text = input()
# Check if we should quit the example
if text == "quit" or text == "q" or text == "exit":
should_quit = True
server_link.teardown()
except Exception as e:
raise e
# This function is called when a link # This function is called when a link
# has been established with the server # has been established with the server
@@ -276,17 +266,17 @@ def link_established(link):
# When a link is closed, we'll inform the # When a link is closed, we'll inform the
# user, and exit the program # user, and exit the program
def link_closed(link): def link_closed(link):
global should_quit
if link.teardown_reason == RNS.Link.TIMEOUT: if link.teardown_reason == RNS.Link.TIMEOUT:
RNS.log("The link timed out, exiting now") RNS.log("The link timed out, exiting now")
elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED: elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
RNS.log("The link was closed by the server, exiting now") RNS.log("The link was closed by the server, exiting now")
else: else:
RNS.log("Link closed, exiting now") RNS.log("Link closed, exiting now")
RNS.Reticulum.exit_handler()
should_quit = True
time.sleep(1.5) time.sleep(1.5)
os._exit(0) sys.exit(0)
def client_packet_received(message, packet): def client_packet_received(message, packet):
pass pass
@@ -344,4 +334,4 @@ if __name__ == "__main__":
except KeyboardInterrupt: except KeyboardInterrupt:
print("") print("")
exit() sys.exit(0)
+1 -1
View File
@@ -1,4 +1,4 @@
Reticulum Network Stack β <img align="right" src="https://static.pepy.tech/personalized-badge/rns?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Installs" style="padding-left:10px"/><a href="https://github.com/markqvist/Reticulum/actions/workflows/build.yml"><img align="right" src="https://github.com/markqvist/Reticulum/actions/workflows/build.yml/badge.svg"/></a> Reticulum Network Stack β <img align="right" src="https://static.pepy.tech/personalized-badge/rns?period=month&units=international_system&left_color=grey&right_color=blue&left_text=Installs/month" style="padding-left:10px"/><a href="https://github.com/markqvist/Reticulum/actions/workflows/build.yml"><img align="right" src="https://github.com/markqvist/Reticulum/actions/workflows/build.yml/badge.svg"/></a>
========== ==========
<p align="center"><img width="200" src="https://raw.githubusercontent.com/markqvist/Reticulum/master/docs/source/graphics/rns_logo_512.png"></p> <p align="center"><img width="200" src="https://raw.githubusercontent.com/markqvist/Reticulum/master/docs/source/graphics/rns_logo_512.png"></p>
+2 -1
View File
@@ -4,13 +4,14 @@ PROVIDER_NONE = 0x00
PROVIDER_INTERNAL = 0x01 PROVIDER_INTERNAL = 0x01
PROVIDER_PYCA = 0x02 PROVIDER_PYCA = 0x02
FORCE_INTERNAL = False
PROVIDER = PROVIDER_NONE PROVIDER = PROVIDER_NONE
pyca_v = None pyca_v = None
use_pyca = False use_pyca = False
try: try:
if importlib.util.find_spec('cryptography') != None: if not FORCE_INTERNAL and importlib.util.find_spec('cryptography') != None:
import cryptography import cryptography
pyca_v = cryptography.__version__ pyca_v = cryptography.__version__
v = pyca_v.split(".") v = pyca_v.split(".")
+4 -1
View File
@@ -82,10 +82,13 @@ def _fix_secret(n):
n |= 64 << 8 * 31 n |= 64 << 8 * 31
return n return n
def _fix_base_point(n):
n &= ~(2**255)
return n
def curve25519(base_point_raw, secret_raw): def curve25519(base_point_raw, secret_raw):
"""Raise the base point to a given power""" """Raise the base point to a given power"""
base_point = _unpack_number(base_point_raw) base_point = _fix_base_point(_unpack_number(base_point_raw))
secret = _fix_secret(_unpack_number(secret_raw)) secret = _fix_secret(_unpack_number(secret_raw))
return _pack_number(_raw_curve25519(base_point, secret)) return _pack_number(_raw_curve25519(base_point, secret))
+11 -4
View File
@@ -310,12 +310,19 @@ class Identity:
for filename in os.listdir(ratchetdir): for filename in os.listdir(ratchetdir):
try: try:
expired = False expired = False
corrupted = False
with open(f"{ratchetdir}/{filename}", "rb") as rf: with open(f"{ratchetdir}/{filename}", "rb") as rf:
ratchet_data = umsgpack.unpackb(rf.read()) # TODO: Remove individual ratchet file if corrupt
if now > ratchet_data["received"]+Identity.RATCHET_EXPIRY: try:
expired = True ratchet_data = umsgpack.unpackb(rf.read())
if now > ratchet_data["received"]+Identity.RATCHET_EXPIRY:
expired = True
if expired: except Exception as e:
RNS.log(f"Corrupted ratchet data while reading {ratchetdir}/{filename}, removing file", RNS.LOG_ERROR)
corrupted = True
if expired or corrupted:
os.unlink(f"{ratchetdir}/{filename}") os.unlink(f"{ratchetdir}/{filename}")
except Exception as e: except Exception as e:
+9 -7
View File
@@ -85,15 +85,16 @@ class KISS():
RADIO_STATE_ON = 0x01 RADIO_STATE_ON = 0x01
RADIO_STATE_ASK = 0xFF RADIO_STATE_ASK = 0xFF
CMD_ERROR = 0x90 CMD_ERROR = 0x90
ERROR_INITRADIO = 0x01 ERROR_INITRADIO = 0x01
ERROR_TXFAILED = 0x02 ERROR_TXFAILED = 0x02
ERROR_EEPROM_LOCKED = 0x03 ERROR_EEPROM_LOCKED = 0x03
ERROR_QUEUE_FULL = 0x04 ERROR_QUEUE_FULL = 0x04
ERROR_MEMORY_LOW = 0x05 ERROR_MEMORY_LOW = 0x05
ERROR_MODEM_TIMEOUT = 0x06 ERROR_MODEM_TIMEOUT = 0x06
ERROR_INVALID_FIRMWARE = 0x10 ERROR_INVALID_FIRMWARE = 0x10
ERROR_INVALID_BLE_MTU = 0x20 ERROR_INVALID_BLE_MTU = 0x20
ERROR_INVALID_CONFIG = 0x40
PLATFORM_AVR = 0x90 PLATFORM_AVR = 0x90
PLATFORM_ESP32 = 0x80 PLATFORM_ESP32 = 0x80
@@ -724,6 +725,7 @@ class RNodeInterface(Interface):
RNS.log("After configuring "+str(self)+", the reported radio parameters did not match your configuration.", RNS.LOG_ERROR) RNS.log("After configuring "+str(self)+", the reported radio parameters did not match your configuration.", RNS.LOG_ERROR)
RNS.log("Make sure that your hardware actually supports the parameters specified in the configuration", RNS.LOG_ERROR) RNS.log("Make sure that your hardware actually supports the parameters specified in the configuration", RNS.LOG_ERROR)
RNS.log("Aborting RNode startup", RNS.LOG_ERROR) RNS.log("Aborting RNode startup", RNS.LOG_ERROR)
self.hw_errors.append({"error": KISS.ERROR_INVALID_CONFIG, "description": "The configuration parameters were not validated by the device. Make sure that the device actually supports the TX power, frequency, bandwidth, spreading factor and coding rate you configured."})
if self.serial != None: if self.serial != None:
self.serial.close() self.serial.close()
+165 -58
View File
@@ -33,6 +33,9 @@ import RNS
class AutoInterface(Interface): class AutoInterface(Interface):
HW_MTU = 1196
FIXED_MTU = True
DEFAULT_DISCOVERY_PORT = 29716 DEFAULT_DISCOVERY_PORT = 29716
DEFAULT_DATA_PORT = 42671 DEFAULT_DATA_PORT = 42671
DEFAULT_GROUP_ID = "reticulum".encode("utf-8") DEFAULT_GROUP_ID = "reticulum".encode("utf-8")
@@ -47,7 +50,7 @@ class AutoInterface(Interface):
MULTICAST_PERMANENT_ADDRESS_TYPE = "0" MULTICAST_PERMANENT_ADDRESS_TYPE = "0"
MULTICAST_TEMPORARY_ADDRESS_TYPE = "1" MULTICAST_TEMPORARY_ADDRESS_TYPE = "1"
PEERING_TIMEOUT = 7.5 PEERING_TIMEOUT = 10.0
ALL_IGNORE_IFS = ["lo0"] ALL_IGNORE_IFS = ["lo0"]
DARWIN_IGNORE_IFS = ["awdl0", "llw0", "lo0", "en5"] DARWIN_IGNORE_IFS = ["awdl0", "llw0", "lo0", "en5"]
@@ -103,11 +106,11 @@ class AutoInterface(Interface):
super().__init__() super().__init__()
self.netinfo = niwrapper self.netinfo = niwrapper
self.HW_MTU = 1064 self.HW_MTU = AutoInterface.HW_MTU
self.IN = True self.IN = True
self.OUT = False self.OUT = False
self.name = name self.name = name
self.owner = owner
self.online = False self.online = False
self.peers = {} self.peers = {}
self.link_local_addresses = [] self.link_local_addresses = []
@@ -115,6 +118,8 @@ class AutoInterface(Interface):
self.interface_servers = {} self.interface_servers = {}
self.multicast_echoes = {} self.multicast_echoes = {}
self.timed_out_interfaces = {} self.timed_out_interfaces = {}
self.spawned_interfaces = {}
self.write_lock = threading.Lock()
self.mif_deque = deque(maxlen=AutoInterface.MULTI_IF_DEQUE_LEN) self.mif_deque = deque(maxlen=AutoInterface.MULTI_IF_DEQUE_LEN)
self.mif_deque_times = deque(maxlen=AutoInterface.MULTI_IF_DEQUE_LEN) self.mif_deque_times = deque(maxlen=AutoInterface.MULTI_IF_DEQUE_LEN)
self.carrier_changed = False self.carrier_changed = False
@@ -130,7 +135,7 @@ class AutoInterface(Interface):
# Increase peering timeout on Android, due to potential # Increase peering timeout on Android, due to potential
# low-power modes implemented on many chipsets. # low-power modes implemented on many chipsets.
if RNS.vendor.platformutils.is_android(): if RNS.vendor.platformutils.is_android():
self.peering_timeout *= 3 self.peering_timeout *= 2.5
if allowed_interfaces == None: if allowed_interfaces == None:
self.allowed_interfaces = [] self.allowed_interfaces = []
@@ -288,32 +293,31 @@ class AutoInterface(Interface):
else: else:
self.bitrate = AutoInterface.BITRATE_GUESS self.bitrate = AutoInterface.BITRATE_GUESS
peering_wait = self.announce_interval*1.2 def final_init(self):
RNS.log(str(self)+" discovering peers for "+str(round(peering_wait, 2))+" seconds...", RNS.LOG_VERBOSE) peering_wait = self.announce_interval*1.2
RNS.log(str(self)+" discovering peers for "+str(round(peering_wait, 2))+" seconds...", RNS.LOG_VERBOSE)
self.owner = owner socketserver.UDPServer.address_family = socket.AF_INET6
socketserver.UDPServer.address_family = socket.AF_INET6
for ifname in self.adopted_interfaces: for ifname in self.adopted_interfaces:
local_addr = self.adopted_interfaces[ifname]+"%"+str(self.interface_name_to_index(ifname)) local_addr = self.adopted_interfaces[ifname]+"%"+str(self.interface_name_to_index(ifname))
addr_info = socket.getaddrinfo(local_addr, self.data_port, socket.AF_INET6, socket.SOCK_DGRAM) addr_info = socket.getaddrinfo(local_addr, self.data_port, socket.AF_INET6, socket.SOCK_DGRAM)
address = addr_info[0][4] address = addr_info[0][4]
udp_server = socketserver.UDPServer(address, self.handler_factory(self.process_incoming)) udp_server = socketserver.UDPServer(address, self.handler_factory(self.process_incoming))
self.interface_servers[ifname] = udp_server self.interface_servers[ifname] = udp_server
thread = threading.Thread(target=udp_server.serve_forever) thread = threading.Thread(target=udp_server.serve_forever)
thread.daemon = True thread.daemon = True
thread.start() thread.start()
job_thread = threading.Thread(target=self.peer_jobs) job_thread = threading.Thread(target=self.peer_jobs)
job_thread.daemon = True job_thread.daemon = True
job_thread.start() job_thread.start()
time.sleep(peering_wait) time.sleep(peering_wait)
self.online = True
self.online = True
def discovery_handler(self, socket, ifname): def discovery_handler(self, socket, ifname):
def announce_loop(): def announce_loop():
@@ -325,8 +329,9 @@ class AutoInterface(Interface):
while True: while True:
data, ipv6_src = socket.recvfrom(1024) data, ipv6_src = socket.recvfrom(1024)
peering_hash = data[:RNS.Identity.HASHLENGTH//8]
expected_hash = RNS.Identity.full_hash(self.group_id+ipv6_src[0].encode("utf-8")) expected_hash = RNS.Identity.full_hash(self.group_id+ipv6_src[0].encode("utf-8"))
if data == expected_hash: if peering_hash == expected_hash:
self.add_peer(ipv6_src[0], ifname) self.add_peer(ipv6_src[0], ifname)
else: else:
RNS.log(str(self)+" received peering packet on "+str(ifname)+" from "+str(ipv6_src[0])+", but authentication hash was incorrect.", RNS.LOG_DEBUG) RNS.log(str(self)+" received peering packet on "+str(ifname)+" from "+str(ipv6_src[0])+", but authentication hash was incorrect.", RNS.LOG_DEBUG)
@@ -347,6 +352,10 @@ class AutoInterface(Interface):
# Remove any timed out peers # Remove any timed out peers
for peer_addr in timed_out_peers: for peer_addr in timed_out_peers:
removed_peer = self.peers.pop(peer_addr) removed_peer = self.peers.pop(peer_addr)
if peer_addr in self.spawned_interfaces:
spawned_interface = self.spawned_interfaces[peer_addr]
spawned_interface.detach()
spawned_interface.teardown()
RNS.log(str(self)+" removed peer "+str(peer_addr)+" on "+str(removed_peer[0]), RNS.LOG_DEBUG) RNS.log(str(self)+" removed peer "+str(peer_addr)+" on "+str(removed_peer[0]), RNS.LOG_DEBUG)
for ifname in self.adopted_interfaces: for ifname in self.adopted_interfaces:
@@ -433,6 +442,10 @@ class AutoInterface(Interface):
else: else:
pass pass
@property
def peer_count(self):
return len(self.spawned_interfaces)
def add_peer(self, addr, ifname): def add_peer(self, addr, ifname):
if addr in self.link_local_addresses: if addr in self.link_local_addresses:
ifname = None ifname = None
@@ -448,46 +461,62 @@ class AutoInterface(Interface):
else: else:
if not addr in self.peers: if not addr in self.peers:
self.peers[addr] = [ifname, time.time()] self.peers[addr] = [ifname, time.time()]
spawned_interface = AutoInterfacePeer(self, addr, ifname)
spawned_interface.OUT = self.OUT
spawned_interface.IN = self.IN
spawned_interface.parent_interface = self
spawned_interface.bitrate = self.bitrate
spawned_interface.ifac_size = self.ifac_size
spawned_interface.ifac_netname = self.ifac_netname
spawned_interface.ifac_netkey = self.ifac_netkey
if spawned_interface.ifac_netname != None or spawned_interface.ifac_netkey != None:
ifac_origin = b""
if spawned_interface.ifac_netname != None:
ifac_origin += RNS.Identity.full_hash(spawned_interface.ifac_netname.encode("utf-8"))
if spawned_interface.ifac_netkey != None:
ifac_origin += RNS.Identity.full_hash(spawned_interface.ifac_netkey.encode("utf-8"))
ifac_origin_hash = RNS.Identity.full_hash(ifac_origin)
spawned_interface.ifac_key = RNS.Cryptography.hkdf(
length=64,
derive_from=ifac_origin_hash,
salt=RNS.Reticulum.IFAC_SALT,
context=None
)
spawned_interface.ifac_identity = RNS.Identity.from_bytes(spawned_interface.ifac_key)
spawned_interface.ifac_signature = spawned_interface.ifac_identity.sign(RNS.Identity.full_hash(spawned_interface.ifac_key))
spawned_interface.announce_rate_target = self.announce_rate_target
spawned_interface.announce_rate_grace = self.announce_rate_grace
spawned_interface.announce_rate_penalty = self.announce_rate_penalty
spawned_interface.mode = self.mode
spawned_interface.HW_MTU = self.HW_MTU
spawned_interface.online = True
RNS.Transport.interfaces.append(spawned_interface)
if addr in self.spawned_interfaces:
self.spawned_interfaces[addr].detach()
self.spawned_interfaces[addr].teardown()
self.spawned_interfaces.pop(spawned_interface)
self.spawned_interfaces[addr] = spawned_interface
RNS.log(str(self)+" added peer "+str(addr)+" on "+str(ifname), RNS.LOG_DEBUG) RNS.log(str(self)+" added peer "+str(addr)+" on "+str(ifname), RNS.LOG_DEBUG)
else: else:
self.refresh_peer(addr) self.refresh_peer(addr)
def refresh_peer(self, addr): def refresh_peer(self, addr):
self.peers[addr][1] = time.time() try:
self.peers[addr][1] = time.time()
except Exception as e:
RNS.log(f"An error occurred while refreshing peer {addr} on {self}: {e}", RNS.LOG_ERROR)
def process_incoming(self, data): def process_incoming(self, data, addr=None):
if self.online: if self.online and addr in self.spawned_interfaces:
data_hash = RNS.Identity.full_hash(data) self.spawned_interfaces[addr].process_incoming(data, addr)
deque_hit = False
if data_hash in self.mif_deque:
for te in self.mif_deque_times:
if te[0] == data_hash and time.time() < te[1]+AutoInterface.MULTI_IF_DEQUE_TTL:
deque_hit = True
break
if not deque_hit:
self.mif_deque.append(data_hash)
self.mif_deque_times.append([data_hash, time.time()])
self.rxb += len(data)
self.owner.inbound(data, self)
def process_outgoing(self,data): def process_outgoing(self,data):
if self.online: pass
for peer in self.peers:
try:
if self.outbound_udp_socket == None:
self.outbound_udp_socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
peer_addr = str(peer)+"%"+str(self.interface_name_to_index(self.peers[peer][0]))
addr_info = socket.getaddrinfo(peer_addr, self.data_port, socket.AF_INET6, socket.SOCK_DGRAM)
self.outbound_udp_socket.sendto(data, addr_info[0][4])
except Exception as e:
RNS.log("Could not transmit on "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
self.txb += len(data)
# Until per-device sub-interfacing is implemented, # Until per-device sub-interfacing is implemented,
# ingress limiting should be disabled on AutoInterface # ingress limiting should be disabled on AutoInterface
@@ -500,6 +529,83 @@ class AutoInterface(Interface):
def __str__(self): def __str__(self):
return "AutoInterface["+self.name+"]" return "AutoInterface["+self.name+"]"
class AutoInterfacePeer(Interface):
def __init__(self, owner, addr, ifname):
super().__init__()
self.owner = owner
self.parent_interface = owner
self.addr = addr
self.ifname = ifname
self.peer_addr = None
self.addr_info = None
self.HW_MTU = self.owner.HW_MTU
self.FIXED_MTU = self.owner.FIXED_MTU
def __str__(self):
return f"AutoInterfacePeer[{self.ifname}/{self.addr}]"
def process_incoming(self, data, addr=None):
if self.online and self.owner.online:
data_hash = RNS.Identity.full_hash(data)
deque_hit = False
if data_hash in self.owner.mif_deque:
for te in self.owner.mif_deque_times:
if te[0] == data_hash and time.time() < te[1]+AutoInterface.MULTI_IF_DEQUE_TTL:
deque_hit = True
break
if not deque_hit:
self.owner.refresh_peer(self.addr)
self.owner.mif_deque.append(data_hash)
self.owner.mif_deque_times.append([data_hash, time.time()])
self.rxb += len(data)
self.owner.rxb += len(data)
self.owner.owner.inbound(data, self)
def process_outgoing(self, data):
if self.online:
with self.owner.write_lock:
try:
if self.owner.outbound_udp_socket == None: self.owner.outbound_udp_socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
if self.peer_addr == None: self.peer_addr = str(self.addr)+"%"+str(self.owner.interface_name_to_index(self.ifname))
if self.addr_info == None: addr_info = socket.getaddrinfo(self.peer_addr, self.owner.data_port, socket.AF_INET6, socket.SOCK_DGRAM)
self.owner.outbound_udp_socket.sendto(data, addr_info[0][4])
self.txb += len(data)
self.owner.txb += len(data)
except Exception as e:
RNS.log("Could not transmit on "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
def detach(self):
self.online = False
self.detached = True
def teardown(self):
if not self.detached:
RNS.log("The interface "+str(self)+" experienced an unrecoverable error and is being torn down.", RNS.LOG_ERROR)
if RNS.Reticulum.panic_on_interface_error:
RNS.panic()
else:
RNS.log("The interface "+str(self)+" is being torn down.", RNS.LOG_VERBOSE)
self.online = False
self.OUT = False
self.IN = False
if self.addr in self.owner.spawned_interfaces:
try: self.owner.spawned_interfaces.pop(self.addr)
except Exception as e:
RNS.log(f"Could not remove {self} from parent interface on detach. The contained exception was: {e}", RNS.LOG_ERROR)
if self in RNS.Transport.interfaces:
RNS.Transport.interfaces.remove(self)
# Until per-device sub-interfacing is implemented,
# ingress limiting should be disabled on AutoInterface
def should_ingress_limit(self):
return False
class AutoInterfaceHandler(socketserver.BaseRequestHandler): class AutoInterfaceHandler(socketserver.BaseRequestHandler):
def __init__(self, callback, *args, **keys): def __init__(self, callback, *args, **keys):
self.callback = callback self.callback = callback
@@ -507,4 +613,5 @@ class AutoInterfaceHandler(socketserver.BaseRequestHandler):
def handle(self): def handle(self):
data = self.request[0] data = self.request[0]
self.callback(data) addr = self.client_address[0]
self.callback(data, addr)
+6 -2
View File
@@ -65,6 +65,7 @@ class Interface:
IC_HELD_RELEASE_INTERVAL = 30 IC_HELD_RELEASE_INTERVAL = 30
AUTOCONFIGURE_MTU = False AUTOCONFIGURE_MTU = False
FIXED_MTU = False
def __init__(self): def __init__(self):
self.rxb = 0 self.rxb = 0
@@ -181,12 +182,12 @@ class Interface:
RNS.log("An error occurred while processing held announces for "+str(self), RNS.LOG_ERROR) RNS.log("An error occurred while processing held announces for "+str(self), RNS.LOG_ERROR)
RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR)
def received_announce(self): def received_announce(self, from_spawned=False):
self.ia_freq_deque.append(time.time()) self.ia_freq_deque.append(time.time())
if hasattr(self, "parent_interface") and self.parent_interface != None: if hasattr(self, "parent_interface") and self.parent_interface != None:
self.parent_interface.received_announce(from_spawned=True) self.parent_interface.received_announce(from_spawned=True)
def sent_announce(self): def sent_announce(self, from_spawned=False):
self.oa_freq_deque.append(time.time()) self.oa_freq_deque.append(time.time())
if hasattr(self, "parent_interface") and self.parent_interface != None: if hasattr(self, "parent_interface") and self.parent_interface != None:
self.parent_interface.sent_announce(from_spawned=True) self.parent_interface.sent_announce(from_spawned=True)
@@ -267,6 +268,9 @@ class Interface:
RNS.log("Error while processing announce queue on "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("Error while processing announce queue on "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
RNS.log("The announce queue for this interface has been cleared.", RNS.LOG_ERROR) RNS.log("The announce queue for this interface has been cleared.", RNS.LOG_ERROR)
def final_init(self):
pass
def detach(self): def detach(self):
pass pass
+7 -8
View File
@@ -155,14 +155,11 @@ class LocalClientInterface(Interface):
if hasattr(self, "parent_interface") and self.parent_interface != None: if hasattr(self, "parent_interface") and self.parent_interface != None:
self.parent_interface.rxb += len(data) self.parent_interface.rxb += len(data)
# TODO: Remove at some point try:
# processing_start = time.time() self.owner.inbound(data, self)
except Exception as e:
self.owner.inbound(data, self) RNS.log(f"An error in the processing of an incoming frame for {self}: {e}", RNS.LOG_ERROR)
RNS.trace_exception(e)
# TODO: Remove at some point
# duration = time.time() - processing_start
# self.rxptime += duration
def process_outgoing(self, data): def process_outgoing(self, data):
if self.online: if self.online:
@@ -188,6 +185,7 @@ class LocalClientInterface(Interface):
except Exception as e: except Exception as e:
RNS.log("Exception occurred while transmitting via "+str(self)+", tearing down interface", RNS.LOG_ERROR) RNS.log("Exception occurred while transmitting via "+str(self)+", tearing down interface", RNS.LOG_ERROR)
RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR)
RNS.trace_exception(e)
self.teardown() self.teardown()
@@ -319,6 +317,7 @@ class LocalServerInterface(Interface):
address = (self.bind_ip, self.bind_port) address = (self.bind_ip, self.bind_port)
self.server = ThreadingTCPServer(address, handlerFactory(self.incoming_connection)) self.server = ThreadingTCPServer(address, handlerFactory(self.incoming_connection))
self.server.daemon_threads = True
thread = threading.Thread(target=self.server.serve_forever) thread = threading.Thread(target=self.server.serve_forever)
thread.daemon = True thread.daemon = True
+44 -2
View File
@@ -146,7 +146,7 @@ class Link:
link.destination = packet.destination link.destination = packet.destination
link.establishment_timeout = Link.ESTABLISHMENT_TIMEOUT_PER_HOP * max(1, packet.hops) + Link.KEEPALIVE link.establishment_timeout = Link.ESTABLISHMENT_TIMEOUT_PER_HOP * max(1, packet.hops) + Link.KEEPALIVE
link.establishment_cost += len(packet.raw) link.establishment_cost += len(packet.raw)
RNS.log(f"Validating link request {RNS.prettyhexrep(link.link_id)}", RNS.LOG_VERBOSE) RNS.log(f"Validating link request {RNS.prettyhexrep(link.link_id)}", RNS.LOG_DEBUG)
RNS.log(f"Link MTU configured to {RNS.prettysize(link.mtu)}", RNS.LOG_EXTREME) RNS.log(f"Link MTU configured to {RNS.prettysize(link.mtu)}", RNS.LOG_EXTREME)
RNS.log(f"Establishment timeout is {RNS.prettytime(link.establishment_timeout)} for incoming link request "+RNS.prettyhexrep(link.link_id), RNS.LOG_EXTREME) RNS.log(f"Establishment timeout is {RNS.prettytime(link.establishment_timeout)} for incoming link request "+RNS.prettyhexrep(link.link_id), RNS.LOG_EXTREME)
link.handshake() link.handshake()
@@ -177,6 +177,7 @@ class Link:
self.mtu = RNS.Reticulum.MTU self.mtu = RNS.Reticulum.MTU
self.establishment_cost = 0 self.establishment_cost = 0
self.establishment_rate = None self.establishment_rate = None
self.expected_rate = None
self.callbacks = LinkCallbacks() self.callbacks = LinkCallbacks()
self.resource_strategy = Link.ACCEPT_NONE self.resource_strategy = Link.ACCEPT_NONE
self.last_resource_window = None self.last_resource_window = None
@@ -363,7 +364,7 @@ class Link:
self.activated_at = time.time() self.activated_at = time.time()
self.last_proof = self.activated_at self.last_proof = self.activated_at
RNS.Transport.activate_link(self) RNS.Transport.activate_link(self)
RNS.log("Link "+str(self)+" established with "+str(self.destination)+", RTT is "+str(round(self.rtt, 3))+"s", RNS.LOG_VERBOSE) RNS.log("Link "+str(self)+" established with "+str(self.destination)+", RTT is "+str(round(self.rtt, 3))+"s", RNS.LOG_DEBUG)
if self.rtt != None and self.establishment_cost != None and self.rtt > 0 and self.establishment_cost > 0: if self.rtt != None and self.establishment_cost != None and self.rtt > 0 and self.establishment_cost > 0:
self.establishment_rate = self.establishment_cost/self.rtt self.establishment_rate = self.establishment_cost/self.rtt
@@ -535,6 +536,33 @@ class Link:
else: else:
return None return None
def get_mtu(self):
"""
:returns: The MTU of an established link.
"""
if self.status == Link.ACTIVE:
return self.mtu
else:
return None
def get_mdu(self):
"""
:returns: The packet MDU of an established link.
"""
if self.status == Link.ACTIVE:
return self.mdu
else:
return None
def get_expected_rate(self):
"""
:returns: The packet expected in-flight data rate of an established link.
"""
if self.status == Link.ACTIVE:
return self.expected_rate
else:
return None
def get_salt(self): def get_salt(self):
return self.link_id return self.link_id
@@ -962,6 +990,8 @@ class Link:
resource_advertisement.link = self resource_advertisement.link = self
if self.callbacks.resource(resource_advertisement): if self.callbacks.resource(resource_advertisement):
RNS.Resource.accept(packet, self.callbacks.resource_concluded) RNS.Resource.accept(packet, self.callbacks.resource_concluded)
else:
RNS.Resource.reject(packet)
except Exception as e: except Exception as e:
RNS.log("Error while executing resource accept callback from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("Error while executing resource accept callback from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
elif self.resource_strategy == Link.ACCEPT_ALL: elif self.resource_strategy == Link.ACCEPT_ALL:
@@ -1007,6 +1037,15 @@ class Link:
if resource_hash == resource.hash: if resource_hash == resource.hash:
resource.cancel() resource.cancel()
elif packet.context == RNS.Packet.RESOURCE_RCL:
plaintext = self.decrypt(packet.data)
if plaintext != None:
self.__update_phy_stats(packet)
resource_hash = plaintext[:RNS.Identity.HASHLENGTH//8]
for resource in self.outgoing_resources:
if resource_hash == resource.hash:
resource._rejected()
elif packet.context == RNS.Packet.KEEPALIVE: elif packet.context == RNS.Packet.KEEPALIVE:
if not self.initiator and packet.data == bytes([0xFF]): if not self.initiator and packet.data == bytes([0xFF]):
keepalive_packet = RNS.Packet(self, bytes([0xFE]), context=RNS.Packet.KEEPALIVE) keepalive_packet = RNS.Packet(self, bytes([0xFE]), context=RNS.Packet.KEEPALIVE)
@@ -1142,12 +1181,15 @@ class Link:
self.callbacks.remote_identified = callback self.callbacks.remote_identified = callback
def resource_concluded(self, resource): def resource_concluded(self, resource):
concluded_at = time.time()
if resource in self.incoming_resources: if resource in self.incoming_resources:
self.last_resource_window = resource.window self.last_resource_window = resource.window
self.last_resource_eifr = resource.eifr self.last_resource_eifr = resource.eifr
self.incoming_resources.remove(resource) self.incoming_resources.remove(resource)
self.expected_rate = (resource.size*8)/(max(concluded_at-resource.started_transferring, 0.0001))
if resource in self.outgoing_resources: if resource in self.outgoing_resources:
self.outgoing_resources.remove(resource) self.outgoing_resources.remove(resource)
self.expected_rate = (resource.size*8)/(max(concluded_at-resource.started_transferring, 0.0001))
def set_resource_strategy(self, resource_strategy): def set_resource_strategy(self, resource_strategy):
""" """
+65 -33
View File
@@ -141,6 +141,19 @@ class Resource:
COMPLETE = 0x06 COMPLETE = 0x06
FAILED = 0x07 FAILED = 0x07
CORRUPT = 0x08 CORRUPT = 0x08
REJECTED = 0x00
@staticmethod
def reject(advertisement_packet):
try:
adv = ResourceAdvertisement.unpack(advertisement_packet.plaintext)
resource_hash = adv.h
reject_packet = RNS.Packet(advertisement_packet.link, resource_hash, context=RNS.Packet.RESOURCE_RCL)
reject_packet.send()
except Exception as e:
RNS.log(f"An error ocurred while rejecting advertised resource: {e}", RNS.LOG_ERROR)
RNS.trace_exception(e)
@staticmethod @staticmethod
def accept(advertisement_packet, callback=None, progress_callback = None, request_id = None): def accept(advertisement_packet, callback=None, progress_callback = None, request_id = None):
@@ -150,32 +163,33 @@ class Resource:
resource = Resource(None, advertisement_packet.link, request_id = request_id) resource = Resource(None, advertisement_packet.link, request_id = request_id)
resource.status = Resource.TRANSFERRING resource.status = Resource.TRANSFERRING
resource.flags = adv.f resource.flags = adv.f
resource.size = adv.t resource.size = adv.t
resource.total_size = adv.d resource.total_size = adv.d
resource.uncompressed_size = adv.d resource.uncompressed_size = adv.d
resource.hash = adv.h resource.hash = adv.h
resource.original_hash = adv.o resource.original_hash = adv.o
resource.random_hash = adv.r resource.random_hash = adv.r
resource.hashmap_raw = adv.m resource.hashmap_raw = adv.m
resource.encrypted = True if resource.flags & 0x01 else False resource.encrypted = True if resource.flags & 0x01 else False
resource.compressed = True if resource.flags >> 1 & 0x01 else False resource.compressed = True if resource.flags >> 1 & 0x01 else False
resource.initiator = False resource.initiator = False
resource.callback = callback resource.callback = callback
resource.__progress_callback = progress_callback resource.__progress_callback = progress_callback
resource.total_parts = int(math.ceil(resource.size/float(resource.sdu))) resource.total_parts = int(math.ceil(resource.size/float(resource.sdu)))
resource.received_count = 0 resource.received_count = 0
resource.outstanding_parts = 0 resource.outstanding_parts = 0
resource.parts = [None] * resource.total_parts resource.parts = [None] * resource.total_parts
resource.window = Resource.WINDOW resource.window = Resource.WINDOW
resource.window_max = Resource.WINDOW_MAX_SLOW resource.window_max = Resource.WINDOW_MAX_SLOW
resource.window_min = Resource.WINDOW_MIN resource.window_min = Resource.WINDOW_MIN
resource.window_flexibility = Resource.WINDOW_FLEXIBILITY resource.window_flexibility = Resource.WINDOW_FLEXIBILITY
resource.last_activity = time.time() resource.last_activity = time.time()
resource.started_transferring = resource.last_activity
resource.storagepath = RNS.Reticulum.resourcepath+"/"+resource.original_hash.hex() resource.storagepath = RNS.Reticulum.resourcepath+"/"+resource.original_hash.hex()
resource.segment_index = adv.i resource.segment_index = adv.i
resource.total_segments = adv.l resource.total_segments = adv.l
if adv.l > 1: if adv.l > 1:
resource.split = True resource.split = True
else: else:
@@ -303,6 +317,7 @@ class Resource:
self.fast_rate_rounds = 0 self.fast_rate_rounds = 0
self.very_slow_rate_rounds = 0 self.very_slow_rate_rounds = 0
self.request_id = request_id self.request_id = request_id
self.started_transferring = None
self.is_response = is_response self.is_response = is_response
self.auto_compress = auto_compress self.auto_compress = auto_compress
@@ -321,9 +336,9 @@ class Resource:
compression_began = time.time() compression_began = time.time()
if (auto_compress and len(self.uncompressed_data) <= Resource.AUTO_COMPRESS_MAX_SIZE): if (auto_compress and len(self.uncompressed_data) <= Resource.AUTO_COMPRESS_MAX_SIZE):
RNS.log("Compressing resource data...", RNS.LOG_DEBUG) RNS.log("Compressing resource data...", RNS.LOG_EXTREME)
self.compressed_data = bz2.compress(self.uncompressed_data) self.compressed_data = bz2.compress(self.uncompressed_data)
RNS.log("Compression completed in "+str(round(time.time()-compression_began, 3))+" seconds", RNS.LOG_DEBUG) RNS.log("Compression completed in "+str(round(time.time()-compression_began, 3))+" seconds", RNS.LOG_EXTREME)
else: else:
self.compressed_data = self.uncompressed_data self.compressed_data = self.uncompressed_data
@@ -332,7 +347,7 @@ class Resource:
if (self.compressed_size < self.uncompressed_size and auto_compress): if (self.compressed_size < self.uncompressed_size and auto_compress):
saved_bytes = len(self.uncompressed_data) - len(self.compressed_data) saved_bytes = len(self.uncompressed_data) - len(self.compressed_data)
RNS.log("Compression saved "+str(saved_bytes)+" bytes, sending compressed", RNS.LOG_DEBUG) RNS.log("Compression saved "+str(saved_bytes)+" bytes, sending compressed", RNS.LOG_EXTREME)
self.data = b"" self.data = b""
self.data += RNS.Identity.get_random_hash()[:Resource.RANDOM_HASH_SIZE] self.data += RNS.Identity.get_random_hash()[:Resource.RANDOM_HASH_SIZE]
@@ -350,7 +365,7 @@ class Resource:
self.compressed = False self.compressed = False
self.compressed_data = None self.compressed_data = None
if auto_compress: if auto_compress:
RNS.log("Compression did not decrease size, sending uncompressed", RNS.LOG_DEBUG) RNS.log("Compression did not decrease size, sending uncompressed", RNS.LOG_EXTREME)
# Resources handle encryption directly to # Resources handle encryption directly to
# make optimal use of packet MTU on an entire # make optimal use of packet MTU on an entire
@@ -367,7 +382,7 @@ class Resource:
hashmap_ok = False hashmap_ok = False
while not hashmap_ok: while not hashmap_ok:
hashmap_computation_began = time.time() hashmap_computation_began = time.time()
RNS.log("Starting resource hashmap computation with "+str(hashmap_entries)+" entries...", RNS.LOG_DEBUG) RNS.log("Starting resource hashmap computation with "+str(hashmap_entries)+" entries...", RNS.LOG_EXTREME)
self.random_hash = RNS.Identity.get_random_hash()[:Resource.RANDOM_HASH_SIZE] self.random_hash = RNS.Identity.get_random_hash()[:Resource.RANDOM_HASH_SIZE]
self.hash = RNS.Identity.full_hash(data+self.random_hash) self.hash = RNS.Identity.full_hash(data+self.random_hash)
@@ -387,7 +402,7 @@ class Resource:
map_hash = self.get_map_hash(data) map_hash = self.get_map_hash(data)
if map_hash in collision_guard_list: if map_hash in collision_guard_list:
RNS.log("Found hash collision in resource map, remapping...", RNS.LOG_VERBOSE) RNS.log("Found hash collision in resource map, remapping...", RNS.LOG_DEBUG)
hashmap_ok = False hashmap_ok = False
break break
else: else:
@@ -403,7 +418,7 @@ class Resource:
self.hashmap += part.map_hash self.hashmap += part.map_hash
self.parts.append(part) self.parts.append(part)
RNS.log("Hashmap computation concluded in "+str(round(time.time()-hashmap_computation_began, 3))+" seconds", RNS.LOG_DEBUG) RNS.log("Hashmap computation concluded in "+str(round(time.time()-hashmap_computation_began, 3))+" seconds", RNS.LOG_EXTREME)
if advertise: if advertise:
self.advertise() self.advertise()
@@ -457,12 +472,13 @@ class Resource:
try: try:
self.advertisement_packet.send() self.advertisement_packet.send()
self.last_activity = time.time() self.last_activity = time.time()
self.started_transferring = self.last_activity
self.adv_sent = self.last_activity self.adv_sent = self.last_activity
self.rtt = None self.rtt = None
self.status = Resource.ADVERTISED self.status = Resource.ADVERTISED
self.retries_left = self.max_adv_retries self.retries_left = self.max_adv_retries
self.link.register_outgoing_resource(self) self.link.register_outgoing_resource(self)
RNS.log("Sent resource advertisement for "+RNS.prettyhexrep(self.hash), RNS.LOG_DEBUG) RNS.log("Sent resource advertisement for "+RNS.prettyhexrep(self.hash), RNS.LOG_EXTREME)
except Exception as e: except Exception as e:
RNS.log("Could not advertise resource, the contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("Could not advertise resource, the contained exception was: "+str(e), RNS.LOG_ERROR)
self.cancel() self.cancel()
@@ -485,6 +501,7 @@ class Resource:
expected_inflight_rate = self.link.establishment_cost*8 / rtt expected_inflight_rate = self.link.establishment_cost*8 / rtt
self.eifr = expected_inflight_rate self.eifr = expected_inflight_rate
if self.link: self.link.expected_rate = self.eifr
def watchdog_job(self): def watchdog_job(self):
thread = threading.Thread(target=self.__watchdog_job) thread = threading.Thread(target=self.__watchdog_job)
@@ -585,6 +602,9 @@ class Resource:
self.last_part_sent = time.time() self.last_part_sent = time.time()
sleep_time = 0.001 sleep_time = 0.001
elif self.status == Resource.REJECTED:
sleep_time = 0.001
if sleep_time == 0: if sleep_time == 0:
RNS.log("Warning! Link watchdog sleep time of 0!", RNS.LOG_DEBUG) RNS.log("Warning! Link watchdog sleep time of 0!", RNS.LOG_DEBUG)
if sleep_time == None or sleep_time < 0: if sleep_time == None or sleep_time < 0:
@@ -991,6 +1011,18 @@ class Resource:
except Exception as e: except Exception as e:
RNS.log("Error while executing callbacks on resource cancel from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("Error while executing callbacks on resource cancel from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
def _rejected(self):
if self.status < Resource.COMPLETE:
if self.initiator:
self.status = Resource.REJECTED
self.link.cancel_outgoing_resource(self)
if self.callback != None:
try:
self.link.resource_concluded(self)
self.callback(self)
except Exception as e:
RNS.log("Error while executing callbacks on resource reject from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
def set_callback(self, callback): def set_callback(self, callback):
self.callback = callback self.callback = callback
+29 -9
View File
@@ -39,8 +39,9 @@ else:
from RNS.vendor.configobj import ConfigObj from RNS.vendor.configobj import ConfigObj
import configparser import configparser
import multiprocessing.connection import multiprocessing.connection
import signal import importlib
import threading import threading
import signal
import atexit import atexit
import struct import struct
import array import array
@@ -89,7 +90,7 @@ class Reticulum:
the default value. the default value.
""" """
LINK_MTU_DISCOVERY = False LINK_MTU_DISCOVERY = True
""" """
Whether automatic link MTU discovery is enabled by default in this Whether automatic link MTU discovery is enabled by default in this
release. Link MTU discovery significantly increases throughput over release. Link MTU discovery significantly increases throughput over
@@ -163,19 +164,23 @@ class Reticulum:
__instance = None __instance = None
__interface_detach_ran = False __interface_detach_ran = False
__exit_handler_ran = False
@staticmethod @staticmethod
def exit_handler(): def exit_handler():
# This exit handler is called whenever Reticulum is asked to # This exit handler is called whenever Reticulum is asked to
# shut down, and will in turn call exit handlers in other # shut down, and will in turn call exit handlers in other
# classes, saving necessary information to disk and carrying # classes, saving necessary information to disk and carrying
# out cleanup operations. # out cleanup operations.
if not Reticulum.__interface_detach_ran: if not Reticulum.__exit_handler_ran:
RNS.Transport.detach_interfaces() if not Reticulum.__interface_detach_ran:
RNS.Transport.exit_handler() RNS.Transport.detach_interfaces()
RNS.Identity.exit_handler() RNS.Transport.exit_handler()
RNS.Identity.exit_handler()
if RNS.Profiler.ran(): if RNS.Profiler.ran():
RNS.Profiler.results() RNS.Profiler.results()
RNS.loglevel = -1
@staticmethod @staticmethod
def sigint_handler(signal, frame): def sigint_handler(signal, frame):
@@ -300,7 +305,7 @@ class Reticulum:
time.sleep(1.5) time.sleep(1.5)
self.__apply_config() self.__apply_config()
RNS.log(f"Utilising cryptography backend \"{RNS.Cryptography.Provider.backend()}\"", RNS.LOG_VERBOSE) RNS.log(f"Utilising cryptography backend \"{RNS.Cryptography.Provider.backend()}\"", RNS.LOG_DEBUG)
RNS.log(f"Configuration loaded from {self.configpath}", RNS.LOG_VERBOSE) RNS.log(f"Configuration loaded from {self.configpath}", RNS.LOG_VERBOSE)
RNS.Identity.load_known_destinations() RNS.Identity.load_known_destinations()
@@ -479,6 +484,8 @@ class Reticulum:
if v == False: if v == False:
Reticulum.__use_implicit_proof = False Reticulum.__use_implicit_proof = False
if RNS.compiled: RNS.log("Reticulum running in compiled mode", RNS.LOG_DEBUG)
else: RNS.log("Reticulum running in interpreted mode", RNS.LOG_DEBUG)
self.__start_local_interface() self.__start_local_interface()
if self.is_shared_instance or self.is_standalone_instance: if self.is_shared_instance or self.is_standalone_instance:
@@ -643,6 +650,7 @@ class Reticulum:
interface.ifac_signature = interface.ifac_identity.sign(RNS.Identity.full_hash(interface.ifac_key)) interface.ifac_signature = interface.ifac_identity.sign(RNS.Identity.full_hash(interface.ifac_key))
RNS.Transport.interfaces.append(interface) RNS.Transport.interfaces.append(interface)
interface.final_init()
interface = None interface = None
if (("interface_enabled" in c) and c.as_bool("interface_enabled") == True) or (("enabled" in c) and c.as_bool("enabled") == True): if (("interface_enabled" in c) and c.as_bool("interface_enabled") == True) or (("enabled" in c) and c.as_bool("enabled") == True):
@@ -800,6 +808,7 @@ class Reticulum:
interface.ifac_signature = interface.ifac_identity.sign(RNS.Identity.full_hash(interface.ifac_key)) interface.ifac_signature = interface.ifac_identity.sign(RNS.Identity.full_hash(interface.ifac_key))
RNS.Transport.interfaces.append(interface) RNS.Transport.interfaces.append(interface)
interface.final_init()
def _should_persist_data(self): def _should_persist_data(self):
if time.time() > self.last_data_persist+Reticulum.GRACIOUS_PERSIST_INTERVAL: if time.time() > self.last_data_persist+Reticulum.GRACIOUS_PERSIST_INTERVAL:
@@ -983,12 +992,16 @@ class Reticulum:
ifstats["rxs"] = interface.current_rx_speed ifstats["rxs"] = interface.current_rx_speed
else: else:
ifstats["rxs"] = 0 ifstats["rxs"] = 0
else:
ifstats["rxs"] = 0
if hasattr(interface, "current_tx_speed"): if hasattr(interface, "current_tx_speed"):
if interface.current_tx_speed != None: if interface.current_tx_speed != None:
ifstats["txs"] = interface.current_tx_speed ifstats["txs"] = interface.current_tx_speed
else: else:
ifstats["txs"] = 0 ifstats["txs"] = 0
else:
ifstats["txs"] = 0
if hasattr(interface, "peers"): if hasattr(interface, "peers"):
if interface.peers != None: if interface.peers != None:
@@ -1039,6 +1052,13 @@ class Reticulum:
else: else:
stats["probe_responder"] = None stats["probe_responder"] = None
if importlib.util.find_spec('psutil') != None:
import psutil
process = psutil.Process()
stats["rss"] = process.memory_info().rss
else:
stats["rss"] = None
return stats return stats
def get_path_table(self, max_hops=None): def get_path_table(self, max_hops=None):
+24 -12
View File
@@ -1336,7 +1336,7 @@ class Transport:
RNS.log(f"No next-hop HW MTU, disabling link MTU upgrade", RNS.LOG_DEBUG) # TODO: Remove debug RNS.log(f"No next-hop HW MTU, disabling link MTU upgrade", RNS.LOG_DEBUG) # TODO: Remove debug
path_mtu = None path_mtu = None
new_raw = new_raw[:-RNS.Link.LINK_MTU_SIZE] new_raw = new_raw[:-RNS.Link.LINK_MTU_SIZE]
elif not outbound_interface.AUTOCONFIGURE_MTU: elif not outbound_interface.AUTOCONFIGURE_MTU and not outbound_interface.FIXED_MTU:
RNS.log(f"Outbound interface doesn't support MTU autoconfiguration, disabling link MTU upgrade", RNS.LOG_DEBUG) # TODO: Remove debug RNS.log(f"Outbound interface doesn't support MTU autoconfiguration, disabling link MTU upgrade", RNS.LOG_DEBUG) # TODO: Remove debug
path_mtu = None path_mtu = None
new_raw = new_raw[:-RNS.Link.LINK_MTU_SIZE] new_raw = new_raw[:-RNS.Link.LINK_MTU_SIZE]
@@ -1344,7 +1344,7 @@ class Transport:
if nh_mtu < path_mtu: if nh_mtu < path_mtu:
path_mtu = nh_mtu path_mtu = nh_mtu
clamped_mtu = RNS.Link.mtu_bytes(path_mtu) clamped_mtu = RNS.Link.mtu_bytes(path_mtu)
RNS.log(f"Clamping link MTU to {RNS.prettysize(nh_mtu)}: {RNS.hexrep(clamped_mtu)}", RNS.LOG_DEBUG) # TODO: Remove debug RNS.log(f"Clamping link MTU to {RNS.prettysize(nh_mtu)}", RNS.LOG_DEBUG) # TODO: Remove debug
new_raw = new_raw[:-RNS.Link.LINK_MTU_SIZE]+clamped_mtu new_raw = new_raw[:-RNS.Link.LINK_MTU_SIZE]+clamped_mtu
# Entry format is # Entry format is
@@ -1490,7 +1490,8 @@ class Transport:
# replayed to forge paths. # replayed to forge paths.
# TODO: Check whether this approach works # TODO: Check whether this approach works
# under all circumstances # under all circumstances
if not random_blob in random_blobs: path_timebase = Transport.timebase_from_random_blobs(random_blobs)
if not random_blob in random_blobs and announce_emitted > path_timebase:
Transport.mark_path_unknown_state(packet.destination_hash) Transport.mark_path_unknown_state(packet.destination_hash)
should_add = True should_add = True
else: else:
@@ -1798,7 +1799,7 @@ class Transport:
for destination in Transport.destinations: for destination in Transport.destinations:
if destination.hash == packet.destination_hash and destination.type == packet.destination_type: if destination.hash == packet.destination_hash and destination.type == packet.destination_type:
path_mtu = RNS.Link.mtu_from_lr_packet(packet) path_mtu = RNS.Link.mtu_from_lr_packet(packet)
if packet.receiving_interface.AUTOCONFIGURE_MTU: if packet.receiving_interface.AUTOCONFIGURE_MTU or packet.receiving_interface.FIXED_MTU:
nh_mtu = packet.receiving_interface.HW_MTU nh_mtu = packet.receiving_interface.HW_MTU
else: else:
nh_mtu = RNS.Reticulum.MTU nh_mtu = RNS.Reticulum.MTU
@@ -2279,7 +2280,7 @@ class Transport:
def next_hop_interface_hw_mtu(destination_hash): def next_hop_interface_hw_mtu(destination_hash):
next_hop_interface = Transport.next_hop_interface(destination_hash) next_hop_interface = Transport.next_hop_interface(destination_hash)
if next_hop_interface != None: if next_hop_interface != None:
if next_hop_interface.AUTOCONFIGURE_MTU: if next_hop_interface.AUTOCONFIGURE_MTU or next_hop_interface.FIXED_MTU:
return next_hop_interface.HW_MTU return next_hop_interface.HW_MTU
else: else:
return None return None
@@ -2690,7 +2691,7 @@ class Transport:
def detach_job(): def detach_job():
RNS.log(f"Detaching {interface}", RNS.LOG_EXTREME) RNS.log(f"Detaching {interface}", RNS.LOG_EXTREME)
interface.detach() interface.detach()
dt = threading.Thread(target=detach_job, daemon=True) dt = threading.Thread(target=detach_job, daemon=False)
dt.start() dt.start()
detach_threads.append(dt) detach_threads.append(dt)
@@ -2749,15 +2750,26 @@ class Transport:
interface.announce_queue = [] interface.announce_queue = []
RNS.log("Dropped "+na_str+" on "+str(interface), RNS.LOG_VERBOSE) RNS.log("Dropped "+na_str+" on "+str(interface), RNS.LOG_VERBOSE)
@staticmethod
def timebase_from_random_blob(random_blob):
return int.from_bytes(random_blob[5:10], "big")
@staticmethod
def timebase_from_random_blobs(random_blobs):
timebase = 0
for random_blob in random_blobs:
emitted = Transport.timebase_from_random_blob(random_blob)
if emitted > timebase: timebase = emitted
return timebase
@staticmethod @staticmethod
def announce_emitted(packet): def announce_emitted(packet):
random_blob = packet.data[RNS.Identity.KEYSIZE//8+RNS.Identity.NAME_HASH_LENGTH//8:RNS.Identity.KEYSIZE//8+RNS.Identity.NAME_HASH_LENGTH//8+10] random_blob = packet.data[RNS.Identity.KEYSIZE//8+RNS.Identity.NAME_HASH_LENGTH//8:RNS.Identity.KEYSIZE//8+RNS.Identity.NAME_HASH_LENGTH//8+10]
announce_emitted = int.from_bytes(random_blob[5:10], "big") announce_emitted = Transport.timebase_from_random_blob(random_blob)
return announce_emitted return announce_emitted
@staticmethod @staticmethod
def save_packet_hashlist(): def save_packet_hashlist():
if not Transport.owner.is_connected_to_shared_instance: if not Transport.owner.is_connected_to_shared_instance:
@@ -2782,7 +2794,7 @@ class Transport:
packet_hashlist_path = RNS.Reticulum.storagepath+"/packet_hashlist" packet_hashlist_path = RNS.Reticulum.storagepath+"/packet_hashlist"
file = open(packet_hashlist_path, "wb") file = open(packet_hashlist_path, "wb")
file.write(umsgpack.packb(list(Transport.packet_hashlist))) file.write(umsgpack.packb(list(Transport.packet_hashlist.copy())))
file.close() file.close()
save_time = time.time() - save_start save_time = time.time() - save_start
@@ -2817,7 +2829,7 @@ class Transport:
RNS.log("Saving path table to storage...", RNS.LOG_DEBUG) RNS.log("Saving path table to storage...", RNS.LOG_DEBUG)
serialised_destinations = [] serialised_destinations = []
for destination_hash in Transport.destination_table: for destination_hash in Transport.destination_table.copy():
# Get the destination entry from the destination table # Get the destination entry from the destination table
de = Transport.destination_table[destination_hash] de = Transport.destination_table[destination_hash]
interface_hash = de[5].get_hash() interface_hash = de[5].get_hash()
@@ -2887,10 +2899,10 @@ class Transport:
RNS.log("Saving tunnel table to storage...", RNS.LOG_DEBUG) RNS.log("Saving tunnel table to storage...", RNS.LOG_DEBUG)
serialised_tunnels = [] serialised_tunnels = []
for tunnel_id in Transport.tunnels: for tunnel_id in Transport.tunnels.copy():
te = Transport.tunnels[tunnel_id] te = Transport.tunnels[tunnel_id]
interface = te[1] interface = te[1]
tunnel_paths = te[2] tunnel_paths = te[2].copy()
expires = te[3] expires = te[3]
if interface != None: if interface != None:
+31 -32
View File
@@ -22,7 +22,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
import RNS from CRNS import RNS
import argparse import argparse
import threading import threading
import time import time
@@ -68,10 +68,10 @@ def listen(configdir, verbosity = 0, quietness = 0, allowed = [], display_identi
save_path = sp save_path = sp
else: else:
RNS.log("Output directory not writable", RNS.LOG_ERROR) RNS.log("Output directory not writable", RNS.LOG_ERROR)
exit(4) RNS.exit(4)
else: else:
RNS.log("Output directory not found", RNS.LOG_ERROR) RNS.log("Output directory not found", RNS.LOG_ERROR)
exit(3) RNS.exit(3)
RNS.log("Saving received files in \""+save_path+"\"", RNS.LOG_VERBOSE) RNS.log("Saving received files in \""+save_path+"\"", RNS.LOG_VERBOSE)
@@ -89,7 +89,7 @@ def listen(configdir, verbosity = 0, quietness = 0, allowed = [], display_identi
if display_identity: if display_identity:
print("Identity : "+str(identity)) print("Identity : "+str(identity))
print("Listening on : "+RNS.prettyhexrep(destination.hash)) print("Listening on : "+RNS.prettyhexrep(destination.hash))
exit(0) RNS.exit(0)
if disable_auth: if disable_auth:
allow_all = True allow_all = True
@@ -139,7 +139,7 @@ def listen(configdir, verbosity = 0, quietness = 0, allowed = [], display_identi
raise ValueError("Invalid destination entered. Check your input.") raise ValueError("Invalid destination entered. Check your input.")
except Exception as e: except Exception as e:
print(str(e)) print(str(e))
exit(1) RNS.exit(1)
if len(allowed_identity_hashes) < 1 and not disable_auth: if len(allowed_identity_hashes) < 1 and not disable_auth:
print("Warning: No allowed identities configured, rncp will not accept any files!") print("Warning: No allowed identities configured, rncp will not accept any files!")
@@ -178,7 +178,7 @@ def listen(configdir, verbosity = 0, quietness = 0, allowed = [], display_identi
if filename_len > 0xFFFF: if filename_len > 0xFFFF:
print("Filename exceeds max size, cannot send") print("Filename exceeds max size, cannot send")
exit(1) RNS.exit(1)
temp_file.write(filename_len.to_bytes(2, "big")) temp_file.write(filename_len.to_bytes(2, "big"))
temp_file.write(filename_bytes) temp_file.write(filename_bytes)
@@ -342,10 +342,10 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
save_path = sp save_path = sp
else: else:
RNS.log("Output directory not writable", RNS.LOG_ERROR) RNS.log("Output directory not writable", RNS.LOG_ERROR)
exit(4) RNS.exit(4)
else: else:
RNS.log("Output directory not found", RNS.LOG_ERROR) RNS.log("Output directory not found", RNS.LOG_ERROR)
exit(3) RNS.exit(3)
try: try:
dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2 dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2
@@ -357,7 +357,7 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
raise ValueError("Invalid destination entered. Check your input.") raise ValueError("Invalid destination entered. Check your input.")
except Exception as e: except Exception as e:
print(str(e)) print(str(e))
exit(1) RNS.exit(1)
reticulum = RNS.Reticulum(configdir=configdir, loglevel=targetloglevel) reticulum = RNS.Reticulum(configdir=configdir, loglevel=targetloglevel)
@@ -366,7 +366,7 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
identity = RNS.Identity.from_file(identity_path) identity = RNS.Identity.from_file(identity_path)
if identity == None: if identity == None:
RNS.log("Could not load identity for rncp. The identity file at \""+str(identity_path)+"\" may be corrupt or unreadable.", RNS.LOG_ERROR) RNS.log("Could not load identity for rncp. The identity file at \""+str(identity_path)+"\" may be corrupt or unreadable.", RNS.LOG_ERROR)
exit(2) RNS.exit(2)
else: else:
identity = None identity = None
@@ -398,7 +398,7 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
print("Path not found") print("Path not found")
else: else:
print(f"{erase_str}Path not found") print(f"{erase_str}Path not found")
exit(1) RNS.exit(1)
else: else:
if silent: if silent:
print("Establishing link with "+RNS.prettyhexrep(destination_hash)) print("Establishing link with "+RNS.prettyhexrep(destination_hash))
@@ -427,7 +427,7 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
print("Could not establish link with "+RNS.prettyhexrep(destination_hash)) print("Could not establish link with "+RNS.prettyhexrep(destination_hash))
else: else:
print(f"{erase_str}Could not establish link with "+RNS.prettyhexrep(destination_hash)) print(f"{erase_str}Could not establish link with "+RNS.prettyhexrep(destination_hash))
exit(1) RNS.exit(1)
else: else:
if silent: if silent:
print("Requesting file from remote...") print("Requesting file from remote...")
@@ -518,25 +518,25 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
print("Fetch request failed, fetching the file "+str(file)+" was not allowed by the remote") print("Fetch request failed, fetching the file "+str(file)+" was not allowed by the remote")
link.teardown() link.teardown()
time.sleep(0.15) time.sleep(0.15)
exit(0) RNS.exit(0)
elif request_status == "not_found": elif request_status == "not_found":
if not silent: print(f"{erase_str}", end="") if not silent: print(f"{erase_str}", end="")
print("Fetch request failed, the file "+str(file)+" was not found on the remote") print("Fetch request failed, the file "+str(file)+" was not found on the remote")
link.teardown() link.teardown()
time.sleep(0.15) time.sleep(0.15)
exit(0) RNS.exit(0)
elif request_status == "remote_error": elif request_status == "remote_error":
if not silent: print(f"{erase_str}", end="") if not silent: print(f"{erase_str}", end="")
print("Fetch request failed due to an error on the remote system") print("Fetch request failed due to an error on the remote system")
link.teardown() link.teardown()
time.sleep(0.15) time.sleep(0.15)
exit(0) RNS.exit(0)
elif request_status == "unknown": elif request_status == "unknown":
if not silent: print(f"{erase_str}", end="") if not silent: print(f"{erase_str}", end="")
print("Fetch request failed due to an unknown error (probably not authorised)") print("Fetch request failed due to an unknown error (probably not authorised)")
link.teardown() link.teardown()
time.sleep(0.15) time.sleep(0.15)
exit(0) RNS.exit(0)
elif request_status == "found": elif request_status == "found":
if not silent: print(f"{erase_str}", end="") if not silent: print(f"{erase_str}", end="")
@@ -564,23 +564,22 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
sys.stdout.flush() sys.stdout.flush()
i = (i+1)%len(syms) i = (i+1)%len(syms)
if current_resource.status != RNS.Resource.COMPLETE: if not current_resource or current_resource.status != RNS.Resource.COMPLETE:
if silent: if silent:
print("The transfer failed") print("The transfer failed")
else: else:
print(f"{erase_str}The transfer failed") print(f"{erase_str}The transfer failed")
exit(1) RNS.exit(1)
else: else:
if silent: if silent:
print(str(file)+" fetched from "+RNS.prettyhexrep(destination_hash)) print(str(file)+" fetched from "+RNS.prettyhexrep(destination_hash))
else: else:
print("\n"+str(file)+" fetched from "+RNS.prettyhexrep(destination_hash)) print("\n"+str(file)+" fetched from "+RNS.prettyhexrep(destination_hash))
link.teardown() link.teardown()
time.sleep(0.15) RNS.exit(0)
exit(0)
link.teardown() link.teardown()
exit(0) RNS.exit(0)
def send(configdir, verbosity = 0, quietness = 0, destination = None, file = None, timeout = RNS.Transport.PATH_REQUEST_TIMEOUT, silent=False, phy_rates=False, no_compress=False): def send(configdir, verbosity = 0, quietness = 0, destination = None, file = None, timeout = RNS.Transport.PATH_REQUEST_TIMEOUT, silent=False, phy_rates=False, no_compress=False):
@@ -599,13 +598,13 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
raise ValueError("Invalid destination entered. Check your input.") raise ValueError("Invalid destination entered. Check your input.")
except Exception as e: except Exception as e:
print(str(e)) print(str(e))
exit(1) RNS.exit(1)
file_path = os.path.expanduser(file) file_path = os.path.expanduser(file)
if not os.path.isfile(file_path): if not os.path.isfile(file_path):
print("File not found") print("File not found")
exit(1) RNS.exit(1)
temp_file = TemporaryFile() temp_file = TemporaryFile()
real_file = open(file_path, "rb") real_file = open(file_path, "rb")
@@ -614,7 +613,7 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
if filename_len > 0xFFFF: if filename_len > 0xFFFF:
print("Filename exceeds max size, cannot send") print("Filename exceeds max size, cannot send")
exit(1) RNS.exit(1)
else: else:
print("Preparing file...", end=es) print("Preparing file...", end=es)
@@ -632,7 +631,7 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
identity = RNS.Identity.from_file(identity_path) identity = RNS.Identity.from_file(identity_path)
if identity == None: if identity == None:
RNS.log("Could not load identity for rncp. The identity file at \""+str(identity_path)+"\" may be corrupt or unreadable.", RNS.LOG_ERROR) RNS.log("Could not load identity for rncp. The identity file at \""+str(identity_path)+"\" may be corrupt or unreadable.", RNS.LOG_ERROR)
exit(2) RNS.exit(2)
else: else:
identity = None identity = None
@@ -664,7 +663,7 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
print("Path not found") print("Path not found")
else: else:
print(f"{erase_str}Path not found") print(f"{erase_str}Path not found")
exit(1) RNS.exit(1)
else: else:
if silent: if silent:
print("Establishing link with "+RNS.prettyhexrep(destination_hash)) print("Establishing link with "+RNS.prettyhexrep(destination_hash))
@@ -693,13 +692,13 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
print("Link establishment with "+RNS.prettyhexrep(destination_hash)+" timed out") print("Link establishment with "+RNS.prettyhexrep(destination_hash)+" timed out")
else: else:
print(f"{erase_str}Link establishment with "+RNS.prettyhexrep(destination_hash)+" timed out") print(f"{erase_str}Link establishment with "+RNS.prettyhexrep(destination_hash)+" timed out")
exit(1) RNS.exit(1)
elif not RNS.Transport.has_path(destination_hash): elif not RNS.Transport.has_path(destination_hash):
if silent: if silent:
print("No path found to "+RNS.prettyhexrep(destination_hash)) print("No path found to "+RNS.prettyhexrep(destination_hash))
else: else:
print(f"{erase_str}No path found to "+RNS.prettyhexrep(destination_hash)) print(f"{erase_str}No path found to "+RNS.prettyhexrep(destination_hash))
exit(1) RNS.exit(1)
else: else:
if silent: if silent:
print("Advertising file resource...") print("Advertising file resource...")
@@ -727,7 +726,7 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
print("File was not accepted by "+RNS.prettyhexrep(destination_hash)) print("File was not accepted by "+RNS.prettyhexrep(destination_hash))
else: else:
print(f"{erase_str}File was not accepted by "+RNS.prettyhexrep(destination_hash)) print(f"{erase_str}File was not accepted by "+RNS.prettyhexrep(destination_hash))
exit(1) RNS.exit(1)
else: else:
if silent: if silent:
print("Transferring file...") print("Transferring file...")
@@ -773,7 +772,7 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
print("The transfer failed") print("The transfer failed")
else: else:
print(f"{erase_str}The transfer failed") print(f"{erase_str}The transfer failed")
exit(1) RNS.exit(1)
else: else:
if silent: if silent:
print(str(file_path)+" copied to "+RNS.prettyhexrep(destination_hash)) print(str(file_path)+" copied to "+RNS.prettyhexrep(destination_hash))
@@ -783,7 +782,7 @@ def send(configdir, verbosity = 0, quietness = 0, destination = None, file = Non
time.sleep(0.25) time.sleep(0.25)
real_file.close() real_file.close()
temp_file.close() temp_file.close()
exit(0) RNS.exit(0)
def main(): def main():
try: try:
@@ -868,7 +867,7 @@ def main():
resource.cancel() resource.cancel()
if link != None: if link != None:
link.teardown() link.teardown()
exit() RNS.exit()
def size_str(num, suffix='B'): def size_str(num, suffix='B'):
units = ['','K','M','G','T','P','E','Z'] units = ['','K','M','G','T','P','E','Z']
+1
View File
@@ -286,6 +286,7 @@ def main():
destination = RNS.Destination(identity, RNS.Destination.IN, RNS.Destination.SINGLE, app_name, *aspects) destination = RNS.Destination(identity, RNS.Destination.IN, RNS.Destination.SINGLE, app_name, *aspects)
RNS.log("Created destination "+str(destination)) RNS.log("Created destination "+str(destination))
RNS.log("Announcing destination "+RNS.prettyhexrep(destination.hash)) RNS.log("Announcing destination "+RNS.prettyhexrep(destination.hash))
time.sleep(1.1)
destination.announce() destination.announce()
time.sleep(0.25) time.sleep(0.25)
exit(0) exit(0)
+1 -1
View File
@@ -22,7 +22,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
import RNS from CRNS import RNS
import argparse import argparse
import time import time
+1
View File
@@ -250,6 +250,7 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
if dispall or not ( if dispall or not (
name.startswith("LocalInterface[") or name.startswith("LocalInterface[") or
name.startswith("TCPInterface[Client") or name.startswith("TCPInterface[Client") or
name.startswith("AutoInterfacePeer[") or
name.startswith("I2PInterfacePeer[Connected peer") or name.startswith("I2PInterfacePeer[Connected peer") or
(name.startswith("I2PInterface[") and ("i2p_connectable" in ifstat and ifstat["i2p_connectable"] == False)) (name.startswith("I2PInterface[") and ("i2p_connectable" in ifstat and ifstat["i2p_connectable"] == False))
): ):
+27 -15
View File
@@ -49,6 +49,11 @@ pyc_modules = glob.glob(os.path.dirname(__file__)+"/*.pyc")
modules = py_modules+pyc_modules modules = py_modules+pyc_modules
__all__ = list(set([os.path.basename(f).replace(".pyc", "").replace(".py", "") for f in modules if not (f.endswith("__init__.py") or f.endswith("__init__.pyc"))])) __all__ = list(set([os.path.basename(f).replace(".pyc", "").replace(".py", "") for f in modules if not (f.endswith("__init__.py") or f.endswith("__init__.pyc"))]))
import importlib
if importlib.util.find_spec("cython"): import cython; compiled = cython.compiled
else: compiled = False
LOG_NONE = -1
LOG_CRITICAL = 0 LOG_CRITICAL = 0
LOG_ERROR = 1 LOG_ERROR = 1
LOG_WARNING = 2 LOG_WARNING = 2
@@ -81,21 +86,21 @@ logging_lock = threading.Lock()
def loglevelname(level): def loglevelname(level):
if (level == LOG_CRITICAL): if (level == LOG_CRITICAL):
return "Critical" return "[Critical]"
if (level == LOG_ERROR): if (level == LOG_ERROR):
return "Error" return "[Error] "
if (level == LOG_WARNING): if (level == LOG_WARNING):
return "Warning" return "[Warning] "
if (level == LOG_NOTICE): if (level == LOG_NOTICE):
return "Notice" return "[Notice] "
if (level == LOG_INFO): if (level == LOG_INFO):
return "Info" return "[Info] "
if (level == LOG_VERBOSE): if (level == LOG_VERBOSE):
return "Verbose" return "[Verbose] "
if (level == LOG_DEBUG): if (level == LOG_DEBUG):
return "Debug" return "[Debug] "
if (level == LOG_EXTREME): if (level == LOG_EXTREME):
return "Extra" return "[Extra] "
return "Unknown" return "Unknown"
@@ -114,20 +119,22 @@ def precise_timestamp_str(time_s):
return datetime.datetime.now().strftime(logtimefmt_p)[:-3] return datetime.datetime.now().strftime(logtimefmt_p)[:-3]
def log(msg, level=3, _override_destination = False, pt=False): def log(msg, level=3, _override_destination = False, pt=False):
if loglevel == LOG_NONE: return
global _always_override_destination, compact_log_fmt global _always_override_destination, compact_log_fmt
msg = str(msg) msg = str(msg)
if loglevel >= level: if loglevel >= level:
if pt: if pt:
logstring = "["+precise_timestamp_str(time.time())+"] ["+loglevelname(level)+"] "+msg logstring = "["+precise_timestamp_str(time.time())+"] "+loglevelname(level)+" "+msg
else: else:
if not compact_log_fmt: if not compact_log_fmt:
logstring = "["+timestamp_str(time.time())+"] ["+loglevelname(level)+"] "+msg logstring = "["+timestamp_str(time.time())+"] "+loglevelname(level)+" "+msg
else: else:
logstring = "["+timestamp_str(time.time())+"] "+msg logstring = "["+timestamp_str(time.time())+" "+msg
with logging_lock: with logging_lock:
if (logdest == LOG_STDOUT or _always_override_destination or _override_destination): if (logdest == LOG_STDOUT or _always_override_destination or _override_destination):
print(logstring) if not threading.main_thread().is_alive(): return
else: print(logstring)
elif (logdest == LOG_FILE and logfile != None): elif (logdest == LOG_FILE and logfile != None):
try: try:
@@ -361,9 +368,14 @@ def phyparams():
def panic(): def panic():
os._exit(255) os._exit(255)
def exit(): exit_called = False
print("") def exit(code=0):
sys.exit(0) global exit_called
if not exit_called:
exit_called = True
print("")
Reticulum.exit_handler()
os._exit(code)
class Profiler: class Profiler:
_ran = False _ran = False
+1 -1
View File
@@ -1 +1 @@
__version__ = "0.9.0" __version__ = "0.9.3"
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,4 +1,4 @@
# Sphinx build info version 1 # Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e0cd5c3608b12712050d5c10fe86c594 config: 857be082cc412e043588c25a931b65f2
tags: 645f666f9bcd5a90fca523b33c5a78b7 tags: 645f666f9bcd5a90fca523b33c5a78b7
+1 -1
View File
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.9.0 beta', VERSION: '0.9.3 beta',
LANGUAGE: 'en', LANGUAGE: 'en',
COLLAPSE_INDEX: false, COLLAPSE_INDEX: false,
BUILDER: 'html', BUILDER: 'html',
+230 -230
View File
@@ -5,83 +5,83 @@
.highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc } .highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; } .highlight { background: #f8f8f8; }
.highlight .c { color: #8f5902; font-style: italic } /* Comment */ .highlight .c { color: #8F5902; font-style: italic } /* Comment */
.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ .highlight .err { color: #A40000; border: 1px solid #EF2929 } /* Error */
.highlight .g { color: #000000 } /* Generic */ .highlight .g { color: #000 } /* Generic */
.highlight .k { color: #204a87; font-weight: bold } /* Keyword */ .highlight .k { color: #204A87; font-weight: bold } /* Keyword */
.highlight .l { color: #000000 } /* Literal */ .highlight .l { color: #000 } /* Literal */
.highlight .n { color: #000000 } /* Name */ .highlight .n { color: #000 } /* Name */
.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ .highlight .o { color: #CE5C00; font-weight: bold } /* Operator */
.highlight .x { color: #000000 } /* Other */ .highlight .x { color: #000 } /* Other */
.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ .highlight .p { color: #000; font-weight: bold } /* Punctuation */
.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ .highlight .ch { color: #8F5902; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ .highlight .cm { color: #8F5902; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ .highlight .cp { color: #8F5902; font-style: italic } /* Comment.Preproc */
.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ .highlight .cpf { color: #8F5902; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ .highlight .c1 { color: #8F5902; font-style: italic } /* Comment.Single */
.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ .highlight .cs { color: #8F5902; font-style: italic } /* Comment.Special */
.highlight .gd { color: #a40000 } /* Generic.Deleted */ .highlight .gd { color: #A40000 } /* Generic.Deleted */
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ .highlight .ge { color: #000; font-style: italic } /* Generic.Emph */
.highlight .ges { color: #000000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .ges { color: #000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #ef2929 } /* Generic.Error */ .highlight .gr { color: #EF2929 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */ .highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #000000; font-style: italic } /* Generic.Output */ .highlight .go { color: #000; font-style: italic } /* Generic.Output */
.highlight .gp { color: #8f5902 } /* Generic.Prompt */ .highlight .gp { color: #8F5902 } /* Generic.Prompt */
.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ .highlight .gs { color: #000; font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ .highlight .gt { color: #A40000; font-weight: bold } /* Generic.Traceback */
.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ .highlight .kc { color: #204A87; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ .highlight .kd { color: #204A87; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ .highlight .kn { color: #204A87; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ .highlight .kp { color: #204A87; font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ .highlight .kr { color: #204A87; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ .highlight .kt { color: #204A87; font-weight: bold } /* Keyword.Type */
.highlight .ld { color: #000000 } /* Literal.Date */ .highlight .ld { color: #000 } /* Literal.Date */
.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ .highlight .m { color: #0000CF; font-weight: bold } /* Literal.Number */
.highlight .s { color: #4e9a06 } /* Literal.String */ .highlight .s { color: #4E9A06 } /* Literal.String */
.highlight .na { color: #c4a000 } /* Name.Attribute */ .highlight .na { color: #C4A000 } /* Name.Attribute */
.highlight .nb { color: #204a87 } /* Name.Builtin */ .highlight .nb { color: #204A87 } /* Name.Builtin */
.highlight .nc { color: #000000 } /* Name.Class */ .highlight .nc { color: #000 } /* Name.Class */
.highlight .no { color: #000000 } /* Name.Constant */ .highlight .no { color: #000 } /* Name.Constant */
.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ .highlight .nd { color: #5C35CC; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #ce5c00 } /* Name.Entity */ .highlight .ni { color: #CE5C00 } /* Name.Entity */
.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ .highlight .ne { color: #C00; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #000000 } /* Name.Function */ .highlight .nf { color: #000 } /* Name.Function */
.highlight .nl { color: #f57900 } /* Name.Label */ .highlight .nl { color: #F57900 } /* Name.Label */
.highlight .nn { color: #000000 } /* Name.Namespace */ .highlight .nn { color: #000 } /* Name.Namespace */
.highlight .nx { color: #000000 } /* Name.Other */ .highlight .nx { color: #000 } /* Name.Other */
.highlight .py { color: #000000 } /* Name.Property */ .highlight .py { color: #000 } /* Name.Property */
.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ .highlight .nt { color: #204A87; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #000000 } /* Name.Variable */ .highlight .nv { color: #000 } /* Name.Variable */
.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ .highlight .ow { color: #204A87; font-weight: bold } /* Operator.Word */
.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ .highlight .pm { color: #000; font-weight: bold } /* Punctuation.Marker */
.highlight .w { color: #f8f8f8 } /* Text.Whitespace */ .highlight .w { color: #F8F8F8 } /* Text.Whitespace */
.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ .highlight .mb { color: #0000CF; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ .highlight .mf { color: #0000CF; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ .highlight .mh { color: #0000CF; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ .highlight .mi { color: #0000CF; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ .highlight .mo { color: #0000CF; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ .highlight .sa { color: #4E9A06 } /* Literal.String.Affix */
.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ .highlight .sb { color: #4E9A06 } /* Literal.String.Backtick */
.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ .highlight .sc { color: #4E9A06 } /* Literal.String.Char */
.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ .highlight .dl { color: #4E9A06 } /* Literal.String.Delimiter */
.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ .highlight .sd { color: #8F5902; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ .highlight .s2 { color: #4E9A06 } /* Literal.String.Double */
.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ .highlight .se { color: #4E9A06 } /* Literal.String.Escape */
.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ .highlight .sh { color: #4E9A06 } /* Literal.String.Heredoc */
.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ .highlight .si { color: #4E9A06 } /* Literal.String.Interpol */
.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ .highlight .sx { color: #4E9A06 } /* Literal.String.Other */
.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ .highlight .sr { color: #4E9A06 } /* Literal.String.Regex */
.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ .highlight .s1 { color: #4E9A06 } /* Literal.String.Single */
.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ .highlight .ss { color: #4E9A06 } /* Literal.String.Symbol */
.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ .highlight .bp { color: #3465A4 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #000000 } /* Name.Function.Magic */ .highlight .fm { color: #000 } /* Name.Function.Magic */
.highlight .vc { color: #000000 } /* Name.Variable.Class */ .highlight .vc { color: #000 } /* Name.Variable.Class */
.highlight .vg { color: #000000 } /* Name.Variable.Global */ .highlight .vg { color: #000 } /* Name.Variable.Global */
.highlight .vi { color: #000000 } /* Name.Variable.Instance */ .highlight .vi { color: #000 } /* Name.Variable.Instance */
.highlight .vm { color: #000000 } /* Name.Variable.Magic */ .highlight .vm { color: #000 } /* Name.Variable.Magic */
.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ .highlight .il { color: #0000CF; font-weight: bold } /* Literal.Number.Integer.Long */
@media not print { @media not print {
body[data-theme="dark"] .highlight pre { line-height: 125%; } body[data-theme="dark"] .highlight pre { line-height: 125%; }
body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
@@ -89,85 +89,85 @@ body[data-theme="dark"] .highlight span.linenos { color: #aaaaaa; background-col
body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
body[data-theme="dark"] .highlight .hll { background-color: #404040 } body[data-theme="dark"] .highlight .hll { background-color: #404040 }
body[data-theme="dark"] .highlight { background: #202020; color: #d0d0d0 } body[data-theme="dark"] .highlight { background: #202020; color: #D0D0D0 }
body[data-theme="dark"] .highlight .c { color: #ababab; font-style: italic } /* Comment */ body[data-theme="dark"] .highlight .c { color: #ABABAB; font-style: italic } /* Comment */
body[data-theme="dark"] .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ body[data-theme="dark"] .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */
body[data-theme="dark"] .highlight .esc { color: #d0d0d0 } /* Escape */ body[data-theme="dark"] .highlight .esc { color: #D0D0D0 } /* Escape */
body[data-theme="dark"] .highlight .g { color: #d0d0d0 } /* Generic */ body[data-theme="dark"] .highlight .g { color: #D0D0D0 } /* Generic */
body[data-theme="dark"] .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */ body[data-theme="dark"] .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */
body[data-theme="dark"] .highlight .l { color: #d0d0d0 } /* Literal */ body[data-theme="dark"] .highlight .l { color: #D0D0D0 } /* Literal */
body[data-theme="dark"] .highlight .n { color: #d0d0d0 } /* Name */ body[data-theme="dark"] .highlight .n { color: #D0D0D0 } /* Name */
body[data-theme="dark"] .highlight .o { color: #d0d0d0 } /* Operator */ body[data-theme="dark"] .highlight .o { color: #D0D0D0 } /* Operator */
body[data-theme="dark"] .highlight .x { color: #d0d0d0 } /* Other */ body[data-theme="dark"] .highlight .x { color: #D0D0D0 } /* Other */
body[data-theme="dark"] .highlight .p { color: #d0d0d0 } /* Punctuation */ body[data-theme="dark"] .highlight .p { color: #D0D0D0 } /* Punctuation */
body[data-theme="dark"] .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */ body[data-theme="dark"] .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */
body[data-theme="dark"] .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */ body[data-theme="dark"] .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */
body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* Comment.Preproc */ body[data-theme="dark"] .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */
body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */
body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */
body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ body[data-theme="dark"] .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .gd { color: #FF3A3A } /* Generic.Deleted */
body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body[data-theme="dark"] .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */
body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ body[data-theme="dark"] .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gr { color: #FF3A3A } /* Generic.Error */
body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */
body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */
body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .go { color: #CCC } /* Generic.Output */
body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gp { color: #AAA } /* Generic.Prompt */
body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */
body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ body[data-theme="dark"] .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */
body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .gt { color: #FF3A3A } /* Generic.Traceback */
body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */
body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */
body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ body[data-theme="dark"] .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */
body[data-theme="dark"] .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */ body[data-theme="dark"] .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */
body[data-theme="dark"] .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */ body[data-theme="dark"] .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */
body[data-theme="dark"] .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */ body[data-theme="dark"] .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */
body[data-theme="dark"] .highlight .ld { color: #d0d0d0 } /* Literal.Date */ body[data-theme="dark"] .highlight .ld { color: #D0D0D0 } /* Literal.Date */
body[data-theme="dark"] .highlight .m { color: #51b2fd } /* Literal.Number */ body[data-theme="dark"] .highlight .m { color: #51B2FD } /* Literal.Number */
body[data-theme="dark"] .highlight .s { color: #ed9d13 } /* Literal.String */ body[data-theme="dark"] .highlight .s { color: #ED9D13 } /* Literal.String */
body[data-theme="dark"] .highlight .na { color: #bbbbbb } /* Name.Attribute */ body[data-theme="dark"] .highlight .na { color: #BBB } /* Name.Attribute */
body[data-theme="dark"] .highlight .nb { color: #2fbccd } /* Name.Builtin */ body[data-theme="dark"] .highlight .nb { color: #2FBCCD } /* Name.Builtin */
body[data-theme="dark"] .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */ body[data-theme="dark"] .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */
body[data-theme="dark"] .highlight .no { color: #40ffff } /* Name.Constant */ body[data-theme="dark"] .highlight .no { color: #40FFFF } /* Name.Constant */
body[data-theme="dark"] .highlight .nd { color: #ffa500 } /* Name.Decorator */ body[data-theme="dark"] .highlight .nd { color: #FFA500 } /* Name.Decorator */
body[data-theme="dark"] .highlight .ni { color: #d0d0d0 } /* Name.Entity */ body[data-theme="dark"] .highlight .ni { color: #D0D0D0 } /* Name.Entity */
body[data-theme="dark"] .highlight .ne { color: #bbbbbb } /* Name.Exception */ body[data-theme="dark"] .highlight .ne { color: #BBB } /* Name.Exception */
body[data-theme="dark"] .highlight .nf { color: #71adff } /* Name.Function */ body[data-theme="dark"] .highlight .nf { color: #71ADFF } /* Name.Function */
body[data-theme="dark"] .highlight .nl { color: #d0d0d0 } /* Name.Label */ body[data-theme="dark"] .highlight .nl { color: #D0D0D0 } /* Name.Label */
body[data-theme="dark"] .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */ body[data-theme="dark"] .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */
body[data-theme="dark"] .highlight .nx { color: #d0d0d0 } /* Name.Other */ body[data-theme="dark"] .highlight .nx { color: #D0D0D0 } /* Name.Other */
body[data-theme="dark"] .highlight .py { color: #d0d0d0 } /* Name.Property */ body[data-theme="dark"] .highlight .py { color: #D0D0D0 } /* Name.Property */
body[data-theme="dark"] .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ body[data-theme="dark"] .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */
body[data-theme="dark"] .highlight .nv { color: #40ffff } /* Name.Variable */ body[data-theme="dark"] .highlight .nv { color: #40FFFF } /* Name.Variable */
body[data-theme="dark"] .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ body[data-theme="dark"] .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */
body[data-theme="dark"] .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ body[data-theme="dark"] .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */
body[data-theme="dark"] .highlight .w { color: #666666 } /* Text.Whitespace */ body[data-theme="dark"] .highlight .w { color: #666 } /* Text.Whitespace */
body[data-theme="dark"] .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ body[data-theme="dark"] .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */
body[data-theme="dark"] .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ body[data-theme="dark"] .highlight .mf { color: #51B2FD } /* Literal.Number.Float */
body[data-theme="dark"] .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */ body[data-theme="dark"] .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */
body[data-theme="dark"] .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */ body[data-theme="dark"] .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */
body[data-theme="dark"] .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */ body[data-theme="dark"] .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */
body[data-theme="dark"] .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ body[data-theme="dark"] .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */
body[data-theme="dark"] .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ body[data-theme="dark"] .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */
body[data-theme="dark"] .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ body[data-theme="dark"] .highlight .sc { color: #ED9D13 } /* Literal.String.Char */
body[data-theme="dark"] .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ body[data-theme="dark"] .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */
body[data-theme="dark"] .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ body[data-theme="dark"] .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */
body[data-theme="dark"] .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ body[data-theme="dark"] .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */
body[data-theme="dark"] .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ body[data-theme="dark"] .highlight .se { color: #ED9D13 } /* Literal.String.Escape */
body[data-theme="dark"] .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ body[data-theme="dark"] .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */
body[data-theme="dark"] .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ body[data-theme="dark"] .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */
body[data-theme="dark"] .highlight .sx { color: #ffa500 } /* Literal.String.Other */ body[data-theme="dark"] .highlight .sx { color: #FFA500 } /* Literal.String.Other */
body[data-theme="dark"] .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ body[data-theme="dark"] .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */
body[data-theme="dark"] .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ body[data-theme="dark"] .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */
body[data-theme="dark"] .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ body[data-theme="dark"] .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */
body[data-theme="dark"] .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */ body[data-theme="dark"] .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */
body[data-theme="dark"] .highlight .fm { color: #71adff } /* Name.Function.Magic */ body[data-theme="dark"] .highlight .fm { color: #71ADFF } /* Name.Function.Magic */
body[data-theme="dark"] .highlight .vc { color: #40ffff } /* Name.Variable.Class */ body[data-theme="dark"] .highlight .vc { color: #40FFFF } /* Name.Variable.Class */
body[data-theme="dark"] .highlight .vg { color: #40ffff } /* Name.Variable.Global */ body[data-theme="dark"] .highlight .vg { color: #40FFFF } /* Name.Variable.Global */
body[data-theme="dark"] .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ body[data-theme="dark"] .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */
body[data-theme="dark"] .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ body[data-theme="dark"] .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */
body[data-theme="dark"] .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */ body[data-theme="dark"] .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) .highlight pre { line-height: 125%; } body:not([data-theme="light"]) .highlight pre { line-height: 125%; }
body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
@@ -175,84 +175,84 @@ body:not([data-theme="light"]) .highlight span.linenos { color: #aaaaaa; backgro
body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
body:not([data-theme="light"]) .highlight .hll { background-color: #404040 } body:not([data-theme="light"]) .highlight .hll { background-color: #404040 }
body:not([data-theme="light"]) .highlight { background: #202020; color: #d0d0d0 } body:not([data-theme="light"]) .highlight { background: #202020; color: #D0D0D0 }
body:not([data-theme="light"]) .highlight .c { color: #ababab; font-style: italic } /* Comment */ body:not([data-theme="light"]) .highlight .c { color: #ABABAB; font-style: italic } /* Comment */
body:not([data-theme="light"]) .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ body:not([data-theme="light"]) .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */
body:not([data-theme="light"]) .highlight .esc { color: #d0d0d0 } /* Escape */ body:not([data-theme="light"]) .highlight .esc { color: #D0D0D0 } /* Escape */
body:not([data-theme="light"]) .highlight .g { color: #d0d0d0 } /* Generic */ body:not([data-theme="light"]) .highlight .g { color: #D0D0D0 } /* Generic */
body:not([data-theme="light"]) .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */ body:not([data-theme="light"]) .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */
body:not([data-theme="light"]) .highlight .l { color: #d0d0d0 } /* Literal */ body:not([data-theme="light"]) .highlight .l { color: #D0D0D0 } /* Literal */
body:not([data-theme="light"]) .highlight .n { color: #d0d0d0 } /* Name */ body:not([data-theme="light"]) .highlight .n { color: #D0D0D0 } /* Name */
body:not([data-theme="light"]) .highlight .o { color: #d0d0d0 } /* Operator */ body:not([data-theme="light"]) .highlight .o { color: #D0D0D0 } /* Operator */
body:not([data-theme="light"]) .highlight .x { color: #d0d0d0 } /* Other */ body:not([data-theme="light"]) .highlight .x { color: #D0D0D0 } /* Other */
body:not([data-theme="light"]) .highlight .p { color: #d0d0d0 } /* Punctuation */ body:not([data-theme="light"]) .highlight .p { color: #D0D0D0 } /* Punctuation */
body:not([data-theme="light"]) .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */ body:not([data-theme="light"]) .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */
body:not([data-theme="light"]) .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */ body:not([data-theme="light"]) .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */
body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bold } /* Comment.Preproc */ body:not([data-theme="light"]) .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */
body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */
body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */
body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ body:not([data-theme="light"]) .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .gd { color: #FF3A3A } /* Generic.Deleted */
body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ body:not([data-theme="light"]) .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */
body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ body:not([data-theme="light"]) .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gr { color: #FF3A3A } /* Generic.Error */
body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */
body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */
body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .go { color: #CCC } /* Generic.Output */
body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gp { color: #AAA } /* Generic.Prompt */
body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */
body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ body:not([data-theme="light"]) .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */
body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .gt { color: #FF3A3A } /* Generic.Traceback */
body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */
body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */
body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ body:not([data-theme="light"]) .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */
body:not([data-theme="light"]) .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */ body:not([data-theme="light"]) .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */
body:not([data-theme="light"]) .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */ body:not([data-theme="light"]) .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */
body:not([data-theme="light"]) .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */ body:not([data-theme="light"]) .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */
body:not([data-theme="light"]) .highlight .ld { color: #d0d0d0 } /* Literal.Date */ body:not([data-theme="light"]) .highlight .ld { color: #D0D0D0 } /* Literal.Date */
body:not([data-theme="light"]) .highlight .m { color: #51b2fd } /* Literal.Number */ body:not([data-theme="light"]) .highlight .m { color: #51B2FD } /* Literal.Number */
body:not([data-theme="light"]) .highlight .s { color: #ed9d13 } /* Literal.String */ body:not([data-theme="light"]) .highlight .s { color: #ED9D13 } /* Literal.String */
body:not([data-theme="light"]) .highlight .na { color: #bbbbbb } /* Name.Attribute */ body:not([data-theme="light"]) .highlight .na { color: #BBB } /* Name.Attribute */
body:not([data-theme="light"]) .highlight .nb { color: #2fbccd } /* Name.Builtin */ body:not([data-theme="light"]) .highlight .nb { color: #2FBCCD } /* Name.Builtin */
body:not([data-theme="light"]) .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */ body:not([data-theme="light"]) .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */
body:not([data-theme="light"]) .highlight .no { color: #40ffff } /* Name.Constant */ body:not([data-theme="light"]) .highlight .no { color: #40FFFF } /* Name.Constant */
body:not([data-theme="light"]) .highlight .nd { color: #ffa500 } /* Name.Decorator */ body:not([data-theme="light"]) .highlight .nd { color: #FFA500 } /* Name.Decorator */
body:not([data-theme="light"]) .highlight .ni { color: #d0d0d0 } /* Name.Entity */ body:not([data-theme="light"]) .highlight .ni { color: #D0D0D0 } /* Name.Entity */
body:not([data-theme="light"]) .highlight .ne { color: #bbbbbb } /* Name.Exception */ body:not([data-theme="light"]) .highlight .ne { color: #BBB } /* Name.Exception */
body:not([data-theme="light"]) .highlight .nf { color: #71adff } /* Name.Function */ body:not([data-theme="light"]) .highlight .nf { color: #71ADFF } /* Name.Function */
body:not([data-theme="light"]) .highlight .nl { color: #d0d0d0 } /* Name.Label */ body:not([data-theme="light"]) .highlight .nl { color: #D0D0D0 } /* Name.Label */
body:not([data-theme="light"]) .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */ body:not([data-theme="light"]) .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */
body:not([data-theme="light"]) .highlight .nx { color: #d0d0d0 } /* Name.Other */ body:not([data-theme="light"]) .highlight .nx { color: #D0D0D0 } /* Name.Other */
body:not([data-theme="light"]) .highlight .py { color: #d0d0d0 } /* Name.Property */ body:not([data-theme="light"]) .highlight .py { color: #D0D0D0 } /* Name.Property */
body:not([data-theme="light"]) .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ body:not([data-theme="light"]) .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */
body:not([data-theme="light"]) .highlight .nv { color: #40ffff } /* Name.Variable */ body:not([data-theme="light"]) .highlight .nv { color: #40FFFF } /* Name.Variable */
body:not([data-theme="light"]) .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ body:not([data-theme="light"]) .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */
body:not([data-theme="light"]) .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ body:not([data-theme="light"]) .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */
body:not([data-theme="light"]) .highlight .w { color: #666666 } /* Text.Whitespace */ body:not([data-theme="light"]) .highlight .w { color: #666 } /* Text.Whitespace */
body:not([data-theme="light"]) .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ body:not([data-theme="light"]) .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */
body:not([data-theme="light"]) .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ body:not([data-theme="light"]) .highlight .mf { color: #51B2FD } /* Literal.Number.Float */
body:not([data-theme="light"]) .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */ body:not([data-theme="light"]) .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */
body:not([data-theme="light"]) .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */ body:not([data-theme="light"]) .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */
body:not([data-theme="light"]) .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */ body:not([data-theme="light"]) .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */
body:not([data-theme="light"]) .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ body:not([data-theme="light"]) .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */
body:not([data-theme="light"]) .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ body:not([data-theme="light"]) .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */
body:not([data-theme="light"]) .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ body:not([data-theme="light"]) .highlight .sc { color: #ED9D13 } /* Literal.String.Char */
body:not([data-theme="light"]) .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ body:not([data-theme="light"]) .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */
body:not([data-theme="light"]) .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ body:not([data-theme="light"]) .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */
body:not([data-theme="light"]) .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ body:not([data-theme="light"]) .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */
body:not([data-theme="light"]) .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ body:not([data-theme="light"]) .highlight .se { color: #ED9D13 } /* Literal.String.Escape */
body:not([data-theme="light"]) .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ body:not([data-theme="light"]) .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */
body:not([data-theme="light"]) .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ body:not([data-theme="light"]) .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */
body:not([data-theme="light"]) .highlight .sx { color: #ffa500 } /* Literal.String.Other */ body:not([data-theme="light"]) .highlight .sx { color: #FFA500 } /* Literal.String.Other */
body:not([data-theme="light"]) .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ body:not([data-theme="light"]) .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */
body:not([data-theme="light"]) .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ body:not([data-theme="light"]) .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */
body:not([data-theme="light"]) .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ body:not([data-theme="light"]) .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */
body:not([data-theme="light"]) .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */ body:not([data-theme="light"]) .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */
body:not([data-theme="light"]) .highlight .fm { color: #71adff } /* Name.Function.Magic */ body:not([data-theme="light"]) .highlight .fm { color: #71ADFF } /* Name.Function.Magic */
body:not([data-theme="light"]) .highlight .vc { color: #40ffff } /* Name.Variable.Class */ body:not([data-theme="light"]) .highlight .vc { color: #40FFFF } /* Name.Variable.Class */
body:not([data-theme="light"]) .highlight .vg { color: #40ffff } /* Name.Variable.Global */ body:not([data-theme="light"]) .highlight .vg { color: #40FFFF } /* Name.Variable.Global */
body:not([data-theme="light"]) .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ body:not([data-theme="light"]) .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */
body:not([data-theme="light"]) .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ body:not([data-theme="light"]) .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */
body:not([data-theme="light"]) .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */ body:not([data-theme="light"]) .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */
} }
} }
+193 -196
View File
File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>An Explanation of Reticulum for Human Beings - Reticulum Network Stack 0.9.0 beta documentation</title> <title>An Explanation of Reticulum for Human Beings - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+11 -5
View File
@@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#" /><link rel="search" title="Search" href="search.html" /> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#" /><link rel="search" title="Search" href="search.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/><title>Index - Reticulum Network Stack 0.9.0 beta documentation</title> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/><title>Index - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -139,7 +139,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -165,7 +165,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -381,10 +381,16 @@
<li><a href="reference.html#RNS.Resource.get_data_size">get_data_size() (RNS.Resource method)</a> <li><a href="reference.html#RNS.Resource.get_data_size">get_data_size() (RNS.Resource method)</a>
</li> </li>
<li><a href="reference.html#RNS.Link.get_establishment_rate">get_establishment_rate() (RNS.Link method)</a> <li><a href="reference.html#RNS.Link.get_establishment_rate">get_establishment_rate() (RNS.Link method)</a>
</li>
<li><a href="reference.html#RNS.Link.get_expected_rate">get_expected_rate() (RNS.Link method)</a>
</li> </li>
<li><a href="reference.html#RNS.Resource.get_hash">get_hash() (RNS.Resource method)</a> <li><a href="reference.html#RNS.Resource.get_hash">get_hash() (RNS.Resource method)</a>
</li> </li>
<li><a href="reference.html#RNS.Reticulum.get_instance">get_instance() (RNS.Reticulum static method)</a> <li><a href="reference.html#RNS.Reticulum.get_instance">get_instance() (RNS.Reticulum static method)</a>
</li>
<li><a href="reference.html#RNS.Link.get_mdu">get_mdu() (RNS.Link method)</a>
</li>
<li><a href="reference.html#RNS.Link.get_mtu">get_mtu() (RNS.Link method)</a>
</li> </li>
<li><a href="reference.html#RNS.Resource.get_parts">get_parts() (RNS.Resource method)</a> <li><a href="reference.html#RNS.Resource.get_parts">get_parts() (RNS.Resource method)</a>
</li> </li>
@@ -402,14 +408,14 @@
</ul></li> </ul></li>
<li><a href="reference.html#RNS.Identity.get_public_key">get_public_key() (RNS.Identity method)</a> <li><a href="reference.html#RNS.Identity.get_public_key">get_public_key() (RNS.Identity method)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#RNS.Link.get_q">get_q() (RNS.Link method)</a> <li><a href="reference.html#RNS.Link.get_q">get_q() (RNS.Link method)</a>
<ul> <ul>
<li><a href="reference.html#RNS.Packet.get_q">(RNS.Packet method)</a> <li><a href="reference.html#RNS.Packet.get_q">(RNS.Packet method)</a>
</li> </li>
</ul></li> </ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#RNS.Identity.get_random_hash">get_random_hash() (RNS.Identity static method)</a> <li><a href="reference.html#RNS.Identity.get_random_hash">get_random_hash() (RNS.Identity static method)</a>
</li> </li>
<li><a href="reference.html#RNS.Link.get_remote_identity">get_remote_identity() (RNS.Link method)</a> <li><a href="reference.html#RNS.Link.get_remote_identity">get_remote_identity() (RNS.Link method)</a>
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Using Reticulum on Your System" href="using.html" /><link rel="prev" title="What is Reticulum?" href="whatis.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Using Reticulum on Your System" href="using.html" /><link rel="prev" title="What is Reticulum?" href="whatis.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>Getting Started Fast - Reticulum Network Stack 0.9.0 beta documentation</title> <title>Getting Started Fast - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Configuring Interfaces" href="interfaces.html" /><link rel="prev" title="Understanding Reticulum" href="understanding.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Configuring Interfaces" href="interfaces.html" /><link rel="prev" title="Understanding Reticulum" href="understanding.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>Communications Hardware - Reticulum Network Stack 0.9.0 beta documentation</title> <title>Communications Hardware - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="What is Reticulum?" href="whatis.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="What is Reticulum?" href="whatis.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>Reticulum Network Stack 0.9.0 beta documentation</title> <title>Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="#"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="#"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Building Networks" href="networks.html" /><link rel="prev" title="Communications Hardware" href="hardware.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Building Networks" href="networks.html" /><link rel="prev" title="Communications Hardware" href="hardware.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>Configuring Interfaces - Reticulum Network Stack 0.9.0 beta documentation</title> <title>Configuring Interfaces - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Code Examples" href="examples.html" /><link rel="prev" title="Configuring Interfaces" href="interfaces.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Code Examples" href="examples.html" /><link rel="prev" title="Configuring Interfaces" href="interfaces.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>Building Networks - Reticulum Network Stack 0.9.0 beta documentation</title> <title>Building Networks - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
Binary file not shown.
+37 -4
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="prev" title="Support Reticulum" href="support.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="prev" title="Support Reticulum" href="support.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>API Reference - Reticulum Network Stack 0.9.0 beta documentation</title> <title>API Reference - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
@@ -263,7 +263,7 @@ the default value.</p>
<dl class="py attribute"> <dl class="py attribute">
<dt class="sig sig-object py" id="RNS.Reticulum.LINK_MTU_DISCOVERY"> <dt class="sig sig-object py" id="RNS.Reticulum.LINK_MTU_DISCOVERY">
<span class="sig-name descname"><span class="pre">LINK_MTU_DISCOVERY</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#RNS.Reticulum.LINK_MTU_DISCOVERY" title="Permalink to this definition">#</a></dt> <span class="sig-name descname"><span class="pre">LINK_MTU_DISCOVERY</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#RNS.Reticulum.LINK_MTU_DISCOVERY" title="Permalink to this definition">#</a></dt>
<dd><p>Whether automatic link MTU discovery is enabled by default in this <dd><p>Whether automatic link MTU discovery is enabled by default in this
release. Link MTU discovery significantly increases throughput over release. Link MTU discovery significantly increases throughput over
fast links, but requires all intermediary hops to also support it. fast links, but requires all intermediary hops to also support it.
@@ -1294,6 +1294,36 @@ statistics, you will be able to retrieve stats such as <em>RSSI</em>, <em>SNR</e
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="RNS.Link.get_mtu">
<span class="sig-name descname"><span class="pre">get_mtu</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Link.get_mtu" title="Permalink to this definition">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The MTU of an established link.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="RNS.Link.get_mdu">
<span class="sig-name descname"><span class="pre">get_mdu</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Link.get_mdu" title="Permalink to this definition">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The packet MDU of an established link.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="RNS.Link.get_expected_rate">
<span class="sig-name descname"><span class="pre">get_expected_rate</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Link.get_expected_rate" title="Permalink to this definition">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The packet expected in-flight data rate of an established link.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method"> <dl class="py method">
<dt class="sig sig-object py" id="RNS.Link.get_age"> <dt class="sig sig-object py" id="RNS.Link.get_age">
<span class="sig-name descname"><span class="pre">get_age</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Link.get_age" title="Permalink to this definition">#</a></dt> <span class="sig-name descname"><span class="pre">get_age</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Link.get_age" title="Permalink to this definition">#</a></dt>
@@ -2206,6 +2236,9 @@ will announce it.</p>
<li><a class="reference internal" href="#RNS.Link.get_snr"><code class="docutils literal notranslate"><span class="pre">get_snr()</span></code></a></li> <li><a class="reference internal" href="#RNS.Link.get_snr"><code class="docutils literal notranslate"><span class="pre">get_snr()</span></code></a></li>
<li><a class="reference internal" href="#RNS.Link.get_q"><code class="docutils literal notranslate"><span class="pre">get_q()</span></code></a></li> <li><a class="reference internal" href="#RNS.Link.get_q"><code class="docutils literal notranslate"><span class="pre">get_q()</span></code></a></li>
<li><a class="reference internal" href="#RNS.Link.get_establishment_rate"><code class="docutils literal notranslate"><span class="pre">get_establishment_rate()</span></code></a></li> <li><a class="reference internal" href="#RNS.Link.get_establishment_rate"><code class="docutils literal notranslate"><span class="pre">get_establishment_rate()</span></code></a></li>
<li><a class="reference internal" href="#RNS.Link.get_mtu"><code class="docutils literal notranslate"><span class="pre">get_mtu()</span></code></a></li>
<li><a class="reference internal" href="#RNS.Link.get_mdu"><code class="docutils literal notranslate"><span class="pre">get_mdu()</span></code></a></li>
<li><a class="reference internal" href="#RNS.Link.get_expected_rate"><code class="docutils literal notranslate"><span class="pre">get_expected_rate()</span></code></a></li>
<li><a class="reference internal" href="#RNS.Link.get_age"><code class="docutils literal notranslate"><span class="pre">get_age()</span></code></a></li> <li><a class="reference internal" href="#RNS.Link.get_age"><code class="docutils literal notranslate"><span class="pre">get_age()</span></code></a></li>
<li><a class="reference internal" href="#RNS.Link.no_inbound_for"><code class="docutils literal notranslate"><span class="pre">no_inbound_for()</span></code></a></li> <li><a class="reference internal" href="#RNS.Link.no_inbound_for"><code class="docutils literal notranslate"><span class="pre">no_inbound_for()</span></code></a></li>
<li><a class="reference internal" href="#RNS.Link.no_outbound_for"><code class="docutils literal notranslate"><span class="pre">no_outbound_for()</span></code></a></li> <li><a class="reference internal" href="#RNS.Link.no_outbound_for"><code class="docutils literal notranslate"><span class="pre">no_outbound_for()</span></code></a></li>
+3 -3
View File
@@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="#" /> <meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="#" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/><title>Search - Reticulum Network Stack 0.9.0 beta documentation</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/><title>Search - Reticulum Network Stack 0.9.3 beta documentation</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
@@ -138,7 +138,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -164,7 +164,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="#" role="search"> </a><form class="sidebar-search-container" method="get" action="#" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+1 -1
View File
@@ -1 +1 @@
Search.setIndex({"docnames": ["examples", "forhumans", "gettingstartedfast", "hardware", "index", "interfaces", "networks", "reference", "support", "understanding", "using", "whatis"], "filenames": ["examples.rst", "forhumans.rst", "gettingstartedfast.rst", "hardware.rst", "index.rst", "interfaces.rst", "networks.rst", "reference.rst", "support.rst", "understanding.rst", "using.rst", "whatis.rst"], "titles": ["Code Examples", "An Explanation of Reticulum for Human Beings", "Getting Started Fast", "Communications Hardware", "Reticulum Network Stack Manual", "Configuring Interfaces", "Building Networks", "API Reference", "Support Reticulum", "Understanding Reticulum", "Using Reticulum on Your System", "What is Reticulum?"], "terms": {"A": [0, 2, 5, 6, 7, 9, 10], "number": [0, 2, 5, 6, 7, 9, 10], "ar": [0, 2, 3, 5, 6, 7, 8, 9, 10, 11], "includ": [0, 3, 4, 5, 7, 9, 11], "sourc": [0, 2, 3, 6, 9, 11], "distribut": [0, 2, 6, 7, 9, 10, 11], "reticulum": [0, 5, 6, 7], "you": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "can": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10], "us": [0, 3, 4, 5, 6, 7, 9], "learn": [0, 2, 8, 9], "how": [0, 2, 3, 5, 6, 9, 10, 11], "write": [0, 2, 5, 7, 9, 10], "your": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "own": [0, 2, 6, 7, 9, 10, 11], "program": [0, 3, 4, 5, 7, 9, 11], "The": [0, 2, 3, 4, 5, 6, 7, 11], "demonstr": [0, 5], "bare": [0, 5], "minimum": [0, 5, 6, 7, 9], "setup": [0, 2, 4, 5, 10], "requir": [0, 2, 5, 6, 7, 9, 10, 11], "connect": [0, 3, 4, 5, 6, 7, 9, 10, 11], "network": [0, 3, 5, 7, 9, 10, 11], "from": [0, 2, 3, 5, 6, 7, 9, 10, 11], "In": [0, 2, 3, 5, 6, 7, 9, 10, 11], "about": [0, 2, 3, 5, 6, 7, 9], "five": 0, "line": [0, 2, 4, 5, 6, 9, 10, 11], "have": [0, 2, 3, 5, 6, 7, 9, 10], "stack": [0, 2, 6, 7, 9, 10, 11], "initialis": [0, 7, 10], "readi": [0, 2, 3, 5, 6, 7, 11], "pass": [0, 3, 5, 6, 7, 9, 10], "traffic": [0, 2, 5, 6, 7, 9, 10], "thi": [0, 2, 3, 4, 5, 6, 7, 9, 10, 11], "rn": [0, 2, 3, 7, 9, 10], "start": [0, 3, 4, 5, 7, 9, 10], "up": [0, 2, 3, 5, 6, 7, 9, 10, 11], "gener": [0, 2, 3, 5, 6, 7, 9, 10, 11], "new": [0, 4, 6, 7, 9, 10], "destin": [0, 2, 4, 6, 7, 10], "let": [0, 2, 5, 6, 9, 10], "user": [0, 2, 5, 6, 9, 10, 11], "send": [0, 5, 7, 9, 10], "an": [0, 2, 3, 5, 6, 7, 9, 10, 11], "import": [0, 2, 3, 5, 6, 7, 8, 9], "argpars": 0, "": [0, 2, 5, 6, 9, 10, 11], "defin": [0, 5, 7, 9, 10], "app": [0, 2, 7, 9], "name": [0, 2, 4, 5, 6, 7], "we": [0, 2, 3, 5, 8, 9], "ll": [0, 2, 11], "all": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "creat": [0, 4, 5, 6, 7, 9, 10, 11], "sinc": [0, 2, 5, 6, 7, 9], "basic": [0, 2, 4, 5, 7, 10], "i": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10], "part": [0, 5, 6, 7, 9, 10], "rang": [0, 2, 3, 5, 6, 9, 10, 11], "util": [0, 3, 4, 5, 9], "put": [0, 3, 5, 10], "them": [0, 2, 3, 5, 6, 8, 9, 10, 11], "within": [0, 2, 5, 6, 7, 9], "namespac": 0, "example_util": 0, "app_nam": [0, 7], "execut": [0, 2, 5, 7, 10], "when": [0, 2, 3, 5, 6, 7, 9, 10], "def": 0, "program_setup": 0, "configpath": 0, "must": [0, 2, 5, 6, 7, 9, 10], "first": [0, 2, 5, 7, 9, 10], "randomli": [0, 9], "ident": [0, 2, 4, 7, 10, 11], "our": [0, 9], "just": [0, 2, 3, 5, 6, 9, 11], "endpoint": [0, 6, 7, 9], "address": [0, 2, 5, 6, 7, 9, 10, 11], "commun": [0, 2, 4, 5, 6, 7, 8, 9, 10, 11], "also": [0, 2, 3, 4, 5, 6, 7, 9, 10, 11], "exist": [0, 2, 3, 5, 9, 10, 11], "which": [0, 2, 5, 6, 7, 9, 10], "know": [0, 2, 3, 6, 7, 9, 11], "thei": [0, 2, 5, 6, 7, 9, 10], "reachabl": [0, 2, 5, 6, 7, 9, 10], "automat": [0, 2, 5, 6, 7, 9, 10, 11], "path": [0, 2, 3, 5, 7, 9, 10], "anywher": [0, 5], "els": [0, 2, 6, 9], "IN": [0, 7], "singl": [0, 5, 7, 9, 10, 11], "minimalsampl": 0, "configur": [0, 2, 3, 4, 6, 7, 9, 11], "prove": [0, 9], "packet": [0, 2, 4, 5, 6, 7, 10, 11], "By": [0, 2, 5, 7, 9, 10], "do": [0, 2, 3, 5, 7, 9, 10, 11], "proof": [0, 7, 9, 10], "each": [0, 2, 5, 6, 7, 9, 10], "incom": [0, 5, 7, 10], "transmit": [0, 5, 9], "back": [0, 5, 9, 11], "sender": [0, 2, 6, 9, 10], "anyon": [0, 2, 3, 5, 6, 7, 9, 10], "tri": 0, "whether": [0, 2, 5, 7, 9], "wa": [0, 3, 5, 6, 7, 9, 10, 11], "receiv": [0, 2, 5, 7, 9, 10], "correctli": 0, "set_proof_strategi": [0, 7], "prove_al": [0, 7], "everyth": [0, 6, 9], "hand": 0, "over": [0, 3, 4, 5, 7, 9, 10, 11], "control": [0, 2, 3, 4, 6, 7, 9, 11], "loop": 0, "announceloop": 0, "log": [0, 2, 5, 10], "prettyhexrep": 0, "hash": [0, 2, 7, 9, 10], "run": [0, 2, 3, 5, 6, 7, 9, 10, 11], "hit": 0, "enter": [0, 10], "manual": [0, 2, 5, 6, 7, 10], "ctrl": 0, "c": [0, 6, 10], "quit": [0, 2], "until": [0, 2, 5, 7], "exit": [0, 2, 7, 10], "If": [0, 2, 3, 5, 6, 7, 9, 10, 11], "server": [0, 2, 3, 4, 7, 10], "client": [0, 2, 3, 4, 7, 10], "messag": [0, 2, 7, 9, 10], "direct": [0, 2, 3, 6, 7, 9, 10], "toward": [0, 5, 9], "while": [0, 2, 3, 5, 6, 7, 9, 11], "true": [0, 2, 5, 7, 10], "input": [0, 10], "sent": [0, 2, 7, 9, 10], "startup": [0, 2, 10], "get": [0, 3, 4, 5, 7, 10, 11], "pars": 0, "desir": [0, 3, 5, 9], "mode": [0, 2, 3, 4, 9, 10, 11], "__name__": 0, "__main__": 0, "try": [0, 4, 5, 7], "parser": 0, "argumentparsLine truncated Search.setIndex({"docnames": ["examples", "forhumans", "gettingstartedfast", "hardware", "index", "interfaces", "networks", "reference", "support", "understanding", "using", "whatis"], "filenames": ["examples.rst", "forhumans.rst", "gettingstartedfast.rst", "hardware.rst", "index.rst", "interfaces.rst", "networks.rst", "reference.rst", "support.rst", "understanding.rst", "using.rst", "whatis.rst"], "titles": ["Code Examples", "An Explanation of Reticulum for Human Beings", "Getting Started Fast", "Communications Hardware", "Reticulum Network Stack Manual", "Configuring Interfaces", "Building Networks", "API Reference", "Support Reticulum", "Understanding Reticulum", "Using Reticulum on Your System", "What is Reticulum?"], "terms": {"A": [0, 2, 5, 6, 7, 9, 10], "number": [0, 2, 5, 6, 7, 9, 10], "ar": [0, 2, 3, 5, 6, 7, 8, 9, 10, 11], "includ": [0, 3, 4, 5, 7, 9, 11], "sourc": [0, 2, 3, 6, 9, 11], "distribut": [0, 2, 6, 7, 9, 10, 11], "reticulum": [0, 5, 6, 7], "you": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "can": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10], "us": [0, 3, 4, 5, 6, 7, 9], "learn": [0, 2, 8, 9], "how": [0, 2, 3, 5, 6, 9, 10, 11], "write": [0, 2, 5, 7, 9, 10], "your": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "own": [0, 2, 6, 7, 9, 10, 11], "program": [0, 3, 4, 5, 7, 9, 11], "The": [0, 2, 3, 4, 5, 6, 7, 11], "demonstr": [0, 5], "bare": [0, 5], "minimum": [0, 5, 6, 7, 9], "setup": [0, 2, 4, 5, 10], "requir": [0, 2, 5, 6, 7, 9, 10, 11], "connect": [0, 3, 4, 5, 6, 7, 9, 10, 11], "network": [0, 3, 5, 7, 9, 10, 11], "from": [0, 2, 3, 5, 6, 7, 9, 10, 11], "In": [0, 2, 3, 5, 6, 7, 9, 10, 11], "about": [0, 2, 3, 5, 6, 7, 9], "five": 0, "line": [0, 2, 4, 5, 6, 9, 10, 11], "have": [0, 2, 3, 5, 6, 7, 9, 10], "stack": [0, 2, 6, 7, 9, 10, 11], "initialis": [0, 7, 10], "readi": [0, 2, 3, 5, 6, 7, 11], "pass": [0, 3, 5, 6, 7, 9, 10], "traffic": [0, 2, 5, 6, 7, 9, 10], "thi": [0, 2, 3, 4, 5, 6, 7, 9, 10, 11], "rn": [0, 2, 3, 7, 9, 10], "start": [0, 3, 4, 5, 7, 9, 10], "up": [0, 2, 3, 5, 6, 7, 9, 10, 11], "gener": [0, 2, 3, 5, 6, 7, 9, 10, 11], "new": [0, 4, 6, 7, 9, 10], "destin": [0, 2, 4, 6, 7, 10], "let": [0, 2, 5, 6, 9, 10], "user": [0, 2, 5, 6, 9, 10, 11], "send": [0, 5, 7, 9, 10], "an": [0, 2, 3, 5, 6, 7, 9, 10, 11], "import": [0, 2, 3, 5, 6, 7, 8, 9], "argpars": 0, "sy": 0, "": [0, 2, 5, 6, 9, 10, 11], "defin": [0, 5, 7, 9, 10], "app": [0, 2, 7, 9], "name": [0, 2, 4, 5, 6, 7], "we": [0, 2, 3, 5, 8, 9], "ll": [0, 2, 11], "all": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "creat": [0, 4, 5, 6, 7, 9, 10, 11], "sinc": [0, 2, 5, 6, 7, 9], "basic": [0, 2, 4, 5, 7, 10], "i": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10], "part": [0, 5, 6, 7, 9, 10], "rang": [0, 2, 3, 5, 6, 9, 10, 11], "util": [0, 3, 4, 5, 9], "put": [0, 3, 5, 10], "them": [0, 2, 3, 5, 6, 8, 9, 10, 11], "within": [0, 2, 5, 6, 7, 9], "namespac": 0, "example_util": 0, "app_nam": [0, 7], "execut": [0, 2, 5, 7, 10], "when": [0, 2, 3, 5, 6, 7, 9, 10], "def": 0, "program_setup": 0, "configpath": 0, "must": [0, 2, 5, 6, 7, 9, 10], "first": [0, 2, 5, 7, 9, 10], "randomli": [0, 9], "ident": [0, 2, 4, 7, 10, 11], "our": [0, 9], "just": [0, 2, 3, 5, 6, 9, 11], "endpoint": [0, 6, 7, 9], "address": [0, 2, 5, 6, 7, 9, 10, 11], "commun": [0, 2, 4, 5, 6, 7, 8, 9, 10, 11], "also": [0, 2, 3, 4, 5, 6, 7, 9, 10, 11], "exist": [0, 2, 3, 5, 9, 10, 11], "which": [0, 2, 5, 6, 7, 9, 10], "know": [0, 2, 3, 6, 7, 9, 11], "thei": [0, 2, 5, 6, 7, 9, 10], "reachabl": [0, 2, 5, 6, 7, 9, 10], "automat": [0, 2, 5, 6, 7, 9, 10, 11], "path": [0, 2, 3, 5, 7, 9, 10], "anywher": [0, 5], "els": [0, 2, 6, 9], "IN": [0, 7], "singl": [0, 5, 7, 9, 10, 11], "minimalsampl": 0, "configur": [0, 2, 3, 4, 6, 7, 9, 11], "prove": [0, 9], "packet": [0, 2, 4, 5, 6, 7, 10, 11], "By": [0, 2, 5, 7, 9, 10], "do": [0, 2, 3, 5, 7, 9, 10, 11], "proof": [0, 7, 9, 10], "each": [0, 2, 5, 6, 7, 9, 10], "incom": [0, 5, 7, 10], "transmit": [0, 5, 9], "back": [0, 5, 9, 11], "sender": [0, 2, 6, 9, 10], "anyon": [0, 2, 3, 5, 6, 7, 9, 10], "tri": 0, "whether": [0, 2, 5, 7, 9], "wa": [0, 3, 5, 6, 7, 9, 10, 11], "receiv": [0, 2, 5, 7, 9, 10], "correctli": 0, "set_proof_strategi": [0, 7], "prove_al": [0, 7], "everyth": [0, 6, 9], "hand": 0, "over": [0, 3, 4, 5, 7, 9, 10, 11], "control": [0, 2, 3, 4, 6, 7, 9, 11], "loop": 0, "announceloop": 0, "log": [0, 2, 5, 10], "prettyhexrep": 0, "hash": [0, 2, 7, 9, 10], "run": [0, 2, 3, 5, 6, 7, 9, 10, 11], "hit": 0, "enter": [0, 10], "manual": [0, 2, 5, 6, 7, 10], "ctrl": 0, "c": [0, 6, 10], "quit": [0, 2], "until": [0, 2, 5, 7], "exit": [0, 2, 7, 10], "If": [0, 2, 3, 5, 6, 7, 9, 10, 11], "server": [0, 2, 3, 4, 7, 10], "client": [0, 2, 3, 4, 7, 10], "messag": [0, 2, 7, 9, 10], "direct": [0, 2, 3, 6, 7, 9, 10], "toward": [0, 5, 9], "while": [0, 2, 3, 5, 6, 7, 9, 11], "true": [0, 2, 5, 7, 10], "input": [0, 10], "sent": [0, 2, 7, 9, 10], "startup": [0, 2, 10], "get": [0, 3, 4, 5, 7, 10, 11], "pars": 0, "desir": [0, 3, 5, 9], "mode": [0, 2, 3, 4, 9, 10, 11], "__name__": 0, "__main__": 0, "try": [0, 4, 5, 7], "parser": 0, "argLine truncated
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="API Reference" href="reference.html" /><link rel="prev" title="Code Examples" href="examples.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="API Reference" href="reference.html" /><link rel="prev" title="Code Examples" href="examples.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>Support Reticulum - Reticulum Network Stack 0.9.0 beta documentation</title> <title>Support Reticulum - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Communications Hardware" href="hardware.html" /><link rel="prev" title="Using Reticulum on Your System" href="using.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Communications Hardware" href="hardware.html" /><link rel="prev" title="Using Reticulum on Your System" href="using.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>Understanding Reticulum - Reticulum Network Stack 0.9.0 beta documentation</title> <title>Understanding Reticulum - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Understanding Reticulum" href="understanding.html" /><link rel="prev" title="Getting Started Fast" href="gettingstartedfast.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Understanding Reticulum" href="understanding.html" /><link rel="prev" title="Getting Started Fast" href="gettingstartedfast.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>Using Reticulum on Your System - Reticulum Network Stack 0.9.0 beta documentation</title> <title>Using Reticulum on Your System - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+3 -3
View File
@@ -6,7 +6,7 @@
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Getting Started Fast" href="gettingstartedfast.html" /><link rel="prev" title="Reticulum Network Stack Manual" href="index.html" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Getting Started Fast" href="gettingstartedfast.html" /><link rel="prev" title="Reticulum Network Stack Manual" href="index.html" />
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/> <meta name="generator" content="sphinx-5.3.0, furo 2022.09.29.dev1"/>
<title>What is Reticulum? - Reticulum Network Stack 0.9.0 beta documentation</title> <title>What is Reticulum? - Reticulum Network Stack 0.9.3 beta documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=189ec851f9bb375a2509b67be1f64f0cf212b702" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
@@ -141,7 +141,7 @@
</label> </label>
</div> </div>
<div class="header-center"> <div class="header-center">
<a href="index.html"><div class="brand">Reticulum Network Stack 0.9.0 beta documentation</div></a> <a href="index.html"><div class="brand">Reticulum Network Stack 0.9.3 beta documentation</div></a>
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="theme-toggle-container theme-toggle-header"> <div class="theme-toggle-container theme-toggle-header">
@@ -167,7 +167,7 @@
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/> <img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
</div> </div>
<span class="sidebar-brand-text">Reticulum Network Stack 0.9.0 beta documentation</span> <span class="sidebar-brand-text">Reticulum Network Stack 0.9.3 beta documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search"> </a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
+26
View File
@@ -0,0 +1,26 @@
compiling = False
noticed = False
notice_delay = 0.3
import time
import sys
import threading
from importlib.util import find_spec
if find_spec("pyximport") and find_spec("cython"):
import pyximport; pyxloader = pyximport.install(pyimport=True, language_level=3)[1]
def notice_job():
global noticed
started = time.time()
while compiling:
if time.time() > started+notice_delay and compiling:
noticed = True
print("Compiling RNS object code... ", end="")
sys.stdout.flush()
break
time.sleep(0.1)
compiling = True
threading.Thread(target=notice_job, daemon=True).start()
import RNS; compiling = False
if noticed: print("Done."); sys.stdout.flush()
+47 -9
View File
@@ -159,6 +159,8 @@ class TestIdentity(unittest.TestCase):
b = 0 b = 0
e_t = 0 e_t = 0
d_t = 0 d_t = 0
e_times = []
d_times = []
for i in range(1, 500): for i in range(1, 500):
mlen = i % (RNS.Reticulum.MTU//2) + (RNS.Reticulum.MTU//2) mlen = i % (RNS.Reticulum.MTU//2) + (RNS.Reticulum.MTU//2)
msg = os.urandom(mlen) msg = os.urandom(mlen)
@@ -169,16 +171,34 @@ class TestIdentity(unittest.TestCase):
e_start = time.time() e_start = time.time()
token = id2.encrypt(msg) token = id2.encrypt(msg)
e_t += time.time() - e_start e_now = time.time()
e_t += e_now - e_start
e_times.append(e_now - e_start)
d_start = time.time() d_start = time.time()
decrypted = id1.decrypt(token) decrypted = id1.decrypt(token)
self.assertEqual(msg, decrypted) self.assertEqual(msg, decrypted)
d_t += time.time() - d_start d_now = time.time()
d_t += d_now - d_start
d_times.append(d_now - d_start)
print("Encrypt chunks < MTU: "+self.size_str(b/e_t, "b")+"ps") import statistics
print("Decrypt chunks < MTU: "+self.size_str(b/d_t, "b")+"ps") e_tmin = min(e_times)*1000; d_tmin = min(d_times)*1000
print("") e_tmax = max(e_times)*1000; d_tmax = max(d_times)*1000
e_tmean = (sum(e_times)/len(e_times))*1000; d_tmean = (sum(d_times)/len(d_times))*1000
e_tmed = statistics.median(e_times)*1000; d_tmed = statistics.median(d_times)*1000
e_tmdev = e_tmax - e_tmin; d_tmdev = d_tmax - d_tmin
e_mpct = (e_tmax/e_tmed)*100; d_mpct = (d_tmax/d_tmed)*100
print(" Encrypt chunks < MTU: "+self.size_str(b/e_t, "b")+"ps")
print(" Encryption timing min/avg/med/max/mdev: "+str(round(e_tmin, 3))+"/"+str(round(e_tmean, 3))+"/"+str(round(e_tmed, 3))+"/"+str(round(e_tmax, 3))+"/"+str(round(e_tmdev, 3)))
print(" Max deviation from median: "+str(round(e_mpct, 1))+"%")
print()
print(" Decrypt chunks < MTU: "+self.size_str(b/d_t, "b")+"ps")
print(" Decryption timing min/avg/med/max/mdev: "+str(round(d_tmin, 3))+"/"+str(round(d_tmean, 3))+"/"+str(round(d_tmed, 3))+"/"+str(round(d_tmax, 3))+"/"+str(round(d_tmdev, 3)))
print(" Max deviation from median: "+str(round(d_mpct, 1))+"%")
print()
# Test encrypt and decrypt of large chunks # Test encrypt and decrypt of large chunks
print("Testing large chunk encrypt/decrypt") print("Testing large chunk encrypt/decrypt")
@@ -197,14 +217,32 @@ class TestIdentity(unittest.TestCase):
e_start = time.time() e_start = time.time()
token = id2.encrypt(msg) token = id2.encrypt(msg)
e_t += time.time() - e_start e_now = time.time()
e_t += e_now - e_start
e_times.append(e_now - e_start)
d_start = time.time() d_start = time.time()
self.assertEqual(msg, id1.decrypt(token)) self.assertEqual(msg, id1.decrypt(token))
d_t += time.time() - d_start d_now = time.time()
d_t += d_now - d_start
d_times.append(d_now - d_start)
print("Encrypt "+self.size_str(mlen)+" chunks: "+self.size_str(b/e_t, "b")+"ps") e_tmin = min(e_times)*1000; d_tmin = min(d_times)*1000
print("Decrypt "+self.size_str(mlen)+" chunks: "+self.size_str(b/d_t, "b")+"ps") e_tmax = max(e_times)*1000; d_tmax = max(d_times)*1000
e_tmean = (sum(e_times)/len(e_times))*1000; d_tmean = (sum(d_times)/len(d_times))*1000
e_tmed = statistics.median(e_times)*1000; d_tmed = statistics.median(d_times)*1000
e_tmdev = e_tmax - e_tmin; d_tmdev = d_tmax - d_tmin
e_mpct = (e_tmax/e_tmed)*100; d_mpct = (d_tmax/d_tmed)*100
print(" Encrypt "+self.size_str(mlen)+" chunks: "+self.size_str(b/e_t, "b")+"ps")
print(" Encryption timing min/avg/med/max/mdev: "+str(round(e_tmin, 3))+"/"+str(round(e_tmean, 3))+"/"+str(round(e_tmed, 3))+"/"+str(round(e_tmax, 3))+"/"+str(round(e_tmdev, 3)))
print(" Max deviation from median: "+str(round(e_mpct, 1))+"%")
print()
print(" Decrypt "+self.size_str(mlen)+" chunks: "+self.size_str(b/d_t, "b")+"ps")
print(" Decryption timing min/avg/med/max/mdev: "+str(round(d_tmin, 3))+"/"+str(round(d_tmean, 3))+"/"+str(round(d_tmed, 3))+"/"+str(round(d_tmax, 3))+"/"+str(round(d_tmdev, 3)))
print(" Max deviation from median: "+str(round(d_mpct, 1))+"%")
print()
def size_str(self, num, suffix='B'): def size_str(self, num, suffix='B'):
units = ['','K','M','G','T','P','E','Z'] units = ['','K','M','G','T','P','E','Z']