udp multicast massage with NETOS 7.1

Hello,

i want to sent a multicast massage with netos 7.1.
On the netos 6.3 it run with the following:

socket_handle = socket( AF_INET, SOCK_DGRAM, 0);
status = sendto(socket_handle, p_ui8_buffer, sizeof( p_ui8_buffer ), MSG_OOB, &s_to, sizeof(s_to) );

When i use the same code but with changed s_to struct, i get the error 22 (Invalid argument) after sendto.

Have someone an example for a UDP Multicast on netos 7.1?

thx,
Frank

Here’s a quick sample I used to test it.

Thanks charliek for your example.

With the IP 224.0.5.128 and Port 2362 (Yes, the ADDP protokoll) the bind() funktion return with error code -1.
But after disable this funktion, the example run.

Thanks for your help.

Frank

This time with the example