]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/mtest/mtest.8
zfs: merge openzfs/zfs@41e55b476
[FreeBSD/FreeBSD.git] / usr.sbin / mtest / mtest.8
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 .Dd April 29, 2009
28 .Dt MTEST 8
29 .Os
30 .Sh NAME
31 .Nm mtest
32 .Nd test multicast socket operations
33 .Sh SYNOPSIS
34 .Nm
35 .Sh DESCRIPTION
36 The
37 .Nm
38 utility
39 is a small program for testing multicast socket operations.
40 .Pp
41 It accepts the following commands, interactively, or as part of a scripted
42 input file (useful for automated testing):
43 .Pp
44 .Bl -tag -width "a ifname e.e.e.e e.e.e.e" -compact -offset indent
45 .\"
46 .It Ic a Ar ifname Ar mac-addr
47 Join the link-layer group address
48 .Ar mac-addr
49 on interface
50 .Ar ifname .
51 The group address should be in IEEE 802 MAC format,
52 delimited by colon (':') characters.
53 .It Ic d Ar ifname Ar mac-addr
54 Leave the link-layer group address
55 .Ar mac-addr
56 on interface
57 .Ar ifname .
58 .It Ic m Ar ifname Ar 1/0
59 Set or reset ALLMULTI mode on interface
60 .Ar ifname .
61 This option is deprecated and is now a no-op.
62 .It Ic p Ar ifname Ar 1/0
63 Set or reset promiscuous mode on interface
64 .Ar ifname .
65 .Pp
66 .It Ic j Ar mcast-addr Ar ifname Op Ar source-addr
67 Join the multicast address
68 .Ar mcast-addr
69 on the interface with name
70 .Ar ifname .
71 .Pp
72 If an optional source
73 .Ar source-addr
74 is specified, a source-specific join will be performed;
75 if
76 .Nm
77 is already joined to the multicast address, the source
78 will be added to its filter list.
79 .Pp
80 .It Ic l Ar mcast-addr Ar ifname Op Ar source-addr
81 Leave the multicast address
82 .Ar mcast-addr
83 on the interface with address
84 .Ar ifname .
85 If a source
86 .Ar source-addr
87 is specified, only that source will be left.
88 .\"
89 .It Ic i Ar mcast-addr Ar ifname Ar n Ar source-addr ...
90 Set the socket with membership of
91 .Ar mcast-addr
92 on interface
93 .Ar ifname
94 to include filter mode, and add
95 .Ar n
96 sources beginning with
97 .Ar source-addr
98 to the inclusion filter list.
99 .\"
100 .It Ic e Ar mcast-addr Ar ifname Ar n Ar source-addr ...
101 Set the socket with membership of
102 .Ar mcast-addr
103 on interface
104 .Ar ifname
105 to exclude filter mode, and add
106 .Ar n
107 sources beginning with
108 .Ar source-addr
109 to the exclusion filter list.
110 .\"
111 .It Ic t Ar mcast-addr Ar ifname Ar source-addr
112 Set the socket with membership of
113 .Ar mcast-addr
114 on interface
115 .Ar ifname
116 to block traffic from source
117 .Ar source-addr .
118 .\"
119 .It Ic b Ar mcast-addr Ar ifname Ar source-addr
120 Set the socket with membership of
121 .Ar mcast-addr
122 on interface
123 .Ar ifname
124 to allow traffic from source
125 .Ar source-addr .
126 .\"
127 .Pp
128 .It Ic g Ar mcast-addr Ar ifname Ar n
129 Print
130 .Ar n
131 source filter entries for
132 .Ar mcast-addr
133 on interface
134 .Ar ifname .
135 .\"
136 .Pp
137 .It Ic f Ar filename
138 Read commands from the file
139 .Ar filename .
140 .It Ic s Ar n
141 Sleep for
142 .Ar n
143 seconds.
144 .It Ic ?\&
145 List legal commands.
146 .It Ic q
147 Quit the program.
148 .El
149 .Sh IMPLEMENTATION NOTES
150 For each command implemented by
151 .Nm ,
152 the address family of each argument must be identical; it is not possible
153 to mix IPv4 multicast memberships with IPv6, for example.
154 .Pp
155 To support IPv6, all commands have now changed to accept an interface
156 name rather than an interface address.
157 For IPv4, the program will perform
158 a lookup of the primary IP address based on the interface name.
159 This may fail if no primary IP address is assigned.
160 .Sh SEE ALSO
161 .Rs
162 .%A D. Thaler
163 .%A B. Fenner
164 .%A B. Quinn
165 .%T "Socket Interface Extensions for Multicast Filters"
166 .%O RFC 3678
167 .Re
168 .Sh AUTHORS
169 .An -split
170 .An "Bruce Simpson"
171 .An "Steve Deering"
172 .An "Wilbert De Graaf"