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)
| 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) |
no test coverage detected