mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-06-24 14:40:36 -04:00
Path MTU clamping handling with link mode signalling
This commit is contained in:
parent
38241452d3
commit
05b9a80a07
2 changed files with 7 additions and 9 deletions
|
@ -137,10 +137,6 @@ class Link:
|
|||
MTU_BYTEMASK = 0x1FFFFF
|
||||
MODE_BYTEMASK = 0xE0
|
||||
|
||||
@staticmethod
|
||||
def mtu_bytes(mtu):
|
||||
return struct.pack(">I", mtu & Link.MTU_BYTEMASK)[1:]
|
||||
|
||||
@staticmethod
|
||||
def signalling_bytes(mtu, mode):
|
||||
if not mode in Link.ENABLED_MODES: raise TypeError(f"Requested link mode {Link.MODE_DESCRIPTIONS[mode]} not enabled")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue