473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Ping without using raw sockets

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
3 2219
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Philipp Plaenitz | last post by:
hello, is out there any tutorial for writting a c/cpp program, that can ping an other computer WITHOUT having suid state. for the moment i only get working raw socket as root. many thanx
17
by: wana | last post by:
I was reading through original source code of ping for some insight and was confused by unusual code. Entire listing available at: http://www.ping127001.com/pingpage/ping.html #include...
2
by: Tim C | last post by:
Is there a way to do a Ping from C# if you are not logged in as administrator on W2k? I am trying to do a Ping from C# running under ASP.NET. I have found several examples on the web, mostly...
2
by: Eric Wenger | last post by:
I'm pretty new to C# and I'm trying to do what I believe should be a simple thing. I want to modify a program that is using the System.Net.NetworkInformation.Ping class to have some custom...
24
by: Rudolf | last post by:
Is there a way to do a plain ping operation in VB.Net using only .Net libraries? Thanks Rudolf
0
by: Ed | last post by:
I've attached some VB.NET code I've hacked together (some taken from MS examples & newsgroup postings) that will perform a ping or IcmpSendEcho using the icmp.dll (see this for more info:...
8
by: TKowalcz | last post by:
Hello. I have a problem. I need to make a client-server application using sockets (easy). After they communicate server store information about client (IP, and some data). Later on i need to...
4
by: =?Utf-8?B?QWxleCBLLg==?= | last post by:
Hi all I need a simple program that allows me to check if an IP address is pingable. I am not going to send/receive anything to the remote host, just check if it is visible. Something like...
4
by: Newbie | last post by:
Is it possible, without any 3rd party tools to simply ping an ip address, and get back if the ping was sucessfull. Thanks
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.