Description: linux c编程实例,对ping命令的功能模拟实现-linux c programming examples, functional simulation of the ping command to achieve Platform: |
Size: 3072 |
Author:黄龙 |
Hits:
Description: 1.已知参数:目的节点IP地址或主机名
2.设计要求:通过原始套接字编程,模拟Ping命令,实现其基本功能,即输入一个IP地址或一段IP地址的范围,分别测试其中每个IP地址所对应主机的可达性,并返回耗时、生存时间等参数,并统计成功发送和回送的Ping报文。
2.1初始化Windows Sockets网络环境;
2.2解析命令行参数,构造目的端socket地址;
2.3定义IP、ICMP报文;
2.4接收ICMP差错报文并进行解析。
3. 程序实现主要用到Java网络包中的类InetAddress。
-1 Known parameters: the destination node IP address or host name 2 Design requirements: through raw socket programming, simulation Ping command, to achieve its basic functions, namely Enter an IP address or a range of IP addresses, each of which were tested an IP address corresponding to the host reachability and return to time-consuming, survival time and other parameters, and statistical successfully sent and Ping loopback packets. 2.1 Initialize Windows Sockets network environment 2.2 parse command line arguments, the destination socket address structure 2.3 Defining IP, ICMP packets 2.4 ICMP error packets received and parsed. 3 procedures used to achieve the main classes in the Java network packet InetAddress. Platform: |
Size: 4096 |
Author:nene |
Hits:
Description: VB代码实现Windows的 Ping命令模拟,有需要的就下载吧-VB code to realize the Ping command Windows simulation, has the need to download it Platform: |
Size: 6144 |
Author:糟熘鱼片 |
Hits: