]> git.ipfire.org Git - thirdparty/mtr.git/commit
mtr-packet: IPv6 support
authorMatt Kimball <matt.kimball@gmail.com>
Fri, 9 Dec 2016 19:14:06 +0000 (11:14 -0800)
committerMatt Kimball <matt.kimball@gmail.com>
Fri, 9 Dec 2016 19:14:06 +0000 (11:14 -0800)
commit6df4e45df4ae1504604d5eef1b0858e1cb6e42de
tree69f3b81429077586cec2d1561401323219a24923
parentac58c7a4b744752958975b93d8f774572186a421
mtr-packet: IPv6 support

mtr-packet can now send and receive ICMPv6 probes.

We now determine the source address for an outgoing probe by
opening a UDP socket to the destination, though no outgoing packets
are sent through this UDP socket.  IPv6 made this necessary, but
it now occurs for IPv4, too.

mtr-packet now uses sockaddr_storage for passing around addresses,
rather than sockaddr_in, as it can work for either IPv4 or IPv6.

To improve the maintainability of the code, the packet construction
and interpetation has been moved from probe_unix.c to construct_unix.c
and deconstruct_unix.c.

The way that Windows reads from the command stream has been changed to
avoid the possibility of hanging in a Sleep without an active read
of the command stream.

"send-probe" will now respond with "no-route" or "network-down"
when those conditions apply.

The test code has been moved to a test directory and split into
the following modules:

probe.py - tests for sending probes
cmdparse.py - tests for command parsing
mtrpacket.py - infrastructure for testing mtr-packet

The mtr-packet man page has been updated to describe ip-6 options
and now has an example of tracing a route to a remote host.

The mtr-packet network initialization has been split into two halves
to minimize the operations which occur with elevated privileges.
28 files changed:
.gitignore
Makefile.am
mtr-packet.8.in
net.c
net.h
packet/command.c
packet/command_cygwin.c
packet/command_cygwin.h
packet/construct_unix.c [new file with mode: 0644]
packet/construct_unix.h [new file with mode: 0644]
packet/deconstruct_unix.c [new file with mode: 0644]
packet/deconstruct_unix.h [new file with mode: 0644]
packet/packet.c
packet/probe.c
packet/probe.h
packet/probe_cygwin.c
packet/probe_cygwin.h
packet/probe_unix.c
packet/probe_unix.h
packet/protocols.h
packet/testpacket.py [deleted file]
packet/wait.h
packet/wait_cygwin.c
packet/wait_unix.c
test/cmdparse.py [new file with mode: 0755]
test/lint.sh [moved from packet/lint.sh with 84% similarity]
test/mtrpacket.py [new file with mode: 0644]
test/probe.py [new file with mode: 0755]