From owner-freebsd-hackers Tue Oct 20 09:18:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA02544 for freebsd-hackers-outgoing; Tue, 20 Oct 1998 09:18:59 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from majordomo.clark.net (majordomo.clark.net [168.143.190.238]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA02539 for ; Tue, 20 Oct 1998 09:18:57 -0700 (PDT) (envelope-from beekey@clark.net) From: beekey@clark.net Received: from loas.clark.net [168.143.0.13] by majordomo.clark.net with esmtp (Exim 1.92 #1 (Debian)) id 0zVeUQ-0001WO-00; Tue, 20 Oct 1998 12:18:30 -0400 Received: from stout (basil.network42.clark.net [207.196.110.227]) by loas.clark.net (8.8.8/8.8.8) with SMTP id MAA06462 for ; Tue, 20 Oct 1998 12:18:44 -0400 (EDT) Message-ID: <362CB750.5ECC@clark.net> Date: Tue, 20 Oct 1998 12:16:16 -0400 Reply-To: beekey@clark.net X-Mailer: Mozilla 3.01 (Win95; I) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG Subject: bpf write overwrites link level header? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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