mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-18 22:28:11 -07:00
Implemented ability to change MTU.
This commit is contained in:
+4
-1
@@ -781,9 +781,12 @@ class Resource:
|
||||
|
||||
|
||||
class ResourceAdvertisement:
|
||||
HASHMAP_MAX_LEN = 70
|
||||
OVERHEAD = 128
|
||||
HASHMAP_MAX_LEN = math.floor((RNS.Link.MDU-OVERHEAD)/Resource.MAPHASH_LEN)
|
||||
COLLISION_GUARD_SIZE = 2*Resource.WINDOW_MAX+HASHMAP_MAX_LEN
|
||||
|
||||
assert HASHMAP_MAX_LEN > 0, "The configured MTU is too small to include any map hashes in resource advertisments"
|
||||
|
||||
@staticmethod
|
||||
def is_request(advertisement_packet):
|
||||
adv = ResourceAdvertisement.unpack(advertisement_packet.plaintext)
|
||||
|
||||
Reference in New Issue
Block a user