.. index:: pair: group; Sending and receiving multicast packets .. _doxid-group__basic-multicast: Sending and receiving multicast packets ======================================= .. toctree:: :hidden: 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`` or ``IPV6_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 `__ .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Testing environment: * :ref:`env.peer2peer_mcast ` * :ref:`env.peer2peer_mcast_ipv6 ` * - tx - If ``TRUE``, send from IUT to Tester, else - the other way around. * - sends_num - How many packets to send: * ``100``