473,761 Members | 7,351 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7015
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****@discuss ions.microsoft. com> a écrit dans le message de
news:C5******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> a écrit dans le message de
news:C5******** *************** ***********@mic rosoft.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
2669
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 the items. Is there a way to cache that page and images so that second query doesn't execute? I do offer a pop-up window using Java but is not the default and not used by many. I'd really like to get rid of that second query. ;) TIA
0
1527
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 using this command-line option? The manual also states the following: "concurrent_inserts If ON (the default), MySQL will allow you to use INSERT on MyISAM tables at the same time as you run SELECT queries on them. You can turn this option
0
1707
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) every so often and wouldn't squeeze more then 1000 queries per second or so as a result (heavily mixed OLTP work, with a lot of SELECT's and almost as many UPDATE's).
1
1182
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 set to 100M and cache limit to 5M - if that could have anything to do with it). Regards.
1
7160
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. -- http://www.dbForumz.com/ This article was posted by author's request Articles individually checked for conformance to usenet standards
0
1287
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 query_cache_limit=2M query_cache_min_res_unit=4096k query_cache_type=1
6
10018
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 probably) cached already. I would like to clear out the DB2-UDB 8.2 query cache (I want the previous execution time again). Any advice would be appreciated.
5
2119
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); I don't know which namespace to use.
5
5556
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 get each bit of information. This results in maybe 10 queries to display one page, but they are all very small and simple, and it keeps the PHP looking nice too as they are simple function calls to get each piece of info, which can be called from any
5
1585
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 when i delete the table, these records still show. I am using php for my queries. How can I get rid of these annoying records. I think the problem may lie with query_cache but I could be wrong.
0
9336
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10111
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9948
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.