• 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: The methods to receive/send ethernet raw packet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The methods to receive/send ethernet raw packet


  • Subject: Re: The methods to receive/send ethernet raw packet
  • From: "Chen-Hai Teng" <email@hidden>
  • Date: Thu, 6 Dec 2007 20:27:00 +0800

Hi Quinn,
Thanks for your advice.
I had run and red the BSDLLCTest. It uses socket API to send raw packet.
According to following thread, I finally select pcap and bpf to implement my code.

http://lists.apple.com/archives/darwin-development/2002/May/msg00279.html

I choose pcap to receive raw packet because it's more portable.
I choose bpf to send raw packet because the function pcap_inject is not allowed on Mac OS X 10.4.
My problem is not to send/receive raw packet, it's how many methods that can send/receive raw packet on Mac OS X.
I summary some results following:
1. BPF
2. pcap (it can receive raw packet, but can't send raw packet at 10.4)
3. socket API (open with the PF_NDRV)
4. IOKit (in kernel mode)

If there are more methods can send/receive raw packet, please tell me.
I would be happy to try it.

--
Chen-Hai, Teng
Three-Headed Monkey
Mac OS X Software Development Group
http://tthm.group.googlepages.com
http://thedoublee.blogspot.com
 _______________________________________________
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

  • Follow-Ups:
    • Re: The methods to receive/send ethernet raw packet
      • From: "Chen-Hai Teng" <email@hidden>
    • Re: The methods to receive/send ethernet raw packet
      • From: Quinn <email@hidden>
References: 
 >The methods to receive/send ethernet raw packet (From: "Chen-Hai Teng" <email@hidden>)

  • Prev by Date: Re: The methods to receive/send ethernet raw packet
  • Next by Date: Getting currently set wireless network info...
  • Previous by thread: Re: The methods to receive/send ethernet raw packet
  • Next by thread: Re: The methods to receive/send ethernet raw packet
  • Index(es):
    • Date
    • Thread