* Tue Dec 20 03:50:13 PST 1988
*/
-#undef BB_FEATURE_TRACEROUTE_VERBOSE
-//#define BB_FEATURE_TRACEROUTE_VERBOSE
-#undef BB_FEATURE_TRACEROUTE_SO_DEBUG /* not in documentation man */
+#undef CONFIG_FEATURE_TRACEROUTE_VERBOSE
+//#define CONFIG_FEATURE_TRACEROUTE_VERBOSE
+#undef CONFIG_FEATURE_TRACEROUTE_SO_DEBUG /* not in documentation man */
#include <stdio.h>
#include <errno.h>
static u_short ident;
static u_short port = 32768+666; /* start udp dest port # for probe packets */
-#ifdef BB_FEATURE_TRACEROUTE_VERBOSE
+#ifdef CONFIG_FEATURE_TRACEROUTE_VERBOSE
static int verbose;
#endif
static int waittime = 5; /* time to wait for response (in seconds) */
cc -= hlen;
inetname(from);
-#ifdef BB_FEATURE_TRACEROUTE_VERBOSE
+#ifdef CONFIG_FEATURE_TRACEROUTE_VERBOSE
if (verbose)
printf (" %d bytes to %s", cc, inet_ntoa (ip->ip_dst));
#endif
return(cc);
}
-#ifdef BB_FEATURE_TRACEROUTE_VERBOSE
+#ifdef CONFIG_FEATURE_TRACEROUTE_VERBOSE
/*
* Convert an ICMP "type" field to a printable string.
*/
ip = (struct ip *) buf;
hlen = ip->ip_hl << 2;
if (cc < hlen + ICMP_MINLEN) {
-#ifdef BB_FEATURE_TRACEROUTE_VERBOSE
+#ifdef CONFIG_FEATURE_TRACEROUTE_VERBOSE
if (verbose)
printf("packet too short (%d bytes) from %s\n", cc,
inet_ntoa(from->sin_addr));
up->dest == htons(port+seq))
return (type == ICMP_TIMXCEED? -1 : code+1);
}
-#ifdef BB_FEATURE_TRACEROUTE_VERBOSE
+#ifdef CONFIG_FEATURE_TRACEROUTE_VERBOSE
if (verbose) {
int i;
u_long *lp = (u_long *)&icp->icmp_ip;
int
-#ifndef BB_TRACEROUTE
+#ifndef CONFIG_TRACEROUTE
main(argc, argv)
#else
traceroute_main(argc, argv)
while ((ch = getopt(argc, argv, "dm:np:q:rs:t:w:v")) != EOF)
switch(ch) {
case 'd':
-#ifdef BB_FEATURE_TRACEROUTE_SO_DEBUG
+#ifdef CONFIG_FEATURE_TRACEROUTE_SO_DEBUG
options |= SO_DEBUG;
#endif
break;
error_msg_and_die("tos must be 0 to 255.");
break;
case 'v':
-#ifdef BB_FEATURE_TRACEROUTE_VERBOSE
+#ifdef CONFIG_FEATURE_TRACEROUTE_VERBOSE
verbose++;
#endif
break;
s = create_icmp_socket();
-#ifdef BB_FEATURE_TRACEROUTE_SO_DEBUG
+#ifdef CONFIG_FEATURE_TRACEROUTE_SO_DEBUG
if (options & SO_DEBUG)
(void) setsockopt(s, SOL_SOCKET, SO_DEBUG,
(char *)&on, sizeof(on));
sizeof(on)) < 0)
perror_msg_and_die("IP_HDRINCL");
#endif IP_HDRINCL
-#ifdef BB_FEATURE_TRACEROUTE_SO_DEBUG
+#ifdef CONFIG_FEATURE_TRACEROUTE_SO_DEBUG
if (options & SO_DEBUG)
(void) setsockopt(sndsock, SOL_SOCKET, SO_DEBUG,
(char *)&on, sizeof(on));