[sr-dev] RAW socket support for Darwin (OSX)

Raphael Coeffic rco at iptel.org
Thu Feb 2 14:18:07 CET 2012


On 02.02.12 12:58, Daniel-Constantin Mierla wrote:
> Hello,
>
> On 2/2/12 12:41 PM, Raphael Coeffic wrote:
>> Hi!
>>
>> I'm currently having some issues trying to get raw socket support 
>> working on OSX. It appears that raw_udp4_send() in raw_sock.c does 
>> not compile because OSX support neither IP_PKTINFO nor 
>> IP_SENDSRCADDR. However, it seems that raw_udp4_send is not used 
>> anywhere, and everything now works over raw_iphdr_udp4_send(), for 
>> which only IP_HDRINCL is needed, which is well supported on OSX.
>>
>> Is that correct that rwa_udp4_send is not used anymore? Could I just 
>> remove it /comment it out?
> perhaps you can enclose it in ifndef __OS_darwin ?
>
I used a combination of defined(IP_PKTINFO) and defined(IP_SENDSRCADDR) 
as shown in the attached patch. I think this should not break anything.

Cheers
Raphael.


More information about the sr-dev mailing list