• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: failing opening socket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >failing opening socket (From: Luca Ciciriello <email@hidden>)

  • Prev by Date: Re: Tabbed preference panels
  • Next by Date: Re: Object change to NSView update
  • Previous by thread: failing opening socket
  • Next by thread: Re: failing opening socket
  • Index(es):
    • Date
    • Thread