This has an answer for Win XP but In Windows 7 and later the arp command can't setup static links, you need to use netsh, also it requires that I know the MAC address. What I want to do (similar to the ARM library) is to tell Windows to keep an IP address to MAC entry in the ARP table refreshed. I would like to do this in C# or C++/CLI. Is there an Ethernet level call I can make or must I do a system call via netsh?
As background, I have a .NET program (mix of C# and C++/CLI) that talks to more than a hundred IP devices over UDP on a local subnet. I actually know all the IP and MAC addresses ahead of time so I would like to configure the ARP cache to not throw away the first packet waiting for ARP resolution the first time I send to an IP address. Also it appears if you don't make them static the timeout is around 150 seconds so after that period you lose another packet refreshing the ARP table.