Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Full rewrite. This commit replaces the old utility. - Use the new ICMP APIs instead of manually crafting ping requests using raw sockets. - Add support for additional languages (the previous utility was hardcoded) - Add support for IPv6 - Make the icmpapi header C++ compatible. (we don't appear to sync this with wine anymore.) - Now runs on Win10, is much more reliable, and brings the code somewhat into the 21st century. (It's currently missing source routing (-j), but as most routers disable this anyway, I'm not sure that it's worth adding)
- Loading branch information
Showing
23 changed files
with
1,164 additions
and
749 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
|
||
add_definitions(-D__USE_W32_SOCKETS) | ||
add_executable(tracert tracert.c tracert.rc) | ||
set_module_type(tracert win32cui) | ||
add_importlibs(tracert ws2_32 msvcrt kernel32) | ||
|
||
if(MSVC) | ||
add_importlibs(tracert ntdll) | ||
endif() | ||
|
||
add_executable(tracert tracert.cpp tracert.rc) | ||
set_module_type(tracert win32cui UNICODE) | ||
add_importlibs(tracert ws2_32 iphlpapi user32 msvcrt kernel32 ntdll) | ||
add_cd_file(TARGET tracert DESTINATION reactos/system32 FOR all) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL | ||
|
||
STRINGTABLE | ||
BEGIN | ||
IDS_USAGE "\r\n\ | ||
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name \r\n\r\n\ | ||
Options:\r\n\ | ||
-d Do not resolve addresses to hostnames.\r\n\ | ||
-h maximum_hops Maximum number of hops to search for target.\r\n\ | ||
-j host-list Loose source route along host-list.\r\n\ | ||
-w timeout Wait timeout milliseconds for each reply.\r\n\ | ||
-4 Force using IPv4.\r\n\ | ||
-6 Force using IPv6.\r\n\ | ||
\r\n" | ||
|
||
IDS_INVALID_OPTION "%1 is not a valid command option.\r\n" | ||
IDS_TRACE_INFO "\r\nTracing route to %1 [%2]\r\nover a maximum of %3!u! hops:\r\n\r\n" | ||
IDS_TRACE_COMPLETE "\r\nTrace complete.\r\n" | ||
IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" | ||
|
||
IDS_GEN_FAILURE "General failure.\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_REQ_TIMED_OUT "Request timed out.\r\n" | ||
|
||
END |
Oops, something went wrong.
344f367
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gedmurphy, my two questions:
Does it make the header incompatible with Wine?
Can I know why, please?
344f367
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.