:param VppInterface src_if: Packets are send to this interface, using this interfaces remote host. :param list dst_ifs: IPv4 ICMP requests are send to interfaces addresses. :return: List of generated packets.
(src_if, dst_ifs)
| 41 | |
| 42 | @staticmethod |
| 43 | def create_icmp_stream(src_if, dst_ifs): |
| 44 | """ |
| 45 | |
| 46 | :param VppInterface src_if: Packets are send to this interface, |
| 47 | using this interfaces remote host. |
| 48 | :param list dst_ifs: IPv4 ICMP requests are send to interfaces |
| 49 | addresses. |
| 50 | :return: List of generated packets. |
| 51 | """ |
| 52 | pkts = [] |
| 53 | for i in dst_ifs: |
| 54 | p = ( |
| 55 | Ether(dst=src_if.local_mac, src=src_if.remote_mac) |
| 56 | / IP(src=src_if.remote_ip4, dst=i.local_ip4) |
| 57 | / ICMP(id=i.sw_if_index, type="echo-request") |
| 58 | ) |
| 59 | pkts.append(p) |
| 60 | return pkts |
| 61 | |
| 62 | def verify_icmp(self, capture, request_src_if, dst_ifs): |
| 63 | """ |