The goal of this implementation is to be a full implementation of IGMPv3. Full includes compatibility with IGMPv1 and IGMPv2, support for the protocol independent API and merged reports. The sources have been tested and are used at several places. Since IGMPv3 is still a draft, it is very likeley there will be some updates. Bugs, of course ... they are also a reason to update the sources. I will update this site and the bundle whenever I update the sources.
The implementation consisted of several stages:
Installation using the patches:
FreeBSD 4.0 patches:
igmpv3/freebsd_4.0_igmpv3_src.patch
igmpv3/freebsd_4.0_igmpv3_inc.patch
FreeBSD 4.1 patches:
igmpv3/freebsd_4.1_igmpv3_src.patch
igmpv3/freebsd_4.1_igmpv3_inc.patch
FreeBSD 4.2 patches:
I fixed this patch at 03/16/2001 (the previous patch undid some 4.1-4.2 changes)
igmpv3/freebsd_4.2_igmpv3_src.patch
igmpv3/freebsd_4.2_igmpv3_inc.patch
To install, store these files in some directory, assuming it's your home
directory. Now execute these commands as superuser:
cd /usr/src/
patch -p < ~/*src.patch
cd /usr/include/
patch -p < ~/*inc.patch
Building the kernel:
To build the kernel, assuming your workstation is has the i386 architecture
inside, execute the commands:
cd /usr/src/sys/i386/conf
cp GENERIC IGMPV3
/usr/sbin/config -g IGMPV3
cd /usr/src/sys/compile/IGMPV3
make depend && make
make install
The application can be started without arguments. Entering the command '?'
will display a list of commands, similar to 'mtest.c'. It includes several new
commands in order to specify source filters. Examples of these commands are:
# join a the group 230.0.0.0 on the default interface (0)
j 230.0.0.10 0
# block traffic on that group from 192.168.0.12
b 230.0.0.10 0 192.168.0.12
# also block traffic from 192.168.0.14
b 230.0.0.10 0 192.168.0.14
# show the source filter of this group, at most 5 sources
g 230.0.0.10 0 5
# now allow traffic from 192.168.0.12 again
t 230.0.0.10 0 192.168.0.12
# leave the group
l 230.0.0.10 0
# read commands from file t1.txt (see below)
f t1.txt
The commands return the error as returned by the API. If the arguments for
the command are not as expected, the application returns '-1' (which simplified
parsing to me).
As shown above, it's also possible to read commands from a file, which proved
to be useful to me in order to automate testing. Such a file could look like:
# Join a group in include mode, with 2 sources
i 230.0.0.12 0 2
192.168.0.12
192.168.0.14
# show the filter mode of this group, and retrieve at most 1 source
g 230.0.0.12 0 2
# wait for 1 second
s 1
# block traffic from 192.168.0.14
b 230.0.0.12 0 192.168.0.14
# quit
q
IGMPv3 is rather complex if compared to IGMPv1 and IGMPv2. An example file that could (depending on your luck because of timing issues) is this file. The file itself shows 3 igmp messages that could be generated. Below you can find an source file that can dump IGMP reports (if started as root).
Here are some other source files that might be useful to you:
| pmsft.c | pmsft [file] | As described above, using the Protocl Independent API. Compiles on FreeBSD and Linux. |
|
msft.c
msft.exe |
msft [file] | The same kind of application as pmsft using the protocol dependent (IPv4) API instead. The good news, however, is that it compiles on those Windows vesions that support IGMPv3. At this moment that's the successor of W2K (Whistler) only. |
| mshow.c | mshow <group> <port> <mode[e|i]> *[ip adresses] | Join a multicast group using a source filter and receive and display a line of text. |
| ctalk.c | ctalk <ip group> <port> +<message> | Send a message to that group on the (udp) port. Compiles (and works) on Windows too. |
| UDPSend.java | java UDPSend <ip group> <port> <message> | Send a message to that group on the (udp) port. |
| qi3.c | qi3 | Generate IGMP queries, either v1, v2 or v3. It will ask you for the version, the group and in v3 a number of sources. (Unfortunately the generated addresses are still hardcoded.) |
References:
Contacts:
Whenever you want more information on this implementation, or want to provide feedback, please contact me: wilbert@kloosterhof.com