0

I have got some weird issues.

I want to send data by using multicast address on the FreeBSD socket.

Here is the sample code.

// bind socket

bind(sd, (const struct sockaddr *) &saddr, sizeof(saddr));

// send, and address is "ff14::5", port:42557

sendto(socket_id, data, length, 0, (const struct sockaddr *) &saddr, sizeof(saddr));

This works well on Linux.

But when I try to use this code on the FreeBSD socket an error occurs

"Operation not supported"

I've searched for the related issue on Google, and have found the post below

https://lists.freebsd.org/pipermail/freebsd-net/2004-February/003053.html

This thread explains about binding issue with multicast and using sendto() API.

I understand why the error occurs on FreeBSD from this thread, but I can't find the solution for this issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.