1.\" Copyright (c) 2008 George V. Neville-Neil 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.Dd April 3, 2008 26.Dt MCTEST 1 27.Os 28.Sh NAME 29.Nm mctest 30.Nd "multicast test" 31.Sh SYNOPSIS 32.Nm 33.Op Fl i Ar interface 34.Op Fl g Ar group 35.Op Fl b Ar base port 36.Op Fl n Ar number 37.Op Fl s Ar size 38.Op Fl t Ar inter-packet gap 39.Op Fl M Ar number of clients (source only) 40.Op Fl m Ar my client number (sink only) 41.Op Fl r 42.Sh DESCRIPTION 43The 44.Nm 45command implements a multicast test which involves a source 46and a sink. 47The source sends packets to a pre-configured 48multicast address over the interface given as a command line 49argument. 50The sink listens for multicast packets, records 51the time at which they are received and then reflects them back 52over unicast to the source. 53When the source has captured all 54the reflected packets it prints out the round trip time of each. 55.Pp 56The source prints out the round trip time of packets sent to the 57sinks. 58The sink prints out the time between the packets received. 59.Pp 60The options are as follows: 61.Bl -tag -width ".Fl i Ar interface" 62.It Fl i Ar interface 63Network interface, which can be found with 64.Xr ifconfig 8 . 65.It Fl g Ar group 66Multicast group. 67.It Fl b Ar base port 68Port on which to listen. 69.It Fl s Ar size 70Packet size in bytes. 71.It Fl n Ar number 72Number of packets. 73.It Fl t Ar gap 74Inter-packet gap in nanoseconds. 75.It Fl M Ar clients 76The number of clients that are listening. 77.It Fl m Ar my number 78The client's number 0, 1, etc. 79.It Fl r 80This version of 81.Nm 82is the receiver aka the sink. 83This option MUST 84only be used with one copy of the program at a time. 85.El 86.Sh EXAMPLES 87The following is an example of a typical usage 88of the 89.Nm 90command: 91.Pp 92Source 93.Dl "mctest -i em0 -M 1 -s 1024 -n 100 -t 1" 94Sink 95.Dl "mctest -i em0 -m 0 -s 1024 -n 100 -r" 96.Pp 97Send 100 packets of 1024 bytes, with an inter-packet gap of 1 nanosecond. 98.Pp 99Gaps are measured with 100.Xr nanosleep 2 , 101and so are not accurate down to nanoseconds 102but depend on the setting of 103.Va kern.hz . 104.Sh SEE ALSO 105.Xr netstat 1 , 106.Xr nanosleep 2 , 107.Xr ifconfig 8 108.Sh HISTORY 109The 110.Nm 111program first appeared in 112.Fx 7.0 . 113.Sh AUTHORS 114This 115manual page was written by 116.An George V. Neville-Neil Aq Mt gnn@FreeBSD.org . 117.Sh BUGS 118Should be reported to the author or to 119.Aq Mt net@FreeBSD.org . 120