From owner-freebsd-net Wed Sep 1 19:59:23 1999 Delivered-To: freebsd-net@freebsd.org Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by hub.freebsd.org (Postfix) with ESMTP id EF8D714EDB for ; Wed, 1 Sep 1999 19:59:21 -0700 (PDT) (envelope-from bmilekic@dsuper.net) Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by oracle.dsuper.net (8.9.3/8.9.3) with ESMTP id WAA05380; Wed, 1 Sep 1999 22:58:08 -0400 (EDT) Date: Wed, 1 Sep 1999 22:58:08 -0400 (EDT) From: Bosko Milekic To: "Cain, Michael E." Cc: "'freebsd-net@freebsd.org'" Subject: Re: Reading and writing raw Ethernet frames In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Look into the Berkeley Packet Filter. [bpf(4)] /Bosko On Wed, 1 Sep 1999, Cain, Michael E. wrote: !>I have an existing application, developed for Linux, that emulates various !>IP network impairments. One of the key enablers for the app is the ability !>to read and write raw Ethernet frames (sometimes after making appropriate !>changes in the source and destination addresses at both the IP and Ethernet !>level). On Linux, accessing the raw frames was easily accomplished by !>opening a socket of type SOCK_PACKET instead of SOCK_STREAM or SOCK_DGRAM. !>In the case of a Linux box with multiple Ethernet interfaces, it is !>straightforward to know the interface on which the frame was received or to !>specify the interface on which it should be written. !> !>I'm interested in porting the application to FreeBSD, and was wondering if !>there was an equivalent mechanism. To summarize, I need to be able to read !>and write raw Ethernet frames (arbitrarily constructed by me in the worst !>case) and support for multiple Ethernet interfaces while doing so. !> !>Thanks in advance, !>Michael Cain !>MediaOne Labs !>mcain@mediaone.com !> !> !> !>To Unsubscribe: send mail to majordomo@FreeBSD.org !>with "unsubscribe freebsd-net" in the body of the message !> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message