473,387 Members | 1,534 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,387 software developers and data experts.

Query ARP Cache in vb.net

I am trying to write a Wake-On-LAN utility for a local subnet. I can do the
Wake-On-LAN, but before this I need to find the MAC addresses on the local
LAN.

I had planned to query DHCP on the WAN to get the MAC addresses, but there
are security restrictions in place that will restrict this. I have therefore
decided to ping all the devices on the local subnet, and then query the ARP
Cache and pick out the MAC addresses. I have got the ping bit (sort of)
working, but I don't know how to get the info out of the ARP Cache using
vb.net. (I can call dos commands and pipe to a text file and extract the info
from the text file, but I would rather query the cache directly).

Does anybody know how to query the ARP Cache with vb.net code? Or can
anybody point me towards some info about this? I have searched the net and
trawled through various forums with no results what-so-ever.

Any help will be much appreciated.

Regards,

Martin
Jul 21 '05 #1
2 6988
If you don't find what you need in .NET I believe you could call :
http://msdn.microsoft.com/library/de...lp/sendarp.asp
Patrice

--

"mabuHB" <ma****@discussions.microsoft.com> a écrit dans le message de
news:C5**********************************@microsof t.com...
I am trying to write a Wake-On-LAN utility for a local subnet. I can do the Wake-On-LAN, but before this I need to find the MAC addresses on the local
LAN.

I had planned to query DHCP on the WAN to get the MAC addresses, but there
are security restrictions in place that will restrict this. I have therefore decided to ping all the devices on the local subnet, and then query the ARP Cache and pick out the MAC addresses. I have got the ping bit (sort of)
working, but I don't know how to get the info out of the ARP Cache using
vb.net. (I can call dos commands and pipe to a text file and extract the info from the text file, but I would rather query the cache directly).

Does anybody know how to query the ARP Cache with vb.net code? Or can
anybody point me towards some info about this? I have searched the net and
trawled through various forums with no results what-so-ever.

Any help will be much appreciated.

Regards,

Martin

Jul 21 '05 #2
Thanks, that certainly appears to do what I need. It looks like I could even
do away with the ping bit of my code. Now all I need is a vb.net equivalent.

M.

"Patrice" wrote:
If you don't find what you need in .NET I believe you could call :
http://msdn.microsoft.com/library/de...lp/sendarp.asp
Patrice

--

"mabuHB" <ma****@discussions.microsoft.com> a écrit dans le message de
news:C5**********************************@microsof t.com...
I am trying to write a Wake-On-LAN utility for a local subnet. I can do

the
Wake-On-LAN, but before this I need to find the MAC addresses on the local
LAN.

I had planned to query DHCP on the WAN to get the MAC addresses, but there
are security restrictions in place that will restrict this. I have

therefore
decided to ping all the devices on the local subnet, and then query the

ARP
Cache and pick out the MAC addresses. I have got the ping bit (sort of)
working, but I don't know how to get the info out of the ARP Cache using
vb.net. (I can call dos commands and pipe to a text file and extract the

info
from the text file, but I would rather query the cache directly).

Does anybody know how to query the ARP Cache with vb.net code? Or can
anybody point me towards some info about this? I have searched the net and
trawled through various forums with no results what-so-ever.

Any help will be much appreciated.

Regards,

Martin


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Bill H | last post by:
I have a routine that displays 60 items (with thumbnails) per page. You can click any item and displays a new page with item details. When the user back pages it runs the query again to display all...
0
by: TK | last post by:
Hello, skip-new is explained as follows in the manual: "Don't use new, possibly wrong routines." (4.1.1 mysqld Command-line Options). Is there a list of the routines that will be disabled when...
0
by: Dylan Neild | last post by:
OK, I have a MySQL server running 4.0.12 on a 12 CPU Sun U4500 with 12GB of memory. With the query cache running, this machine would noticeably "hiccup" (just stop responding to requests)...
1
by: David L | last post by:
I'm running 4.0.18, and the queries in cache variable grew from about 2K to 30K in a matter of hours when we hardly used the database at all. Has anyone seen something similar? (The cache size was...
1
by: steve | last post by:
Does SQL Server have a query cache similar to mysql, whereas the query result is cached, if the table has not been changed? If so, please refer me to more info. Thanks. --...
0
by: Good Man | last post by:
Hi there I just installed MySQL 5, and its running great except that the query cache is not working, despite the configuration excerpt from my "my.ini" below: query_cache_size=5M...
6
by: UnixSlaxer | last post by:
Hello, Running a query for the first time on DB2 takes a fixed amount of time. But when query is executed for the second time, the amount of time is usually less since the query is (most...
5
by: Stan SR | last post by:
Hi, Some newbie questions.. :-) First, what is the namespace to use for the Cache class ? When I use this bit of code I get an error if (Cache==null) Cache.Insert("myUserList",userlist);...
5
by: listerofsmeg01 | last post by:
Hi, Pretty new to PHP and MySQL. I have a page on my site that displays a lot of information from various tables. Currently I have lots of small PHP wrapper functions around SQL queries to...
5
by: cleary1981 | last post by:
Hi, Thought I would post this before I start to bang my head of the table. I have a query that outputs an array from a table.The output is showing records that are no longer in the table. Even...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.