aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1996-07-22 20:56:55 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1996-07-22 20:56:55 +0000
commit95a3d5341f8c650965ee37a28b284b1e506e9e6b (patch)
tree3c85919fe9d1ea2bacd76ac7fe4281f6c5122c45
parent1823680765faa251d4ecd9229988ba71fce9c175 (diff)
This commit was manufactured by cvs2svn to create tagvendor/SGI/sgi_routed_960722
'sgi_routed_960722'.
Notes
Notes: svn path=/vendor/SGI/dist/; revision=17250 svn path=/vendor/SGI/sgi_routed_960722/; revision=17251; tag=vendor/SGI/sgi_routed_960722
-rw-r--r--usr.sbin/routed/Makefile.inc1
-rw-r--r--usr.sbin/routed/rttrace/Makefile6
-rw-r--r--usr.sbin/routed/rttrace/rttrace.c146
3 files changed, 0 insertions, 153 deletions
diff --git a/usr.sbin/routed/Makefile.inc b/usr.sbin/routed/Makefile.inc
deleted file mode 100644
index 10fa13f1ed80..000000000000
--- a/usr.sbin/routed/Makefile.inc
+++ /dev/null
@@ -1 +0,0 @@
-.include "../../Makefile.inc"
diff --git a/usr.sbin/routed/rttrace/Makefile b/usr.sbin/routed/rttrace/Makefile
deleted file mode 100644
index df19d5c61b44..000000000000
--- a/usr.sbin/routed/rttrace/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/5/93
-
-PROG= rttrace
-NOMAN= noman
-
-.include <bsd.prog.mk>
diff --git a/usr.sbin/routed/rttrace/rttrace.c b/usr.sbin/routed/rttrace/rttrace.c
deleted file mode 100644
index 0d8ac6224ce7..000000000000
--- a/usr.sbin/routed/rttrace/rttrace.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*-
- * Copyright (c) 1983, 1988, 1993
- * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1983, 1988, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)trace.c 8.1 (Berkeley) 6/5/93";
-#endif /* not lint */
-
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#ifdef sgi
-#include <bstring.h>
-#endif
-#include <sys/param.h>
-#include <sys/protosw.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <protocols/routed.h>
-#include <arpa/inet.h>
-
-#ifndef sgi
-#define _HAVE_SIN_LEN
-#endif
-
-struct sockaddr_in myaddr;
-char packet[MAXPACKETSIZE];
-
-int
-main(int argc,
- char **argv)
-{
- int size, s;
- struct sockaddr_in router;
- char *tgt;
- register struct rip *msg = (struct rip *)packet;
- struct hostent *hp;
-
- if (argc < 2) {
-usage:
- printf("usage: on filename host1 host2 ...\n"
- " or: off host1 host2 ...\n");
- exit(1);
- }
- s = socket(AF_INET, SOCK_DGRAM, 0);
- if (s < 0) {
- perror("socket");
- exit(2);
- }
- myaddr.sin_family = AF_INET;
-#ifdef _HAVE_SIN_LEN
- myaddr.sin_len = sizeof(myaddr);
-#endif
- myaddr.sin_port = htons(IPPORT_RESERVED-1);
- while (bind(s, (struct sockaddr *)&myaddr, sizeof(myaddr)) < 0) {
- if (errno != EADDRINUSE
- || myaddr.sin_port == 0) {
- perror("bind");
- exit(2);
- }
- myaddr.sin_port = htons(ntohs(myaddr.sin_port)-1);
- }
-
- msg->rip_vers = RIPVERSION;
- size = sizeof(int);
-
- argv++, argc--;
- if (!strcmp(*argv, "on")) {
- msg->rip_cmd = RIPCMD_TRACEON;
- if (--argc <= 1)
- goto usage;
- strcpy(msg->rip_tracefile, *++argv);
- size += strlen(msg->rip_tracefile);
-
- } else if (!strcmp(*argv, "off")) {
- msg->rip_cmd = RIPCMD_TRACEOFF;
-
- } else {
- goto usage;
- }
- argv++, argc--;
-
- bzero(&router, sizeof(router));
- router.sin_family = AF_INET;
-#ifdef _HAVE_SIN_LEN
- router.sin_len = sizeof(router);
-#endif
- router.sin_port = htons(RIP_PORT);
-
- do {
- tgt = argc > 0 ? *argv++ : "localhost";
- router.sin_family = AF_INET;
- router.sin_addr.s_addr = inet_addr(tgt);
- if (router.sin_addr.s_addr == -1) {
- hp = gethostbyname(tgt);
- if (hp == 0) {
- herror(tgt);
- continue;
- }
- bcopy(hp->h_addr, &router.sin_addr, hp->h_length);
- }
- if (sendto(s, packet, size, 0,
- (struct sockaddr *)&router, sizeof(router)) < 0)
- perror(*argv);
- } while (--argc > 0);
-
- return 0;
-}