Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create static ARP cache entries programatically in Windows XP

Tags:

c#

.net

ip

arp

Is there are way to set ARP cache entry in C#?

The only way I have found is related to use of arp utility Address Resolution Protocol

Static entries added with the arp -s command are not expired from the cache.

There are related post about How do I access ARP-protocol information through .NET?

like image 585
volody Avatar asked May 06 '26 09:05

volody


1 Answers

It wouldn't be purely .NET obviously, but you should be able to do it via the Win32 API in the IP Helper API library - namely the CreateIpNetEntry and SetIpNetEntry methods. You would likely want to do this via P/Invoke or a wrapped managed C++ library.

http://msdn.microsoft.com/en-us/library/aa366071(v=vs.85).aspx

like image 139
Zach Burlingame Avatar answered May 07 '26 22:05

Zach Burlingame