Skip to content

Latest commit

 

History

History
19 lines (19 loc) · 835 Bytes

README.md

File metadata and controls

19 lines (19 loc) · 835 Bytes

PING

描述

实现一个简单的ping程序

运行

[root@localhost ping]# ./ping www.baidu.com
PING www.baidu.com, (180.97.33.107) 56(84) bytes of data.
64 byte from 180.97.33.107: icmp_seq=0 ttl=55 time=35.1 ms
64 byte from 180.97.33.107: icmp_seq=1 ttl=55 time=35.6 ms
64 byte from 180.97.33.107: icmp_seq=2 ttl=55 time=34.8 ms
64 byte from 180.97.33.107: icmp_seq=3 ttl=55 time=33.5 ms
64 byte from 180.97.33.107: icmp_seq=4 ttl=55 time=34.2 ms
64 byte from 180.97.33.107: icmp_seq=5 ttl=55 time=33.9 ms
64 byte from 180.97.33.107: icmp_seq=6 ttl=55 time=34.5 ms
64 byte from 180.97.33.107: icmp_seq=7 ttl=55 time=35.1 ms
64 byte from 180.97.33.107: icmp_seq=8 ttl=55 time=35.3 ms
^C
--- 180.97.33.107 ping statistics ---
9 packets transmitted, 9 received, 0% packet loss, time 9028ms
[root@localhost ping]#