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.
32 .Nd test multicast socket operations
39 is a small program for testing multicast socket operations.
41 It accepts the following commands, interactively, or as part of a scripted
42 input file (useful for automated testing):
44 .Bl -tag -width "a ifname e.e.e.e e.e.e.e" -compact -offset indent
46 .It Ic a Ar ifname Ar mac-addr
47 Join the link-layer group address
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
58 .It Ic m Ar ifname Ar 1/0
59 Set or reset ALLMULTI mode on interface
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
66 .It Ic j Ar mcast-addr Ar ifname Op Ar source-addr
67 Join the multicast address
69 on the interface with name
74 is specified, a source-specific join will be performed;
77 is already joined to the multicast address, the source
78 will be added to its filter list.
80 .It Ic l Ar mcast-addr Ar ifname Op Ar source-addr
81 Leave the multicast address
83 on the interface with address
87 is specified, only that source will be left.
89 .It Ic i Ar mcast-addr Ar ifname Ar n Ar source-addr ...
90 Set the socket with membership of
94 to include filter mode, and add
96 sources beginning with
98 to the inclusion filter list.
100 .It Ic e Ar mcast-addr Ar ifname Ar n Ar source-addr ...
101 Set the socket with membership of
105 to exclude filter mode, and add
107 sources beginning with
109 to the exclusion filter list.
111 .It Ic t Ar mcast-addr Ar ifname Ar source-addr
112 Set the socket with membership of
116 to block traffic from source
119 .It Ic b Ar mcast-addr Ar ifname Ar source-addr
120 Set the socket with membership of
124 to allow traffic from source
128 .It Ic g Ar mcast-addr Ar ifname Ar n
131 source filter entries for
138 Read commands from the file
149 .Sh IMPLEMENTATION NOTES
150 For each command implemented by
152 the address family of each argument must be identical; it is not possible
153 to mix IPv4 multicast memberships with IPv6, for example.
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.
165 .%T "Socket Interface Extensions for Multicast Filters"
172 .An "Wilbert De Graaf"