mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-19 14:48:09 -07:00
Transmit proofs only on relevant interface
This commit is contained in:
+3
-1
@@ -48,7 +48,7 @@ class Packet:
|
||||
# Default packet timeout
|
||||
TIMEOUT = 60
|
||||
|
||||
def __init__(self, destination, data, packet_type = DATA, context = NONE, transport_type = RNS.Transport.BROADCAST, header_type = HEADER_1, transport_id = None):
|
||||
def __init__(self, destination, data, packet_type = DATA, context = NONE, transport_type = RNS.Transport.BROADCAST, header_type = HEADER_1, transport_id = None, attached_interface = None):
|
||||
if destination != None:
|
||||
if transport_type == None:
|
||||
transport_type = RNS.Transport.BROADCAST
|
||||
@@ -78,6 +78,8 @@ class Packet:
|
||||
self.sent_at = None
|
||||
self.packet_hash = None
|
||||
|
||||
self.attached_interface = attached_interface
|
||||
|
||||
def getPackedFlags(self):
|
||||
if self.context == Packet.LRPROOF:
|
||||
packed_flags = (self.header_type << 6) | (self.transport_type << 4) | RNS.Destination.LINK | self.packet_type
|
||||
|
||||
Reference in New Issue
Block a user