shill: Plumb up Icmp::Start() arguments to support IPv6
ICMPv6 support will require two API changes:
- Pass in |destination_address| before the socket is created, because
the socket() parameters are different between IPv4 and IPv6. This
is done by moving the |destination| argument from
TransmitEchoRequest() into Start(). This is safe because callers
do not reuse a single Icmp object to ping different hosts.
- Propagate |interface_index|, because pinging a link-local address
(such as the default gateway) requires specifying the scope ID.
Implement the new APIs, and adjust all callers / test cases accordingly.
This is mostly boilerplate, so the next commit will add IPv6 support
itself.
BUG=chromium:722809
TEST=unit tests
Change-Id: Ic28c792df08bad5e2b1ae04befd502542499d333
Reviewed-on: https://chromium-review.googlesource.com/516731
Commit-Ready: Kevin Cernekee <cernekee@chromium.org>
Tested-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
11 files changed