Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API for accessing routes, interfaces

Status
Not open for further replies.

bunniii

Programmer
Aug 16, 2002
1
NO
Hi

Here's my problem. I want all my packages to be routed through a dial-up network interface, not through the default ethernet interface. The problem is, I cannot set a persistent route, since the dial-up connection gets a new interface name every time.

So I need some way to list interfaces on the system, find the dial-up interface, and add a route to the ip routing table (route add x.x.x.x mask 255.255.255.255 y.y.y.y if [ifname]), all with the use of the win api. (I really don't want to hack this).

Anybody got any ideas?

Thanks for your time!
 
Hi,
I don't have an answer, but maybe you should take a look to the "not-so-well-documentated" win2k command NETSH (netshell).
I've find it very powerfull on handling stuff like yours.

Bye.
GeppoDarkson.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top