From owner-freebsd-net Wed Sep 1 12:44:37 1999 Delivered-To: freebsd-net@freebsd.org Received: from ns1.mediaone.com (ns1.mediaone.com [169.152.79.6]) by hub.freebsd.org (Postfix) with ESMTP id CC6C215B5C for ; Wed, 1 Sep 1999 12:44:22 -0700 (PDT) (envelope-from mcain@mediaone.com) Received: from wsimc01.mediaone.com (wsimc01.mediaone.com [169.152.100.174]) by ns1.mediaone.com (8.8.7/8.8.7) with SMTP id PAA21610 for ; Wed, 1 Sep 1999 15:38:34 -0400 (EDT) Received: from 169.152.100.164 by wsimc01.mediaone.com with ESMTP ( WorldSecure Server SMTP Relay(WSS) v3.6.1); Wed, 01 Sep 99 15:40:31 -0400 X-Server-Uuid: cda7734f-06b2-11d3-bc59-00805fbb2b22 Received: by exchimc02.mediaone.com with Internet Mail Service ( 5.5.2448.0) id ; Wed, 1 Sep 1999 15:44:02 -0400 Message-ID: From: "Cain, Michael E." To: "'freebsd-net@freebsd.org'" Subject: Reading and writing raw Ethernet frames Date: Wed, 1 Sep 1999 15:43:58 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) X-WSS-ID: 1BD35EA53107492-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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