Implemented RTT measurements on link establishment and link teardown procedure

This commit is contained in:
Mark Qvist 2018-04-21 13:54:22 +02:00
parent de8d9cf722
commit ece4f732f4
3 changed files with 133 additions and 53 deletions

View file

@ -29,6 +29,8 @@ class Packet:
RESPONSE = 0x09
COMMAND = 0x0A
COMMAND_STAT = 0x0B
LINKCLOSE = 0xFD
LRRTT = 0xFE
LRPROOF = 0xFF
HEADER_MAXSIZE = 23
@ -143,6 +145,9 @@ class Packet:
def send(self):
if not self.sent:
if self.destination.type == RNS.Destination.LINK:
if self.destination.status == RNS.Link.CLOSED:
raise IOError("Attempt to transmit over a closed link")
if not self.packed:
self.pack()