[scripts] MATN-TC-12: Hop limit processing (#6496)

- Implement test case MATN-TC-12
- Also implement a fake layer: 'ipv6inner'. It is useful for fetching
  data in the inner IPv6 layer from a packet.
This commit is contained in:
whd
2021-04-22 19:27:20 -07:00
committed by GitHub
parent d4d81c39c9
commit e8ec349ce0
4 changed files with 298 additions and 13 deletions
+2 -5
View File
@@ -2673,18 +2673,15 @@ class LinuxHost():
cmd = f'python3 /app/third_party/openthread/repo/tests/scripts/thread-cert/mcast6.py {self.ETH_DEV} {ip} &'
self.bash(cmd)
def ping_ether(self, ipaddr, num_responses=1, size=None, timeout=5, ttl=None, interface=None) -> int:
def ping_ether(self, ipaddr, num_responses=1, size=None, timeout=5, ttl=None, interface='eth0') -> int:
cmd = f'ping -6 {ipaddr} -I eth0 -c {num_responses} -W {timeout}'
cmd = f'ping -6 {ipaddr} -I {interface} -c {num_responses} -W {timeout}'
if size is not None:
cmd += f' -s {size}'
if ttl is not None:
cmd += f' -t {ttl}'
if interface is not None:
cmd += f' -I {interface}'
resp_count = 0
try: