Date: Tue, 20 Oct 1998 12:16:16 -0400 From: beekey@clark.net To: freebsd-hackers@FreeBSD.ORG Subject: bpf write overwrites link level header? Message-ID: <362CB750.5ECC@clark.net>
next in thread | raw e-mail | index | archive | help
I'm currently working on some code that generates raw TCP/UDP packets. using the write capability of bpf to dump them onto the wire. Based on tcpdump output from another machine, they appear to be constructed with proper IP and TCP or UDP headers. However, somewhere in the depths, despite my building the Ethernet header and specifying both MAC addresses, the packets always end up on the wire with the sending host's correct source MAC address, rather than the one I specified in the code (yes the source IP is being spoofed and it comes out correct). Looking briefly at the code in /usr/src/sys/net/bpf.c, it appears that bpf may add its own link level header. Anyone have any experience or fixes/workarounds for this? I don't think that it is a NIC limitation due to some testing under NT. Thanks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?362CB750.5ECC>