I'm trying to find a way to bind an IPv4 UDP socket to a broadcast address in Micrium (µC/OS-Ⅲ).
Attempt to bind a socket to the actual broadcast address just returns NET_SOCK_ERR_INVALID_ADDR
. The broadcast is not explicitly mentioned on the list of things to bind on the NetSock_Bind
call documentation, there is no analogue of SO_BROADCAST
either. Is it impossible at all?
Can I, as a last resort, add a broadcast address to an existing interface as its own address (this shouldn't mess up ARP, since nobody is going to ask for it, and I'm not going to send anything through it)?