1 .\" Copyright (c) 2008 George V. Neville-Neil
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd "reflect ethernet packets"
35 .Op Fl a Ar ethernet address
44 command implements a simple ethernet packet reflector using the
48 the Berkeley Packet Filter.
49 The program is useful primarily to test the low level round trip time
50 of packets through an Ethernet interface and/or a switch.
51 Network protocols, such as IP, and the network stack in general are never
52 invoked, only the device driver that implements the particular interface
58 device the user must have root privileges to execute this program.
60 The options are as follows:
61 .Bl -tag -width ".Fl d Ar argument"
63 Instead of reversing the ethernet destination and source addresses
64 supply a different destination ethernet address for each packet
66 .It Fl e Ar ether type
67 Use a different ethertype than the default, 0x8822, which is the IEEE
68 ether type for driver testing.
70 Network interface, which can be found with ifconfig(1).
72 The time, in milliseconds, to wait for a packet.
73 Lower times decrease latency at the cost of CPU.
75 Set the device into promiscuous mode before testing.
76 This is not usually necessary.
79 Print various small pieces of debug information.
82 The following is an example of a typical usage
87 .Dl "ether_reflect -i em0 -t 1"
89 Reflect all test packets, those with an ether type of 0x8822, which
90 are seen on ineterface em0.
91 The timeout is 1 millisecond.
93 .Dl "ether_reflect -i em0 -a 00:00:00:aa:bb:cc -t 1"
95 Rewrite the destination address in each packet to 00:00:00:aa:bb:cc
96 before reflecting the packet.
105 program first appeared in
109 manual page was written by
110 .An George V. Neville-Neil Aq Mt gnn@FreeBSD.org .
112 Should be reported to the author or to
113 .Aq Mt net@FreeBSD.org .