I have an application that performs a read operation from a UDP socket.
But the problem is that the length of the embedded data is not known to me
before hand. Nor is this value stored in the payload header of the
embedded packet. The only place were I can get this information is from
the UDP or IP header. And the datagram socket lets the application read
only the payload and not the header.
Raw socket can also not help here as what i am trying to receive is a UDP
packet from a test set and the kernel will never forward data with IP
protocol type set to UDP, to a raw socket. Raw socket can only receive
some user defined protocol types and ICMP/IGMP kind of frames.
So, I am trying to figure out how could I read the UDP header in a
situation like this