Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Sep 1999 15:43:58 -0400
From:      "Cain, Michael E." <mcain@mediaone.com>
To:        "'freebsd-net@freebsd.org'" <freebsd-net@freebsd.org>
Subject:   Reading and writing raw Ethernet frames
Message-ID:  <B147CE8D09F1D111BD7100805F19B1C04D8E43@coexch01.mediaone.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B147CE8D09F1D111BD7100805F19B1C04D8E43>