Lines Matching +full:timeout +full:- +full:lp +full:- +full:ms
23 * traceroute host - trace the route ip packets follow going to "host".
31 * defaults to net.inet.ip.ttl hops & can be changed with the -m flag).
32 * Three probes (change with -q flag) are sent at each ttl setting and
36 * be printed. If there is no response within a 5 sec. timeout
37 * interval (changed with the -w flag), a "*" is printed for that
43 * value, it can be changed with the -p flag).
49 * 1 helios.ee.lbl.gov (128.3.112.1) 19 ms 19 ms 0 ms
50 * 2 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 39 ms 19 ms
51 * 3 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 39 ms 19 ms
52 * 4 ccngw-ner-cc.Berkeley.EDU (128.32.136.23) 39 ms 40 ms 39 ms
53 * 5 ccn-nerif22.Berkeley.EDU (128.32.168.22) 39 ms 39 ms 39 ms
54 * 6 128.32.197.4 (128.32.197.4) 40 ms 59 ms 59 ms
55 * 7 131.119.2.5 (131.119.2.5) 59 ms 59 ms 59 ms
56 * 8 129.140.70.13 (129.140.70.13) 99 ms 99 ms 80 ms
57 * 9 129.140.71.6 (129.140.71.6) 139 ms 239 ms 319 ms
58 * 10 129.140.81.7 (129.140.81.7) 220 ms 199 ms 199 ms
59 * 11 nic.merit.edu (35.1.1.48) 239 ms 239 ms 239 ms
62 * kernel on the 2nd hop system -- lbl-csam.arpa -- that forwards
69 * 1 helios.ee.lbl.gov (128.3.112.1) 0 ms 0 ms 0 ms
70 * 2 lilac-dmc.Berkeley.EDU (128.32.216.1) 19 ms 19 ms 19 ms
71 * 3 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 19 ms 19 ms
72 * 4 ccngw-ner-cc.Berkeley.EDU (128.32.136.23) 19 ms 39 ms 39 ms
73 * 5 ccn-nerif22.Berkeley.EDU (128.32.168.22) 20 ms 39 ms 39 ms
74 * 6 128.32.197.4 (128.32.197.4) 59 ms 119 ms 39 ms
75 * 7 131.119.2.5 (131.119.2.5) 59 ms 59 ms 39 ms
76 * 8 129.140.70.13 (129.140.70.13) 80 ms 79 ms 99 ms
77 * 9 129.140.71.6 (129.140.71.6) 139 ms 139 ms 159 ms
78 * 10 129.140.81.7 (129.140.81.7) 199 ms 180 ms 300 ms
79 * 11 129.140.72.17 (129.140.72.17) 300 ms 239 ms 239 ms
81 * 13 128.121.54.72 (128.121.54.72) 259 ms 499 ms 279 ms
86 * 18 ALLSPICE.LCS.MIT.EDU (18.26.0.115) 339 ms 279 ms 279 ms
91 * with a ttl too small to reach us. 14 - 17 are running the
103 * 1 helios.ee.lbl.gov (128.3.112.1) 0 ms 0 ms 0 ms
104 * 2 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 19 ms 39 ms
105 * 3 lilac-dmc.Berkeley.EDU (128.32.216.1) 19 ms 39 ms 19 ms
106 * 4 ccngw-ner-cc.Berkeley.EDU (128.32.136.23) 39 ms 40 ms 19 ms
107 * 5 ccn-nerif35.Berkeley.EDU (128.32.168.35) 39 ms 39 ms 39 ms
108 * 6 csgw.Berkeley.EDU (128.32.133.254) 39 ms 59 ms 39 ms
115 * 13 rip.Berkeley.EDU (128.32.131.22) 59 ms ! 39 ms ! 39 ms !
119 * What's really happening is that rip (a Sun-3 running Sun OS3.5)
128 * non-standard (HPUX) software, expect to see this problem
134 * route failed or fragmentation needed -- neither of these should
140 * -----
142 * you *don't* make it setuid -- casual use could result in a lot
171 * routing problem and this code sort-of popped out after 48 hours
184 * I've hacked up a round-trip-route version of this that works by
185 * sending a loose-source-routed udp datagram through the destination
189 * -- Van Jacobson (van@ee.lbl.gov)
255 #define NGATEWAYS ((int)((MAX_IPOPTLEN - IPOPT_MINOFF - 1) / sizeof(u_int32_t)))
321 int nprobes = -1;
397 u_short port; /* default base protocol-specific "port" */
494 int requestPort = -1; in main()
514 * Do the setuid-required stuff first, then lose privileges ASAP. in main()
521 if ((s = socket(AF_INET, SOCK_RAW, pe->p_proto)) < 0) in main()
551 if (sysctl(mib, 4, &max_ttl, &sz, NULL, 0) == -1) { in main()
641 1, (1 << 16) - 1); in main()
645 nprobes = str2val(optarg, "nprobes", 1, -1); in main()
655 * probe (e.g., on a multi-homed host). in main()
692 port = (requestPort != -1) ? requestPort : proto->port; in main()
694 if (nprobes == -1) in main()
709 minpacket = sizeof(*outip) + proto->hdrlen + optlen; in main()
716 switch (argc - optind) { in main()
726 setsin(to, hi->addrs[0]); in main()
727 if (hi->n > 1) in main()
730 prog, hostname, inet_ntoa(to->sin_addr)); in main()
731 hostname = hi->name; in main()
732 hi->name = NULL; in main()
742 protlen = packlen - sizeof(*outip) - optlen; in main()
743 if ((proto->num == IPPROTO_SCTP) && (packlen & 3)) { in main()
756 outip->ip_v = IPVERSION; in main()
758 outip->ip_tos = tos; in main()
760 outip->ip_tos &= ~IPTOS_ECN_MASK; in main()
761 outip->ip_tos |= IPTOS_ECN_ECT1; in main()
763 outip->ip_len = htons(packlen); in main()
764 outip->ip_off = htons(off); in main()
765 outip->ip_p = proto->num; in main()
774 gwlist[lsrr] = to->sin_addr.s_addr; in main()
776 outip->ip_dst.s_addr = gwlist[0]; in main()
788 outip->ip_dst = to->sin_addr; in main()
790 outip->ip_hl = (outp - (u_char *)outip) >> 2; in main()
867 for (i = n; i > 0; --i, ++al) in main()
868 if (strcmp(device, al->device) == 0) in main()
884 setsin(from, al->addr); in main()
892 source = hi->name; in main()
893 hi->name = NULL; in main()
901 for (i = hi->n, ap = hi->addrs; i > 0; --i, ++ap) in main()
902 if (*ap == al->addr) in main()
912 setsin(from, hi->addrs[0]); in main()
913 if (hi->n > 1) in main()
916 prog, source, inet_ntoa(from->sin_addr)); in main()
921 outip->ip_src = from->sin_addr; in main()
923 /* Check the source address (-s), if any, is valid */ in main()
995 prog, hostname, inet_ntoa(to->sin_addr)); in main()
1027 (*proto->prepare)(&outdata); in main()
1042 from->sin_addr.s_addr != lastaddr) { in main()
1046 lastaddr = from->sin_addr.s_addr; in main()
1060 Printf(" %.*f ms", precis, T); in main()
1062 u_char ecn = hip->ip_tos & IPTOS_ECN_MASK; in main()
1081 -(outip->ip_hl << 3), in main()
1082 outip->ip_hl << 3, in main()
1084 proto->key); in main()
1088 if (i == -2) { in main()
1091 if (ip->ip_ttl <= 1) in main()
1098 if (i == -1) in main()
1100 code = i - 1; in main()
1106 if (ip->ip_ttl <= 1) in main()
1129 Printf(" !F-%d", pmtu); in main()
1205 (unreachable > 0 && unreachable >= nprobes - 1)) in main()
1230 wait.tv_sec = tp->tv_sec + waittime; in wait_for_reply()
1231 wait.tv_usec = tp->tv_usec; in wait_for_reply()
1240 if (error == -1 && errno == EINVAL) { in wait_for_reply()
1257 outip->ip_ttl = ttl; in send_probe()
1258 outip->ip_id = htons(ident + seq); in send_probe()
1269 while (--nshorts >= 0) { in send_probe()
1311 return (-1); in setpolicy()
1327 dt = (double)(t2p->tv_sec - t1p->tv_sec) * 1000.0 + in deltaT()
1328 (double)(t2p->tv_usec - t1p->tv_usec) / 1000.0; in deltaT()
1347 return ("OUT-OF-RANGE"); in pr_type()
1363 hlen = ip->ip_hl << 2; in packet_ok()
1367 inet_ntoa(from->sin_addr)); in packet_ok()
1370 cc -= hlen; in packet_ok()
1375 type = icp->icmp_type; in packet_ok()
1376 code = icp->icmp_code; in packet_ok()
1381 pmtu = ntohs(icp->icmp_nextmtu); in packet_ok()
1384 && proto->num == IPPROTO_ICMP in packet_ok()
1385 && (*proto->check)((u_char *)icp, (u_char)seq)) in packet_ok()
1386 return (-2); in packet_ok()
1391 hip = &icp->icmp_ip; in packet_ok()
1392 hiplen = ((u_char *)icp + cc) - (u_char *)hip; in packet_ok()
1393 hlen = hip->ip_hl << 2; in packet_ok()
1396 && hip->ip_p == proto->num in packet_ok()
1397 && (*proto->check)(inner, (u_char)seq)) in packet_ok()
1398 return (type == ICMP_TIMXCEED ? -1 : code + 1); in packet_ok()
1403 u_int32_t *lp = (u_int32_t *)&icp->icmp_ip; in packet_ok() local
1405 Printf("\n%d bytes from %s to ", cc, inet_ntoa(from->sin_addr)); in packet_ok()
1407 inet_ntoa(ip->ip_dst), type, pr_type(type), icp->icmp_code); in packet_ok()
1408 for (i = 4; i <= cc - ICMP_MINLEN; i += sizeof(*lp)) in packet_ok()
1409 Printf("%2d: %8.8x\n", i, ntohl(*lp++)); in packet_ok()
1420 icmpheader->icmp_type = ICMP_ECHO; in icmp_prep()
1421 icmpheader->icmp_id = htons(ident); in icmp_prep()
1422 icmpheader->icmp_seq = htons(outdata->seq); in icmp_prep()
1423 icmpheader->icmp_cksum = 0; in icmp_prep()
1424 icmpheader->icmp_cksum = in_cksum((u_short *)icmpheader, protlen); in icmp_prep()
1425 if (icmpheader->icmp_cksum == 0) in icmp_prep()
1426 icmpheader->icmp_cksum = 0xffff; in icmp_prep()
1434 return (icmpheader->icmp_id == htons(ident) in icmp_check()
1435 && icmpheader->icmp_seq == htons(seq)); in icmp_check()
1443 outudp->uh_sport = htons(ident + (fixedPort ? outdata->seq : 0)); in udp_prep()
1444 outudp->uh_dport = htons(port + (fixedPort ? 0 : outdata->seq)); in udp_prep()
1445 outudp->uh_ulen = htons((u_short)protlen); in udp_prep()
1446 outudp->uh_sum = 0; in udp_prep()
1449 outudp->uh_sum = (sum) ? sum : 0xffff; in udp_prep()
1460 return (ntohs(udp->uh_sport) == ident + (fixedPort ? seq : 0) && in udp_check()
1461 ntohs(udp->uh_dport) == port + (fixedPort ? 0 : seq)); in udp_check()
1469 outudp->uh_sport = htons(ident + (fixedPort ? outdata->seq : 0)); in udplite_prep()
1470 outudp->uh_dport = htons(port + (fixedPort ? 0 : outdata->seq)); in udplite_prep()
1471 outudp->uh_ulen = htons(8); in udplite_prep()
1472 outudp->uh_sum = 0; in udplite_prep()
1475 outudp->uh_sum = (sum) ? sum : 0xffff; in udplite_prep()
1486 return (ntohs(udp->uh_sport) == ident + (fixedPort ? seq : 0) && in udplite_check()
1487 ntohs(udp->uh_dport) == port + (fixedPort ? 0 : seq)); in udplite_check()
1495 tcp->th_sport = htons(ident); in tcp_prep()
1496 tcp->th_dport = htons(port + (fixedPort ? 0 : outdata->seq)); in tcp_prep()
1497 tcp->th_seq = (tcp->th_sport << 16) | tcp->th_dport; in tcp_prep()
1498 tcp->th_ack = 0; in tcp_prep()
1499 tcp->th_off = 5; in tcp_prep()
1500 tcp->th_flags = TH_SYN; in tcp_prep()
1501 tcp->th_sum = 0; in tcp_prep()
1504 tcp->th_sum = p_cksum(outip, (u_short *)tcp, protlen, protlen); in tcp_prep()
1512 return (ntohs(tcp->th_sport) == ident in tcp_check()
1513 && ntohs(tcp->th_dport) == port + (fixedPort ? 0 : seq) in tcp_check()
1514 && tcp->th_seq == (tcp_seq)((tcp->th_sport << 16) | tcp->th_dport)); in tcp_check()
1525 sctp->src_port = htons(ident); in sctp_prep()
1526 sctp->dest_port = htons(port + (fixedPort ? 0 : outdata->seq)); in sctp_prep()
1529 sctp->v_tag = 0; in sctp_prep()
1531 sctp->v_tag = (sctp->src_port << 16) | sctp->dest_port; in sctp_prep()
1533 sctp->checksum = htonl(0); in sctp_prep()
1541 * SHUTDOWN-ACK chunks. in sctp_prep()
1544 init->ch.chunk_type = SCTP_INITIATION; in sctp_prep()
1545 init->ch.chunk_flags = 0; in sctp_prep()
1546 init->ch.chunk_length = htons((u_int16_t)(protlen - in sctp_prep()
1548 init->init.initiate_tag = (sctp->src_port << 16) | in sctp_prep()
1549 sctp->dest_port; in sctp_prep()
1550 init->init.a_rwnd = htonl(1500); in sctp_prep()
1551 init->init.num_outbound_streams = htons(1); in sctp_prep()
1552 init->init.num_inbound_streams = htons(1); in sctp_prep()
1553 init->init.initial_tsn = htonl(0); in sctp_prep()
1558 param->param_type = htons(SCTP_PAD); in sctp_prep()
1559 param->param_length = in sctp_prep()
1560 htons((u_int16_t)(protlen - in sctp_prep()
1561 sizeof(struct sctphdr) - in sctp_prep()
1566 * Send a packet containing a SHUTDOWN-ACK chunk, in sctp_prep()
1573 chk->chunk_type = SCTP_SHUTDOWN_ACK; in sctp_prep()
1574 chk->chunk_flags = 0; in sctp_prep()
1575 chk->chunk_length = htons(4); in sctp_prep()
1581 chk->chunk_type = SCTP_PAD_CHUNK; in sctp_prep()
1582 chk->chunk_flags = 0; in sctp_prep()
1583 chk->chunk_length = htons(protlen - in sctp_prep()
1588 sctp->checksum = sctp_crc32c(sctp, protlen); in sctp_prep()
1597 if (ntohs(sctp->src_port) != ident || in sctp_check()
1598 ntohs(sctp->dest_port) != port + (fixedPort ? 0 : seq)) in sctp_check()
1602 return (sctp->v_tag == in sctp_check()
1603 (u_int32_t)((sctp->src_port << 16) | sctp->dest_port)); in sctp_check()
1609 return (sctp->v_tag == 0); in sctp_check()
1618 gre->flags = htons(0x2001); in gre_prep()
1619 gre->proto = htons(port); in gre_prep()
1620 gre->length = 0; in gre_prep()
1621 gre->callId = htons(ident + outdata->seq); in gre_prep()
1629 return (ntohs(gre->proto) == port in gre_check()
1630 && ntohs(gre->callId) == ident + seq); in gre_check()
1639 ptr[1] = htons(port + outdata->seq); in gen_prep()
1659 hlen = ip->ip_hl << 2; in print()
1660 cc -= hlen; in print()
1662 strlcpy(addr, inet_ntoa(from->sin_addr), sizeof(addr)); in print()
1670 Printf(" %s (%s)", inetname(from->sin_addr), addr); in print()
1673 Printf(" %d bytes to %s", cc, inet_ntoa(ip->ip_dst)); in print()
1685 ipo.ih_pr = ip->ip_p; in p_cksum()
1687 ipo.ih_src = ip->ip_src; in p_cksum()
1688 ipo.ih_dst = ip->ip_dst; in p_cksum()
1715 nleft -= 2; in in_cksum()
1824 * Subtract 2 timeval structs: out = out - in.
1831 if ((out->tv_usec -= in->tv_usec) < 0) { in tvsub()
1832 --out->tv_sec; in tvsub()
1833 out->tv_usec += 1000000; in tvsub()
1835 out->tv_sec -= in->tv_sec; in tvsub()
1853 if (gethostname(domain, sizeof(domain) - 1) < 0) in inetname()
1865 cp = strchr(hp->h_name, '.'); in inetname()
1871 (void)strncpy(domain, cp, sizeof(domain) - 1); in inetname()
1872 domain[sizeof(domain) - 1] = '\0'; in inetname()
1885 if ((cp = strchr(hp->h_name, '.')) != NULL && in inetname()
1888 (void)strncpy(line, hp->h_name, sizeof(line) - 1); in inetname()
1889 line[sizeof(line) - 1] = '\0'; in inetname()
1916 if ((int32_t)addr != -1) { in gethostinfo()
1917 hi->name = strdup(hostname); in gethostinfo()
1918 hi->n = 1; in gethostinfo()
1919 hi->addrs = calloc(1, sizeof(hi->addrs[0])); in gethostinfo()
1920 if (hi->addrs == NULL) { in gethostinfo()
1925 hi->addrs[0] = addr; in gethostinfo()
1939 if (hp->h_addrtype != AF_INET || hp->h_length != 4) { in gethostinfo()
1943 hi->name = strdup(hp->h_name); in gethostinfo()
1944 for (n = 0, p = hp->h_addr_list; *p != NULL; ++n, ++p) in gethostinfo()
1946 hi->n = n; in gethostinfo()
1947 hi->addrs = calloc(n, sizeof(hi->addrs[0])); in gethostinfo()
1948 if (hi->addrs == NULL) { in gethostinfo()
1952 for (ap = hi->addrs, p = hp->h_addr_list; *p != NULL; ++ap, ++p) in gethostinfo()
1960 if (hi->name != NULL) { in freehostinfo()
1961 free(hi->name); in freehostinfo()
1962 hi->name = NULL; in freehostinfo()
1964 free((char *)hi->addrs); in freehostinfo()
1974 *ap = hi->addrs[0]; in getaddr()
1983 sin->sin_len = sizeof(*sin); in setsin()
1984 sin->sin_family = AF_INET; in setsin()
1985 sin->sin_addr.s_addr = addr; in setsin()
2013 prog, what, mi - 1); in str2val()
2035 if (proto->name == NULL) { /* generic handler */ in setproto()
2041 pnum = pe->p_proto; in setproto()
2044 proto->num = pnum; in setproto()
2073 "Usage: %s [-adDeEFInrSvx] [-A as_server] [-f first_ttl] [-g gateway]\n" in usage()
2074 "\t[-i iface] [-m max_ttl] [-M first_ttl] [-p port] [-P proto]\n" in usage()
2075 "\t[-q nprobes] [-s src_addr] [-t tos] [-w waittime]\n" in usage()
2076 "\t[-z pausemsecs] host [packetlen]\n", prog); in usage()