xref: /freebsd/usr.sbin/mtest/mtest.8 (revision 0a706446ba80ef64552e346a8acf56e556e46c0a)
1.\"
2.\" Copyright (c) 2007-2009 Bruce Simpson.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\" 3. The name of the author may not be used to endorse or promote products
14.\"    derived from this software without specific prior written permission
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.\"
29.Dd March 3, 2009
30.Os
31.Dt MTEST 8
32.Sh NAME
33.Nm mtest
34.Nd test multicast membership socket operations and ioctls
35.Sh SYNOPSIS
36.Nm
37.Sh DESCRIPTION
38The
39.Nm
40utility
41is a small program for testing the multicast membership socket operations
42and ioctls.
43It accepts the following commands, interactively:
44.Bl -tag -width "a ifname e.e.e.e e.e.e.e" -compact -offset indent
45.It Ic j Ar g.g.g.g Ar i.i.i.i Op Ar s.s.s.s
46Join the IP group address
47.Ar g.g.g.g
48on the interface with address
49.Ar i.i.i.i .
50.Pp
51If an optional source
52.Ar s.s.s.s
53is specified, a source-specific join will be performed;
54if
55.Nm
56is already a member of the group, the source
57will be added to its filter list.
58.Pp
59.Ar i.i.i.i
60may be specified as 0.0.0.0 to use the default interface,
61although this is legacy behaviour and is not recommended,
62as group memberships are keyed to each individual link.
63.It Ic l Ar g.g.g.g Ar i.i.i.i Op Ar s.s.s.s
64Leave the IP group address
65.Ar g.g.g.g
66on the interface with address
67.Ar i.i.i.i .
68If a source
69.Ar s.s.s.s
70is specified, only that source will be left.
71.It Ic a Ar ifname Ar e.e.e.e.e.e
72Join the Ethernet group address
73.Ar e.e.e.e.e.e
74on interface
75.Ar ifname .
76.It Ic d Ar ifname Ar e.e.e.e.e.e
77Leave the Ethernet group address
78.Ar e.e.e.e.e.e
79on interface
80.Ar ifname .
81.It Ic m Ar ifname Ar 1/0
82Set or reset ALLMULTI mode on interface
83.Ar ifname .
84.It Ic p Ar ifname Ar 1/0
85Set or reset promiscuous mode on interface
86.Ar ifname .
87.\"
88.It Ic i Ar g.g.g.g Ar i.i.i.i Ar n Ar x.x.x.x ...
89Set the socket with group membership of
90.Ar g.g.g.g
91on IPv4 address
92.Ar i.i.i.i
93to include filter mode, and add
94.Ar n
95sources beginning with
96.Ar x.x.x.x
97to the inclusion filter list.
98.\"
99.It Ic e Ar g.g.g.g Ar i.i.i.i Ar n Ar x.x.x.x ...
100Set the socket with group membership of
101.Ar g.g.g.g
102on IPv4 address
103.Ar i.i.i.i
104to exclude filter mode, and add
105.Ar n
106sources beginning with
107.Ar x.x.x.x
108to the exclusion filter list.
109.\"
110.It Ic t Ar g.g.g.g Ar i.i.i.i Ar s.s.s.s
111Set the socket with group membership of
112.Ar g.g.g.g
113on IPv4 address
114.Ar i.i.i.i
115to block traffic from source
116.Ar s.s.s.s .
117.\"
118.It Ic b Ar g.g.g.g Ar i.i.i.i Ar s.s.s.s
119Set the socket with group membership of
120.Ar g.g.g.g
121on IPv4 address
122.Ar i.i.i.i
123to allow traffic from source
124.Ar s.s.s.s .
125.\"
126.It Ic g Ar g.g.g.g Ar i.i.i.i Ar n
127Print
128.Ar n
129source filter entries for group
130.An g.g.g.g
131on IPv4 address
132.An i.i.i.i .
133.\"
134.It Ic f Ar filename
135Read commands from the file
136.Ar filename .
137.It Ic s Ar n
138Sleep for
139.Ar n
140seconds.
141.It Ic ?\&
142List legal commands.
143.It Ic q
144Quit the program.
145.El
146.Sh SEE ALSO
147.Rs
148.%A D. Thaler
149.%A B. Fenner
150.%A B. Quinn
151.%T "Socket Interface Extensions for Multicast Filters"
152.%O RFC 3678
153.Re
154.Sh AUTHORS
155.An -split
156.An "Bruce Simpson"
157.An "Steve Deering"
158.An "Wilbert De Graaf"
159