https://git.reactos.org/?p=reactos.git;a=commitdiff;h=010c7bfc9bcf31dd232e8…
commit 010c7bfc9bcf31dd232e8e779658562fb418cd8a
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Fri Jan 26 21:37:43 2018 +0300
Commit: Ged Murphy <gedmurphy(a)reactos.org>
CommitDate: Fri Jan 26 18:37:43 2018 +0000
[TRACERT] Improve error handling and output (#319)
- Correctly interpret network error codes
- Add output for generic transmit failure
CORE-14242 #resolve
---
base/applications/network/tracert/lang/bg-BG.rc | 9 +++++++--
base/applications/network/tracert/lang/cs-CZ.rc | 9 +++++++--
base/applications/network/tracert/lang/de-DE.rc | 9 +++++++--
base/applications/network/tracert/lang/en-US.rc | 9 +++++++--
base/applications/network/tracert/lang/es-ES.rc | 9 +++++++--
base/applications/network/tracert/lang/fr-FR.rc | 9 +++++++--
base/applications/network/tracert/lang/it-IT.rc | 9 +++++++--
base/applications/network/tracert/lang/pl-PL.rc | 9 +++++++--
base/applications/network/tracert/lang/ro-RO.rc | 9 +++++++--
base/applications/network/tracert/lang/ru-RU.rc | 9 +++++++--
base/applications/network/tracert/lang/sq-AL.rc | 9 +++++++--
base/applications/network/tracert/lang/sv-SE.rc | 9 +++++++--
base/applications/network/tracert/lang/tr-TR.rc | 9 +++++++--
base/applications/network/tracert/lang/uk-UA.rc | 9 +++++++--
base/applications/network/tracert/lang/zh-CN.rc | 9 +++++++--
base/applications/network/tracert/lang/zh-TW.rc | 9 +++++++--
base/applications/network/tracert/resource.h | 5 +++++
base/applications/network/tracert/tracert.cpp | 17 +++++++++++++++--
18 files changed, 132 insertions(+), 34 deletions(-)
diff --git a/base/applications/network/tracert/lang/bg-BG.rc
b/base/applications/network/tracert/lang/bg-BG.rc
index bf99e280f8..e6197573ef 100644
--- a/base/applications/network/tracert/lang/bg-BG.rc
+++ b/base/applications/network/tracert/lang/bg-BG.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/cs-CZ.rc
b/base/applications/network/tracert/lang/cs-CZ.rc
index 1c82fc5dc3..ea442cbf3d 100644
--- a/base/applications/network/tracert/lang/cs-CZ.rc
+++ b/base/applications/network/tracert/lang/cs-CZ.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/de-DE.rc
b/base/applications/network/tracert/lang/de-DE.rc
index bbe5e4dbec..dae8fce082 100644
--- a/base/applications/network/tracert/lang/de-DE.rc
+++ b/base/applications/network/tracert/lang/de-DE.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/en-US.rc
b/base/applications/network/tracert/lang/en-US.rc
index 27b5961ca9..f970a9139a 100644
--- a/base/applications/network/tracert/lang/en-US.rc
+++ b/base/applications/network/tracert/lang/en-US.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/es-ES.rc
b/base/applications/network/tracert/lang/es-ES.rc
index 8c69db16ac..5c44cb4e9c 100644
--- a/base/applications/network/tracert/lang/es-ES.rc
+++ b/base/applications/network/tracert/lang/es-ES.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/fr-FR.rc
b/base/applications/network/tracert/lang/fr-FR.rc
index 611a56490d..69c76b536f 100644
--- a/base/applications/network/tracert/lang/fr-FR.rc
+++ b/base/applications/network/tracert/lang/fr-FR.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/it-IT.rc
b/base/applications/network/tracert/lang/it-IT.rc
index 15b0ba30bf..a4e710b6a4 100644
--- a/base/applications/network/tracert/lang/it-IT.rc
+++ b/base/applications/network/tracert/lang/it-IT.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/pl-PL.rc
b/base/applications/network/tracert/lang/pl-PL.rc
index 94e5ba6ceb..673aa7552d 100644
--- a/base/applications/network/tracert/lang/pl-PL.rc
+++ b/base/applications/network/tracert/lang/pl-PL.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/ro-RO.rc
b/base/applications/network/tracert/lang/ro-RO.rc
index d5f2a88910..2811f1495e 100644
--- a/base/applications/network/tracert/lang/ro-RO.rc
+++ b/base/applications/network/tracert/lang/ro-RO.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/ru-RU.rc
b/base/applications/network/tracert/lang/ru-RU.rc
index 1a000627a1..d07b4f7e1d 100644
--- a/base/applications/network/tracert/lang/ru-RU.rc
+++ b/base/applications/network/tracert/lang/ru-RU.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/sq-AL.rc
b/base/applications/network/tracert/lang/sq-AL.rc
index d3dc494035..b38c9863c8 100644
--- a/base/applications/network/tracert/lang/sq-AL.rc
+++ b/base/applications/network/tracert/lang/sq-AL.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/sv-SE.rc
b/base/applications/network/tracert/lang/sv-SE.rc
index 6579325bdf..36ac1271a8 100644
--- a/base/applications/network/tracert/lang/sv-SE.rc
+++ b/base/applications/network/tracert/lang/sv-SE.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/tr-TR.rc
b/base/applications/network/tracert/lang/tr-TR.rc
index 0ee1a09845..ea7b8a09c1 100644
--- a/base/applications/network/tracert/lang/tr-TR.rc
+++ b/base/applications/network/tracert/lang/tr-TR.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/uk-UA.rc
b/base/applications/network/tracert/lang/uk-UA.rc
index 9a2903c251..794fb76746 100644
--- a/base/applications/network/tracert/lang/uk-UA.rc
+++ b/base/applications/network/tracert/lang/uk-UA.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/zh-CN.rc
b/base/applications/network/tracert/lang/zh-CN.rc
index 61966e02b8..2c303aad4f 100644
--- a/base/applications/network/tracert/lang/zh-CN.rc
+++ b/base/applications/network/tracert/lang/zh-CN.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/lang/zh-TW.rc
b/base/applications/network/tracert/lang/zh-TW.rc
index 86ecc1c9f8..dc37c0388a 100644
--- a/base/applications/network/tracert/lang/zh-TW.rc
+++ b/base/applications/network/tracert/lang/zh-TW.rc
@@ -20,13 +20,18 @@ Options:\r\n\
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n"
IDS_GEN_FAILURE "General failure.\r\n"
+ IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n"
IDS_HOP_COUNT "%1!3lu! %0\r\n"
IDS_HOP_TIME "%1!4lu! ms %0\r\n"
IDS_HOP_ZERO, " <1 ms %0\r\n"
IDS_TIMEOUT " * %0\r\n"
- IDS_HOP_RES_INFO "%1 [%2]\r\n"
- IDS_HOP_IP_INFO "%1\r\n"
+ IDS_HOP_RES_INFO "%1 [%2]"
+ IDS_HOP_IP_INFO "%1"
+ IDS_LINEBREAK "\r\n"
IDS_REQ_TIMED_OUT "Request timed out.\r\n"
+ IDS_HOP_RESPONSE " reports: "
+ IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n"
+ IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n"
END
diff --git a/base/applications/network/tracert/resource.h
b/base/applications/network/tracert/resource.h
index 5bb07ecd6e..01f68bbdba 100644
--- a/base/applications/network/tracert/resource.h
+++ b/base/applications/network/tracert/resource.h
@@ -6,6 +6,7 @@
#define IDS_TRACE_COMPLETE 103
#define IDS_UNABLE_RESOLVE 104
#define IDS_GEN_FAILURE 105
+#define IDS_TRANSMIT_FAILED 106
#define IDS_HOP_COUNT 107
#define IDS_HOP_TIME 108
@@ -14,3 +15,7 @@
#define IDS_HOP_RES_INFO 111
#define IDS_HOP_IP_INFO 112
#define IDS_REQ_TIMED_OUT 113
+#define IDS_LINEBREAK 114
+#define IDS_HOP_RESPONSE 115
+#define IDS_DEST_HOST_UNREACHABLE 116
+#define IDS_DEST_NET_UNREACHABLE 117
diff --git a/base/applications/network/tracert/tracert.cpp
b/base/applications/network/tracert/tracert.cpp
index ca14cc5345..1b52d56650 100644
--- a/base/applications/network/tracert/tracert.cpp
+++ b/base/applications/network/tracert/tracert.cpp
@@ -317,8 +317,19 @@ DecodeResponse(
break;
case IP_DEST_HOST_UNREACHABLE:
- OutputText(IDS_TIMEOUT);
- break;
+ case IP_DEST_NET_UNREACHABLE:
+ FoundTarget = true;
+ PrintHopInfo(AddressInfo);
+ OutputText(IDS_HOP_RESPONSE);
+ if (Status == IP_DEST_HOST_UNREACHABLE)
+ {
+ OutputText(IDS_DEST_HOST_UNREACHABLE);
+ }
+ else if (Status == IP_DEST_NET_UNREACHABLE)
+ {
+ OutputText(IDS_DEST_NET_UNREACHABLE);
+ }
+ return true;
case IP_REQ_TIMED_OUT:
OutputText(IDS_TIMEOUT);
@@ -329,6 +340,7 @@ DecodeResponse(
return false;
default:
+ OutputText(IDS_TRANSMIT_FAILED, Status);
return false;
}
@@ -341,6 +353,7 @@ DecodeResponse(
if (Status == IP_TTL_EXPIRED_TRANSIT || Status == IP_SUCCESS)
{
PrintHopInfo(AddressInfo);
+ OutputText(IDS_LINEBREAK);
}
else if (Status == IP_REQ_TIMED_OUT)
{