summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2010-02-25 14:36:50 +0000
committerru <ru@FreeBSD.org>2010-02-25 14:36:50 +0000
commita7d34933344bc3694ee29ba02e0e388dbd855ca9 (patch)
tree815315f84e2ec0c4fad243007c13a618b2f65d35 /tools
parent1b75a98556931f83129a222260dbc32a104b8bc3 (diff)
downloadFreeBSD-src-a7d34933344bc3694ee29ba02e0e388dbd855ca9.zip
FreeBSD-src-a7d34933344bc3694ee29ba02e0e388dbd855ca9.tar.gz
Moved mcgrab(1) into a separate directory -- our .mk infrastructure
doesn't currently have support for building multiple programs in a single makefile. While here, fixed manpages and makefiles (missing dependencies).
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/mcgrab/Makefile6
-rw-r--r--tools/tools/mcgrab/mcgrab.1 (renamed from tools/tools/mctest/mcgrab.1)29
-rw-r--r--tools/tools/mcgrab/mcgrab.cc (renamed from tools/tools/mctest/mcgrab.cc)0
-rw-r--r--tools/tools/mctest/Makefile8
-rw-r--r--tools/tools/mctest/mctest.152
5 files changed, 55 insertions, 40 deletions
diff --git a/tools/tools/mcgrab/Makefile b/tools/tools/mcgrab/Makefile
new file mode 100644
index 0000000..a470227
--- /dev/null
+++ b/tools/tools/mcgrab/Makefile
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+PROG_CXX= mcgrab
+CFLAGS+= -I${.CURDIR}/../mctest
+
+.include <bsd.prog.mk>
diff --git a/tools/tools/mctest/mcgrab.1 b/tools/tools/mcgrab/mcgrab.1
index f2b8b34..1b83f50 100644
--- a/tools/tools/mctest/mcgrab.1
+++ b/tools/tools/mcgrab/mcgrab.1
@@ -25,7 +25,7 @@
.\" $FreeBSD$
.\"
.Dd July 9, 2008
-.Dt mcgrab 1
+.Dt MCGRAB 1
.Os
.Sh NAME
.Nm mcgrab
@@ -36,23 +36,27 @@
.Op Fl g Ar group
.Op Fl n Ar number
.Sh DESCRIPTION
-The
+The
.Nm
command implements a multicast test which grabs and holds
-N multicast addresses. The purpose of the test is to see what
+N multicast addresses.
+The purpose of the test is to see what
happens when a network interface is no longer able to filter
-multicasts in hardware and has to switch to promiscious or
-multicast promiscious mode. A successful test does not have any
+multicasts in hardware and has to switch to promiscuous or
+multicast promiscuous mode.
+A successful test does not have any
result, but an unsuccessful test will have deleterious side effects.
Packet size in bytes.
The options are as follows:
-.Bl -tag -width ".Fl d Ar argument"
+.Bl -tag -width ".Fl i Ar interface"
.It Fl i Ar interface
-Network interface, which can be found with ifconfig(1).
-.It Fl i Ar group
-Multicast group
+Network interface, which can be found with
+.Xr ifconfig 8 .
+.It Fl g Ar group
+Multicast group.
.It Fl n Ar number
Number of groups to join.
+.El
.Sh EXAMPLES
The following is an example of a typical usage
of the
@@ -62,9 +66,9 @@ command:
.Dl "mcgrab -i em0 -g 239.255.255.1 -n 1024"
.Sh SEE ALSO
.Xr mctest 1 ,
-.Xr ifconfig 8 ,
.Xr netstat 1 ,
-.Xr nanosleep 2 .
+.Xr nanosleep 2 ,
+.Xr ifconfig 8
.Sh HISTORY
The
.Nm
@@ -75,4 +79,5 @@ This
manual page was written by
.An George V. Neville-Neil Aq gnn@FreeBSD.org .
.Sh BUGS
-Should be reported to the author or to net@freebsd.org.
+Should be reported to the author or to
+.Aq net@FreeBSD.org .
diff --git a/tools/tools/mctest/mcgrab.cc b/tools/tools/mcgrab/mcgrab.cc
index 5522f30..5522f30 100644
--- a/tools/tools/mctest/mcgrab.cc
+++ b/tools/tools/mcgrab/mcgrab.cc
diff --git a/tools/tools/mctest/Makefile b/tools/tools/mctest/Makefile
index 4de93c3..6edaf89 100644
--- a/tools/tools/mctest/Makefile
+++ b/tools/tools/mctest/Makefile
@@ -1,11 +1,7 @@
-#
# $FreeBSD$
-#
-# A Makefile that builds both the mctest program and its manual page.
PROG_CXX= mctest
-PROG_CXX= mcgrab
-
-LDADD+= -lpthread
+DPADD= ${LIBPTHREAD}
+LDADD= -lpthread
.include <bsd.prog.mk>
diff --git a/tools/tools/mctest/mctest.1 b/tools/tools/mctest/mctest.1
index 5eb7e5b..c64a5f8 100644
--- a/tools/tools/mctest/mctest.1
+++ b/tools/tools/mctest/mctest.1
@@ -25,7 +25,7 @@
.\" $FreeBSD$
.\"
.Dd April 3, 2008
-.Dt mctest 1
+.Dt MCTEST 1
.Os
.Sh NAME
.Nm mctest
@@ -40,29 +40,34 @@
.Op Fl t Ar inter-packet gap
.Op Fl M Ar number of clients (source only)
.Op Fl m Ar my client number (sink only)
-.Op Fl r
+.Op Fl r
.Sh DESCRIPTION
-The
+The
.Nm
-command implements a multicast test which involved a source
-and a sink. The source sends packets to a pre-configured
-multicast address over the interface given as a command line
-argument. The sink listens for multicast packets, records
-the time at which they're received and then reflects them back
-over unicast to the source. When the source has captured all
+command implements a multicast test which involves a source
+and a sink.
+The source sends packets to a pre-configured
+multicast address over the interface given as a command line
+argument.
+The sink listens for multicast packets, records
+the time at which they are received and then reflects them back
+over unicast to the source.
+When the source has captured all
the reflected packets it prints out the round trip time of each.
.Pp
The source prints out the round trip time of packets sent to the
-sinks. The sink prints out the time between the packets received.
+sinks.
+The sink prints out the time between the packets received.
.Pp
The options are as follows:
-.Bl -tag -width ".Fl d Ar argument"
+.Bl -tag -width ".Fl i Ar interface"
.It Fl i Ar interface
-Network interface, which can be found with ifconfig(1).
+Network interface, which can be found with
+.Xr ifconfig 8 .
.It Fl g Ar group
-Multicast group
+Multicast group.
.It Fl b Ar base port
-Port on which to listen
+Port on which to listen.
.It Fl s Ar size
Packet size in bytes.
.It Fl n Ar number
@@ -70,14 +75,15 @@ Number of packets.
.It Fl t Ar gap
Inter-packet gap in nanoseconds.
.It Fl M Ar clients
-The number of clients that are listening
+The number of clients that are listening.
.It Fl m Ar my number
The client's number 0, 1, etc.
.It Fl r
This version of
.Nm
-is the receiver aka the sink. This option MUST
-only be used with one copy of the program at a time.
+is the receiver aka the sink.
+This option MUST
+only be used with one copy of the program at a time.
.El
.Sh EXAMPLES
The following is an example of a typical usage
@@ -92,14 +98,15 @@ Sink
.Pp
Send 100 packets of 1024 bytes, with an inter-packet gap of 1 nanosecond.
.Pp
-Gaps are measured with
+Gaps are measured with
.Xr nanosleep 2 ,
and so are not accurate down to nanoseconds
-but depend on the setting of kern.hz.
+but depend on the setting of
+.Va kern.hz .
.Sh SEE ALSO
-.Xr ifconfig 8 ,
.Xr netstat 1 ,
-.Xr nanosleep 2 .
+.Xr nanosleep 2 ,
+.Xr ifconfig 8
.Sh HISTORY
The
.Nm
@@ -110,4 +117,5 @@ This
manual page was written by
.An George V. Neville-Neil Aq gnn@FreeBSD.org .
.Sh BUGS
-Should be reported to the author or to net@freebsd.org.
+Should be reported to the author or to
+.Aq net@FreeBSD.org .
OpenPOWER on IntegriCloud