Sending and receiving dataΒΆ

Check that packets can be sent and received over the tested interface.

Scenarios: X3-SYS01, X3-SYS02.

  1. Establish connection between a pair of sockets of type sock_type on IUT and Tester.

  2. If tx is TRUE, sender is IUT and receiver is Tester, otherwise - the other way around.

  3. If TCP is checked, enable TCP_NODELAY on sender socket to ensure that a packet is sent as soon as possible, even when it is small.

  4. In a loop, send pkts_num packets with sizes chosen according to pkt_size. Receive and check them on peer.

  5. Check that interface statistics were updated expectedly, there were no errors or discarded packets.

Dmitry Izbitsky Dmitry.Izbitsky@oktetlabs.ru

Parameters:

env

Testing environment:

sock_type

Socket type:

  • SOCK_STREAM

  • SOCK_DGRAM

tx

If TRUE, check sending from IUT, otherwise check receiving on IUT.

pkt_size

Packet size:

  • 1000

  • -1 (random)

pkts_num

Number of packets to send or receive:

  • 100