From 9cff9beb20ee6d7963ed14af2948c205305df499 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 19 Aug 2009 23:07:43 +0000 Subject: [PATCH] Remove the G_ALIVE_TTL traceroute probe state. It was mostly synonymous with G_DEAD_TTL. I couldn't figure out that the difference was supposed to be. --- traceroute.cc | 6 +++--- traceroute.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/traceroute.cc b/traceroute.cc index f18716ac3..d6fbd3aca 100644 --- a/traceroute.cc +++ b/traceroute.cc @@ -625,7 +625,7 @@ Traceroute::sendProbe(TraceProbe * tp) { tg->nextTTL(); if (tg->ttl > MAX_TTL) { - tg->setState(G_ALIVE_TTL); + tg->setState(G_DEAD_TTL); return -1; } if (!tg->ttl || (tg->gotReply && tg->noDistProbe) ) { @@ -1006,7 +1006,7 @@ Traceroute::outputTarget(Target * t) { } log_write(LOG_PLAIN, "%s", Tbl->printableTable(NULL)); - if (G_TTL(tg->getState())) + if (tg->getState() == G_DEAD_TTL) log_write(LOG_PLAIN, "! maximum TTL reached (50)\n"); else if (!tg->gotReply || (tp && (tp->ipreplysrc.s_addr != tg->ipdst))) log_write(LOG_PLAIN, "! destination not reached (%s)\n", inet_ntoa(tp->ipdst)); @@ -1071,7 +1071,7 @@ Traceroute::outputXMLTrace(TraceGroup * tg) { log_write(LOG_XML, "/>\n"); } - if (G_TTL(tg->getState())) + if (tg->getState() == G_DEAD_TTL) log_write(LOG_XML, "\n"); else if (!tg->gotReply || (tp && (tp->ipreplysrc.s_addr != tg->ipdst))) log_write(LOG_XML, "\n", inet_ntoa(tp->ipdst)); diff --git a/traceroute.h b/traceroute.h index 42bc8215f..7fc2b4a60 100644 --- a/traceroute.h +++ b/traceroute.h @@ -105,11 +105,8 @@ /* Group states */ #define G_OK P_OK #define G_DEAD_TTL 3 /* TTL has reached maximum value */ -#define G_ALIVE_TTL 4 /* TTL has reached maximum value */ #define G_FINISH 5 /* tracing has complete successfully */ -#define G_TTL(x) (x == G_ALIVE_TTL || x == G_DEAD_TTL) - #define MAX_TTL 50 #define HOP_COL 0