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: "Peter Sichel" <email@hidden>
- Date: Tue, 11 Jul 2006 20:47:32 -0400
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));
Kind Regards,
- Peter Sichel
Sustainable Softworks
_______________________________________________
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