I have created a UDP socket via process A. However my process A does not have root access to set socket options using the setsockopt api from linux to bind it with the broadcast IP (255.255.255.255).
So I have created another process B with root rights to do this job. I am passing the socket handle to the new process B and trying to set the socket options like below :
setsockopt(iSocket_UDP_Client_bcast, SOL_SOCKET, SO_BINDTODEVICE, pszDeviceName, sizeof(strlen(pszDeviceName)))
However, I am not successful in setting the socket options even though process B has root rights.
Can anyone help me with this or suggest any other way to get this done?
P.S : I cannot give root rights to my main process A.
Thanks in advance