By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,645 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,645 IT Pros & Developers. It's quick & easy.

Ping without using raw sockets

P: n/a
Is there a way in VB.Net to implement ping functionality
without using raw sockets?
I cannot use raw sockets because it has been
locked/disabled for security reasons.

Thanks

Rudolf

Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Just as an update for more info. When creating a socket of
Icmp type for ping the SocketType is set to raw in the
sample I have. However setting it to something else cause
the socket creation to fail.

e.g.
ICMPSocket = New Socket(AddressFamily.InterNetwork,
SocketType.Raw, ProtocolType.Icmp)

Rudolf
-----Original Message-----
Is there a way in VB.Net to implement ping functionality
without using raw sockets?
I cannot use raw sockets because it has been
locked/disabled for security reasons.

Thanks

Rudolf

.

Nov 20 '05 #2

P: n/a
On 2003-11-05, Rudolf <ru*****@hotmail.com.donotspammeandsoon> wrote:
Is there a way in VB.Net to implement ping functionality
without using raw sockets?
I cannot use raw sockets because it has been
locked/disabled for security reasons.

Thanks

Rudolf


Well, there are a couple of ways that come to mind. You could use the
System.Diagnostics.Process class to call the windows ping program in the
back ground and redirect it's output so that you can read and parse the
results...

Another method maybe to use P/Invoke to call the Icmp helper functions
to perform the ping. I used to have a VB.NET sample of this that I put
together from some VB6 code I found, but for the life of me - I can't
find it. It maybe at work, so I will check tomorrow and post back...

--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #3

P: n/a
Thanks, If you can it would be appreciated.

Rudolf
-----Original Message-----
On 2003-11-05, Rudolf <ru*****@hotmail.com.donotspammeandsoon> wrote:
Is there a way in VB.Net to implement ping functionality without using raw sockets?
I cannot use raw sockets because it has been
locked/disabled for security reasons.

Thanks

Rudolf


Well, there are a couple of ways that come to mind. You

could use theSystem.Diagnostics.Process class to call the windows ping program in theback ground and redirect it's output so that you can read and parse theresults...

Another method maybe to use P/Invoke to call the Icmp helper functionsto perform the ping. I used to have a VB.NET sample of this that I puttogether from some VB6 code I found, but for the life of me - I can'tfind it. It maybe at work, so I will check tomorrow and post back...
--
Tom Shelton
MVP [Visual Basic]
.

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.