]> git.ipfire.org Git - thirdparty/mtr.git/commit
mtr-packet: UDP probe support
authorMatt Kimball <matt.kimball@gmail.com>
Wed, 14 Dec 2016 17:18:42 +0000 (09:18 -0800)
committerMatt Kimball <matt.kimball@gmail.com>
Wed, 14 Dec 2016 17:33:38 +0000 (09:33 -0800)
commit88d1a95087185339e439918a24923d5e0e816451
tree01c110e77efe52566bc8d71e8e51b72e621d28a3
parent6df4e45df4ae1504604d5eef1b0858e1cb6e42de
mtr-packet: UDP probe support

Added support send using UDP as the protocol for sending probes,
rather than ICMP.  Both IPv4 and IPv6 UDP probes are supported.
We are using the source port in the UDP packet for identifying
the particular probe transmitted.  This is a bit less reliable
than ICMP, where we are also able to store our PID for verifying
the probe has been transmitted by this instance of mtr-packet,
but space is limited, and it is what the pre-existing mtr
implementation does.

We report no-route and network-down errors in response to errors
from sendto(), in addition to reporting them from errors in
the connect() used to determine the source address of an outgoing
probe.

The mtr-packet tests now properly parse the replies from
mtr-packet, as opposed to simply matching regular expressions
against the output.  This is better because it give us future
compatibility with additional reply arguments from mtr-packet.

A better introduction to mtr-packet is now included in the
mtr-packet man page.

The dual code paths for sending IPv6 probes between Linux
and non-Linux Unix-likes has been eliminated.  The Linux path
gave us direct control over the IP header, but wasn't necessary
and would make maintainence more difficult, so now Linux uses
the more indirect setsockopt() method of setting IPv6 header
fields.
17 files changed:
mtr-packet.8.in
mtr.8.in
net.c
packet/command.c
packet/construct_unix.c
packet/deconstruct_unix.c
packet/deconstruct_unix.h
packet/probe.c
packet/probe.h
packet/probe_cygwin.c
packet/probe_unix.c
packet/probe_unix.h
packet/protocols.h
packet/wait_unix.c
test/cmdparse.py
test/mtrpacket.py
test/probe.py [changed mode: 0755->0644]