mct / tcptraceroute Goto Github PK
View Code? Open in Web Editor NEWA traceroute implementation using TCP packets
Home Page: http://michael.toren.net/code/tcptraceroute/
License: GNU General Public License v2.0
A traceroute implementation using TCP packets
Home Page: http://michael.toren.net/code/tcptraceroute/
License: GNU General Public License v2.0
tcptraceroute -- A traceroute implementation using TCP packets Copyright (c) 2001-2015 Michael C. Toren <[email protected]> Updates are available from <http://michael.toren.net/code/tcptraceroute/> Requires libnet <http://www.packetfactory.net/libnet> and libpcap <http://www.tcpdump.org/>. For compilation instructions, see the INSTALL file. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU GPL is available as /usr/doc/copyright/GPL on Debian systems, or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html You can also obtain it by writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
if server has many devices with same ip address, tcptraceroute auto select device will be wrong.
# tcptraceroute 10.8.0.1 -f 30
Selected device railgun1, address 10.3.0.1, port 33989 for outgoing packets
Tracing the path to 10.8.0.1 on TCP port 80 (http), 30 hops max
30 * * *
Destination not reached
there is an example that the server has many devices named railgun*, all of them local address is 10.3.0.1, and routed by destination address
10.1.0.0/16 dev railgun1 proto kernel scope link src 10.3.0.1
10.2.0.0/16 dev railgun2 proto kernel scope link src 10.3.0.1
...
10.8.0.0/16 dev railgun8 proto kernel scope link src 10.3.0.1
all my applications, including ping, traceroute, and production services works well with this routing. except tcptraceroute auto select wrong device.
if (device == NULL)
/* not specified on command line */
device = finddev(recommended_src);
the proper way is detect it by route table.
i know tcptraceroute could specific device name from command line. but i'm not calling tcptraroute manually, and using some automatic cluster management tools, which can't specific different parameters for each server and each target.
Hi,
is there any chance for future support of IP(v6) in addition to the deprecated (since 1998) legacy-IP (IPv4)? ;-)
I'm currently using 1.5beta7 tcptraceroute tells me something about
Bad destination address
Just wanted to leave this here as a feature request. Would be really nice if someone could implement this.
Best regards,
Andreas
Compiling on Slackware64 15.0
main.c: In function ‘defaults’:
main.c:73:17: warning: ‘pcap_lookupdev’ is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations]
73 | device = pcap_lookupdev(errbuf);
| ^~~~~~
In file included from /usr/include/pcap.h:43,
from tcptraceroute.h:38,
from main.c:23:
/usr/include/pcap/pcap.h:394:18: note: declared here
394 | PCAP_API char *pcap_lookupdev(char *)
| ^~~~~~~~~~~~~~
It compiles anyway, but just in case you wish to follow gcc's advice...
tcptraceroute
should support the use of capabilities via libcap
or with filecaps. Currently, tcptraceroute
will exit fatally if its EUID is not 0, even if we grant it capabilities manually with setcap
.
Hello, i have a problem compiling tcptraceroute, although there is a libpcap on my system, i dont get what is going wrong at the compilation process.
gcc -g -O2 -Wall -o tcptraceroute main.o datalink.o util.o probe.o capture.o -lnet -lpcap Undefined symbols for architecture x86_64: "_pcap_version", referenced from: _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [tcptraceroute] Error 1
And also with homebrew after successful installation and "sudo tcptraceroute"
dyld: Symbol not found: _pcap_version Referenced from: /usr/local/bin/tcptraceroute Expected in: /usr/lib/libpcap.A.dylib in /usr/local/bin/tcptraceroute Abort trap: 6
Im on macOS Sierra 10.12.4 version
Installed tcptraceroute from Homebrew and it doesn't run - even for just usage output. Is missing libcap
.
Console output:
> tcptraceroute reddit.com
dyld: Symbol not found: _pcap_version
Referenced from: /usr/local/bin/tcptraceroute
Expected in: /usr/lib/libpcap.A.dylib
in /usr/local/bin/tcptraceroute
[2] 72303 abort tcptraceroute reddit.com
it appears as though http://michael.toren.net/code/tcptraceroute/ is down
The current shipped configure
script falls apart when it encounters Apple Silicon, immediately aborting the build:
checking build system type... configure: error: /bin/sh ./config.sub -apple-darwin20.4.0 failed
Running autoreconf -fvi
regenerates the configure
script successfully and allows building an arm64 binary on Apple Silicon as desired without any further modifications, but it'd be nice if upstream could possibly do that so downstream package managers don't have to do so themselves.
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /opt/homebrew/Cellar/autoconf/2.71/bin/autoconf --force
configure.ac:10: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete.
configure.ac:10: You should run autoupdate.
./lib/autoconf/general.m4:2081: AC_CANONICAL_SYSTEM is expanded from...
configure.ac:10: the top level
configure.ac:13: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:13: You should use the 'AC_CONFIG_HEADERS' macro instead.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:727: AM_CONFIG_HEADER is expanded from...
configure.ac:13: the top level
configure.ac:35: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:35: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:35: the top level
configure.ac:60: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:60: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:60: the top level
configure.ac:113: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:113: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:113: the top level
configure.ac:117: warning: The macro `AC_HEADER_TIME' is obsolete.
configure.ac:117: You should run autoupdate.
./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
configure.ac:117: the top level
configure.ac:220: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:220: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:220: the top level
configure.ac:240: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:240: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:240: the top level
configure.ac:262: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:262: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:262: the top level
configure.ac:280: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:280: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:280: the top level
autoreconf: running: /opt/homebrew/Cellar/autoconf/2.71/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:16: installing './compile'
Makefile.am: installing './depcomp'
autoreconf: './config.sub' is updated
autoreconf: './config.guess' is updated
autoreconf: Leaving directory '.'
~> ./configure --with-libnet=/opt/homebrew --prefix=/tmp/tcptraceroute/built
checking build system type... aarch64-apple-darwin20.4.0
checking host system type... aarch64-apple-darwin20.4.0
checking target system type... aarch64-apple-darwin20.4.0
[snip]
~> file /tmp/tcptraceroute/built/bin/tcptraceroute
/tmp/tcptraceroute/built/bin/tcptraceroute: Mach-O 64-bit executable arm64
I was just wondering if you're going to release the newest commit as a release so I can have tcptraceroute working through Homebrew again? 😄
In a moving world, hostnames are nothing, which persist too long ;)
At least, if one verifies the path of (own) nodes, the usual 'traceroute'
has the nice option '-A', which shows the AS numbers, a host resides in.
This, in opposite to a found host, does not change fast and can be really
used to verify a path, which may be a security aspect.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.