The methods to receive/send ethernet raw packet
The methods to receive/send ethernet raw packet
- Subject: The methods to receive/send ethernet raw packet
- From: "Chen-Hai Teng" <email@hidden>
- Date: Thu, 6 Dec 2007 15:58:12 +0800
Dears,
I am a newbie on network programming; I am studying how to receive/send an ethernet raw packet on Mac OS X.
According to past post on this list, I found libpcap as my first solution to receive the packet, and BPF to send the packet.
Although I can receive/send ethernet raw packet now, I still want to know if there is an Apple API -- such as Cocoa or IOKit -- can do the same at the user space.
After some study, I think IONetworkLib looks like what I need. But when I try to learn how to use it, the few example and document make me confused.
IONetworkGetDataHandle is the method troubles me:
According to the document I found, the only dataName that seems useful is
kIONetworkStatsKey. Are there any other dataName can input in this method?
Could someone give me an advice?
My development environment is Leopard. Thanks for advance.
Best regards,
--
Chen-Hai, Teng
Three-Headed Monkey
Mac OS X Software Development Group
http://tthm.group.googlepages.comhttp://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