Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/mtrace6 we shouldn't be shipping it, pim6[sd]d is n...
details: https://anonhg.NetBSD.org/src/rev/15a8b03fff9d
branches: trunk
changeset: 534656:15a8b03fff9d
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Aug 01 03:38:01 2002 +0000
description:
we shouldn't be shipping it, pim6[sd]d is not part of our base tree
diffstat:
usr.sbin/mtrace6/Makefile | 11 -
usr.sbin/mtrace6/mtrace6.8 | 115 -------
usr.sbin/mtrace6/mtrace6.c | 721 ---------------------------------------------
3 files changed, 0 insertions(+), 847 deletions(-)
diffs (truncated from 859 to 300 lines):
diff -r 5872e04fad30 -r 15a8b03fff9d usr.sbin/mtrace6/Makefile
--- a/usr.sbin/mtrace6/Makefile Thu Aug 01 00:17:31 2002 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-# $NetBSD: Makefile,v 1.3 2000/02/26 11:44:28 itojun Exp $
-
-PROG= mtrace6
-MAN= mtrace6.8
-
-BINMODE=4555
-BINOWN= root
-
-CPPFLAGS+= -I${.CURDIR}/../pim6sd -DHAVE_GETIFADDRS
-
-.include <bsd.prog.mk>
diff -r 5872e04fad30 -r 15a8b03fff9d usr.sbin/mtrace6/mtrace6.8
--- a/usr.sbin/mtrace6/mtrace6.8 Thu Aug 01 00:17:31 2002 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-.\" $NetBSD: mtrace6.8,v 1.4 2002/02/02 01:19:48 wiz Exp $
-.\" $KAME: mtrace6.8,v 1.5 2000/12/04 07:02:27 itojun Exp $
-.\"
-.\" Copyright (C) 1999 WIDE Project.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of the project nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd September 12, 1999
-.Dt MTRACE6 8
-.Os
-.Sh NAME
-.Nm mtrace6
-.Nd print IPv6 multicast path from a source to
-a receiver
-.Sh SYNOPSIS
-.Nm
-.Op Fl d Ar destination
-.Op Fl g Ar gateway
-.Op Fl h Ar hops
-.Op Fl i Ar interface
-.Op Fl m Ar maxhops
-.Op Fl n
-.Op Fl r Ar response_addr
-.Op Fl w Ar waittime
-.Ar source
-.Ar group
-.Sh DESCRIPTION
-.Nm
-utilizes a tracing feature implemented in multicast routers that is
-accessed via an extension to the MLD protocol. A trace query is
-passed hop-by-hop along the reverse path from the
-.Ar destination
-to the
-.Ar source ,
-collecting hop addresses, packet counts, and routing error conditions
-along the path, and then the response is returned to the requestor.
-.Sh OPTIONS
-.Bl -tag -width Ds
-.It Fl d Ar destination
-Specifies the multicast receiver that the query wants to trace.
-It is the host running
-.Nm mtrace6
-by default.
-.It Fl g Ar gateway
-Send the trace query via unicast directly to the multicast router
-.Ar gateway .
-The unicast router must be the last-hop router on the path from the
-intended source to the receiver.
-.Ar gateway
-can also be a multicast address that the last hop router joins.
-.It Fl h Ar hops
-Set
-.Ar hops
-to the IPv6 hop limit field of query packets. The default is 64.
-.It Fl i Ar interface
-Specifies the local interface (on a multi-homed host) for sending
-the trace query and as the default for the receiver and the response
-destination.
-.It Fl m Ar maxhops
-Set to
-.Ar maxhops
-to the maximum number of hops that will be traced from the receiver
-back toward the source. The default is 127 hops.
-.It Fl n
-Print hop addresses numerically rather than symbolically and numerically
-(saves a nameserver address-to-name lookup for each router found on
-the path).
-.It Fl r Ar response_addr
-Specify the host that the trace response sends to.
-By default, the response will send to the host running
-.Nm mtrace6 .
-.It Fl w Ar waittime
-Set the time to wait for a trace response to
-.Ar waittime
-seconds. The default is 3 seconds.
-.El
-.Sh SEE ALSO
-.Xr mtrace 8 ,
-.Xr pim6dd 8 ,
-.Xr pim6sd 8
-.Sh HISTORY
-The
-.Nm mtrace6
-command first appeared in WIDE/KAME IPv6 protocol stack kit.
-.Sh BUGS
-Multicast trace for IPv6 is experimental. MLD types for query and
-response, and packet format are not officially defined.
-.Pp
-.Ar waittime
-specified by the
-.Fl w
-option is currently meaningless.
diff -r 5872e04fad30 -r 15a8b03fff9d usr.sbin/mtrace6/mtrace6.c
--- a/usr.sbin/mtrace6/mtrace6.c Thu Aug 01 00:17:31 2002 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,721 +0,0 @@
-/* $NetBSD: mtrace6.c,v 1.7 2002/03/04 01:38:32 wiz Exp $ */
-/* $KAME: mtrace6.c,v 1.16 2000/12/04 06:45:34 itojun Exp $ */
-
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/select.h>
-#include <sys/queue.h>
-
-#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
-#include <net/if_var.h>
-#endif
-
-#include <netinet/in.h>
-
-#include <netinet6/in6_var.h>
-#include <netinet/icmp6.h>
-
-#include <string.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <netdb.h>
-#include <err.h>
-#ifdef HAVE_GETIFADDRS
-#include <ifaddrs.h>
-#endif
-
-#include "trace.h"
-
-static char *gateway, *intface, *source, *group, *receiver, *destination;
-static int mldsoc, hops = 64, maxhops = 127, waittime = 3, querylen, opt_n;
-static struct sockaddr *gw_sock, *src_sock, *grp_sock, *dst_sock, *rcv_sock;
-static char *querypacket;
-static char frombuf[1024]; /* XXX: enough size? */
-
-int main __P((int, char *[]));
-static char *proto_type __P((u_int));
-static char *pr_addr __P((struct sockaddr *, int));
-static void setqid __P((int, char *));
-static void mtrace_loop __P((void));
-static char *str_rflags __P((int));
-static void show_ip6_result __P((struct sockaddr_in6 *, int));
-static void show_result __P((struct sockaddr *, int));
-static void set_sockaddr __P((char *, struct addrinfo *, struct sockaddr *));
-static int is_multicast __P((struct sockaddr *));
-static char *all_routers_str __P((int));
-static int ip6_validaddr __P((char *, struct sockaddr_in6 *));
-static int get_my_sockaddr __P((int, struct sockaddr *));
-static void set_hlim __P((int, struct sockaddr *, int));
-static void set_join __P((int, char *, struct sockaddr *));
-static void set_filter __P((int, int));
-static void open_socket __P((void));
-static void make_ip6_packet __P((void));
-static void make_packet __P((void));
-static void usage __P((void));
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- int op;
-
- /* get parameters */
- while((op = getopt(argc, argv, "d:g:h:i:m:nr:w:")) != -1) {
- switch(op) {
- case 'd':
- destination = optarg;
- break;
- case 'g':
- gateway = optarg;
- break;
- case 'h':
- hops = atoi(optarg);
- if (hops < 0 || hops > 255) {
- warnx("query/response hops must be between 0 and 255");
- usage();
- }
- break;
- case 'i':
- intface = optarg;
- break;
- case 'm':
- maxhops = atoi(optarg);
- if (maxhops < 0 || maxhops > 255) {
- warnx("maxhops must be between 0 and 255");
- usage();
- }
- break;
- case 'n':
- opt_n = 1;
- break;
- case 'r':
- receiver = optarg;
- break;
- case 'w':
- waittime = atoi(optarg);
- break;
- case '?':
- default:
- usage();
- break;
- }
- }
- argc -= optind;
- argv += optind;
-
- if (argc < 2)
- usage();
- source = argv[0];
- group = argv[1];
-
- /* examine addresses and open a socket */
- open_socket();
-
- /* construct a query packet according to the specified parameters */
- make_packet();
-
- mtrace_loop();
- exit(0);
- /*NOTREACHED*/
-}
-
-static char *
-proto_type(type)
- u_int type;
-{
- static char buf[80];
-
- switch (type) {
Home |
Main Index |
Thread Index |
Old Index