X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/c2ae755c753ff2c5826e68eb4b570178f3add7c3..8cd61d7dacaacad8921d55467c844843f76da86b:/usr/src/usr.sbin/traceroute/traceroute.c?ds=inline diff --git a/usr/src/usr.sbin/traceroute/traceroute.c b/usr/src/usr.sbin/traceroute/traceroute.c index 4356965235..6101614a6d 100644 --- 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. @@ -9,13 +9,13 @@ */ #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 -static char sccsid[] = "@(#)traceroute.c 5.5 (Berkeley) %G%"; +static char sccsid[] = "@(#)traceroute.c 8.1 (Berkeley) %G%"; #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; + outpacket->ip.ip_v = IPVERSION; + outpacket->ip.ip_id = 0; ident = (getpid() & 0xffff) | 0x8000; @@ -555,9 +557,12 @@ send_probe(seq, ttl) 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_v = IPVERSION; + ip->ip_id = htons(ident+seq); up->uh_sport = htons(ident); up->uh_dport = htons(port+seq);