mtools
This is a cleaned up version of mtools from the University of Virginia's Multimedia Networks Group, with added IPv6 and optional SSM support.
The tools msend(8) and mreceive(8)
can be particulary useful when debugging multicast setups.
Remember, when routing multicast, always check the TTL!
NAME
msend- send UDP messages to a multicast groupmreceive- receive UDP multicast messages and display them
SYNOPSIS
msend [-46hnqv] [-c num] [-g group] [-p port] [-join] [-t TTL] [-i address]
[-I interface] [-P period] [-text "text"]
mreceive [-46hnqv] [-s source ] [-g group] [-p port] [-i ip] ... [-i ip]
[-I interface]
DESCRIPTION
msend continuously sends UDP packets to the multicast group specified
by the -g and -p options.
mreceive joins a multicast group specified by the -g and -p
options, then receives and displays the multicast packets sent to this
group:port combination by the msend command.
OPTIONS
-
-4Select IPv4 test group, use with
-Iwhen not using-ior any group. This is the default. See-6for an example. -
-6Select IPv6 test group, use with
-Iwhen not using-ior any group. Example:$ msend -6 -I eth0 Now sending to multicast group: [ff2e::1]:4444 Sending msg 1, TTL 1, to [ff2e::1]:4444: ... -
-c NUMNumber of packets to send, default: unlimited.
-
-s SOURCESource filtering of multicast UDP traffic, a.k.a., source-specific multicast (SSM). A single IPv4/IPv6 address can be given atm. By default, no source filtering is done, mtools default to ASM.
-
-g GROUPSpecify the IP multicast group address to which packets are sent, or received. The default group is 224.1.1.1 for IPv4 and ff2e::1 for IPv6.
-
-p PORTSpecify the UDP port number used by the multicast group. The default port number is 4444.
-
-joinMulticast sender will join join the multicast group. By default, a multicast sender does not join the group.
-
-t TTLSpecify the TTL (1-255) value in the message sent by
msend. You must increase this if you want to route the traffic, otherwise the first router will drop the packets! The default value is 1. -
-i ADDRESSSpecify the IP address of the interface to be used to send the packets. For
mreceiveone or more interfaces can be given. The default value isINADDR_ANYwhich implies that the default interface selected by the system will be used. -
-I INTERFACESpecify the interface to send on. Can be specified as an alternative to
-i. -
-P PERIODSpecify the interval in milliseconds between two transmitted packets. The default value is 1000 milliseconds.
-
-qQuiet mode, don't print sending or receiving messages. Errors are still printed.
-
-text "text"Specify a message text which is sent as the payload of the packets and is displayed by the mreceive(8) command. The default value is an empty string.
-
-nInterpret the contents of the message text as a number instead of a string of characters. Use
mreceive -non the other end to interpret the message text correctly. -
-vPrint version information.
-
-hPrint the command usage.
BUILD & INSTALL
The build system is a plain Makefile with the following environment variables to control the build and install process:
CC: possible to override default compiler, alt. toCROSSCROSS: set when cross compiling, e.g.CROSS=aarch64-linux-gnu-prefix: install prefix, default/usr/local
Example:
$ make all
$ make install prefix=/usr
Origin & References
This is the continuation of mtools, initially called mSendReceive, written by Jianping Wang, Yvan Pointurier, and Jörg Liebeherr while at University of Virginia's Multimedia Networks Group.
The project is maintained by Joachim Wiberg at GitHub. Please file bug reports, clone and send pull requests for bug fixes and proposed extensions.
As a work of the Multimedia Networks Group, University of Virginia, this project is in the public domain within the United States.
Additionally, we waive copyright and related rights in the work worldwide through the CC0 1.0 Universal public domain dedication.
CC0 1.0 Universal Summary
This is a summary of the Legal Code (read the full text).
No Copyright
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
Other Information
In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.
Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer.