To provide the correct routes for the various vpn connections, we usually run a batch file that invokes commands similar to the following:
route add xxx.xxx.xxx.xxx mask 255.255.255.0 yyy.yyy.yyy.yyy
We have a C # application that uses the class NetworkInterfacesto listen for network events and runs this command with the command Process.
This is not ideal, and I was wondering if there is a specific set of Win32 API calls, which would mean that I can add / remove routes without going around in the console application. In word order, what API calls route.exedo this?
I think that CreateIpForwardEntrythis may be colleagues, but I'm not sure. I read about it here: http://msdn.microsoft.com/en-us/library/aa365860(VS.85).aspx
source
share