Setting DF bit in IP header for Raw socket
Hello All,
Can any body tell me, How to set the DF bit for IP header (for raw sockets) over Linux
OS. As right now I am using setsockopt(), with option IP_MTU_DISCOVER
and optval as IP_PMTUDISC_DO. Like,
int optval = IP_PMTUDISC_DO;
err_code = setsockopt(socket,
SOL_IP,
IP_MTU_DISCOVER,
&optval,
sizeof(int));
But this option also forces the PMTUD for the given socket, that I
don't want. This PMTUD I am implementing by my own.
So can you tell me any other way to set it ON.
I am also not intrested in setting IP_HDRINCL option, to provide my
own IP header while sending, for just setting the DF bit value.
Thanks in advance.
Rajat.
|