please help me!!!
i need source of ping!!
i have source of ping on a c++ but then i convert it to assembler it does not work!!!!
please give me some source code of ping or something!!!!
i realy need this source!!!
i'm newbie in winsock programming.please help!!!
Posted on 2001-11-05 11:19:58 by Anorak
You can download the ICMP library & include from my site (http://exagone.cjb.net). You can ping with the functions inside the ICMP dll that lib is for.

Thomas
Posted on 2001-11-05 12:59:08 by Thomas
thanks for libraru!!
but i got other problem !!!
on this code masm32 says :"instruction operands must be the same size"
listing 1:

.data
pHost hostent <>
iaDest in_addr <>
HostIP db "192.168.11.20",0
.code
..............
ping proc
mov iaDest.S_un.s_addr,addr HostIP
invoke gethostbyaddr,iaDest,sizeof in_addr,AF_INET
mov pHost,eax ;Here are errors
...............
ping endp

please help me!!(or better give me source code)(sorry by my English)
Posted on 2001-11-05 13:43:00 by Anorak
Originally posted by Anorak
but i got other problem !!!

.data
pHost hostent <>
iaDest in_addr <>
HostIP db "192.168.11.20",0
.code
..............
ping proc
mov iaDest.S_un.s_addr,addr HostIP
invoke gethostbyaddr,iaDest,sizeof in_addr,AF_INET
mov pHost,eax ;Here are errors
...............
ping endp


www.google.com
^--- This is the *first* place you should look for help...
(gethostbyaddr source c++. Results 1 - 10 of about 1,470.)

With that said...

The gethostbyaddr subroutine returns a *pointer to* a hostent structure upon success -- This is why "mov pHost, eax" doesn't work...

-=Sliver=-
Posted on 2001-11-06 01:22:50 by Sliver
thank's Sliver !!!
could you help me how can i shove eax in pHost ?
a'im a newbie i na structures
but i'am a god programmer
maby i'am lame in winsock programming!
any one can help me?
Posted on 2001-11-06 01:51:59 by Anorak
This is just off the top of my head, but if gethostbyaddr returns a
pointer, then if you declare pHost as a DWORD it should work. The
other thing you could do is after the call, assume eax:ptr hostent
and extract the data you need.
Posted on 2001-11-06 08:48:41 by anon