This question has probably been asked a few times but my search didn't revel my exact question. OS is Fedora.
The server app (written by another group) creates a socket using AF_INET and SOCK_DGRAM, binds to INADDR_ANY and a port, and then is using read() to the file descriptor to "attempt" to grab any packets sent to the server interface with the assigned port.
We have attempted to create our client app with a socket using PF_PACKET, SOCK_RAW, IPPROTO_RAW - PF_INET, SOCK_RAW, IPPROTO_UDP - and several variations. We are calling the connect function to set the default desitination and then the write function to our file descriptor but we can't communicate with the server app (which we don't have the power to change). We have also attempted to use sendto(). The interface control document indicates that we need to be able to plug in a fixed MAC address and a fixed IP that won't be what is assigned to the actual interfaces so this requires us to create a RAW socket.
My question is if the server stays that way it is created above and we are required to create a RAW socket on our end what is the correct configuration for all of the settings in between along with the correct function calls to allow a socket created RAW talking to a socket created using DGRAM.