Re: sample packet filter code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 31, 2008 at 08:05:42AM -0700, Allen Curtis wrote:
> I am working on an embedded system and would like to implement a 
> PF_PACKET/SOCK_RAW with packet filtering. The objective is to create a 
> filter based on a family of destination MAC addresses. Can anyone provide 
> sample code which does this without the aid of the PCAP library? A previous 
> posting suggested looking at tcpdump for an example of BPF but the current 
> version seems to be PCAP based.

See ISC DHCP, common/bpf.c for bsd's, common/lpf.c for linuxes.

  http://www.isc.org/sw/dhcp/

-- 
Ash bugud-gul durbatuluk agh burzum-ishi krimpatul.
Why settle for the lesser evil?	 https://secure.isc.org/store/t-shirt/
-- 
David W. Hankins	"If you don't do it right the first time,
Software Engineer		     you'll just have to do it again."
Internet Systems Consortium, Inc.		-- Jack T. Hankins

Attachment: pgp2b8nwKKqg4.pgp
Description: PGP signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux