MCPcopy Create free account
hub / github.com/F-Stack/f-stack / send_packet_and_capture

Method send_packet_and_capture

dpdk/dts/framework/test_suite.py:152–162  ·  view source on GitHub ↗

Send a packet through the appropriate interface and receive on the appropriate interface. Modify the packet with l3/l2 addresses corresponding to the testbed and desired traffic.

(self, packet: Packet, duration: float = 1)

Source from the content-addressed store, hash-verified

150 self.sut_node.configure_ipv4_forwarding(enable)
151
152 def send_packet_and_capture(self, packet: Packet, duration: float = 1) -> list[Packet]:
153 """
154 Send a packet through the appropriate interface and
155 receive on the appropriate interface.
156 Modify the packet with l3/l2 addresses corresponding
157 to the testbed and desired traffic.
158 """
159 packet = self._adjust_addresses(packet)
160 return self.tg_node.send_packet_and_capture(
161 packet, self._tg_port_egress, self._tg_port_ingress, duration
162 )
163
164 def get_expected_packet(self, packet: Packet) -> Packet:
165 return self._adjust_addresses(packet, expected=True)

Callers 1

test_os_udpMethod · 0.45

Calls 1

_adjust_addressesMethod · 0.95

Tested by

no test coverage detected