diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2006-06-13 14:59:07 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2006-06-13 14:59:07 +0000 |
commit | 929e55d609f0bfaa023e5303e32bad051f2e2d62 (patch) | |
tree | 89a238647fe11051d26d922f4581e24f2737557d /contrib/traceroute/traceroute.c | |
parent | 0cf435f0166917eec5064b5dafbccc3b2dbb0dca (diff) | |
download | FreeBSD-src-929e55d609f0bfaa023e5303e32bad051f2e2d62.zip FreeBSD-src-929e55d609f0bfaa023e5303e32bad051f2e2d62.tar.gz |
Make traceroute decode all the ICMP unreachable messages defined
in http://www.iana.org/assignments/icmp-parameters. Thankfully
IANA's list aggrees with <netinet/ip_icmp.h>.
I've tried to do this in a way which is mostly consistent with
tcptraceroute and Debian's version of traceroute. However, sometimes
a letter is used twice by these versions, so I've gone with:
LBL tcptr Debian (chosen)
ICMP_UNREACH_NET !N !N !N !N
ICMP_UNREACH_HOST !H !H !H !H
ICMP_UNREACH_PROTOCOL !P !P !P !P
ICMP_UNREACH_PORT ! !p ! !
ICMP_UNREACH_NEEDFRAG !F-%d !F !F-<%d> !F-<%d>
ICMP_UNREACH_SRCFAIL !S !S !S !S
ICMP_UNREACH_NET_UNKNOWN !<%d> !U !<%d> !U
ICMP_UNREACH_HOST_UNKNOWN !<%d> !U !<%d> !W
ICMP_UNREACH_ISOLATED !<%d> !I !I !I
ICMP_UNREACH_NET_PROHIB !<%d> !A !A !A
ICMP_UNREACH_HOST_PROHIB !<%d> !C !C !Z
ICMP_UNREACH_TOSNET !<%d> !T !T !Q
ICMP_UNREACH_TOSHOST !<%d> !T !T !T
ICMP_UNREACH_FILTER_PROHIB !X !A !A !X
ICMP_UNREACH_HOST_PRECEDENCE !V !<%d> !V !V
ICMP_UNREACH_PRECEDENCE_CUTOFF !C !<%d> !C !C
Graham Wilson is planning to use the same codes in Debian's version.
MFC after: 3 weeks
Diffstat (limited to 'contrib/traceroute/traceroute.c')
-rw-r--r-- | contrib/traceroute/traceroute.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c index e6182f4..fd4165a 100644 --- a/contrib/traceroute/traceroute.c +++ b/contrib/traceroute/traceroute.c @@ -1017,6 +1017,41 @@ main(int argc, char **argv) Printf(" !S"); break; + case ICMP_UNREACH_NET_UNKNOWN: + ++unreachable; + Printf(" !U"); + break; + + case ICMP_UNREACH_HOST_UNKNOWN: + ++unreachable; + Printf(" !W"); + break; + + case ICMP_UNREACH_ISOLATED: + ++unreachable; + Printf(" !I"); + break; + + case ICMP_UNREACH_NET_PROHIB: + ++unreachable; + Printf(" !A"); + break; + + case ICMP_UNREACH_HOST_PROHIB: + ++unreachable; + Printf(" !Z"); + break; + + case ICMP_UNREACH_TOSNET: + ++unreachable; + Printf(" !Q"); + break; + + case ICMP_UNREACH_TOSHOST: + ++unreachable; + Printf(" !T"); + break; + case ICMP_UNREACH_FILTER_PROHIB: ++unreachable; Printf(" !X"); |