• 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
Capture ARP packets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Capture ARP packets


  • Subject: Capture ARP packets
  • From: Jerry Chang <email@hidden>
  • Date: Fri, 25 May 2007 19:18:07 -0400
  • Importance: Normal

Hi,After reading the sample(BSDLLCTest) and many postings, I wrote a small program trying to capture ARP packets. However, I got an error message "Address already in use" in setsockopt(). What value I set wrong? Maybe protocol_family(=unique identifier for this protocol), I guess? What is the correct value I should use? Any help would be appreciated. Thx....    struct ndrv_protocol_desc protocol;    struct ndrv_demux_desc demux;    bzero(&protocol, sizeof(protocol));    bzero(&demux, sizeof(demux));    demux.type = NDRV_DEMUXTYPE_ETHERTYPE;    demux.length = sizeof(demux.data.ether_type);    demux.data.ether_type = htons(0x0806);    protocol.version = NDRV_PROTOCOL_DESC_VERS;    protocol.protocol_family = 0x0806;    protocol.demux_count = 1;    protocol.demux_list = &demux;    int status = setsockopt(sd, SOL_NDRVPROTO, NDRV_SETDMXSPEC,(caddr_t)&protocol, sizeof(protocol));    if (status < 0)        perror("Error on setsockopt");...Result output:    Error on setsockopt: Address already in useThanks,Jerry
_________________________________________________________________
Create the ultimate e-mail address book. Import your contacts to Windows Live Hotmail.
www.windowslive-hotmail.com/learnmore/managemail2.html?locale=en-us&ocid=TXT_TAGLM_HMWL_reten_impcont_0507_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

  • Prev by Date: Re: NSImage question
  • Next by Date: Re: NSTreeController bound selection issue
  • Previous by thread: Re: Bindings and the selected object
  • Next by thread: Re: How to capture my desktop?
  • Index(es):
    • Date
    • Thread