TICMP (Version 0.3b of 1997-09-10)
ICMP (Internet Control Message Protocol) is the protocol for all the basic IP
connectivity checks, host unreachable messages etc. There are two applications
(used for network debugging mainly) which use the ICMP:
ping to check wether a given host is alive
traceroute to find the way the IP packets choose to reach a given host
This unit has both a ping and a traceroute component, to make it easy to
create GUI applications like the ws_ping, but you can also create your own
command line ping/traceroute with this components.
Installation is easy: just move the *.pas and *.dcr files into your component
path and add the icmp.pas to your component library, you will then find a
TPing and a TTraceRoute in the Internet tab. For Delphi 3 there's also a
package file which may make it easier to install it. Sorry, but there's no
16bit version, and I doubt there'd ever be one as both ICMP.DLL and Winsock 2
are only available on 32bit systems.
To let the components start their action just call the action method (which
can be run multiple times if you like), if you want to interrupt them you can
call the terminate method. For an example usage see the two demo applications
included.
The following properties can be set:
Timeout The maximal time to wait for an answer for the issued ICMP
packet (both, DLL only)
Blocksize The amount of junk data to be send together with the request
(both)
TimeToLive maximum number of hosts allowed before the packet is resend as
being undeliverable (both, DLL only)
Hostname the host to be called, either the IP-address in the standard
###.###.###.### notation or a real hostname (both)
ResolveHostname Give (if possible) the hostnames in the route list
(traceroute)
OnPing event raised once a ping packet comes back or is timed out
OnRoute event raised once a new host in the routing list answers
(in both events the IP address given as a parameter is in
network order, to convert it to a standard longint you need
to convert it using the ntohl() function in winsock. I choose
this as all the utility functions in ip_misc use network
order, too)
The ping component has also the following read-only properties (reset with
ResetStatistics)
MinimumRoundttime \
MaximumRoundttime } Little statistics on the times needed for the packets
MeanRoundttime / (-1 means not available yet)
ReceivedPackets number of packets received successfully
And the traceroute component has a Stringlist with the hostnames (or IP
addresses depending on the ResolveHostname property) of the routers in the
property Route.
With the action method either one Ping packet (to be correct it is a ICMP echo
request packet) is sent, or the tracing of the route is started.
There are two ways ICMP packets may be sent under Windows:
-the standard socket way using raw sockets - this only works in NT4 in the
administrator account, and it doesn't allow setting the TimeToLive necessary
for the Traceroute. So only the ping component supports this yet, and as I
can't test it the socket mode for the traceroute isn't implemented yet.
There's now a Winsock 2.0 for Win'95 available from Microsoft, but I
couldn't test it yet whether the raw sockets and/or the ttl works.
-Microsoft also provides a DLL for doing the ICMP calls needed for a ping or
traceroute, but warns this is only an intermediate way to provide this. For
more info on this DLL look at "http://www.sockets.com/ms_icmp.htm".
Both components use this DLL if available and the socket way doesn't work,
if raw sockets are supported the Winsock is used for Ping, Traceroute only
works with the DLL currently.
These two components are part of a larger set of internet components I'm
working on; as long as the rest isn't ready they will be available
independently and have a pre 1.0 version number. If you're interested in the
current status of the whole internet package look at my homepage.
There are two rather simple demo applications and as a more advanced one a
subnet observer - someone else also did one which is credited to my name (it
only uses these components), so I decided to create my own one. To compile it
you'd need my TStringAlignGrid, probably available from where you got this
package.
Acknowledgements:
I got nearly all the info I needed to build this components from
http://www.sockets.com/ms_icmp.htm.
Quite a lot of people already reported bugs, to name them all would make this
file too long, I just thank all of you (and to those who only sent kind words,
too), and keep on writing.
If you spot any bug, have any idea how to improve, want to let me know what a
great job I did :-), want to notify me of the use any part of this component
for your own one, want to hear from me when I throw something new into the
public, or for any other reason, you can mail me (I try to answer every mail,
as long as possible - if you don't get a answer I'm either too busy or still
trying to solve the problem you reported). Please make sure you look at my bug
webpage (http://www.westend.de/~hoerstemeier/bug.htm), if there's a known
problem it will be listed here, and if possible I'll provide a workaround
there, too.
ah@scp.de (at work)
andy@hoerstemeier.de (at home)
http://www.westend.de/~hoerstemeier
snail mail: Andreas H"orstemeier
Mefferdatisstrasse 16-18
52062 Aachen
Germany
["o means the umlaut o, that is an o with two dots above]
If you want to complain about anything regarding my components please keep in
mind: I did them in my spare time for fun only, and putting them out for free
is just because of my good will, so keep friendly.
If you want to ask Delphi questions not related to my components directly
please consider asking them in one of the several Newsgroups - answering
email eats quite a lot of my time, and maybe others do know more about your
problem. As I read many of the newsgroups myself you may even get an answer
by me...
If you want to get a notification once I release a new component or a new
version of an existing one you can subscribe to my announce mailing list,
just send an email with subject "subscribe" to "ah-delphi-request@scp.de".
This component is Public Domain. If you like it you can send me a thank you
on a nice postcard from your hometown, but if you really want to send me
money I won't complain :-) , but count it as a gift not a payment.
You are free to put this component on a CD-ROM, but if you do so please send
me a copy. And of course only spread this component complete with all the
readme's and sources.
Andreas H"orstemeier
icmp.zip_hurrylw6_q931 voip
版权申诉
37 浏览量
2022-09-20
11:19:35
上传
评论
收藏 25KB ZIP 举报
邓凌佳
- 粉丝: 66
- 资源: 1万+
最新资源
- tensorflow-2.8.2-cp310-cp310-win-amd64.whl
- tensorflow-2.8.1-cp39-cp39-win-amd64.whl
- 基于Cadence-All...PCB信号完整性分析与设计-巫玲.pdf
- tensorflow-gpu-2.8.2-cp310-cp310-win-amd64.whl
- 基于Springboot的大学生租房系统(有报告) Javaee项目,springboot项目
- 视频打赏观看视频系统源码.zip
- 基于Cadence-Sigrity板级的电热协同仿真-封云鹏.pdf
- 基于Springboot的会员制医疗预约服务管理信息系统(有报告) Javaee项目,springboot项目
- MySQL忘记root密码解决方案
- thinkphp云赏修复版视频打赏V8.5网站源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈