new rcsid format. small cleanup

This commit is contained in:
glass 1995-03-26 21:45:18 +00:00
parent 843a1dd6bf
commit bbb6bf7c90
5 changed files with 71 additions and 12 deletions

View File

@ -1,5 +1,5 @@
# from: @(#)Makefile 8.1 (Berkeley) 6/6/93
# $Id: Makefile,v 1.4 1994/12/22 11:44:41 cgd Exp $
# $NetBSD: Makefile,v 1.5 1995/03/26 21:45:18 glass Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= traceroute
MAN= traceroute.8

View File

@ -1,4 +1,5 @@
#!/bin/awk -f
# $NetBSD: mean.awk,v 1.3 1995/03/26 21:45:20 glass Exp $
#
# Copyright (c) 1990, 1993
# The Regents of the University of California. All rights reserved.
@ -35,7 +36,58 @@
# SUCH DAMAGE.
#
# from: @(#)mean.awk 8.1 (Berkeley) 6/6/93
# $Id: mean.awk,v 1.2 1994/05/16 19:15:58 mycroft Exp $
# $Id: mean.awk,v 1.3 1995/03/26 21:45:20 glass Exp $
#
/^ *[0-9]/ {
# print out the average time to each hop along a route.
tottime = 0; n = 0;
for (f = 5; f <= NF; ++f) {
if ($f == "ms") {
tottime += $(f - 1)
++n
}
}
if (n > 0)
print $1, tottime/n, median
}
#!/bin/awk -f
#
# Copyright (c) 1990, 1993
# The Regents of the University of California. All rights reserved.
#
# This code is derived from software contributed to Berkeley by
# Van Jacobson.
#
# 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.
#
# @(#)mean.awk 8.1 (Berkeley) 6/6/93
# $NetBSD: mean.awk,v 1.3 1995/03/26 21:45:20 glass Exp $
#
/^ *[0-9]/ {
# print out the average time to each hop along a route.

View File

@ -1,4 +1,5 @@
#!/bin/awk -f
# $NetBSD: median.awk,v 1.3 1995/03/26 21:45:21 glass Exp $
#
# Copyright (c) 1990, 1993
# The Regents of the University of California. All rights reserved.
@ -35,7 +36,7 @@
# SUCH DAMAGE.
#
# from: @(#)median.awk 8.1 (Berkeley) 6/6/93
# $Id: median.awk,v 1.2 1994/05/16 19:15:59 mycroft Exp $
# $Id: median.awk,v 1.3 1995/03/26 21:45:21 glass Exp $
#
/^ *[0-9]/ {
# print out the median time to each hop along a route.

View File

@ -1,3 +1,5 @@
.\" $NetBSD: traceroute.8,v 1.5 1995/03/26 21:45:22 glass Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@ -33,7 +35,6 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)traceroute.8 8.1 (Berkeley) 6/6/93
.\" $Id: traceroute.8,v 1.4 1995/01/04 04:28:18 mycroft Exp $
.\"
.Dd June 6, 1993
.Dt TRACEROUTE 8

View File

@ -1,3 +1,5 @@
/* $NetBSD: traceroute.c,v 1.8 1995/03/26 21:45:23 glass Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@ -41,8 +43,11 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
/*static char sccsid[] = "from: @(#)traceroute.c 8.1 (Berkeley) 6/6/93";*/
static char *rcsid = "$Id: traceroute.c,v 1.7 1995/03/21 14:29:14 mycroft Exp $";
#if 0
static char sccsid[] = "@(#)traceroute.c 8.1 (Berkeley) 6/6/93";*/
#else
static char rcsid[] = "$NetBSD: traceroute.c,v 1.8 1995/03/26 21:45:23 glass Exp $";
#endif
#endif /* not lint */
/*
@ -319,7 +324,7 @@ main(argc, argv)
hp = gethostbyname(optarg);
if (hp == 0)
errx(1, "unknown host %s", optarg);
bcopy(hp->h_addr, &gw, 4);
memcpy(&gw, hp->h_addr, 4);
}
gateway[lsrr++].s_addr = gw;
if (lsrr == 1)
@ -378,7 +383,7 @@ main(argc, argv)
setlinebuf (stdout);
(void) bzero((char *)&to, sizeof(struct sockaddr));
(void) memset((char *)&to, 0, sizeof(struct sockaddr));
to.sin_family = AF_INET;
to.sin_addr.s_addr = inet_addr(*argv);
if (to.sin_addr.s_addr != -1)
@ -388,7 +393,7 @@ main(argc, argv)
if (hp == 0)
errx(1, "unknown host %s", *argv);
to.sin_family = hp->h_addrtype;
bcopy(hp->h_addr, (caddr_t)&to.sin_addr, hp->h_length);
memcpy((caddr_t)&to.sin_addr, hp->h_addr, hp->h_length);
hostname = hp->h_name;
}
if (*++argv)
@ -401,7 +406,7 @@ main(argc, argv)
outpacket = (u_char *)malloc(datalen);
if (outpacket == 0)
err(1, "malloc");
(void) bzero(outpacket, datalen);
(void) memset(outpacket, 0, datalen);
ip = (struct ip *)outpacket;
if (lsrr != 0) {
@ -459,7 +464,7 @@ main(argc, argv)
(char *)&on, sizeof(on));
if (source) {
(void) bzero((char *)&from, sizeof(struct sockaddr));
(void) memset((char *)&from, 0, sizeof(struct sockaddr));
from.sin_family = AF_INET;
from.sin_addr.s_addr = inet_addr(source);
if (from.sin_addr.s_addr == -1)