[ip6] add IPv6 fragmentation and reassembly support (#3948)

This commit is contained in:
Christian Stauffer
2019-08-28 10:31:55 -07:00
committed by Jonathan Hui
parent 3198a3be69
commit 864e3458f5
21 changed files with 770 additions and 37 deletions
+25
View File
@@ -1052,6 +1052,31 @@ class Node:
payload += tlv.to_hex()
self.commissioner_mgmtset(self.bytes_to_hex_str(payload))
def udp_start(self, local_ipaddr, local_port):
cmd = 'udp open'
self.send_command(cmd)
self._expect('Done')
cmd = 'udp bind %s %s' % (local_ipaddr, local_port)
self.send_command(cmd)
self._expect('Done')
def udp_stop(self):
cmd = 'udp close'
self.send_command(cmd)
self._expect('Done')
def udp_send(self, bytes, ipaddr, port, success=True):
cmd = 'udp send -s %d %s %d' % (bytes, ipaddr, port)
self.send_command(cmd)
if success:
self._expect('Done')
else:
self._expect('Error')
def udp_check_rx(self, bytes_should_rx):
self._expect('%d bytes' % bytes_should_rx)
if __name__ == '__main__':
unittest.main()