diff options
author | Laurent Vivier <laurent@vivier.eu> | 2013-08-30 01:46:40 +0200 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2013-09-24 10:47:06 +0300 |
commit | de6b9933772c743789808531b3092329faf42496 (patch) | |
tree | dba2fb065df5568e0c067dbff1dc1ea7bccb6516 /linux-user/linux_loop.h | |
parent | 868e34d7bdf958963da9582c1c14f2b7930b6d37 (diff) | |
download | qemu-de6b9933772c743789808531b3092329faf42496.tar.gz qemu-de6b9933772c743789808531b3092329faf42496.tar.bz2 qemu-de6b9933772c743789808531b3092329faf42496.zip |
linux-user: convert /proc/net/route when endianess differs
This patch allows to have IP addresses in correct order
in the case of "netstat -nr" when the endianess of the
guest differs from one of the host.
For instance, an m68k guest on an x86_64 host:
WITHOUT this patch:
$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 1.3.0.10 0.0.0.0 UG 0 0 0 eth0
0.3.0.10 0.0.0.0 0.255.255.255 U 0 0 0 eth0
$ cat /proc/net/route
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
eth0 00000000 0103000A 0003 0 0 0 000000000 0 0
eth0 0003000A 00000000 0001 0 0 0 00FFFFFF0 0 0
WITH this patch:
$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.0.3.1 0.0.0.0 UG 0 0 0 eth0
10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
$ cat /proc/net/route
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
eth0 00000000 0a000301 0003 0 0 0 000000000 0 0
eth0 0a000300 00000000 0001 0 0 0 ffffff000 0 0
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/linux_loop.h')
0 files changed, 0 insertions, 0 deletions