i must use ICMP for Ping tester , but i donno how to make ICMP packet.

so i hope to use ICMP apis.. follow this..

IcmpCreateFile
IcmpSendEcho
IcmpCloseHandle

um.. i cant find definition these func in any include files..

how can i use these apis ?

forgive my bad english , and have a nice day.
Posted on 2001-09-05 18:56:26 by newbie
newbie,

The icmp functions are implemented on Windows CE only, so you won't find them in the header files.

You can use ICMP packets however, but you need to create a socket of type SOCK_RAW, then build you own header. MS have an explanation of this here.


umbongo
Posted on 2001-09-06 05:19:08 by umbongo
actually umbongo... that's not true...

ICMP.dll IcmpCloseHandle IcmpCreateFile IcmpParseReplies IcmpSendEcho2 IcmpSendEcho do_echo_rep do_echo_req register_icmp

that's the exporttable directly copied from icmp.dll on my win2k work machine.. the difference is that in winCE icmp is integrated with winsock... anyways... i'm actually trying to figure out using these myself... disassembling and looking at the WinCE documentation to see if it matches up... i'll get back on that when i've figured it out...
Posted on 2001-09-06 06:26:52 by NervGaz
The lib/header/inc & sort-of-documentation (short descriptions in .txt) are at my site: exagone.cjb.net

Thomas
Posted on 2001-09-06 13:51:57 by Thomas
maybe this will help



INCLUDE ICMP.INC
INCLUDELIB ICMP.LIB

.code
...
...
...
Invoke IcmpCreateFile ; this could be in WM_INITDIALOG proc
Mov hICMP, Eax
...
...
...
Invoke IcmpSendEcho, hICMP, IPAddr, ADDR ICMPSendBuff, SIZEOF ICMPSendBuff, 0,ADDR ICMPReplyBuff, SIZEOF ICMPReplyBuff, 100 ; read icmp.h -- it will explain all :)
...
...
...
Invoke IcmpCloseHandle, hICMP ; this could be in WM_CLOSE proc
...
...
...
Hope this will help:grin:
Posted on 2001-09-07 05:00:56 by NEMO