$ more /proc/net/route
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
eth0 000AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0
eth0 0000FEA9 00000000 0001 0 0 0 0000FFFF 0 0 0
eth0 00000000 010AA8C0 0003 0 0 0 00000000 0 0 0
$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 eth0
0x010AA8C0 이 gateway인데 숫자가 뒤집혀 있다.
0x01. 0x0A. 0xA8. 0xC0
1. 10. 168. 192
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
eth0 000AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0
eth0 0000FEA9 00000000 0001 0 0 0 0000FFFF 0 0 0
eth0 00000000 010AA8C0 0003 0 0 0 00000000 0 0 0
$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 eth0
0x010AA8C0 이 gateway인데 숫자가 뒤집혀 있다.
0x01. 0x0A. 0xA8. 0xC0
1. 10. 168. 192
'Linux API > network' 카테고리의 다른 글
flock - apply or remove an advisory lock on an open file (0) | 2009.06.20 |
---|---|
네트워크 장치 갯수 얻기 (get amount of eth?) (0) | 2009.06.18 |
linux에서 ip/mac address 받아오기 관련 링크 (0) | 2009.06.05 |
network 관련 include 할 파일 목록 (0) | 2009.06.05 |
offsetof() - stddef.h (0) | 2009.06.05 |