MCPcopy Create free account
hub / github.com/FDio/vpp / create_icmp_stream

Method create_icmp_stream

test/test_interface_crud.py:43–60  ·  view source on GitHub ↗

: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)

Source from the content-addressed store, hash-verified

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 """

Callers 2

test_crudMethod · 0.95
test_downMethod · 0.95

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected