Question on SOCK_RAW, implement a bpf->other host tee

Don Bowman don at sandvine.com
Sat Jul 17 12:00:37 PDT 2004


From: Don Bowman [mailto:don at sandvine.com]
> I'm trying to implement a 'tee' which reads
> from bpf, and sends matching packets to
> another layer-2 adjacent host.
> 

Sorry to follow up my own post, but...
More specifically, it appears the packet does
try and transmit, but the destination MAC is
(uninitialised?) somewhat random, different
on each packet, not legal.

I can capture it on the correct output interface
with tcpdump. The interface type is xl.

Shouldn't the stack ARP for the destination
in my 'sendto', and fill in the ether header?
The ether-source is filled in, presumably by
the driver.



More information about the freebsd-net mailing list