summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/modem.cpp229
-rw-r--r--noncore/settings/networksettings/ppp/modem.h6
-rw-r--r--noncore/settings/networksettings/ppp/pppdata.cpp134
-rw-r--r--noncore/settings/networksettings/ppp/pppdata.h35
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp28
5 files changed, 330 insertions, 102 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp
index cd5d21c..5139482 100644
--- a/noncore/settings/networksettings/ppp/modem.cpp
+++ b/noncore/settings/networksettings/ppp/modem.cpp
@@ -17,32 +17,44 @@
17 * This program is distributed in the hope that it will be useful, 17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details. 20 * Library General Public License for more details.
21 * 21 *
22 * You should have received a copy of the GNU Library General Public 22 * You should have received a copy of the GNU Library General Public
23 * License along with this program; if not, write to the Free 23 * License along with this program; if not, write to the Free
24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26 26
27#include <errno.h> 27#include <errno.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <unistd.h>
29#include <fcntl.h> 30#include <fcntl.h>
30#include <signal.h> 31#include <signal.h>
31#include <sys/ioctl.h> 32#include <sys/ioctl.h>
32#include <setjmp.h> 33#include <setjmp.h>
33#include <regex.h> 34#include <regex.h>
34#include <qregexp.h> 35#include <qregexp.h>
35#include <assert.h> 36#include <assert.h>
37#include <string.h>
36 38
39#ifdef HAVE_RESOLV_H
40# include <arpa/nameser.h>
41# include <resolv.h>
42#endif
43
44#ifndef _PATH_RESCONF
45#define _PATH_RESCONF "/etc/resolv.conf"
46#endif
47
48#define strlcpy strcpy
37#include "auth.h" 49#include "auth.h"
38#include "modem.h" 50#include "modem.h"
39#include "pppdata.h" 51#include "pppdata.h"
40//#include <klocale.h> 52//#include <klocale.h>
41#define i18n QObject::tr 53#define i18n QObject::tr
42#define qError qDebug 54#define qError qDebug
43//#include <kdebug.h> 55//#include <kdebug.h>
44//#include <config.h> 56//#include <config.h>
45 57
46#define MY_ASSERT(x) if (!(x)) { \ 58#define MY_ASSERT(x) if (!(x)) { \
47 qFatal( "ASSERT: \"%s\" in %s (%d)\n",#x,__FILE__,__LINE__); \ 59 qFatal( "ASSERT: \"%s\" in %s (%d)\n",#x,__FILE__,__LINE__); \
48 exit(1); } 60 exit(1); }
@@ -74,24 +86,26 @@ const char* pppdPath() {
74 return (pppdPath = buffer); 86 return (pppdPath = buffer);
75 } 87 }
76 } 88 }
77 89
78 return pppdPath; 90 return pppdPath;
79} 91}
80 92
81 93
82Modem::Modem() 94Modem::Modem()
83{ 95{
84 if (Modem::modem != 0) return; //CORRECT? 96 if (Modem::modem != 0) return; //CORRECT?
85 modemfd = -1; 97 modemfd = -1;
98 _pppdExitStatus = -1;
99 pppdPid = -1;
86 sn = 0L; 100 sn = 0L;
87 data_mode = false; 101 data_mode = false;
88 modem_is_locked = false; 102 modem_is_locked = false;
89 lockfile[0] = '\0'; 103 lockfile[0] = '\0';
90 device = "/dev/modem"; 104 device = "/dev/modem";
91 modem = this; 105 modem = this;
92} 106}
93 107
94 108
95Modem::~Modem() { 109Modem::~Modem() {
96 modem = 0; 110 modem = 0;
97} 111}
@@ -746,64 +760,263 @@ bool Modem::createAuthFile(Auth method, const char *username, const char *passwo
746 return false; 760 return false;
747 761
748 // delete old file if any 762 // delete old file if any
749 unlink(oldName); 763 unlink(oldName);
750 764
751 rename(authfile, oldName); 765 rename(authfile, oldName);
752 rename(newName, authfile); 766 rename(newName, authfile);
753 767
754 return true; 768 return true;
755} 769}
756 770
757 771
772bool Modem::removeAuthFile(Auth method) {
773 const char *authfile, *oldName;
774
775 if(!(authfile = authFile(method)))
776 return false;
777 if(!(oldName = authFile(method, Old)))
778 return false;
779
780 if(access(oldName, F_OK) == 0) {
781 unlink(authfile);
782 return (rename(oldName, authfile) == 0);
783 } else
784 return false;
785}
786
787
758bool Modem::setSecret(int method, const char* name, const char* password) 788bool Modem::setSecret(int method, const char* name, const char* password)
759{ 789{
760 790
761 Auth auth; 791 Auth auth;
762 if(method == AUTH_PAPCHAP) 792 if(method == AUTH_PAPCHAP)
763 return setSecret(AUTH_PAP, name, password) && 793 return setSecret(AUTH_PAP, name, password) &&
764 setSecret(AUTH_CHAP, name, password); 794 setSecret(AUTH_CHAP, name, password);
765 795
766 switch(method) { 796 switch(method) {
767 case AUTH_PAP: 797 case AUTH_PAP:
768 auth = Modem::PAP; 798 auth = Modem::PAP;
769 break; 799 break;
770 case AUTH_CHAP: 800 case AUTH_CHAP:
771 auth = Modem::CHAP; 801 auth = Modem::CHAP;
772 break; 802 break;
773 default: 803 default:
774 return false; 804 return false;
775 } 805 }
776 806
777 return createAuthFile(auth, name, password); 807 return createAuthFile(auth, name, password);
778 808
779} 809}
780 810
781bool Modem::removeSecret(int) 811bool Modem::removeSecret(int method)
782{ 812{
783 return true; 813 Auth auth;
814
815 switch(method) {
816 case AUTH_PAP:
817 auth = Modem::PAP;
818 break;
819 case AUTH_CHAP:
820 auth = Modem::CHAP;
821 break;
822 default:
823 return false;
824 }
825 return removeAuthFile( auth );
784} 826}
785 827
786void Modem::killPPPDaemon() 828int checkForInterface()
787{ 829{
830// I don't know if Linux needs more initialization to get the ioctl to
831// work, pppd seems to hint it does. But BSD doesn't, and the following
832// code should compile.
833#if (defined(HAVE_NET_IF_PPP_H) || defined(HAVE_LINUX_IF_PPP_H)) && !defined(__svr4__)
834 int s, ok;
835 struct ifreq ifr;
836 // extern char *no_ppp_msg;
837
838 if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
839 return 1; /* can't tell */
840
841 strlcpy(ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name));
842 ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) >= 0;
843 close(s);
844
845 if (ok == -1) {
846// This is ifdef'd FreeBSD, because FreeBSD is the only BSD that supports
847// KLDs, the old LKM interface couldn't handle loading devices
848// dynamically, and thus can't load ppp support on the fly
849#ifdef __FreeBSD__
850 // If we failed to load ppp support and don't have it already.
851 if (kldload("if_ppp") == -1) {
852 return -1;
853 }
854 return 0;
855#else
856 return -1;
857#endif
858 }
859 return 0;
860#else
861// We attempt to use the SunOS/SysVr4 method and stat /dev/ppp
862 struct stat buf;
863
864 memset(&buf, 0, sizeof(buf));
865 return stat("/dev/ppp", &buf);
866#endif
788} 867}
789 868
790int Modem::pppdExitStatus() 869bool Modem::execpppd(const char *arguments) {
791{ 870 char buf[MAX_CMDLEN];
792 return -1; 871 char *args[MaxArgs];
872 pid_t pgrpid;
873
874 if(modemfd<0)
875 return false;
876
877 _pppdExitStatus = -1;
878
879 switch(pppdPid = fork())
880 {
881 case -1:
882 fprintf(stderr,"In parent: fork() failed\n");
883 return false;
884 break;
885
886 case 0:
887 // let's parse the arguments the user supplied into UNIX suitable form
888 // that is a list of pointers each pointing to exactly one word
889 strlcpy(buf, arguments);
890 parseargs(buf, args);
891 // become a session leader and let /dev/ttySx
892 // be the controlling terminal.
893 pgrpid = setsid();
894#ifdef TIOCSCTTY
895 if(ioctl(modemfd, TIOCSCTTY, 0)<0)
896 fprintf(stderr, "ioctl() failed.\n");
897#elif defined (TIOCSPGRP)
898 if(ioctl(modemfd, TIOCSPGRP, &pgrpid)<0)
899 fprintf(stderr, "ioctl() failed.\n");
900#endif
901 if(tcsetpgrp(modemfd, pgrpid)<0)
902 fprintf(stderr, "tcsetpgrp() failed.\n");
903
904 dup2(modemfd, 0);
905 dup2(modemfd, 1);
906
907 switch (checkForInterface()) {
908 case 1:
909 fprintf(stderr, "Cannot determine if kernel supports ppp.\n");
910 break;
911 case -1:
912 fprintf(stderr, "Kernel does not support ppp, oops.\n");
913 break;
914 case 0:
915 fprintf(stderr, "Kernel supports ppp alright.\n");
916 break;
917 }
918
919 execve(pppdPath(), args, 0L);
920 _exit(0);
921 break;
922
923 default:
924 qDebug("In parent: pppd pid %d\n",pppdPid);
925 close(modemfd);
926 modemfd = -1;
927 return true;
928 break;
929 }
930}
931
932
933bool Modem::killpppd() {
934 if(pppdPid > 0) {
935 qDebug("In killpppd(): Sending SIGTERM to %d\n", pppdPid);
936 if(kill(pppdPid, SIGTERM) < 0) {
937 qDebug("Error terminating %d. Sending SIGKILL\n", pppdPid);
938 if(kill(pppdPid, SIGKILL) < 0) {
939 qDebug("Error killing %d\n", pppdPid);
940 return false;
941 }
942 }
943 }
944 return true;
945}
946
947
948void Modem::parseargs(char* buf, char** args) {
949 int nargs = 0;
950 int quotes;
951
952 while(nargs < MaxArgs-1 && *buf != '\0') {
953
954 quotes = 0;
955
956 // Strip whitespace. Use nulls, so that the previous argument is
957 // terminated automatically.
958
959 while ((*buf == ' ' ) || (*buf == '\t' ) || (*buf == '\n' ) )
960 *buf++ = '\0';
961
962 // detect begin of quoted argument
963 if (*buf == '"' || *buf == '\'') {
964 quotes = *buf;
965 *buf++ = '\0';
966 }
967
968 // save the argument
969 if(*buf != '\0') {
970 *args++ = buf;
971 nargs++;
972 }
973
974 if (!quotes)
975 while ((*buf != '\0') && (*buf != '\n') &&
976 (*buf != '\t') && (*buf != ' '))
977 buf++;
978 else {
979 while ((*buf != '\0') && (*buf != quotes))
980 buf++;
981 *buf++ = '\0';
982 }
983 }
984
985 *args = 0L;
793} 986}
794 987
795bool Modem::execPPPDaemon(const QString & arguments) 988bool Modem::execPPPDaemon(const QString & arguments)
796{ 989{
990 if(execpppd(arguments)==0) {
991 PPPData::data()->setpppdRunning(true);
797 return true; 992 return true;
993 } else
994 return false;
995}
996
997void Modem::killPPPDaemon()
998{
999 PPPData::data()->setpppdRunning(false);
1000 killpppd();
1001}
1002
1003int Modem::pppdExitStatus()
1004{
1005 return _pppdExitStatus;
798} 1006}
799 1007
800int Modem::openResolv(int flags) 1008int Modem::openResolv(int flags)
801{ 1009{
802 return -1; 1010 int fd;
1011 if ((fd = open(_PATH_RESCONF, flags)) == -1) {
1012 qDebug("error opening resolv.conf!");
1013 fd = open(DEVNULL, O_RDONLY);
1014 }
1015 return fd;
803} 1016}
804 1017
805bool Modem::setHostname(const QString & name) 1018bool Modem::setHostname(const QString & name)
806{ 1019{
807 return true; 1020 return sethostname(name, name.length()) == 0;
808} 1021}
809 1022
diff --git a/noncore/settings/networksettings/ppp/modem.h b/noncore/settings/networksettings/ppp/modem.h
index 052be4a..b494977 100644
--- a/noncore/settings/networksettings/ppp/modem.h
+++ b/noncore/settings/networksettings/ppp/modem.h
@@ -84,30 +84,36 @@ signals:
84 84
85private slots: 85private slots:
86 void startNotifier(); 86 void startNotifier();
87 void stopNotifier(); 87 void stopNotifier();
88 void readtty(int); 88 void readtty(int);
89 89
90private: 90private:
91 enum { MaxPathLen = 30, MaxStrLen = 40, MaxArgs = 100 }; 91 enum { MaxPathLen = 30, MaxStrLen = 40, MaxArgs = 100 };
92 enum { Original=0x100, New=0x200, Old=0x400 } Version; 92 enum { Original=0x100, New=0x200, Old=0x400 } Version;
93 93
94 const char* authFile(Auth method, int version = Original ); 94 const char* authFile(Auth method, int version = Original );
95 bool createAuthFile(Auth method,const char *username,const char *password); 95 bool createAuthFile(Auth method,const char *username,const char *password);
96 bool removeAuthFile(Auth method);
97 bool execpppd(const char *arguments);
98 bool killpppd();
99 void parseargs(char* buf, char** args);
96 void escape_to_command_mode(); 100 void escape_to_command_mode();
97 int openLockfile(QString,int); 101 int openLockfile(QString,int);
98 102
99private: 103private:
100 QString device; 104 QString device;
101 QString lockfile; 105 QString lockfile;
102 int modemfd; 106 int modemfd;
107 int pppdPid;
108 int _pppdExitStatus;
103 QSocketNotifier *sn; 109 QSocketNotifier *sn;
104 bool data_mode; 110 bool data_mode;
105 QString errmsg; 111 QString errmsg;
106 struct termios initial_tty; 112 struct termios initial_tty;
107 struct termios tty; 113 struct termios tty;
108 bool modem_is_locked; 114 bool modem_is_locked;
109}; 115};
110 116
111#endif 117#endif
112 118
113 119
diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp
index 646facd..bb1c8ed 100644
--- a/noncore/settings/networksettings/ppp/pppdata.cpp
+++ b/noncore/settings/networksettings/ppp/pppdata.cpp
@@ -314,300 +314,300 @@ bool PPPData::pppdVersionMin(int ver, int mod, int patch) {
314 314
315int PPPData::pppdTimeout() { 315int PPPData::pppdTimeout() {
316 return readNumConfig(GENERAL_GRP, PPPDTIMEOUT_KEY, PPPD_TIMEOUT); 316 return readNumConfig(GENERAL_GRP, PPPDTIMEOUT_KEY, PPPD_TIMEOUT);
317} 317}
318 318
319 319
320void PPPData::setpppdTimeout(int n) { 320void PPPData::setpppdTimeout(int n) {
321 writeConfig(GENERAL_GRP, PPPDTIMEOUT_KEY, n); 321 writeConfig(GENERAL_GRP, PPPDTIMEOUT_KEY, n);
322} 322}
323 323
324 324
325const QString PPPData::modemDevice() { 325const QString PPPData::modemDevice() {
326 return readConfig (MODEM_GRP, MODEMDEV_KEY, devices[DEV_DEFAULT]); 326 return readConfig (modemGroup(), MODEMDEV_KEY, devices[DEV_DEFAULT]);
327} 327}
328 328
329 329
330void PPPData::setModemDevice(const QString &n) { 330void PPPData::setModemDevice(const QString &n) {
331 writeConfig(MODEM_GRP, MODEMDEV_KEY, n); 331 writeConfig(modemGroup(), MODEMDEV_KEY, n);
332} 332}
333 333
334 334
335const QString PPPData::flowcontrol() { 335const QString PPPData::flowcontrol() {
336 return readConfig(MODEM_GRP, FLOWCONTROL_KEY, "CRTSCTS"); 336 return readConfig(modemGroup(), FLOWCONTROL_KEY, "CRTSCTS");
337} 337}
338 338
339 339
340void PPPData::setFlowcontrol(const QString &n) { 340void PPPData::setFlowcontrol(const QString &n) {
341 writeConfig(MODEM_GRP, FLOWCONTROL_KEY, n); 341 writeConfig(modemGroup(), FLOWCONTROL_KEY, n);
342} 342}
343 343
344 344
345const QString PPPData::speed() { 345const QString PPPData::speed() {
346 QString s = readConfig(MODEM_GRP, SPEED_KEY, "57600"); 346 QString s = readConfig(modemGroup(), SPEED_KEY, "57600");
347 // undo the damage of a bug in former versions. It left an empty Speed= 347 // undo the damage of a bug in former versions. It left an empty Speed=
348 // entry in kppprc. kppp did set the serial port to 57600 as default but 348 // entry in kppprc. kppp did set the serial port to 57600 as default but
349 // pppd wouldn't receive the speed via the command line. 349 // pppd wouldn't receive the speed via the command line.
350 if(s.toUInt() == 0) 350 if(s.toUInt() == 0)
351 s = "57600"; 351 s = "57600";
352 return s; 352 return s;
353} 353}
354 354
355 355
356void PPPData::setSpeed(const QString &n) { 356void PPPData::setSpeed(const QString &n) {
357 writeConfig(MODEM_GRP, SPEED_KEY, n); 357 writeConfig(modemGroup(), SPEED_KEY, n);
358} 358}
359 359
360 360
361#if 0 361#if 0
362void PPPData::setUseCDLine(const int n) { 362void PPPData::setUseCDLine(const int n) {
363 writeConfig(MODEM_GRP,USECDLINE_KEY,n); 363 writeConfig(modemGroup(),USECDLINE_KEY,n);
364} 364}
365 365
366 366
367int PPPData::UseCDLine() { 367int PPPData::UseCDLine() {
368 return readNumConfig(MODEM_GRP,USECDLINE_KEY,0); 368 return readNumConfig(modemGroup(),USECDLINE_KEY,0);
369} 369}
370#endif 370#endif
371 371
372const QString PPPData::modemEscapeStr() { 372const QString PPPData::modemEscapeStr() {
373 return readConfig(MODEM_GRP,ESCAPESTR_KEY,"+++"); 373 return readConfig(modemGroup(),ESCAPESTR_KEY,"+++");
374} 374}
375 375
376 376
377void PPPData::setModemEscapeStr(const QString &n) { 377void PPPData::setModemEscapeStr(const QString &n) {
378 writeConfig(MODEM_GRP,ESCAPESTR_KEY,n); 378 writeConfig(modemGroup(),ESCAPESTR_KEY,n);
379} 379}
380 380
381 381
382const QString PPPData::modemEscapeResp() { 382const QString PPPData::modemEscapeResp() {
383 return readConfig(MODEM_GRP,ESCAPERESP_KEY,"OK"); 383 return readConfig(modemGroup(),ESCAPERESP_KEY,"OK");
384} 384}
385 385
386 386
387void PPPData::setModemEscapeResp(const QString &n) { 387void PPPData::setModemEscapeResp(const QString &n) {
388 writeConfig(MODEM_GRP,ESCAPERESP_KEY,n); 388 writeConfig(modemGroup(),ESCAPERESP_KEY,n);
389} 389}
390 390
391 391
392int PPPData::modemEscapeGuardTime() { 392int PPPData::modemEscapeGuardTime() {
393 return readNumConfig(MODEM_GRP,ESCAPEGUARDTIME_KEY,50); 393 return readNumConfig(modemGroup(),ESCAPEGUARDTIME_KEY,50);
394} 394}
395 395
396 396
397void PPPData::setModemEscapeGuardTime(int n) { 397void PPPData::setModemEscapeGuardTime(int n) {
398 writeConfig(MODEM_GRP,ESCAPEGUARDTIME_KEY,n); 398 writeConfig(modemGroup(),ESCAPEGUARDTIME_KEY,n);
399} 399}
400 400
401 401
402bool PPPData::modemLockFile() { 402bool PPPData::modemLockFile() {
403 return readNumConfig(MODEM_GRP, LOCKFILE_KEY, 1); 403 return readNumConfig(modemGroup(), LOCKFILE_KEY, 1);
404} 404}
405 405
406 406
407void PPPData::setModemLockFile(bool set) { 407void PPPData::setModemLockFile(bool set) {
408 writeConfig(MODEM_GRP, LOCKFILE_KEY, set); 408 writeConfig(modemGroup(), LOCKFILE_KEY, set);
409} 409}
410 410
411 411
412int PPPData::modemTimeout() { 412int PPPData::modemTimeout() {
413 return readNumConfig(MODEM_GRP, TIMEOUT_KEY, MODEM_TIMEOUT); 413 return readNumConfig(modemGroup(), TIMEOUT_KEY, MODEM_TIMEOUT);
414} 414}
415 415
416 416
417void PPPData::setModemTimeout(int n) { 417void PPPData::setModemTimeout(int n) {
418 writeConfig(MODEM_GRP, TIMEOUT_KEY, n); 418 writeConfig(modemGroup(), TIMEOUT_KEY, n);
419} 419}
420 420
421 421
422int PPPData::modemToneDuration() { 422int PPPData::modemToneDuration() {
423 return readNumConfig(MODEM_GRP, TONEDURATION_KEY,MODEM_TONEDURATION); 423 return readNumConfig(modemGroup(), TONEDURATION_KEY,MODEM_TONEDURATION);
424} 424}
425 425
426 426
427void PPPData::setModemToneDuration(int n) { 427void PPPData::setModemToneDuration(int n) {
428 writeConfig(MODEM_GRP, TONEDURATION_KEY, n); 428 writeConfig(modemGroup(), TONEDURATION_KEY, n);
429} 429}
430 430
431 431
432int PPPData::busyWait() { 432int PPPData::busyWait() {
433 return readNumConfig(MODEM_GRP, BUSYWAIT_KEY, BUSY_WAIT); 433 return readNumConfig(modemGroup(), BUSYWAIT_KEY, BUSY_WAIT);
434} 434}
435 435
436 436
437void PPPData::setbusyWait(int n) { 437void PPPData::setbusyWait(int n) {
438 writeConfig(MODEM_GRP, BUSYWAIT_KEY, n); 438 writeConfig(modemGroup(), BUSYWAIT_KEY, n);
439} 439}
440 440
441 441
442// 442//
443//Advanced "Modem" dialog 443//Advanced "Modem" dialog
444// 444//
445// defaults: InitString=ATZ, InitString1="" etc. 445// defaults: InitString=ATZ, InitString1="" etc.
446const QString PPPData::modemInitStr(int i) { 446const QString PPPData::modemInitStr(int i) {
447 assert(i >= 0 && i < NumInitStrings); 447 assert(i >= 0 && i < NumInitStrings);
448 if(i == 0) 448 if(i == 0)
449 return readConfig(MODEM_GRP, INITSTR_KEY, "ATZ"); 449 return readConfig(modemGroup(), INITSTR_KEY, "ATZ");
450 else 450 else
451 return readConfig(MODEM_GRP, INITSTR_KEY + QString::number(i), ""); 451 return readConfig(modemGroup(), INITSTR_KEY + QString::number(i), "");
452} 452}
453 453
454 454
455void PPPData::setModemInitStr(int i, const QString &n) { 455void PPPData::setModemInitStr(int i, const QString &n) {
456 assert(i >= 0 && i < NumInitStrings); 456 assert(i >= 0 && i < NumInitStrings);
457 QString k = INITSTR_KEY + (i > 0 ? QString::number(i) : ""); 457 QString k = INITSTR_KEY + (i > 0 ? QString::number(i) : "");
458 writeConfig(MODEM_GRP, k, n); 458 writeConfig(modemGroup(), k, n);
459} 459}
460 460
461 461
462const QString PPPData::modemInitResp() { 462const QString PPPData::modemInitResp() {
463 return readConfig(MODEM_GRP, INITRESP_KEY, "OK"); 463 return readConfig(modemGroup(), INITRESP_KEY, "OK");
464} 464}
465 465
466 466
467void PPPData::setModemInitResp(const QString &n) { 467void PPPData::setModemInitResp(const QString &n) {
468 writeConfig(MODEM_GRP, INITRESP_KEY, n); 468 writeConfig(modemGroup(), INITRESP_KEY, n);
469} 469}
470 470
471 471
472int PPPData::modemPreInitDelay() { 472int PPPData::modemPreInitDelay() {
473 return readNumConfig(MODEM_GRP, PREINITDELAY_KEY, 50); 473 return readNumConfig(modemGroup(), PREINITDELAY_KEY, 50);
474} 474}
475 475
476 476
477void PPPData::setModemPreInitDelay(int n) { 477void PPPData::setModemPreInitDelay(int n) {
478 writeConfig(MODEM_GRP, PREINITDELAY_KEY, n); 478 writeConfig(modemGroup(), PREINITDELAY_KEY, n);
479} 479}
480 480
481 481
482int PPPData::modemInitDelay() { 482int PPPData::modemInitDelay() {
483 return readNumConfig(MODEM_GRP, INITDELAY_KEY, 50); 483 return readNumConfig(modemGroup(), INITDELAY_KEY, 50);
484} 484}
485 485
486 486
487void PPPData::setModemInitDelay(int n) { 487void PPPData::setModemInitDelay(int n) {
488 writeConfig(MODEM_GRP, INITDELAY_KEY, n); 488 writeConfig(modemGroup(), INITDELAY_KEY, n);
489} 489}
490 490
491QString PPPData::modemNoDialToneDetectionStr() { 491QString PPPData::modemNoDialToneDetectionStr() {
492 return readConfig(MODEM_GRP, NODTDETECT_KEY, "ATX3"); 492 return readConfig(modemGroup(), NODTDETECT_KEY, "ATX3");
493} 493}
494 494
495void PPPData::setModemNoDialToneDetectionStr(const QString &n) { 495void PPPData::setModemNoDialToneDetectionStr(const QString &n) {
496 writeConfig(MODEM_GRP, NODTDETECT_KEY, n); 496 writeConfig(modemGroup(), NODTDETECT_KEY, n);
497} 497}
498 498
499const QString PPPData::modemDialStr() { 499const QString PPPData::modemDialStr() {
500 return readConfig(MODEM_GRP, DIALSTR_KEY, "ATDT"); 500 return readConfig(modemGroup(), DIALSTR_KEY, "ATDT");
501} 501}
502 502
503 503
504void PPPData::setModemDialStr(const QString &n) { 504void PPPData::setModemDialStr(const QString &n) {
505 writeConfig(MODEM_GRP, DIALSTR_KEY, n); 505 writeConfig(modemGroup(), DIALSTR_KEY, n);
506} 506}
507 507
508 508
509const QString PPPData::modemConnectResp() { 509const QString PPPData::modemConnectResp() {
510 return readConfig(MODEM_GRP, CONNECTRESP_KEY, "CONNECT"); 510 return readConfig(modemGroup(), CONNECTRESP_KEY, "CONNECT");
511} 511}
512 512
513 513
514void PPPData::setModemConnectResp(const QString &n) { 514void PPPData::setModemConnectResp(const QString &n) {
515 writeConfig(MODEM_GRP, CONNECTRESP_KEY, n); 515 writeConfig(modemGroup(), CONNECTRESP_KEY, n);
516} 516}
517 517
518 518
519const QString PPPData::modemBusyResp() { 519const QString PPPData::modemBusyResp() {
520 return readConfig(MODEM_GRP, BUSYRESP_KEY, "BUSY"); 520 return readConfig(modemGroup(), BUSYRESP_KEY, "BUSY");
521} 521}
522 522
523 523
524void PPPData::setModemBusyResp(const QString &n) { 524void PPPData::setModemBusyResp(const QString &n) {
525 writeConfig(MODEM_GRP, BUSYRESP_KEY, n); 525 writeConfig(modemGroup(), BUSYRESP_KEY, n);
526} 526}
527 527
528 528
529const QString PPPData::modemNoCarrierResp() { 529const QString PPPData::modemNoCarrierResp() {
530 return readConfig(MODEM_GRP, NOCARRIERRESP_KEY, "NO CARRIER"); 530 return readConfig(modemGroup(), NOCARRIERRESP_KEY, "NO CARRIER");
531} 531}
532 532
533 533
534void PPPData::setModemNoCarrierResp(const QString &n) { 534void PPPData::setModemNoCarrierResp(const QString &n) {
535 writeConfig(MODEM_GRP, NOCARRIERRESP_KEY, n); 535 writeConfig(modemGroup(), NOCARRIERRESP_KEY, n);
536} 536}
537 537
538 538
539const QString PPPData::modemNoDialtoneResp() { 539const QString PPPData::modemNoDialtoneResp() {
540 return readConfig(MODEM_GRP, NODIALTONERESP_KEY, "NO DIALTONE"); 540 return readConfig(modemGroup(), NODIALTONERESP_KEY, "NO DIALTONE");
541} 541}
542 542
543 543
544void PPPData::setModemNoDialtoneResp(const QString &n) { 544void PPPData::setModemNoDialtoneResp(const QString &n) {
545 writeConfig(MODEM_GRP, NODIALTONERESP_KEY, n); 545 writeConfig(modemGroup(), NODIALTONERESP_KEY, n);
546} 546}
547 547
548 548
549const QString PPPData::modemHangupStr() { 549const QString PPPData::modemHangupStr() {
550 return readConfig(MODEM_GRP, HANGUPSTR_KEY, "+++ATH"); 550 return readConfig(modemGroup(), HANGUPSTR_KEY, "+++ATH");
551} 551}
552 552
553void PPPData::setModemHangupStr(const QString &n) { 553void PPPData::setModemHangupStr(const QString &n) {
554 writeConfig(MODEM_GRP, HANGUPSTR_KEY, n); 554 writeConfig(modemGroup(), HANGUPSTR_KEY, n);
555} 555}
556 556
557 557
558const QString PPPData::modemHangupResp() { 558const QString PPPData::modemHangupResp() {
559 return readConfig(MODEM_GRP, HANGUPRESP_KEY, "OK"); 559 return readConfig(modemGroup(), HANGUPRESP_KEY, "OK");
560} 560}
561 561
562void PPPData::setModemHangupResp(const QString &n) { 562void PPPData::setModemHangupResp(const QString &n) {
563 writeConfig(MODEM_GRP, HANGUPRESP_KEY, n); 563 writeConfig(modemGroup(), HANGUPRESP_KEY, n);
564} 564}
565 565
566 566
567const QString PPPData::modemAnswerStr() { 567const QString PPPData::modemAnswerStr() {
568 return readConfig(MODEM_GRP, ANSWERSTR_KEY, "ATA"); 568 return readConfig(modemGroup(), ANSWERSTR_KEY, "ATA");
569} 569}
570 570
571 571
572QString PPPData::volumeOff() { 572QString PPPData::volumeOff() {
573 return readConfig(MODEM_GRP, VOLUME_OFF, "M0L0"); 573 return readConfig(modemGroup(), VOLUME_OFF, "M0L0");
574} 574}
575 575
576 576
577void PPPData::setVolumeOff(const QString &s) { 577void PPPData::setVolumeOff(const QString &s) {
578 writeConfig(MODEM_GRP, VOLUME_OFF, s); 578 writeConfig(modemGroup(), VOLUME_OFF, s);
579} 579}
580 580
581 581
582QString PPPData::volumeMedium() { 582QString PPPData::volumeMedium() {
583 return readConfig(MODEM_GRP, VOLUME_MEDIUM, "M1L1"); 583 return readConfig(modemGroup(), VOLUME_MEDIUM, "M1L1");
584} 584}
585 585
586 586
587void PPPData::setVolumeMedium(const QString &s) { 587void PPPData::setVolumeMedium(const QString &s) {
588 writeConfig(MODEM_GRP, VOLUME_MEDIUM, s); 588 writeConfig(modemGroup(), VOLUME_MEDIUM, s);
589} 589}
590 590
591 591
592QString PPPData::volumeHigh() { 592QString PPPData::volumeHigh() {
593 QString tmp = readConfig(MODEM_GRP, VOLUME_HIGH, "M1L3"); 593 QString tmp = readConfig(modemGroup(), VOLUME_HIGH, "M1L3");
594 if(tmp == "M1L4") 594 if(tmp == "M1L4")
595 tmp = "M1L3"; 595 tmp = "M1L3";
596 return tmp; 596 return tmp;
597} 597}
598 598
599 599
600void PPPData::setVolumeHigh(const QString &s) { 600void PPPData::setVolumeHigh(const QString &s) {
601 writeConfig(MODEM_GRP, VOLUME_HIGH, s); 601 writeConfig(modemGroup(), VOLUME_HIGH, s);
602} 602}
603 603
604 604
605QString PPPData::volumeInitString() { 605QString PPPData::volumeInitString() {
606 QString s; 606 QString s;
607 607
608 switch(volume()) { 608 switch(volume()) {
609 case 0: 609 case 0:
610 s = volumeOff(); 610 s = volumeOff();
611 break; 611 break;
612 case 1: 612 case 1:
613 s = volumeMedium(); 613 s = volumeMedium();
@@ -615,72 +615,72 @@ QString PPPData::volumeInitString() {
615 case 2: 615 case 2:
616 s = volumeHigh(); 616 s = volumeHigh();
617 break; 617 break;
618 default: 618 default:
619 s = volumeMedium(); 619 s = volumeMedium();
620 } 620 }
621 621
622 return s; 622 return s;
623} 623}
624 624
625 625
626int PPPData::volume() { 626int PPPData::volume() {
627 return readNumConfig(MODEM_GRP, VOLUME_KEY, 1); 627 return readNumConfig(modemGroup(), VOLUME_KEY, 1);
628} 628}
629 629
630 630
631void PPPData::setVolume(int i) { 631void PPPData::setVolume(int i) {
632 writeConfig(MODEM_GRP, VOLUME_KEY, i); 632 writeConfig(modemGroup(), VOLUME_KEY, i);
633} 633}
634 634
635int PPPData::waitForDialTone() { 635int PPPData::waitForDialTone() {
636 return readNumConfig(MODEM_GRP, DIALTONEWAIT_KEY, 1); 636 return readNumConfig(modemGroup(), DIALTONEWAIT_KEY, 1);
637} 637}
638 638
639void PPPData::setWaitForDialTone(int i) { 639void PPPData::setWaitForDialTone(int i) {
640 writeConfig(MODEM_GRP, DIALTONEWAIT_KEY, i); 640 writeConfig(modemGroup(), DIALTONEWAIT_KEY, i);
641} 641}
642 642
643void PPPData::setModemAnswerStr(const QString &n) { 643void PPPData::setModemAnswerStr(const QString &n) {
644 writeConfig(MODEM_GRP, ANSWERSTR_KEY, n); 644 writeConfig(modemGroup(), ANSWERSTR_KEY, n);
645} 645}
646 646
647 647
648const QString PPPData::modemRingResp() { 648const QString PPPData::modemRingResp() {
649 return readConfig(MODEM_GRP, RINGRESP_KEY, "RING"); 649 return readConfig(modemGroup(), RINGRESP_KEY, "RING");
650} 650}
651 651
652 652
653void PPPData::setModemRingResp(const QString &n) { 653void PPPData::setModemRingResp(const QString &n) {
654 writeConfig(MODEM_GRP, RINGRESP_KEY, n); 654 writeConfig(modemGroup(), RINGRESP_KEY, n);
655} 655}
656 656
657 657
658const QString PPPData::modemAnswerResp() { 658const QString PPPData::modemAnswerResp() {
659 return readConfig(MODEM_GRP, ANSWERRESP_KEY, "CONNECT"); 659 return readConfig(modemGroup(), ANSWERRESP_KEY, "CONNECT");
660} 660}
661 661
662 662
663void PPPData::setModemAnswerResp(const QString &n) { 663void PPPData::setModemAnswerResp(const QString &n) {
664 writeConfig(MODEM_GRP, ANSWERRESP_KEY, n); 664 writeConfig(modemGroup(), ANSWERRESP_KEY, n);
665} 665}
666 666
667 667
668const QString PPPData::enter() { 668const QString PPPData::enter() {
669 return readConfig(MODEM_GRP, ENTER_KEY, "CR"); 669 return readConfig(modemGroup(), ENTER_KEY, "CR");
670} 670}
671 671
672 672
673void PPPData::setEnter(const QString &n) { 673void PPPData::setEnter(const QString &n) {
674 writeConfig(MODEM_GRP, ENTER_KEY, n); 674 writeConfig(modemGroup(), ENTER_KEY, n);
675} 675}
676 676
677 677
678// 678//
679// functions to set/return account information 679// functions to set/return account information
680// 680//
681 681
682//returns number of accounts 682//returns number of accounts
683int PPPData::count() const { 683int PPPData::count() const {
684 return highcount + 1; 684 return highcount + 1;
685} 685}
686 686
@@ -1200,24 +1200,28 @@ bool PPPData::pppdRunning() const {
1200void PPPData::setpppdRunning(bool set) { 1200void PPPData::setpppdRunning(bool set) {
1201 pppdisrunning = set; 1201 pppdisrunning = set;
1202} 1202}
1203 1203
1204int PPPData::pppdError() const { 1204int PPPData::pppdError() const {
1205 return pppderror; 1205 return pppderror;
1206} 1206}
1207 1207
1208void PPPData::setpppdError(int err) { 1208void PPPData::setpppdError(int err) {
1209 pppderror = err; 1209 pppderror = err;
1210} 1210}
1211 1211
1212QString PPPData::modemGroup()
1213{
1214 return MODEM_GRP;
1215}
1212 1216
1213// // 1217// //
1214// // window position 1218// // window position
1215// // 1219// //
1216// void PPPData::winPosConWin(int& p_x, int& p_y) { 1220// void PPPData::winPosConWin(int& p_x, int& p_y) {
1217// p_x = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_X, QApplication::desktop()->width()/2-160); 1221// p_x = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_X, QApplication::desktop()->width()/2-160);
1218// p_y = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_Y, QApplication::desktop()->height()/2-55); 1222// p_y = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_Y, QApplication::desktop()->height()/2-55);
1219// } 1223// }
1220 1224
1221// void PPPData::setWinPosConWin(int p_x, int p_y) { 1225// void PPPData::setWinPosConWin(int p_x, int p_y) {
1222// writeConfig(WINPOS_GRP, WINPOS_CONWIN_X, p_x); 1226// writeConfig(WINPOS_GRP, WINPOS_CONWIN_X, p_x);
1223// writeConfig(WINPOS_GRP, WINPOS_CONWIN_Y, p_y); 1227// writeConfig(WINPOS_GRP, WINPOS_CONWIN_Y, p_y);
diff --git a/noncore/settings/networksettings/ppp/pppdata.h b/noncore/settings/networksettings/ppp/pppdata.h
index 57ce2fd..c4d7bc3 100644
--- a/noncore/settings/networksettings/ppp/pppdata.h
+++ b/noncore/settings/networksettings/ppp/pppdata.h
@@ -150,48 +150,49 @@ class Config;
150// pppd errors 150// pppd errors
151#define E_IF_TIMEOUT 1 151#define E_IF_TIMEOUT 1
152#define E_PPPD_DIED 2 152#define E_PPPD_DIED 2
153 153
154// window position 154// window position
155#define WINPOS_CONWIN_X "WindowPositionConWinX" 155#define WINPOS_CONWIN_X "WindowPositionConWinX"
156#define WINPOS_CONWIN_Y "WindowPositionConWinY" 156#define WINPOS_CONWIN_Y "WindowPositionConWinY"
157#define WINPOS_STATWIN_X "WindowPositionStatWinX" 157#define WINPOS_STATWIN_X "WindowPositionStatWinX"
158#define WINPOS_STATWIN_Y "WindowPositionStatWinY" 158#define WINPOS_STATWIN_Y "WindowPositionStatWinY"
159 159
160class PPPData { 160class PPPData {
161public: 161public:
162 PPPData(); 162 PPPData();
163 ~PPPData() {}; 163 ~PPPData() {};
164 static PPPData* data(); 164 static PPPData* data();
165 165
166 enum { NumInitStrings = 2 }; 166 enum { NumInitStrings = 2 };
167 167
168 // general functions 168 // general functions
169 bool open(); 169 bool open();
170 void save(); 170 void save();
171 void cancel(); 171 void cancel();
172// int access() const; // read/write access
173 172
174 // function to read/write date to configuration file 173
175 QString readConfig(const QString &, const QString &, const QString &); 174 // function to read/write date to configuration file
176 int readNumConfig(const QString &, const QString &, int); 175 QString readConfig(const QString &, const QString &, const QString &);
177 bool readListConfig(const QString &, const QString &, 176 int readNumConfig(const QString &, const QString &, int);
177 bool readListConfig(const QString &, const QString &,
178 QStringList &, char sep = ','); 178 QStringList &, char sep = ',');
179 void writeConfig(const QString &, const QString &, const QString &); 179 void writeConfig(const QString &, const QString &, const QString &);
180 void writeConfig(const QString &, const QString &, int); 180 void writeConfig(const QString &, const QString &, int);
181 void writeListConfig(const QString &, const QString &, 181 void writeListConfig(const QString &, const QString &,
182 QStringList &, char sep = ','); 182 QStringList &, char sep = ',');
183 183
184 // return the current account group 184 // return the current account group
185 QString currentGroup() { return cgroup; } 185 QString currentGroup() { return cgroup; }
186 QString modemGroup();
186 187
187 // functions to set/get general kppp info 188 // functions to set/get general kppp info
188 QString password() const; 189 QString password() const;
189 void setPassword(const QString &); 190 void setPassword(const QString &);
190 191
191 const QString defaultAccount(); 192 const QString defaultAccount();
192 void setDefaultAccount(const QString &); 193 void setDefaultAccount(const QString &);
193 194
194 void set_xserver_exit_disconnect(bool set); 195 void set_xserver_exit_disconnect(bool set);
195 bool get_xserver_exit_disconnect(); 196 bool get_xserver_exit_disconnect();
196 197
197 void setPPPDebug(bool set); 198 void setPPPDebug(bool set);
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index da17e26..e13f8c8 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -1,23 +1,28 @@
1#include "pppconfig.h" 1#include "pppconfig.h"
2#include "pppmodule.h" 2#include "pppmodule.h"
3#include "pppdata.h" 3#include "pppdata.h"
4#include "kpppwidget.h" 4#include "kpppwidget.h"
5#include "interfaceinformationimp.h" 5#include "interfaceinformationimp.h"
6//#include "devices.h" 6//#include "devices.h"
7 7
8/** 8/**
9 * Constructor, find all of the possible interfaces 9 * Constructor, find all of the possible interfaces
10 */ 10 */
11PPPModule::PPPModule() : Module() { 11PPPModule::PPPModule() : Module()
12{
13 Interface *iface;
14 iface = new Interface( 0, "device" );
15 iface->setHardwareName( "account" );
16 list.append( iface );
12} 17}
13 18
14/** 19/**
15 * Delete any interfaces that we own. 20 * Delete any interfaces that we own.
16 */ 21 */
17PPPModule::~PPPModule(){ 22PPPModule::~PPPModule(){
18 Interface *i; 23 Interface *i;
19 for ( i=list.first(); i != 0; i=list.next() ) 24 for ( i=list.first(); i != 0; i=list.next() )
20 delete i; 25 delete i;
21} 26}
22 27
23/** 28/**
@@ -33,40 +38,35 @@ void PPPModule::setProfile(const QString &newProfile){
33 * @return QString the icon name (minus .png, .gif etc) 38 * @return QString the icon name (minus .png, .gif etc)
34 */ 39 */
35QString PPPModule::getPixmapName(Interface* ){ 40QString PPPModule::getPixmapName(Interface* ){
36 return "ppp"; 41 return "ppp";
37} 42}
38 43
39/** 44/**
40 * Check to see if the interface i is owned by this module. 45 * Check to see if the interface i is owned by this module.
41 * @param Interface* interface to check against 46 * @param Interface* interface to check against
42 * @return bool true if i is owned by this module, false otherwise. 47 * @return bool true if i is owned by this module, false otherwise.
43 */ 48 */
44bool PPPModule::isOwner(Interface *i){ 49bool PPPModule::isOwner(Interface *i){
45 if(!i->getInterfaceName().upper().contains("PPP")) 50 return list.find( i ) != -1;
46 return false;
47
48 i->setHardwareName("PPP");
49 list.append(i);
50 return true;
51} 51}
52 52
53/** 53/**
54 * Create, and return the WLANConfigure Module 54 * Create, and return the WLANConfigure Module
55 * @return QWidget* pointer to this modules configure. 55 * @return QWidget* pointer to this modules configure.
56 */ 56 */
57QWidget *PPPModule::configure(Interface *i){ 57QWidget *PPPModule::configure(Interface *i){
58 qDebug("return ModemWidget"); 58 qDebug("return ModemWidget");
59 PPPConfigWidget *pppconfig = new PPPConfigWidget( 0, "PPPConfig", false, Qt::WDestructiveClose ); 59 PPPConfigWidget *pppconfig = new PPPConfigWidget( 0, "PPPConfig", false,
60// pppconfig->setProfile(profile); 60 Qt::WDestructiveClose );
61 return pppconfig; 61 return pppconfig;
62} 62}
63 63
64/** 64/**
65 * Create, and return the Information Module 65 * Create, and return the Information Module
66 * @return QWidget* pointer to this modules info. 66 * @return QWidget* pointer to this modules info.
67 */ 67 */
68QWidget *PPPModule::information(Interface *i){ 68QWidget *PPPModule::information(Interface *i){
69 // We don't have any advanced pppd information widget yet :-D 69 // We don't have any advanced pppd information widget yet :-D
70 // TODO ^ 70 // TODO ^
71 qDebug("return PPPModule::information"); 71 qDebug("return PPPModule::information");
72 InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i); 72 InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i);
@@ -88,34 +88,38 @@ QList<Interface> PPPModule::getInterfaces(){
88 * @param name the name of the type of interface that should be created given 88 * @param name the name of the type of interface that should be created given
89 * by possibleNewInterfaces(); 89 * by possibleNewInterfaces();
90 * @return Interface* NULL if it was unable to be created. 90 * @return Interface* NULL if it was unable to be created.
91 */ 91 */
92Interface *PPPModule::addNewInterface(const QString &newInterface){ 92Interface *PPPModule::addNewInterface(const QString &newInterface){
93 93
94 qDebug("try to add iface %s",newInterface.latin1()); 94 qDebug("try to add iface %s",newInterface.latin1());
95 95
96 PPPConfigWidget imp(0, "PPPConfigImp", true); 96 PPPConfigWidget imp(0, "PPPConfigImp", true);
97 imp.showMaximized(); 97 imp.showMaximized();
98 if(imp.exec() == QDialog::Accepted ){ 98 if(imp.exec() == QDialog::Accepted ){
99 qDebug("ACCEPTED"); 99 qDebug("ACCEPTED");
100 return new Interface( 0, newInterface );
101 PPPData::data()->save(); 100 PPPData::data()->save();
101 Interface *iface;
102 iface = new Interface( 0, PPPData::data()->modemDevice() );
103 iface->setHardwareName( PPPData::data()->accname() );
104 list.append( iface );
105 return iface;
102 } 106 }
103 return NULL; 107 return NULL;
104} 108}
105 109
106/** 110/**
107 * Attempts to remove the interface, doesn't delete i 111 * Attempts to remove the interface, doesn't delete i
108 * @return bool true if successfull, false otherwise. 112 * @return bool true if successfull, false otherwise.
109 */ 113 */
110bool PPPModule::remove(Interface*){ 114bool PPPModule::remove(Interface*){
111 // Can't remove a hardware device, you can stop it though. 115 // Can't remove a hardware device, you can stop it though.
112 return false; 116 return false;
113} 117}
114 118
115void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) 119void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces)
116{ 120{
117 qDebug("here"); 121 newIfaces.insert(QObject::tr("PPP") ,
118 newIfaces.insert(QObject::tr("PPP") ,QObject::tr("generic ppp device")); 122 QObject::tr("generic ppp device"));
119} 123}
120 124
121 125