微软本身提供的Arp命令可以查看修改Arp缓存,怎么用程序实现呢!

解决方案 »

  1.   

    arp命令功能很强大的,命令行调用不就行了
      

  2.   

    ARP命令功能很强大的,在程序中使用命令行调用,并且不显示
    控制台窗口就行了
      

  3.   

    请查看windows sdk iphelper 部分,并且SDK中有for c,vb的获得arp 缓存的例子,可以看看。
      

  4.   

    INFO: IP Helper APIs Add Net Config and Stat Info to Win32 Apps 
    ID: Q193059 
    ARP Table Class
    This class provides access to the address resolution protocol (ARP) entries by mapping from an IP address to a physical address. The IP Helper APIs available for Windows NT 4.0 Service Pack 4 are listed below: 
    GetIpNetTable: Retrieves address resolution table information. 
    SetIpNetEntry: Adds entry to the ARP table. 
    DeleteIpNetEntry: Deletes entry from the ARP table. 
      

  5.   

    呵呵,借kingzai的花献佛啦!#include "iphlpapi.h"MIB_IPNETTABLE mi;
    DWORD ret = ::GetIpNetTable(&mi,sizeof(MIB_IPNETTABLE),true);
    if(ret==NO_ERROR){
    //
    }
    else{
    //
    }