Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Feb 2007 18:05:15 -0500
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        freebsd-net@FreeBSD.org
Subject:   [PATCH] BPF to support directions and more
Message-ID:  <200702141805.20228.jkim@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
I was playing with some BPF ideas for few days and I added two new 
features.  SEESENT flag is extended to see only outgoing packets, 
which is analogous to libpcap's PCAP_D_OUT direction.  Thus SEESENT 
is now called DIRECTION.  Second feature is feedback mode (sort of 
simulated hardware loopback), i.e., when packets are injected, you 
can feed them back as if they are coming from the wire.  You can 
debug link layer protocols easily with this without second machine, 
network controller, or loopback plug.  It's only tested with 
Ethernet, though.  All necessary patches (including libpcap 
modification) are here:

http://people.freebsd.org/~jkim/bpf_feedback.diff

Don't forget to turn off all hardware assisted features (e.g., RX/TX 
checksum offloading) to test feedback mode.  Otherwise, packets will 
be dropped.

Jung-uk Kim

Note: Actually I started this for QEMU networking, so that's another 
example.  See:

http://docs.freebsd.org/cgi/mid.cgi?200702092002.31220.jkim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702141805.20228.jkim>