Sending and receiving multicast packets
Check that multicast packets may be sent and received over the tested interface.
Scenarios: X3-SYS05.
If tx is
TRUE
, IUT is sender and Tester is receiver, otherwise - the other way around.Create UDP socket on sender, bind it to a unicast address.
Create UDP socket on receiver, bind it to the multicast address mcast_addr.
With help of
IP_MULTICAST_IF
orIPV6_MULTICAST_IF
set an outgoing interface for multicast packets for the sender socket.Join the receiver socket to the multicast group of mcast_addr.
For sends_num times, send a packet from the sender socket to mcast_addr, receive and check it on the receiver.
Dmitry Izbitsky Dmitry.Izbitsky@oktetlabs.ru
Parameters:
env |
Testing environment: |
tx |
If |
sends_num |
How many packets to send:
|