如何在Windows XP编程方式创建静态ARP缓存条目 [英] How to create static ARP cache entries programatically in Windows XP

查看:182
本文介绍了如何在Windows XP编程方式创建静态ARP缓存条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

时有办法设置在C#中ARP缓存项?

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

我发现使用 ARP 实用程序有关的唯一途径地址解析协议

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

ARP -s 命令不会从缓存过期。

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

有相关了解后我如何通过.NET?

推荐答案

接入ARP协议的信息,这将不是纯粹的.NET很明显,但你应该能够通过在IP助手API库在Win32 API来做到这一点 - 即CreateIpNetEntry和SetIpNetEntry方法。你可能会想通过的P / Invoke或包裹托管C ++库做到这一点。

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

这篇关于如何在Windows XP编程方式创建静态ARP缓存条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆