OSDN Git Service

Improve network connectivity dumping.
authorLorenzo Colitti <lorenzo@google.com>
Wed, 30 Jul 2014 05:38:20 +0000 (14:38 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Thu, 31 Jul 2014 01:56:12 +0000 (01:56 +0000)
commitd4c3d38957870fa27423dbc55d99d68772fbd490
tree3133fa1b242ddcaa022b83987263b07caabae8b9
parent9ae79d869a37633fa956a4f16f3fa45b23c189f1
Improve network connectivity dumping.

1. Explicitly dump IP addresses.

   Currently, some IP addresses are dumped using netcfg, but that
   only dumps the first IPv4 address on each interface. Instead,
   call ip -4 addr and ip -6 addr explicitly to dump all IPv4 and
   IPv6 addresses on the system.

2. Disable dumping /proc/net/{ipv6,}route, because:

 - We already dump all IPv4 and IPv6 routes in the tables that
   we use.
 - /proc/net/route is confusing because it only includes routes
   in the main table, which are all but unused. It's also in
   unreadable host-byte-order hex.
 - /proc/net/ipv6_route is confusing because it includes routes
   from all tables but does not say what table they are in.

3. Instead of dumping the contents of /proc/net/arp , use
   "ip -4 neigh show" and "ip -6 neigh show" to dump the
   neighbour caches for both IPv4 and IPv6.

Bug: 16663736
Change-Id: Id3e509b877ab7b00eb2399b6a9868b12245da2f0
cmds/dumpstate/dumpstate.c