2 .\" Copyright (c) 2007-2009 Bruce Simpson.
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
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
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.
27 .\" $FreeBSD: src/usr.sbin/mtest/mtest.8,v 1.11 2009/04/29 09:50:04 bms Exp $
34 .Nd test multicast socket operations
41 is a small program for testing multicast socket operations.
43 It accepts the following commands, interactively, or as part of a scripted
44 input file (useful for automated testing):
45 .Bl -tag -width "a ifname e.e.e.e e.e.e.e" -compact -offset indent
48 .It Ic a Ar ifname Ar mac-addr
49 Join the link-layer group address
53 The group address should be in IEEE 802 MAC format,
54 delimited by colon (':') characters.
55 .It Ic d Ar ifname Ar mac-addr
56 Leave the link-layer group address
60 .It Ic m Ar ifname Ar 1/0
61 Set or reset ALLMULTI mode on interface
63 This option is deprecated and is now a no-op.
64 .\".It Ic p Ar ifname Ar 1/0
65 .\"Set or reset promiscuous mode on interface
68 .It Ic j Ar mcast-addr Ar ifname Op Ar source-addr
69 Join the multicast address
71 on the interface with name
76 is specified, a source-specific join will be performed;
79 is already joined to the multicast address, the source
80 will be added to its filter list.
82 .It Ic l Ar mcast-addr Ar ifname Op Ar source-addr
83 Leave the multicast address
85 on the interface with address
89 is specified, only that source will be left.
91 .It Ic i Ar mcast-addr Ar ifname Ar n Ar source-addr ...
92 Set the socket with membership of
96 to include filter mode, and add
98 sources beginning with
100 to the inclusion filter list.
102 .It Ic e Ar mcast-addr Ar ifname Ar n Ar source-addr ...
103 Set the socket with membership of
107 to exclude filter mode, and add
109 sources beginning with
111 to the exclusion filter list.
113 .It Ic t Ar mcast-addr Ar ifname Ar source-addr
114 Set the socket with membership of
118 to block traffic from source
121 .It Ic b Ar mcast-addr Ar ifname Ar source-addr
122 Set the socket with membership of
126 to allow traffic from source
130 .It Ic g Ar mcast-addr Ar ifname Ar n
133 source filter entries for
140 Read commands from the file
151 .Sh IMPLEMENTATION NOTES
152 For each command implemented by
154 the address family of each argument must be identical; it is not possible
155 to mix IPv4 multicast memberships with IPv6, for example.
157 To support IPv6, all commands have now changed to accept an interface
158 name rather than an interface address.
159 For IPv4, the program will perform
160 a lookup of the primary IP address based on the interface name.
161 This may fail if no primary IP address is assigned.
168 .%T "Socket Interface Extensions for Multicast Filters"
175 .An "Wilbert De Graaf"