Re: PF_PACKET
Re: PF_PACKET
- Subject: Re: PF_PACKET
- From: Justin Walker <email@hidden>
- Date: Sat, 24 Jul 2004 09:01:28 -0700
On Jul 23, 2004, at 21:36, Duane Murphy wrote:
--- At Fri, 23 Jul 2004 16:45:26 -0700, Rich Kubota wrote:
Enrico,
You could use a bpf socket in order to send packets, as well as to
receive packets. However, I don't have a sample of the use of a bpf
sample for sending packets. The only sample which I have demonstrates
how to receive packets.
There is really no point in using a BPF socket to _send_ anything. BPF
is
meant to _receive_ datagrams that aren't usually available to other
processes. The canonical example for BPF is ARP because ARP packets are
eaten by the IP stack.
Sending a packet using a BPF socket is the same as sending a packet
using
a raw ethernet socket. For sending, we use a raw socket.
BPF tends to be more portable.
There's also libnet, which was mentioned in passing, which provides
some portability as well.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Some people have a mental
| horizon of radius zero, and
| call it their point of view.
| -- David Hilbert
*--------------------------------------*-------------------------------*
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.