Re: setting the DF bit on a UDP BSD socket in OS X
Re: setting the DF bit on a UDP BSD socket in OS X
- Subject: Re: setting the DF bit on a UDP BSD socket in OS X
- From: Ivan Beschastnikh <email@hidden>
- Date: Thu, 13 Jul 2006 08:40:00 -0700
On Jul 11, 2006, at 5:47 PM, Peter Sichel wrote:
On 7/11/06, Ivan Beschastnikh wrote:
Hello,
I'm trying to set up a UDP socket that sends datagrams with the DF
bit set in the IP header. Looking at the 'man ip' page and a 'man
getsockopt' page it doesn't seem like you support the BSD's
IP_DONTFRAG option nor do you have an IP_MTU_DISCOVER option as on
Linux.
I looked everywhere on the web but can't find out whether you
actually support setting the DF bit on BSD sockets and if so, what is
the API for doing this. Any advice on this would be much appreciated.
You can use the IP_HDRINCL option and set the bit yourself.
result = setsockopt(mSocket, IPPROTO_IP, IP_HDRINCL, &value,
sizeof(int));
Thanks for the reply, but IP_HDRINCL only works with RAW sockets. I'm
looking for a way to modify the bit for a UDP socket.
thanks,
ivan.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden