Re: failing opening socket
Re: failing opening socket
- Subject: Re: failing opening socket
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 22 Aug 2008 12:34:36 -0600
On Aug 22, 2008, at 11:12 AM, Luca Ciciriello wrote:
int sock_icmp = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
returns always -1.
Where is my mistake? For me is the very first time using socket on
Mac.
Is your application running as root? Attempts to create raw sockets
don't work if your app isn't running as root. Also, when a low-level
function like that returns an error, you can find out more about the
error by looking at the "errno" variable.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden