projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history]
/
usr
/
src
/
usr.sbin
/
traceroute
/
traceroute.c
diff --git
a/usr/src/usr.sbin/traceroute/traceroute.c
b/usr/src/usr.sbin/traceroute/traceroute.c
index
4356965
..
6101614
100644
(file)
--- a/
usr/src/usr.sbin/traceroute/traceroute.c
+++ b/
usr/src/usr.sbin/traceroute/traceroute.c
@@
-1,6
+1,6
@@
/*-
/*-
- * Copyright (c) 1990
The Regents of the University of California.
- * All rights reserved.
+ * 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.
*
* This code is derived from software contributed to Berkeley by
* Van Jacobson.
@@
-9,13
+9,13
@@
*/
#ifndef lint
*/
#ifndef lint
-char copyright[] =
-"@(#) Copyright (c) 1990
The Regents of the University of California.
\n\
- All rights reserved.\n";
+
static
char copyright[] =
+"@(#) Copyright (c) 1990
, 1993
\n\
+
The Regents of the University of California.
All rights reserved.\n";
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)traceroute.c
5.5
(Berkeley) %G%";
+static char sccsid[] = "@(#)traceroute.c
8.1
(Berkeley) %G%";
#endif /* not lint */
/*
#endif /* not lint */
/*
@@
-391,6
+391,8
@@
main(argc, argv)
(void) bzero((char *)outpacket, datalen);
outpacket->ip.ip_dst = to->sin_addr;
outpacket->ip.ip_tos = tos;
(void) bzero((char *)outpacket, datalen);
outpacket->ip.ip_dst = to->sin_addr;
outpacket->ip.ip_tos = tos;
+ outpacket->ip.ip_v = IPVERSION;
+ outpacket->ip.ip_id = 0;
ident = (getpid() & 0xffff) | 0x8000;
ident = (getpid() & 0xffff) | 0x8000;
@@
-555,9
+557,12
@@
send_probe(seq, ttl)
int i;
ip->ip_off = 0;
int i;
ip->ip_off = 0;
+ ip->ip_hl = sizeof(*ip) >> 2;
ip->ip_p = IPPROTO_UDP;
ip->ip_len = datalen;
ip->ip_ttl = ttl;
ip->ip_p = IPPROTO_UDP;
ip->ip_len = datalen;
ip->ip_ttl = ttl;
+ ip->ip_v = IPVERSION;
+ ip->ip_id = htons(ident+seq);
up->uh_sport = htons(ident);
up->uh_dport = htons(port+seq);
up->uh_sport = htons(ident);
up->uh_dport = htons(port+seq);