On Fri, 19 Apr 2002 02:13, Ish Rattan wrote:
> Does any one have a complete client/server type program or tutotial on
> using PF_PACKET to by pass the TCP/IP stack in the kernel? I can't seem
> to find a sample and hence subscribed to this list to ask for
> pointers.
Possibly the wrong question. I take it that you want to avoid using the kernel
support for some reason, possibly portability. In that case, you should
consider a couple of libraries
-pcap, which does packet capturing
http://www.tcpdump.org/
- libnet, which does packet assembly
http://www.packetfactory.net/libnet/
They basically insulate you from the joys of packet filtering.
There are several applications that show how this works (eg tcpdump, zcip,
snort), plus they both have decent docs and sample apps.
HTH
Brad
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
|