PDA

View Full Version : VPN connection



baobui
20th October 2010, 21:21
I have a dial up modem and I want to write a program that can create new VPN connection profile, enumerate all profile and connect to network by choosing one of those profile.
Which Qt class can I use to do that?

wysota
20th October 2010, 22:10
To do what? To write a program? A text editor would be a good start.

baobui
20th October 2010, 22:21
To do what? To write a program? A text editor would be a good start.

:)
I mean which Qt class I can use to establish a connection to network using the modem.
By choosing one of the connection profile in the network manager and clicking connect, I can connect to network. Now I want to do that by clicking a "connect" button in my program

wysota
20th October 2010, 22:29
I don't think there is a class in Qt that makes dialup connections. You can look at QNetorkConfigurationManager and family but I don't see anything related to dialup there.

squidge
20th October 2010, 22:47
Whats a dial up modem ? ;)

If your using Windows, you can typically configure it to automatically dial a default connection upon a program requesting to connect to an address outside your local LAN. Last time I used it (10 or 15 years ago) it wasn't too smart, but maybe it's better now. I think it was called "Autodial".

Otherwise you can use OS-specific calls. Eg. on Windows, you can just call InternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDE D) (http://msdn.microsoft.com/en-us/library/aa384336%28VS.85%29.aspx)

baobui
20th October 2010, 22:49
Thank you wysota,

I looked at all the Network class but could not find anything about the VPN connection. I think there will be some Windows APIs for it.

By the way, are there some Qt network class that I can monitor the upload / download speed?

wysota
20th October 2010, 22:56
By the way, are there some Qt network class that I can monitor the upload / download speed?
No, there are not.