<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=us-ascii"><META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD><BODY><DIV><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>Reza,</FONT></SPAN></DIV><DIV><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2></FONT></SPAN> </DIV><DIV><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>No problem. Here are all the PING options (from PING /?)...</FONT></SPAN></DIV><DIV><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2></FONT></SPAN><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2></FONT></SPAN> </DIV><DIV><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]<BR> [-r count] [-s count] [[-j host-list] | [-k host-list]]<BR> [-w timeout] target_name</FONT></SPAN></DIV><DIV><FONT face="Courier New"></FONT> </DIV><DIV><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>Options:<BR> -t Ping the specified host until stopped.<BR> To see statistics and continue - type Control-Break;<BR> To stop - type Control-C.<BR> -a Resolve addresses to hostnames.<BR> -n count Number of echo requests to send.<BR> -l size Send buffer size.<BR> -f Set Don't Fragment flag in packet.<BR> -i TTL Time To Live.<BR> -v TOS Type Of Service.<BR> -r count Record route for count hops.<BR> -s count Timestamp for count hops.<BR> -j host-list Loose source route along host-list.<BR> -k host-list Strict source route along host-list.<BR> -w timeout Timeout in milliseconds to wait for each reply.</FONT></SPAN></DIV><DIV><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2></FONT></SPAN> </DIV><DIV><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>In the "BUILD CMD" box, you </FONT><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>can see where I have selected 1 ping to</FONT></SPAN></SPAN></DIV><DIV><SPAN class=250161110-22062004><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>speed things up. You can add </FONT></SPAN><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>whatever options you need in that formula.</FONT></SPAN></SPAN></DIV><DIV><SPAN class=250161110-22062004><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>If you change the way </FONT></SPAN><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>the </FONT></SPAN><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>data comes out, you may have to tweak on the</FONT></SPAN></SPAN></DIV><DIV><SPAN class=250161110-22062004><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>formulas that </FONT></SPAN><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>extract the </FONT></SPAN><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>stats, but that should not be hard.</FONT></SPAN></SPAN></DIV><DIV><SPAN class=250161110-22062004><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2></FONT></SPAN></SPAN> </DIV><DIV><SPAN class=250161110-22062004><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>Cheers!</FONT></SPAN></SPAN></DIV><DIV><SPAN class=250161110-22062004><SPAN class=250161110-22062004><FONT face="Courier New" color=#0000ff size=2>Mike Groves</FONT></SPAN></DIV></SPAN><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Reza [mailto:reza649513@yahoo.com]<BR><B>Sent:</B> Tuesday, June 22, 2004 2:50 AM<BR><B>To:</B> VRF<BR><B>Subject:</B> [vrf] Re: Ping and ping informations<BR><BR></FONT></DIV> <DIV>Hii Mike ..... </DIV> <DIV>Great man.. it works ..... By the way do i have the possibilty to change the packet number and the size of the packets to test the pings for those cases ??? </DIV> <DIV>would be greatfull to have </DIV> <DIV>Reza <BR><BR><B><I>Mike Groves |mikegroves@pacbell.net></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Ya mean like this? <BR><BR>Mike Groves<BR><BR>-----Original Message-----<BR>From: FUKUI Yutaka [mailto:fukui.yutaka@jp.fujitsu.com]<BR>Sent: Tuesday, June 22, 2004 1:58 AM<BR>To: VRF<BR>Subject: [vrf] Re: Ping and ping informations<BR><BR><BR>Hi,<BR><BR><BR>Pinging in the "MS-DOS prompt" may do the job.<BR><BR>Take a look at "ExamplesEscapesdirlist.vee" and you will <BR><BR>see how to program it.<BR><BR>There may exist some smarter methods and some nice guy will give <BR><BR>you the information.<BR><BR><BR>Regards,<BR>FUKUI Yutaka<BR><BR><BR>Reza wrote:<BR>> <BR>> Dear all ,<BR>> <BR>> Using VEE i want to make a programm that will ping a server and read<BR>> the echo and the parameters of the echo for example TTL.<BR>> Say, i have a PC with 192.168.68.89 and i want to ping agilent.com<BR>> from my side i want to run a function which will ping agilent and read<BR>> the TTL or the echo time of the packets reaching and comming back to<BR>> me.<BR>> <BR>> Is it possible by VEE and if poss. then can any body give me some<BR>> suggestion how to implement it ??<BR>> Reza<BR>> <BR>> REZA SOHEL SALEH<BR>> <BR>> Room No:201, Schl!&erweg 2-4<BR>> <BR>> Bochum 44799<BR>> <BR>> Germany<BR>> <BR>> 0049-(0)234- 5890564(Home)<BR>> <BR>> 0049-179-7583133(mobile)<BR><BR><BR>> ATTACHMENT part 2 application/octet-stream name=DOS_Ping.vee<BR>---<BR>You are currently subscribed to vrf as: reza649513@yahoo.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list, email "". <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".<BR></BLOCKQUOTE><BR><BR> <DIV> <P>REZA SOHEL SALEH </P> <P>Room No:201, Schl|terweg 2-4 </P> <P>Bochum 44799 </P> <P>Germany</P> <P> 0049-(0)234- 5890564(Home)</P> <P> 0049-179-7583133(mobile)</P></DIV></BLOCKQUOTE>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list, email "vrf@agilent.com". <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></HTML>
Yahoo! Mail is new and improved - <a href="http://us.rd.yahoo.com/mail_us/taglines/new/*http://promotions.yahoo.com/new_mail">Check it out!</a>---You are currently subscribed to vrf as: rsb@soco.agilent.comTo subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".To send messages to this mailing list, email "vrf@agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
> But now for the same situation i am
> trying to do the same using a Microsoft
> DLL ( for example icmp.dll or somehting
> like that) can anybody help me out to
> do the same using MS dlls???
The dll *is* icmp.dll. The functions (in VEE parlance) are:
int __stdcall IcmpCreateFile(void);
long __stdcall IcmpSendEcho(int handle, long inaHost, char *pData, short
wSize, int x1, char *pReplyBuf, long dwReplySize, long dwTimeout);
int __stdcall IcmpCloseFile(int handle);
This is the basic scenario.
The parameter handle is a handle created with IcmpCreateFile.
The parameter inaHost is the ip address of the host to ping. It is in dotted
decimal notation packed into a double word. IOW, 192.168.0.100 is (192 << 24
| 168 << 16 | 0 << 8 | 100). Use the left shift and bit or functions - not
math operators as anything over 128 will turn on the hi bit and mess
everything up.
Parameter pData is the data packet to send. It's typed char* here to keep it
simple. wSize is the size of the data packet.
The parameter x1 is actually a pointer to a PIP_OPTION_INFORMATION
structure, but is unused (pass 0 always) to keep things simple.
pReplyBuf is a receptacle for the returned data, if any. It's typed char* to
keep it simple, but is actually an array of ICMP_ECHO_REPLY structures. If
you want to use this member, type it as long* and pass an array of at least
Int32 * 8 + wSize. There is also an IcmpParseReplies function but it's
unnecessary as IcmpSendEcho returns the number of replies returned. Replies
would be difficult to parse in VEE.
The parameter lTimeout is in milliseconds.
Socket start up does not have to be used. The major advantage of using this
function is that it will not impose a lengthy timeout. You can set it to
whatever you wish. This is excellent if your destination is static. If not,
it is of limited usefulness as you'll have to do a DNS lookup and that
*will* impose a timeout. If all you want to do is detect an internet
connection then may I suggest the standard approach: ping internic.net,
198.41.0.6. If you can ping that address then by definition you can reach
"The Internet".
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
That's IcmpCloseHandle, not File! Dingus
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".