不是我自己写的,在学Python,所以对源码很感兴趣. 贴出来给同样有兴趣的朋友看看. #!/usr/bin/env python # -*- coding: iso-8859-1 -*- """ping.py ping.py uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. Copyright (C) 2004 - Lars Strand ; This program is free software; you can redistribute it and/or modify it under the terms of the...
发信人: matrix (矩阵), 信区: NetPrg 标 题: ping程序源代码 发信站: 牡丹园 (Mon Jul 22 09:33:59 2002) , 站内信件 // Module Name: ping.c // // Description: // This sample illustrates how an ICMP ping app can be written // using the SOCK_RAW socket type and IPPROTO_ICMP protocol. // By creating a raw socket, the underlying layer does not change // the protocol header so that when we submi...
#!/usr/bin/env python """ping.py ping.py uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. Copyright (C) 2004 - Lars Strand ; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at you...
为了更好的学习,感觉很有必要建立一个自己的源码库。 建立该源码库的目的很简单: 1>. 知识在于积累 2>. 自己查找起来方便。 3>. 分享自己的部分源码,当然也有很多是直接来源于网上的(感觉很不错的就留下了) ==> 学习、交流。 为了让大家记住这个小Blog,就把所有的小源码设置个解压密码吧(gan.cublog.cn)! 里面的很多代码其实很不成熟, 在真正使用时请自己按照自己的需要修改, 对此使用中出现的问题不服任何责...