Network Multicast#
Functions#
Enable multicast for the given IP address.
Disable multicast for the given IP address.
Function Documentation#
sl_net_join_multicast_address#
sl_status_t sl_net_join_multicast_address (sl_net_interface_t interface, const sl_ip_address_t * ip_address)
Enable multicast for the given IP address.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_net_interface_t | [in] | interface | Interface identified by sl_net_interface_t. |
const sl_ip_address_t * | [in] | ip_address | Multicast IP address of type sl_ip_address_t. |
This function enables multicast for the specified IP address on the given interface. It allows the interface to receive/send multicast packets sent to the specified IP address.
Users can use sendto and recvfrom socket APIs to send and receive data.
Pre-conditions:
sl_net_up should be called before this API.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
sl_net_leave_multicast_address#
sl_status_t sl_net_leave_multicast_address (sl_net_interface_t interface, const sl_ip_address_t * ip_address)
Disable multicast for the given IP address.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_net_interface_t | [in] | interface | Interface identified by sl_net_interface_t. |
const sl_ip_address_t * | [in] | ip_address | Multicast IP address of type sl_ip_address_t. |
This function disables multicast for the specified IP address on the given interface. It prevents the interface from receiving/sending multicast packets sent to the specified IP address.
Pre-conditions:
sl_net_up should be called before this API.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.