c++如何实现arp 静态绑定功能

来源:百度知道 编辑:UC知道 时间:2024/06/03 13:47:47
用C++可不可以实现每隔几秒钟ARP 静态绑定?

调用system函数:
#include <iostream>
#include <windows.h>
using namespace std;

int main()
{
while(1)
{
system("arp -s ip mac"); //其中ip位置输入你的ip,mac是物理ip
Sleep(10000);
}
return 0;
}