summaryrefslogtreecommitdiffstats
path: root/kppp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kppp
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kppp')
-rw-r--r--kppp/AUTHORS8
-rw-r--r--kppp/ChangeLog1711
-rw-r--r--kppp/DB/Makefile.am3
-rw-r--r--kppp/DB/Modem/modemDB.rc31
-rw-r--r--kppp/DB/Provider/Austria/.directory50
-rw-r--r--kppp/DB/Provider/Austria/Makefile.am5
-rw-r--r--kppp/DB/Provider/Austria/Simon%032Media25
-rw-r--r--kppp/DB/Provider/Belarus/.directory43
-rw-r--r--kppp/DB/Provider/Belarus/AtlantTelecom29
-rw-r--r--kppp/DB/Provider/Belarus/Makefile.am6
-rw-r--r--kppp/DB/Provider/Czech_Republic/.directory52
-rw-r--r--kppp/DB/Provider/Czech_Republic/AICOM32
-rw-r--r--kppp/DB/Provider/Czech_Republic/ARsystem32
-rw-r--r--kppp/DB/Provider/Czech_Republic/ASYS32
-rw-r--r--kppp/DB/Provider/Czech_Republic/ApexNet32
-rw-r--r--kppp/DB/Provider/Czech_Republic/BohemiaNet32
-rw-r--r--kppp/DB/Provider/Czech_Republic/Brailcom32
-rw-r--r--kppp/DB/Provider/Czech_Republic/CITYNET32
-rw-r--r--kppp/DB/Provider/Czech_Republic/Contactel32
-rw-r--r--kppp/DB/Provider/Czech_Republic/ES-servis32
-rw-r--r--kppp/DB/Provider/Czech_Republic/Econnect32
-rw-r--r--kppp/DB/Provider/Czech_Republic/Falco_computer32
-rw-r--r--kppp/DB/Provider/Czech_Republic/Fortech32
-rw-r--r--kppp/DB/Provider/Czech_Republic/HP-NET32
-rw-r--r--kppp/DB/Provider/Czech_Republic/INTERNET_OnLine32
-rw-r--r--kppp/DB/Provider/Czech_Republic/INTERNEXT32
-rw-r--r--kppp/DB/Provider/Czech_Republic/IQNET32
-rw-r--r--kppp/DB/Provider/Czech_Republic/KPNQuest32
-rw-r--r--kppp/DB/Provider/Czech_Republic/M-soft32
-rw-r--r--kppp/DB/Provider/Czech_Republic/Makefile.am18
-rw-r--r--kppp/DB/Provider/Czech_Republic/Nextra32
-rw-r--r--kppp/DB/Provider/Czech_Republic/ProfiNet32
-rw-r--r--kppp/DB/Provider/Czech_Republic/SeverNET32
-rw-r--r--kppp/DB/Provider/Czech_Republic/Video_OnLine32
-rw-r--r--kppp/DB/Provider/Czech_Republic/Volny26
-rw-r--r--kppp/DB/Provider/Denmark/.directory52
-rw-r--r--kppp/DB/Provider/Denmark/Get2Net24
-rw-r--r--kppp/DB/Provider/Denmark/Makefile.am5
-rw-r--r--kppp/DB/Provider/France/.directory48
-rw-r--r--kppp/DB/Provider/France/ClubInternetFull26
-rw-r--r--kppp/DB/Provider/France/Makefile.am5
-rw-r--r--kppp/DB/Provider/Germany/.directory54
-rw-r--r--kppp/DB/Provider/Germany/CityWeb23
-rw-r--r--kppp/DB/Provider/Germany/FH%032Rhein%032Sieg%032%040Informatik%04124
-rw-r--r--kppp/DB/Provider/Germany/MUC%046DE26
-rw-r--r--kppp/DB/Provider/Germany/Makefile.am6
-rw-r--r--kppp/DB/Provider/Germany/Netsurf24
-rw-r--r--kppp/DB/Provider/Ireland/.directory43
-rw-r--r--kppp/DB/Provider/Ireland/Eircom26
-rw-r--r--kppp/DB/Provider/Ireland/IOL26
-rw-r--r--kppp/DB/Provider/Ireland/Makefile.am5
-rw-r--r--kppp/DB/Provider/Makefile.am3
-rw-r--r--kppp/DB/Provider/Netherlands/.directory53
-rw-r--r--kppp/DB/Provider/Netherlands/12Move25
-rw-r--r--kppp/DB/Provider/Netherlands/Bart26
-rw-r--r--kppp/DB/Provider/Netherlands/Betuwenet%032BFree27
-rw-r--r--kppp/DB/Provider/Netherlands/Betuwenet%032BQuality26
-rw-r--r--kppp/DB/Provider/Netherlands/Cistron29
-rw-r--r--kppp/DB/Provider/Netherlands/Concepts%032ICT26
-rw-r--r--kppp/DB/Provider/Netherlands/Cubic%032Circle28
-rw-r--r--kppp/DB/Provider/Netherlands/Dataweb25
-rw-r--r--kppp/DB/Provider/Netherlands/Daxis%032Internet25
-rw-r--r--kppp/DB/Provider/Netherlands/Demon%032Internet27
-rw-r--r--kppp/DB/Provider/Netherlands/Energis-Ision27
-rw-r--r--kppp/DB/Provider/Netherlands/Euronet%032anytime26
-rw-r--r--kppp/DB/Provider/Netherlands/Euronet%032professional25
-rw-r--r--kppp/DB/Provider/Netherlands/FlakkeeNet27
-rw-r--r--kppp/DB/Provider/Netherlands/FreeAcces27
-rw-r--r--kppp/DB/Provider/Netherlands/Freeler%032basis26
-rw-r--r--kppp/DB/Provider/Netherlands/Freeler%032compleet27
-rw-r--r--kppp/DB/Provider/Netherlands/Freeler%032voordelig27
-rw-r--r--kppp/DB/Provider/Netherlands/HCC%032NET26
-rw-r--r--kppp/DB/Provider/Netherlands/Hacom27
-rw-r--r--kppp/DB/Provider/Netherlands/HetNet%032Basis%032Surfen24
-rw-r--r--kppp/DB/Provider/Netherlands/HetNet%032Frequent%032Surfen24
-rw-r--r--kppp/DB/Provider/Netherlands/HetNet%032Regelmatig%032Surfen24
-rw-r--r--kppp/DB/Provider/Netherlands/IAE25
-rw-r--r--kppp/DB/Provider/Netherlands/ILimburg27
-rw-r--r--kppp/DB/Provider/Netherlands/InterNLnet24
-rw-r--r--kppp/DB/Provider/Netherlands/Interbox27
-rw-r--r--kppp/DB/Provider/Netherlands/Internet%032Acces%032Facilities25
-rw-r--r--kppp/DB/Provider/Netherlands/Internet%032Online26
-rw-r--r--kppp/DB/Provider/Netherlands/Interstroom25
-rw-r--r--kppp/DB/Provider/Netherlands/IntroWeb%032Hengelo%032e.o.24
-rw-r--r--kppp/DB/Provider/Netherlands/IntroWeb%032met%0323-cijferig%032kengetal25
-rw-r--r--kppp/DB/Provider/Netherlands/IntroWeb%032met%0324-cijferig%032kengetal25
-rw-r--r--kppp/DB/Provider/Netherlands/Kabelfoon66
-rw-r--r--kppp/DB/Provider/Netherlands/KeyAcces%032met%0323%032cijferig%032kengetal26
-rw-r--r--kppp/DB/Provider/Netherlands/KeyAcces%032met%0324%032cijferig%032kengetal26
-rw-r--r--kppp/DB/Provider/Netherlands/Luna26
-rw-r--r--kppp/DB/Provider/Netherlands/Macom26
-rw-r--r--kppp/DB/Provider/Netherlands/Makefile.am67
-rw-r--r--kppp/DB/Provider/Netherlands/Nederland.net28
-rw-r--r--kppp/DB/Provider/Netherlands/Planet%032Internet%032Premium28
-rw-r--r--kppp/DB/Provider/Netherlands/Planet%032Internet%032Standaard28
-rw-r--r--kppp/DB/Provider/Netherlands/Plant%032Acces27
-rw-r--r--kppp/DB/Provider/Netherlands/Popin26
-rw-r--r--kppp/DB/Provider/Netherlands/PublishNet27
-rw-r--r--kppp/DB/Provider/Netherlands/Raketnet26
-rw-r--r--kppp/DB/Provider/Netherlands/Solcon26
-rw-r--r--kppp/DB/Provider/Netherlands/Support%032Net26
-rw-r--r--kppp/DB/Provider/Netherlands/Telebyte26
-rw-r--r--kppp/DB/Provider/Netherlands/Tiscali%032Compleet26
-rw-r--r--kppp/DB/Provider/Netherlands/Tiscali%032Gratis26
-rw-r--r--kppp/DB/Provider/Netherlands/UwNet25
-rw-r--r--kppp/DB/Provider/Netherlands/Via%032Networks27
-rw-r--r--kppp/DB/Provider/Netherlands/Wannadoo%032budget26
-rw-r--r--kppp/DB/Provider/Netherlands/Wannadoo%032budget%320plus26
-rw-r--r--kppp/DB/Provider/Netherlands/Wannadoo%032smartpack25
-rw-r--r--kppp/DB/Provider/Netherlands/Wirehub26
-rw-r--r--kppp/DB/Provider/Netherlands/XS4All26
-rw-r--r--kppp/DB/Provider/Netherlands/Zeelandnet27
-rw-r--r--kppp/DB/Provider/Netherlands/Zon%032226
-rw-r--r--kppp/DB/Provider/Netherlands/Zon%032Gratis26
-rw-r--r--kppp/DB/Provider/Netherlands/Zon%032Inclusief25
-rw-r--r--kppp/DB/Provider/New_Zealand/.directory50
-rw-r--r--kppp/DB/Provider/New_Zealand/Makefile.am5
-rw-r--r--kppp/DB/Provider/New_Zealand/OrconInternet25
-rw-r--r--kppp/DB/Provider/New_Zealand/Paradise23
-rw-r--r--kppp/DB/Provider/New_Zealand/Voyager23
-rw-r--r--kppp/DB/Provider/New_Zealand/XTRA23
-rw-r--r--kppp/DB/Provider/New_Zealand/ihug23
-rw-r--r--kppp/DB/Provider/Norway/.directory53
-rw-r--r--kppp/DB/Provider/Norway/BGNett24
-rw-r--r--kppp/DB/Provider/Norway/Institutt%032for%032informatikk22
-rw-r--r--kppp/DB/Provider/Norway/Makefile.am5
-rw-r--r--kppp/DB/Provider/Portugal/.directory34
-rw-r--r--kppp/DB/Provider/Portugal/Clix23
-rw-r--r--kppp/DB/Provider/Portugal/Makefile.am5
-rw-r--r--kppp/DB/Provider/Portugal/Netc23
-rw-r--r--kppp/DB/Provider/Portugal/OniNet23
-rw-r--r--kppp/DB/Provider/Slovenia/.directory45
-rw-r--r--kppp/DB/Provider/Slovenia/AmisNet27
-rw-r--r--kppp/DB/Provider/Slovenia/Arnes26
-rw-r--r--kppp/DB/Provider/Slovenia/Kiss26
-rw-r--r--kppp/DB/Provider/Slovenia/Makefile.am5
-rw-r--r--kppp/DB/Provider/Slovenia/MojNet27
-rw-r--r--kppp/DB/Provider/Slovenia/SiOL26
-rw-r--r--kppp/DB/Provider/Slovenia/Volja27
-rw-r--r--kppp/DB/Provider/Sweden/.directory51
-rw-r--r--kppp/DB/Provider/Sweden/Makefile.am5
-rw-r--r--kppp/DB/Provider/Sweden/Tiscali26
-rw-r--r--kppp/DB/Provider/Sweden/Utfors26
-rw-r--r--kppp/DB/Provider/Switzerland/.directory48
-rw-r--r--kppp/DB/Provider/Switzerland/Bluewin23
-rw-r--r--kppp/DB/Provider/Switzerland/Makefile.am5
-rw-r--r--kppp/DB/Provider/Taiwan/.directory36
-rw-r--r--kppp/DB/Provider/Taiwan/EraNet23
-rw-r--r--kppp/DB/Provider/Taiwan/HiNet23
-rw-r--r--kppp/DB/Provider/Taiwan/Makefile.am5
-rw-r--r--kppp/DB/Provider/Taiwan/SeedNet23
-rw-r--r--kppp/DB/Provider/Ukraine/.directory67
-rw-r--r--kppp/DB/Provider/Ukraine/Adamant24
-rw-r--r--kppp/DB/Provider/Ukraine/IPTelecom29
-rw-r--r--kppp/DB/Provider/Ukraine/Makefile.am5
-rw-r--r--kppp/DB/Provider/Ukraine/NuVse27
-rw-r--r--kppp/DB/Provider/United_Kingdom/.directory54
-rw-r--r--kppp/DB/Provider/United_Kingdom/Demon%032Green%032212066623
-rw-r--r--kppp/DB/Provider/United_Kingdom/Demon%032Purple%032212166623
-rw-r--r--kppp/DB/Provider/United_Kingdom/Demon%032Red%032079866623
-rw-r--r--kppp/DB/Provider/United_Kingdom/FreeServe24
-rw-r--r--kppp/DB/Provider/United_Kingdom/Makefile.am9
-rw-r--r--kppp/DB/Provider/United_Kingdom/UK%032Free%032Software%032Network%032ISDN24
-rw-r--r--kppp/DB/Provider/United_Kingdom/UK%032Free%032Software%032Network%032Modem24
-rw-r--r--kppp/DB/Provider/United_Kingdom/UKPOST%032ISDN24
-rw-r--r--kppp/DB/Provider/United_Kingdom/UKPOST%032Modem24
-rw-r--r--kppp/DB/Provider/United_Kingdom/UTV26
-rw-r--r--kppp/DB/Provider/Yugoslavia/.directory42
-rw-r--r--kppp/DB/Provider/Yugoslavia/041Net23
-rw-r--r--kppp/DB/Provider/Yugoslavia/BeoTelNet23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Bar.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Berane.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.BijeloPolje.CG.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Budva.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Cetinje.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.HercegNovi.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Kotor.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Niksic.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Pljevlja.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Podgorica.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Tivat.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.Ulcinj.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/CG.yu23
-rw-r--r--kppp/DB/Provider/Yugoslavia/DrenikNet23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnet@Full23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnet@Lite23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetBeograd23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetCacak23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetKragujevac23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetNis23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetNoviSad23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetPristina23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetS0
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetSombor23
-rw-r--r--kppp/DB/Provider/Yugoslavia/EUnetSubotica23
-rw-r--r--kppp/DB/Provider/Yugoslavia/InfoSKY23
-rw-r--r--kppp/DB/Provider/Yugoslavia/Makefile.am13
-rw-r--r--kppp/DB/Provider/Yugoslavia/PTT23
-rw-r--r--kppp/DB/Provider/Yugoslavia/SCnet23
-rw-r--r--kppp/DB/Provider/Yugoslavia/Sezampro23
-rw-r--r--kppp/DB/Provider/Yugoslavia/SuOnline24
-rw-r--r--kppp/DB/Provider/Yugoslavia/TippNet24
-rw-r--r--kppp/DB/Provider/Yugoslavia/VeratNet23
-rw-r--r--kppp/DB/Provider/Yugoslavia/YUBCnet23
-rw-r--r--kppp/HISTORY37
-rw-r--r--kppp/INSTALL46
-rw-r--r--kppp/KPPPIface.h39
-rw-r--r--kppp/Kppp.desktop70
-rw-r--r--kppp/Makefile.am153
-rw-r--r--kppp/NEWS28
-rw-r--r--kppp/README105
-rw-r--r--kppp/README.ModemDB77
-rw-r--r--kppp/Rules/Argentina/Argentina_0610.rst26
-rw-r--r--kppp/Rules/Argentina/Argentina_Local.rst26
-rw-r--r--kppp/Rules/Argentina/Makefile.am8
-rw-r--r--kppp/Rules/Australia/Local.rst18
-rw-r--r--kppp/Rules/Australia/Makefile.am10
-rw-r--r--kppp/Rules/Australia/Optus_Residential.rst132
-rw-r--r--kppp/Rules/Australia/STD_Zone_1_-_25-50_kms.rst30
-rw-r--r--kppp/Rules/Australia/STD_Zone_2_-_50-85_kms.rst30
-rw-r--r--kppp/Rules/Australia/STD_Zone_3_-_85-165_kms.rst30
-rw-r--r--kppp/Rules/Australia/STD_Zone_4_-_165+_kms.rst30
-rw-r--r--kppp/Rules/Austria/Business_1/Local.rst19
-rw-r--r--kppp/Rules/Austria/Business_1/Long_Distance.rst19
-rw-r--r--kppp/Rules/Austria/Business_1/Makefile.am7
-rw-r--r--kppp/Rules/Austria/Business_1/Online.rst30
-rw-r--r--kppp/Rules/Austria/Business_2/Local.rst19
-rw-r--r--kppp/Rules/Austria/Business_2/Long_Distance.rst19
-rw-r--r--kppp/Rules/Austria/Business_2/Makefile.am7
-rw-r--r--kppp/Rules/Austria/Business_2/Online.rst30
-rw-r--r--kppp/Rules/Austria/Makefile.am6
-rw-r--r--kppp/Rules/Austria/Minimum/Local.rst19
-rw-r--r--kppp/Rules/Austria/Minimum/Long_Distance.rst19
-rw-r--r--kppp/Rules/Austria/Minimum/Makefile.am7
-rw-r--r--kppp/Rules/Austria/Minimum/Online.rst30
-rw-r--r--kppp/Rules/Austria/Standard/Local.rst19
-rw-r--r--kppp/Rules/Austria/Standard/Long_Distance.rst19
-rw-r--r--kppp/Rules/Austria/Standard/Makefile.am8
-rw-r--r--kppp/Rules/Austria/Standard/Online.rst30
-rw-r--r--kppp/Rules/Austria/Standard/UTA_easyinternet.rst50
-rw-r--r--kppp/Rules/Bangladesh/ATT00007.rst63
-rw-r--r--kppp/Rules/Bangladesh/ATT00010.rst59
-rw-r--r--kppp/Rules/Bangladesh/Makefile.am6
-rw-r--r--kppp/Rules/Belgium/Belgium_internet_euro.rst83
-rw-r--r--kppp/Rules/Belgium/Belgium_internet_frank.rst74
-rw-r--r--kppp/Rules/Belgium/Belgium_interzonal.rst81
-rw-r--r--kppp/Rules/Belgium/Belgium_zonal.rst81
-rw-r--r--kppp/Rules/Belgium/Makefile.am6
-rw-r--r--kppp/Rules/Bosnia_and_Herzegovina/BiHnet_-_home_-_bez_impulsa.rst67
-rw-r--r--kppp/Rules/Bosnia_and_Herzegovina/BiHnet_-_student_-_bez_impulsa.rst67
-rw-r--r--kppp/Rules/Bosnia_and_Herzegovina/Makefile.am8
-rw-r--r--kppp/Rules/Bosnia_and_Herzegovina/SmartNet_PERSONAL_bez_impulsa.rst65
-rw-r--r--kppp/Rules/Bosnia_and_Herzegovina/samo_impulsi.rst66
-rw-r--r--kppp/Rules/Brasil/Brasil.rst21
-rw-r--r--kppp/Rules/Brasil/Brasil_Ligbr.rst19
-rw-r--r--kppp/Rules/Brasil/Makefile.am8
-rw-r--r--kppp/Rules/Brasil/Rio_de_Janeiro.rst33
-rw-r--r--kppp/Rules/Brasil/SaoPaulo.rst33
-rw-r--r--kppp/Rules/Croatia/CARNet.rst67
-rw-r--r--kppp/Rules/Croatia/Makefile.am5
-rw-r--r--kppp/Rules/Czechia/Czech_Telecom_Internet_2004_Business_Internet.rst23
-rw-r--r--kppp/Rules/Czechia/Czech_Telecom_Internet_2004_Home_Internet.rst23
-rw-r--r--kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_a_Internet_180_+_660.rst23
-rw-r--r--kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_a_Internet_90_+_300.rst23
-rw-r--r--kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_universal.rst23
-rw-r--r--kppp/Rules/Czechia/Makefile.am9
-rw-r--r--kppp/Rules/Denmark/12Move_Analog.rst51
-rw-r--r--kppp/Rules/Denmark/12Move_ISDN.rst52
-rw-r--r--kppp/Rules/Denmark/Cybercity_Friabonnement.rst42
-rw-r--r--kppp/Rules/Denmark/Get2net_Betaling.rst56
-rw-r--r--kppp/Rules/Denmark/Get2net_Gratis.rst48
-rw-r--r--kppp/Rules/Denmark/Makefile.am10
-rw-r--r--kppp/Rules/Denmark/Mobilix_Wanadoo.rst62
-rw-r--r--kppp/Rules/Denmark/Teledanmark_Basis.rst42
-rw-r--r--kppp/Rules/Denmark/Teledanmark_Favoritinternet.rst85
-rw-r--r--kppp/Rules/Denmark/Worldonline-Analog.rst59
-rw-r--r--kppp/Rules/Denmark/Worldonline-ISDN.rst60
-rw-r--r--kppp/Rules/Estonia/Eesti_Telefon.rst58
-rw-r--r--kppp/Rules/Estonia/Makefile.am5
-rw-r--r--kppp/Rules/Finland/Makefile.am5
-rw-r--r--kppp/Rules/Finland/VLP.rst64
-rw-r--r--kppp/Rules/France/Cegetel_Local.rst44
-rw-r--r--kppp/Rules/France/Cegetel_National.rst44
-rw-r--r--kppp/Rules/France/France_Telecom_Internet.rst59
-rw-r--r--kppp/Rules/France/France_Telecom_Local.rst70
-rw-r--r--kppp/Rules/France/France_Telecom_National.rst70
-rw-r--r--kppp/Rules/France/Le_9_Local.rst44
-rw-r--r--kppp/Rules/France/Le_9_National.rst44
-rw-r--r--kppp/Rules/France/Makefile.am7
-rw-r--r--kppp/Rules/France/OneTel.rst44
-rw-r--r--kppp/Rules/France/Tele2_Local.rst44
-rw-r--r--kppp/Rules/France/Tele2_National.rst44
-rw-r--r--kppp/Rules/France/Wanadoo_Free.rst35
-rw-r--r--kppp/Rules/Germany/1und1_InternetZugang.rst43
-rw-r--r--kppp/Rules/Germany/2.5min.rst60
-rw-r--r--kppp/Rules/Germany/2.5s.rst60
-rw-r--r--kppp/Rules/Germany/AddCom_by_Call.rst50
-rw-r--r--kppp/Rules/Germany/Addcom.rst23
-rw-r--r--kppp/Rules/Germany/Arcor_Internet_by_Call_easy.rst52
-rw-r--r--kppp/Rules/Germany/CallOkaynet.rst39
-rw-r--r--kppp/Rules/Germany/Callino_Surf_Basic.rst51
-rw-r--r--kppp/Rules/Germany/Callino_Surf_Plus.rst33
-rw-r--r--kppp/Rules/Germany/Callisa_City.rst56
-rw-r--r--kppp/Rules/Germany/City_Activ_Plus_Option.rst21
-rw-r--r--kppp/Rules/Germany/Cityweb.rst25
-rw-r--r--kppp/Rules/Germany/CompuservePro.rst16
-rw-r--r--kppp/Rules/Germany/E-Plus-Online_Jedermann.rst60
-rw-r--r--kppp/Rules/Germany/Easynet_easy-call.rst36
-rw-r--r--kppp/Rules/Germany/Freenet_Enterprise.rst28
-rw-r--r--kppp/Rules/Germany/Freenet_Sorglos.rst33
-rw-r--r--kppp/Rules/Germany/Freenet_StandardTarif.rst32
-rw-r--r--kppp/Rules/Germany/Freenet_Super_CbC.rst40
-rw-r--r--kppp/Rules/Germany/Freenet_special_call_by_call.rst57
-rw-r--r--kppp/Rules/Germany/MSN.rst18
-rw-r--r--kppp/Rules/Germany/Makefile.am34
-rw-r--r--kppp/Rules/Germany/Mobilcom_Freenet.rst44
-rw-r--r--kppp/Rules/Germany/NGI_Call_By_Call.rst14
-rw-r--r--kppp/Rules/Germany/Netcom_Kassel.rst20
-rw-r--r--kppp/Rules/Germany/Nikoma.rst34
-rw-r--r--kppp/Rules/Germany/Nikoma_Internet_by_Call.rst35
-rw-r--r--kppp/Rules/Germany/Nikoma_Study_and_Surf.rst41
-rw-r--r--kppp/Rules/Germany/Planet-Interkom_Internet_by_call.rst23
-rw-r--r--kppp/Rules/Germany/Puretec.rst13
-rw-r--r--kppp/Rules/Germany/Telekom_City_Select_5_30.rst48
-rw-r--r--kppp/Rules/Germany/VR-Web.rst33
-rw-r--r--kppp/Rules/Germany/expressnet.rst20
-rw-r--r--kppp/Rules/Germany/knUUt-by-Call.rst22
-rw-r--r--kppp/Rules/Germany/talkline_by_call.rst19
-rw-r--r--kppp/Rules/Germany/vossnet_fun.rst19
-rw-r--r--kppp/Rules/Germany/vossnet_fun_light.rst19
-rw-r--r--kppp/Rules/Germany/vossnet_kompl.rst29
-rw-r--r--kppp/Rules/Greece/Hellas_EPAK_Zone1_in_euro.rst56
-rw-r--r--kppp/Rules/Greece/Hellas_EPAK_Zone2_in_euro.rst51
-rw-r--r--kppp/Rules/Greece/Hellas_EPAK_local_in_euro.rst64
-rw-r--r--kppp/Rules/Greece/Hellas_analog_local_in_euro.rst45
-rw-r--r--kppp/Rules/Greece/Hellas_digital_local_in_euro.rst43
-rw-r--r--kppp/Rules/Greece/Makefile.am9
-rw-r--r--kppp/Rules/HongKong/Hong_Kong_Telecom.rst18
-rw-r--r--kppp/Rules/HongKong/Makefile.am5
-rw-r--r--kppp/Rules/Hungary/Local.rst42
-rw-r--r--kppp/Rules/Hungary/LocalTop_MATAV.rst67
-rw-r--r--kppp/Rules/Hungary/Local_MATAV.rst35
-rw-r--r--kppp/Rules/Hungary/Makefile.am8
-rw-r--r--kppp/Rules/Hungary/PapaTel.rst51
-rw-r--r--kppp/Rules/Iceland/Iceland_general.rst110
-rw-r--r--kppp/Rules/Iceland/Makefile.am5
-rw-r--r--kppp/Rules/India/BSNL_Local.rst113
-rw-r--r--kppp/Rules/India/BSNL_Long_101_To_200.rst86
-rw-r--r--kppp/Rules/India/BSNL_Medium_51_To_100.rst86
-rw-r--r--kppp/Rules/India/Makefile.am7
-rw-r--r--kppp/Rules/India/Vsnl_local.rst102
-rw-r--r--kppp/Rules/Indonesia/Lokal_1_Metropolitan.rst60
-rw-r--r--kppp/Rules/Indonesia/Lokal_2_Metropolitan.rst60
-rw-r--r--kppp/Rules/Indonesia/Lokal_non_metropolitan.rst60
-rw-r--r--kppp/Rules/Indonesia/Makefile.am7
-rw-r--r--kppp/Rules/Ireland/Eircom_Internet.rst164
-rw-r--r--kppp/Rules/Ireland/Eircom_Local.rst164
-rw-r--r--kppp/Rules/Ireland/Eircom_National.rst173
-rw-r--r--kppp/Rules/Ireland/Eircom_Special.rst173
-rw-r--r--kppp/Rules/Ireland/Makefile.am8
-rw-r--r--kppp/Rules/Israel/Bezeq_Interurban.rst76
-rw-r--r--kppp/Rules/Israel/Bezeq_Local.rst76
-rw-r--r--kppp/Rules/Israel/Makefile.am6
-rw-r--r--kppp/Rules/Italy/Atlanet.rst59
-rw-r--r--kppp/Rules/Italy/Cheapnet.rst79
-rw-r--r--kppp/Rules/Italy/Infostrada_Internet_SpZero.rst44
-rw-r--r--kppp/Rules/Italy/Infostrada_Libero1055_Base.rst68
-rw-r--r--kppp/Rules/Italy/Infostrada_Libero1055_SpZero.rst73
-rw-r--r--kppp/Rules/Italy/Infostrada_Loc_Reg_Naz_SpZero.rst44
-rw-r--r--kppp/Rules/Italy/Infostrada_Locali_Base.rst65
-rw-r--r--kppp/Rules/Italy/Infostrada_Reg_Naz_Base.rst66
-rw-r--r--kppp/Rules/Italy/Makefile.am34
-rw-r--r--kppp/Rules/Italy/Tele2_Altri_ISP.rst64
-rw-r--r--kppp/Rules/Italy/Tele2_Internet_Tele2.rst64
-rw-r--r--kppp/Rules/Italy/Telecom_Interurbane_Fino15Km.rst61
-rw-r--r--kppp/Rules/Italy/Telecom_Interurbane_Oltre15Km.rst61
-rw-r--r--kppp/Rules/Italy/Telecom_Locali.rst79
-rw-r--r--kppp/Rules/Italy/Teleconomy24_Internet.rst40
-rw-r--r--kppp/Rules/Italy/Teleconomy24_Nazionali.rst39
-rw-r--r--kppp/Rules/Italy/Teleconomy_NoStop_Internet.rst48
-rw-r--r--kppp/Rules/Italy/Tiscali_Urbane.rst63
-rw-r--r--kppp/Rules/Italy/Wind_24ore_Internet_AltriISP.rst38
-rw-r--r--kppp/Rules/Italy/Wind_24ore_Internet_InWind.rst40
-rw-r--r--kppp/Rules/Italy/Wind_24ore_Interurbane.rst40
-rw-r--r--kppp/Rules/Italy/Wind_24ore_Urbane.rst40
-rw-r--r--kppp/Rules/Italy/Wind_Family+SuperLight_Internet_InWind.rst64
-rw-r--r--kppp/Rules/Italy/Wind_Family+SuperLight_Urbane_Interurbane.rst64
-rw-r--r--kppp/Rules/Italy/Wind_Family_Internet_AltriISP.rst60
-rw-r--r--kppp/Rules/Italy/Wind_Family_Internet_InWind.rst64
-rw-r--r--kppp/Rules/Italy/Wind_Family_Interurbane.rst64
-rw-r--r--kppp/Rules/Italy/Wind_Family_Urbane.rst64
-rw-r--r--kppp/Rules/Italy/Wind_Flat_Internet_AltriISP.rst38
-rw-r--r--kppp/Rules/Italy/Wind_Flat_Internet_InWind.rst40
-rw-r--r--kppp/Rules/Italy/Wind_Urbana_1088_Light.rst53
-rw-r--r--kppp/Rules/Jamaica/CWJ_InterParish.rst120
-rw-r--r--kppp/Rules/Jamaica/CWJ_Local.rst118
-rw-r--r--kppp/Rules/Jamaica/Makefile.am6
-rw-r--r--kppp/Rules/Japan/Makefile.am5
-rw-r--r--kppp/Rules/Japan/NTT_Local.rst58
-rw-r--r--kppp/Rules/Kazakhstan/Akparat_Sprint.rst95
-rw-r--r--kppp/Rules/Kazakhstan/Makefile.am5
-rw-r--r--kppp/Rules/Luxembourg/CMD_InternetGratuit.rst71
-rw-r--r--kppp/Rules/Luxembourg/LuxembourgOnline_FreeInternet.rst72
-rw-r--r--kppp/Rules/Luxembourg/Makefile.am6
-rw-r--r--kppp/Rules/Luxembourg/PetT_ClassicSurf.rst70
-rw-r--r--kppp/Rules/Luxembourg/PetT_KioskSurf.rst70
-rw-r--r--kppp/Rules/Macedonia/Macedonia_GenericISP_interurban.rst30
-rw-r--r--kppp/Rules/Macedonia/Macedonia_GenericISP_local.rst30
-rw-r--r--kppp/Rules/Macedonia/Macedonia_MTnet.rst33
-rw-r--r--kppp/Rules/Macedonia/Makefile.am7
-rw-r--r--kppp/Rules/Makefile.am9
-rw-r--r--kppp/Rules/Malaysia/Makefile.am5
-rw-r--r--kppp/Rules/Malaysia/TMNet_Jaring.rst33
-rw-r--r--kppp/Rules/Malaysia/malaysia.rst38
-rw-r--r--kppp/Rules/Netherlands/12Move.rst44
-rw-r--r--kppp/Rules/Netherlands/BelBasis_Buiten_Regio.rst31
-rw-r--r--kppp/Rules/Netherlands/BelBasis_Buiten_Regio_Nummervoordeel.rst30
-rw-r--r--kppp/Rules/Netherlands/BelBasis_Regio.rst35
-rw-r--r--kppp/Rules/Netherlands/BelBasis_Regio_Nummervoordeel.rst35
-rw-r--r--kppp/Rules/Netherlands/BelBudget_Buiten_Regio.rst30
-rw-r--r--kppp/Rules/Netherlands/BelBudget_Regio.rst36
-rw-r--r--kppp/Rules/Netherlands/BelPlus_Buiten_Regio.rst32
-rw-r--r--kppp/Rules/Netherlands/BelPlus_Buiten_Regio_Nummervoordeel.rst31
-rw-r--r--kppp/Rules/Netherlands/BelPlus_Regio.rst37
-rw-r--r--kppp/Rules/Netherlands/BelPlus_Regio_Nummervoordeel.rst37
-rw-r--r--kppp/Rules/Netherlands/Cistron36
-rw-r--r--kppp/Rules/Netherlands/Freeler_Basis.rst40
-rw-r--r--kppp/Rules/Netherlands/Freeler_Voordelig.rst40
-rw-r--r--kppp/Rules/Netherlands/HetNet_Regelmatig_Surfen.rst40
-rw-r--r--kppp/Rules/Netherlands/InterNLnet.rst43
-rw-r--r--kppp/Rules/Netherlands/Makefile.am34
-rw-r--r--kppp/Rules/Netherlands/OneTel_Spaarstand_Buiten_Regio.rst37
-rw-r--r--kppp/Rules/Netherlands/OneTel_Spaarstand_Regio.rst42
-rw-r--r--kppp/Rules/Netherlands/OneTel_Toets_1658_Buiten_Regio.rst37
-rw-r--r--kppp/Rules/Netherlands/OneTel_Toets_1658_Regio.rst42
-rw-r--r--kppp/Rules/Netherlands/Planet_Internet.rst41
-rw-r--r--kppp/Rules/Netherlands/Priority_Telecom_Nationaal.rst37
-rw-r--r--kppp/Rules/Netherlands/Priority_Telecom_Regionaal.rst32
-rw-r--r--kppp/Rules/Netherlands/Tele2_Extra_Buiten_Regio.rst37
-rw-r--r--kppp/Rules/Netherlands/Tele2_Extra_Regio.rst42
-rw-r--r--kppp/Rules/Netherlands/Tele2_Preselect_Buiten_Regio.rst37
-rw-r--r--kppp/Rules/Netherlands/Tele2_Preselect_Regio.rst42
-rw-r--r--kppp/Rules/Netherlands/Tele2_Toets_1609_Buiten_Regio.rst37
-rw-r--r--kppp/Rules/Netherlands/Tele2_Toets_1609_Regio.rst42
-rw-r--r--kppp/Rules/Netherlands/Wannadoo_Budget_Plus41
-rw-r--r--kppp/Rules/Norway/Local_Area.rst16
-rw-r--r--kppp/Rules/Norway/Long_Distance.rst16
-rw-r--r--kppp/Rules/Norway/Makefile.am7
-rw-r--r--kppp/Rules/Norway/Netcom.rst15
-rw-r--r--kppp/Rules/Poland/Internetia.rst19
-rw-r--r--kppp/Rules/Poland/Makefile.am12
-rw-r--r--kppp/Rules/Poland/Netia_100km_Niebieska.rst40
-rw-r--r--kppp/Rules/Poland/Netia_100km_Zielona.rst39
-rw-r--r--kppp/Rules/Poland/Netia_Lokalne_Niebieska.rst20
-rw-r--r--kppp/Rules/Poland/Netia_Lokalne_Zielona.rst21
-rw-r--r--kppp/Rules/Poland/TPSA.rst22
-rw-r--r--kppp/Rules/Poland/TP_100km.rst39
-rw-r--r--kppp/Rules/Poland/TP_Lokalne.rst19
-rw-r--r--kppp/Rules/Portugal/Makefile.am6
-rw-r--r--kppp/Rules/Portugal/PT_Local.rst54
-rw-r--r--kppp/Rules/Portugal/PT_Local_Ilhas.rst54
-rw-r--r--kppp/Rules/Portugal/PT_Regional.rst47
-rw-r--r--kppp/Rules/Portugal/PT_Regional_Ilhas.rst47
-rw-r--r--kppp/Rules/Portugal/PT_YesNET.rst49
-rw-r--r--kppp/Rules/Portugal/PT_YesNET_Ilhas.rst49
-rw-r--r--kppp/Rules/Romania/ClickNet.rst33
-rw-r--r--kppp/Rules/Romania/Easynet.rst20
-rw-r--r--kppp/Rules/Romania/Makefile.am9
-rw-r--r--kppp/Rules/Romania/RomTelecom_GSM.rst23
-rw-r--r--kppp/Rules/Romania/Romtelecom_Acces_Special_Internet.rst37
-rw-r--r--kppp/Rules/Romania/Romtelecom_Interjudetean.rst31
-rw-r--r--kppp/Rules/Romania/Romtelecom_Local.rst36
-rw-r--r--kppp/Rules/Romania/Zapp-Mobile.rst19
-rw-r--r--kppp/Rules/Russia/Makefile.am5
-rw-r--r--kppp/Rules/Russia/TEMPLATE.ru163
-rw-r--r--kppp/Rules/Russia/mtu-intel_standart.rst51
-rw-r--r--kppp/Rules/Singapore/Makefile.am5
-rw-r--r--kppp/Rules/Singapore/SingTel_Local.rst59
-rw-r--r--kppp/Rules/Slovakia/Internetovy_tarif_019XY.rst28
-rw-r--r--kppp/Rules/Slovakia/Makefile.am7
-rw-r--r--kppp/Rules/Slovakia/ST_medzimesto.rst25
-rw-r--r--kppp/Rules/Slovakia/ST_mesto.rst25
-rw-r--r--kppp/Rules/Slovenia/Makefile.am7
-rw-r--r--kppp/Rules/Slovenia/omrezje_0880.rst67
-rw-r--r--kppp/Rules/Slovenia/omrezje_0889.rst58
-rw-r--r--kppp/Rules/Slovenia/stacionarno_omrezje.rst53
-rw-r--r--kppp/Rules/SouthAfrica/Makefile.am5
-rw-r--r--kppp/Rules/SouthAfrica/South_Africa_local.rst73
-rw-r--r--kppp/Rules/SouthAfrica/South_Africa_long_distance.rst73
-rw-r--r--kppp/Rules/SouthAfrika/Makefile.am5
-rw-r--r--kppp/Rules/SouthAfrika/South_Afrika.rst328
-rw-r--r--kppp/Rules/SouthAfrika/South_Afrika_Justin.rst123
-rw-r--r--kppp/Rules/Spain/Infovia.rst44
-rw-r--r--kppp/Rules/Spain/Infovia_IVA.rst44
-rw-r--r--kppp/Rules/Spain/Makefile.am9
-rw-r--r--kppp/Rules/Spain/Telefonica_Interprovincial.rst43
-rw-r--r--kppp/Rules/Spain/Telefonica_Interprovincial_IVA.rst43
-rw-r--r--kppp/Rules/Spain/Telefonica_Local.rst44
-rw-r--r--kppp/Rules/Spain/Telefonica_Metropolitana.rst44
-rw-r--r--kppp/Rules/Spain/Telefonica_Metropolitana_IVA.rst44
-rw-r--r--kppp/Rules/Spain/Telefonica_Nacional.rst43
-rw-r--r--kppp/Rules/Spain/Telefonica_Provincial.rst43
-rw-r--r--kppp/Rules/Spain/Telefonica_Provincial_IVA.rst43
-rw-r--r--kppp/Rules/Sweden/ACN.rst66
-rw-r--r--kppp/Rules/Sweden/Abonnera_com.rst69
-rw-r--r--kppp/Rules/Sweden/CNEAB-Route66.rst65
-rw-r--r--kppp/Rules/Sweden/Crossnet-Affinity.rst66
-rw-r--r--kppp/Rules/Sweden/Glocalnet.rst66
-rw-r--r--kppp/Rules/Sweden/Gts.rst65
-rw-r--r--kppp/Rules/Sweden/Home_se.rst65
-rw-r--r--kppp/Rules/Sweden/Makefile.am12
-rw-r--r--kppp/Rules/Sweden/Nemtel.rst66
-rw-r--r--kppp/Rules/Sweden/Plusenergi.rst65
-rw-r--r--kppp/Rules/Sweden/RSLCom.rst66
-rw-r--r--kppp/Rules/Sweden/Rix_Telecom.rst66
-rw-r--r--kppp/Rules/Sweden/Supertel.rst66
-rw-r--r--kppp/Rules/Sweden/Svensk_Telekom.rst66
-rw-r--r--kppp/Rules/Sweden/Tele1_Europe.rst66
-rw-r--r--kppp/Rules/Sweden/Tele2.rst66
-rw-r--r--kppp/Rules/Sweden/Tele8.rst66
-rw-r--r--kppp/Rules/Sweden/Teleman.rst66
-rw-r--r--kppp/Rules/Sweden/Telenordia.rst66
-rw-r--r--kppp/Rules/Sweden/Telerian.rst66
-rw-r--r--kppp/Rules/Sweden/Telia.rst68
-rw-r--r--kppp/Rules/Sweden/Telia_Telebonus1.rst66
-rw-r--r--kppp/Rules/Sweden/Telia_Telebonus2.rst66
-rw-r--r--kppp/Rules/Sweden/Telitel.rst66
-rw-r--r--kppp/Rules/Sweden/Tiscali.rst65
-rw-r--r--kppp/Rules/Sweden/Transnet.rst65
-rw-r--r--kppp/Rules/Sweden/Universal_Telecom.rst66
-rw-r--r--kppp/Rules/Sweden/Utfors.rst66
-rw-r--r--kppp/Rules/Sweden/Vattenfall.rst66
-rw-r--r--kppp/Rules/Switzerland/Makefile.am10
-rw-r--r--kppp/Rules/Switzerland/Sunrise_Freetime.rst43
-rw-r--r--kppp/Rules/Switzerland/Sunrise_Local.rst51
-rw-r--r--kppp/Rules/Switzerland/Sunrise_Select_Internet.rst49
-rw-r--r--kppp/Rules/Switzerland/Swisscom_Local.rst38
-rw-r--r--kppp/Rules/Switzerland/Swisscom_Remote.rst43
-rw-r--r--kppp/Rules/Switzerland/Swisscom_Surf.rst35
-rw-r--r--kppp/Rules/TEMPLATE147
-rw-r--r--kppp/Rules/Turkey/Makefile.am6
-rw-r--r--kppp/Rules/Turkey/Turk_Telekom_Internet.rst74
-rw-r--r--kppp/Rules/Ukraine/IPTelecom_hourly.rst86
-rw-r--r--kppp/Rules/Ukraine/Makefile.am5
-rw-r--r--kppp/Rules/Ukraine/NuVse_hourly.rst91
-rw-r--r--kppp/Rules/Ukraine/TEMPLATE.uk149
-rw-r--r--kppp/Rules/Ukraine/Utel_Unet.rst23
-rw-r--r--kppp/Rules/United_Kingdom/BirminghamCable_Local.rst106
-rw-r--r--kppp/Rules/United_Kingdom/BirminghamCable_National.rst111
-rw-r--r--kppp/Rules/United_Kingdom/BirminghamCable_SameTelco.rst111
-rw-r--r--kppp/Rules/United_Kingdom/BritishTelecom_Local.rst110
-rw-r--r--kppp/Rules/United_Kingdom/BritishTelecom_National.rst109
-rw-r--r--kppp/Rules/United_Kingdom/BritishTelecom_Regional.rst109
-rw-r--r--kppp/Rules/United_Kingdom/British_OneTel.rst83
-rw-r--r--kppp/Rules/United_Kingdom/Connaught_Telecom.rst100
-rw-r--r--kppp/Rules/United_Kingdom/Makefile.am12
-rw-r--r--kppp/Rules/Uruguay/Adinet_cIVA.rst40
-rw-r--r--kppp/Rules/Uruguay/Makefile.am5
-rw-r--r--kppp/Rules/Yugoslavia/041_1xx_xxx.rst64
-rw-r--r--kppp/Rules/Yugoslavia/041_2xx_xxx.rst63
-rw-r--r--kppp/Rules/Yugoslavia/041_3xx_xxx.rst63
-rw-r--r--kppp/Rules/Yugoslavia/041_4xx_xxx.rst63
-rw-r--r--kppp/Rules/Yugoslavia/041_5xx_xxx.rst63
-rw-r--r--kppp/Rules/Yugoslavia/041_9xx_xxx.rst63
-rw-r--r--kppp/Rules/Yugoslavia/III_zona-preko_200km.rst65
-rw-r--r--kppp/Rules/Yugoslavia/II_zona-do_200km.rst65
-rw-r--r--kppp/Rules/Yugoslavia/I_zona-ista_mreza.rst65
-rw-r--r--kppp/Rules/Yugoslavia/Lokalni_poziv.rst80
-rw-r--r--kppp/Rules/Yugoslavia/Makefile.am8
-rwxr-xr-xkppp/Rules/checkrules24
-rw-r--r--kppp/TODO25
-rw-r--r--kppp/accounting.cpp477
-rw-r--r--kppp/accounting.h144
-rw-r--r--kppp/accounts.cpp484
-rw-r--r--kppp/accounts.h109
-rw-r--r--kppp/acctselect.cpp330
-rw-r--r--kppp/acctselect.h81
-rw-r--r--kppp/auth.h36
-rw-r--r--kppp/configure.in.in53
-rw-r--r--kppp/connect.cpp1535
-rw-r--r--kppp/connect.h157
-rw-r--r--kppp/convlog.tcl64
-rw-r--r--kppp/conwindow.cpp340
-rw-r--r--kppp/conwindow.h96
-rw-r--r--kppp/debug.cpp140
-rw-r--r--kppp/debug.h70
-rw-r--r--kppp/devices.h98
-rw-r--r--kppp/docking.cpp148
-rw-r--r--kppp/docking.h70
-rw-r--r--kppp/edit.cpp1239
-rw-r--r--kppp/edit.h256
-rw-r--r--kppp/general.cpp684
-rw-r--r--kppp/general.h137
-rw-r--r--kppp/icons/Makefile.am1
-rw-r--r--kppp/icons/hi128-app-kppp.pngbin0 -> 15252 bytes
-rw-r--r--kppp/icons/hi16-app-kppp.pngbin0 -> 814 bytes
-rw-r--r--kppp/icons/hi22-app-kppp.pngbin0 -> 1347 bytes
-rw-r--r--kppp/icons/hi32-app-kppp.pngbin0 -> 2268 bytes
-rw-r--r--kppp/icons/hi48-app-kppp.pngbin0 -> 4156 bytes
-rw-r--r--kppp/icons/hi64-app-kppp.pngbin0 -> 6229 bytes
-rw-r--r--kppp/iplined.cpp42
-rw-r--r--kppp/iplined.h40
-rw-r--r--kppp/kpppconfig.h139
-rw-r--r--kppp/kpppwidget.cpp1073
-rw-r--r--kppp/kpppwidget.h174
-rw-r--r--kppp/loginterm.cpp168
-rw-r--r--kppp/loginterm.h50
-rw-r--r--kppp/logview/Makefile.am45
-rw-r--r--kppp/logview/export.cpp276
-rw-r--r--kppp/logview/export.h201
-rw-r--r--kppp/logview/kppplogview.desktop77
-rw-r--r--kppp/logview/log.cpp129
-rw-r--r--kppp/logview/log.h40
-rw-r--r--kppp/logview/loginfo.cpp197
-rw-r--r--kppp/logview/loginfo.h63
-rw-r--r--kppp/logview/main.cpp127
-rw-r--r--kppp/logview/main.h45
-rw-r--r--kppp/logview/monthly.cpp729
-rw-r--r--kppp/logview/monthly.h80
-rw-r--r--kppp/macros.h15
-rw-r--r--kppp/main.cpp453
-rw-r--r--kppp/main.h46
-rw-r--r--kppp/maintainer.h7
-rw-r--r--kppp/miniterm.cpp281
-rw-r--r--kppp/miniterm.h103
-rw-r--r--kppp/modem.cpp619
-rw-r--r--kppp/modem.h94
-rw-r--r--kppp/modemcmds.cpp384
-rw-r--r--kppp/modemcmds.h131
-rw-r--r--kppp/modemdb.cpp244
-rw-r--r--kppp/modemdb.h85
-rw-r--r--kppp/modeminfo.cpp292
-rw-r--r--kppp/modeminfo.h88
-rw-r--r--kppp/modems.cpp277
-rw-r--r--kppp/modems.h92
-rw-r--r--kppp/newwidget.cpp17
-rw-r--r--kppp/newwidget.h19
-rw-r--r--kppp/opener.cpp722
-rw-r--r--kppp/opener.h147
-rw-r--r--kppp/pixmaps/Makefile.am10
-rw-r--r--kppp/pixmaps/dock_both.pngbin0 -> 1034 bytes
-rw-r--r--kppp/pixmaps/dock_left.pngbin0 -> 1037 bytes
-rw-r--r--kppp/pixmaps/dock_none.pngbin0 -> 1000 bytes
-rw-r--r--kppp/pixmaps/dock_right.pngbin0 -> 1034 bytes
-rw-r--r--kppp/pixmaps/folder.pngbin0 -> 2403 bytes
-rw-r--r--kppp/pixmaps/kppplogo.pngbin0 -> 696 bytes
-rw-r--r--kppp/pixmaps/modemboth.pngbin0 -> 1180 bytes
-rw-r--r--kppp/pixmaps/modemleft.pngbin0 -> 1203 bytes
-rw-r--r--kppp/pixmaps/modemnone.pngbin0 -> 1195 bytes
-rw-r--r--kppp/pixmaps/modemright.pngbin0 -> 1185 bytes
-rw-r--r--kppp/pixmaps/phone.pngbin0 -> 5519 bytes
-rw-r--r--kppp/pppdargs.cpp171
-rw-r--r--kppp/pppdargs.h79
-rw-r--r--kppp/pppdata.cpp1486
-rw-r--r--kppp/pppdata.h513
-rw-r--r--kppp/ppplog.cpp285
-rw-r--r--kppp/ppplog.h40
-rw-r--r--kppp/pppstatdlg.cpp428
-rw-r--r--kppp/pppstatdlg.h131
-rw-r--r--kppp/pppstats.cpp343
-rw-r--r--kppp/pppstats.h84
-rw-r--r--kppp/providerdb.cpp473
-rw-r--r--kppp/providerdb.h152
-rw-r--r--kppp/pwentry.cpp115
-rw-r--r--kppp/pwentry.h72
-rw-r--r--kppp/requester.cpp365
-rw-r--r--kppp/requester.h38
-rw-r--r--kppp/ruleset.cpp581
-rw-r--r--kppp/ruleset.h146
-rw-r--r--kppp/runtests.cpp278
-rw-r--r--kppp/runtests.h47
-rw-r--r--kppp/scriptedit.cpp174
-rw-r--r--kppp/scriptedit.h79
-rw-r--r--kppp/utils.cpp66
-rw-r--r--kppp/utils.h44
-rw-r--r--kppp/version.h3
676 files changed, 45142 insertions, 0 deletions
diff --git a/kppp/AUTHORS b/kppp/AUTHORS
new file mode 100644
index 00000000..7c2540ec
--- /dev/null
+++ b/kppp/AUTHORS
@@ -0,0 +1,8 @@
+Developers:
+* Bernd Wuebben <wuebben@kde.org> : started kppp
+* Mario Weilguni <mweilguni@kde.org> : co-author
+* Harri Porten <porten@kde.org> : co-author, current maintainer
+
+Documentation Translators:
+
+Translators:
diff --git a/kppp/ChangeLog b/kppp/ChangeLog
new file mode 100644
index 00000000..58dfc849
--- /dev/null
+++ b/kppp/ChangeLog
@@ -0,0 +1,1711 @@
+2005-07-03 Harri Porten <porten@kde.org>
+
+ * pppstats.cpp: patch by Ivan that makes the PPP interface check
+ more portable. On the BSD IFF_RUNNING is already set right after
+ pppd starts - too early for our purposes. Avoids potential
+ authentication problems.
+
+2005-07-01 Harri Porten <porten@kde.org>
+
+ * connect.cpp: fixing the flow control fix. Ivan Vasilyev spotted
+ yet another issue with translated strings.
+
+2005-04-12 Harri Porten <porten@kde.org>
+
+ * pppstatdlg.cpp: improved byte number formatting patch by 'Walter'
+
+2005-03-18 Harri Porten <porten@kde.org>
+
+ * connect.cpp: fixed another occurence of a i18n bug with the flow
+ control setting as reported by Brendon Higgins in #95502. Will surely
+ fix some connection problems.
+
+2004-11-15 Harri Porten <porten@kde.org>
+
+ * edit.cpp (DialWidget): increased max length of callback number
+
+2004-07-11 Harri Porten <porten@kde.org>
+
+ * kpppwidget.cpp: to save some screen space: show the modem combo
+ box only if more than one modem has been set up.
+
+ * general.cpp (ModemWidget): fixed name label of modem dialog
+
+2004-05-28 Harri Porten <porten@kde.org>
+
+ * devices.h: added /dev/ttyS4 as requested by Christopher Martin for
+ PCI hardware modem in 2.6 kernels (#82345)
+
+ * general.cpp: made modem combo box read-only again. Editing device
+ names didn't really work (#82345).
+
+2004-05-19 Harri Porten <porten@kde.org>
+
+ * modem.cpp: fixed flow control for non-English users. Bug found by
+ Elias Jahn (#73646).
+
+2004-05-14 Simone Gotti <simone.gotti@email.it>
+ * Now kppp has the multiple modem profile features, so it finally
+ can manage a lot of modems and not only one!
+ It can use the old kppp config copying the [Modem] group to the
+ [Modem0] group if it doesn't already exists.
+ See Bugs: #52028
+
+2004-04-24 Harri Porten <porten@kde.org>
+
+ * connect.cpp: added patch by Dmitri that allows automatic redials
+ on NO CARRIER.
+
+ * provide automatic CBCP (Windows) callback support. Patch by Nick
+ Shafff.
+
+2004-04-12 Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar>
+
+ * Now kppp will notify other applications using DCOP about
+ connection status changes.
+
+2004-01-07 Harri Porten <porten@kde.org>
+
+ * modem.cpp: fix a bug in writing of modem commands. EAGAIN errors
+ were not handled. Thanks to Matteo Croce who helped tracking this
+ down.
+
+2003-12-13 Harri Porten <porten@kde.org>
+
+ * edit.cpp: disallow colons in connection name. breaks the loginfo
+ format
+
+2003-07-16 Harri Porten <porten@froglogic.com>
+
+ * connect.cpp: Digital Line Protection (DLP) support contributed
+ by Dorian Araneda <dorian.araneda at intel.com>
+
+2003-02-18 Harri Porten <porten@kde.org>
+
+ * added keyboard accelerators, layout fix (patch from
+ Mikolaj Machowski)
+
+2002-12-22 Harri Porten <porten@kde.org>
+
+ * acctselect.cpp: allow %xx escapes in ruleset file names.
+
+2002-10-27 Harri Porten <porten@trolltech.com>
+
+ * kpppconfig.h: increased MAX_ACCOUNTS to 100
+ * connect.cpp: fix for race condition in Expect command by
+ Dag Nygren dag at newtech.fi
+
+2002-04-12 Nadeem Hasan <nhasan@kde.org>
+ * Lots of GUI and layout cleanups. Added accels.
+
+2002-01-27 Per Winkvist <nd96pwt@student.hig.se>
+
+ * Add option to tune ATS11 "tone duration".
+
+2002-01-22 Per Winkvist <nd96pwt@student.hig.se>
+
+ * Make "Connect To" button default.
+ * Move KPPPWidget in main.cpp to an own file which reduced
+ the size of main.cpp with almost 1000 lines.
+
+2002-01-21 Chris Howells <howells@kde.org>
+ * Made the QMultiLineEdit on the Login Debug Window
+ read-only
+ * Fixed the bug in the connected window that meant
+ that the volume valued didn't display when volume
+ was >~2.5GB
+
+2002-01-21 Per Winkvist <nd96pwt@student.hig.se>
+
+ * Set focus correctly to ID/PWD on startup if one of the fields
+ are empty.
+
+2002-01-01 Harri Porten <porten@kde.org>
+
+ * don't ignore SIGHUP anymore. Forbidding Ctrl-Z is crazy.
+ * a bit more respect for Session Managment by adding handlers
+ for KApplication::saveYourSelf() and shutDown(). A user
+ had reported corrupted config data.
+ * made 'Log' a toggle button to represent debug window state
+
+2001-11-30 Harri Porten <porten@kde.org>
+
+ * main.cpp: set focus to password field if it's missing on startup.
+ Patch by Per Winkvist <nd96pwt at adeptus.student.hig.se>.
+
+2001-11-26 Harri Porten <porten@kde.org>
+
+ * applied patch for USB modems by Oliver Gantz <Oliver.Gantz@epost.de>
+
+2001-11-23 Harri Porten <porten@kde.org>
+
+ * connect.cpp: finally implemented often requested feature:
+ multiple init strings. Only two for now but it's now easy
+ to increase (PPPData::NumInitStrings + GUI)
+
+2001-11-08 Harri Porten <porten@kde.org>
+
+ * pppdata.cpp: fixed renaming of default account. Bug reported
+ by william.stephenson at ncl.ac.uk.
+
+2001-05-21 Harri Porten <porten@kde.org>
+
+ * modem.cpp: 460800 speed fix from msade@cs.pitt.edu
+
+2001-04-13 Harri Porten <porten@kde.org>
+
+ * runtests.cpp: fixed startup crash if 'pppd --version' failed
+ * combined PAP/CHAP patch by Ingo Heeskens <ingo@fivemile.org>
+
+2001-04-08 Harri Porten <porten@kde.org>
+
+ * option for turning off dial tone detection. Modem string
+ defaults to ATX3.
+ * Solaris fixes: added missing include, less restrictive compile check
+ * main.cpp: deactivated KNotify::beep() in pppd-died signal handler,
+ due to appearant race conditions when working remote
+ * ppplog.cpp: hardcoded list of syslog files, including my Debian one
+ * pppdata.cpp: i18n'ed name of account copy
+ * ...
+
+>>>>>>>>>>>>>>>>>>>>>>>>>>>> KDE 2.1.0 released <<<<<<<<<<<<<<<<<<<<<<<<<<<
+2001-01-05 Harri Porten <porten@kde.org>
+
+ * Solaris patches by Keith Refson <Keith.Refson@earth.ox.ac.uk>
+ and Stephen Usher <Stephen.Usher@earth.ox.ac.uk>. Still needs some
+ tweaking.
+ * logview/monthly.cpp: sensible sort order for each column. cleanup.
+
+>>>>>>>>>>>>>>>>>>>>>>>>>>>> KDE 2.0.1 released <<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+2000-11-27 Harri Porten <harri@trolltech.com>
+
+ * applied 7 bit fix from KDE 1.x for CompuServe users.
+
+2000-11-21 Harri Porten <harri@trolltech.com>
+
+ * modem.cpp: writeLine() fix from Wolfgang Grandegger. Hit USB modem
+ owners and probably more.
+
+>>>>>>>>>>>>>>>>>>>>>>>>>>>> KDE 2.0 released <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+1999-11-18 Harri Porten <porten@kde.org>
+
+ * main.cpp: cleaned up signal handlers by posting a user defined
+ event to Qt's event loop. The real X stuff will be done in member
+ functions of KPPPWidget now.
+
+1999-11-16 Harri Porten <porten@kde.org>
+
+ * docking.cpp: ported to make use of new KDockWidget
+
+1999-10-03 Harri Porten <porten@kde.org>
+
+ * support automatic DNS detection if pppd >= 2.3.7.
+ * pppdata.cpp: fixed default account
+
+1999-10-02 Harri Porten <porten@kde.org>
+
+ * runtests.cpp: determine pppd version. Will be needed to check
+ for support of new features
+
+1999-09-26 Harri Porten <porten@kde.org>
+
+ * runtests.cpp (ppp_available): Linux kernels >= 2.2.13 will have
+ a security hole fixed that breaks our check. Let's simply return true.
+
+1999-08-31 Harri Porten <porten@kde.org>
+
+ * opener.cpp: unified PAP and CHAP code
+ * use KMessageBox::Yes enum
+
+1999-07-22 Harri Porten <porten@kde.org>
+
+ * connect.cpp: visualize \n as <LF> in setExpect()'s debug messages
+ * logviewer: rename `log' variable to `logList' to avoid clash with
+ mathematical function on some systems.
+ * logview/loginfo.cpp: added mystrsep() function as strsep()
+ replacement which is not POSIX compliant.
+
+1999-07-19 Harri Porten <porten@kde.org>
+
+ * pppdata.cpp: fixed a cause of those "Timeout expired" errors: if
+ the user never set the speed of the serial port gpppdata would return
+ an empty string as speed(). The modem initialization code would
+ fall back to 57600 but no speed would be passed to pppd. Whatever
+ pppd does in this case (I haven't checked the sources yet) breaks the
+ negotiation process.
+
+1999-07-13 Harri Porten <porten@kde.org>
+
+ * added "Mode 7bit" and "Mode 8bit" script commands for CompuServe
+ users. 7bit will simply strip off the highest bit to deal with the
+ incoming 7E1 data. Write operations are not affected.
+ * modem.cpp: try a tcsendbreak() if tcgetattr() fails. Ask for
+ feedback if that solved the "modem is busy" error for anyone.
+ * modem.cpp: read data in multiple chunks of up to 200 bytes. This
+ should speed up things and avoid problems with the socket notifier.
+
+1999-07-11 Harri Porten <porten@kde.org>
+
+ * connect.cpp: moved some code from readChar() into checkBuffers()
+ to clean up the setExpect() race condition fix.
+
+1999-07-07 Mario Weilguni <mweilguni@kde.org>
+
+ * kppp now finds the icons again
+
+1999-07-06 Harri Porten <porten@kde.org>
+
+ * modem.cpp: adhere to the lock file format described in the
+ Serial HOWTO (10 digits pid and a newline).
+ * connect.cpp: fixed race condition that might have lead to data not
+ being caught by "Expect" (found by Arch Harris <arch@cs.jmu.edu>)
+
+1999-06-05 Harri Porten <porten@kde.org>
+
+ * pppstats.cpp: dropping the ifr_name #define hack allows compilation
+ with --enable-final (saves 20 kB size)
+
+1999-05-30 Harri Porten <porten@kde.org>
+
+ * connect.cpp: skip setting the volume if command is empty
+ * switched from KWizard to QWizard
+ * adaption to new KConfig iterators
+ * partly switched to KStandardDirs
+
+1999-05-07 Harri Porten <porten@kde.org>
+
+ * main.cpp: added public showStats() slot. Saved methods and p_kppp
+ pointers in DockWidget and ConWindow.
+
+1999-05-07 Harri Porten <porten@kde.org>
+
+ * renamed shutDown to myShutDown to avoid name clash with KApp
+ * runtests.cpp: better error message for missing s-bit.
+
+1999-05-04 Harri Porten <porten@kde.org>
+
+ * conwindow.cpp: fixed deleting of old geometry layout
+ * pppstats.cpp: bundled statistic in a module. Removed unused
+ get_ppp_cstats() and some variables. The modem animations are triggered
+ by signals from the PPPStats object.
+ * logview/main.cpp: had to replace QTabDialog with QTabWidget
+
+1999-04-25 Harri Porten <porten@kde.org>
+
+ * runtests.cpp: test for `lock' in /etc/ppp/options is not needed any-
+ more, thanks to a hint from Paul Mackeras (pppd). Leaving away ttySx
+ (99/04/10) from the command line and binding stdin/stdout to the
+ device (99/01/12) stops pppd from trying to lock the device itself.
+
+1999-04-12 Harri Porten <porten@kde.org>
+
+ * opener.cpp: introduced MY_ASSERT macro. We don't want to see our
+ security checks disabled by the NDEBUG flag.
+ * connect.cpp: fixed timeout errors that were caused by a re-enabled
+ socket notifier that took away data from pppd.
+ Thanks to Ian Gordon <ig@cs.strath.ac.uk> for tracking down this bug.
+ * requester.cpp: setpppdRunning(false) _before_ killing the pppd.
+ * main.cpp: added flushX() before every command_execute()
+ * increased maximum modem string size
+ * connect.cpp: stop the main loop from skipping characters. Parsing
+ the connect speed should work now.
+
+1999-03-11 Harri Porten <porten@kde.org>
+
+ * modem.cpp: dropped ISTRIP option and made everything else "8-bit
+ clean" by using unsigned char and removing 0x7F AND'ing. Characters
+ like [§ī°öäü] will work now.
+ * modem.cpp: use usleep() replacement from kdecore/fakes.cpp
+
+1999-03-10 Harri Porten <porten@kde.org>
+
+ * conwindow.cpp (ConWindow): initialize volinfo with "" do prevent
+ segfault. Strange.
+ * more porting to Qt 2.0 (layout and QString)
+
+1999-03-05 Harri Porten <porten@kde.org>
+
+ * geometry layout: got rid of some freeze() and setMinimum*() calls.
+ Qt 2.0 seems to make life a bit easier. A lot of work left.
+
+1999-03-03 Harri Porten <porten@kde.org>
+
+ * kdelibs have been switched to Qt 2.0. Replaced a lot of const char *
+ with QString (or QString&) and removed ~100 .data() calls.
+
+1999-02-16 Harri Porten <porten@kde.org>
+
+ * providerdb.cpp: don't segfault if database can't be located
+
+1999-02-15 Mario Weilguni <mweilguni@kde.org>
+
+ * the phonenumber widget had a german "Abbrechen" button instead
+ of a "Cancel" button
+
+ * new Script command "SendNoEcho". Usefull for sending passwords,
+ the command works like "Send", but the actual content is shown
+ as "*" in the status line.
+
+ * added a DialPrefix to the provider dialog; kppp now handles the
+ DialPrefix value for every connection, defaults to ""
+
+ * if a script argument contains %PASSWORD% or %USERNAME%, it is
+ replaced by the corresponding value
+
+ * fixed a bug in ChangeLog (don't laugh, that happens). I
+ commited all the changes above as Harri Porten :-)
+
+1999-02-13 Harri Porten <porten@kde.org>
+
+ * thereīs no a provider database (just one entry for now) and a
+ wizard for this.
+
+1999-02-11 Harri Porten <porten@kde.org>
+
+ * runtests.cpp: removed local header file if_ppp.h
+
+ * pppstats.cpp: cleaned up
+
+1999-02-10 Mario Weilguni <mweilguni@sime.com>
+
+ * the PPP interface name is now autodetected
+
+ * replaced the "Help" button with a questionmark. Makes the window
+ much smaller, especially in other languages than english
+
+ * the version number raised to 2.0pre4 (from 1.6.4). This version
+ is mainly the development version, whilest there is still a
+ "stable" 1.6.3 in the KDE 1.1 branch. Once KDE 2.0 is out (or
+ however it will named), the release will be 2.0
+
+1999-02-09 Mario Weilguni <mweilguni@sime.com>
+
+ * fixed a bug in the accounting module. The last character of the
+ logfile was overwritten each time a log file was
+ generated. Strange that nobody complained...
+
+ * reworked the layout of the AccountWidget
+
+ * removed some old, no longer needed variables from edit.h
+
+ * reworked the layout of the ModemWidget
+
+ * reworked the layout of the Modem2Widget. Now all Tab-Widgets are
+ reworked to use KGroupBox (which adds the title and takes part
+ of the size managment), which makes adding or deleting widgets
+ in the tab-dialogs much easier (especially for other people)
+
+ * if a user enters to domain name with a leading dot, this is
+ silently ignored now.
+
+1999-02-08 Harri Porten <porten@kde.org>
+
+ * removed some doubled and obsolete code. Some simplifications.
+
+ * fixed "cannot find pppd" error message
+
+1999-02-08 Mario Weilguni <mweilguni@sime.com>
+
+ * Changed the tabs "DNS" and "Gateway". Somehow, it feels more
+ natural this way.
+
+ * reworked the layout of the "DNS" widget
+
+ * pretty printed volume accounting. Using the terms KB, MB and GB
+ now when appropriate.
+
+ * Now it is possible to reset phone costs, volume accounting or both
+
+ * reworked the IPWidget, the GatewayWidget and the DialWidget
+
+1999-02-07 Mario Weilguni <mweilguni@sime.com>
+
+ * reworked the phone accounting selector widget, and reworked the
+ groupbox widget to adhere minimumSize() of the peer()
+
+ * reworked the layouting of the ScriptWidget and some usability
+ improvements
+
+ * removed the disturbing "Show log window" button. The log window
+ now remembers if it was shown or hidden last time. Now Iīm
+ waiting for feedback, if everybody is happy Iīll remove it
+ completly.
+
+ * removed some #include from header files and moved them to the
+ cpp files. Thus compiling for developers will be somewhat faster
+ now, because of fewer dependencies
+
+1999-02-06 Mario Weilguni <mweilguni@sime.com>
+
+ * added a new tab "Execute" to the accounting dialog, including
+ an explanation how to use it.
+
+ * the pppd-arguments were modified (in the "Customize ppp
+ arguments" dialog if "Default" was pressed, no matter if "Cancel"
+ was pressed afterwards. Fixed.
+
+ * the phone number entry was removed and replaced by a listbox and
+ some buttons to allow easy selection of multiple phone numbers
+
+ * the label "Edit pppd arguments" and the button after are now
+ replaced with the button "Customize pppd arguments..."
+
+ * some small usability improvements
+
+ * a big, fat warning is now displayed when selecting the
+ "Auto-configure hostname" option.
+
+ * The log window is now hidden if we are connected. If a
+ connection is up and running, thereīs no need for a debug
+ window
+
+ * The "/dev/cua*" devices are no longer available under Linux
+
+ * fixed a warning in requester.cpp
+
+ * pressing enter when on the "Connect" button now starts dialing
+
+1999-02-04 Harri Porten <porten@kde.org>
+
+ * main.cpp: remove stale pidfile before creating new the
+ one. Otherwise creation with O_EXCL fails.
+ * runtests.cpp: removed securityTest(). $HOME check wasn't fully
+ functional and not needed anymore.
+ * runtests.cpp: re-enabled test for pppd's s-bit if eff. uid != 0.
+
+1999-02-03 Mario Weilguni <mweilguni@kde.org>
+
+ * fixed a bug in my testing code
+
+ * fixed broken Hungarian ruleset
+
+1999-02-02 Mario Weilguni <mweilguni@kde.org>
+
+ * the value of the environment var $HOME is no longer trusted,
+ kppp now uses getpwent() to find out the home directory.
+
+ * the pidfile is now created with O_EXCL
+
+ * added new portugal rules
+
+ * executable accounting rulesets are now disabled (will re-enable
+ after KDE 1.1)
+
+ * fixed a bug that caused the throughput graph display
+ unreasonable high numbers
+
+1999-01-31 Mario Weilguni <mweilguni@kde.org>
+
+ * fixed a security bug (stdout or stderr closed on program start)
+
+1999-01-28 Mario Weilguni <mweilguni@kde.org>
+
+ * fixed a bug in opener.cpp. recvmsg() was interrupted, and thus
+ the SUID part died.
+
+1999-01-28 Harri Porten <porten@kde.org>
+
+ * modem.cpp: use sigsetjmp() instead of just setjmp() to solve
+ freeze when modem is powered off (bug#267)
+
+1999-01-27 Harri Porten <porten@kde.org>
+
+ * pppstats.cpp: removed debug output
+ * opener.cpp: delay closing the tty fd. Otherwise the ioctl() in
+ execpppd() can't succeed.
+ * opener.cpp: ignore TERM and INT signals. This is probably the
+ best until a safe clean-up & terminate routine is written.
+ * connect.cpp: added a removedns() call to cancelbutton().
+
+1999-01-25 Mario Weilguni <mweilguni@kde.org>
+
+ * updated and regenerated documentation
+
+1999-01-23 Harri Porten <porten@kde.org>
+
+ * main.cpp: config data wasn't saved on immediate exit.
+
+1999-01-22 Harri Porten <porten@kde.org>
+
+ * moved pppd call to the server process. It should be safer and
+ much more comfortable that pppd doesn't need to be installed SUID
+ root anymore. If I don't get any negative feedback I'll remove
+ some doubled code later.
+
+1999-01-17 Harri Porten <porten@kde.org>
+
+ * modeminfo.cpp: ATI1 was left out. Wait 0.1 secs to process the ATE0.
+
+1999-01-14 Mario Weilguni <mweilguni@kde.org>
+
+ * Most windows should now have the mini-icon
+ * the lineedit for the modem timeout was too narrow to see at
+ least 2 characters. Fixed it, now shows at least 4 chars
+ * double-clicking an account in the account-listbox now opens
+ the account for editing, as expected
+ * for some weird reason, the lineedit showing costs and volume
+ were both editable, thus letting users think they can edit
+ it. Fixed that.
+
+1999-01-12 Harri Porten <porten@kde.org>
+
+ * connect.cpp: become the session leader and let ttySx be the
+ controlling terminal before launching pppd. This might solve
+ timeout problems several people reported, ie. when kppp was
+ started from kpanel instead of a terminal window.
+ * main.cpp: the kppp.sh workaround for make_directories() isn't
+ needed anymore and confused a few people.
+ * requester.cpp: convert cmsglen to size_t to make the compiler happy.
+ * modem.cpp: fixed usleep() replacement in case #ifndef HAVE_USLEEP
+ * connect.cpp: saving of old_hostname was broken
+
+1999-01-10 Mario Weilguni <mweilguni@kde.org>
+
+ * complete rework of the accounting system. The old implementation
+ did only allow one type of accounting (=via rulefiles). The new
+ will allow executable rulefiles too.
+
+1999-01-06 Mario Weilguni <mweilguni@kde.org>
+
+ * added new hungarian rules
+ * the title of the main window was "kppp.bin". Fixed this.
+ * the combobox for selecting the account to dial in was
+ editable for some strange reason. Fixed.
+ * modified the testing stuff (-T now)
+
+1999-01-04 Mario Weilguni <mweilguni@kde.org>
+
+ * began to add a modem database. See README.ModemDB for
+ details. The modem DB will not make it into KDE 1.1 (sorry)
+
+1999-01-05 Harri Porten <porten@kde.org>
+
+ * opener.cpp: set O_NOCTTY flag when opening the modem device to
+ hinder the server process from being assigned a controlling terminal
+ (and 'stealing' it from pppd ?)
+ * pppdata.h: renamed "LockFile" key to "UseLockFile" to prevent a
+ clash with kppprc's from KDE 1.0. (reported by Seth Rothberg
+ <sethr@crocker.com>)
+ * umask(0) in suid child to avoid permission conflicts with lock file.
+ * connect.cpp,opener.*,requester.*: moved call to sethostname()
+ into Opener. Bug discovered by Matthew Ando <ando@math.jhu.edu>
+
+
+1999-01-04 Mario Weilguni <mweilguni@kde.org>
+
+ * Updated Hungarian rules
+ * removed all Qt calls from log to make it safe to use in
+ opener.cpp
+ * replace Debug() calls in opener.cpp with the function
+ provided by log.cpp
+ * clarified comments in opener.cpp
+ * replaced the button "Ok" with a "Exit" button when another
+ instance of kppp was found. This clarifies the action when
+ pressing the button.
+ * added a .kdelnk file for the log-viewer
+
+1998-12-28 Harri Porten <porten@kde.org>
+
+ * opener.cpp: netinet/in.h is needed on FreeBSD
+ * reverse order of dropping suid rights (first setgid, then
+ setuid) to avoid an EPERM error (doesn't make a difference on Linux)
+ * requester/opener: removed transmission of filename. I discovered
+ problems with the variable string length and it wasn't used
+ anyway.
+
+1998-12-27 Mario Weilguni <mweilguni@kde.org>
+
+ * moved gpppdata.setpppdError(0) to end of dieppp()
+ * the "Donīt show this hint again" option is now immediatly saved
+
+1998-12-26 Mario Weilguni <mweilguni@kde.org>
+
+ * gpppdata.pppdError() was never reset, causing a bunch of error
+ windows to appear. Should be fixed.
+ * cosmetic changes in various files for better readability
+
+1998-12-25 Harri Porten <porten@kde.org>
+
+ * kpppconfig.h: include <sys/param.h> to get the BSD define.
+ #include <config.h> was missing too. This prevented several #ifdefs
+ from doing the right thing.
+
+1998-12-24 Harri Porten <porten@kde.org>
+
+ * runtests.cpp: relaxed my previously enforced suid check for pppd
+
+1998-12-23 Harri Porten <porten@kde.org>
+
+ * runtests.cpp, opener.cpp: fixed FreeBSD compile problem reported by Hans
+ Petter Bieker
+
+1998-12-22 Harri Porten <porten@kde.org>
+
+ * pppdata.cpp: Give users upgrading from KDE 1.0 instructions how
+ to modify their kppprc if it is owned by root (KConfig bug back then).
+
+1998-12-21 Mario Weilguni <mweilguni@kde.org>
+
+ * opener.cpp: using umask now instead of chmod (more safe)
+ * opener.cpp: regfree was called too late. Fixed.
+ * re-enable scripts when using CHAP or PAP
+ * cosmetic changes in the "Accounts" widget
+
+1998-12-21 Harri Porten <porten@kde.org>
+
+ * opener.h: define system dependend type cast for struct iovec's
+ iov_base. FreeBSD needs (char *) instead (void *).
+
+1998-12-20 Mario Weilguni <mweilguni@kde.org>
+
+ * added Germany Mannesmann Arcor ruleset
+
+1998-12-20 Harri Porten <porten@kde.org>
+
+ * docking.cpp: call KWM::activate() on connection window after
+ being re-opened from docking icon (recommended by Matthias on
+ kde-devel)
+ * ppplog.cpp: re-introduced reading messages with fgets() instead
+ of single chars. Should be faster.
+ * ppplog.cpp: worked on diagnostic messages
+
+1998-12-18 Harri Porten <porten@kde.org>
+
+ * #include "auth.h" was needed after pap.h was removed
+ * opener.h: workaround for glibc bug in RedHat 5.0. Since there is
+ presumably no way to detect the exact release version we'll simply
+ define SCM_RIGHTS to be 1 for every glibc2.0 on Linux. This should
+ solve the conflict with the kernel.
+
+1998-12-18 Harri Porten <porten@kde.org>
+
+ * removed pap.* and chap.* files and moved their code in
+ requester.cpp where all setuid root stuff is gathered now.
+ * requester.cpp: rewrote PAP/CHAP so that the setuid part is free
+ of any Qt/X calls.
+
+1998-12-16 Mario Weilguni <mweilguni@kde.org>
+
+ * added Indonesia rule files
+ * added some new Denmark rule files
+ * added a patch from Filip Larsen <filip@post4.tele.dk> to allow a
+ rule to be dependent on connection time. See Rules/TEMPLATE for
+ an example. This will allow much better danish rulesets
+
+1998-12-14 Harri Porten <porten@kde.org>
+
+ * runtests.cpp: fixed test for pppd's suid bit
+ * requester.cpp: initialize struct control (may be necessary for
+ some kernel versions)
+ * runtests.cpp: use Requester to check write access to modem (PPP Test)
+
+1998-12-13 Harri Porten <porten@kde.org>
+
+ * use hardcoded lock file path (kpppconfig.h)
+ * tighten interface between Requester/Opener by transmitting
+ device index instead of device path
+ * do a fchown(fd, 0, 0) on lock file
+
+1998-12-08 Mario Weilguni <mweilguni@kde.org>
+
+ * added Denmark rules
+ * added Luxembourg rules
+ * commented out the no-longer need CHAP_* functions
+ * removed the old/never used setup program
+ * cleaned up accounting (set umask, no chown/chmod)
+ * cleaned up PPP log (set umask, no SUID check)
+
+1998-12-05 Harri Porten <porten@kde.org>
+
+ * connect.cpp: killpppd() and stop if_timeout_timer in cancelbutton()
+ * main.cpp: ignore SIGCHLDs in shutDown()
+ * main.cpp: interface timeout error wasn't displayed anymore
+ * modem.cpp: check for possible existance of stale lockfile before
+ trying it to open via Requester::rq->openLockFile(). The resulting
+ error message on failure was too confusing.
+ * main.cpp: ignore SIGHUPs in child process
+
+1998-12-04 Harri Porten <porten@kde.org>
+
+ * requester.cpp: disable alarm() for now, silence some debug messages
+
+1998-12-01 Harri Porten <porten@kde.org>
+
+ * main.cpp: notify user about death of helper process and abort
+
+1998-11-28 Harri Porten <porten@kde.org>
+
+ * main.cpp: restored accidentally deleted line (setPassword())
+ * connect.cpp: suppress warnings from QStrList
+
+1998-11-26 Harri Porten <porten@kde.org>
+
+ * included errno.h in opener.cpp and modified CMSG_DATA()'s
+ argument (as suggested by Andreas Pour).
+ * had to revert to SOCK_DGRAM since I keep getting failed
+ assertions. Using a stream seems to require some attention in
+ terms of ensuring that the correct length is received.
+
+1998-11-26 Mario Weilguni <mweilguni@kde.org>
+
+ * added missing rules for Switzerland, and added kppp.sh
+ * replace SOCK_DGRAM by SOCK_STREAM, and hope that it works
+
+1998-11-26 Harri Porten <porten@kde.org>
+
+ * requester.cpp: made the ifdef's for cmsg_data more portable
+ * requester.cpp, opener.cpp: include sys/uio.h to define struct
+ iovec. As far as I can see this should work for systems with and
+ without glibc. If it doesn't, please mail me directly.
+
+1998-11-25 Mario Weilguni <mweilguni@kde.org>
+
+ * fixed a lot of rulefiles. Pentecost Monday is NOT easter+60,
+ but easter+50. My TEMPLATE file contained this bug,
+ and unfortunatly a lot of people copied it.
+ * improved and new Switzerland rulefiles
+
+1998-11-24 Harri Porten <porten@kde.org>
+
+ * main.cpp: store pid of setuid child in PPPData object
+ * define KERNEL_VERSION()
+
+1998-11-24 Mario Weilguni <mweilguni@kde.org>
+
+ * fixed opener.cpp for Linux >= 2.1.0
+ * removed PAP_UsePAP(), no longer needed
+
+1998-11-23 Harri Porten <porten@kde.org>
+
+ * requester.cpp: removed ancient #include "requester.moc"
+
+1998-11-22 Harri Porten <porten@kde.org>
+
+ * main.cpp: fixed freeze on disconnect by using waitpid(...,
+ WNOHANG) instead of wait()
+ * main.cpp: forgot to convert gpppdata.password to char*
+ * opener.cpp: close file descriptors after being sent. Left out
+ dup() call. Did it serve any special purpose ?
+ * opener.h: increased allow size for username and passwords
+ * modem.cpp: included config.h for HAVE_USLEEP
+ (thanks to hpj.lisa@t-online.de (hpj) for reporting this)
+ * PAP/CHAP: fixed typo and return value
+
+1998-11-20 Harri Porten <porten@kde.org>
+
+ * First draft of a client&server archicture consisting of setuid
+ child process that will serve requests for file manipulation from
+ the parent. The parent is doing all the GUI operations is running
+ with normal user privileges. Assuming the approx. 300 lines still
+ running setuid root will be intensively reviewed this should
+ result in a kppp far less vulnerable to security exploits.
+ * added requester.* and opener.*
+ * TODO: - handle signals (SIGCHLD, SIGPIPE?)
+ - get ppp_available() running (presumably broken now)
+ - speed up reading the syslog (reading single chars now)
+
+1998-11-17 Mario Weilguni <mweilguni@kde.org>
+
+ * another security hole fixed: the function make_directories() is
+ no longer used, instead of a shell script make those directores.
+ Since shell scripts do not run suid, this should be safe
+ * fixed a bug in the main.cpp, at the calls to setPAPSecret() and
+ setCHAPSecret().
+ * fixed (void*)new Opener(...) to (void)new Opener(...)
+
+1998-11-17 Mario Weilguni <mweilguni@kde.org>
+
+ * Security fix: fixed possible buffer overflow in findFileInPath()
+ * Security fixes: re-checked all char[] on stack to be suid-safe
+ If it is considere to be safe, a comment was added to the end of
+ line
+
+1998-11-17 Mario Weilguni <mweilguni@kde.org>
+
+ * removed another "extern" by making Accounting::getCosts(...) static
+
+1998-11-17 Mario Weilguni <mweilguni@kde.org>
+
+ * further improvements in ppp-log wizard
+ * runtests.cpp: test for Qt >= 1.40 before include header files
+
+1998-11-11 Harri Porten <porten@kde.org>
+
+ * connect.cpp: allow a little delay after sending the volume
+ string. Prevents it from getting eaten by the next command.
+ Thanks to Craig Goodrich <craig@airnet.net> for providing the patch.
+
+1998-11-11 Harri Porten <porten@kde.org>
+
+ * runtests.cpp: added header file to solve compilation problems
+
+1998-11-04 Harri Porten <porten@kde.org>
+
+ * got rid of two global variables
+
+1998-11-04 Mario Weilguni <mweilguni@kde.org>
+
+ * kppp now checks itself if the kernel supports PPP (Linux only
+ for now. If anyone wants this for another system - implement it!)
+ * before dialing out, the check for PPP support is repeated, if
+ the kernel module was unloaded between running the tests and the
+ actual dialing, it will reloaded again
+
+1998-11-01 Harri Porten <porten@kde.org>
+
+ * modemcmds.cpp: added a wait&CR&wait sequence before sending the
+ init string. This seems to be necessary to avoid locking some modems.
+
+1998-10-29 Harri Porten <porten@kde.org>
+
+ * connect.cpp: fixed search&replace typo
+
+1998-10-26 Mario Weilguni <mweilguni@kde.org>
+
+ * incorporated new Netherland rules (NetPoint)
+
+1998-10-25 Mario Weilguni <mweilguni@kde.org>
+
+ * added updated rules for Spain
+
+1998-10-06 Mario Weilguni <mweilguni@kde.org>
+
+ * repaired Makefile.am and reverted Hans Petter Bieker's changes
+ to something more usefull.
+ * added SecurityWidget, but currently there's not much use for
+ this widget. Later on, it will allow root to specify who may use
+ kppp and pppd.
+ * removed the global variable miniIcon
+ * removed the global variable dock_widget, replaced with a static
+ class variable
+ * added lockdevice() and unlockdevice() to the class modem. This
+ will finally allow us to have a modem class which handles the
+ device locking itself (yeah...)
+ * removed the global var "modem", now a static member of the class
+ "Modem"
+ * modem.cpp: removed some global vars
+
+1998-10-14 Harri Porten <porten@kde.org>
+
+ * pppdata.cpp: don't care about CD line by default. We'll receive
+ too many "bug reports" otherwise.
+
+1998-10-13 Harri Porten <porten@kde.org>
+
+ * ppplog.cpp: offer some advice based on keywords found in the log
+ (very primitive so far, but may be extended later)
+
+1998-10-09 Harri Porten <porten@kde.org>
+
+ * modem.cpp: additional data flushes
+ * pppdata.cpp: don't need workaround for '$' with recent kde libraries
+
+1998-10-05 Mario Weilguni <mweilguni@kde.org>
+
+ * better QuickHelp text, proof-read by a native english
+ speaker. Thanks a lot to Martin A. Brown for doing this!
+
+1998-10-04 Harri Porten <porten@kde.org>
+
+ * miniterm.cpp: fixed toolbar
+
+1998-10-03 Harri Porten <porten@kde.org>
+
+ * modem.cpp: disentangled Modem class from other Widgets, i.e.
+ removed the Multiple Inheritance I introduced earlier.
+ Drawback: another global pointer :(
+ * main.cpp: since KConfig neglects the real user id when creating
+ config files we have to give kppprc back to the user ourself.
+ * connect.cpp: pass something more useful to parseModemSpeed()
+ * removed lots of unused/redundant code and variables
+
+1998-10-02 Mario Weilguni <mweilguni@kde.org>
+
+ * fixed that stupid segfault combined with the throughput graph
+ * "make" did not set the suid bit anymore. Why? However, I fixed
+ that
+
+1998-09-29 Mario Weilguni <mweilguni@kde.org>
+
+ * fixed a bug in the graphing code
+ * runtests.cpp: fixed typos
+
+1998-09-28 Harri Porten <porten@kde.org>
+
+ * ppplog.cpp: reduce memory consumption, small fixes
+ * pppdata.cpp: fixed segfaults caused by non-readable kppprc
+
+1998-09-28 Harri Porten <porten@kde.org>
+
+ * runtests.cpp: bail out if some evil-doer has manipulated $HOME
+
+1998-09-26 Mario Weilguni <mweilguni@kde.org>
+
+ * cosmetic changes in ppplog.cpp
+
+1998-09-24 Mario Weilguni <mweilguni@kde.org>
+
+ * Ownership of PPP logfiles corrected to the real, not the
+ effective user id
+
+1998-09-23 Harri Porten <porten@kde.org>
+
+ * ppplog.cpp: skip remote message if empty
+ * ppplog.cpp: fixed segfault triggered by virgin log files
+
+1998-09-21 Mario Weilguni <mweilguni@kde.org>
+
+ * introducing quickhelp
+ * forgot to add i18n to quickhelp entries, fixed this
+
+1998-09-20 Mario Weilguni <mweilguni@kde.org>
+
+ * PPP-arguments dialog reworked
+
+1998-09-19 Mario Weilguni <mweilguni@kde.org>
+
+ * more QuickHelp
+ * began to clean up layout management, it's a mess
+ * added setup widget for the throughput graph
+ * some code cleanups
+
+1998-09-16 Mario Weilguni <mweilguni@kde.org>
+
+ * Added some more QuickHelp
+ * The QLineEdit for fixed IP and netmask is not re-initialized
+ with "0.0.0.0" whenever you select "dynamic IP"
+ * the scripting widget is disabled if authentication PAP or CHAP
+ is selected
+
+1998-09-15 Mario Weilguni <mweilguni@kde.org>
+
+ * replaced strings that span several lines with multiple
+ strings, it seems that this was a GCC-only feature
+
+1998-09-11 Mario Weilguni <mweilguni@kde.org>
+
+ * more code cleanups
+ * fixed a bug in log.h (semicolon after a macro definition --
+ brrr)
+ * added quickhelp to many setup dialogs
+
+1998-09-05 Harri Porten <porten@kde.org>
+
+ * pppdata.cpp: fixed warnings
+ * replaced readListConfig calls with calls to readWholeListConfig
+ * and removed 'Whole' from function names afterwards
+ * connect.cpp: sped up scripting loop by reducing calls to gpppdata
+
+1998-08-29 Mario Weilguni <mweilguni@kde.org>
+
+ * In ConnectWidget::readtty(): after a newline or CR is received,
+ the QSocketnotifier is disabled for 20ms to avoid reading too
+ much, e.g. the start characters of the ppp protocol.
+ * added compile option "NO_GRAPH" to disable the graph
+ * removed the compile options "COMPILE_PIX" in pppstatsdlg.cpp,
+ this is no longer needed or supported
+
+1998-08-27 Harri Porten <porten@kde.org>
+
+ * ppplog.cpp: use short named header file to keep Qt 1.33 users happy
+
+1998-08-25 Mario Weilguni <mweilguni@kde.org>
+
+ * removed all QTimers for reading tty output, a QSocketNotifier is
+ now used. Much better response time now, lower CPU usage!
+ * "prompt" was deleted in the ConnectWidget destructor. Removed
+ that
+ * added telephone rule for Malaysia
+
+1998-08-24 Harri Porten <porten@kde.org>
+
+ * connect.cpp: re-enabled closeEvent()
+ * pppdata.cpp: dumped writeListConfig(). Will do the same with
+ readListConfig() too ... next week.
+
+1998-08-22 Mario Weilguni <mweilguni@kde.org>
+
+ * some KDE style guide conformant changes
+ * some code cleanups
+ * removed -lkfile and -lkfm from Makefile.am
+ * added debug switch to pppd command line when debugging
+ is turned on
+ * Improved the response time for modem output. Modem output is
+ polled in longer intervals, if data is pending the polling time
+ is shortened, otherwise the polling time is set back to itīs
+ original, rather high value
+ * re-worked the "About" widget. It was time to save poor old Bernd
+ from receiving bug-reports.
+ * miniterm.cpp: code cleanups
+ * improved responseness of MiniTerm, reduced CPU load
+ * MiniTerm adheres to KDE Standards now (Help-Menu, ...)
+ * The ATI query was broken. Fixed.
+ * Improved the ATI query result window
+ * modeminfo.cpp: code cleanups
+ * main.cpp: code cleanup, banner updated
+ * repaired the german "Tele-2" ruleset (was broken due to invalid
+ characters)
+ * added improved ruleset for Italy (thanks to Michele Manzato for
+ supplying this ruleset)
+ * fixed a few typos in the TEMPLATE
+ * prepared a replacement for the debug-window
+ * connwindow.cpp: code cleanups
+ * began to remove the code dependencies between main.cpp
+ (KPPPWidget) and the setup GUI components. This will help
+ to separate the dialer and the setup later
+ * general.cpp: code cleanups
+ * accounts.cpp: removed as many references to p_kppp as possible,
+ using signal/slots instead of. Thereīs only on occurence of p_kppp
+ left
+ * general.cpp: removed the mysterious function itoa (nowhere used)
+ * various files: a lot of code cleanups, removed many references
+ to extern variables, reduced the amount of functions called from
+ p_kppp directly (done with signal/slots now)
+ * Added a new parser for modem speeds. The results are much better
+ now, especially for the new K56flex/X2/V.90 modems (where
+ different speeds are used for RX/TX)
+ * removed tons of "#ifdef MY_DEBUG" and replaced them with
+ functions "Debug", which is provided in log.cpp and is a
+ "printf()" like function
+ * added modem volume selector to the setup.
+
+1998-08-21 Harri Porten <porten@kde.org>
+
+ * use SIGINT instead of SIGHUP to end a connection
+ * implemented command line option 'kppp -k' that will
+ terminate a connection
+
+1998-08-21 Mario Weilguni <mweilguni@kde.org>
+
+ * Added a graphical display of the current modem line
+ throughput.
+ * Added an assistent for those "ppp has died" messages
+ * Evaluating remote system messages now
+
+1998-08-19 Mario Weilguni <mweilguni@kde.org>
+
+ * added function to create a ppp - log
+ * connect speed improvements
+
+1998-08-18 Harri Porten <porten@kde.org>
+
+ * fixed security leak in execute_command(): drop setgid root and
+ close file descriptors
+
+1998-08-17 Mario Weilguni <mweilguni@kde.org>
+
+ * fixed a bug in runtest.cpp that caused a segfault (fclose()
+ called twice)
+
+1998-08-17 Harri Porten <porten@tu-harburg.de>
+
+ * main.cpp: added SIGHUP handler that will cleanly disconnect an
+ existing connection.
+
+1998-08-09 Harri Porten <porten@tu-harburg.de>
+
+ * miniterm.cpp: switched to QMenuBar, fixed memory leak
+
+1998-08-08 Harri Porten <porten@tu-harburg.de>
+
+ * modem.cpp: fixed hangup that occured if the modem power was off.
+ hangup() aborts after 2 seconds if it doesn't suceed.
+
+1998-08-06 Harri Porten <porten@tu-harburg.de>
+
+ * runtests.cpp: scan up to 100 lines when searching for the
+ unwanted 'lock' in /etc/ppp/options and recognize the '#' sign
+ to avoid a false alarm
+
+1998-08-04 Harri Porten <porten@tu-harburg.de>
+
+ * fixed replacement for systems without a BSD 4.2 style usleep()
+ * modem.cpp: continued to move modem related stuff to modem.cpp.
+ The new Modem class is inherited by the Connect-, MiniTerm- and
+ ATI-Query Widget for now. This should be way easier to maintain and
+ will reduce the binary's size.
+ * modeminfo.cpp: cleaned up
+
+1998-08-02 Harri Porten <porten@tu-harburg.de>
+
+ * opentty(): fixed XON/XOFF flow control
+ * closetty(): flush data not read or transmitted
+ * main.cpp: enforce killpppd()
+ * modem.cpp: moved lockdevice(), unlockdevice() and modemspeed()
+ into this newly created file. opentty(), closetty() and hangup()
+ should follow soon to let them be shared between widgets.
+
+1998-07-30 Harri Porten <porten@tu-harburg.de>
+
+ * connect.cpp: take the burden of specifying the modem lock file
+ from the user. Just entering the directory should be easier and
+ safer. Presets for different systems can be found in kpppconfig.h
+
+1998-07-29 Harri Porten <porten@tu-harburg.de>
+
+ * macros.h: replaced remaining MAX with QMAX
+ * main.cpp: followed recommendation of the Unix Programming FAQ to
+ use _exit() instead of exit() in child processes
+
+1998-07-25 Harri Porten <porten@tu-harburg.de>
+
+ * connect.cpp: rewrote check for stale lock files. After dropping
+ the use of /proc it should work on other platforms now, too.
+
+1998-07-19 Harri Porten <porten@tu-harburg.de>
+
+ * merged killppp() and terminatepppd() in killpppd()
+ * main.cpp: added execute_command() to launch external programms
+ * added "Command Before Disconnect" for people who have to clean
+ up before they leave the net
+
+1998-07-11 Harri Porten <porten@tu-harburg.de>
+
+ * main.cpp: replaced ~/.kde with kdelocaldir()
+ * connect.cpp: hardcoded ī-detachī as pppd argument
+
+>>>>>>>>>>>>>>>>>>>>>>>>>>>> KDE 1.0 released <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+1998-06-21 Harri Porten <porten@tu-harburg.de>
+
+ * general.cpp (GeneralWidget): modified checkbox-size to avoid
+ warnings from QGManager
+
+1998-06-18 Harri Porten <porten@tu-harburg.de>
+
+ * edit.cpp (ScriptWidget): deactivated "Use default script"-option
+ as long as someone comes up with a default script
+
+1998-06-02 Harri Porten <porten@tu-harburg.de>
+
+ * replaced klocale->translate() with i18n() and every reference to
+ XPPP with KPPP
+ * utilize īkappī (defined in kapp.h) instead of the global īextern
+ KApplication *appī
+ (Sorry about the large amount of changes, but I couldnīt resist to
+ clean up the code)
+
+1998-06-02 Harri Porten <porten@tu-harburg.de>
+
+ * pppdata.cpp: removed workaround, since KConfig fix is in place now
+
+Mon Jun 1 16:13:06 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * kppp didīnt like "$" in modem strings, fixed that
+
+Sun May 24 23:39:42 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
+
+ * Applied FreeBSD patch for the modem devices
+ Affected File:general.cpp pppdata.cpp
+ Look for __FreeBSD__
+
+Mon May 18 19:51:56 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * introduced a separate log-viewer "kppplogview"
+ * removed the no-more needed entry widget for the log-viewer
+ * removed test code checking for log viewer
+
+1998-05-15 Harri Porten <porten@tu-harburg.de>
+
+ * pppdata.cpp: temporary workaround for KConfig bug concerning
+ lists without a trailing separator
+
+Fri May 15 22:27:02 1998 Mario Weilguni <mweilguni@kde.org>
+ * removed the writeline("") once again, it does not work
+
+1998-05-12 Harri Porten <porten@tu-harburg.de>
+
+ * added support for multiple telephone numbers (separated by ':')
+ Patch contributed by Sebastian Rittau <srittau@jroger.in-berlin.de>
+
+Tue May 12 18:55:02 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * the format of the accounting logfile has changed to allow
+ easier parsing from external files:
+
+ the format is:
+ CONNECT_TIME_FROM:CONNECTION_PEER:CURRENCY_SYMBOL: \
+ CONNECT_TIME_UNTIL:SUBTOTAL:TOTAL:BYTES_IN_BYTES_OUT
+
+ thereīs a small tcl script which converts the log files. Simply
+ use "tclsh convlog.tcl" will convert all log-files, but NOT
+ delete the old ones.
+
+Mon May 4 17:19:12 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * Austrian rule files updated
+ * LSM updated
+ * line-limit for /etc/resolv.conf raised to 128
+ * fixed the hard-coded line-limit in removedns() to use
+ MAX_RESOLV_CONF instead (128)
+ * added writeLine("") in connect.cpp to make sure that the modem
+ is in ready state (waiting for AT*)
+ * support for internal ISDN cards on Linux via modem emulation
+ (/dev/ttyI*)
+
+1998-04-30 Harri Porten <porten@tu-harburg.de>
+
+ * connect.cpp: undid my stupid PAP/CHAP changes from yesterday
+
+1998-04-29 Harri Porten <porten@tu-harburg.de>
+
+ * connect.cpp: prevented segfault on invalid lockfiles
+ * runtests.cpp: /etc/resolv.conf will be created if missing
+ * connect.cpp: fixed reversal of command line options for PAP/CHAP
+
+Tue Apr 28 20:57:04 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * added CHAP (client side only) authentication
+
+1998-04-27 Harri Porten <porten@tu-harburg.de>
+
+ * general.cpp (GeneralWidget): command line option "quit after
+ end of connection" is availabe via GUI, too.
+ * hangup(): made another usleep() adjustable to prevent hanging
+ (thanks to A.D.Y. Cheng <adyc100@hkstar.com> for pointing that out)
+
+Fri Apr 24 18:57:46 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * general.cpp (GeneralWidget): removed the entry field for
+ the path to the pppd binary
+
+Fri Apr 24 13:03:02 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * runtests.cpp: kppp now does not allow anymore the user
+ to specify a path to the pppd binary, but searches for
+ it
+ * kppp now checks if pppd is owned by root
+ * kppp does not anymore drop suid before starting pppd
+
+Thu Apr 23 22:35:31 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * Fixed a few security holes: kppp drops suid before executing pppd,
+ checks for buffer overflow with the -c command line switch,
+ drops suid before checking a file with -r
+
+Thu Apr 16 21:21:03 1998 Harri Porten <porten@tu-harburg.de>
+
+ * main.cpp: set portable locale settings for numerical values,
+ since the rulefiles will always have a point as decimal delimiter.
+
+1998-04-15 Harri Porten <porten@tu-harburg.de>
+
+ * connect.cpp: extended parseargs() to deal with quoted arguments
+ * fixed bug in 'Save' that made multiple use impossible.
+ * enclosed username and password with quotes to ensure proper
+ handling of whitespace characters
+ * pap.cpp: fixed regexp to recognize entries in pap-secrets with
+ usernames that are either quoted or preceeded by whitspace. Phew !
+ That should eliminate one source of these "pppd died" errors.
+
+Mon Apr 6 20:18:40 1998 <mweilguni@kde.org>
+
+ * fixed a volume accounting bug
+ * volume accounting is now configureable (bytes in, out, in/out)
+ * added new feature (very usefull for sysadmins). If thereīs a
+ file /etc/kppp.allow, only users from that file may use kppp to
+ dial out. Format is one entry per line, comments begin with "#",
+ users specified by their login names
+ * fixed a bug where the PAP authetication record was only removed
+ from /etc/ppp/pap-secrets if an external program is started on
+ login (stupid me :-)
+
+Wed Apr 1 21:09:05 1998 Harri Porten <porten@tu-harburg.de>
+
+ * connect.cpp: small fixes for 'Scan'
+
+Tue Mar 31 18:54:13 1998 Harri Porten <porten@tu-harburg.de>
+
+ * connect.cpp: corrected stripping of whitespace from 'scanvar'
+ * main scripting loop idles until 'Scan' is completed
+ * added new keyword 'Save' to store scanned strings
+ * cleaned up add_domain(), adddns(), removedns() by adding data()
+ calls where QString variables are passed as const char* parameters
+
+Mon Mar 30 22:02:07 1998 <mweilguni@kde.org>
+
+ * added volume accounting (currently, only inbytes are counted,
+ but should be very easy to change). Unfortunatly, thereīs no
+ method yet to reset the number of bytes, so you have to fiddle
+ around in kppprc.
+
+Wed Mar 18 21:47:20 1998 Harri Porten <porten@tu-harburg.de>
+
+ * runtests.cpp: added check for 'lock' option in /etc/ppp/options.
+ Hopefully, this check isn't too harsh and won't cause any false alarms.
+
+Wed Mar 18 01:13:50 1998 Harri Porten <porten@tu-harburg.de>
+
+ * modemcmds.cpp: replaced 'Modem Sustains Fast Init' (from general.cpp)
+ option by an adjustable 'Init Delay'. Some users reported that they
+ had to increase the delay time to prevent kppp from hanging
+ after ATZ.
+
+Mon Mar 16 03:37:04 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
+
+ * command line options need to be parse after creating a KApplications
+ due to some changes by Matthias in kapp I think.
+
+1998-03-15 Mario Weilguni <mweilguni@kde.org>
+
+ * main.cpp: added mini-icon for all kppp windows, not just
+ the main window
+
+Mon Mar 9 00:17:20 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
+
+ * added new script keyword 'scan', see the documentation.
+ It allows for password challenges etc.
+
+Tue Feb 24 19:19:44 1998 Mario Weilguni <mweilguni@kde.org>
+
+ * pap.cpp, connect.cpp: removed the need for a "+ua" option
+ for PAP. Unfortunatly this REQUIRES that kppp can write
+ /etc/ppp/pap-secrets (either by running SUID root or
+ by group permissions)
+
+Fri Feb 13 01:12:19 1998 Harri Porten <porten@tu-harburg.de>
+
+ * loginterm.cpp: implemented the possibility to log in via
+ a simple terminal window. Should have developed a generic widget
+ that could have been shared by Miniterm, the debug window and
+ loginterm, but I didn't want to touch the rest of the stuff yet.
+ * kpppconfig.h: increased max. script size to 20
+
+Thu Feb 5 22:00:55 1998 Harri Porten <porten@tu-harburg.de>
+
+ * pppdata.cpp: added pppdError() and setpppdError()
+ * main.cpp: added new error message for timeout
+ * removed last remaining command_on_disconnect bug (see Jan 24)
+
+Sat Jan 31 19:56:03 1998 Harri Porten <porten@tu-harburg.de>
+
+ * main.cpp: in some cases kppp connected to an account
+ different from the one selected in the combo box. Added
+ setAccount() in connectbutton() to fix that, hopefully.
+
+Sun Jan 25 00:45:45 1998 Harri Porten <porten@tu-harburg.de>
+
+ * docking.cpp: included a hide() statement to cleanly undock
+ the widget from the panel. Otherwise the window stayed invisible
+ after one dock/undock-cycle.
+
+Sat Jan 24 03:40:44 1998 Harri Porten <porten@tu-harburg.de>
+
+ * fixed a bug (occuring twice) that caused the if-statement for
+ command_on_connect and command_on_disconnect to be always true.
+
+Fri Jan 23 01:32:57 1998 Harri Porten <porten@tu-harburg.de>
+
+ * fixed alignment in conwindow.cpp's layout.
+
+Wed Jan 21 03:22:43 1998 Harri Porten <porten@tu-harburg.de>
+
+ * prevented the password from being left in kppprc after the
+ option 'Store password' has just been turned off
+
+ * the ID & password field will be disabled if no account has
+ been created yet
+
+ * pppdata.cpp: removed absolute path for default log viewer
+ to prevent warning messages upon first startup if KDE's location
+ differs from /usr/local/kde
+
+ * removed gpppdata.Id() and gpppdata.setId() since they have been
+ replaced by storedUsername() and setStoredUsername()
+
+Tue Jan 20 15:30:08 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * Sigh. After unintentionally deleting my account for the sixth
+ time, I added a yesNo() dialog to confirm deleting an
+ account. This is VERY important, because if you click on "Show
+ log" and double-click onto a file to view it and you have the bad
+ luck that the filename is just over the "Delete" button, the
+ account will be gone.
+
+ * runtests.cpp: gpppdata is now saved after modifications in
+ runtests(), and the default log viewer is set correctly
+
+Tue Jan 20 03:10:35 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
+
+ * tried to get the docking window to display a tooltip with transfer
+ bytes statistics. Failed. Need to contact Matthias about it.
+
+ * Removed the 'Dock' button. It is superfluous. Use the window
+ close button to hide the window.
+
+ * fixed the flicker problem that was reintroduced in pppstatdlg.cpp
+
+ * fixed ( hopefully ) a hangup problem on busy redial caused
+ by the modem_in_connect_state varible in connect.cpp
+
+Mon Jan 19 17:51:16 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * main.cpp: the setup dialog is now created on demand. Since in
+ most cases we only dial out, creating the setup dialog is a waste
+ of CPU and memory. This reduces memory by approx 200KB.
+
+ * geometry managment added to PPP statistic window
+
+ * tried to minimize dependencies on "main.h" by removing unneeded
+ #includes
+
+ * removed homedir.(cpp|h). It can be easily replaced with
+ QDir::homeDirPath().
+
+ * before doing anything else, a few tests will be started to
+ ensure that i.e. the pppd binary is found...
+
+Mon Jan 19 12:05:00 1998 Harri Porten <porten@tu-harburg.de>
+
+ * set default for get_dock_into_panel() to false as safety
+ precaution
+
+ * introduced docking. It allows kppp to be run as a small
+ animated icon on the panel. Clicking on the icon with the left
+ mouse button restores the regular window. The right button
+ opens up a popup menu with other options.
+
+Mon Jan 19 04:46:39 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
+
+ * reset PHONENUMBER_SIZE to 60. People with phone cards need lots
+ space.
+
+Fri Jan 16 21:41:08 1998 Stephan Kulow <coolo@kde.org>
+
+ * some improvements to the toplevel Makefile.am. rpath is very
+ important for setuid programs
+
+Fri Jan 16 19:04:35 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * Improved Makefiles. Now documentation and rulesets are correctly
+ uninstalled with "make uninstall"
+
+ * Toplevel Makefile.am improved. Subdir traversal is only done for
+ installing, not for compiling
+
+ * fixed that "segfault-on-rulecheck" bug introduced by coolo's
+ modifications for locale support.
+
+ * RuleSet::checkRuleFile() now returns 0 on success, otherwise
+ 1. kppp uses this as exit value.
+
+ * fixed a bug in the swiss rulesets
+
+ * added file "checkrules" in Rules. It autochecks all rules found
+ and reports bad rulesets.
+
+Thu Jan 15 20:31:14 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * Ported kppp to use automake.
+
+ * Since the rulefiles now have separate subdirectories, I have
+ removed the prefix (i.e. Spain/Spain_Inovia.rst -->
+ Spain/Inovia.rst). Since the old files still exist it should be no
+ problem for users of former kppp versions.
+
+ * renamed config.h to kpppconfig.h because it conflicts with the
+ default include file config.h, generated from autoconf
+
+Wed Jan 14 12:12:29 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * main.cpp: pressing Enter in ID_Edit moves focus to PW_Edit, in
+ PW_Edit moves focus to the connect-button
+
+Wed Jan 14 04:13:57 1998 Harri Porten <porten@tu-harburg.de>
+
+ * fixed a bug that caused passwords to be spread among other accounts.
+ Triggering XPPPWidget::entryChanged() had a nasty side effect.
+
+Tue Jan 13 17:50:07 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
+
+ * fixed a bug introduced with the creation of the 'execute command
+ on disconnect' option
+
+ * CD is by default off. It doesn't work on my internal modem
+ and I suspect it might not even work on most (all) internal modems ..
+
+Tue Jan 13 12:02:33 1998 Mario Weilguni <mweilguni@sime.com>
+ * the PAP authentication file is now created in the users
+ homedirectory. Otherwise I'd have to create the directory
+ myself and fix the permissions if kppp runs suid root -
+ I'm too lazy for that.
+
+ * fixed a security bug in connect.cpp, a typical buffer
+ overflow. Very bad for setuid root programs
+
+Thu Jan 13 06:58:29 1998 Peter Silva <peter.silva@videotron.ca>
+
+ * make new behaviour optional (in response to Bernd's worry
+ about cheap modems.)
+
+Thu Jan 13 06:58:29 1998 Peter Silva <peter.silva@videotron.ca>
+
+ * patch to prevent kppp hang if modem is off when connecting.
+
+
+Tue Jan 13 02:48:55 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
+
+ * applied BSD patch from Alex <garbanzo@hooked.net>
+ (just a few missing includes)
+
+ * various fixes and geometry improvements
+
+ * added a linedit for a command to be executed on disconnect
+
+
+Mon Jan 12 17:18:41 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * username and password are now remembered between
+ session. Remembering the password can be switched off for each
+ account.
+
+ * connect.cpp: fixed 2 security bugs in lockfile(). Now it's
+ checked if the lockfile is a regular file and no more than
+ 32 characters are read from this file, no matter how long it is.
+
+ * Added PAP authentication option and code. Using PAP (at least
+ client-side-authentication should now be VERY easy. Sorry,
+ no CHAP support so far.
+
+ * edit.cpp: Added a checkbox if to use kppp's default script.
+ If this checkbox is checked, all scriptedit controls are disabled.
+
+Sun Jan 11 21:03:00 1998 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
+
+ * lslisder in modemcmd.cpp wasn't set correctely on widget
+ creation.
+
+
+Thu Jan 11 14:58:29 1998 Peter Silva <peter.silva@videotron.ca>
+ * (0.8.10) incorporate iconify_on_connect patch.
+
+
+Sat Jan 10 21:23:10 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * main.cpp: fixed a bug that cause kppp to go wild and display
+ hundreds of windows when it cannot load a ruleset file
+
+Wed Jan 7 13:00:24 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * edit.cpp: improved the IP and Gateway widgets
+
+ * various improvements for the geometry managements
+
+Tue Jan 6 12:56:14 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * main.cpp: the main kppp window has now layout control
+
+ * connect.cpp: layouted the connection window.
+
+ * modeminfo.cpp (ModemInfo): layoutet the modeminfo dialog
+ and layouted the ModemTransfer dialog (ATI query)
+
+Mon Jan 5 20:59:00 1998 Harri Porten <porten@tu-harburg.de>
+
+ * accounting.cpp: telephone costs are stored in kppprc now.
+ ~/.kde/share/apps/kppp/Costs is obsolete.
+ * pppdata.cpp: added totalCosts() and setTotalCosts().
+ Several small cosmetic changes.
+
+Mon Jan 5 14:25:37 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * docs/kppp.sgml: updated the docs for the new KDE file system
+ standard. Ispell'ed the docu.
+
+ * main.cpp: added the "-q" command line switch. This is very
+ usefull in combination with "-c". Instead of returning to
+ the kppp main window kppp will exit after disconnecting.
+
+ * Makefile.in: removed the external moc_*.cpp files and
+ included them directly with "#include". This saves
+ approx. 30 KB in the binary and greatly speeds up
+ compilation
+
+Mon Jan 5 13:59:20 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * Rules/TEMPLATE: fixed a typo: the extension of ruleset
+ files is ".rst", not ".rts"
+
+Mon Jan 5 13:42:28 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * general.cpp: replaced the KIntLineEdit class with the
+ class KIntegerLine from libkdeui. Replaced the progress
+ widget with that from libkdeui.
+
+Mon Jan 5 12:51:43 1998 Mario Weilguni <mweilguni@sime.com>
+
+ * edit.cpp: now all major dialogs use Qt layout
+
+Mon Jan 5 04:55:58 1998 Bernd Johannes Wuebben <wuebben@petit.cornell.edu>
+
+ * fixed the while(*it) problem in pppdata.cpp it should be
+ while(it->current()).
+
+Sun Jan 4 13:54:12 1998 Mario Weilguni <mweilguni@sime.com>
+ * modified the modemcommands dialog to use the layout
+ classes of Qt. Replaced the scrollbar with a slider,
+ because scrollbars are not the right widget to change
+ values.
+
+Thu Jan 2 00:25:03 1998 Peter Silva <peter.silva@videotron.ca>
+ * added modem_in_connect_state, and checks for it
+ to avoid unneccessary delays on modem initialization.
+ delay of 2 seconds will still occur on hangup by default.
+ I think that's bearable.
+ * Added modem tricks section, gentle introduction.
+
+Thu Dec 25 11:46:34 1997 Bernd Johannes Wuebben <wuebben@petit.cornell.edu>
+
+ * Added new script keywords: PwPrompt and ID
+ * Added ID and Password LineEdits on the main dialog window
+ * KConfig transition is now complete, one more time the data
+ storage format has changed. ( Hopefully the last time )
+
+ * All sorts of little cosmetic changes
+ * fixed up the mini-terminal a bit
+
+Sun Dec 22 23:00:03 1997 Peter Silva <peter.silva@videotron.ca>
+
+ * To fix hangup problems:
+ * Added programmable guard time around escape sequence
+ * Separated escape sequence from hangup command
+
+Sun Dec 21 10:19:18 1997 Peter Silva <peter.silva@videotron.ca>
+
+ * Changed maxloopnest to MAXLOOPNEST for portability reasons
+ (See developers guide, about const int)
+ * Set window titles when connected to account name.
+
+Fri Dec 19 22:49:18 1997 Bernd Johannes Wuebben <wuebben@petit.cornell.edu>
+
+ * Extended the grammar of the tarif rules.
+ New keyword: flat_init_costs necessitated by the new french
+ accounting rules.
+
+Tue Dec 16 01:54:50 1997 Bernd Johannes Wuebben <wuebben@petit.cornell.edu>
+
+ * extended scripting capabilities to allow password dialogs
+
+Sun Nov 2 14:02:31 1997 Bernd Johannes Wuebben <wuebben@petit.cornell.edu>
+
+ * accounts.cpp: applied mario's patches to the rulessets. Now deals
+ with fractions too.
+ * accounts.cpp: fixed the bug that caused kppp to reset the costs
+ even if you chose cancel.
+ * docs/kppp.sgml: doc updates and corrections
+
+Fri Aug 15 21:25:05 1997 Bernd Johannes Wuebben <wuebben@petit.cornell.edu>
+
+ * connect.cpp: leaving the lock file name edit blank will cause
+ kppp not to create lock files. That is this turn the use of lock files off
+
+ * added option to not disconnect on xserver exit/crash
+
+Sun Aug 10 19:07:07 1997 Bernd Johannes Wuebben <wuebben@petit.cornell.edu>
+
+ * kppp will no automatically disconnect on X-server exit
+
+Sun Jul 20 17:26:58 1997 Bernd Johannes Wuebben <wuebben@petit.cornell.edu>
+
+ * fixed bug in phone cost accounting
diff --git a/kppp/DB/Makefile.am b/kppp/DB/Makefile.am
new file mode 100644
index 00000000..6f5a373f
--- /dev/null
+++ b/kppp/DB/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = Provider
+
+pkgdir = $(kde_datadir)/kppp/Provider
diff --git a/kppp/DB/Modem/modemDB.rc b/kppp/DB/Modem/modemDB.rc
new file mode 100644
index 00000000..e5ce011b
--- /dev/null
+++ b/kppp/DB/Modem/modemDB.rc
@@ -0,0 +1,31 @@
+[Common]
+Name=Hayes Compatible
+Reset=Z
+Init=ATV1
+Volume0=M0L0
+Volume1=M1L1
+Volume2=M1L3
+PreInitDelay=50
+PostInitDelay=30
+InitResponse=OK
+BlindDialOn=X3
+BlindDialOff=X4
+ToneDial=DT
+PulseDial=DP
+ConnectResponse=CONNECT
+BusyResponse=BUSY
+NoCarrierResponse=NO CARRIER
+NoDialTone=NO DIALTONE
+SupportsCD=true
+
+[!Zyxel Omni TA128]
+Vendor=Zyxel
+Reset=&F
+
+[Zyxel Omni TA128/X75]
+Parent=!Zyxel Omni TA128
+Init=B20 V1 E1
+
+[Zyxel Omni TA128/sync.PPP]
+Parent=!Zyxel Omni TA128
+Init=B40 V1 E1
diff --git a/kppp/DB/Provider/Austria/.directory b/kppp/DB/Provider/Austria/.directory
new file mode 100644
index 00000000..9fdf220f
--- /dev/null
+++ b/kppp/DB/Provider/Austria/.directory
@@ -0,0 +1,50 @@
+[Desktop Entry]
+Name=Austria
+Name[af]=Oostenryk
+Name[ar]=اŲ„Ų†Ų…Øģا
+Name[az]=Avstriya
+Name[bg]=АÐēŅŅ‚Ņ€ÐļŅ
+Name[br]=Aostria
+Name[ca]=Àustria
+Name[cs]=Rakousko
+Name[cy]=Awstria
+Name[da]=Østrig
+Name[de]=Österreich
+Name[el]=ΑυστρÎŊÎą
+Name[eo]=AÅ­strio
+Name[fo]=Eysturríki
+Name[fr]=Autriche
+Name[ga]=An Ostair
+Name[hi]=āĪ†āĪļāĨāĪŸāĨāĪ°āĪŋāĪŊāĪū
+Name[hr]=Austrija
+Name[hu]=Ausztria
+Name[ja]=りマã‚đトナã‚Ē
+Name[km]=ážĒើទ្រážļស
+Name[ko]=ė˜ĪėŠĪíŠļëĶŽė•„
+Name[lt]=Austrija
+Name[lv]=Austrija
+Name[mk]=АÐēŅŅ‚Ņ€ÐļŅ˜Ð°
+Name[mn]=АÐēŅŅ‚Ņ€Ðļ
+Name[mt]=Awtrija
+Name[nds]=Österriek
+Name[nl]=Oostenrijk
+Name[nso]=Australia
+Name[pt]=Áustria
+Name[pt_BR]=Áustria
+Name[ru]=АÐēŅŅ‚Ņ€ÐļŅ
+Name[se]=Nuortariika
+Name[sk]=RakÚsko
+Name[sl]=Avstrija
+Name[sr]=АŅƒŅŅ‚Ņ€ÐļŅ˜Ð°
+Name[sr@Latn]=Austrija
+Name[sv]=Österrike
+Name[ta]=āŪ†āŪļāŊāŪĪāŪŋāŪ°āŪŋāŪŊāŪū
+Name[tg]=АÐēŅŅ‚Ņ€ÐļŅ
+Name[tr]=Avusturya
+Name[uk]=АÐēŅŅ‚Ņ€Ņ–Ņ
+Name[ven]=Ositiria
+Name[wa]=Ôtriche
+Name[zh_CN]=åĨĨ地åˆĐ
+Name[zh_HK]=åĨ§åœ°åˆĐ
+Name[zh_TW]=åĨ§åœ°åˆĐ
+Name[zu]=I-Austriyiya
diff --git a/kppp/DB/Provider/Austria/Makefile.am b/kppp/DB/Provider/Austria/Makefile.am
new file mode 100644
index 00000000..1d7d9092
--- /dev/null
+++ b/kppp/DB/Provider/Austria/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory Simon%032Media
+
+pkgdir = $(kde_datadir)/kppp/Provider/Austria/
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Austria/Simon%032Media b/kppp/DB/Provider/Austria/Simon%032Media
new file mode 100644
index 00000000..deacbcfa
--- /dev/null
+++ b/kppp/DB/Provider/Austria/Simon%032Media
@@ -0,0 +1,25 @@
+# KDE Config File
+Name=SimonMedia
+DNS=193.228.80.12,193.228.80.13,
+Domain=sime.com
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Austria/Standard/Online.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0718915250
+Username=%USERNAME%
+Password=%PASSWORD%
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Belarus/.directory b/kppp/DB/Provider/Belarus/.directory
new file mode 100644
index 00000000..834a5fbb
--- /dev/null
+++ b/kppp/DB/Provider/Belarus/.directory
@@ -0,0 +1,43 @@
+[Desktop Entry]
+Name=Belarus
+Name[ar]=ØĻŲŠŲ„Ø§ØąŲˆØģŲŠØ§
+Name[bg]=БÐĩÐŧаŅ€ŅƒŅ
+Name[br]=Belarusi
+Name[ca]=BielorÚssia
+Name[cs]=Bělorusko
+Name[da]=Hviderusland
+Name[de]=Weißrussland
+Name[el]=ΛÎĩυΚÎŋρωσÎŊÎą
+Name[eo]=Bjelorusio
+Name[es]=Bielorrusia
+Name[et]=Valgevene
+Name[fr]=BiÃĐlorussie
+Name[ga]=An BhealarÚis
+Name[hi]=āĪŽāĨ‡āĪēāĪūāĪ°āĨ‚āĪļ
+Name[hr]=Bjelorusija
+Name[hu]=Belarusz
+Name[it]=Bielorussia
+Name[ja]=ベãƒĐãƒŦマシ
+Name[km]=បេឡážķរážŧស្ស
+Name[lt]=Baltarusija
+Name[lv]=Baltkrievu
+Name[mk]=БÐĩÐŧÐūŅ€ŅƒŅÐļŅ˜Ð°
+Name[nds]=Wittrussland
+Name[nl]=Wit Rusland
+Name[pl]=Białoruś
+Name[pt]=BielorrÚssia
+Name[ru]=БÐĩÐŧÐūŅ€ŅƒŅŅÐļŅ
+Name[se]=Vilges-RuoÅĄÅĄa
+Name[sk]=Bielorusko
+Name[sl]=Belorusija
+Name[sr]=БÐĩÐŧÐūŅ€ŅƒŅÐļŅ˜Ð°
+Name[sr@Latn]=Belorusija
+Name[sv]=Vitryssland
+Name[ta]=āŪŠāŊ†āŪēāŪūāŪ°āŊ‚āŪļāŊ
+Name[tg]=БÐĩÐŧаŅ€ŅƒŅÐļŅ
+Name[tr]=Beyaz Rusya
+Name[uk]=БŅ–ÐŧÐūŅ€ŅƒŅŅŒ
+Name[wa]=Belaruss
+Name[zh_CN]=į™―äŋ„į―—æ–Ŋ
+Name[zh_TW]=į™―äŋ„įū…æ–Ŋ
+Name[zu]=I Bhelarusi
diff --git a/kppp/DB/Provider/Belarus/AtlantTelecom b/kppp/DB/Provider/Belarus/AtlantTelecom
new file mode 100644
index 00000000..f6e4c1af
--- /dev/null
+++ b/kppp/DB/Provider/Belarus/AtlantTelecom
@@ -0,0 +1,29 @@
+# KDE Config File
+[Account0]
+AccountingEnabled=1
+AccountingFile=/Belarus/AtlantTelecom_12900.rst
+Authentication=4
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=AtlantTelecom
+Password=%PASSWORD%
+Phonenumber=2092676
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+TotalBytes=0
+TotalCosts=0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/Belarus/Makefile.am b/kppp/DB/Provider/Belarus/Makefile.am
new file mode 100644
index 00000000..7ce9dc26
--- /dev/null
+++ b/kppp/DB/Provider/Belarus/Makefile.am
@@ -0,0 +1,6 @@
+pkg_DATA = .directory AtlantTelecom
+
+pkgdir = $(kde_datadir)/kppp/Provider/Belarus
+
+EXTRA_DIST = $(pkg_DATA)
+
diff --git a/kppp/DB/Provider/Czech_Republic/.directory b/kppp/DB/Provider/Czech_Republic/.directory
new file mode 100644
index 00000000..b3db40a1
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/.directory
@@ -0,0 +1,52 @@
+[Desktop Entry]
+Name=Czechia
+Name[af]=CzechiÃŦ
+Name[ar]=اŲ„ØŠØīŲŠŲƒ
+Name[az]=Çex RespublikasÄą
+Name[bg]=ЧÐĩŅ…ÐļŅ
+Name[br]=Tchekia
+Name[ca]=TxÃĻquia
+Name[cs]=Česko
+Name[cy]=Tsiecia
+Name[da]=Tjekkiet
+Name[de]=Tschechien
+Name[el]=ÎĪσÎĩχÎŊÎą
+Name[eo]=ĈeÄĨio
+Name[es]=RepÚblica Checa
+Name[et]=TÅĄehhi
+Name[fr]=TchÃĐquie
+Name[ga]=Poblacht na Seice
+Name[hi]=āĪšāĨ‡āĪ•
+Name[hr]=ČeÅĄka
+Name[hu]=CsehorszÃĄg
+Name[it]=Repubblica Ceca
+Name[ja]=チェã‚ģ
+Name[km]=ឆេក
+Name[ko]=ėēīė―”
+Name[lt]=Čekija
+Name[lv]=Čehija
+Name[mk]=ЧÐĩŅˆÐšÐ°
+Name[mn]=ЧÐĩŅ…
+Name[mt]=CÅžekia
+Name[nds]=Tschechien
+Name[nl]=TsjechiÃŦ
+Name[pl]=Czechy
+Name[pt]=RepÚblica Checa
+Name[pt_BR]=RepÚblica Tcheca
+Name[ru]=ЧÐĩŅ…ÐļŅ
+Name[se]=Čeahkka
+Name[sk]=Česko
+Name[sl]=ČeÅĄka
+Name[sr]=ЧÐĩŅˆÐšÐ°
+Name[sr@Latn]=ČeÅĄka
+Name[sv]=Tjeckien
+Name[ta]=āŪšāŊ†āŪ•āŊāŪŊāŪū
+Name[tg]=ЧÐĩŅ…ÐļŅ
+Name[tr]=Çek Cumhuriyeti
+Name[uk]=ЧÐĩŅ…Ņ–Ņ
+Name[wa]=Tchekeye
+Name[zh_CN]=æ·å…‹å…ąå’Œå›―
+Name[zh_HK]=捷克
+Name[zh_TW]=捷克
+Name[zu]=Isi-Czechiya
+
diff --git a/kppp/DB/Provider/Czech_Republic/AICOM b/kppp/DB/Provider/Czech_Republic/AICOM
new file mode 100644
index 00000000..d96cb2b3
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/AICOM
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=LR Premium
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971204211
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/ARsystem b/kppp/DB/Provider/Czech_Republic/ARsystem
new file mode 100644
index 00000000..5f36bc4b
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/ARsystem
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=ARsys.Net
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971214111
+Username=demo
+Password=777
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/ASYS b/kppp/DB/Provider/Czech_Republic/ASYS
new file mode 100644
index 00000000..c869f5d6
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/ASYS
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Internet ASYS
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971202911
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/ApexNet b/kppp/DB/Provider/Czech_Republic/ApexNet
new file mode 100644
index 00000000..5ee9af29
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/ApexNet
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Internet Super
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971206911
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/BohemiaNet b/kppp/DB/Provider/Czech_Republic/BohemiaNet
new file mode 100644
index 00000000..56e18e09
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/BohemiaNet
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971205211
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/Brailcom b/kppp/DB/Provider/Czech_Republic/Brailcom
new file mode 100644
index 00000000..d44e7c1a
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Brailcom
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=internet zababku BASIC
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971214011
+Username=internet
+Password=zababku
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/CITYNET b/kppp/DB/Provider/Czech_Republic/CITYNET
new file mode 100644
index 00000000..bc807149
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/CITYNET
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=STANDARD
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971202611
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/Contactel b/kppp/DB/Provider/Czech_Republic/Contactel
new file mode 100644
index 00000000..5f6f9ec6
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Contactel
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Internet Raz Dva
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971101211
+Username=Raz
+Password=Dva
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/ES-servis b/kppp/DB/Provider/Czech_Republic/ES-servis
new file mode 100644
index 00000000..8e352470
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/ES-servis
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Internet noc
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971208511
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/Econnect b/kppp/DB/Provider/Czech_Republic/Econnect
new file mode 100644
index 00000000..35a6a22f
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Econnect
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Plne pripojeni
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971208411
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/Falco_computer b/kppp/DB/Provider/Czech_Republic/Falco_computer
new file mode 100644
index 00000000..99f04039
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Falco_computer
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Bez omezeni
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971203111
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/Fortech b/kppp/DB/Provider/Czech_Republic/Fortech
new file mode 100644
index 00000000..c65899d6
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Fortech
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971202311
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/HP-NET b/kppp/DB/Provider/Czech_Republic/HP-NET
new file mode 100644
index 00000000..c8b5d99d
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/HP-NET
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Internet standard
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971212111
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/INTERNET_OnLine b/kppp/DB/Provider/Czech_Republic/INTERNET_OnLine
new file mode 100644
index 00000000..bceb0979
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/INTERNET_OnLine
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=IOL Dial-up
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971103311
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/INTERNEXT b/kppp/DB/Provider/Czech_Republic/INTERNEXT
new file mode 100644
index 00000000..d6b8eed4
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/INTERNEXT
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=INTERNEXT 2000
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971207211
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/IQNET b/kppp/DB/Provider/Czech_Republic/IQNET
new file mode 100644
index 00000000..bec76cbd
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/IQNET
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=WWW Registrace
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971101711
+Username=iqnet
+Password=registrace
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/KPNQuest b/kppp/DB/Provider/Czech_Republic/KPNQuest
new file mode 100644
index 00000000..fc4d49d0
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/KPNQuest
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=DialEUnet
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971204611
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/M-soft b/kppp/DB/Provider/Czech_Republic/M-soft
new file mode 100644
index 00000000..c08a7b29
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/M-soft
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Neomezeny
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971201611
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/Makefile.am b/kppp/DB/Provider/Czech_Republic/Makefile.am
new file mode 100644
index 00000000..e6cb709e
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Makefile.am
@@ -0,0 +1,18 @@
+pkg_DATA = .directory \
+ AICOM ARsystem ASYS ApexNet \
+ BohemiaNet Brailcom \
+ CITYNET Contactel \
+ ES-servis Econnect \
+ Falco_computer Fortech \
+ HP-NET \
+ INTERNET_OnLine INTERNEXT IQNET \
+ KPNQuest \
+ M-soft \
+ Nextra \
+ ProfiNet \
+ SeverNET \
+ Video_OnLine Volny
+
+pkgdir = $(kde_datadir)/kppp/Provider/Czech_Republic
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Czech_Republic/Nextra b/kppp/DB/Provider/Czech_Republic/Nextra
new file mode 100644
index 00000000..9e569479
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Nextra
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Nextra Business
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971100311
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/ProfiNet b/kppp/DB/Provider/Czech_Republic/ProfiNet
new file mode 100644
index 00000000..a01cfe69
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/ProfiNet
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Dial-up Standard
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971215311
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/SeverNET b/kppp/DB/Provider/Czech_Republic/SeverNET
new file mode 100644
index 00000000..3eb09a39
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/SeverNET
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=Free
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971206811
+Username=free
+Password=severnet
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/Video_OnLine b/kppp/DB/Provider/Czech_Republic/Video_OnLine
new file mode 100644
index 00000000..7af64ef4
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Video_OnLine
@@ -0,0 +1,32 @@
+# KDE Config File
+#Permission for inclusion of the czech ISP list for KDE 2.0.1 and
+#further versions is hereby granted to the KDE team as long as they
+#maintain the apropriate copyright notice "(c) by SuSE CR, s.r.o.".
+#
+#This permission is also valid for future versions of the czech ISP
+#list until stated otherwise.
+#
+Name=VOLny
+DNS=
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971200111
+Username=
+Password=
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
diff --git a/kppp/DB/Provider/Czech_Republic/Volny b/kppp/DB/Provider/Czech_Republic/Volny
new file mode 100644
index 00000000..e3e2ee3f
--- /dev/null
+++ b/kppp/DB/Provider/Czech_Republic/Volny
@@ -0,0 +1,26 @@
+# KDE Config File
+Name=Volný
+DNS=212.20.96.34,212.20.96.38,
+Domain=
+AccountingEnabled=1
+ScriptArguments=
+ScriptCommands=
+AccountingFile=/Czechia/Czech_Telecom_Internet2000.rst
+VolumeAccountingEnabled=1
+AutoName=0
+pppdArguments=-detach,defaultroute,modem,debug,crtscts,
+Authentication=3
+Gateway=0.0.0.0
+Phonenumber=0971200111
+Username=%USERNAME%
+Password=%PASSWORD%
+BeforeConnect=
+DisconnectCommand=
+BeforeDisconnect=
+Command=
+StorePassword=1
+DefaultRoute=1
+ExDNSDisabled=0
+IPAddr=0.0.0.0
+SubnetMask=0.0.0.0
+
diff --git a/kppp/DB/Provider/Denmark/.directory b/kppp/DB/Provider/Denmark/.directory
new file mode 100644
index 00000000..a2f66e20
--- /dev/null
+++ b/kppp/DB/Provider/Denmark/.directory
@@ -0,0 +1,52 @@
+[Desktop Entry]
+Name=Denmark
+Name[af]=Denemarke
+Name[ar]=اŲ„ØŊŲ†Ų…Ø§ØąŲƒ
+Name[az]=Danimarka
+Name[bg]=Ð”Ð°Ð―ÐļŅ
+Name[br]=Danmark
+Name[ca]=Dinamarca
+Name[cs]=DÃĄnsko
+Name[cy]=Denmarc
+Name[da]=Danmark
+Name[de]=DÃĪnemark
+Name[el]=Î”ÎąÎ―ÎŊÎą
+Name[eo]=Danlando
+Name[es]=Dinamarca
+Name[et]=Taani
+Name[fo]=Danmark
+Name[fr]=Danemark
+Name[ga]=An Danmhairg
+Name[hi]=āĪĄāĨ‡āĪĻāĪŪāĪūāĪ°āĨāĪ•
+Name[hr]=Danska
+Name[hu]=DÃĄnia
+Name[it]=Danimarca
+Name[ja]=デãƒģママã‚Ŋ
+Name[km]=ដážķណឹម៉ážķក
+Name[ko]=ëī마큎
+Name[lt]=Danija
+Name[lv]=Dānija
+Name[mk]=Ð”Ð°Ð―ŅÐšÐ°
+Name[mn]=Ð”Ð°Ð―Ðļ
+Name[mt]=Danimarka
+Name[nds]=DÃĪnmark
+Name[nl]=Denemarken
+Name[pl]=Dania
+Name[pt]=Dinamarca
+Name[pt_BR]=Dinamarca
+Name[ru]=Ð”Ð°Ð―ÐļŅ
+Name[se]=DÃĄnmÃĄrku
+Name[sk]=DÃĄnsko
+Name[sl]=Danska
+Name[sr]=Ð”Ð°Ð―ŅÐšÐ°
+Name[sr@Latn]=Danska
+Name[sv]=Danmark
+Name[ta]=āŪŸāŊ†āŪĐāŊāŪŪāŪūāŪ°āŊāŪ•āŊ
+Name[tg]=Ð”Ð°Ð―ÐļŅ
+Name[tr]=Danimarka
+Name[uk]=Ð”Ð°Ð―Ņ–Ņ
+Name[wa]=DaenmÃĨtche
+Name[zh_CN]=äļđéšĶ
+Name[zh_HK]=äļđéšĨ
+Name[zh_TW]=äļđéšĨ
+Name[zu]=Isi-Denimaki
diff --git a/kppp/DB/Provider/Denmark/Get2Net b/kppp/DB/Provider/Denmark/Get2Net
new file mode 100644
index 00000000..f2427f2e
--- /dev/null
+++ b/kppp/DB/Provider/Denmark/Get2Net
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=0
+Phonenumber=77887735
+IPAddr=0.0.0.0
+Domain=
+Name=Get2Net
+VolumeAccountingEnabled=0
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=195.82.195.101,129.142.7.101,
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Denmark/Makefile.am b/kppp/DB/Provider/Denmark/Makefile.am
new file mode 100644
index 00000000..793c1074
--- /dev/null
+++ b/kppp/DB/Provider/Denmark/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory Get2Net
+
+pkgdir = $(kde_datadir)/kppp/Provider/Denmark
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/France/.directory b/kppp/DB/Provider/France/.directory
new file mode 100644
index 00000000..d874df05
--- /dev/null
+++ b/kppp/DB/Provider/France/.directory
@@ -0,0 +1,48 @@
+[Desktop Entry]
+Name=France
+Name[ar]=ŲØąŲ†Øģا
+Name[az]=Fransa
+Name[bg]=ÐĪŅ€Ð°Ð―Ņ†ÐļŅ
+Name[br]=FraÃąs
+Name[ca]=França
+Name[cs]=Francie
+Name[cy]=Ffrainc
+Name[da]=Frankrig
+Name[de]=Frankreich
+Name[el]=ΓαÎŧÎŧÎŊÎą
+Name[eo]=Francio
+Name[es]=Francia
+Name[et]=Prantsusmaa
+Name[ga]=An Fhrainc
+Name[hi]=āĪŦāĨāĪ°āĪūāĪ‚āĪļ
+Name[hr]=Francuska
+Name[hu]=FranciaorszÃĄg
+Name[id]=Prancis
+Name[it]=Francia
+Name[ja]=フãƒĐãƒģã‚đ
+Name[km]=បážķរážķំង
+Name[lt]=PrancÅŦzija
+Name[lv]=Francija
+Name[mk]=ÐĪŅ€Ð°Ð―Ņ†ÐļŅ˜Ð°
+Name[mt]=Franza
+Name[nds]=Frankriek
+Name[nl]=Frankrijk
+Name[pl]=Francja
+Name[pt]=França
+Name[pt_BR]=França
+Name[ru]=ÐĪŅ€Ð°Ð―Ņ†ÐļŅ
+Name[se]=FrÃĄnkriika
+Name[sk]=FrancÚzsko
+Name[sl]=Francija
+Name[sr]=ÐĪŅ€Ð°Ð―Ņ†ŅƒŅÐšÐ°
+Name[sr@Latn]=Francuska
+Name[sv]=Frankrike
+Name[ta]=āŪŠāŪŋāŪ°āŪūāŪĐāŊāŪšāŊ
+Name[tg]=ÐĪаŅ€ÐūÐ―ŅÐ°
+Name[tr]=Fransa
+Name[uk]=ÐĪŅ€Ð°Ð―Ņ†Ņ–Ņ
+Name[ven]=Fura
+Name[xh]=Franisi
+Name[zh_CN]=æģ•å›―
+Name[zh_TW]=æģ•åœ‹
+Name[zu]=Isi Frentshi
diff --git a/kppp/DB/Provider/France/ClubInternetFull b/kppp/DB/Provider/France/ClubInternetFull
new file mode 100644
index 00000000..da121a8d
--- /dev/null
+++ b/kppp/DB/Provider/France/ClubInternetFull
@@ -0,0 +1,26 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=
+Authentication=1
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=club-internet.fr
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=ClubInternet
+Password=%PASSWORD%
+Phonenumber=0860301020
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/France/Makefile.am b/kppp/DB/Provider/France/Makefile.am
new file mode 100644
index 00000000..282315e8
--- /dev/null
+++ b/kppp/DB/Provider/France/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory ClubInternetFull
+
+pkgdir = $(kde_datadir)/kppp/Provider/France
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Germany/.directory b/kppp/DB/Provider/Germany/.directory
new file mode 100644
index 00000000..dfda7bdc
--- /dev/null
+++ b/kppp/DB/Provider/Germany/.directory
@@ -0,0 +1,54 @@
+[Desktop Entry]
+Name=Germany
+Name[af]=Duitsland
+Name[ar]=ØĢŲ„Ų…اŲ†ŲŠØ§
+Name[az]=Almaniya
+Name[bg]=ГÐĩŅ€ÐžÐ°Ð―ÐļŅ
+Name[br]=Alamagn
+Name[ca]=Alemanya
+Name[cs]=Německo
+Name[cy]=Yr Almaen
+Name[da]=Tyskland
+Name[de]=Deutschland
+Name[el]=ΓÎĩÏÎžÎąÎ―ÎŊÎą
+Name[eo]=Germanio
+Name[es]=Alemania
+Name[et]=Saksamaa
+Name[fo]=TÃ―skland
+Name[fr]=Allemagne
+Name[ga]=An GhearmÃĄin
+Name[hi]=āĪœāĪ°āĨāĪŪāĪĻāĨ€
+Name[hr]=Njemačka
+Name[hu]=NÃĐmetorszÃĄg
+Name[id]=Jerman
+Name[it]=Germania
+Name[ja]=ドã‚Īツ
+Name[km]=ážĒážķល្លឹម៉ង់
+Name[ko]=독ėž
+Name[lt]=Vokietija
+Name[lv]=Vācija
+Name[mk]=ГÐĩŅ€ÐžÐ°Ð―ÐļŅ˜Ð°
+Name[mn]=ГÐĩŅ€ÐžÐ°Ð―Ðļ
+Name[mt]=Ä ermanja
+Name[nds]=DÞÞtschland
+Name[nl]=Duitsland
+Name[pl]=Niemcy
+Name[pt]=Alemanha
+Name[pt_BR]=Alemanha
+Name[ru]=ГÐĩŅ€ÐžÐ°Ð―ÐļŅ
+Name[se]=Duiska
+Name[sk]=Nemecko
+Name[sl]=Nemčija
+Name[sr]=НÐĩОаŅ‡ÐšÐ°
+Name[sr@Latn]=Nemačka
+Name[sv]=Tyskland
+Name[ta]=āŪœāŊ†āŪ°āŊāŪŪāŪĐāŪŋ
+Name[tg]=ОÐŧОÐūÐ―
+Name[tr]=Almanya
+Name[uk]=НŅ–ОÐĩŅ‡Ņ‡ÐļÐ―Ð°
+Name[ven]=Geremani
+Name[wa]=Almagne
+Name[zh_CN]=åū·å›―
+Name[zh_HK]=åū·åœ‹
+Name[zh_TW]=åū·åœ‹
+Name[zu]=Isi-Jalimani
diff --git a/kppp/DB/Provider/Germany/CityWeb b/kppp/DB/Provider/Germany/CityWeb
new file mode 100644
index 00000000..9f53218d
--- /dev/null
+++ b/kppp/DB/Provider/Germany/CityWeb
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,word:,%PASSWORD%,ppp,
+AccountingEnabled=1
+Phonenumber=0029315267000
+IPAddr=0.0.0.0
+Name=cityweb
+Domain=cityweb.de
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=193.189.224.2,193.189.231.2,
+AccountingFile=/Germany/Telekom_City.rst
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Germany/FH%032Rhein%032Sieg%032%040Informatik%041 b/kppp/DB/Provider/Germany/FH%032Rhein%032Sieg%032%040Informatik%041
new file mode 100644
index 00000000..a53ba8a3
--- /dev/null
+++ b/kppp/DB/Provider/Germany/FH%032Rhein%032Sieg%032%040Informatik%041
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0224193400
+IPAddr=0.0.0.0
+Domain=fh-rhein-sieg.de
+Name=FH Rhein Sieg
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+BeforeDisconnect=
+Command=
+ScriptCommands=
+Authentication=1
+DNS=194.95.66.9
+SubnetMask=0.0.0.0
+AccountingFile=/Germany/Telekom_City.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Germany/MUC%046DE b/kppp/DB/Provider/Germany/MUC%046DE
new file mode 100644
index 00000000..e26c1750
--- /dev/null
+++ b/kppp/DB/Provider/Germany/MUC%046DE
@@ -0,0 +1,26 @@
+# KDE Config File
+Authentication=1
+AccountingFile=
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DialPrefix=
+DisconnectCommand=
+Domain=muc.de
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=MUC.DE
+Password=%PASSWORD%
+Phonenumber=32479752
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
diff --git a/kppp/DB/Provider/Germany/Makefile.am b/kppp/DB/Provider/Germany/Makefile.am
new file mode 100644
index 00000000..53153d6c
--- /dev/null
+++ b/kppp/DB/Provider/Germany/Makefile.am
@@ -0,0 +1,6 @@
+pkg_DATA = .directory CityWeb Netsurf \
+ FH%032Rhein%032Sieg%032%040Informatik%041 MUC%046DE
+
+pkgdir = $(kde_datadir)/kppp/Provider/Germany
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Germany/Netsurf b/kppp/DB/Provider/Germany/Netsurf
new file mode 100644
index 00000000..78673602
--- /dev/null
+++ b/kppp/DB/Provider/Germany/Netsurf
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0228964590
+IPAddr=0.0.0.0
+Domain=ivm.de
+Name=IVM
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=192.168.1.1
+SubnetMask=0.0.0.0
+AccountingFile=/Germany/Telekom_City.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Ireland/.directory b/kppp/DB/Provider/Ireland/.directory
new file mode 100644
index 00000000..a80c4851
--- /dev/null
+++ b/kppp/DB/Provider/Ireland/.directory
@@ -0,0 +1,43 @@
+[Desktop Entry]
+Name=Ireland
+Name[ar]=ØĨŲŠØąŲ„Ų†ØŊا
+Name[bg]=ИŅ€ÐŧÐ°Ð―ÐīÐļŅ
+Name[br]=Iwerzhon
+Name[ca]=Irlanda
+Name[cs]=Irsko
+Name[cy]=Iwerddon
+Name[da]=Irland
+Name[de]=Irland
+Name[el]=ΙρÎŧÎąÎ―ÎīÎŊÎą
+Name[eo]=Irlando
+Name[es]=Irlanda
+Name[et]=Iirimaa
+Name[fr]=Irlande
+Name[ga]=Éire
+Name[hi]=āĪ†āĪŊāĪ°āĪēāĨˆāĪ‚āĪĄ
+Name[hr]=Irska
+Name[hu]=ÍrorszÃĄg
+Name[it]=Irlanda
+Name[ja]=ã‚Ēã‚ĪãƒŦãƒĐãƒģド
+Name[km]=ážĒៀរឡង់
+Name[lt]=Airija
+Name[mk]=ИŅ€ŅÐšÐ°
+Name[nds]=Irland
+Name[nl]=Ierland
+Name[pl]=Irlandia
+Name[pt]=Irlanda
+Name[pt_BR]=Irlanda
+Name[ru]=ИŅ€ÐŧÐ°Ð―ÐīÐļŅ
+Name[se]=IrlÃĄnda
+Name[sk]=Írsko
+Name[sl]=Irska
+Name[sr]=ИŅ€ŅÐšÐ°
+Name[sr@Latn]=Irska
+Name[sv]=Irland
+Name[ta]=āŪ…āŪŊāŪ°āŊāŪēāŪūāŪĻāŊāŪĪāŊ
+Name[tg]=ИŅ€ÐŧÐ°Ð―ÐīÐļŅ
+Name[tr]=Ä°rlanda
+Name[uk]=ІŅ€ÐŧÐ°Ð―ÐīŅ–Ņ
+Name[wa]=Irlande
+Name[zh_CN]=įˆąå°”å…°
+Name[zh_TW]=愛įˆū蘭
diff --git a/kppp/DB/Provider/Ireland/Eircom b/kppp/DB/Provider/Ireland/Eircom
new file mode 100644
index 00000000..3068e665
--- /dev/null
+++ b/kppp/DB/Provider/Ireland/Eircom
@@ -0,0 +1,26 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=
+Authentication=1
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=Eircom.ie
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Eircom(ROI)
+Password=%PASSWORD%
+Phonenumber=1892150150
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/Ireland/IOL b/kppp/DB/Provider/Ireland/IOL
new file mode 100644
index 00000000..4716d60d
--- /dev/null
+++ b/kppp/DB/Provider/Ireland/IOL
@@ -0,0 +1,26 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=
+Authentication=1
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=IOL.ie
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=IOL(ROI)
+Password=%PASSWORD%
+Phonenumber=1890924042
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/Ireland/Makefile.am b/kppp/DB/Provider/Ireland/Makefile.am
new file mode 100644
index 00000000..597a481d
--- /dev/null
+++ b/kppp/DB/Provider/Ireland/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory Eircom IOL
+
+pkgdir = $(kde_datadir)/kppp/Provider/Irland
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Makefile.am b/kppp/DB/Provider/Makefile.am
new file mode 100644
index 00000000..94db26fd
--- /dev/null
+++ b/kppp/DB/Provider/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = Austria Denmark Germany Netherlands New_Zealand Norway Portugal \
+ United_Kingdom Taiwan Slovenia Sweden Czech_Republic Yugoslavia Ukraine \
+ Switzerland Belarus France Ireland
diff --git a/kppp/DB/Provider/Netherlands/.directory b/kppp/DB/Provider/Netherlands/.directory
new file mode 100644
index 00000000..d8d3bbea
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/.directory
@@ -0,0 +1,53 @@
+[Desktop Entry]
+Name=Netherlands
+Name[af]=Nederland
+Name[ar]=Ų‡ŲˆŲ„Ų†ØŊا
+Name[az]=Hollandiya
+Name[bg]=ÐĨÐūÐŧÐ°Ð―ÐīÐļŅ
+Name[br]=IzelvroioÃđ
+Name[ca]=PaÃŊsos Baixos
+Name[cs]=Nizozemí
+Name[cy]=Yr Iseldiroedd
+Name[da]=Holland
+Name[de]=Niederlande
+Name[el]=ΚΎτω ΧώρÎĩς
+Name[eo]=Nederlando
+Name[es]=Países Bajos
+Name[et]=Holland
+Name[fo]=HÃĄland
+Name[fr]=Pays-Bas
+Name[ga]=An Ísiltír
+Name[hi]=āĪĻāĨ€āĪĶāĪ°āĪēāĨˆāĪ‚āĪĄāĨāĪļ
+Name[hr]=Nizozemska
+Name[hu]=Hollandia
+Name[id]=Belanda
+Name[it]=Paesi Bassi
+Name[ja]=ã‚ŠãƒĐãƒģダ
+Name[km]=ហើល្លង់
+Name[ko]=ë„Ī덜란드
+Name[lt]=Olandija
+Name[lv]=NÄŦderlande
+Name[mk]=ÐĨÐūÐŧÐ°Ð―ÐīÐļŅ˜Ð°
+Name[mn]=НÐļÐīÐĩŅ€ÐŧÐ°Ð―Ðī
+Name[ms]=Belanda
+Name[nds]=Nedderlannen
+Name[nl]=Nederland
+Name[pl]=Holandia
+Name[pt]=Holanda
+Name[pt_BR]=Holanda
+Name[ru]=НÐļÐīÐĩŅ€ÐŧÐ°Ð―ÐīŅ‹
+Name[se]=HollÃĄnda
+Name[sk]=Holandsko
+Name[sl]=Nizozemska
+Name[sr]=ÐĨÐūÐŧÐ°Ð―ÐīÐļŅ˜Ð°
+Name[sr@Latn]=Holandija
+Name[sv]=NederlÃĪnderna
+Name[ta]=āŪĻāŊ†āŪĪāŪ°āŊāŪēāŪūāŪĻāŊāŪĪāŊ
+Name[tg]=НÐļÐīÐĩŅ€ÐŧÐ°Ð―ÐīŌģÐū
+Name[tr]=Hollanda
+Name[uk]=НŅ–ÐīÐĩŅ€ÐŧÐ°Ð―ÐīÐļ
+Name[wa]=Bas Payis
+Name[zh_CN]=č·å…°
+Name[zh_HK]=č·č˜­
+Name[zh_TW]=č·č˜­
+Name[zu]=I-Netherlands
diff --git a/kppp/DB/Provider/Netherlands/12Move b/kppp/DB/Provider/Netherlands/12Move
new file mode 100644
index 00000000..7dd00c1b
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/12Move
@@ -0,0 +1,25 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoDNS=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676077777
+IPAddr=0.0.0.0
+Domain=
+Name=12Move
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=195.240.240.254,195.240.240.222
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/12Move.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Bart b/kppp/DB/Provider/Netherlands/Bart
new file mode 100644
index 00000000..5805216f
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Bart
@@ -0,0 +1,26 @@
+# KDE Config File
+# www.bart.nl
+ExDNSDisabled=0
+AutoDNS=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676077111
+IPAddr=0.0.0.0
+Domain=
+Name=Bart
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.158.160.10,194.158.191.254
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Betuwenet%032BFree b/kppp/DB/Provider/Netherlands/Betuwenet%032BFree
new file mode 100644
index 00000000..e99355ba
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Betuwenet%032BFree
@@ -0,0 +1,27 @@
+# KDE Config File
+#informatie van http://www.betuwe.net/kop/inbel.html
+# en van http://www.betuwe.net/kop/faq.html#F
+
+ExDNSDisabled=0
+DNS=212.29.160.1,212.29.161.254
+AccountingEnabled=0
+AccountingFile=
+AutoName=0
+ScriptArguments=
+Phonenumber=0877880001
+IPAddr=0.0.0.0
+Domain=
+Name=Betuwenet BFree
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+SubnetMask=0.0.0.0
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Betuwenet%032BQuality b/kppp/DB/Provider/Netherlands/Betuwenet%032BQuality
new file mode 100644
index 00000000..db7a6261
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Betuwenet%032BQuality
@@ -0,0 +1,26 @@
+# KDE Config File
+#informatie van http://www.betuwe.net/kop/inbel.html
+# en van http://www.betuwe.net/kop/faq.html#F
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676000805
+IPAddr=0.0.0.0
+Domain=
+Name=Betuwenet BQuality
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=212.29.160.1,212.29.161.254
+SubnetMask=0.0.0.0
+AccountingFile=Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Cistron b/kppp/DB/Provider/Netherlands/Cistron
new file mode 100644
index 00000000..d3fa5a07
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Cistron
@@ -0,0 +1,29 @@
+# KDE Config File
+# gegevens van
+# http://www.cistron.nl/node.php?id=70&sqlcistron=b9093c0a65c4836c62715eb05bcf71f4
+# cistron is nu xs4all, echter onderstaand inbelnummer werkt nog steeds
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676070809
+IPAddr=0.0.0.0
+Domain=
+Name=Cistron
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AccountingFile=/Netherlands/BelBasis_Regio_Nummervoordeel.rst
diff --git a/kppp/DB/Provider/Netherlands/Concepts%032ICT b/kppp/DB/Provider/Netherlands/Concepts%032ICT
new file mode 100644
index 00000000..f4b38e68
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Concepts%032ICT
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.concepts-ict.nl
+AccountingEnabled=1
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+Authentication=1
+AutoName=0
+BeforeDisconnect=
+Command=
+DNS=213.197.28.3,213.197.24.3
+DefaultRoute=1
+DisconnectCommand=
+Domain=concepts.nl
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Concepts_ICT
+Password=%PASSWORD%
+Phonenumber=0676050500
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=1
+pppdArguments=
+AutoDNS=1 \ No newline at end of file
diff --git a/kppp/DB/Provider/Netherlands/Cubic%032Circle b/kppp/DB/Provider/Netherlands/Cubic%032Circle
new file mode 100644
index 00000000..b6db22a4
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Cubic%032Circle
@@ -0,0 +1,28 @@
+# KDE Config File
+# gegevens van http://www.cuci.nl/guide/faq.n.html
+
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676070809
+IPAddr=0.0.0.0
+Domain=cm.cuci.nl
+Name=Cubic Circle
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AccountingFile=/Netherlands/BelBasis_Regio_Nummervoordeel.rst
diff --git a/kppp/DB/Provider/Netherlands/Dataweb b/kppp/DB/Provider/Netherlands/Dataweb
new file mode 100644
index 00000000..a8df703c
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Dataweb
@@ -0,0 +1,25 @@
+# KDE Config File
+# gegevens van http://www.dataweb.nl/
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676088988
+IPAddr=0.0.0.0
+Domain=dataweb.nl
+Name=Dataweb
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=62.166.128.10,62.166.128.20
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Daxis%032Internet b/kppp/DB/Provider/Netherlands/Daxis%032Internet
new file mode 100644
index 00000000..dc376334
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Daxis%032Internet
@@ -0,0 +1,25 @@
+# KDE Config File
+# http://www.daxis.nl/ServiceCenter.aspx
+AccountingEnabled=1
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+Authentication=1
+AutoName=0
+BeforeDisconnect=
+Command=
+DNS=195.35.192.131,195.35.192.132
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Daxis Internet
+Password=%PASSWORD%
+Phonenumber=0676085324
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=1
+pppdArguments=
diff --git a/kppp/DB/Provider/Netherlands/Demon%032Internet b/kppp/DB/Provider/Netherlands/Demon%032Internet
new file mode 100644
index 00000000..36677a5f
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Demon%032Internet
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.demon.nl/support/inbelverbinding/inbelnummers.html#nummers
+# http://www.demon.nl/support/inbelverbinding/intro.html
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676033666:0676077666
+IPAddr=0.0.0.0
+Domain=demon.nl
+Name=Demon Internet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.159.73.135,194.159.73.136
+SubnetMask=255.255.255.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=194.159.73.222
+StorePassword=1
+DisconnectCommand=
+pppdArguments=-detach,mru 576,mtu 576
diff --git a/kppp/DB/Provider/Netherlands/Energis-Ision b/kppp/DB/Provider/Netherlands/Energis-Ision
new file mode 100644
index 00000000..3573d9d7
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Energis-Ision
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.energis-ision.nl/klantenservice/index.html
+
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676088888
+IPAddr=0.0.0.0
+Domain=
+Name=Energis-Ision
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=195.64.32.3,195.64.32.43
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Euronet%032anytime b/kppp/DB/Provider/Netherlands/Euronet%032anytime
new file mode 100644
index 00000000..03b68ed0
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Euronet%032anytime
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://home.euronet.nl/tools/help/algemeen.php?lang=ned&textonly=no
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=0
+AutoDNS=1
+Phonenumber=0676022203
+IPAddr=0.0.0.0
+Domain=euronet.nl
+Name=Euronet Anytime
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.134.5.5,194.134.0.97
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Euronet%032professional b/kppp/DB/Provider/Netherlands/Euronet%032professional
new file mode 100644
index 00000000..d591269d
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Euronet%032professional
@@ -0,0 +1,25 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=1
+Phonenumber=0676022206
+IPAddr=0.0.0.0
+Domain=euronet.nl
+Name=Euronet Professional
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.134.5.5,194.134.0.97
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/FlakkeeNet b/kppp/DB/Provider/Netherlands/FlakkeeNet
new file mode 100644
index 00000000..c5b2c089
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/FlakkeeNet
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.flakkee.net/flakkeenet/helpdesk/helpdesk.htm
+# http://www.flakkee.net/flakkeenet/helpdesk/inbelnrs.htm
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676000805
+IPAddr=0.0.0.0
+Domain=
+Name=FlakkeeNet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/FreeAcces b/kppp/DB/Provider/Netherlands/FreeAcces
new file mode 100644
index 00000000..f0337171
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/FreeAcces
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.freeaccess.nl/informatie-hoe-win95.html
+
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676085000
+IPAddr=0.0.0.0
+Domain=
+Name=Freeacces
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=195.85.130.70,195.85.130.69
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%PASSWORD%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Freeler%032basis b/kppp/DB/Provider/Netherlands/Freeler%032basis
new file mode 100644
index 00000000..b96650fe
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Freeler%032basis
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.freeler.nl/service/service_instellingen.html
+AutoDNS=1
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676056789
+IPAddr=0.0.0.0
+Domain=
+Name=Freeler
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=213.218.75.90,213.218.75.91
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/Freeler_Basis.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Freeler%032compleet b/kppp/DB/Provider/Netherlands/Freeler%032compleet
new file mode 100644
index 00000000..d4989c89
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Freeler%032compleet
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.freeler.nl/service/service_instellingen.html
+#
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676043210
+IPAddr=0.0.0.0
+Domain=
+Name=Freeler Compleet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=213.218.75.90,213.218.75.91
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Freeler%032voordelig b/kppp/DB/Provider/Netherlands/Freeler%032voordelig
new file mode 100644
index 00000000..7547e2e0
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Freeler%032voordelig
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.freeler.nl/service/service_instellingen.html
+#
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676020202
+IPAddr=0.0.0.0
+Domain=
+Name=Freeler Compleet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=213.218.76.150,213.218.76.151
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/Freeler_Voordelig.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/HCC%032NET b/kppp/DB/Provider/Netherlands/HCC%032NET
new file mode 100644
index 00000000..473d63af
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/HCC%032NET
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www3.hccnet.nl/info/support/overzicht.cfm?onderwerp=65&code_1=F&code_2=B&code_3=B&code_4=A
+AccountingEnabled=1
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+Authentication=4
+AutoName=0
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=HCC Net
+Password=%PASSWORD%
+Phonenumber=0676042222
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=1
+pppdArguments=
+AutoDNS=1
diff --git a/kppp/DB/Provider/Netherlands/Hacom b/kppp/DB/Provider/Netherlands/Hacom
new file mode 100644
index 00000000..610f260b
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Hacom
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.hacom.nl/info/internetdoc.html
+
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676090000
+IPAddr=0.0.0.0
+Domain=hacom.nl
+Name=Hacom
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/HetNet%032Basis%032Surfen b/kppp/DB/Provider/Netherlands/HetNet%032Basis%032Surfen
new file mode 100644
index 00000000..d9a260b9
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/HetNet%032Basis%032Surfen
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676001505
+IPAddr=0.0.0.0
+Domain=
+Name=HetNet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=195.121.1.34,195.121.1.66
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/HetNet%032Frequent%032Surfen b/kppp/DB/Provider/Netherlands/HetNet%032Frequent%032Surfen
new file mode 100644
index 00000000..a3e22a32
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/HetNet%032Frequent%032Surfen
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676001505
+IPAddr=0.0.0.0
+Domain=
+Name=HetNet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=195.121.1.34,195.121.1.66
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/HetNet%032Regelmatig%032Surfen b/kppp/DB/Provider/Netherlands/HetNet%032Regelmatig%032Surfen
new file mode 100644
index 00000000..cd392b7c
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/HetNet%032Regelmatig%032Surfen
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676001505
+IPAddr=0.0.0.0
+Domain=
+Name=HetNet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=195.121.1.34,195.121.1.66
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/HetNet_Regelmatig_Surfen.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/IAE b/kppp/DB/Provider/Netherlands/IAE
new file mode 100644
index 00000000..3f527ee9
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/IAE
@@ -0,0 +1,25 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoDNS=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676077111
+IPAddr=0.0.0.0
+Domain=
+Name=IAE
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=212.61.15.8,212.61.25.226
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/ILimburg b/kppp/DB/Provider/Netherlands/ILimburg
new file mode 100644
index 00000000..5a6b9251
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/ILimburg
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://home.ilimburg.nl/b/totaalb2.3.3.5.html
+
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0464280030
+IPAddr=0.0.0.0
+Domain=
+Name=Internet Limburg
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/InterNLnet b/kppp/DB/Provider/Netherlands/InterNLnet
new file mode 100644
index 00000000..5c8b2488
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/InterNLnet
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676044000
+IPAddr=0.0.0.0
+Domain=
+Name=InterNLnet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=217.149.196.6,217.149.192.6
+SubnetMask=0.0.0.0
+AccountingFile=Netherlands/InterNlnet.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Interbox b/kppp/DB/Provider/Netherlands/Interbox
new file mode 100644
index 00000000..a7410ee4
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Interbox
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.box.nl/helpdesk/inbelnummers/
+#
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676000803
+IPAddr=0.0.0.0
+Domain=
+Name=
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=1
diff --git a/kppp/DB/Provider/Netherlands/Internet%032Acces%032Facilities b/kppp/DB/Provider/Netherlands/Internet%032Acces%032Facilities
new file mode 100644
index 00000000..be14e329
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Internet%032Acces%032Facilities
@@ -0,0 +1,25 @@
+# KDE Config File
+# http://www.iaf.nl/support/instellingen.html
+AccountingEnabled=1
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+Authentication=1
+AutoName=0
+BeforeDisconnect=
+Command=
+DNS=80.89.224.64,195.108.17.20
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=80.89.224.1
+IPAddr=0.0.0.0
+Name=Internet Acces Facilities
+Password=%PASSWORD%
+Phonenumber=0676042328
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=1
+pppdArguments=
diff --git a/kppp/DB/Provider/Netherlands/Internet%032Online b/kppp/DB/Provider/Netherlands/Internet%032Online
new file mode 100644
index 00000000..dc11becc
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Internet%032Online
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.io.nl/support.html
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676088030
+IPAddr=0.0.0.0
+Domain=
+Name=Internet Online
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Interstroom b/kppp/DB/Provider/Netherlands/Interstroom
new file mode 100644
index 00000000..300cd318
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Interstroom
@@ -0,0 +1,25 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=
+IPAddr=0.0.0.0
+Domain=
+Name=Interstroom
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/IntroWeb%032Hengelo%032e.o. b/kppp/DB/Provider/Netherlands/IntroWeb%032Hengelo%032e.o.
new file mode 100644
index 00000000..55bf590b
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/IntroWeb%032Hengelo%032e.o.
@@ -0,0 +1,24 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+Authentication=1
+AutoName=0
+BeforeDisconnect=
+Command=
+DNS=195.86.14.10,195.86.120.12
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Introweb
+Password=%PASSWORD%
+Phonenumber=074-2503972
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=1
+pppdArguments=
diff --git a/kppp/DB/Provider/Netherlands/IntroWeb%032met%0323-cijferig%032kengetal b/kppp/DB/Provider/Netherlands/IntroWeb%032met%0323-cijferig%032kengetal
new file mode 100644
index 00000000..284ba516
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/IntroWeb%032met%0323-cijferig%032kengetal
@@ -0,0 +1,25 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+Authentication=1
+AutoName=0
+BeforeDisconnect=
+Command=
+DNS=195.86.14.10,195.86.120.12
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Introweb
+Password=%PASSWORD%
+Phonenumber=8800830
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=1
+pppdArguments=
+
diff --git a/kppp/DB/Provider/Netherlands/IntroWeb%032met%0324-cijferig%032kengetal b/kppp/DB/Provider/Netherlands/IntroWeb%032met%0324-cijferig%032kengetal
new file mode 100644
index 00000000..f029483c
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/IntroWeb%032met%0324-cijferig%032kengetal
@@ -0,0 +1,25 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+Authentication=1
+AutoName=0
+BeforeDisconnect=
+Command=
+DNS=195.86.14.10,195.86.120.12
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Introweb
+Password=%PASSWORD%
+Phonenumber=880830
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=1
+pppdArguments=
+
diff --git a/kppp/DB/Provider/Netherlands/Kabelfoon b/kppp/DB/Provider/Netherlands/Kabelfoon
new file mode 100644
index 00000000..443d5e1f
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Kabelfoon
@@ -0,0 +1,66 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Demos 1 Network
+Password=%PASSWORD%
+Phonenumber=4
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=asyncmap 0,noauth,lock,crtscts,noipdefault,-proxyarp
+[Desktop Entry]
+Icon=
+[General]
+DefaultAccount=Demos 1 Network
+NumberOfAccounts=1
+PPPDebug=0
+ShowLogWindow=0
+pppdTimeout=15
+[Graph]
+Background=255,255,255
+Enabled=true
+InBytes=0,0,255
+OutBytes=255,0,0
+Text=0,0,0
+[Modem]
+AnswerResponse=CONNECT
+AnswerString=ATA
+BusyResponse=BUSY
+ConnectResponse=CONNECT
+DialString=AT&D0D
+EscapeGuardTime=50
+EscapeResponse=OK
+EscapeString=+++
+FlowControl=Geen
+HangUpResponse=OK
+HangupString=ATH
+InitDelay=50
+InitResponse=OK
+InitString=ATZ
+NoCarrierResponse=NO CARRIER
+NoDialToneResp=NO DIALTONE
+PreInitDelay=50
+RingResponse=RING
+Speed=115200
+Timeout=30
+UseLockFile=0
+Volume=0
+VolumeHigh=M0L0
+VolumeMedium=M0L0
+VolumeOff=M0L0
diff --git a/kppp/DB/Provider/Netherlands/KeyAcces%032met%0323%032cijferig%032kengetal b/kppp/DB/Provider/Netherlands/KeyAcces%032met%0323%032cijferig%032kengetal
new file mode 100644
index 00000000..d23b3332
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/KeyAcces%032met%0323%032cijferig%032kengetal
@@ -0,0 +1,26 @@
+# KDE Config File
+#
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=8500015
+IPAddr=0.0.0.0
+Domain=
+Name=KeyAcces
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=1 \ No newline at end of file
diff --git a/kppp/DB/Provider/Netherlands/KeyAcces%032met%0324%032cijferig%032kengetal b/kppp/DB/Provider/Netherlands/KeyAcces%032met%0324%032cijferig%032kengetal
new file mode 100644
index 00000000..a49a4373
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/KeyAcces%032met%0324%032cijferig%032kengetal
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.keyaccess.nl/
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=850015
+IPAddr=0.0.0.0
+Domain=
+Name=KeyAcces
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=1 \ No newline at end of file
diff --git a/kppp/DB/Provider/Netherlands/Luna b/kppp/DB/Provider/Netherlands/Luna
new file mode 100644
index 00000000..ce82c7c3
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Luna
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.luna.nl/in/helpdesk/index.html
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=
+IPAddr=0.0.0.0
+Domain=
+Name=Luna
+AutoDNS=1
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=217.77.129.12,212.204.207.221
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Macom b/kppp/DB/Provider/Netherlands/Macom
new file mode 100644
index 00000000..f67c8146
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Macom
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.macon.nl/info/landelijk.htm#Windows95
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=
+IPAddr=0.0.0.0
+Domain=
+Name=Macom
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Makefile.am b/kppp/DB/Provider/Netherlands/Makefile.am
new file mode 100644
index 00000000..d578c09a
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Makefile.am
@@ -0,0 +1,67 @@
+pkg_DATA = .directory \
+ Kabelfoon \
+ HCC%032NET \
+ 12Move \
+ FlakkeeNet \
+ IntroWeb%032Hengelo%032e.o. \
+ Support%032Net \
+ FreeAcces \
+ IntroWeb%032met%0323-cijferig%032kengetal \
+ Telebyte \
+ Bart \
+ Freeler%032basis \
+ IntroWeb%032met%0324-cijferig%032kengetal \
+ Tiscali%032Compleet \
+ Betuwenet%032BFree \
+ Freeler%032compleet \
+ KeyAcces%032met%0323%032cijferig%032kengetal \
+ Tiscali%032Gratis \
+ Betuwenet%032BQuality \
+ Freeler%032voordelig \
+ KeyAcces%032met%0324%032cijferig%032kengetal \
+ UwNet \
+ Hacom \
+ Luna \
+ Via%032Networks \
+ Cistron \
+ HetNet%032Basis%032Surfen \
+ Macom \
+ Wannadoo%032budget \
+ Concepts%032ICT \
+ HetNet%032Frequent%032Surfen \
+ Wannadoo%032budget%320plus \
+ Cubic%032Circle \
+ HetNet%032Regelmatig%032Surfen \
+ Nederland.net \
+ Wannadoo%032smartpack \
+ IAE \
+ Planet%032Internet%032Premium \
+ Wirehub \
+ Dataweb \
+ ILimburg \
+ Planet%032Internet%032Standaard \
+ XS4All \
+ Daxis%032Internet \
+ InterNLnet \
+ Plant%032Acces \
+ Zeelandnet \
+ Demon%032Internet \
+ Interbox \
+ Popin \
+ Zon%0322 \
+ Energis-Ision \
+ Internet%032Acces%032Facilities \
+ PublishNet \
+ Zon%032Gratis \
+ Euronet%032anytime \
+ Internet%032Online \
+ Raketnet \
+ Zon%032Inclusief \
+ Euronet%032professional \
+ Interstroom \
+ Solcon
+
+
+pkgdir = $(kde_datadir)/kppp/Provider/Netherlands
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Netherlands/Nederland.net b/kppp/DB/Provider/Netherlands/Nederland.net
new file mode 100644
index 00000000..f8d50641
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Nederland.net
@@ -0,0 +1,28 @@
+# KDE Config File
+# Nederland.net werkt via wirehub
+# http://support.wirehub.net/cgi-bin/page/dialup.cgi?NetNr=*
+# http://support.wirehub.net/pub/dialup/servers
+ExDNSDisabled=0
+AutoDNS=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676090909
+IPAddr=0.0.0.0
+Domain=
+Name=Nederland.net
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.165.94.1,194.165.94.5
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Planet%032Internet%032Premium b/kppp/DB/Provider/Netherlands/Planet%032Internet%032Premium
new file mode 100644
index 00000000..9ebefa3b
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Planet%032Internet%032Premium
@@ -0,0 +1,28 @@
+# KDE Config File
+# http://web.planet.nl/klantenservice/helpdesk/serverinstellingen.html
+# http://web.planet.nl/klantenservice/helpdesk/inbelpunten.html
+#
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=1
+Phonenumber=0676003505
+IPAddr=0.0.0.0
+Domain=
+Name=Planet Internet Premium
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=195.121.1.34,195.121.1.66
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/Planet_Internet.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Planet%032Internet%032Standaard b/kppp/DB/Provider/Netherlands/Planet%032Internet%032Standaard
new file mode 100644
index 00000000..0bf82dc2
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Planet%032Internet%032Standaard
@@ -0,0 +1,28 @@
+# KDE Config File
+# http://web.planet.nl/klantenservice/helpdesk/serverinstellingen.html
+# http://web.planet.nl/klantenservice/helpdesk/inbelpunten.html
+#
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=1
+Phonenumber=0676002505
+IPAddr=0.0.0.0
+Domain=
+Name=Planet Internet Standaard
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=195.121.1.34,195.121.1.66
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/Planet_Internet.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Plant%032Acces b/kppp/DB/Provider/Netherlands/Plant%032Acces
new file mode 100644
index 00000000..add39379
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Plant%032Acces
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.plant.nl/instellingen/inbellen/win95/win95.asp
+#
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676044244
+IPAddr=0.0.0.0
+Domain=
+Name=Plant Acces
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=1
diff --git a/kppp/DB/Provider/Netherlands/Popin b/kppp/DB/Provider/Netherlands/Popin
new file mode 100644
index 00000000..23c8f341
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Popin
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.popin.nl/helpdeskinbel.htm
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0748507010
+IPAddr=0.0.0.0
+Domain=
+Name=Popin
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.229.143.15,194.229.143.5
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=0
diff --git a/kppp/DB/Provider/Netherlands/PublishNet b/kppp/DB/Provider/Netherlands/PublishNet
new file mode 100644
index 00000000..897f2abc
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/PublishNet
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.publishnet.nl/index.asp?button=access&keuze=inbelnummers
+# http://www.publishnet.nl/asp/access.asp?keuze=instellingen
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676000999
+IPAddr=0.0.0.0
+Domain=
+Name=PublishNet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=1 \ No newline at end of file
diff --git a/kppp/DB/Provider/Netherlands/Raketnet b/kppp/DB/Provider/Netherlands/Raketnet
new file mode 100644
index 00000000..e04216cf
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Raketnet
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.raketnet.nl/
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=1
+Phonenumber=0676050300
+IPAddr=0.0.0.0
+Domain=
+Name=Raketnet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Solcon b/kppp/DB/Provider/Netherlands/Solcon
new file mode 100644
index 00000000..bc7ac61a
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Solcon
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://helpdesk.solcon.net/faqonderdeel.php?Categorie=5
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676034583
+IPAddr=0.0.0.0
+Domain=
+Name=Solcon
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=212.45.33.3,212.45.32.3.
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=1
diff --git a/kppp/DB/Provider/Netherlands/Support%032Net b/kppp/DB/Provider/Netherlands/Support%032Net
new file mode 100644
index 00000000..63d4e831
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Support%032Net
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.support.nl/pagina/helpdesk/ipaddr.html
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=
+IPAddr=0.0.0.0
+Domain=
+Name=Support Net
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=195.114.231.200,195.114.230.254
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=0 \ No newline at end of file
diff --git a/kppp/DB/Provider/Netherlands/Telebyte b/kppp/DB/Provider/Netherlands/Telebyte
new file mode 100644
index 00000000..0984022e
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Telebyte
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://home.telebyte.nl/?op=help&sec_id=1
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=
+IPAddr=0.0.0.0
+Domain=
+Name=Telebyte Internet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=213.211.129.21,213.211.129.22
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=1 \ No newline at end of file
diff --git a/kppp/DB/Provider/Netherlands/Tiscali%032Compleet b/kppp/DB/Provider/Netherlands/Tiscali%032Compleet
new file mode 100644
index 00000000..85fecc88
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Tiscali%032Compleet
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://web.tiscali.nl/servicecentre/content/article.asp?id=571000
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676060001
+IPAddr=0.0.0.0
+Domain=
+Name=Tiscali Compleet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=195.241.48.33,195.241.49.33
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio_Nummervoordeel.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=0
diff --git a/kppp/DB/Provider/Netherlands/Tiscali%032Gratis b/kppp/DB/Provider/Netherlands/Tiscali%032Gratis
new file mode 100644
index 00000000..eef668e2
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Tiscali%032Gratis
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://web.tiscali.nl/servicecentre/content/article.asp?id=571000
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676060000
+IPAddr=0.0.0.0
+Domain=
+Name=Tiscali Compleet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=195.241.162.35,195.241.49.33
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=0
diff --git a/kppp/DB/Provider/Netherlands/UwNet b/kppp/DB/Provider/Netherlands/UwNet
new file mode 100644
index 00000000..5d2286f6
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/UwNet
@@ -0,0 +1,25 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=1
+Phonenumber=0676088053
+IPAddr=0.0.0.0
+Domain=
+Name=UwNet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=213.227.141.10,213.227.130.5
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Via%032Networks b/kppp/DB/Provider/Netherlands/Via%032Networks
new file mode 100644
index 00000000..98454fc4
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Via%032Networks
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.vianetworks.nl/helpdesk/eindhoven/info_inbelnummers_text.shtml?regio=0517&inbelnummer=06760+77111
+# http://www.vianetworks.nl/helpdesk/eindhoven/info_ip_text.shtml
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=
+IPAddr=0.0.0.0
+Domain=
+Name=Via Networks
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=212.61.15.8,212.61.25.226
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AutoDNS=0 \ No newline at end of file
diff --git a/kppp/DB/Provider/Netherlands/Wannadoo%032budget b/kppp/DB/Provider/Netherlands/Wannadoo%032budget
new file mode 100644
index 00000000..c9a217c4
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Wannadoo%032budget
@@ -0,0 +1,26 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=1
+Phonenumber=0676022207
+IPAddr=0.0.0.0
+Domain=
+Name=Wannadoo budget
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.134.5.55,194.134.5.5
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AccountingFile=/Netherlands/BelBasis_Regio_Nummervoordeel.rst
diff --git a/kppp/DB/Provider/Netherlands/Wannadoo%032budget%320plus b/kppp/DB/Provider/Netherlands/Wannadoo%032budget%320plus
new file mode 100644
index 00000000..12cfd6ed
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Wannadoo%032budget%320plus
@@ -0,0 +1,26 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=1
+Phonenumber=0676022208
+IPAddr=0.0.0.0
+Domain=
+Name=Wannadoo budget plus
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.134.5.55,194.134.5.5
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+AccountingFile=/Netherlands/Wannadoo_Budget_Plus.rst
diff --git a/kppp/DB/Provider/Netherlands/Wannadoo%032smartpack b/kppp/DB/Provider/Netherlands/Wannadoo%032smartpack
new file mode 100644
index 00000000..af94310e
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Wannadoo%032smartpack
@@ -0,0 +1,25 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=1
+Phonenumber=0676022201
+IPAddr=0.0.0.0
+Domain=
+Name=Wannadoo smartpack
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+DNS=194.134.5.55,194.134.5.5
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Wirehub b/kppp/DB/Provider/Netherlands/Wirehub
new file mode 100644
index 00000000..dadb6dbb
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Wirehub
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://support.wirehub.net/pub/win98/setuptxt
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+AutoDNS=0
+Phonenumber=0676090909
+IPAddr=0.0.0.0
+Domain=
+Name=WireHub
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=194.165.94.1,194.165.94.5
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/XS4All b/kppp/DB/Provider/Netherlands/XS4All
new file mode 100644
index 00000000..8781a54c
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/XS4All
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.xs4all.nl/helpdesk/besturingssysteem/linux/connectie/kde.html
+ExDNSDisabled=0
+AutoName=0
+AccountingEnabled=1
+AutoDNS=0
+Phonenumber=
+IPAddr=0.0.0.0
+Domain=
+Name=XS4All
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+Authentication=1
+DNS=194.109.6.66,194.109.9.99
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%
+ScriptCommands=Expect,Send,Expect,Send
diff --git a/kppp/DB/Provider/Netherlands/Zeelandnet b/kppp/DB/Provider/Netherlands/Zeelandnet
new file mode 100644
index 00000000..e452dcdd
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Zeelandnet
@@ -0,0 +1,27 @@
+# KDE Config File
+# http://www.zeelandnet.nl/helpdesk/index.php?page=4&grp=1&cat=7&faq_id=68
+# http://www.zeelandnet.nl/helpdesk/index.php?page=4&grp=1&cat=16&faq_id=56
+ExDNSDisabled=0
+AutoName=0
+AccountingEnabled=1
+AutoDNS=0
+Phonenumber=0676088954
+IPAddr=0.0.0.0
+Domain=
+Name=Zeelandnet
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+Authentication=4
+DNS=212.115.192.193,212.115.192.195
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
+ScriptArguments=
+ScriptCommands= \ No newline at end of file
diff --git a/kppp/DB/Provider/Netherlands/Zon%0322 b/kppp/DB/Provider/Netherlands/Zon%0322
new file mode 100644
index 00000000..81e7add5
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Zon%0322
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.zonnet.nl/helpdesk/0,1862,1523,00.html
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676000035
+IPAddr=0.0.0.0
+Domain=zonnet.nl
+Name=Zon2
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=62.58.50.5,62.58.50.6
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Zon%032Gratis b/kppp/DB/Provider/Netherlands/Zon%032Gratis
new file mode 100644
index 00000000..a35beac2
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Zon%032Gratis
@@ -0,0 +1,26 @@
+# KDE Config File
+# http://www.zonnet.nl/helpdesk/topic/0,1890,l43,00.html#43
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676075030
+IPAddr=0.0.0.0
+Domain=zonnet.nl
+Name=Zon Gratis
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=62.58.50.5,62.58.50.6
+SubnetMask=0.0.0.0
+AccountingFile=/Netherlands/BelBasis_Regio.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Netherlands/Zon%032Inclusief b/kppp/DB/Provider/Netherlands/Zon%032Inclusief
new file mode 100644
index 00000000..a7e163bd
--- /dev/null
+++ b/kppp/DB/Provider/Netherlands/Zon%032Inclusief
@@ -0,0 +1,25 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoDNS=1
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=0676001010
+IPAddr=0.0.0.0
+Domain=zonnet.nl
+Name=Zon Inclusief
+VolumeAccountingEnabled=1
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=62.58.50.5,62.58.50.6
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/New_Zealand/.directory b/kppp/DB/Provider/New_Zealand/.directory
new file mode 100644
index 00000000..bac00b6e
--- /dev/null
+++ b/kppp/DB/Provider/New_Zealand/.directory
@@ -0,0 +1,50 @@
+[Desktop Entry]
+Name=New Zealand
+Name[af]=Nuwe Seeland
+Name[ar]=Ų†ŲŠŲˆØēŲŠŲ„اŲ†ØŊا
+Name[az]=Yeni Zellandiya
+Name[bg]=НÐūÐēа ЗÐĩÐŧÐ°Ð―ÐīÐļŅ
+Name[br]=Zeland nevez
+Name[ca]=Nova Zelanda
+Name[cs]=NovÃ― ZÃĐland
+Name[cy]=Seland Newydd
+Name[de]=Neuseeland
+Name[el]=Νέα ΖηÎŧÎąÎ―ÎīÎŊÎą
+Name[eo]=Novzelando
+Name[es]=Nueva Zelanda
+Name[et]=Uus-Meremaa
+Name[fr]=Nouvelle-ZÃĐlande
+Name[ga]=An Nua-ShÃĐalainn
+Name[hi]=āĪĻāĨāĪŊāĨ‚āĪœāĨ€āĪēāĨˆāĪ‚āĪĄ
+Name[hr]=Novi Zeland
+Name[hu]=Új-ZÃĐland
+Name[id]=Selandia Baru
+Name[it]=Nuova Zelanda
+Name[ja]=ニãƒĨマã‚ļマãƒĐãƒģド
+Name[km]=នើវែលហ៊្សេឡង់
+Name[ko]=ë‰īė§ˆëž€ë“œ
+Name[lt]=Naujoji Zelandija
+Name[lv]=JaunZēlande
+Name[mk]=НÐūÐē ЗÐĩÐŧÐ°Ð―Ðī
+Name[mn]=ÐĻÐļÐ―Ņ ЗÐĩÐŧÐ°Ð―Ðī
+Name[nds]=Niegseeland
+Name[nl]=Nieuw Zeeland
+Name[pl]=Nowa Zelandia
+Name[pt]=Nova ZelÃĒndia
+Name[pt_BR]=Nova ZelÃĒndia
+Name[ru]=НÐūÐēаŅ ЗÐĩÐŧÐ°Ð―ÐīÐļŅ
+Name[se]=Ođđa ZealÃĄnda
+Name[sk]=NovÃ― ZÃĐland
+Name[sl]=Nova Zelandija
+Name[sr]=НÐūÐēÐļ ЗÐĩÐŧÐ°Ð―Ðī
+Name[sr@Latn]=Novi Zeland
+Name[sv]=Nya Zeeland
+Name[ta]=āŪĻāŪŋāŪŊāŊ‚āŪšāŪŋāŪēāŪūāŪĻāŊāŪĪāŊ
+Name[tg]=ЗÐĩÐŧÐ°Ð―ÐīÐļŅÐļ НаÐē
+Name[tr]=Yeni Zellanda
+Name[uk]=НÐūÐēа ЗÐĩÐŧÐ°Ð―ÐīŅ–Ņ
+Name[wa]=Nouve Zelande
+Name[zh_CN]=新čĨŋ兰
+Name[zh_HK]=įīčĨŋ蘭
+Name[zh_TW]=įīčĨŋ蘭
+Name[zu]=I-New Zealand
diff --git a/kppp/DB/Provider/New_Zealand/Makefile.am b/kppp/DB/Provider/New_Zealand/Makefile.am
new file mode 100644
index 00000000..c800b379
--- /dev/null
+++ b/kppp/DB/Provider/New_Zealand/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory Paradise Voyager XTRA OrconInternet ihug
+
+pkgdir = $(kde_datadir)/kppp/Provider/NewZealand
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/New_Zealand/OrconInternet b/kppp/DB/Provider/New_Zealand/OrconInternet
new file mode 100644
index 00000000..c5def85a
--- /dev/null
+++ b/kppp/DB/Provider/New_Zealand/OrconInternet
@@ -0,0 +1,25 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=
+AccountingEnabled=0
+Phonenumber=086755666
+IPAddr=0.0.0.0
+Name=Orcon Internet
+Domain=orcon.net.nz
+VolumeAccountingEnabled=0
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+SubnetMask=0.0.0.0
+DNS=210.55.12.1,210.55.12.2,
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
+
diff --git a/kppp/DB/Provider/New_Zealand/Paradise b/kppp/DB/Provider/New_Zealand/Paradise
new file mode 100644
index 00000000..7aebe0c9
--- /dev/null
+++ b/kppp/DB/Provider/New_Zealand/Paradise
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,word:,%PASSWORD%,ppp,
+AccountingEnabled=1
+Phonenumber=086727235
+IPAddr=0.0.0.0
+Name=paradise
+Domain=paradise.net.nz
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=203.96.152.4,203.96.152.12,
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/New_Zealand/Voyager b/kppp/DB/Provider/New_Zealand/Voyager
new file mode 100644
index 00000000..95f92284
--- /dev/null
+++ b/kppp/DB/Provider/New_Zealand/Voyager
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,word:,%PASSWORD%,ppp,
+AccountingEnabled=1
+Phonenumber=087300015
+IPAddr=0.0.0.0
+Name=voyager
+Domain=voyager.co.nz
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=203.21.30.124,203.21.30.125,
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/New_Zealand/XTRA b/kppp/DB/Provider/New_Zealand/XTRA
new file mode 100644
index 00000000..6192a1c7
--- /dev/null
+++ b/kppp/DB/Provider/New_Zealand/XTRA
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,word:,%PASSWORD%,ppp,
+AccountingEnabled=1
+Phonenumber=087303030
+IPAddr=0.0.0.0
+Name=xtra
+Domain=xtra.co.nz
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=202.27.184.3,202.27.184.5,
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/New_Zealand/ihug b/kppp/DB/Provider/New_Zealand/ihug
new file mode 100644
index 00000000..666cf01d
--- /dev/null
+++ b/kppp/DB/Provider/New_Zealand/ihug
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,word:,%PASSWORD%,ppp,
+AccountingEnabled=1
+Phonenumber=087300777
+IPAddr=0.0.0.0
+Name=ihug
+Domain=ihug.co.nz
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=203.109.252.42,203.109.252.43
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Norway/.directory b/kppp/DB/Provider/Norway/.directory
new file mode 100644
index 00000000..48b0c178
--- /dev/null
+++ b/kppp/DB/Provider/Norway/.directory
@@ -0,0 +1,53 @@
+[Desktop Entry]
+Name=Norway
+Name[af]=NoorweÃŦ
+Name[ar]=اŲ„Ų†ØąŲˆŲŠØŽ
+Name[az]=Norveç
+Name[bg]=НÐūŅ€ÐēÐĩÐģÐļŅ
+Name[br]=Norvegia
+Name[ca]=Noruega
+Name[cs]=Norsko
+Name[cy]=Norwy
+Name[da]=Norge
+Name[de]=Norwegen
+Name[el]=ΝÎŋρÎēηÎģÎŊÎą
+Name[eo]=Norvegio
+Name[es]=Noruega
+Name[et]=Norra
+Name[fo]=Norra
+Name[fr]=NorvÃĻge
+Name[ga]=An Iorua
+Name[hi]=āĪĻāĪūāĪ°āĨāĪĩāĨ‡
+Name[hr]=NorveÅĄka
+Name[hu]=NorvÃĐgia
+Name[id]=Norwegia
+Name[it]=Norvegia
+Name[ja]=ノãƒŦã‚Ķェマ
+Name[km]=ន័រវែស
+Name[ko]=ë…ļëĨīė›Ļėī
+Name[lt]=Norvegija
+Name[lv]=NorvēÄĢija
+Name[mk]=НÐūŅ€ÐēÐĩŅˆÐšÐ°
+Name[mn]=НÐūŅ€ÐēÐĩÐģÐļ
+Name[mt]=NorveÄĄja
+Name[nds]=Norwegen
+Name[nl]=Noorwegen
+Name[pl]=Norwegia
+Name[pt]=Noruega
+Name[pt_BR]=Noruega
+Name[ru]=НÐūŅ€ÐēÐĩÐģÐļŅ
+Name[se]=Norga
+Name[sk]=NÃģrsko
+Name[sl]=NorveÅĄka
+Name[sr]=НÐūŅ€ÐēÐĩŅˆÐšÐ°
+Name[sr@Latn]=NorveÅĄka
+Name[sv]=Norge
+Name[ta]=āŪĻāŪūāŪ°āŊāŪĩāŊ‡
+Name[tg]=НÐūŅ€ÐēÐĩÐģÓĢ
+Name[tr]=Norveç
+Name[uk]=НÐūŅ€ÐēÐĩÐģŅ–Ņ
+Name[wa]=Norvedje
+Name[zh_CN]=挊åĻ
+Name[zh_HK]=挊åĻ
+Name[zh_TW]=挊åĻ
+Name[zu]=I-Noweyi
diff --git a/kppp/DB/Provider/Norway/BGNett b/kppp/DB/Provider/Norway/BGNett
new file mode 100644
index 00000000..ac577ad5
--- /dev/null
+++ b/kppp/DB/Provider/Norway/BGNett
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=1
+ScriptArguments=ogin:,%USERNAME% ppp,assword:,%PASSWORD%,
+AccountingEnabled=0
+Phonenumber=55104290
+IPAddr=0.0.0.0
+Domain=bgnett.no
+Name=bgnett
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+BeforeDisconnect=
+Command=
+ScriptCommands=Expect,Send,Expect,Send,
+Authentication=0
+DNS=194.19.41.3,
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=194.19.41.1
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Norway/Institutt%032for%032informatikk b/kppp/DB/Provider/Norway/Institutt%032for%032informatikk
new file mode 100644
index 00000000..a8f022f6
--- /dev/null
+++ b/kppp/DB/Provider/Norway/Institutt%032for%032informatikk
@@ -0,0 +1,22 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=,username>,%USERNAME%,password>,%PASSWORD%,arrow keys:,7,
+AccountingEnabled=0
+Phonenumber=55584750
+IPAddr=0.0.0.0
+Domain=ii.uib.no
+Name=Institutt for informatikk
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Send,Expect,Send,Expect,Send,Expect,Send,
+Authentication=0
+DNS=129.177.16.3,129.177.19.6,
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Norway/Makefile.am b/kppp/DB/Provider/Norway/Makefile.am
new file mode 100644
index 00000000..1435d795
--- /dev/null
+++ b/kppp/DB/Provider/Norway/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory Institutt%032for%032informatikk BGNett
+
+pkgdir = $(kde_datadir)/kppp/Provider/Norway
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Portugal/.directory b/kppp/DB/Provider/Portugal/.directory
new file mode 100644
index 00000000..c0c00d27
--- /dev/null
+++ b/kppp/DB/Provider/Portugal/.directory
@@ -0,0 +1,34 @@
+[Desktop Entry]
+Name=Portugal
+Name[ar]=اŲ„ØĻØąØŠØšØ§Ų„
+Name[az]=Portuqaliya
+Name[bg]=ПÐūŅ€Ņ‚ŅƒÐģаÐŧÐļŅ
+Name[cs]=Portugalsko
+Name[cy]=Portiwgal
+Name[el]=ΠÎŋρτÎŋÎģÎąÎŧÎŊÎą
+Name[eo]=Portugalo
+Name[ga]=An PhortaingÃĐil
+Name[hi]=āĪŠāĨāĪ°āĨāĪĪāĪ—āĪūāĪē
+Name[hu]=PortugÃĄlia
+Name[it]=Portogallo
+Name[ja]=ポãƒŦトゎãƒŦ
+Name[km]=ព័រទážŧយហ្គážķល់
+Name[ko]=폎ëĨī툎갈
+Name[lt]=Portugalija
+Name[lv]=Portugāle
+Name[mk]=ПÐūŅ€Ņ‚ŅƒÐģаÐŧÐļŅ˜Ð°
+Name[mn]=ПÐūŅ€Ņ‚ŅƒÐģаÐŧÐļ
+Name[mt]=Portugall
+Name[pl]=Portugalia
+Name[ru]=ПÐūŅ€Ņ‚ŅƒÐģаÐŧÐļŅ
+Name[sk]=Portugalsko
+Name[sl]=Portugalska
+Name[sr]=ПÐūŅ€Ņ‚ŅƒÐģаÐŧ
+Name[ta]=āŪŠāŊ‹āŪ°āŊāŪšāŊāŪšāŊāŪ•āŪēāŊ
+Name[tg]=ПÐūŅ€Ņ‚ŅƒÐģаÐŧÐļŅ
+Name[tr]=Portekiz
+Name[uk]=ПÐūŅ€Ņ‚ŅƒÐģаÐŧŅ–Ņ
+Name[zh_CN]=葡萄į‰™
+Name[zh_HK]=葡萄į‰™
+Name[zh_TW]=葡萄į‰™
+Name[zu]=I-Phothugali
diff --git a/kppp/DB/Provider/Portugal/Clix b/kppp/DB/Provider/Portugal/Clix
new file mode 100644
index 00000000..44e437c2
--- /dev/null
+++ b/kppp/DB/Provider/Portugal/Clix
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,word:,%PASSWORD%,ppp,
+AccountingEnabled=1
+Phonenumber=679300000
+IPAddr=0.0.0.0
+Name=Clix
+Domain=clix.pt
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=194.79.69.222,194.79.69.129,
+AccountingFile=Portugal/PT_Local.rst
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Portugal/Makefile.am b/kppp/DB/Provider/Portugal/Makefile.am
new file mode 100644
index 00000000..57f3be9d
--- /dev/null
+++ b/kppp/DB/Provider/Portugal/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory OniNet Clix Netc
+
+pkgdir = $(kde_datadir)/kppp/Provider/Portugal
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Portugal/Netc b/kppp/DB/Provider/Portugal/Netc
new file mode 100644
index 00000000..69b16791
--- /dev/null
+++ b/kppp/DB/Provider/Portugal/Netc
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,word:,%PASSWORD%,ppp,
+AccountingEnabled=1
+Phonenumber=679190000
+IPAddr=0.0.0.0
+Name=Netc
+Domain=netc.pt
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=212.18.160.133,212.18.160.134,
+AccountingFile=Portugal/PT_Local.rst
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Portugal/OniNet b/kppp/DB/Provider/Portugal/OniNet
new file mode 100644
index 00000000..d8d498f3
--- /dev/null
+++ b/kppp/DB/Provider/Portugal/OniNet
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,word:,%PASSWORD%,ppp,
+AccountingEnabled=1
+Phonenumber=679595000
+IPAddr=0.0.0.0
+Name=OniNet
+Domain=oninet.pt
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=,
+AccountingFile=Portugal/PT_Local.rst
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Slovenia/.directory b/kppp/DB/Provider/Slovenia/.directory
new file mode 100644
index 00000000..01dc5247
--- /dev/null
+++ b/kppp/DB/Provider/Slovenia/.directory
@@ -0,0 +1,45 @@
+[Desktop Entry]
+Name=Slovenia
+Name[ar]=ØģŲ„ŲˆŲŲŠŲ†ŲŠØ§
+Name[az]=Sloveniya
+Name[bg]=ÐĄÐŧÐūÐēÐĩÐ―ÐļŅ
+Name[br]=Sloveni
+Name[ca]=EslovÃĻnia
+Name[cs]=Slovinsko
+Name[da]=Slovenien
+Name[de]=Slowenien
+Name[el]=ÎĢÎŧÎŋÎēÎĩÎ―ÎŊÎą
+Name[eo]=Slovenio
+Name[es]=Eslovenia
+Name[et]=Sloveenia
+Name[fr]=SlovÃĐnie
+Name[ga]=An tSlÃģivÃĐin
+Name[hi]=āĪļāĨāĪēāĨ‹āĪĩāĨ‡āĪĻāĪŋāĪŊāĪū
+Name[hr]=Slovenija
+Name[hu]=SzlovÃĐnia
+Name[ja]=ã‚đロベニã‚Ē
+Name[km]=ស្លើវ៉ážķនážļ
+Name[lt]=Slovėnija
+Name[lv]=Slovēnija
+Name[mk]=ÐĄÐŧÐūÐēÐĩÐ―ÐļŅ˜Ð°
+Name[mt]=Slovenja
+Name[nds]=Slowenien
+Name[nl]=SloveniÃŦ
+Name[pl]=Słowenia
+Name[pt]=EslovÃĐnia
+Name[pt_BR]=EslovÊnia
+Name[ru]=ÐĄÐŧÐūÐēÐĩÐ―ÐļŅ
+Name[sk]=Slovinsko
+Name[sl]=Slovenija
+Name[sr]=ÐĄÐŧÐūÐēÐĩÐ―ÐļŅ˜Ð°
+Name[sr@Latn]=Slovenija
+Name[sv]=Slovenien
+Name[ta]=āŪļāŊāŪēāŊ‹āŪĩāŊ†āŪĐāŪŋāŪŊāŪū
+Name[tg]=ÐĄÐŧÐūÐēÐĩÐ―ÐļŅ
+Name[tr]=Slovenya
+Name[uk]=ÐĄÐŧÐūÐēÐĩÐ―Ņ–Ņ
+Name[wa]=Esloveneye
+Name[zh_CN]=æ–Ŋæī›æ–‡å°žäšš
+Name[zh_TW]=æ–Ŋæī›äžå°žäšž
+Name[zu]=Isi-Sloveniya
+
diff --git a/kppp/DB/Provider/Slovenia/AmisNet b/kppp/DB/Provider/Slovenia/AmisNet
new file mode 100644
index 00000000..08e3a272
--- /dev/null
+++ b/kppp/DB/Provider/Slovenia/AmisNet
@@ -0,0 +1,27 @@
+# KDE Config File
+# $Id$
+# $Source$
+#
+Name=AmisNet
+AccountingEnabled=1
+AccountingFile=/Slovenia/omrezje_0889.rst
+Authentication=1
+AutoName=1
+AutoDNS=1
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=amis.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Password=%PASSWORD%
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=088932410
diff --git a/kppp/DB/Provider/Slovenia/Arnes b/kppp/DB/Provider/Slovenia/Arnes
new file mode 100644
index 00000000..96f18dc6
--- /dev/null
+++ b/kppp/DB/Provider/Slovenia/Arnes
@@ -0,0 +1,26 @@
+# KDE Config File
+# $Id$
+# $Source$
+#
+Name=Arnes
+AccountingEnabled=1
+AccountingFile=/Slovenia/omrezje_0889.rst
+Authentication=1
+AutoName=0
+Command=
+DNS=193.2.1.66
+DefaultRoute=1
+DisconnectCommand=
+Domain=arnes.si
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Password=%PASSWORD%
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=088932330
diff --git a/kppp/DB/Provider/Slovenia/Kiss b/kppp/DB/Provider/Slovenia/Kiss
new file mode 100644
index 00000000..a4bbbfae
--- /dev/null
+++ b/kppp/DB/Provider/Slovenia/Kiss
@@ -0,0 +1,26 @@
+# KDE Config File
+# $Id$
+# $Source$
+#
+Name=Kiss
+AccountingEnabled=1
+AccountingFile=/Slovenia/omrezje_0889.rst
+Authentication=1
+AutoName=0
+Command=
+DNS=193.2.98.10,193.2.98.11
+DefaultRoute=1
+DisconnectCommand=
+Domain=kiss.uni-lj.si
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Password=%PASSWORD%
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=088932520
diff --git a/kppp/DB/Provider/Slovenia/Makefile.am b/kppp/DB/Provider/Slovenia/Makefile.am
new file mode 100644
index 00000000..e4456458
--- /dev/null
+++ b/kppp/DB/Provider/Slovenia/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = AmisNet Arnes Kiss MojNet SiOL Volja
+
+pkgdir = $(kde_datadir)/kppp/Provider/Slovenia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Slovenia/MojNet b/kppp/DB/Provider/Slovenia/MojNet
new file mode 100644
index 00000000..a2890f98
--- /dev/null
+++ b/kppp/DB/Provider/Slovenia/MojNet
@@ -0,0 +1,27 @@
+# KDE Config File
+# $Id$
+# $Source$
+#
+Name=MojNet
+AccountingEnabled=1
+AccountingFile=/Slovenia/omrezje_0889.rst
+Authentication=1
+AutoName=0
+Command=
+DNS=
+AutoDNS=1
+DefaultRoute=1
+DisconnectCommand=
+Domain=moj.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Password=%PASSWORD%
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=088932440
diff --git a/kppp/DB/Provider/Slovenia/SiOL b/kppp/DB/Provider/Slovenia/SiOL
new file mode 100644
index 00000000..8f2eb3ea
--- /dev/null
+++ b/kppp/DB/Provider/Slovenia/SiOL
@@ -0,0 +1,26 @@
+# KDE Config File
+# $Id$
+# $Source$
+#
+Name=SiOL
+AccountingEnabled=1
+AccountingFile=/Slovenia/omrezje_0880.rst
+Authentication=1
+AutoName=0
+Command=
+DNS=193.189.160.11
+DefaultRoute=1
+DisconnectCommand=
+Domain=siol.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Password=%PASSWORD%
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=088032320
diff --git a/kppp/DB/Provider/Slovenia/Volja b/kppp/DB/Provider/Slovenia/Volja
new file mode 100644
index 00000000..e8926cf4
--- /dev/null
+++ b/kppp/DB/Provider/Slovenia/Volja
@@ -0,0 +1,27 @@
+# KDE Config File
+# $Id$
+# $Source$
+#
+Name=Volja
+AccountingEnabled=1
+AccountingFile=/Slovenia/omrezje_0889.rst
+Authentication=1
+AutoName=0
+Command=
+DNS=
+AutoDNS=1
+DefaultRoute=1
+DisconnectCommand=
+Domain=volja.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Password=%PASSWORD%
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=088932480
diff --git a/kppp/DB/Provider/Sweden/.directory b/kppp/DB/Provider/Sweden/.directory
new file mode 100644
index 00000000..9207acd5
--- /dev/null
+++ b/kppp/DB/Provider/Sweden/.directory
@@ -0,0 +1,51 @@
+[Desktop Entry]
+Name=Sweden
+Name[af]=Swede
+Name[ar]=اŲ„ØģŲˆŲŠØŊ
+Name[az]=İsveç
+Name[bg]=ÐĻÐēÐĩŅ†ÐļŅ
+Name[ca]=SuÃĻcia
+Name[cs]=Å vÃĐdsko
+Name[da]=Sverrige
+Name[de]=Schweden
+Name[el]=ÎĢÎŋυηÎīÎŊÎą
+Name[eo]=Svedio
+Name[es]=Suecia
+Name[et]=Rootsi
+Name[fo]=SvÃļriki
+Name[fr]=SuÃĻde
+Name[ga]=An tSualainn
+Name[hi]=āĪļāĨāĪĩāĨ€āĪĄāĪĻ
+Name[hr]=Å vedska
+Name[hu]=SvÃĐdorszÃĄg
+Name[id]=Swedia
+Name[it]=Svezia
+Name[ja]=ã‚đã‚Ķェマデãƒģ
+Name[km]=ស៊ážŧយážĒែត
+Name[ko]=ėŠĪė›Ļëī
+Name[lt]=Å vedija
+Name[lv]=Zviedrija
+Name[mk]=ÐĻÐēÐĩÐīŅÐšÐ°
+Name[mn]=ÐĻÐēÐĩÐī
+Name[mt]=Svezja
+Name[nl]=Zweden
+Name[pl]=Szwecja
+Name[pt]=SuÃĐcia
+Name[pt_BR]=SuÃĐcia
+Name[ru]=ÐĻÐēÐĩŅ†ÐļŅ
+Name[se]=Ruoŧŧa
+Name[sk]=Å vÃĐdsko
+Name[sl]=Å vedska
+Name[sr]=ÐĻÐēÐĩÐīŅÐšÐ°
+Name[sr@Latn]=Å vedska
+Name[sv]=Sverige
+Name[ta]=āŪšāŊāŪĩāŊ€āŪŸāŪĐāŊ
+Name[tg]=ÐĻÐēÐĩŅ‚ŅÐļŅ
+Name[tr]=İsveç
+Name[uk]=ÐĻÐēÐĩŅ†Ņ–Ņ
+Name[ven]=Swidene
+Name[wa]=Suwede
+Name[zh_CN]=į‘žå…ļ
+Name[zh_HK]=į‘žå…ļ
+Name[zh_TW]=į‘žå…ļ
+Name[zu]=Isi-Swideni
diff --git a/kppp/DB/Provider/Sweden/Makefile.am b/kppp/DB/Provider/Sweden/Makefile.am
new file mode 100644
index 00000000..0551cacd
--- /dev/null
+++ b/kppp/DB/Provider/Sweden/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory Utfors Tiscali
+
+pkgdir = $(kde_datadir)/kppp/Provider/Sweden
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Sweden/Tiscali b/kppp/DB/Provider/Sweden/Tiscali
new file mode 100644
index 00000000..1be1baa1
--- /dev/null
+++ b/kppp/DB/Provider/Sweden/Tiscali
@@ -0,0 +1,26 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=/Sweden/Tiscali.rst
+Authentication=1
+AutoDNS=0
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=213.204.128.170,213.204.128.171
+DefaultRoute=1
+DisconnectCommand=
+Domain=tiscali.se
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Tiscali
+Password=%PASSWORD%
+Phonenumber=0200785070
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/Sweden/Utfors b/kppp/DB/Provider/Sweden/Utfors
new file mode 100644
index 00000000..47cbd203
--- /dev/null
+++ b/kppp/DB/Provider/Sweden/Utfors
@@ -0,0 +1,26 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=/Sweden/Utfors.rst
+Authentication=3
+AutoDNS=0
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=195.58.103.124,195.58.103.18
+DefaultRoute=1
+DisconnectCommand=
+Domain=utfors.se
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=Utfors
+Password=%PASSWORD%
+Phonenumber=0200787878
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/Switzerland/.directory b/kppp/DB/Provider/Switzerland/.directory
new file mode 100644
index 00000000..ebbbd633
--- /dev/null
+++ b/kppp/DB/Provider/Switzerland/.directory
@@ -0,0 +1,48 @@
+[Desktop Entry]
+Name=Switzerland
+Name[ar]=ØģŲˆŲŠØģØąØ§
+Name[az]=İsveçrə
+Name[bg]=ÐĻÐēÐĩÐđŅ†Ð°Ņ€ÐļŅ
+Name[br]=Suis
+Name[ca]=SuÃŊssa
+Name[cs]=Å vÃ―carsko
+Name[cy]=Y Swistir
+Name[da]=Svejts
+Name[de]=Schweitz
+Name[el]=ΕÎŧÎēÎĩτÎŊÎą
+Name[eo]=Svislando
+Name[es]=Suiza
+Name[et]=Å veits
+Name[fr]=Suisse
+Name[ga]=An EilvÃĐis
+Name[hi]=āĪļāĨāĪĩāĪŋāĪŸāĨāĪœāĪ°āĪēāĨˆāĪ‚āĪĄ
+Name[hr]=Å vicarska
+Name[hu]=SvÃĄjc
+Name[id]=Swiss
+Name[it]=Svizzera
+Name[ja]=ã‚đã‚Īã‚đ
+Name[km]=ស្វ៊ážļស
+Name[lt]=Å veicarija
+Name[lv]=Å veice
+Name[mk]=ÐĻÐēаŅ˜Ņ†Ð°Ņ€ÐļŅ˜Ð°
+Name[mt]=Svizzera
+Name[nds]=Swiez
+Name[nl]=Zwitserland
+Name[pl]=Szwajcaria
+Name[pt]=Suíça
+Name[pt_BR]=Suíça
+Name[ru]=ÐĻÐēÐĩÐđŅ†Ð°Ņ€ÐļŅ
+Name[se]=Å veica
+Name[sk]=Švajčiarsko
+Name[sl]=Å vica
+Name[sr]=ÐĻÐēаŅ˜Ņ†Ð°Ņ€ŅÐšÐ°
+Name[sr@Latn]=Å vajcarska
+Name[sv]=Schweiz
+Name[ta]=āŪšāŊāŪĩāŪŋāŪŸāŊāŪšāŪ°āŊāŪēāŪūāŪĻāŊāŪĪāŊ
+Name[tg]=ÐĻÐēÐĩÐđŅ‚ŅÐ°Ņ€ÐļŅ
+Name[tr]=İsviçre
+Name[uk]=ÐĻÐēÐĩÐđŅ†Ð°Ņ€Ņ–Ņ
+Name[wa]=Swisse
+Name[zh_CN]=į‘žåĢŦ
+Name[zh_TW]=į‘žåĢŦ
+Name[zu]=I-Switzerland
diff --git a/kppp/DB/Provider/Switzerland/Bluewin b/kppp/DB/Provider/Switzerland/Bluewin
new file mode 100644
index 00000000..60ae44cb
--- /dev/null
+++ b/kppp/DB/Provider/Switzerland/Bluewin
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=10741 0840 840 222
+IPAddr=0.0.0.0
+Name=Bluewin
+Domain=bluewin.ch
+VolumeAccountingEnabled=0
+pppdArguments=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=4
+SubnetMask=0.0.0.0
+DNS=
+AccountingFile=/Switzerland/Swisscom_Surf.rst
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Switzerland/Makefile.am b/kppp/DB/Provider/Switzerland/Makefile.am
new file mode 100644
index 00000000..9cd4f016
--- /dev/null
+++ b/kppp/DB/Provider/Switzerland/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory Bluewin
+
+pkgdir = $(kde_datadir)/kppp/Provider/Switzerland
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Taiwan/.directory b/kppp/DB/Provider/Taiwan/.directory
new file mode 100644
index 00000000..809fd51e
--- /dev/null
+++ b/kppp/DB/Provider/Taiwan/.directory
@@ -0,0 +1,36 @@
+[Desktop Entry]
+Name=Taiwan
+Name[ar]=؊اŲŠŲˆØ§Ų†
+Name[az]=Tayvan
+Name[bg]=ÐĒаÐđÐēÐ°Ð―
+Name[el]=ÎĪÎąÏŠÎēÎŽÎ―
+Name[eo]=Tajvano
+Name[es]=TaiwÃĄn
+Name[fr]=TaÃŊwan
+Name[ga]=An TÃĐavÃĄin
+Name[hi]=āĪĪāĪūāĪˆāĪĩāĪūāĪĻ
+Name[hr]=Tajvan
+Name[hu]=Tajvan
+Name[ja]=台æđū
+Name[km]=តៃវ៉ážķន់
+Name[ko]=대만
+Name[lt]=Taivanis
+Name[lv]=Taivāna
+Name[mk]=ÐĒаŅ˜ÐēÐ°Ð―
+Name[mn]=ÐĒаÐđÐēÐ°Ð―ŅŒ
+Name[mt]=Tajwan
+Name[pl]=Tajwan
+Name[pt]=Formosa
+Name[ru]=ÐĒаÐđÐēÐ°Ð―ŅŒ
+Name[sk]=Tajvan
+Name[sl]=Tajvan
+Name[sr]=ÐĒаŅ˜ÐēÐ°Ð―
+Name[sr@Latn]=Tajvan
+Name[ta]=āŪĪāŪūāŪŊāŊāŪĩāŪūāŪĐāŊ
+Name[tg]=ÐĒаÐđÐēÐ°Ð―
+Name[tr]=Tayvan
+Name[uk]=ÐĒаÐđÐēÐ°Ð―ŅŒ
+Name[zh_CN]=äļ­å›―台æđū
+Name[zh_HK]=台įĢ
+Name[zh_TW]=台įĢ
+Name[zu]=I-Tayiwani
diff --git a/kppp/DB/Provider/Taiwan/EraNet b/kppp/DB/Provider/Taiwan/EraNet
new file mode 100644
index 00000000..2a8cb406
--- /dev/null
+++ b/kppp/DB/Provider/Taiwan/EraNet
@@ -0,0 +1,23 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=4126888
+IPAddr=0.0.0.0
+Domain=
+Name=EraNet
+VolumeAccountingEnabled=0
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=168.95.1.1
+SubnetMask=0.0.0.0
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Taiwan/HiNet b/kppp/DB/Provider/Taiwan/HiNet
new file mode 100644
index 00000000..23c32790
--- /dev/null
+++ b/kppp/DB/Provider/Taiwan/HiNet
@@ -0,0 +1,23 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=4125678
+IPAddr=0.0.0.0
+Domain=
+Name=HiNet
+VolumeAccountingEnabled=0
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=168.95.1.1
+SubnetMask=0.0.0.0
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Taiwan/Makefile.am b/kppp/DB/Provider/Taiwan/Makefile.am
new file mode 100644
index 00000000..9141ab8c
--- /dev/null
+++ b/kppp/DB/Provider/Taiwan/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory HiNet SeedNet EraNet
+
+pkgdir = $(kde_datadir)/kppp/Provider/Taiwan
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Taiwan/SeedNet b/kppp/DB/Provider/Taiwan/SeedNet
new file mode 100644
index 00000000..2a71f25b
--- /dev/null
+++ b/kppp/DB/Provider/Taiwan/SeedNet
@@ -0,0 +1,23 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=4123000
+IPAddr=0.0.0.0
+Domain=
+Name=SeedNet
+VolumeAccountingEnabled=0
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=168.95.1.1
+SubnetMask=0.0.0.0
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Ukraine/.directory b/kppp/DB/Provider/Ukraine/.directory
new file mode 100644
index 00000000..f9f7220a
--- /dev/null
+++ b/kppp/DB/Provider/Ukraine/.directory
@@ -0,0 +1,67 @@
+[Desktop Entry]
+Name=Ukraine
+Name[af]=UkraÃŊne
+Name[ar]=ØĢŲˆŲƒØąØ§Ų†ŲŠØ§
+Name[az]=Ukrayna
+Name[bg]=ÐĢКŅ€Ð°ÐđÐ―Ð°
+Name[br]=Ukraina
+Name[ca]=UcraÃŊna
+Name[cs]=Ukrajina
+Name[cy]=Wcrain
+Name[el]=ÎŸÏ…ÎšÏÎąÎ―ÎŊÎą
+Name[eo]=Ukrainio
+Name[es]=Ucrania
+Name[et]=Ukraina
+Name[ga]=An ÚcrÃĄin
+Name[hi]=āĪ‰āĪ•āĨāĪ°āĨ‡āĪĻ
+Name[hr]=Ukrajina
+Name[hu]=Ukrajna
+Name[id]=Ukraina
+Name[it]=Ucraina
+Name[ja]=ã‚Ķã‚ŊãƒĐã‚Īナ
+Name[km]=ážĒ៊ážŧយក្រែន
+Name[ko]=ėš°íŽëžėī나
+Name[lt]=Ukraina
+Name[lv]=Ukraina
+Name[mk]=ÐĢКŅ€Ð°ÐļÐ―Ð°
+Name[mn]=ÐĢКŅ€Ð°ÐļÐ―
+Name[mt]=Ukranja
+Name[nl]=OekraÃŊne
+Name[pl]=Ukraina
+Name[pt]=UcrÃĒnia
+Name[pt_BR]=UcrÃĒnia
+Name[ru]=ÐĢКŅ€Ð°ÐļÐ―Ð°
+Name[se]=Ukraina
+Name[sk]=Ukrajina
+Name[sl]=Ukrajina
+Name[sr]=ÐĢКŅ€Ð°Ņ˜ÐļÐ―Ð°
+Name[sr@Latn]=Ukrajina
+Name[sv]=Ukraina
+Name[ta]=āŪ‰āŪ•āŊāŪ°āŊ†āŪŊāŊāŪĐāŊ
+Name[tg]=ÐĢКŅ€Ð°ÐļÐ―Ð°
+Name[tr]=Ukrayna
+Name[uk]=ÐĢКŅ€Ð°Ņ—Ð―а
+Name[wa]=Ucrinne
+Name[zh_CN]=äđŒå…‹å…°
+Name[zh_HK]=įƒå…‹č˜­
+Name[zh_TW]=įƒå…‹č˜­
+Name[zu]=I-Ukraine
+Region=easteurope
+Languages=uk
+DecimalSymbol=,
+ThousandsSeparator=.
+CurrencySymbol=ÐģŅ€
+MonetaryDecimalSymbol=.
+MonetaryThousandsSeparator=$0 $0
+PositiveSign=
+NegativeSign=-
+FracDigits=2
+PositivePrefixCurrencySymbol=false
+NegativePrefixCurrencySymbol=false
+PositiveMonetarySignPosition=1
+NegativeMonetarySignPosition=1
+DateFormat[uk]=%a %d %b %Y
+DateFormat[ru]=%a %d %b %Y
+DateFormat[eo]=%A, la %ea de %B %Y
+DateFormatShort=%d.%m.%Y
+TimeFormat=%H:%M:%S
diff --git a/kppp/DB/Provider/Ukraine/Adamant b/kppp/DB/Provider/Ukraine/Adamant
new file mode 100644
index 00000000..3f1c4aee
--- /dev/null
+++ b/kppp/DB/Provider/Ukraine/Adamant
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=0
+Phonenumber=5667939,4595577
+IPAddr=0.0.0.0
+Domain=
+Name=Adamant
+VolumeAccountingEnabled=0
+pppdArguments=
+BeforeDisconnect=
+Password=%PASSWORD%
+Command=
+ScriptCommands=
+Authentication=1
+DNS=212.26.128.2,212.26.128.3,212.26.130.240
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/Ukraine/IPTelecom b/kppp/DB/Provider/Ukraine/IPTelecom
new file mode 100644
index 00000000..6376bba8
--- /dev/null
+++ b/kppp/DB/Provider/Ukraine/IPTelecom
@@ -0,0 +1,29 @@
+# KDE Config File
+[Account0]
+AccountingEnabled=1
+AccountingFile=/Ukraine/IPTelecom_hourly.rst
+Authentication=4
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=IPTelecom
+Password=%PASSWORD%
+Phonenumber=5333333:5722112:2388888:2382828:2449555
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+TotalBytes=0
+TotalCosts=0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/Ukraine/Makefile.am b/kppp/DB/Provider/Ukraine/Makefile.am
new file mode 100644
index 00000000..c8d33aa5
--- /dev/null
+++ b/kppp/DB/Provider/Ukraine/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = .directory Adamant IPTelecom NuVse
+
+pkgdir = $(kde_datadir)/kppp/Provider/Ukraine
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Ukraine/NuVse b/kppp/DB/Provider/Ukraine/NuVse
new file mode 100644
index 00000000..916b9cc5
--- /dev/null
+++ b/kppp/DB/Provider/Ukraine/NuVse
@@ -0,0 +1,27 @@
+[Account2]
+AccountingEnabled=0
+AccountingFile=/Ukraine/NuVse_hourly.rst
+Authentication=4
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DialPrefix=
+DisconnectCommand=
+Domain=
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=NuVse
+Password=
+Phonenumber=4674444
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/United_Kingdom/.directory b/kppp/DB/Provider/United_Kingdom/.directory
new file mode 100644
index 00000000..9c89ef42
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/.directory
@@ -0,0 +1,54 @@
+[Desktop Entry]
+Name=United Kingdom
+Name[af]=Vereenigde Koninkryk
+Name[ar]=اŲ„Ų…Ų…Ų„ŲƒØĐ Ø§Ų„Ų…؊حØŊØĐ
+Name[az]=Birləşmiş KrallÄąq
+Name[bg]=ÐžÐąÐĩÐīÐļÐ―ÐĩÐ―Ðū КŅ€Ð°ÐŧŅŅ‚ÐēÐū
+Name[br]=Rouantelezh Unanet
+Name[ca]=Regna Unit
+Name[cs]=SpojenÃĐ krÃĄlovství
+Name[cy]=Y Deyrnas Unedig
+Name[de]=Vereinigtes KÃķnigreich
+Name[el]=Î—Î―Ï‰ÎžÎ­Î―Îŋ Î’ÎąÏƒÎŊÎŧÎĩÎđÎŋ
+Name[eo]=Britio
+Name[es]=Reino Unido
+Name[et]=Suurbritannia
+Name[fo]=StÃģrabretland
+Name[fr]=Royaume-Uni
+Name[ga]=An Ríocht Aontaithe
+Name[hi]=āĪŊāĨ‚āĪĻāĪūāĪ‡āĪŸāĨ‡āĪĄ āĪ•āĪŋāĪ‚āĪ—āĪĄāĪŪ
+Name[hr]=Ujedinjeno Kraljevstvo
+Name[hu]=EgyesÞlt KirÃĄlysÃĄg
+Name[id]=Inggris
+Name[it]=Regno Unito
+Name[ja]=č‹ąå›―
+Name[km]=ចក្រភព​ážĒង់គ្លេស
+Name[ko]=ė˜ęĩ­
+Name[lt]=Jungtinė Karalystė
+Name[lv]=Apvienotā Karaliste
+Name[mk]=ВÐĩÐŧÐļКа БŅ€ÐļŅ‚Ð°Ð―ÐļŅ˜Ð°
+Name[mn]=ИŅ… ÐąŅ€ÐļŅ‚Ð°Ð―Ðļ
+Name[mt]=Renju Unit
+Name[nds]=Grootbritannien
+Name[nl]=Verenigd Koninkrijk
+Name[pl]=Wielka Brytania
+Name[pt]=Reino Unido
+Name[pt_BR]=Reino Unido
+Name[ru]=ВÐĩÐŧÐļКÐūÐąŅ€ÐļŅ‚Ð°Ð―ÐļŅ
+Name[se]=Stuorrabrittania
+Name[sk]=SpojenÃĐ krÃĄÄūovstvo
+Name[sl]=ZdruÅūeno Kraljestvo
+Name[sr]=ÐĢŅ˜ÐĩÐīÐļŅšÐĩÐ―Ðū КŅ€Ð°Ņ™ÐĩÐēŅŅ‚ÐēÐū
+Name[sr@Latn]=Ujedinjeno Kraljevstvo
+Name[sv]=Storbritannien
+Name[ta]=āŪāŪ•āŊāŪ•āŪŋāŪŊ āŪ‡āŪ°āŪūāŪœāŊāŪœāŪŋāŪŊāŪŪāŊ
+Name[tg]=ВÐĩÐŧÐļКÐūÐąŅ€ÐļŅ‚Ð°Ð―ÐļŅ
+Name[tr]=Ä°ngiltere
+Name[uk]=ВÐĩÐŧÐļКÐūÐąŅ€ÐļŅ‚Ð°Ð―Ņ–Ņ
+Name[ven]=Biritheini
+Name[wa]=RweyÃīme Uni
+Name[xh]=United Kingdom
+Name[zh_CN]=č‹ąå›―
+Name[zh_HK]=čŊ合įŽ‹åœ‹
+Name[zh_TW]=č‹ąåœ‹
+Name[zu]=United Kingdom (Ubukhosi obuhlangeneyo)
diff --git a/kppp/DB/Provider/United_Kingdom/Demon%032Green%0322120666 b/kppp/DB/Provider/United_Kingdom/Demon%032Green%0322120666
new file mode 100644
index 00000000..99fd8fca
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/Demon%032Green%0322120666
@@ -0,0 +1,23 @@
+# KDE Config File
+AutoName=0
+ExDNSDisabled=0
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,otocol:,ppp,
+AccountingEnabled=0
+Phonenumber=08452120666
+IPAddr=0.0.0.0
+Name=Demon Green 2120666
+Domain=demon.co.uk
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Expect,Send,
+Authentication=0
+SubnetMask=0.0.0.0
+DNS=158.152.1.43,158.152.1.58,
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+StorePassword=1
+Gateway=0.0.0.0
+DisconnectCommand=
diff --git a/kppp/DB/Provider/United_Kingdom/Demon%032Purple%0322121666 b/kppp/DB/Provider/United_Kingdom/Demon%032Purple%0322121666
new file mode 100644
index 00000000..859dd18c
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/Demon%032Purple%0322121666
@@ -0,0 +1,23 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,otocol:,ppp,
+AccountingEnabled=0
+Phonenumber=08452121666
+IPAddr=0.0.0.0
+Domain=demon.co.uk
+Name=Demon Purple 2121666
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Expect,Send,
+Authentication=0
+DNS=158.152.1.43,158.152.1.58,
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/United_Kingdom/Demon%032Red%0320798666 b/kppp/DB/Provider/United_Kingdom/Demon%032Red%0320798666
new file mode 100644
index 00000000..cd445230
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/Demon%032Red%0320798666
@@ -0,0 +1,23 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,otocol:,ppp,
+AccountingEnabled=0
+Phonenumber=08450798666
+IPAddr=0.0.0.0
+Domain=demon.co.uk
+Name=Demon Red 0798666
+VolumeAccountingEnabled=0
+pppdArguments=-detach,
+Password=%PASSWORD%
+Command=
+ScriptCommands=Expect,Send,Expect,Send,Expect,Send,
+Authentication=0
+DNS=158.152.1.43,158.152.1.58,
+SubnetMask=0.0.0.0
+AccountingFile=
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/United_Kingdom/FreeServe b/kppp/DB/Provider/United_Kingdom/FreeServe
new file mode 100644
index 00000000..594822c8
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/FreeServe
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=ogin:,,word:,,
+AccountingEnabled=1
+Phonenumber=08450796699
+IPAddr=0.0.0.0
+Domain=
+Name=FreeServe
+VolumeAccountingEnabled=0
+pppdArguments=
+Password=%PASSWORD%
+BeforeDisconnect=
+Command=
+ScriptCommands=Expect,ID,Expect,Password,
+Authentication=0
+DNS=195.92.177.3,
+SubnetMask=0.0.0.0
+AccountingFile=/England/BritishTelecom_Local.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/United_Kingdom/Makefile.am b/kppp/DB/Provider/United_Kingdom/Makefile.am
new file mode 100644
index 00000000..e7abf781
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/Makefile.am
@@ -0,0 +1,9 @@
+pkg_DATA = .directory FreeServe Demon%032Green%0322120666 Demon%032Purple%0322121666 \
+ Demon%032Red%0320798666 \
+ UK%032Free%032Software%032Network%032ISDN UKPOST%032ISDN \
+ UK%032Free%032Software%032Network%032Modem UKPOST%032Modem \
+ UTV
+
+pkgdir = $(kde_datadir)/kppp/Provider/United_Kingdom
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/United_Kingdom/UK%032Free%032Software%032Network%032ISDN b/kppp/DB/Provider/United_Kingdom/UK%032Free%032Software%032Network%032ISDN
new file mode 100644
index 00000000..054163bf
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/UK%032Free%032Software%032Network%032ISDN
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=08456651576
+IPAddr=0.0.0.0
+Domain=
+Name=UK Free Software Network ISDN
+VolumeAccountingEnabled=0
+pppdArguments=
+Password=%PASSWORD%
+BeforeDisconnect=
+Command=
+ScriptCommands=Expect,ID,Expect,Password,
+Authentication=1
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/England/BritishTelecom_Local.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/United_Kingdom/UK%032Free%032Software%032Network%032Modem b/kppp/DB/Provider/United_Kingdom/UK%032Free%032Software%032Network%032Modem
new file mode 100644
index 00000000..c5cebf23
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/UK%032Free%032Software%032Network%032Modem
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=08456651575
+IPAddr=0.0.0.0
+Domain=
+Name=UK Free Software Network Modem
+VolumeAccountingEnabled=0
+pppdArguments=
+Password=%PASSWORD%
+BeforeDisconnect=
+Command=
+ScriptCommands=Expect,ID,Expect,Password,
+Authentication=1
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/England/BritishTelecom_Local.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/United_Kingdom/UKPOST%032ISDN b/kppp/DB/Provider/United_Kingdom/UKPOST%032ISDN
new file mode 100644
index 00000000..c9456a4c
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/UKPOST%032ISDN
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=08456609011
+IPAddr=0.0.0.0
+Domain=
+Name=UKPOST.COM ISDN
+VolumeAccountingEnabled=0
+pppdArguments=
+Password=%PASSWORD%
+BeforeDisconnect=
+Command=
+ScriptCommands=Expect,ID,Expect,Password,
+Authentication=1
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/England/BritishTelecom_Local.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/United_Kingdom/UKPOST%032Modem b/kppp/DB/Provider/United_Kingdom/UKPOST%032Modem
new file mode 100644
index 00000000..3f07f0ed
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/UKPOST%032Modem
@@ -0,0 +1,24 @@
+# KDE Config File
+ExDNSDisabled=0
+AutoName=0
+ScriptArguments=
+AccountingEnabled=1
+Phonenumber=08456609010
+IPAddr=0.0.0.0
+Domain=
+Name=UKPOST.COM Modem
+VolumeAccountingEnabled=0
+pppdArguments=
+Password=%PASSWORD%
+BeforeDisconnect=
+Command=
+ScriptCommands=Expect,ID,Expect,Password,
+Authentication=1
+DNS=
+SubnetMask=0.0.0.0
+AccountingFile=/England/BritishTelecom_Local.rst
+DefaultRoute=1
+Username=%USERNAME%
+Gateway=0.0.0.0
+StorePassword=1
+DisconnectCommand=
diff --git a/kppp/DB/Provider/United_Kingdom/UTV b/kppp/DB/Provider/United_Kingdom/UTV
new file mode 100644
index 00000000..86e9752a
--- /dev/null
+++ b/kppp/DB/Provider/United_Kingdom/UTV
@@ -0,0 +1,26 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoDNS=1
+AutoName=0
+BeforeConnect=
+BeforeDisconnect=
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=UTVIP.com
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=UTVIP
+Password=%PASSWORD%
+Phonenumber=1893242242
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
diff --git a/kppp/DB/Provider/Yugoslavia/.directory b/kppp/DB/Provider/Yugoslavia/.directory
new file mode 100644
index 00000000..fe784846
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/.directory
@@ -0,0 +1,42 @@
+[Desktop Entry]
+Name=Yugoslavia
+Name[ar]=ŲŠŲˆØšŲˆØģŲ„اŲŲŠØ§
+Name[bg]=ÐŪÐģÐūŅÐŧаÐēÐļŅ
+Name[br]=Yougoslavi
+Name[ca]=Iugoslàvia
+Name[cs]=JugoslÃĄvie
+Name[cy]=Iwgoslavia
+Name[da]=Jugoslavien
+Name[de]=Jugoslawien
+Name[el]=ΓÎđÎŋυΚÎŋσÎŧÎąÎēÎŊÎą
+Name[eo]=Jugoslavio
+Name[et]=Jugoslaavia
+Name[fr]=Yougoslavie
+Name[ga]=An IÚgslaiv
+Name[hi]=āĪŊāĨ‚āĪ—āĨ‹āĪļāĨāĪēāĪūāĪĩāĪŋāĪŊāĪū
+Name[hr]=Jugoslavija
+Name[hu]=JugoszlÃĄvia
+Name[it]=Iugoslavia
+Name[ja]=ãƒĶマã‚īã‚đãƒĐビã‚Ē
+Name[km]=យើហ្គោស្លážķវážļ
+Name[lt]=Jugoslavija
+Name[mk]=ÐĄŅ€ÐąÐļŅ˜Ð° Ðļ ÐĶŅ€Ð―а ГÐūŅ€Ð°
+Name[nds]=Jugoslawien
+Name[nl]=JoegoslaviÃŦ
+Name[pl]=Jugosławia
+Name[pt]=JugoslÃĄvia
+Name[pt_BR]=IugoslÃĄvia
+Name[ru]=ÐŪÐģÐūŅÐŧаÐēÐļŅ
+Name[se]=Jugoslavia
+Name[sk]=JuhoslÃĄvia
+Name[sl]=Jugoslavija
+Name[sr]=ЈŅƒÐģÐūŅÐŧаÐēÐļŅ˜Ð°
+Name[sr@Latn]=Jugoslavija
+Name[sv]=Jugoslavien
+Name[ta]=āŪŊāŊāŪ•āŊ‹āŪļāŊāŪēāŊ‹āŪĩāŪŋāŪŊāŪū
+Name[tg]=ÐŪÐģÐūŅÐŧаÐēÐļŅ
+Name[tr]=Yugoslavya
+Name[uk]=ÐŪÐģÐūŅÐŧаÐēŅ–Ņ
+Name[wa]=Yougoslaveye
+Name[zh_CN]=南æ–Ŋ拉åĪŦ
+Name[zh_TW]=南æ–Ŋ拉åĪŦ
diff --git a/kppp/DB/Provider/Yugoslavia/041Net b/kppp/DB/Provider/Yugoslavia/041Net
new file mode 100644
index 00000000..7c465500
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/041Net
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=/Yugoslavia/041_9xx_xxx.rst
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=041Net
+Password=net
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=041
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=041910910
diff --git a/kppp/DB/Provider/Yugoslavia/BeoTelNet b/kppp/DB/Provider/Yugoslavia/BeoTelNet
new file mode 100644
index 00000000..18550f73
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/BeoTelNet
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.106.162.2,194.106.162.3,
+DefaultRoute=1
+DisconnectCommand=
+Domain=beotel.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=BeoTelNet
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3080000:3080022:3404222:3404555
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Bar.yu b/kppp/DB/Provider/Yugoslavia/CG.Bar.yu
new file mode 100644
index 00000000..e051a468
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Bar.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Bar
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=301010 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Berane.yu b/kppp/DB/Provider/Yugoslavia/CG.Berane.yu
new file mode 100644
index 00000000..14c498fa
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Berane.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Berane
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=134672 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/CG.BijeloPolje.CG.yu b/kppp/DB/Provider/Yugoslavia/CG.BijeloPolje.CG.yu
new file mode 100644
index 00000000..22dd274a
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.BijeloPolje.CG.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@BijeloPolje
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=34644 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Budva.yu b/kppp/DB/Provider/Yugoslavia/CG.Budva.yu
new file mode 100644
index 00000000..7f32e6b0
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Budva.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=Internet Crna Gora
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=9802 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Cetinje.yu b/kppp/DB/Provider/Yugoslavia/CG.Cetinje.yu
new file mode 100644
index 00000000..d7e10e2b
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Cetinje.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Cetinje
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=34444
diff --git a/kppp/DB/Provider/Yugoslavia/CG.HercegNovi.yu b/kppp/DB/Provider/Yugoslavia/CG.HercegNovi.yu
new file mode 100644
index 00000000..35d98acf
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.HercegNovi.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@HercegNovi
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=50000
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Kotor.yu b/kppp/DB/Provider/Yugoslavia/CG.Kotor.yu
new file mode 100644
index 00000000..cf559c4a
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Kotor.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Kotor
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=9802
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Niksic.yu b/kppp/DB/Provider/Yugoslavia/CG.Niksic.yu
new file mode 100644
index 00000000..6aa0d736
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Niksic.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Niksic
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=9802
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Pljevlja.yu b/kppp/DB/Provider/Yugoslavia/CG.Pljevlja.yu
new file mode 100644
index 00000000..66418512
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Pljevlja.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Pljevlja
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=274444
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Podgorica.yu b/kppp/DB/Provider/Yugoslavia/CG.Podgorica.yu
new file mode 100644
index 00000000..4cb9cee8
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Podgorica.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Podgorica
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=9802
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Tivat.yu b/kppp/DB/Provider/Yugoslavia/CG.Tivat.yu
new file mode 100644
index 00000000..a6c411ef
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Tivat.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Tivat
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=9802
diff --git a/kppp/DB/Provider/Yugoslavia/CG.Ulcinj.yu b/kppp/DB/Provider/Yugoslavia/CG.Ulcinj.yu
new file mode 100644
index 00000000..37c39e82
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.Ulcinj.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InternetCrnaGora@Ulcinj
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=9802
diff --git a/kppp/DB/Provider/Yugoslavia/CG.yu b/kppp/DB/Provider/Yugoslavia/CG.yu
new file mode 100644
index 00000000..520b69b1
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/CG.yu
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.66.160.1,195.66.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=cg.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=Internet Crna Gora
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=9802
diff --git a/kppp/DB/Provider/Yugoslavia/DrenikNet b/kppp/DB/Provider/Yugoslavia/DrenikNet
new file mode 100644
index 00000000..e45686c5
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/DrenikNet
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.252.112.5,
+DefaultRoute=1
+DisconnectCommand=
+Domain=drenik.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=DrenikNet
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3060600:3060615 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/EUnet@Full b/kppp/DB/Provider/Yugoslavia/EUnet@Full
new file mode 100644
index 00000000..10ca7eb0
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnet@Full
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Full
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3010101:3020202:3105050:184212:186444:2351600:3281249 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/EUnet@Lite b/kppp/DB/Provider/Yugoslavia/EUnet@Lite
new file mode 100644
index 00000000..18dd6ddc
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnet@Lite
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Lite
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%@lite,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3010101:3020202:3105050:184212:186444:2351600:3281249 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetBeograd b/kppp/DB/Provider/Yugoslavia/EUnetBeograd
new file mode 100644
index 00000000..4e50676d
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetBeograd
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Beograd
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3010101:3020202:3105050:184212:186444:2351600:3281249 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetCacak b/kppp/DB/Provider/Yugoslavia/EUnetCacak
new file mode 100644
index 00000000..364cde65
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetCacak
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Cacak
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=303030 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetKragujevac b/kppp/DB/Provider/Yugoslavia/EUnetKragujevac
new file mode 100644
index 00000000..71a5d90b
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetKragujevac
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Kragujevac
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=303777 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetNis b/kppp/DB/Provider/Yugoslavia/EUnetNis
new file mode 100644
index 00000000..c5e82510
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetNis
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Nis
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=528500
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetNoviSad b/kppp/DB/Provider/Yugoslavia/EUnetNoviSad
new file mode 100644
index 00000000..ad34549b
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetNoviSad
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@NoviSad
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=423333:623777:422008:4897777 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetPristina b/kppp/DB/Provider/Yugoslavia/EUnetPristina
new file mode 100644
index 00000000..1949890d
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetPristina
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Pristina
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=503010
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetS b/kppp/DB/Provider/Yugoslavia/EUnetS
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetS
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetSombor b/kppp/DB/Provider/Yugoslavia/EUnetSombor
new file mode 100644
index 00000000..079bcd65
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetSombor
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Sombor
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=463366 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/EUnetSubotica b/kppp/DB/Provider/Yugoslavia/EUnetSubotica
new file mode 100644
index 00000000..baf6b688
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/EUnetSubotica
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.247.192.33,194.247.192.1,
+DefaultRoute=1
+DisconnectCommand=
+Domain=eunet.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=EUnet@Subotica
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=620000:553311 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/InfoSKY b/kppp/DB/Provider/Yugoslavia/InfoSKY
new file mode 100644
index 00000000..4cea2c64
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/InfoSKY
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=195.250.98.5,
+DefaultRoute=1
+DisconnectCommand=
+Domain=infosky.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=InfoSky
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3020444 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/Makefile.am b/kppp/DB/Provider/Yugoslavia/Makefile.am
new file mode 100644
index 00000000..0255cceb
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/Makefile.am
@@ -0,0 +1,13 @@
+pkg_DATA = 041Net CG.Berane.yu CG.HercegNovi.yu CG.Podgorica.yu \
+ DrenikNet EUnetCacak EUnetPristina InfoSKY Sezampro \
+ CG.BijeloPolje.CG.yu CG.Kotor.yu CG.Tivat.yu \
+ EUnet@Full EUnetKragujevac VeratNet \
+ BeoTelNet CG.Budva.yu CG.Niksic.yu CG.Ulcinj.yu \
+ EUnet@Lite EUnetNis EUnetSombor PTT YUBCnet \
+ CG.Bar.yu CG.Cetinje.yu CG.Pljevlja.yu CG.yu \
+ TippNet SuOnline \
+ EUnetBeograd EUnetNoviSad EUnetSubotica SCnet
+
+pkgdir = $(kde_datadir)/kppp/Provider/Yugoslavia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/DB/Provider/Yugoslavia/PTT b/kppp/DB/Provider/Yugoslavia/PTT
new file mode 100644
index 00000000..2f04db8d
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/PTT
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=212.62.32.1,212.62.32.5,
+DefaultRoute=1
+DisconnectCommand=
+Domain=ptt.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=PTT net
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3013333:3023333:3063333:3219333 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/SCnet b/kppp/DB/Provider/Yugoslavia/SCnet
new file mode 100644
index 00000000..efb0258b
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/SCnet
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=net.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=SCnet
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3010141:3111641
diff --git a/kppp/DB/Provider/Yugoslavia/Sezampro b/kppp/DB/Provider/Yugoslavia/Sezampro
new file mode 100644
index 00000000..3b2bf90a
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/Sezampro
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=194.106.188.17,194.106.188.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=sezampro.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=Sezampro
+Password=%PASSWORD%
+ScriptArguments=rname:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3020234:3341451:186333:3222-592 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/SuOnline b/kppp/DB/Provider/Yugoslavia/SuOnline
new file mode 100644
index 00000000..89d5b90b
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/SuOnline
@@ -0,0 +1,24 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=/Yugoslavia/Lokalni_poziv.rst
+Authentication=1
+AutoDNS=1
+AutoName=0
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=suonline.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=SuOnline
+Password=%PASSWORD%
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=626400
diff --git a/kppp/DB/Provider/Yugoslavia/TippNet b/kppp/DB/Provider/Yugoslavia/TippNet
new file mode 100644
index 00000000..b1a915f2
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/TippNet
@@ -0,0 +1,24 @@
+# KDE Config File
+AccountingEnabled=1
+AccountingFile=/Yugoslavia/Lokalni_poziv.rst
+Authentication=1
+AutoDNS=1
+AutoName=0
+Command=
+DNS=
+DefaultRoute=1
+DisconnectCommand=
+Domain=tippnet.co.yu
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=0.0.0.0
+Name=TippNet
+Password=%PASSWORD%
+ScriptArguments=
+ScriptCommands=
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=654321
diff --git a/kppp/DB/Provider/Yugoslavia/VeratNet b/kppp/DB/Provider/Yugoslavia/VeratNet
new file mode 100644
index 00000000..ba775fc2
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/VeratNet
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=212.200.40.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=verat.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=VeratNet
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3060606 \ No newline at end of file
diff --git a/kppp/DB/Provider/Yugoslavia/YUBCnet b/kppp/DB/Provider/Yugoslavia/YUBCnet
new file mode 100644
index 00000000..3e9e3013
--- /dev/null
+++ b/kppp/DB/Provider/Yugoslavia/YUBCnet
@@ -0,0 +1,23 @@
+# KDE Config File
+AccountingEnabled=0
+AccountingFile=
+Authentication=1
+AutoName=0
+Command=
+DNS=212.124.160.1,212.124.160.2,
+DefaultRoute=1
+DisconnectCommand=
+Domain=yubc.net
+ExDNSDisabled=0
+Gateway=0.0.0.0
+IPAddr=%IPADDR%
+Name=YUBCnet
+Password=%PASSWORD%
+ScriptArguments=ogin:,%USERNAME%,assword:,%PASSWORD%,
+ScriptCommands=Expect,Send,Expect,Send,
+StorePassword=1
+SubnetMask=0.0.0.0
+Username=%USERNAME%
+VolumeAccountingEnabled=0
+pppdArguments=
+Phonenumber=3200700:3020280
diff --git a/kppp/HISTORY b/kppp/HISTORY
new file mode 100644
index 00000000..fe784cad
--- /dev/null
+++ b/kppp/HISTORY
@@ -0,0 +1,37 @@
+
+kppp History ( In particular it's relation to Ezppp )
+=====================================================
+
+kppp 1.4 Jul 1998
+
+Harri Porten and Mario Weilguni have taken over the further development
+of kppp.
+
+
+
+kppp 0.6 Nov 26 97:
+
+The data savings scheme has been switched over to to the use of KConfig.
+I consider kppp virtually free of any ezppp code. I challenge anyone
+who doubts this to verify my claim by doing a 'diff' on the sources.
+
+
+kppp 0.3 Tue Apr 22:
+
+With exception of the data savings scheme, which will follow next, kppp
+has almost completely been rewritten.
+
+kppp 0.2:
+
+kppp is based in part on ezppp beta 6, Copyright 1997 Jay Painter.
+I have tried to convince Jay to contribute his ezppp to the kde project.
+Jay responded by saying that he had no time to make this program
+suitable for the kde project. He added we should not hesitate to
+modify ezppp according to our tastes and merge it with the kde project.
+So I took ezppp, reworte most of the user interface and added many
+internal changes. We hope kppp will become a useful part of the KDE project.
+
+Bernd Wuebben
+wuebben@math.cornell.edu
+wuebben@kde.org
+
diff --git a/kppp/INSTALL b/kppp/INSTALL
new file mode 100644
index 00000000..a207c1e1
--- /dev/null
+++ b/kppp/INSTALL
@@ -0,0 +1,46 @@
+$Id$
+
+It is assumed that you have already successfully installed pppd.
+For more info see the PPP-HOWTO.
+
+INSTALLATION:
+
+./configure
+
+Now check the kppp/config.h file ( Linux users should be fine )
+then:
+
+make
+make install
+
+o If you run "make install" as root the kppp binary will be installed
+ setuid root. Otherwise you can do this on your own:
+ cd $(KDEDIR)/bin ; chown root kppp; chmod +s kppp. This might not
+ be absolutely necessary ( depending on the permissions
+ set on the modem device, /etc/resolv.conf etc. but if you can
+ afford to, this will make your life much easier.
+
+o if you can't give kppp setuid permission, here is the deal:
+ In order for kppp to be able to update /etc/resolv.conf,
+ /etc/ppp/pap-secrets or /etc/ppp/chap-secrets, respectively,
+ the users of kppp must have write permissions to these files
+ and of course the modem device. It's up to you to figure
+ the right permissions. ;-)
+
+o make sure that the pppd's option file which usually resides
+ in /etc/ppp/ exists, but is empty. pppd wants it to exist,
+ but we don't want pppd to take any options from it. kppp
+ will hand pppd the necessary options.
+
+o when you run kppp for the first time you need to create and
+ configure kppp for you ISP account. I hope kppp was written
+ so that you will have no difficutlies understanding the many
+ options offered. Please make use of the html help documentation
+ if you have questions.
+
+
+that's it,
+happy dialing!
+
+Bernd Wuebben Mario Weilguni Harri Porten
+wuebben@kde.org mweilguni@kde.org porten@kde.org
diff --git a/kppp/KPPPIface.h b/kppp/KPPPIface.h
new file mode 100644
index 00000000..2b5a6cb5
--- /dev/null
+++ b/kppp/KPPPIface.h
@@ -0,0 +1,39 @@
+#ifndef KPPPIFACE_H
+#define KPPPIFACE_H
+
+#include <dcopobject.h>
+
+/* IMPORTANT: when using the aboutToDisconnect signal bear in mind that
+
+ - if pppd dies, aboutToDisconnect will never be emitted because the
+ connection is already dead by the time kppp knows about it.
+ disconnected() will be emitted regardless of the cause of
+ disconnection.
+
+ - during a normal disconnection aboutToDisconnect will be emitted
+ shortly before disconnection, but in systems under heavy load there's
+ no warranty that the signal will be delivered to the applications
+ before the disconnection is performed. DCOP works this way,
+ sorry.
+
+*/
+
+class KpppIface : virtual public DCOPObject
+{
+ K_DCOP
+
+ k_dcop:
+ virtual void beginConnect() = 0;
+ virtual void disconnect() = 0;
+ virtual bool isConnected() const = 0;
+
+ k_dcop_signals:
+
+ void aboutToConnect();
+ void connected();
+ void aboutToDisconnect(); // see the note above
+ void disconnected();
+
+};
+
+#endif
diff --git a/kppp/Kppp.desktop b/kppp/Kppp.desktop
new file mode 100644
index 00000000..2cbe91c9
--- /dev/null
+++ b/kppp/Kppp.desktop
@@ -0,0 +1,70 @@
+[Desktop Entry]
+GenericName=Internet Dial-Up Tool
+GenericName[be]=ПŅ€Ð°ÐģŅ€Ð°ÐžÐ° зÐŧŅƒŅ‡ŅÐ―Ð―Ņ з Ð†Ð―Ņ‚ŅŅ€Ð―ŅŅ‚аО ÐŋŅ€Ð°Ð· ОаÐīŅÐž
+GenericName[bg]=ВКÐŧŅŽŅ‡ÐēÐ°Ð―Ðĩ Ðē Ð˜Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚
+GenericName[bn]=āĶ‡āĶĻā§āĶŸāĶūāĶ°āĶĻā§‡āĶŸ āĶĄāĶūā§ŸāĶūāĶē-āĶ†āĶŠ āĶļāĶ°āĶžā§āĶœāĶūāĶŪ
+GenericName[bs]=Program za spajanje na Internet
+GenericName[ca]=Eina per a la connexiÃģ telefÃēnica a Internet
+GenericName[cs]=Připojení přes vytÃĄÄenou linku
+GenericName[da]=Internet-opkaldsvÃĶrktÃļj
+GenericName[de]=Einwahl ins Internet
+GenericName[el]=ΕρÎģÎąÎŧÎĩÎŊÎŋ ÏƒÏÎ―ÎīÎĩσης Ξέσω τηÎŧÎĩÏ†ÏŽÎ―Îŋυ στÎŋ ÎīÎđÎąÎīÎŊΚτυÎŋ
+GenericName[eo]=Ilo por konekti al Interreto
+GenericName[es]=Herramienta de conexiÃģn telefÃģnica a Internet
+GenericName[et]=Sissehelistamine
+GenericName[eu]=Internet markatzaile tresna
+GenericName[fa]=اØĻØēØ§Øą ØīŲ…Ø§ØąŲ‡â€ŒÚŊÛŒØąÛŒ ایŲ†ØŠØąŲ†ØŠ
+GenericName[fi]=Internet-yhteyden soitto-ohjelma
+GenericName[fr]=Connexion internet par modem
+GenericName[ga]=Uirlis Diailithe Idirlín
+GenericName[gl]=Ferramenta de ConexiÃģn TelefÃģnica a Internet
+GenericName[he]=Ũ›ŨœŨ™ Ũ—Ũ™Ũ•Ũ’ ŨœŨŨ™Ũ Ũ˜ŨĻŨ Ũ˜
+GenericName[hr]=Program za spajanje na Internet
+GenericName[hu]=Internetes tÃĄrcsÃĄzÃģ
+GenericName[is]=Tengjast Netinu með upphringisambandi
+GenericName[it]=Strumento per la connessione telefonica ad Internet
+GenericName[ja]=ã‚Īãƒģã‚ŋマネットダã‚Īã‚ĒãƒŦã‚ĒップツマãƒŦ
+GenericName[ka]=ინáƒĒერნეáƒĒიქ Dial-Up áƒŪელსახყო
+GenericName[kk]=ÐĒÐĩÐŧÐĩŅ„ÐūÐ―ÐīŅ‹Ō› ÐķÐĩÐŧŅ– аŅ€Ō›Ņ‹ÐŧŅ‹ Ð˜Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚КÐĩ Ō›ÐūŅŅ‹ÐŧŅƒ Ō›ŌąŅ€Ð°ÐŧŅ‹
+GenericName[km]=ឧបករណ៍​ចើល​ដំណážūរកážķរ​ážĒ៊ážļនធរណិត តážķម​រយៈ​ទើរស័ព្ទ​លážū​តážŧ
+GenericName[lt]=Interneto skambinimo priemonė
+GenericName[mk]=АÐŧаŅ‚Ка за ÐŋÐūÐēŅ€Ð·ŅƒÐēаŅšÐĩ Ð―Ð° Ð˜Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚
+GenericName[nb]=VerktÃļy for oppringing til Internet
+GenericName[nds]=Internetinwahl-WarktÞÞch
+GenericName[ne]=āĪ‡āĪĻāĨāĪŸāĪ°āĪĻāĨ‡āĪŸ āĪĄāĪūāĪŊāĪē-āĪ…āĪŠ āĪ‰āĪŠāĪ•āĪ°āĪĢ
+GenericName[nl]=Inbelprogramma
+GenericName[nn]=VerktÃļy for Internett-oppringing
+GenericName[pl]=Narzędzie do łączenia telefonicznego z Internetem
+GenericName[pt]=Ferramenta de LigaçÃĢo à Internet
+GenericName[pt_BR]=Ferramenta de ConexÃĢo a Internet
+GenericName[ro]=Utilitar de conectare la Internet prin telefon
+GenericName[ru]=ПÐūÐīКÐŧŅŽŅ‡ÐĩÐ―ÐļÐĩ ÐŋÐū ÐīÐļаÐŧаÐŋŅƒ
+GenericName[sk]=Pripojenie na internet cez modem
+GenericName[sl]=Orodje za klicni priklop na internet
+GenericName[sr]=АÐŧаŅ‚ за ÐŋÐūÐēÐĩзÐļÐēаŅšÐĩ Ð―Ð° Ð˜Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚
+GenericName[sr@Latn]=Alat za povezivanje na Internet
+GenericName[sv]=Uppringningsverktyg fÃķr Internet
+GenericName[ta]=āŪ‡āŪĢāŊˆāŪŊ āŪ…āŪīāŊˆāŪŠāŊāŪŠāŊāŪ•āŊ āŪ•āŪ°āŊāŪĩāŪŋ
+GenericName[tg]=АŅÐąÐūÐą ÐąÐ°Ņ€ÐūÐļ Ð—Ð°Ð―ÐģÐ·Ð°Ð―ÓĢ ÐąÐ° Ð˜Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚
+GenericName[tr]=Çevirmeli Ağ AracÄą
+GenericName[uk]=ЗаŅŅ–Ðą ÐīÐūзÐēÐūÐ―Ņƒ Ðē Ð†Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚
+GenericName[zh_CN]=Internet æ‹Ļ号å·Ĩ具
+GenericName[zh_HK]=乒čŊįķēæ’Ĩ號å·Ĩ具
+GenericName[zh_TW]=Internet æ’Ĩ號å·Ĩ具
+Name=KPPP
+Name[af]=Kppp
+Name[bn]=āĶ•ā§‡-āĶŠāĶŋ-āĶŠāĶŋ-āĶŠāĶŋ
+Name[hi]=āĪ•āĨ‡āĪŠāĨ€āĪŠāĨ€āĪŠāĨ€
+Name[ne]=āĪ•āĨ‡ āĪŠāĨ€ āĪŠāĨ€ āĪŠāĨ€
+Name[sv]=Kppp
+Name[zh_TW]=KPPP æ’Ĩ號å·Ĩ具
+MimeType=
+DocPath=kppp/index.html
+Exec=kppp %i %m
+Icon=kppp
+Path=
+Type=Application
+Terminal=false
+X-KDE-StartupNotify=true
+X-DCOP-ServiceType=Multi
+Categories=Qt;KDE;Network;Dialup;
diff --git a/kppp/Makefile.am b/kppp/Makefile.am
new file mode 100644
index 00000000..4548f5f7
--- /dev/null
+++ b/kppp/Makefile.am
@@ -0,0 +1,153 @@
+# Yow Emacs, this is a -*- makefile -*-
+
+# if you use a variable *dir and have *_DATA, it will be installed by
+# make install
+xdg_apps_DATA = Kppp.desktop
+
+EXTRA_DIST = $(xdg_apps_DATA)
+
+# set the include path for X, qt and KDE
+INCLUDES= $(all_includes)
+# claim, which subdirectories you want to install
+SUBDIRS = pixmaps icons logview Rules DB
+
+# This one gets installed
+bin_PROGRAMS = kppp
+
+# Which sources should be compiled for kppp.
+kppp_SOURCES = kpppwidget.cpp \
+ general.cpp \
+ accounts.cpp \
+ connect.cpp \
+ conwindow.cpp \
+ debug.cpp \
+ edit.cpp \
+ iplined.cpp \
+ main.cpp \
+ modem.cpp \
+ modemcmds.cpp \
+ pppdargs.cpp \
+ pppdata.cpp \
+ scriptedit.cpp\
+ pwentry.cpp \
+ modeminfo.cpp\
+ pppstatdlg.cpp\
+ pppstats.cpp\
+ miniterm.cpp\
+ accounting.cpp \
+ acctselect.cpp\
+ ruleset.cpp \
+ docking.cpp \
+ runtests.cpp \
+ loginterm.cpp \
+ ppplog.cpp \
+ newwidget.cpp \
+ requester.cpp \
+ opener.cpp \
+ modemdb.cpp \
+ utils.cpp \
+ providerdb.cpp \
+ modems.cpp \
+ KPPPIface.skel
+
+# the library search path
+kppp_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+
+# the libraries to link against. Be aware of the order. First the libraries,
+# that depend on the following ones.
+kppp_LDADD = -lm $(LIB_KIO) $(LIB_KDEUI)
+
+# this option you can leave out. Just, if you use "make dist", you need it
+noinst_HEADERS = kpppwidget.h \
+ accounts.h \
+ kpppconfig.h \
+ connect.h \
+ conwindow.h \
+ debug.h \
+ edit.h \
+ general.h \
+ iplined.h \
+ main.h \
+ modem.h \
+ modemcmds.h \
+ pppdargs.h \
+ pppdata.h \
+ scriptedit.h\
+ pwentry.h \
+ modeminfo.h\
+ pppstatdlg.h\
+ miniterm.h\
+ accounting.h \
+ acctselect.h\
+ ruleset.h \
+ docking.h \
+ runtests.h \
+ loginterm.h \
+ auth.h \
+ version.h \
+ macros.h \
+ ppplog.h \
+ newwidget.h \
+ modemdb.h \
+ utils.h \
+ providerdb.h \
+ modems.h \
+ KPPPIface.h
+
+METASOURCES = accounting.moc \
+ accounts.moc \
+ acctselect.moc \
+ connect.moc \
+ conwindow.moc \
+ debug.moc \
+ docking.moc \
+ edit.moc \
+ general.moc \
+ loginterm.moc \
+ kpppwidget.moc \
+ miniterm.moc \
+ modem.moc \
+ modemcmds.moc \
+ modemdb.moc \
+ modeminfo.moc \
+ pppdargs.moc \
+ pppstatdlg.moc \
+ pppstats.moc \
+ pwentry.moc \
+ scriptedit.moc \
+ providerdb.moc \
+ modems.moc
+
+messages:
+ $(XGETTEXT) *.cpp -o $(podir)/kppp.pot
+
+# just install datas here. Use install-exec-data for scripts and etc.
+# the binary itself is already installed from automake
+# use mkinstalldirs, not "install -d"
+# don't install a list of file. Just one file per install.
+# if you have more of them, create a subdirectory with an extra Makefile
+install-data-local:
+ @echo ""
+ @echo "Don't forget to send me a phone tarif rules file for your"
+ @echo "telecom company/country/region. Thanks."
+ @echo ""
+ @echo "We will be maintaining an archive on the kppp page at"
+ @echo "http://devel-home.kde.org/~kppp/index.html"
+ @echo "WARNING: kppp is by default installed with SETUID bit on!"
+ @echo "If you are concerned about the SETUID bit, create a modem"
+ @echo "group instead."
+ @echo ""
+ @echo "Happy Dialing! -- the KPPP team"
+ @echo ""
+
+# kppp wants to be installed suid root
+install-exec-hook:
+ @(chown root $(DESTDIR)/$(bindir)/kppp && chmod 4755 $(DESTDIR)/$(bindir)/kppp) || echo "Was not able to make kppp setuid root"
+
+# remove ALL you have installed in install-data-local or install-exec-local
+#uninstall-local:
+# @(cd Rules && $(MAKE) uninstall)
+
+#distclean-local:
+# @(cd Rules && $(MAKE) distclean)
+
diff --git a/kppp/NEWS b/kppp/NEWS
new file mode 100644
index 00000000..c732f438
--- /dev/null
+++ b/kppp/NEWS
@@ -0,0 +1,28 @@
+Jul 13 1999:
+ * `Mode {7bit|8bit}' script command for CompuServe's 7E1 mode
+ * speed up in reading from the modem
+
+Jun 11 1999:
+ * detection of stale lock files works again
+ * "PPP support missing" warning is no longer fatal
+ * line termination defaults to CR instead of CR/LF
+
+Apr 10 1999:
+ * support for pppd 2.3.6 and 2.3.7
+ * solved crash on SuSE and Caldera systems
+ * eliminated most prominent cause for timeout errors
+ * should run on Alphas again
+ * `lock' in /etc/ppp/options is no longer in kppp's way
+
+Aug 21 1998:
+ * Syslog viewer
+ * graph showing transfer rates
+ * 'kppp -k' command line option
+
+May 12 1998:
+ * Multiple phone-numbers supported
+
+April 6 1998:
+ * Volume accounting
+ * /etc/kppp.allow file for superusers who want to have control
+ who may dial out
diff --git a/kppp/README b/kppp/README
new file mode 100644
index 00000000..c6c28d18
--- /dev/null
+++ b/kppp/README
@@ -0,0 +1,105 @@
+ kppp - a dialer for pppd
+
+kppp is a dialer and front end for pppd. It allows for interactive script
+generation and network connection setup.
+
+Version 0.7.1
+
+o New option to disable existing nameservers in /etc/resolv.conf
+
+o Looping, prompt and password dialogs in the scripting module
+
+This is version 0.5.9
+
+o a bunch of little fixes.
+
+This is version 0.5.8
+
+o all sorts of little fixes, in particular the 'Costs' file is
+ now generated again correctly
+
+
+New in Verions 0.5.6
+
+o configurable busy redial pause
+
+New in Verions 0.5.5
+
+o new copy function on the account dialog
+
+
+New in Verions 0.5.4
+
+o nothing new, sorry. Just bug fixes and work to get kppp to compile
+ with the new kdelibs and Qt 1.3
+
+New in Verions 0.5.3
+
+o option to not have kppp terminate the ppp connection on X-server exit
+o leaving the lockfile edit box empty will cause kppp not to create a
+ lockfile
+
+New in Verions 0.5.2
+
+o if the X-server exits, kppp will terminate in a controlled fashion:
+ accounting will be terminated
+ ppp connection will be terminated
+
+New in Version 0.5
+
+o Phone cost accounting
+o Configurable Modem Timeout
+o Configurable pppd Timeout
+o Dynamic Scripting Timeout
+o Optional Automatic configuration of host and domainname
+o modem device locking (Kppp should now work with mgetty)
+o domain name configuration
+o vastly improved documentation
+o bug fixes
+
+Special thank to Mario Weilguni and Jesus Fuentes Saavedra for their
+contributions towards kppp-0.5!!
+
+New in Version 0.4
+
+o Better Window Placement
+o KDE compliance -- Color Schemes etc.
+
+New in Verion 0.3:
+
+o mini-terminal: you no longer need a terminal communications program
+ such as minicom or seyon to setup and test you modem and isp connection.
+
+o Statistics Dialog: Ever wanted to know the number of bytes and packets
+ that leave and enter your ppp interface? A complete set of ppp statistics
+ together with your local and remote IP addresses are displayed on the
+ statistics dialog.
+
+o animation: Yes, you may trust your eyes!
+
+o ATI query dialog: Ever wanted to know what sort of modem you own or
+ use?
+
+o optional display of total time connected on the kppp icon
+
+o Much improved dialing and modem handling: kppp is now ROCK-SOLID on my
+ machine. I hope this will be the case for you too. If not please mail me
+ and describe the problems you are experiencing. Also, see the Makefile
+ for instructions on how to have kppp give you more debugging info.
+
+o Finally: kppp accepts commandline options! For the impatient, you
+ can have kppp start dialing immediately after start-up
+
+For full help functionality you need "kdehelp" from the kde project.
+For further info about kppp plese review the files in the docs
+directory. For installation instructions read INSTALL.
+There is still much to be done, however I believe you will find kppp
+very useful already !
+
+happy dialing !
+
+Bernd Wuebben
+
+wuebben@math.cornell.edu
+wuebben@kde.org
+
diff --git a/kppp/README.ModemDB b/kppp/README.ModemDB
new file mode 100644
index 00000000..448912c2
--- /dev/null
+++ b/kppp/README.ModemDB
@@ -0,0 +1,77 @@
+Modem Database
+==============
+
+The Modem Database (MD) will further simplify kppp by allowing the user to
+select a modem from a database. The MD will be organized by the name of the
+manufacturer. Each modem will only have those entries not common to the
+generic Hayes Modem command set. The following entries will be available
+(defaults in brackets):
+
+[Group]: Can be freely chosen, may not be "Common"
+Vendor: The modem vendor
+Name: The name of the modem, without vendor. Needed
+Parent: All settings of this modem are inherited. Parent works
+ recursive, so if the parent has another parent, this will
+ be inherited too and so on.
+Reset: This should reset the modem (ATZ)
+Init: The init string (AT V1 E1)
+Volume0: Volume off (ATL0)
+Volume1: Medium volume (ATL1)
+Volume2: Loud volume (ATL3)
+PreInitDelay: Delay after opening the modem, before sending the Init
+ command (50)
+PostInitDelay: Delay after sending the Init command (30)
+InitResponse: Modem response to the Init command (OK)
+BlindDialOn: To dial without waiting for line carrier (ATX3)
+BlindDialOff: Donīt dial without waiting for line carrier (ATX4)
+ToneDial: The command to dial out, number is appended (ATDT)
+PulseDial: The command to use impulse dialing (ATDP)
+ConnectResponse:The modems answer to "Dial" when connection is established
+BusyResponse: Response to a busy line (BUSY)
+NoCarrierResponse: Response when carrier was not establ. (NO CARRIER)
+NoDialTone: Response when no dial tone was found (NO DIALTONE)
+SupportsCD: Modem supports the "Modem asserts CD line" feature (1==yes)
+AutoAnswerOn: Turn on auto answer (for callback) (ATS0=1)
+AutoAnswerOff: Turn off auto answer ATS0=0
+
+If the name begins with "!", this is NOT shown in the modem list but can be
+taken as parent. Every modem initially inherits from "Common".
+
+Example:
+========
+
+[Common]
+Vendor=Generic
+Name=Hayes Compatible
+Reset=Z
+Init=ATV1
+Volume0=M0L0
+Volume1=M1L1
+Volume2=M1L3
+PreInitDelay=50
+PostInitDelay=30
+InitResponse=OK
+BlindDialOn=X3
+BlindDialOff=X4
+ToneDial=DT
+PulseDial=DP
+ConnectResponse=CONNECT
+BusyResponse=BUSY
+NoCarrierResponese=NO CARRIER
+NoDialTone=NO DIALTONE
+SupportsCD=true
+
+[!Zyxel Omni TA128]
+Vendor=Zyxel
+Name=Omni TA 128
+Reset=&F
+
+[Zyxel Omni TA128/X75]
+Parent=Zyxel Omni TA128
+Name=Zyxel Omni TA128/X75
+Init=B20 V1 E1
+
+[Zyxel Omni TA128/sync.PPP]
+Parent=!Zyxel Omni TA128
+Name=Zyxel Omni TA128/sync.PPP
+Init=B40 V1 E1
diff --git a/kppp/Rules/Argentina/Argentina_0610.rst b/kppp/Rules/Argentina/Argentina_0610.rst
new file mode 100644
index 00000000..70b558b1
--- /dev/null
+++ b/kppp/Rules/Argentina/Argentina_0610.rst
@@ -0,0 +1,26 @@
+################################################################
+#
+# This is the cost rule for Internet (0610) calls in Argentina,
+# if your carrier are Telecom or Telefonica, as of Sep.2000.
+#
+# Matías Alejo García
+# matiu00@yahoo.com
+################################################################
+
+name=Argentina_0610
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=$
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+default=(0.007865, 60)
+
+on (monday..friday) between (08:00..19:59) use (0.01573, 60)
+on (saturday) between (08:00..12:59) use (0.01573, 60)
+
diff --git a/kppp/Rules/Argentina/Argentina_Local.rst b/kppp/Rules/Argentina/Argentina_Local.rst
new file mode 100644
index 00000000..ad5c750d
--- /dev/null
+++ b/kppp/Rules/Argentina/Argentina_Local.rst
@@ -0,0 +1,26 @@
+################################################################
+#
+# This is the cost rule for Local calls in Argentina,
+# if your carrier are Telecom or Telefonica, as of Sep.2000.
+#
+# Matías Alejo García
+# matiu00@yahoo.com
+################################################################
+
+name=Argentina_local
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=$
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+default=(0.024, 120)
+
+on (monday..friday) between (08:00..19:59) use (0.012, 120)
+on (saturday) between (08:00..12:59) use (0.012, 120)
+
diff --git a/kppp/Rules/Argentina/Makefile.am b/kppp/Rules/Argentina/Makefile.am
new file mode 100644
index 00000000..173b70f3
--- /dev/null
+++ b/kppp/Rules/Argentina/Makefile.am
@@ -0,0 +1,8 @@
+pkg_DATA = Argentina_Local.rst Argentina_0610.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Argentina
+
+EXTRA_DIST = $(pkg_DATA)
+
+
+
diff --git a/kppp/Rules/Australia/Local.rst b/kppp/Rules/Australia/Local.rst
new file mode 100644
index 00000000..eb7b314f
--- /dev/null
+++ b/kppp/Rules/Australia/Local.rst
@@ -0,0 +1,18 @@
+###############################################################
+#
+# Australian Local Call Rate - Telstra
+#
+# created by Collin Baillie <gvlink@tropinet.com>
+#
+################################################################
+
+name=Australia_Local_Area
+currency_symbol=$
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+per_connection=0.25
+default=(0.0, 1)
diff --git a/kppp/Rules/Australia/Makefile.am b/kppp/Rules/Australia/Makefile.am
new file mode 100644
index 00000000..5b0ba2cb
--- /dev/null
+++ b/kppp/Rules/Australia/Makefile.am
@@ -0,0 +1,10 @@
+pkg_DATA = Optus_Residential.rst \
+ Local.rst \
+ STD_Zone_1_-_25-50_kms.rst \
+ STD_Zone_2_-_50-85_kms.rst \
+ STD_Zone_3_-_85-165_kms.rst \
+ STD_Zone_4_-_165+_kms.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Australia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Australia/Optus_Residential.rst b/kppp/Rules/Australia/Optus_Residential.rst
new file mode 100644
index 00000000..97fe9282
--- /dev/null
+++ b/kppp/Rules/Australia/Optus_Residential.rst
@@ -0,0 +1,132 @@
+################################################################
+#
+# This is a sample rule set for kppp. You can use it as a
+# template when you have to create your own ruleset. If you do
+# so, remove all comments and add your own. This will allow
+# other users to check your ruleset more easily.
+#
+# Please sign the the tarif file with your name an email address
+# so that I can contact you if necessary.
+#
+# NOTE: the rules in this rule set do not make much sense and
+# are only for demonstration purposes
+#
+# NOTE ON FILENAMES:
+# when you create your own ruleset, use "_" in filename
+# instead of spaces and use ".rst as extension
+# i.e. "Austria city calls"
+# --> file should be saved as "Austria_city_calls.rst"
+#
+# Thanks, Bernd Wuebben
+# wuebben@math.cornell.edu / wuebben@kde.org
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=default
+
+################################################################
+# currency settings
+################################################################
+
+# defines ATS (Austrian Schilling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ATS
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+
+# You pay .74 for the first 180 seconds ( 3 minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+flat_init_costs=(0.74,180)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.1, 72)
+
+#
+# more complicated rules:
+#
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+on () between () use (0.2, 2)
+
+# same as above
+on (monday..sunday) between () use (0.2, 2)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+on (monday..sunday) between (0:00..23:59) use (0.2, 2)
+
+# applies on friday, saturday, sunday and monday 8am until 1pm
+on (friday..monday) between (8:00..13:00) use(0.3,72)
+
+# ATTENTION:
+on(monday..friday) between (21:00..5:00) use (0.4,2)
+# does NOT include saturday 0:00-5:00, just monday..friday, as it says.
+
+# applies on a given date (christmas)
+on (12/25) between () use (0.3,72)
+
+# a range of dates and one weekday
+on (12/25..12/27, 12/31, 07/04, monday) between () use (0.4, 72)
+
+# use this for easter
+on (easter) between () use (0.3,72)
+
+# easter + 50 days (Pfingstmontag/ Pentecost Monday )
+on (easter+50) between () use (0.3,72)
+
+on (thursday) between (20:00..21:52) use (8.2, 1)
+
+
+# The "on()" rules above all relates to current time only. You can also
+# make a rule depend on the number of seconds you have been connected
+# by specifying this time as a third argument to "use()".
+# For instance, let's say normal rate in the evening is 0.20 per minute,
+# and it drops by 20% after one hour of connect time. This can be modelled
+# like:
+
+on () between (19:30..08:00) use (0.20, 60)
+on () between (19:30..08:00) use (0.16, 60, 3600)
+
+# Note that these rules, just like other rules, are sensitive to the
+# order in which they appear.
+
diff --git a/kppp/Rules/Australia/STD_Zone_1_-_25-50_kms.rst b/kppp/Rules/Australia/STD_Zone_1_-_25-50_kms.rst
new file mode 100644
index 00000000..fa86cd66
--- /dev/null
+++ b/kppp/Rules/Australia/STD_Zone_1_-_25-50_kms.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# Australian STD Zone 1 - Telstra
+#
+# created by Collin Baillie (gvlink@tropinet.com) 16 June 1999
+#
+################################################################
+name=STD_(25-50km)
+currency_symbol=$
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.15
+default=(0.09, 60)
+
+# more complicated rules:
+#
+on (monday..friday) between (07:00..12:59) use (0.09, 60)
+on (monday..friday) between (13:00..18:59) use (0.08, 60)
+on (monday..friday) between (19:00..06:59) use (0.05, 60)
+on (saturday..sunday) between () use (0.05, 60)
+
+# NOTE: The Australian carrier Telstra, actually has a special tarrif during
+# weekdays (Monday - Friday), from 7pm - 12 midnight, during which the normal
+# tarrif applies up to, but not exceeding $3.00. This feature doesn't seem
+# to be implimented with kppp yet.
diff --git a/kppp/Rules/Australia/STD_Zone_2_-_50-85_kms.rst b/kppp/Rules/Australia/STD_Zone_2_-_50-85_kms.rst
new file mode 100644
index 00000000..79906110
--- /dev/null
+++ b/kppp/Rules/Australia/STD_Zone_2_-_50-85_kms.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# Australian STD Zone 2 - Telstra
+#
+# created by Collin Baillie (gvlink@tropinet.com) 16 June 1999
+#
+################################################################
+name=STD_(50-85)
+currency_symbol=$
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.15
+default=(0.18, 60)
+
+# more complicated rules:
+#
+on (monday..friday) between (07:00..12:59) use (0.18, 60)
+on (monday..friday) between (13:00..18:59) use (0.16, 60)
+on (monday..friday) between (19:00..06:59) use (0.09, 60)
+on (saturday..sunday) between () use (0.09, 60)
+
+# NOTE: The Australian carrier Telstra, actually has a special tarrif during
+# weekdays (Monday - Friday), from 7pm - 12 midnight, during which the normal
+# tarrif applies up to, but not exceeding $3.00. This feature doesn't seem
+# to be implimented with kppp yet.
diff --git a/kppp/Rules/Australia/STD_Zone_3_-_85-165_kms.rst b/kppp/Rules/Australia/STD_Zone_3_-_85-165_kms.rst
new file mode 100644
index 00000000..4b97d343
--- /dev/null
+++ b/kppp/Rules/Australia/STD_Zone_3_-_85-165_kms.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# Australian STD Zone 3 - Telstra
+#
+# created by Collin Baillie (gvlink@tropinet.com) 16 June 1999
+#
+################################################################
+name=STD_(85-165km)
+currency_symbol=$
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.15
+default=(0.24, 60)
+
+# more complicated rules:
+#
+on (monday..friday) between (07:00..12:59) use (0.24, 60)
+on (monday..friday) between (13:00..18:59) use (0.22, 60)
+on (monday..friday) between (19:00..06:59) use (0.12, 60)
+on (saturday..sunday) between () use (0.12, 60)
+
+# NOTE: The Australian carrier Telstra, actually has a special tarrif during
+# weekdays (Monday - Friday), from 7pm - 12 midnight, during which the normal
+# tarrif applies up to, but not exceeding $3.00. This feature doesn't seem
+# to be implimented with kppp yet.
diff --git a/kppp/Rules/Australia/STD_Zone_4_-_165+_kms.rst b/kppp/Rules/Australia/STD_Zone_4_-_165+_kms.rst
new file mode 100644
index 00000000..73a91a35
--- /dev/null
+++ b/kppp/Rules/Australia/STD_Zone_4_-_165+_kms.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# Australian STD Zone 4 - Telstra
+#
+# created by Collin Baillie (gvlink@tropinet.com) 16 June 1999
+#
+################################################################
+name=STD_(165+km)
+currency_symbol=$
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.15
+default=(0.28, 60)
+
+# more complicated rules:
+#
+on (monday..friday) between (07:00..12:59) use (0.28, 60)
+on (monday..friday) between (13:00..18:59) use (0.25, 60)
+on (monday..friday) between (19:00..06:59) use (0.14, 60)
+on (saturday..sunday) between () use (0.14, 60)
+
+# NOTE: The Australian carrier Telstra, actually has a special tarrif during
+# weekdays (Monday - Friday), from 7pm - 12 midnight, during which the normal
+# tarrif applies up to, but not exceeding $3.00. This feature doesn't seem
+# to be implimented with kppp yet.
diff --git a/kppp/Rules/Austria/Business_1/Local.rst b/kppp/Rules/Austria/Business_1/Local.rst
new file mode 100644
index 00000000..020ed661
--- /dev/null
+++ b/kppp/Rules/Austria/Business_1/Local.rst
@@ -0,0 +1,19 @@
+################################################################
+#
+# Austria City rate ruleset
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+################################################################
+
+name=Austria_Local_Area
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(0.996, 158.4)
+
+# tagestarif
+on (monday..friday) between (08:00..18:00) use (0.996, 72)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (0.996, 158.4)
diff --git a/kppp/Rules/Austria/Business_1/Long_Distance.rst b/kppp/Rules/Austria/Business_1/Long_Distance.rst
new file mode 100644
index 00000000..1dccdcff
--- /dev/null
+++ b/kppp/Rules/Austria/Business_1/Long_Distance.rst
@@ -0,0 +1,19 @@
+################################################################
+#
+# Austria Zone 1 ruleset (50km - 200km)
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+################################################################
+
+name=Austria_Zone
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(0.996, 72)
+
+# tagestarif
+on (monday..friday) between (08:00..18:00) use (0.996, 25)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (0.996, 72)
diff --git a/kppp/Rules/Austria/Business_1/Makefile.am b/kppp/Rules/Austria/Business_1/Makefile.am
new file mode 100644
index 00000000..746d4552
--- /dev/null
+++ b/kppp/Rules/Austria/Business_1/Makefile.am
@@ -0,0 +1,7 @@
+rules_DATA = Local.rst \
+ Long_Distance.rst \
+ Online.rst
+
+rulesdir = $(kde_datadir)/kppp/Rules/Austria/Business_1
+
+EXTRA_DIST = $(rules_DATA)
diff --git a/kppp/Rules/Austria/Business_1/Online.rst b/kppp/Rules/Austria/Business_1/Online.rst
new file mode 100644
index 00000000..875008fe
--- /dev/null
+++ b/kppp/Rules/Austria/Business_1/Online.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# Austria City rate ruleset (special "online" numbers)
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+# Version 2
+# lt. österreichischer Post gelten an Feiertagen anders als auf der
+# PTA Homepage angekündigt der Spar- bzw. Superspartarif. Daher habe ich
+# einige der österreichischen Feiertage eingetragen. Sollte mir einer
+# entgangen sein, so bitte an mich melden.
+#
+# Sollte die Information nicht stimmen, so flames bitte an:
+# marketing@pta.at :-))
+#
+################################################################
+
+name=Austria_Online
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(0.996, 352)
+
+# tagestarif
+on (monday..friday) between (08:00..12:00) use (0.996, 120)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (0.996, 352)
+
+
diff --git a/kppp/Rules/Austria/Business_2/Local.rst b/kppp/Rules/Austria/Business_2/Local.rst
new file mode 100644
index 00000000..e2683524
--- /dev/null
+++ b/kppp/Rules/Austria/Business_2/Local.rst
@@ -0,0 +1,19 @@
+################################################################
+#
+# Austria City rate ruleset
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+################################################################
+
+name=Austria_Local_Area
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(0.936, 158.4)
+
+# tagestarif
+on (monday..friday) between (08:00..18:00) use (0.936, 72)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (0.936, 158.4)
diff --git a/kppp/Rules/Austria/Business_2/Long_Distance.rst b/kppp/Rules/Austria/Business_2/Long_Distance.rst
new file mode 100644
index 00000000..56569acb
--- /dev/null
+++ b/kppp/Rules/Austria/Business_2/Long_Distance.rst
@@ -0,0 +1,19 @@
+################################################################
+#
+# Austria Zone 1 ruleset (50km - 200km)
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+################################################################
+
+name=Austria_Zone
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(0.936, 72)
+
+# tagestarif
+on (monday..friday) between (08:00..18:00) use (0.936, 25)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (0.936, 72)
diff --git a/kppp/Rules/Austria/Business_2/Makefile.am b/kppp/Rules/Austria/Business_2/Makefile.am
new file mode 100644
index 00000000..48bcb9b9
--- /dev/null
+++ b/kppp/Rules/Austria/Business_2/Makefile.am
@@ -0,0 +1,7 @@
+rules_DATA = Local.rst \
+ Long_Distance.rst \
+ Online.rst
+
+rulesdir = $(kde_datadir)/kppp/Rules/Austria/Business_2
+
+EXTRA_DIST = $(rules_DATA)
diff --git a/kppp/Rules/Austria/Business_2/Online.rst b/kppp/Rules/Austria/Business_2/Online.rst
new file mode 100644
index 00000000..4b7ea752
--- /dev/null
+++ b/kppp/Rules/Austria/Business_2/Online.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# Austria City rate ruleset (special "online" numbers)
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+# Version 2
+# lt. österreichischer Post gelten an Feiertagen anders als auf der
+# PTA Homepage angekündigt der Spar- bzw. Superspartarif. Daher habe ich
+# einige der österreichischen Feiertage eingetragen. Sollte mir einer
+# entgangen sein, so bitte an mich melden.
+#
+# Sollte die Information nicht stimmen, so flames bitte an:
+# marketing@pta.at :-))
+#
+################################################################
+
+name=Austria_Online
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(0.936, 352)
+
+# tagestarif
+on (monday..friday) between (08:00..12:00) use (0.936, 120)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (0.936, 352)
+
+
diff --git a/kppp/Rules/Austria/Makefile.am b/kppp/Rules/Austria/Makefile.am
new file mode 100644
index 00000000..5da251d0
--- /dev/null
+++ b/kppp/Rules/Austria/Makefile.am
@@ -0,0 +1,6 @@
+SUBDIRS = Business_1 \
+ Business_2 \
+ Minimum \
+ Standard
+
+# Business_3
diff --git a/kppp/Rules/Austria/Minimum/Local.rst b/kppp/Rules/Austria/Minimum/Local.rst
new file mode 100644
index 00000000..13169fea
--- /dev/null
+++ b/kppp/Rules/Austria/Minimum/Local.rst
@@ -0,0 +1,19 @@
+################################################################
+#
+# Austria City rate ruleset
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+################################################################
+
+name=Austria_Local_Area
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(1.166, 158.4)
+
+# tagestarif
+on (monday..friday) between (08:00..18:00) use (1.116, 72)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (1.116, 158.4)
diff --git a/kppp/Rules/Austria/Minimum/Long_Distance.rst b/kppp/Rules/Austria/Minimum/Long_Distance.rst
new file mode 100644
index 00000000..0e7ab027
--- /dev/null
+++ b/kppp/Rules/Austria/Minimum/Long_Distance.rst
@@ -0,0 +1,19 @@
+################################################################
+#
+# Austria Zone 1 ruleset (50km - 200km)
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+################################################################
+
+name=Austria_Zone
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(1.116, 72)
+
+# tagestarif
+on (monday..friday) between (08:00..18:00) use (1.116, 25)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (1.116, 72)
diff --git a/kppp/Rules/Austria/Minimum/Makefile.am b/kppp/Rules/Austria/Minimum/Makefile.am
new file mode 100644
index 00000000..f44d49cd
--- /dev/null
+++ b/kppp/Rules/Austria/Minimum/Makefile.am
@@ -0,0 +1,7 @@
+rules_DATA = Local.rst \
+ Long_Distance.rst \
+ Online.rst
+
+rulesdir = $(kde_datadir)/kppp/Rules/Austria/Minimum
+
+EXTRA_DIST = $(rules_DATA)
diff --git a/kppp/Rules/Austria/Minimum/Online.rst b/kppp/Rules/Austria/Minimum/Online.rst
new file mode 100644
index 00000000..19a37dc5
--- /dev/null
+++ b/kppp/Rules/Austria/Minimum/Online.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# Austria City rate ruleset (special "online" numbers)
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+# Version 2
+# lt. österreichischer Post gelten an Feiertagen anders als auf der
+# PTA Homepage angekündigt der Spar- bzw. Superspartarif. Daher habe ich
+# einige der österreichischen Feiertage eingetragen. Sollte mir einer
+# entgangen sein, so bitte an mich melden.
+#
+# Sollte die Information nicht stimmen, so flames bitte an:
+# marketing@pta.at :-))
+#
+################################################################
+
+name=Austria_Online
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(1.116, 352)
+
+# tagestarif
+on (monday..friday) between (08:00..12:00) use (1.116, 120)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (1.116, 352)
+
+
diff --git a/kppp/Rules/Austria/Standard/Local.rst b/kppp/Rules/Austria/Standard/Local.rst
new file mode 100644
index 00000000..d7016382
--- /dev/null
+++ b/kppp/Rules/Austria/Standard/Local.rst
@@ -0,0 +1,19 @@
+################################################################
+#
+# Austria City rate ruleset
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+################################################################
+
+name=Austria_Local_Area
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(1.056, 158.4)
+
+# tagestarif
+on (monday..friday) between (08:00..18:00) use (1.056, 72)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (1.056, 158.4)
diff --git a/kppp/Rules/Austria/Standard/Long_Distance.rst b/kppp/Rules/Austria/Standard/Long_Distance.rst
new file mode 100644
index 00000000..6ed51595
--- /dev/null
+++ b/kppp/Rules/Austria/Standard/Long_Distance.rst
@@ -0,0 +1,19 @@
+################################################################
+#
+# Austria Zone 1 ruleset (50km - 200km)
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+################################################################
+
+name=Austria_Zone
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(1.056, 72)
+
+# tagestarif
+on (monday..friday) between (08:00..18:00) use (1.056, 25)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (1.056, 72)
diff --git a/kppp/Rules/Austria/Standard/Makefile.am b/kppp/Rules/Austria/Standard/Makefile.am
new file mode 100644
index 00000000..21e48856
--- /dev/null
+++ b/kppp/Rules/Austria/Standard/Makefile.am
@@ -0,0 +1,8 @@
+rules_DATA = Local.rst \
+ Long_Distance.rst \
+ Online.rst \
+ UTA_easyinternet.rst
+
+rulesdir = $(kde_datadir)/kppp/Rules/Austria/Standard
+
+EXTRA_DIST = $(rules_DATA)
diff --git a/kppp/Rules/Austria/Standard/Online.rst b/kppp/Rules/Austria/Standard/Online.rst
new file mode 100644
index 00000000..35621a02
--- /dev/null
+++ b/kppp/Rules/Austria/Standard/Online.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# Austria City rate ruleset (special "online" numbers)
+#
+# created by Mario Weilguni <mweilguni@sime.com>
+#
+# Version 2
+# lt. österreichischer Post gelten an Feiertagen anders als auf der
+# PTA Homepage angekündigt der Spar- bzw. Superspartarif. Daher habe ich
+# einige der österreichischen Feiertage eingetragen. Sollte mir einer
+# entgangen sein, so bitte an mich melden.
+#
+# Sollte die Information nicht stimmen, so flames bitte an:
+# marketing@pta.at :-))
+#
+################################################################
+
+name=Austria_Online
+currency_symbol=ATS
+currency_position=right
+currency_digits=2
+default=(1.056, 352)
+
+# tagestarif
+on (monday..friday) between (08:00..12:00) use (1.056, 120)
+
+# Feiertage
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (1.056, 352)
+
+
diff --git a/kppp/Rules/Austria/Standard/UTA_easyinternet.rst b/kppp/Rules/Austria/Standard/UTA_easyinternet.rst
new file mode 100644
index 00000000..956933b9
--- /dev/null
+++ b/kppp/Rules/Austria/Standard/UTA_easyinternet.rst
@@ -0,0 +1,50 @@
+############################################################################
+# #
+# Ruleset for UTA Easyinternet #
+# (also applyable for the UTA Internet Unlimited, but I'm an #
+# Easyinternet customer = no basic fee ;-)) #
+# Created on August 26, 2000 according to the latest UTA tarifs #
+# by Patrick Eixelsberger (pat.eix@utanet.at) #
+# #
+# (All following comments are German, because IMHO only Austrians #
+# will be interested in this file and I'm too lazy for English #
+# now ;-) ) #
+# #
+############################################################################
+
+
+name=UTA Easyinternet
+
+# Währungssymbol= ATS für österreichische Schillinge
+# Bitte ändern, wenn der EURO da ist ;-)
+currency_symbol=ATS
+
+currency_position=right
+
+currency_digits=2
+
+per_connection=0.0
+
+minimum_costs=0.0
+
+
+# = Geschäftstarif: ATS 0.33 pro Minute, aber mit sekundengenauer
+# Abrechnung, daher wird jede Sekunde um ATS 0.0055 weitergezählt
+default=(0.0055, 1)
+
+
+# = Freizeittarif: ATS 0.16 pro Minute, aber mit sekundengenauer Abrechnung,
+# daher wird jede Sekunde um ATS 0.002667 weitergezählt
+# Freizeit = Montag-Freitag 18:00-8:00,
+# Samstag 0:00-23:59
+# Sonntag 0:00-23:59
+on (monday..friday) between (18:00..8:00) use (0.002667, 1)
+on (saturday..sunday) between (0:00..23:59) use (0.002667, 1)
+
+# Feiertage, übernommen aus
+# $KDEDIR/share/apps/kppp/Rules/Austria/Standard/Online.rst
+# (von Mario Weilguni <mweilguni@sime.com>)
+on (5/1,12/25,12/26,11/1,easter+1,easter+39,easter+50,1/1,10/26,1/6,12/8) between (00:00..23:59) use (0.002667, 1)
+
+# = wiederum Freizeittarif, siehe oben
+
diff --git a/kppp/Rules/Bangladesh/ATT00007.rst b/kppp/Rules/Bangladesh/ATT00007.rst
new file mode 100644
index 00000000..60af4362
--- /dev/null
+++ b/kppp/Rules/Bangladesh/ATT00007.rst
@@ -0,0 +1,63 @@
+################################################################
+#
+# This RULESET is based on the TEMPLATE file found in
+# /usr/share/apps/kppp/Rules written by
+# Bernd Wuebben
+# wuebben@math.cornell.edu / wuebben@kde.org
+#
+################################################################
+
+
+################################################################
+#
+# Agni Systems Limited, Dhaka, Bangladesh (helpdesk@agni.com)
+#
+################################################################
+name=agni
+
+################################################################
+# currency settings
+################################################################
+
+
+currency_symbol=Tk
+
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+# VAT (15%) is included
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# Local call charge (T&T)
+per_connection=1.7
+
+minimum_costs=0.0
+
+# This is the default rule which is used when no other rule
+# applies. The first component "1.15" is the price of one
+# "unit", while "60" is the duration in seconds. It is here
+# only for *.rst file compatibilty.
+default=(1.15, 60)
+
+#
+# THE RULES
+#
+
+# AGNI Systems( http://www.agni.net ) VAT (15%) included
+on (friday) between (0:00..23:59) use (1.15, 60)
+on (saturday..thursday) between (0:00..7:59) use (1.15, 60)
+on (saturday..thursday) between (8:00..17:59) use (2.87, 60)
+on (saturday..thursday) between (18:00..23:59) use (2.3, 60)
+
+#This rules file was written by Ionmon247 sas@startrekmail.com
diff --git a/kppp/Rules/Bangladesh/ATT00010.rst b/kppp/Rules/Bangladesh/ATT00010.rst
new file mode 100644
index 00000000..a3ea71e6
--- /dev/null
+++ b/kppp/Rules/Bangladesh/ATT00010.rst
@@ -0,0 +1,59 @@
+################################################################
+#
+# This ruleset is based on /usr/share/apps/kppp/Rules/TEMPLATE
+# written by
+# wuebben@math.cornell.edu / wuebben@kde.org
+################################################################
+
+
+################################################################
+#
+# Bangladesh Telephone and Telegraph Board
+#
+################################################################
+name=BTTB_Dhaka
+
+################################################################
+# currency settings
+################################################################
+
+# Vurrency symbol for taka
+currency_symbol=Tk
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+
+per_connection=1.7
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+default=(1, 60)
+
+#VAT (15%) INCLUDED
+
+on () between (00:00..05:59) use (0.57, 1)
+on () between (06:00..21:59) use (1.15, 1)
+on () between (22:00..23:59) use (0.57, 1)
+
+#This RST file is written by sas@startrekmail.com
diff --git a/kppp/Rules/Bangladesh/Makefile.am b/kppp/Rules/Bangladesh/Makefile.am
new file mode 100644
index 00000000..27393ea1
--- /dev/null
+++ b/kppp/Rules/Bangladesh/Makefile.am
@@ -0,0 +1,6 @@
+pkg_DATA = ATT00007.rst \
+ ATT00010.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Bangladesh
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Belgium/Belgium_internet_euro.rst b/kppp/Rules/Belgium/Belgium_internet_euro.rst
new file mode 100644
index 00000000..443ff9d3
--- /dev/null
+++ b/kppp/Rules/Belgium/Belgium_internet_euro.rst
@@ -0,0 +1,83 @@
+##########################################################################
+# Ruleset file for the Belgium Internet calls from Belgacom
+# Thers rules apply on on may 23 2001
+#
+# Rules:
+# - Peak hours: 08:00 -> 18:00.
+# - Off-peak : the rest + national holidays.
+# - Entry costs are 2 BEF = 0.0496 EUR
+# - Off-Peak: 40BEF/hour = 0.67 BEF/min = 0.0166 EUR
+# - Peak: 100BEF/hour= 1.67 BEF/min = 0.0414 EUR
+#
+# This file uses EURO as currency unit. The EURO will replace the
+# Belgian Frank as of Januari 1st, 2002
+#
+# Philippe.Faes@rug.ac.be
+# (after the summer of 2003 this addres might have expired, try one of the
+# following: Philippe.Faes@faesvideo.be or Philippe.Faes@faes.net)
+#
+# Thanks to Guy Zelck <guy.zelck@eds.com> for letting me use his 1998 version
+# of this file as a template.
+#########################################################################
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+name=Belgium_internet_euro
+
+################################################################
+# currency settings
+################################################################
+
+# define BEF (Begische Frank) to be used as currency
+currency_symbol=EUR
+
+# Position of the currency symbol, default is "right".
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=4
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# I did the rounding as precise as I thought was nescessary, however
+# I don't know the official rates in EURO from Belgacom.
+# I'm affraid this will be resolved pretty soon, cuz Belgacom always
+# raises its rates anyway.
+# (I just like to say HI to all those smart people using Telenet or ADSL)
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0496
+
+
+# Minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+# Let's take the off-peak hour rate as the default.
+default=(0.0166,60)
+
+
+# Peak hours.
+on (monday..friday) between (08:00..18:00) use (0.0414,60)
+
+# Holidays (mm/dd) in '98 have the off-peak rate.
+on (01/01, easter, easter+1, 05/01, easter+39, easter+49,easter+50,07/21,08/15, 11/01, 11/11, 12/25) between () use (0.0166,60)
+#
+# 01/01 Nieuwjaar.
+# easter Pasen
+# easter+1 Paasmaandag
+# 05/01 Feest van de arbeid
+# easter+39 O.H.-Hemelvaart
+# easter+49 Pinksteren
+# easter+50 Pinkstermaandag
+# 07/21 Nationale Feestdag
+# 08/15 O.L.V.-Hemelvaart
+# 11/01 Allerheiligen
+# 11/11 Wapenstilstand 1918
+# 12/25 Kerstmis
diff --git a/kppp/Rules/Belgium/Belgium_internet_frank.rst b/kppp/Rules/Belgium/Belgium_internet_frank.rst
new file mode 100644
index 00000000..e8a5ed56
--- /dev/null
+++ b/kppp/Rules/Belgium/Belgium_internet_frank.rst
@@ -0,0 +1,74 @@
+##########################################################################
+# Ruleset file for the Belgium Internet calls from Belgacom
+# Thers rules apply on on may 23 2001
+#
+# Rules:
+# - Peak hours: 08:00 -> 18:00.
+# - Off-peak : the rest + national holidays.
+# - Entry costs are 2 BEF = 0.0496 EUR
+# - Off-Peak: 40BEF/hour = 0.67 BEF/min = 0.0166 EUR
+# - Peak: 100BEF/hour= 1.67 BEF/min = 0.0414 EUR
+#
+#
+# Philippe.Faes@rug.ac.be
+# (after the summer of 2003 this addres might have expired, try one of the
+# following: Philippe.Faes@faesvideo.be or Philippe.Faes@faes.net)
+#########################################################################
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+name=Belgium_internet_frank
+
+################################################################
+# currency settings
+################################################################
+
+# define BEF (Begische Frank) to be used as currency
+# you should use the EURO version of this file, since the Frank won't last
+# much longer :-)
+currency_symbol=BEF
+
+# Position of the currency symbol, default is "right".
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=3
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=2
+
+
+# Minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+# Let's take the off-peak hour rate as the default.
+default=(0.67,60)
+
+
+# Peak hours.
+on (monday..friday) between (08:00..18:00) use (1.67,60)
+
+# Holidays (mm/dd) in '98 have the off-peak rate.
+on (01/01, easter, easter+1, 05/01, easter+39, easter+49, easter+50,07/21,08/15, 11/01, 11/11, 12/25) between () use (0.67,60)
+#
+# 01/01 Nieuwjaar ;Jour de l'An
+# easter Pasen ;Pâques
+# easter+1 Paasmaandag ;Lundi de Pâques
+# 05/01 Feest van de arbeid ;Fęte du Travail
+# easter+39 O.H.-Hemelvaart ;Ascension
+# easter+49 Pinksteren ;Pentecôte
+# easter+50 Pinkstermaandag ;Lundi de Pentecôte
+# 07/21 Nationale Feestdag ;Fęte Nationale
+# 08/15 O.L.V.-Hemelvaart ;Assomption
+# 11/01 Allerheiligen ;Toussaint
+# 11/11 Wapenstilstand 1918 ;Armistice
+# 12/25 Kerstmis ;NoEl
diff --git a/kppp/Rules/Belgium/Belgium_interzonal.rst b/kppp/Rules/Belgium/Belgium_interzonal.rst
new file mode 100644
index 00000000..d58be84a
--- /dev/null
+++ b/kppp/Rules/Belgium/Belgium_interzonal.rst
@@ -0,0 +1,81 @@
+##########################################################################
+# Ruleset file for the Belgium Interzonal calls applicable since 98/03/15.
+#
+# Rules:
+# - Peak hours: 08:00 -> 18:00.
+# - Off-peak : the rest + national holidays.
+# - Minimum entry costs (flat_init_costs) are halfed when off-peak.
+# (how to implement?)
+# - Calls longer than 10' have 30% reduction when off-peak to a bbs.
+# Calls longer than 10' have 50% reduction when off-peak to the net!
+# (how to implement?)
+#
+# guy.zelck@eds.com
+################################################################
+
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+name=Belgium_interzonal
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol, default = "$".
+# define Bf (Begische Frank) to be used as currency
+currency_symbol=Bf
+
+# Position of the currency symbol, default is "right".
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=3
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# Minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+
+# This is the minimum time slice you allways have to pay.
+# It has priority over the default rule.
+# Trouble here is that during off-peak hours it's half the price!
+# How can this be implemented?
+flat_init_costs=(7,60)
+
+# Let's take the off-peak hour rate as the default.
+default=(3.5,60)
+
+# During off-peak hours when a call takes > 10' you have 30% reduction.
+# ?
+
+# Peak hours.
+on (monday..friday) between (08:00..18:00) use (7,60)
+
+# Holidays (mm/dd) in '98 have the off-peak rate.
+on (01/01, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 07/21, 08/15, 11/01, 11/11, 12/25) between () use (1,60)
+#
+# 01/01 Nieuwjaar.
+# easter Pasen
+# easter+1 Paasmaandag
+# 05/01 Feest van de arbeid
+# easter+39 O.H.-Hemelvaart
+# easter+49 Pinksteren
+# easter+50 Pinkstermaandag
+# 07/21 Nationale Feestdag
+# 08/15 O.L.V.-Hemelvaart
+# 11/01 Allerheiligen
+# 11/11 Wapenstilstand 1918
+# 12/25 Kerstmis
diff --git a/kppp/Rules/Belgium/Belgium_zonal.rst b/kppp/Rules/Belgium/Belgium_zonal.rst
new file mode 100644
index 00000000..fa63e3ee
--- /dev/null
+++ b/kppp/Rules/Belgium/Belgium_zonal.rst
@@ -0,0 +1,81 @@
+##########################################################################
+# Ruleset file for the Belgium Interzonal calls applicable since 98/03/15.
+#
+# Rules:
+# - Peak hours: 08:00 -> 18:00.
+# - Off-peak : the rest + national holidays.
+# - Minimum entry costs (flat_init_costs) are halfed when off-peak.
+# (how to implement?)
+# - Calls longer than 10' have 30% reduction when off-peak to a bbs.
+# Calls longer than 10' have 50% reduction when off-peak to the net!
+# (how to implement?)
+#
+# Guy Zelck, guy.zelck@eds.com
+################################################################
+
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+name=Belgium_zonal
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol, default = "$".
+# define Bf (Begische Frank) to be used as currency
+currency_symbol=Bf
+
+# Position of the currency symbol, default is "right".
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=3
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# Minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+
+# This is the minimum time slice you allways have to pay, here its 180 sec.
+# It has priority over the default rule.
+# Trouble here is that during peak-hours it's 6 Bf, during off-peak hours it's 3 Bf.
+# How can this be implemented?
+flat_init_costs=(6,180)
+
+# Let's take the off-peak hour rate as the default.
+default=(1,60)
+
+# During off-peak hours when a call takes > 10' you have 30% reduction.
+# ?
+
+# Peak hours.
+on (monday..friday) between (08:00..18:00) use (2,60)
+
+# Holidays (mm/dd) in '98 have the off-peak rate.
+on (01/01, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 07/21, 08/15, 11/01, 11/11, 12/25) between () use (1,60)
+
+# 01/01 Nieuwjaar.
+# easter Pasen
+# easter+1 Paasmaandag
+# 05/01 Feest van de arbeid
+# easter+39 O.H.-Hemelvaart
+# easter+49 Pinksteren
+# easter+50 Pinkstermaandag
+# 07/21 Nationale Feestdag
+# 08/15 O.L.V.-Hemelvaart
+# 11/01 Allerheiligen
+# 11/11 Wapenstilstand 1918
+# 12/25 Kerstmis
diff --git a/kppp/Rules/Belgium/Makefile.am b/kppp/Rules/Belgium/Makefile.am
new file mode 100644
index 00000000..ede4299c
--- /dev/null
+++ b/kppp/Rules/Belgium/Makefile.am
@@ -0,0 +1,6 @@
+rules_DATA = Belgium_interzonal.rst Belgium_zonal.rst \
+ Belgium_internet_frank.rst Belgium_internet_euro.rst
+
+rulesdir = $(kde_datadir)/kppp/Rules/Belgium
+
+EXTRA_DIST = $(rules_DATA)
diff --git a/kppp/Rules/Bosnia_and_Herzegovina/BiHnet_-_home_-_bez_impulsa.rst b/kppp/Rules/Bosnia_and_Herzegovina/BiHnet_-_home_-_bez_impulsa.rst
new file mode 100644
index 00000000..ef7259d5
--- /dev/null
+++ b/kppp/Rules/Bosnia_and_Herzegovina/BiHnet_-_home_-_bez_impulsa.rst
@@ -0,0 +1,67 @@
+ ################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=BiHnet_-_home_-_bez_impulsa.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=KM
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(7,36000)
+#default=(0.0151, 60)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.0121, 60)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+
+on () between (1:00..6:59) use (0,0)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+#on (monday..saturday) between (0:00..6:59) use (0.1677, 360)
+#on (monday..saturday) between (7:00..15:59) use (0.1677, 180)
+#on (monday..saturday) between (16:00..21:59) use (0.1677, 240)
+#on (monday..saturday) between (22:00..23:59) use (0.1677, 360)
+#on (sunday) between () use (0.1677, 360)
+
+# Sluzbeni praznici, najjeftinija tarifa
+# 1.1. Nova Godina
+# Easter - Uskrs
+# 1.5. -
+# 30.5. - Dan drzavnosti
+# 22.6. - Dan borbe protiv fasizma
+# 4.8. - Dan domovinske zahvalnosti
+# 15.8. - Velika Gospa
+# 1.11. - Dan svih svetih
+# 25.12. - Bozic
+#on (01/01, easter, 05/01, 05/30, 06/22, 08/04, 08/15, 11/01, 12/25) between () use (0.1677,360)
+
diff --git a/kppp/Rules/Bosnia_and_Herzegovina/BiHnet_-_student_-_bez_impulsa.rst b/kppp/Rules/Bosnia_and_Herzegovina/BiHnet_-_student_-_bez_impulsa.rst
new file mode 100644
index 00000000..d8b397a4
--- /dev/null
+++ b/kppp/Rules/Bosnia_and_Herzegovina/BiHnet_-_student_-_bez_impulsa.rst
@@ -0,0 +1,67 @@
+ ################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=BiHnet_-_student_-_bez_impulsa.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=KM
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(5,54000)
+#default=(0.0097, 60)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.0099, 60)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+
+on () between (1:00..6:59) use (0, 60)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+#on (monday..saturday) between (0:00..6:59) use (0.1677, 360)
+#on (monday..saturday) between (7:00..15:59) use (0.1677, 180)
+#on (monday..saturday) between (16:00..21:59) use (0.1677, 240)
+#on (monday..saturday) between (22:00..23:59) use (0.1677, 360)
+#on (sunday) between () use (0.1677, 360)
+
+# Sluzbeni praznici, najjeftinija tarifa
+# 1.1. Nova Godina
+# Easter - Uskrs
+# 1.5. -
+# 30.5. - Dan drzavnosti
+# 22.6. - Dan borbe protiv fasizma
+# 4.8. - Dan domovinske zahvalnosti
+# 15.8. - Velika Gospa
+# 1.11. - Dan svih svetih
+# 25.12. - Bozic
+#on (01/01, easter, 05/01, 05/30, 06/22, 08/04, 08/15, 11/01, 12/25) between () use (0.1677,360)
+
diff --git a/kppp/Rules/Bosnia_and_Herzegovina/Makefile.am b/kppp/Rules/Bosnia_and_Herzegovina/Makefile.am
new file mode 100644
index 00000000..6a89fb59
--- /dev/null
+++ b/kppp/Rules/Bosnia_and_Herzegovina/Makefile.am
@@ -0,0 +1,8 @@
+pkg_DATA = BiHnet_-_home_-_bez_impulsa.rst \
+ BiHnet_-_student_-_bez_impulsa.rst \
+ SmartNet_PERSONAL_bez_impulsa.rst \
+ samo_impulsi.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Bosnia_and_Herzegovina
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Bosnia_and_Herzegovina/SmartNet_PERSONAL_bez_impulsa.rst b/kppp/Rules/Bosnia_and_Herzegovina/SmartNet_PERSONAL_bez_impulsa.rst
new file mode 100644
index 00000000..30122206
--- /dev/null
+++ b/kppp/Rules/Bosnia_and_Herzegovina/SmartNet_PERSONAL_bez_impulsa.rst
@@ -0,0 +1,65 @@
+ ################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=SmartNet_S-NET-01_bez_impulsa.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=KM
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(18,90000)
+#default=(0.0151, 60)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.007, 36)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+#on (monday..saturday) between (0:00..6:59) use (0.1677, 360)
+#on (monday..saturday) between (7:00..15:59) use (0.1677, 180)
+#on (monday..saturday) between (16:00..21:59) use (0.1677, 240)
+#on (monday..saturday) between (22:00..23:59) use (0.1677, 360)
+#on (sunday) between () use (0.1677, 360)
+
+# Sluzbeni praznici, najjeftinija tarifa
+# 1.1. Nova Godina
+# Easter - Uskrs
+# 1.5. -
+# 30.5. - Dan drzavnosti
+# 22.6. - Dan borbe protiv fasizma
+# 4.8. - Dan domovinske zahvalnosti
+# 15.8. - Velika Gospa
+# 1.11. - Dan svih svetih
+# 25.12. - Bozic
+#on (01/01, easter, 05/01, 05/30, 06/22, 08/04, 08/15, 11/01, 12/25) between () use (0.1677,360)
+
diff --git a/kppp/Rules/Bosnia_and_Herzegovina/samo_impulsi.rst b/kppp/Rules/Bosnia_and_Herzegovina/samo_impulsi.rst
new file mode 100644
index 00000000..ac60aec0
--- /dev/null
+++ b/kppp/Rules/Bosnia_and_Herzegovina/samo_impulsi.rst
@@ -0,0 +1,66 @@
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=samo_impulsi.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=KM
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.0180,120)
+#default=(0.0097, 60)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.0049, 60)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+on (monday..saturday) between (7:00..18:59) use (0.0097, 60)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+#on (monday..saturday) between (0:00..6:59) use (0.1677, 360)
+#on (monday..saturday) between (7:00..15:59) use (0.1677, 180)
+#on (monday..saturday) between (16:00..21:59) use (0.1677, 240)
+#on (monday..saturday) between (22:00..23:59) use (0.1677, 360)
+#on (sunday) between () use (0.1677, 360)
+
+# Sluzbeni praznici, najjeftinija tarifa
+# 1.1. Nova Godina
+# Easter - Uskrs
+# 1.5. -
+# 30.5. - Dan drzavnosti
+# 22.6. - Dan borbe protiv fasizma
+# 4.8. - Dan domovinske zahvalnosti
+# 15.8. - Velika Gospa
+# 1.11. - Dan svih svetih
+# 25.12. - Bozic
+#on (01/01, easter, 05/01, 05/30, 06/22, 08/04, 08/15, 11/01, 12/25) between () use (0.1677,360)
+
diff --git a/kppp/Rules/Brasil/Brasil.rst b/kppp/Rules/Brasil/Brasil.rst
new file mode 100644
index 00000000..238af4ef
--- /dev/null
+++ b/kppp/Rules/Brasil/Brasil.rst
@@ -0,0 +1,21 @@
+# I don't know if it's the same rule for the rest of Brazil!
+# Cobranca telefonica da Telebahia, Brasil. Nao sei se a cobranca e a mesma
+# no resto do Brasil. Nao estranho o custe de 0 aos sabados e domingos.
+# Nestes horarios, cobra-se apenas um pulso (8 centavos) por ligacao. Como
+# este valor eh o custo minimo, ele nao cobra nada pelo resto da ligacao.
+#
+# Marcus Brito
+# Mailto: sadpazu@base.com.br
+
+name=Telebahia
+currency_position=right
+currency_digits=3
+per_connection=0.0
+minimum_costs=0.08
+default=(0.08, 240)
+
+on (monday..friday) between (0:00..05:59) use (0.0, 100)
+on (saturday) between (14:00..23:59) use (0.0, 100)
+on (sunday) between (00:00..23:59) use (0.0, 100)
+
+
diff --git a/kppp/Rules/Brasil/Brasil_Ligbr.rst b/kppp/Rules/Brasil/Brasil_Ligbr.rst
new file mode 100644
index 00000000..5817fada
--- /dev/null
+++ b/kppp/Rules/Brasil/Brasil_Ligbr.rst
@@ -0,0 +1,19 @@
+# Suitable for State of Rio de Janeiro - Brazil
+#
+# Cobranca aplicada pela Intelig para conexões via Ligbr em todo o território
+# nacional. Os valores foram obtidos na pagina da Ligbr (www.ligbr.com.br) e
+# sao de 27 de marįo de 2002.
+#
+# Renato G. dos Santos
+# mailto:linuxiado@rba.omnqf.nom.br
+
+name=Ligbr
+currency_symbol=R$
+currency_position=left
+currency_digits=5
+
+per_connection=0.07000
+#flat_init_costs=(0.08571,240)
+minimum_costs=0.07000
+default=(0.07000, 60)
+
diff --git a/kppp/Rules/Brasil/Makefile.am b/kppp/Rules/Brasil/Makefile.am
new file mode 100644
index 00000000..f54b861b
--- /dev/null
+++ b/kppp/Rules/Brasil/Makefile.am
@@ -0,0 +1,8 @@
+pkg_DATA = Brasil.rst \
+ SaoPaulo.rst \
+ Brasil_Ligbr.rst \
+ Rio_de_Janeiro.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Brasil
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Brasil/Rio_de_Janeiro.rst b/kppp/Rules/Brasil/Rio_de_Janeiro.rst
new file mode 100644
index 00000000..09ae69eb
--- /dev/null
+++ b/kppp/Rules/Brasil/Rio_de_Janeiro.rst
@@ -0,0 +1,33 @@
+# Suitable for State of Rio de Janeiro - Brazil
+#
+# Cobranca aplicada pela Telemar no Rio de Janeiro. Os valores foram obtidos
+# na pagina da Telemar (www.telemar.com.br) e sao de 27 de marįo de 2002.
+#
+# Renato G. dos Santos
+# mailto:linuxiado@rba.omnqf.nom.br
+#
+
+name=Telemar
+currency_symbol=R$
+currency_position=left
+currency_digits=5
+
+per_connection=0.09258
+#flat_init_costs=(0.09258,240)
+minimum_costs=0.09258
+default=(0.09258, 240)
+
+on (monday..saturday) between (0:00..06:00) use (0.00000, 100)
+on (saturday) between (14:00..23:59) use (0.00000, 100)
+on (sunday) between () use (0.00000, 100)
+
+# Feriados nacionais:
+# Ano novo
+# Tiradentes
+# Dia do trabalho
+# Proclamacao da Independencia
+# Padroeira do Brasil
+# Proclamacao da Republica
+# Natal
+
+on (01/01, 04/21, 05/01, 09/07, 10/12, 11/15, 12/25) between () use (0.00000,100)
diff --git a/kppp/Rules/Brasil/SaoPaulo.rst b/kppp/Rules/Brasil/SaoPaulo.rst
new file mode 100644
index 00000000..748f653e
--- /dev/null
+++ b/kppp/Rules/Brasil/SaoPaulo.rst
@@ -0,0 +1,33 @@
+# Suitable for State of Sao Paulo - Brazil
+#
+# Cobranca aplicada pela Telefonica em Sao Paulo. Os valores foram
+# obtidos na pagina da Telefonica (www.telefonica.net.br) e sao
+# de 13 de abril de 2000.
+#
+# Ricardo Biloti
+# mailto:biloti@ime.unicamp.br
+#
+
+name=Telefonica
+currency_position=left
+currency_digits=5
+
+per_connection=0.08571
+#flat_init_costs=(0.08571,240)
+minimum_costs=0.08571
+default=(0.08571, 240)
+
+on (monday..saturday) between (0:00..06:00) use (0.00000, 100)
+on (saturday) between (14:00..23:59) use (0.00000, 100)
+on (sunday) between () use (0.00000, 100)
+
+# Feriados nacionais:
+# Ano novo
+# Tiradentes
+# Dia do trabalho
+# Proclamacao da Independencia
+# Padroeira do Brasil
+# Proclamacao da Republica
+# Natal
+on (01/01, 04/21, 05/01, 09/07, 10/12, 11/15, 12/25) between () use (0.00000,100)
+
diff --git a/kppp/Rules/Croatia/CARNet.rst b/kppp/Rules/Croatia/CARNet.rst
new file mode 100644
index 00000000..e67e4e6b
--- /dev/null
+++ b/kppp/Rules/Croatia/CARNet.rst
@@ -0,0 +1,67 @@
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+# Updated by zapov (zapov at yahoo com)
+#
+################################################################
+name=CARNet.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=HRK
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.061, 60)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.061, 60)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+on (monday..saturday) between (0:00..6:59) use (0.0305, 60)
+on (monday..saturday) between (7:00..18:59) use (0.061, 60)
+on (monday..saturday) between (19:00..23:59) use (0.0305, 60)
+on (sunday) between () use (0.0305, 60)
+
+# Sluzbeni praznici, najjeftinija tarifa
+# 1.1. Nova Godina
+# Easter - Uskrs
+# 6.1. - Tri kralja
+# 1.5. - Medjunarodni praznik rada
+# Easter+60 - Tijelovo
+# 22.6. - Dan antifasisticke borbe
+# 25.6. - Dan drzavnosti
+# 5.8. - Dan domovinske zahvalnosti
+# 15.8. - Velika Gospa
+# 8.10. - Dan neovisnosti
+# 1.11. - Svi sveti
+# 25.12. - Bozic
+# 26.12. - Dan iza :)
+on (01/01, 01/06, easter+1, 05/1, easter+60, 06/22, 06/25, 08/05, 08/15, 11/01, 12/25, 12/26) between () use (0.0305, 60)
diff --git a/kppp/Rules/Croatia/Makefile.am b/kppp/Rules/Croatia/Makefile.am
new file mode 100644
index 00000000..47e048c8
--- /dev/null
+++ b/kppp/Rules/Croatia/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = CARNet.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Croatia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_Business_Internet.rst b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_Business_Internet.rst
new file mode 100644
index 00000000..a887fc60
--- /dev/null
+++ b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_Business_Internet.rst
@@ -0,0 +1,23 @@
+#***********************************************************#
+# Czech Telecom rate ruleset #
+# Internet Business 2004 #
+# Created 2004/11/01 Jan Klepek <j.klepek@centrum.cz> #
+#***********************************************************#
+
+name=Czech_Telecom_Internet_2004_Business_Ineternet
+currency_symbol=Kc
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+default=(1.40, 60)
+
+on (monday..friday) between (6:00..17:59) use (1.51, 60)
+on (monday..friday) between (6:00..17:59) use (0.84, 60, 600)
+on (monday..friday) between (18:00..5:59) use (0.70, 60)
+on (monday..friday) between (18:00..5:59) use (0.33, 60, 600)
+on (saturday..sunday) between () use (0.70, 60)
+on (saturday..sunday) between () use (0.33, 60, 600)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.70, 60)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.33, 60, 600)
diff --git a/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_Home_Internet.rst b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_Home_Internet.rst
new file mode 100644
index 00000000..8b6652e3
--- /dev/null
+++ b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_Home_Internet.rst
@@ -0,0 +1,23 @@
+#***********************************************************#
+# Czech Telecom rate ruleset #
+# Internet Home 2004 #
+# Created 2004/11/01 Jan Klepek <j.klepek@centrum.cz> #
+#***********************************************************#
+
+name=Czech_Telecom_Internet_2004_Home_Internet
+currency_symbol=Kc
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+default=(1.40, 60)
+
+on (monday..friday) between (6:00..17:59) use (1.62, 60)
+on (monday..friday) between (6:00..17:59) use (0.87, 60, 600)
+on (monday..friday) between (18:00..5:59) use (0.63, 60)
+on (monday..friday) between (18:00..5:59) use (0.26, 60, 600)
+on (saturday..sunday) between () use (0.63, 60)
+on (saturday..sunday) between () use (0.26, 60, 600)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.63, 60)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.26, 60, 600)
diff --git a/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_a_Internet_180_+_660.rst b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_a_Internet_180_+_660.rst
new file mode 100644
index 00000000..55bcd9dd
--- /dev/null
+++ b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_a_Internet_180_+_660.rst
@@ -0,0 +1,23 @@
+#***********************************************************#
+# Czech Telecom rate ruleset #
+# Telefon_a_internet_180_+_660 2004 #
+# Created 2004/11/01 Jan Klepek <j.klepek@centrum.cz> #
+#***********************************************************#
+
+name=Czech_Telecom_Internet_2004_Telefon_a_internet_180_+_660
+currency_symbol=Kc
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+default=(1.40, 60)
+
+on (monday..friday) between (6:00..17:59) use (1.62, 60)
+on (monday..friday) between (6:00..17:59) use (0.86, 60, 600)
+on (monday..friday) between (18:00..5:59) use (0.63, 60)
+on (monday..friday) between (18:00..5:59) use (0.26, 60, 600)
+on (saturday..sunday) between () use (0.63, 60)
+on (saturday..sunday) between () use (0.26, 60, 600)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.63, 60)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.26, 60, 600)
diff --git a/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_a_Internet_90_+_300.rst b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_a_Internet_90_+_300.rst
new file mode 100644
index 00000000..4db34b8c
--- /dev/null
+++ b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_a_Internet_90_+_300.rst
@@ -0,0 +1,23 @@
+#***********************************************************#
+# Czech Telecom rate ruleset #
+# Telefon_a_internet_90_+_300 2004 #
+# Created 2004/11/01 Jan Klepek <j.klepek@centrum.cz> #
+#***********************************************************#
+
+name=Czech_Telecom_Internet_2004_Telefon_a_internet_90_+_300
+currency_symbol=Kc
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+default=(1.40, 60)
+
+on (monday..friday) between (6:00..17:59) use (1.62, 60)
+on (monday..friday) between (6:00..17:59) use (0.86, 60, 600)
+on (monday..friday) between (18:00..5:59) use (0.63, 60)
+on (monday..friday) between (18:00..5:59) use (0.29, 60, 600)
+on (saturday..sunday) between () use (0.63, 60)
+on (saturday..sunday) between () use (0.29, 60, 600)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.63, 60)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.29, 60, 600)
diff --git a/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_universal.rst b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_universal.rst
new file mode 100644
index 00000000..5504fc94
--- /dev/null
+++ b/kppp/Rules/Czechia/Czech_Telecom_Internet_2004_telefon_universal.rst
@@ -0,0 +1,23 @@
+#***********************************************************#
+# Czech Telecom rate ruleset #
+# Telefon universal 2004 #
+# Created 2004/11/01 Jan Klepek <j.klepek@centrum.cz> #
+#***********************************************************#
+
+name=Czech_Telecom_Internet_2004_Telefon_universal
+currency_symbol=Kc
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+default=(1.40, 60)
+
+on (monday..friday) between (6:00..17:59) use (1.62, 60)
+on (monday..friday) between (6:00..17:59) use (0.86, 60, 600)
+on (monday..friday) between (18:00..5:59) use (0.63, 60)
+on (monday..friday) between (18:00..5:59) use (0.27, 60, 600)
+on (saturday..sunday) between () use (0.63, 60)
+on (saturday..sunday) between () use (0.27, 60, 600)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.63, 60)
+on (01/01, 04/20, 04/21, 05/01, 05/08, 07/05, 07/06, 09/28, 10/28, 11/17, 12/24..12/26) between () use (0.27, 60, 600)
diff --git a/kppp/Rules/Czechia/Makefile.am b/kppp/Rules/Czechia/Makefile.am
new file mode 100644
index 00000000..dc6fedca
--- /dev/null
+++ b/kppp/Rules/Czechia/Makefile.am
@@ -0,0 +1,9 @@
+pkg_DATA = Czech_Telecom_Internet_2004_telefon_a_Internet_180_+_660.rst \
+ Czech_Telecom_Internet_2004_Business_Internet.rst \
+ Czech_Telecom_Internet_2004_telefon_a_Internet_90_+_300.rst \
+ Czech_Telecom_Internet_2004_Home_Internet.rst \
+ Czech_Telecom_Internet_2004_telefon_universal.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Czechia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Denmark/12Move_Analog.rst b/kppp/Rules/Denmark/12Move_Analog.rst
new file mode 100644
index 00000000..f0fcc1d8
--- /dev/null
+++ b/kppp/Rules/Denmark/12Move_Analog.rst
@@ -0,0 +1,51 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : 12Move (Worldonline+Shell)
+# PRODUCT : N/A
+# CURRENCY : DKR
+# PHONENO : 1049 3883 3883
+# AUTHOR : Peter Thorsager <thorsager@post.tele.dk>
+# SOURCE : http://www.12move.dk/content/content1.html
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_12MOVE_ANALOG
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: February 21st - 2000
+# Initial expense: 0.15 DKR
+# Minimum expense: 0.00 DKR
+# Additional timeexpense (25sec) = 0.055kr (max)
+#
+# Peak hours: 0.22 DKR/min ( 06:00-18:59 on weekdays )
+# Off-peak hours: 0.11 DKR/min ( 19:00-23:59 on weekdays,
+# 06:00-23:59 on Saturdays and Sundays )
+# Night rates: 0.06 DKR/min ( 00:00-05:59 all days )
+# Time rebate: all rates are reduced to 50% after 1 hour
+#
+### NOTES ########################################################
+# No special rates for national holidays!
+##################################################################
+
+# INITIAL EXPENSE
+ per_connection=0.15
+ minimum_costs=0.055
+
+# OFF-PEAK and OFFPEAK +1 hour
+ default=(0.001833, 1)
+ default=(0.000917, 1, 3600)
+
+# PEAK and PEAK +1 hour
+ on (monday..friday) between (6:00..18:59) use (0.003667, 1)
+ on (monday..friday) between (6:00..18:59) use (0.003667, 1, 3600)
+
+# NIGHT and NIGHT +1 hour
+ on (monday..sunday) between (00:00..05:59) use (0.001000, 1)
+ on (monday..sunday) between (00:00..05:59) use (0.000500, 1, 3600)
+
diff --git a/kppp/Rules/Denmark/12Move_ISDN.rst b/kppp/Rules/Denmark/12Move_ISDN.rst
new file mode 100644
index 00000000..4bd59ed8
--- /dev/null
+++ b/kppp/Rules/Denmark/12Move_ISDN.rst
@@ -0,0 +1,52 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : 12Move (Worldonline+Shell)
+# PRODUCT : N/A
+# CURRENCY : DKR
+# PHONENO : 1049 3883 3883
+# AUTHOR : Peter Thorsager <thorsager@post.tele.dk>
+# SOURCE : http://www.12move.dk/content/content1.html
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_12MOVE_ISDN
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: February 21st - 2000
+# Initial expense: 0.10 DKR
+# Minimum expense: 0.00 DKR
+# Additional timeexpense (3sec) = 0.011kr (max)
+#
+# Peak hours: 0.22 DKR/min ( 06:00-18:59 on weekdays )
+# Off-peak hours: 0.11 DKR/min ( 19:00-23:59 on weekdays,
+# 06:00-23:59 on Saturdays and Sundays )
+# Night rates: 0.06 DKR/min ( 00:00-05:59 all days )
+# Time rebate: all rates are reduced to 50% after 1 hour
+#
+### NOTES ########################################################
+# No special rates for national holidays!
+##################################################################
+
+
+# INITIAL EXPENSE
+ per_connection=0.15
+ minimum_costs=0.011
+
+# OFF-PEAK and OFFPEAK +1 hour
+ default=(0.001833, 1)
+ default=(0.000917, 1, 3600)
+
+# PEAK and PEAK +1 hour
+ on (monday..friday) between (6:00..18:59) use (0.003667, 1)
+ on (monday..friday) between (6:00..18:59) use (0.003667, 1, 3600)
+
+# NIGHT and NIGHT +1 hour
+ on (monday..sunday) between (00:00..05:59) use (0.001000, 1)
+ on (monday..sunday) between (00:00..05:59) use (0.000500, 1, 3600)
+
diff --git a/kppp/Rules/Denmark/Cybercity_Friabonnement.rst b/kppp/Rules/Denmark/Cybercity_Friabonnement.rst
new file mode 100644
index 00000000..ea4022bf
--- /dev/null
+++ b/kppp/Rules/Denmark/Cybercity_Friabonnement.rst
@@ -0,0 +1,42 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : Cybercity
+# PRODUCT : Friabonnement
+# CURRENCY : DKR
+# PHONENO : 1033 ?
+# AUTHOR : Michael Falk Hansen
+# SOURCE : http://www.cybercity.dk/produkter/privat/friabonnement/
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_CYBERCITY_FRI
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: Septmeber 14, 2002
+# Initial expense: 0.25 DKR
+# Minimum expense: 0.25 DKR
+#
+# Peak hours: 0.22 DKR/min ( 08:00-19:00 on weekdays )
+# Off-peak hours: 0.11 DKR/min ( 19:00-08:00 on weekdays,
+# all Saturday and Sunday )
+### NOTES ########################################################
+# No special rates for national holidays!
+##################################################################
+
+# INITIAL EXPENSE
+ per_connection=0.25
+ minimum_costs=0.25
+
+# OFF-PEAK
+ default=(0.0018333, 1)
+ default=(0.0018333, 1, 3600)
+
+# PEAK
+ on (monday..friday) between (8:00..18:59) use (0.00366667, 1)
+
diff --git a/kppp/Rules/Denmark/Get2net_Betaling.rst b/kppp/Rules/Denmark/Get2net_Betaling.rst
new file mode 100644
index 00000000..eab3e262
--- /dev/null
+++ b/kppp/Rules/Denmark/Get2net_Betaling.rst
@@ -0,0 +1,56 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : Get2net
+# PRODUCT : Betaling
+# CURRENCY : DKR
+# PHONENO : 1001 ?
+# AUTHOR : Peter Thorsager <thorsager@post.tele.dk>
+# SOURCE : http://www.get2net.dk/get2net/plsql/PackageSupport.PageSupportMain?i_Function=DISPLAYPAGE&i_ID=takster-betaling
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_GET2NET_BETAL
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: February 21st - 2000
+# Initial expense: 0.25 DKR
+# Minimum expense: 0.00 DKR
+#
+# Peak hours: 0.27 DKR/min ( 08:00-16:00 on weekdays )
+# Reduced peak hours: 0.20 DKR/min ( 16:00-19:00 on weekdays,
+# 08:00-16:00 on Saturdays )
+# Off-peak hours: 0.10 DKR/min ( 19:00-08:00 on weekdays,
+# 16:00-00:00 on Saturdays,
+# all Sunday )
+# Time rebate: Off-peak rates are reduced to 0.08DKR after 1 hour
+#
+### REBATES ######################################################
+# (not included in cost-calculations!)
+# Dialup attempts shorter than 20s are free (not for ISDN)
+#
+### NOTES ########################################################
+# No special rates for national holidays!
+##################################################################
+
+# INITIAL EXPENSE
+ per_connection=0.25
+ minimum_costs=0.00
+
+# OFF-PEAK and OFF-PEAK +1 hour
+ default=(0.001667, 1)
+ default=(0.001333, 1, 3600)
+
+# PEAK
+ on (monday..friday) between (8:00..15:59) use (0.004500, 1)
+
+# REDUCED PEAK
+ on (monday..friday) between (16:00..18:59) use (0.003333, 1)
+ on (saturday..saturday) between (8:00..15:59) use (0.003333, 1)
+
+
diff --git a/kppp/Rules/Denmark/Get2net_Gratis.rst b/kppp/Rules/Denmark/Get2net_Gratis.rst
new file mode 100644
index 00000000..fda044e3
--- /dev/null
+++ b/kppp/Rules/Denmark/Get2net_Gratis.rst
@@ -0,0 +1,48 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : Get2net
+# PRODUCT : Gratis
+# CURRENCY : DKR
+# PHONENO : 1001 ?
+# AUTHOR : Peter Thorsager <thorsager@post.tele.dk>
+# SOURCE : http://www.get2net.dk/get2net/plsql/PackageSupport.PageSupportMain?i_Function=DISPLAYPAGE&i_ID=takster-gratis
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_GET2NET_GRATIS
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: February 21st - 2000
+# Initial expense: 0.25 DKR
+# Minimum expense: 0.00 DKR
+#
+# Peak hours: 0.27 DKR/min ( 08:00-19:00 on weekdays )
+# Off-peak hours: 0.135 DKR/min ( 19:00-08:00 on weekdays,
+# all Saturday and Sunday )
+# Time rebate: Off-peak rates are reduced to 0.10DKR after 1 hour
+#
+### NOTES ########################################################
+# (not included in cost-calculations!)
+# Dialup attempts shorter than 20s are free (not for ISDN)
+#
+### NOTES ########################################################
+# No special rates for national holidays!
+##################################################################
+
+# INITIAL EXPENSE
+ per_connection=0.25
+ minimum_costs=0.00
+
+# OFF-PEAK
+ default=(0.002250, 1)
+ default=(0.001667, 1, 3600)
+
+# PEAK
+ on (monday..friday) between (8:00..18:59) use (0.004500, 1)
+
diff --git a/kppp/Rules/Denmark/Makefile.am b/kppp/Rules/Denmark/Makefile.am
new file mode 100644
index 00000000..90477080
--- /dev/null
+++ b/kppp/Rules/Denmark/Makefile.am
@@ -0,0 +1,10 @@
+pkg_DATA = 12Move_Analog.rst 12Move_ISDN.rst \
+ Cybercity_Friabonnement.rst \
+ Get2net_Betaling.rst Get2net_Gratis.rst \
+ Mobilix_Wanadoo.rst \
+ Teledanmark_Basis.rst Teledanmark_Favoritinternet.rst \
+ Worldonline-Analog.rst Worldonline-ISDN.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Denmark
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Denmark/Mobilix_Wanadoo.rst b/kppp/Rules/Denmark/Mobilix_Wanadoo.rst
new file mode 100644
index 00000000..6537a6cc
--- /dev/null
+++ b/kppp/Rules/Denmark/Mobilix_Wanadoo.rst
@@ -0,0 +1,62 @@
+################################################################
+# Danish Mobilix Wanadoo internet rate ruleset per 2000.1.1
+#
+# by Jens Svalgaard Frederiksen <svalle@imada.sdu.dk>
+################################################################
+
+name=Mobilix_Wanadoo
+currency_symbol=DKK
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.25
+
+# Cheap rate:
+default=(0.010, 6)
+default=(0.008, 6, 3600)
+# Note: For Night rate at 0.07 DKK/minute look at the end
+
+# Weekday rates:
+on (monday..friday) between (08:00..16:00) use (0.027, 6)
+#on (monday..friday) between (08:00..16:00) use (0.027, 6)
+#on (monday..friday) between (16:00..19:00) use (0.018, 6)
+
+# Saturday rates:
+on (saturday) between (08:00..19:00) use (0.018, 6)
+
+# Sunday rates:
+# (same as cheap rate)
+
+# National holidays:
+
+# Newyear (nytårsdag)
+on (01/01) between () use (0.010, 6)
+on (01/01) between () use (0.008, 6, 3600)
+# Easter (påske)
+on (easter -3) between () use (0.010, 6)
+on (easter -3) between () use (0.008, 6, 3600)
+on (easter -2) between () use (0.010, 6)
+on (easter -2) between () use (0.008, 6, 3600)
+on (easter +1) between () use (0.010, 6)
+on (easter +1) between () use (0.008, 6, 3600)
+# Store bededag
+on (easter+26) between () use (0.010, 6)
+on (easter+26) between () use (0.008, 6, 3600)
+# Kristi himmelfart
+on (easter+39) between () use (0.010, 6)
+on (easter+39) between () use (0.008, 6, 3600)
+# Pinse
+on (easter+50) between () use (0.010, 6)
+on (easter+50) between () use (0.008, 6, 3600)
+# Christmas
+on (12/25) between () use (0.010, 6)
+on (12/25) between () use (0.008, 6, 3600)
+on (12/26) between () use (0.010, 6)
+on (12/26) between () use (0.008, 6, 3600)
+
+# Night rate
+on () between (00:00..08:00) use (0.007, 6)
diff --git a/kppp/Rules/Denmark/Teledanmark_Basis.rst b/kppp/Rules/Denmark/Teledanmark_Basis.rst
new file mode 100644
index 00000000..b4eaca0a
--- /dev/null
+++ b/kppp/Rules/Denmark/Teledanmark_Basis.rst
@@ -0,0 +1,42 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : Teledanmark
+# PRODUCT : Basis
+# CURRENCY : DKR
+# PHONENO : 16101
+# AUTHOR : Peter Thorsager <thorsager@post.tele.dk>
+# SOURCE : http://www.opasia.dk/kundeservice/abonnement/info_basis.shtml
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_TDK_BASIS
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: February 21st - 2000
+# Initial expense: 0.25 DKR
+# Minimum expense: 0.00 DKR
+#
+# Peak hours: 0.29 DKR/min ( 08:00-19:30 on weekdays + Saturday )
+# Off-peak hours: 0.145 DKR/min ( 19:30-08:00 on weekdays + Saturdays,
+# 00:00-24:00 on Sundays )
+#
+### NOTES ########################################################
+# No special rates for national holidays!
+##################################################################
+
+# INITIAL EXPENSE
+ per_connection=0.25
+ minimum_costs=0.00
+
+# OFF-PEAK
+ default=(0.002417, 1)
+
+# PEAK
+ on (monday..saturday) between (8:00..19:29) use (0.004833, 1)
+
diff --git a/kppp/Rules/Denmark/Teledanmark_Favoritinternet.rst b/kppp/Rules/Denmark/Teledanmark_Favoritinternet.rst
new file mode 100644
index 00000000..830c3725
--- /dev/null
+++ b/kppp/Rules/Denmark/Teledanmark_Favoritinternet.rst
@@ -0,0 +1,85 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : Teledanmark
+# PRODUCT : Favoritinternet
+# CURRENCY : DKR
+# PHONENO : 16110
+# AUTHOR : Peter Thorsager <thorsager@post.tele.dk>
+# SOURCE : http://www.favoritinternet.dk
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_TDK_FAVORIT
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: February 21st - 2000
+# Initial expense: 0.25 DKR
+# Minimum expense: 0.00 DKR
+#
+# Peak hours: 0.28 DKR/min ( 08:00-16:00 on weekdays )
+# Reduced peak hours: 0.20 DKR/min ( 16:00-19:30 on weekdays,
+# 08:00-16:00 on Saturdays )
+# Off-peak hours: 0.10 DKR/min ( 19:30-08:00 on weekdays,
+# 16:00-00:00 on Saturdays,
+# 00:00-24:00 on Sundays and national holidays )
+# Time rebate: Off-peak rates are reduced to 0.08DKR after 1 hour
+##################################################################
+
+# INITIAL EXPENSE
+ per_connection=0.25
+ minimum_costs=0.00
+
+# OFF-PEAK and OFF-PEAK +1 hour
+ default=(0.001667, 1)
+ default=(0.001333, 1, 3600)
+
+# PEAK
+ on (monday..friday) between (8:00..15:59) use (0.004667, 1)
+
+# REDUCED PEAK
+ on (monday..friday) between (16:00..19:29) use (0.003333, 1)
+ on (saturday..saturday) between (8:00..15:59) use (0.003333, 1)
+
+# NATIONAL HOLIDAYS ( like off-peak hours )
+# Newyear
+ on (01/01) between () use (0.001667, 1)
+ on (01/01) between () use (0.001333, 1, 3600)
+
+# "Skærtorsdag"
+ on (easter-3) between () use (0.001667, 1)
+ on (easter-3) between () use (0.001333, 1, 3600)
+
+# "Langfredag"
+ on (easter-2) between () use (0.001667, 1)
+ on (easter-2) between () use (0.001333, 1, 3600)
+
+# "2. påskedag"
+ on (easter+1) between () use (0.001667, 1)
+ on (easter+1) between () use (0.001333, 1, 3600)
+
+# "St. bededag"
+ on (easter+26) between () use (0.001667, 1)
+ on (easter+26) between () use (0.001333, 1, 3600)
+
+# "Kristi himmelfart"
+ on (easter+39) between () use (0.001667, 1)
+ on (easter+39) between () use (0.001333, 1, 3600)
+
+# "2. pinsedag"
+ on (easter+50) between () use (0.001667, 1)
+ on (easter+50) between () use (0.001333, 1, 3600)
+
+# Christmas day
+ on (12/25) between () use (0.001667, 1)
+ on (12/25) between () use (0.001333, 1, 3600)
+
+# 2.nd christmas day
+ on (12/26) between () use (0.001667, 1)
+ on (12/26) between () use (0.001333, 1, 3600)
+
diff --git a/kppp/Rules/Denmark/Worldonline-Analog.rst b/kppp/Rules/Denmark/Worldonline-Analog.rst
new file mode 100644
index 00000000..d29aaccf
--- /dev/null
+++ b/kppp/Rules/Denmark/Worldonline-Analog.rst
@@ -0,0 +1,59 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : WorldOnline
+# PRODUCT : World Access (Analog)
+# CURRENCY : DKR
+# PHONENO : 1049 3883 3883
+# AUTHOR : Peter Thorsager <thorsager@post.tele.dk>
+# SOURCE : http://www.worldonline.dk/home_nyeminutpriser.html
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_WORLDONLINE_ANALOG
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: February 21st - 2000
+# Initial expense: 0.15 DKR
+# Minimum expense: 0.00 DKR
+# Additional timeexpense (25sec) = 0.055kr (max)
+#
+# Peak hours: 0.22 DKR/min ( 06:00-18:59 on weekdays )
+# Off-peak hours: 0.11 DKR/min ( 19:00-23:59 on weekdays,
+# 06:00-23:59 on Saturdays and Sundays )
+# Night rates: 0.06 DKR/min ( 00:00-05:59 all days )
+# Time rebate: all rates are reduced to 50% after 1 hour
+#
+### NOTES ########################################################
+# No special rates for national holidays!
+#
+### REBATES ######################################################
+# (not included in cost-calculations!)
+# Volume Rebate: 250-500 DKR = 5%
+# +500 DKR = 10%
+# Students: Members of World Student Club receives a 10%
+# discount on all minute rates
+##################################################################
+
+
+# INITIAL EXPENSE
+ per_connection=0.15
+ minimum_costs=0.055
+
+# OFF-PEAK and OFFPEAK +1 hour
+ default=(0.001833, 1)
+ default=(0.000917, 1, 3600)
+
+# PEAK and PEAK +1 hour
+ on (monday..friday) between (6:00..18:59) use (0.003667, 1)
+ on (monday..friday) between (6:00..18:59) use (0.003667, 1, 3600)
+
+# NIGHT and NIGHT +1 hour
+ on (monday..sunday) between (00:00..05:59) use (0.001000, 1)
+ on (monday..sunday) between (00:00..05:59) use (0.000500, 1, 3600)
+
diff --git a/kppp/Rules/Denmark/Worldonline-ISDN.rst b/kppp/Rules/Denmark/Worldonline-ISDN.rst
new file mode 100644
index 00000000..2f2e0142
--- /dev/null
+++ b/kppp/Rules/Denmark/Worldonline-ISDN.rst
@@ -0,0 +1,60 @@
+### INFO #########################################################
+# COUNTRY : Denmark
+# ISP : WorldOnline
+# PRODUCT : World Access (ISDN)
+# CURRENCY : DKR
+# PHONENO : 1049 3883 3883
+# AUTHOR : Peter Thorsager <thorsager@post.tele.dk>
+# SOURCE : http://www.worldonline.dk/home_nyeminutpriser.html
+#
+# Since the ISP market changes fast these rates may be outdated
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##################################################################
+
+ name=DK_WORLDONLINE_ISDN
+ currency_symbol=kr
+ currency_position=right
+ currency_digits=2
+
+### RATES ########################################################
+# Date: February 21st - 2000
+# Initial expense: 0.10 DKR
+# Minimum expense: 0.00 DKR
+# Additional timeexpense (3sec) = 0.011kr (max)
+#
+# Peak hours: 0.22 DKR/min ( 06:00-18:59 on weekdays )
+# Off-peak hours: 0.11 DKR/min ( 19:00-23:59 on weekdays,
+# 06:00-23:59 on Saturdays and Sundays )
+# Night rates: 0.06 DKR/min ( 00:00-05:59 all days )
+# Time rebate: all rates are reduced to 50% after 1 hour
+#
+# NOTE: No special rates for national holidays!
+### REBATES ######################################################
+# (not included in cost-calculations!)
+# Volume Rebate: 250-500 DKR = 5%
+# +500 DKR = 10%
+# Students: Members of World Student Club receives a 10%
+# discount on all minute rates
+#
+### NOTES ########################################################
+# No special rates for national holidays!
+##################################################################
+
+
+# INITIAL EXPENSE
+ per_connection=0.10
+ minimum_costs=0.011
+
+# OFF-PEAK and OFFPEAK +1 hour
+ default=(0.001833, 1)
+ default=(0.000917, 1, 3600)
+
+# PEAK and PEAK +1 hour
+ on (monday..friday) between (6:00..18:59) use (0.003667, 1)
+ on (monday..friday) between (6:00..18:59) use (0.003667, 1, 3600)
+
+# NIGHT and NIGHT +1 hour
+ on (monday..sunday) between (00:00..05:59) use (0.001000, 1)
+ on (monday..sunday) between (00:00..05:59) use (0.000500, 1, 3600)
+
diff --git a/kppp/Rules/Estonia/Eesti_Telefon.rst b/kppp/Rules/Estonia/Eesti_Telefon.rst
new file mode 100644
index 00000000..4f9b3e15
--- /dev/null
+++ b/kppp/Rules/Estonia/Eesti_Telefon.rst
@@ -0,0 +1,58 @@
+################################################################
+# Viimati muudetud : 31/10/2002
+# Autor : Rivo Laks <rivolaks@hot.ee>
+# Tariifid Eesti Telefonile (kohalik kõne)
+################################################################
+
+
+# Nimi
+name=Eesti_Telefon
+
+### Valuuta
+#Sümbol
+currency_symbol=kr
+# Positsioon
+currency_position=right
+# Kohti peale koma
+currency_digits=2
+
+# Ühenduse loomise tasu (pole)
+per_connection=0.0
+# Miinimumtasu ühenduse eest (pole)
+minimum_costs=0.0
+
+### Kõnealustustasu 48 senti peale 1. sekundit
+flat_init_costs=(0.48,1)
+
+### Normaaltariif 34 senti/minutis (0.56666666... senti/sekundis)
+default=(0.005666, 1)
+
+### Soodustariif 28 senti/minutis (0.4666... senti/sek)
+# Tööpäevadel 19 - 01
+on (monday..friday) between (19:00..00:59) use (0.004666, 1)
+# Puhkepäevadel 07 - 01
+on (saturday..sunday) between (07:00..00:59) use (0.004666, 1)
+
+### Öötariif 14 senti/minutis (0.23333333... senti/sek)
+# Iga päev 01 - 07
+on (monday..sunday) between (01:00..06:59) use (0.002333, 1)
+
+### Pühad (soodustariif 07 - 01)
+# Iseseisvuspäev
+on (02/24) between (07:00..00:59) use (0.004666, 1)
+# Uusaasta
+on (01/01) between (07:00..00:59) use (0.004666, 1)
+# Kevadpüha
+on (05/01) between (07:00..00:59) use (0.004666, 1)
+# Võidupüha
+on (06/23) between (07:00..00:59) use (0.004666, 1)
+# Jaanipäev
+on (06/24) between (07:00..00:59) use (0.004666, 1)
+# Taasiseseisvumispäev
+on (08/20) between (07:00..00:59) use (0.004666, 1)
+# Esimene jõulupüha
+on (12/25) between (07:00..00:59) use (0.004666, 1)
+# Teine jõulupüha
+on (12/26) between (07:00..00:59) use (0.004666, 1)
+# Suur reede
+on (easter-2) between (07:00..00:59) use (0.004666, 1)
diff --git a/kppp/Rules/Estonia/Makefile.am b/kppp/Rules/Estonia/Makefile.am
new file mode 100644
index 00000000..542be054
--- /dev/null
+++ b/kppp/Rules/Estonia/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = Eesti_Telefon.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Estonia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Finland/Makefile.am b/kppp/Rules/Finland/Makefile.am
new file mode 100644
index 00000000..abc9cf4b
--- /dev/null
+++ b/kppp/Rules/Finland/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = VLP.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Finland
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Finland/VLP.rst b/kppp/Rules/Finland/VLP.rst
new file mode 100644
index 00000000..cf3a0392
--- /dev/null
+++ b/kppp/Rules/Finland/VLP.rst
@@ -0,0 +1,64 @@
+# VLP:n hinnat 2.1.2003 VLP:n asiakaspalvelun mukaan
+# Mikko Korhonen mjkorhon@cc.hut.fi
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=VLP
+
+################################################################
+# currency settings
+################################################################
+
+# this is the euro sign in UTF-8
+currency_symbol=ÂĪ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0821
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+#minimum_costs=0.0
+
+
+# You pay .74 for the first 180 seconds ( 3 minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+#flat_init_costs=(0.74,180)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+# cost is 1.34 cents per minute with accuracy of 1 second
+# 8 significant digits should be enough
+default=(0.00022333333, 1)
+
diff --git a/kppp/Rules/France/Cegetel_Local.rst b/kppp/Rules/France/Cegetel_Local.rst
new file mode 100644
index 00000000..d3a4b7d3
--- /dev/null
+++ b/kppp/Rules/France/Cegetel_Local.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Rčgles pour Cegetel, connexion locale
+#
+# Fait le 27 octobre 2002 par Gérard Delafond
+# d'aprčs David Faure, lui-męme d'aprčs, etc.
+################################################################
+
+
+name=cegetel_local
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connexion
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez-le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+# tarifs établis d'aprčs
+# http://www.9online.fr/espaceabonnes/telephonie/comparatif.asp
+# soit 1,7 c d'euro la minute
+flat_init_costs=(0.122,60)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.017, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
diff --git a/kppp/Rules/France/Cegetel_National.rst b/kppp/Rules/France/Cegetel_National.rst
new file mode 100644
index 00000000..47a70253
--- /dev/null
+++ b/kppp/Rules/France/Cegetel_National.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Rčgles pour Cegetel, connexion nationale
+#
+# Fait le 27 octobre 2002 par Gérard Delafond
+# d'aprčs David Faure, lui-męme d'aprčs, etc.
+################################################################
+
+
+name=cegetel_national
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connexion
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez-le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+# tarifs établis d'aprčs
+# http://www.9online.fr/espaceabonnes/telephonie/offres.asp
+# soit 4,1 c d'euro la minute
+flat_init_costs=(0.122,20)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.041, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
diff --git a/kppp/Rules/France/France_Telecom_Internet.rst b/kppp/Rules/France/France_Telecom_Internet.rst
new file mode 100644
index 00000000..5886c39b
--- /dev/null
+++ b/kppp/Rules/France/France_Telecom_Internet.rst
@@ -0,0 +1,59 @@
+################################################################
+#
+# Rčgles pour France Télécom
+# Appels "Internet"
+# Valable vers tous les numéros Internet
+# commenįant par : 08 36 06 13 1. , 08 36 01 9. .. ,
+# 08 60 .. .. ..,
+# et aux numéros : 08 36 01 13 13 et 08 36 01 30 13
+#
+# Fichier original (je pense...) par
+# $Id$
+# (C) 1997 Czo <sirol@asim.lip6.fr>
+#
+# Modifié par Pascal Benito <pascal.benito@free.fr>
+# le 11 Août 2000.
+#
+# Passé a l'euro par David Faure <david@mandrakesoft.com> avec
+# indications de Frederic Delaporte <fredericdelaporte@free.fr>
+#
+# Modifié par Cyril Bosselut <bosselut@b1project.com>
+# Renomé en France_Telecom_Internet.rst
+# le 22 Juillet 2004.
+#
+################################################################
+
+
+name=France_Telecom_Internet
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connection
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+flat_init_costs=(0.10,60)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.02, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
+
diff --git a/kppp/Rules/France/France_Telecom_Local.rst b/kppp/Rules/France/France_Telecom_Local.rst
new file mode 100644
index 00000000..47192059
--- /dev/null
+++ b/kppp/Rules/France/France_Telecom_Local.rst
@@ -0,0 +1,70 @@
+################################################################
+#
+# Rčgles pour France Télécom
+# Appels locaux
+#
+# Fichier original (je pense...) par
+# $Id$
+# (C) 1997 Czo <sirol@asim.lip6.fr>
+#
+# Modifié par Pascal Benito <pascal.benito@free.fr>
+# le 11 Août 2000.
+#
+# Passé a l'euro par David Faure <david@mandrakesoft.com>
+# le 8 Avril 2002.
+#
+# Modifié par Cyril Bosselut <bosselut@b1project.com>
+# le 22 Juillet 2004.
+#
+################################################################
+
+# Pour les appels locaux, France Télécom indique qu'une minute
+# de communication devrait coûter:
+# ( ceci ne doit pas tenir compte des arrondis )
+#
+# 0.018 EUR TTC en tarif réduit
+# 0.033 EUR TTC in tarif normal
+#
+
+name=France_Telecom_Local
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connection
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+flat_init_costs=(0.091,60)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.033, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
+
+on (monday..friday) between (00:00..07:59) use (0.018, 60)
+on (monday..friday) between (08:00..18:59) use (0.033, 60)
+on (monday..friday) between (19:00..23:59) use (0.018, 60)
+
+on (saturday..sunday) between (00:00..23:59) use (0.018, 60)
+
+# Jours fériés :-))
+on (01/01, easter+1, 05/01, 05/08, easter+38, easter+50, 07/14, 08/15, 11/01, 11/11, 12/25) between (00:00..23:59) use (0.018, 60)
+
diff --git a/kppp/Rules/France/France_Telecom_National.rst b/kppp/Rules/France/France_Telecom_National.rst
new file mode 100644
index 00000000..4b1bac2d
--- /dev/null
+++ b/kppp/Rules/France/France_Telecom_National.rst
@@ -0,0 +1,70 @@
+################################################################
+#
+# Rčgles pour France Télécom
+# Appels nationaux
+#
+# Fichier original (je pense...) par
+# $Id$
+# (C) 1997 Czo <sirol@asim.lip6.fr>
+#
+# Modifié par Pascal Benito <pascal.benito@free.fr>
+# le 11 Août 2000.
+#
+# Passé a l'euro par David Faure <david@mandrakesoft.com>
+# le 8 Avril 2002.
+#
+# Modifié par Cyril Bosselut <bosselut@b1project.com>
+# le 22 Juillet 2004.
+#
+################################################################
+
+# Pour les appels nationaux, France Télécom indique qu'une minute
+# de communication devrait coûter:
+# ( ceci ne doit pas tenir compte des arrondis )
+#
+# 0.061 EUR TTC en tarif réduit
+# 0.091 EUR TTC in tarif normal
+# (et 0.11 EUR pour les premieres 39 secondes)
+
+name=France_Telecom_National
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connection
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour les 39 premičres secondes de
+# connexion, peu importe si l'appel dure 1 ou 39 secondes.
+flat_init_costs=(0.11,39)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.091, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
+
+on (monday..friday) between (00:00..07:59) use (0.061, 60)
+on (monday..friday) between (08:00..18:59) use (0.091, 60)
+on (monday..friday) between (19:00..23:59) use (0.061, 60)
+
+on (saturday..sunday) between (00:00..23:59) use (0.061, 60)
+
+# Jours fériés :-))
+on (01/01, easter+1, 05/01, 05/08, easter+38, easter+50, 07/14, 08/15, 11/01, 11/11, 12/25) between (00:00..23:59) use (0.061, 60)
+
diff --git a/kppp/Rules/France/Le_9_Local.rst b/kppp/Rules/France/Le_9_Local.rst
new file mode 100644
index 00000000..d47c0376
--- /dev/null
+++ b/kppp/Rules/France/Le_9_Local.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Rčgles pour Le 9, connexion locale
+#
+# Fait le 27 octobre 2002 par Gérard Delafond
+# d'aprčs David Faure, lui-męme d'aprčs, etc.
+################################################################
+
+
+name=le_9_local
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connexion
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez-le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+# tarifs établis d'aprčs
+# http://www.9online.fr/espaceabonnes/telephonie/comparatif.asp
+# soit 1,2 c d'euro
+flat_init_costs=(0.12,60)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.012, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
diff --git a/kppp/Rules/France/Le_9_National.rst b/kppp/Rules/France/Le_9_National.rst
new file mode 100644
index 00000000..7cf84d45
--- /dev/null
+++ b/kppp/Rules/France/Le_9_National.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Rčgles pour Le 9, connexion nationale
+#
+# Fait le 27 octobre 2002 par Gérard Delafond
+# d'aprčs David Faure, lui-męme d'aprčs, etc.
+################################################################
+
+
+name=le_9_national
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connexion
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez-le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+# tarifs établis d'aprčs
+# http://www.9online.fr/espaceabonnes/telephonie/offres.asp
+# soit 3,3 c d'euro la minute
+flat_init_costs=(0.12,20)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.033, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
diff --git a/kppp/Rules/France/Makefile.am b/kppp/Rules/France/Makefile.am
new file mode 100644
index 00000000..5612fb43
--- /dev/null
+++ b/kppp/Rules/France/Makefile.am
@@ -0,0 +1,7 @@
+pkg_DATA = France_Telecom_Local.rst France_Telecom_Internet.rst France_Telecom_National.rst \
+ Cegetel_Local.rst Cegetel_National.rst Le_9_Local.rst Le_9_National.rst Tele2_Local.rst Tele2_National.rst \
+ OneTel.rst Wanadoo_Free.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/France
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/France/OneTel.rst b/kppp/Rules/France/OneTel.rst
new file mode 100644
index 00000000..427cd95d
--- /dev/null
+++ b/kppp/Rules/France/OneTel.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Rčgles pour Onetel, connexion locale ou nationale
+#
+# Fait le 28 octobre 2002 par Gérard Delafond
+# d'aprčs David Faure, lui-męme d'aprčs, etc.
+################################################################
+
+
+name=OneTel
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connexion
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez-le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+# tarifs établis d'aprčs
+# http://www.9online.fr/espaceabonnes/telephonie/comparatif.asp
+# soit 1,7 c d'euro la minute
+flat_init_costs=(0.01,60)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.01, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
diff --git a/kppp/Rules/France/Tele2_Local.rst b/kppp/Rules/France/Tele2_Local.rst
new file mode 100644
index 00000000..61cb0f6f
--- /dev/null
+++ b/kppp/Rules/France/Tele2_Local.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Rčgles pour Télé2, connexion locale
+#
+# Fait le 27 octobre 2002 par Gérard Delafond
+# d'aprčs David Faure, lui-męme d'aprčs, etc.
+################################################################
+
+
+name=tele2_local
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connexion
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez-le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+# tarifs établis d'aprčs
+# http://www.9online.fr/espaceabonnes/telephonie/comparatif.asp
+# soit 1,4 c d'euro la minute
+flat_init_costs=(0.122,60)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.014, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
diff --git a/kppp/Rules/France/Tele2_National.rst b/kppp/Rules/France/Tele2_National.rst
new file mode 100644
index 00000000..cfeea5e4
--- /dev/null
+++ b/kppp/Rules/France/Tele2_National.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Rčgles pour Télé2, connexion nationale
+#
+# Fait le 27 octobre 2002 par Gérard Delafond
+# d'aprčs David Faure, lui-męme d'aprčs, etc.
+################################################################
+
+
+name=tele2_national
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# Paramčtres de connexion
+################################################################
+
+# NOTE: les rčgles sont parcourues du dčbut vers la fin du fichier
+# donc seulement la derničre rčgle appropriée est prise en
+# considération. Placez donc les rčgles les plus générales
+# avant les plus spécifiques.
+
+# Ceci est un coût supplémentaire éventuel par appel. Si vous
+# n'ętes pas concerné, posez-le égal ā zéro ou commentez-le.
+per_connection=0.0
+
+# Frais minimum par appel. Si le coût d'un appel est inférieur
+# ā cette valeur, alors cette derničre est le coût retenu.
+minimum_costs=0.0
+
+# C'est ce que vous payez pour la premičre minute de
+# connexion, peu importe si l'appel dure 1 ou 59 secondes.
+# tarifs établis d'aprčs
+# http://www.9online.fr/espaceabonnes/telephonie/comparatif.asp
+# soit 3,4 c d'euro la minute
+flat_init_costs=(0.122,20)
+
+# Ceci est la rčgle utilisée par défaut lorsqu'aucune autre ne
+# s'applique. Le premier nombre est le prix correspondant ā la
+# durée en secondes qui est le second nombre.
+default=(0.034, 60)
+# (quelle est l'utilité de ce paramčtre ?!?!)
diff --git a/kppp/Rules/France/Wanadoo_Free.rst b/kppp/Rules/France/Wanadoo_Free.rst
new file mode 100644
index 00000000..401bde3b
--- /dev/null
+++ b/kppp/Rules/France/Wanadoo_Free.rst
@@ -0,0 +1,35 @@
+################################################################
+#
+# kppp rules voor het Wanadoo Free abonnement per minuut
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 3.25 eurocpm=0.0542 eurocps 08:00-18:59
+# daltarief 1,77 eurocpm=0.0295 eurocps 19:00-23:59
+# nacht 1,29 eurocpm=0.0215 eurocps 00:00-07:59
+# Zaterdag 1,29 eurocpm=0.0215 eurocps 00:00-23:59
+# Zondag 1,29 eurocpm=0.0215 eurocps 00:00-23:59
+#
+# Starttarief 3,5 euroct per gesprek
+#
+#
+# Eelco van Kuik
+# kppp-accounting@vankuik.com
+#
+# Created on 23 june 2002
+#
+################################################################
+
+name=Wanadoo Free
+currency_symbol=EUR
+currency_position=left
+currency_digits=2
+per_connection=0.0350
+minimum_costs=0.0
+
+default=(0.000542, 1)
+on (monday..friday) between (19:00..23:59) use (0.000295, 1)
+on (monday..friday) between (00:00..07:59) use (0.000215, 1)
+on (saturday) between (00:00..23:59) use (0.000215, 1)
+on (sunday) between (00:00..23:59) use (0.000215, 1)
diff --git a/kppp/Rules/Germany/1und1_InternetZugang.rst b/kppp/Rules/Germany/1und1_InternetZugang.rst
new file mode 100644
index 00000000..8f8dda93
--- /dev/null
+++ b/kppp/Rules/Germany/1und1_InternetZugang.rst
@@ -0,0 +1,43 @@
+################################################################
+#
+# This is a rule set for kppp.
+#
+# Created by Jesco Topp (jesco@users.sourceforge.net)
+#
+# Ruleset for 1&1 Internet.Zugang
+#
+#
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=1und1_InternetZugang
+
+################################################################
+# currency settings
+################################################################
+
+# defines 'EUR' (EURO) as currency symbol
+#
+currency_symbol=EUR
+
+# The position of the currency symbol.
+#
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# hourly accounting rules
+on (monday..sunday) between (9:00..22:59) use (0.0099, 60)
+on (monday..sunday) between (23:00..8:59) use (0.0049, 60)
diff --git a/kppp/Rules/Germany/2.5min.rst b/kppp/Rules/Germany/2.5min.rst
new file mode 100644
index 00000000..e36e766a
--- /dev/null
+++ b/kppp/Rules/Germany/2.5min.rst
@@ -0,0 +1,60 @@
+################################################################
+#
+# Disclaimer/License
+# This rule file ist (c) by Ingolf Jandt <i.jandt@web.de>
+#
+# Redistribute it; change it according to your needs.
+#
+################################################################
+#
+# 2,5 Pfennige ganztags sind heute Standard für byCall-
+# Verbindungen in Deutschland. Darum dieser Rule-Datei.
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET.
+#
+################################################################
+name=2,5 Pf ganztags, 1-min-Takt
+
+################################################################
+# currency settings
+################################################################
+
+# currency symbol (default is "$")
+currency_symbol=DM
+
+# currency position (default is "right")
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2")
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect.
+# Uncomment it if needed.
+# per_connection=0.0
+
+# Minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+# minimum_costs=0.0
+
+# The first minute is always fully billed.
+# This rule will take priority during the first 60 seconds
+# over any other rule, in particular the 'default' rule.
+flat_init_costs=(0.025,60)
+
+# This is the default rule which is used when no other rule
+# applies. The following rule means: "Every 60 seconds 0.025
+# DM are added to the bill"
+default=(0.025, 60)
diff --git a/kppp/Rules/Germany/2.5s.rst b/kppp/Rules/Germany/2.5s.rst
new file mode 100644
index 00000000..a8d4e5be
--- /dev/null
+++ b/kppp/Rules/Germany/2.5s.rst
@@ -0,0 +1,60 @@
+################################################################
+#
+# Disclaimer/License
+# This rule file ist (c) by Ingolf Jandt <i.jandt@web.de>
+#
+# Redistribute it; change it according to your needs.
+#
+################################################################
+#
+# 2,5 Pfennige ganztags sind heute Standard für byCall-
+# Verbindungen in Deutschland. Darum dieser Rule-Datei.
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET.
+#
+################################################################
+name=2,5 Pf ganztags, 1-s-Takt
+
+################################################################
+# currency settings
+################################################################
+
+# currency symbol (default is "$")
+currency_symbol=DM
+
+# currency position (default is "right")
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2")
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect.
+# Uncomment it if needed.
+# per_connection=0.0
+
+# Minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.01
+
+# The first minute is always fully billed.
+# This rule will take priority during the first 60 seconds
+# over any other rule, in particular the 'default' rule.
+# flat_init_costs=(0.025,60)
+
+# This is the default rule which is used when no other rule
+# applies. The following rule means: "Every 1 seconds 0.025 / 60
+# DM are added to the bill"
+default=(0.000416667, 1)
diff --git a/kppp/Rules/Germany/AddCom_by_Call.rst b/kppp/Rules/Germany/AddCom_by_Call.rst
new file mode 100644
index 00000000..efb23d14
--- /dev/null
+++ b/kppp/Rules/Germany/AddCom_by_Call.rst
@@ -0,0 +1,50 @@
+################################################################
+#
+# created 99/09/27 by M.Jerger
+# email:micha@mjerger.de
+#
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=AddCom by Call
+
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.059, 60)
+on () between (21:00..08:59) use (0.039, 60)
+on (saturday..sunday, 01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/25, 12/26) between (09:00..20:59) use (0.055, 60)
+on (saturday..sunday, 01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/25, 12/26) between (21:00..08:59) use ( 0.039, 60)
+
+
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
+
diff --git a/kppp/Rules/Germany/Addcom.rst b/kppp/Rules/Germany/Addcom.rst
new file mode 100644
index 00000000..cd8f7f13
--- /dev/null
+++ b/kppp/Rules/Germany/Addcom.rst
@@ -0,0 +1,23 @@
+################################################################
+#
+# Addcom rules
+#
+# created on 99/10/14, Holger Witthaut <Holger@tapage.de>
+#
+################################################################
+
+name=addcom
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.039, 60)
+
+# Montag bis Freitag
+on (monday..friday) between (09:00..20:59) use (0.059, 60)
+on (monday..friday) between (21:00..08:59) use (0.039, 60)
+
+# Samstag und Sonntag
+on (saturday..sunday) between (09:00..20:59) use (0.055, 60)
+on (saturday..sunday) between (21:00..08:59) use (0.039, 60)
diff --git a/kppp/Rules/Germany/Arcor_Internet_by_Call_easy.rst b/kppp/Rules/Germany/Arcor_Internet_by_Call_easy.rst
new file mode 100644
index 00000000..ae82c795
--- /dev/null
+++ b/kppp/Rules/Germany/Arcor_Internet_by_Call_easy.rst
@@ -0,0 +1,52 @@
+################################################################
+#
+# kppp ruleset for Arcor-Internet by Call easy accounts
+# created 01/04/01 by Harald Bongartz <Harald@Bongartz.cx>
+# modified 02/01/26 by Alexander Heide <alexander.heide@gmx.net>
+#
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Arcor-Internet by Call easy
+
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=ÂĪ
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.0148, 60)
+on () between (18:00..08:59) use (0.0097, 60)
+on (saturday..sunday, 01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/25, 12/26) between () use ( 0.0097, 60)
+
+
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
+
+
+
diff --git a/kppp/Rules/Germany/CallOkaynet.rst b/kppp/Rules/Germany/CallOkaynet.rst
new file mode 100644
index 00000000..844ecf3c
--- /dev/null
+++ b/kppp/Rules/Germany/CallOkaynet.rst
@@ -0,0 +1,39 @@
+#################################################################################
+# AddCom accounting rules
+# http://www.CallOkay.net
+#
+# derived 26/09/99 by Frank Meier <Frank.Meier@deDanaan.de>
+# from CityCall by Stefan Markgraf and Stefan Troeger
+#
+#################################################################################
+
+name=CallOkay.net
+currency_symbol=DM
+currency_position=right
+currency_digits=3
+per_connection=0.0
+minimum_costs=0.0
+default=(0.039, 1)
+
+# Montag bis Freitag
+on (monday..sunday) between (8:00..7:59) use (0.049, 1)
+
+# Bundeseinheitliche Feiertage, Heiligabend und Silvester
+on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50,10/03, 12/24, 12/25, 12/26, 12/31) between (8:00..7:59) use (0.049, 1)
+
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
+
+# Zusaetzliche Tage mit Feiertagstarif:
+# 12/24 Heiligabend
+# 12/31 Silvester
diff --git a/kppp/Rules/Germany/Callino_Surf_Basic.rst b/kppp/Rules/Germany/Callino_Surf_Basic.rst
new file mode 100644
index 00000000..c7fb8d5e
--- /dev/null
+++ b/kppp/Rules/Germany/Callino_Surf_Basic.rst
@@ -0,0 +1,51 @@
+################################################################
+#
+# German Callino Surf Basic accounting rules
+# created 2000-11-24 by thomas holst (tho), holstt@thoserve.de
+#
+################################################################
+#
+# name of ruleset
+#
+################################################################
+
+name=Callino_Surf_Basic
+
+################################################################
+#
+# currency settings
+#
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+################################################################
+#
+# connection settings
+#
+################################################################
+
+per_connection=0.06
+minimum_costs=0.0
+default=(0.029,60)
+
+on (monday..friday) between (22:00..08:00) use (0.025,60)
+
+on (saturday..sunday) between() use (0.025,60)
+
+on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/25, 12/26) between () use (0.025, 60)
+
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
diff --git a/kppp/Rules/Germany/Callino_Surf_Plus.rst b/kppp/Rules/Germany/Callino_Surf_Plus.rst
new file mode 100644
index 00000000..c0cb8cd0
--- /dev/null
+++ b/kppp/Rules/Germany/Callino_Surf_Plus.rst
@@ -0,0 +1,33 @@
+################################################################
+#
+# German Callino Surf Plus accounting rules
+# created 2000-11-24 by thomas holst (tho), holstt@thoserve.de
+#
+################################################################
+#
+# name of ruleset
+#
+################################################################
+
+name=Callino_Surf_Plus
+
+################################################################
+#
+# currency settings
+#
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+################################################################
+#
+# connection settings
+#
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.019,60)
+
diff --git a/kppp/Rules/Germany/Callisa_City.rst b/kppp/Rules/Germany/Callisa_City.rst
new file mode 100644
index 00000000..b5d3a218
--- /dev/null
+++ b/kppp/Rules/Germany/Callisa_City.rst
@@ -0,0 +1,56 @@
+################################################################
+#
+# German Callisa City accounting rules
+# created 2001-10-13 Herbert Nachbagauer (herby74@freemail.de)
+#
+# NOTE: Please check at http://www.callisa.de/callisacities.php3
+# if the rate applies to your city.
+#
+################################################################
+#
+# name of ruleset
+#
+################################################################
+
+name=Callisa_City
+
+################################################################
+#
+# currency settings
+#
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+################################################################
+#
+# connection settings
+#
+################################################################
+
+default=(0.0244,60)
+
+on (monday..friday) between (09:00..18:00) use (0.0244,60)
+
+on (monday..friday) between (18:00..24:00) use (0.0189,60)
+
+on (monday..friday) between (00:00..09:00) use (0.0189,60)
+
+on (saturday..sunday) between() use (0.0189,60)
+
+on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/25, 12/26) between () use (0.0189, 60)
+
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
diff --git a/kppp/Rules/Germany/City_Activ_Plus_Option.rst b/kppp/Rules/Germany/City_Activ_Plus_Option.rst
new file mode 100644
index 00000000..7dca6c86
--- /dev/null
+++ b/kppp/Rules/Germany/City_Activ_Plus_Option.rst
@@ -0,0 +1,21 @@
+###########################################################################
+#
+# German Telekom accounting rules
+#
+# City mit Activ Plus Option
+#
+# created 99/08/27 Moritz Moeller-Herrmann mmh@gmx.net (NO WARRANTY!)
+#
+###########################################################################
+
+name=3DGerman_Telekom_Activplus_City
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.06, 60)
+
+# Einfache Regeln gell?
+on (monday..sunday) between (9:00..17:59) use (0.06, 60)
+on (monday..sunday) between (18:00..8:59) use (0.03, 60)
diff --git a/kppp/Rules/Germany/Cityweb.rst b/kppp/Rules/Germany/Cityweb.rst
new file mode 100644
index 00000000..7efcfd30
--- /dev/null
+++ b/kppp/Rules/Germany/Cityweb.rst
@@ -0,0 +1,25 @@
+################################################################
+# Ruleset for Cityweb Tarif (Standard German Internetprovider)
+# based on the KDE Template
+# created 10/07/2001 by dunkelelf (stefan jurisch)
+# <dunkelelf@cityweb.de>
+################################################################
+
+name=Cityweb
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+# 3,3 Pf / min mit minutengenauer Abrechnung
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.033, 60)
diff --git a/kppp/Rules/Germany/CompuservePro.rst b/kppp/Rules/Germany/CompuservePro.rst
new file mode 100644
index 00000000..4de6afd1
--- /dev/null
+++ b/kppp/Rules/Germany/CompuservePro.rst
@@ -0,0 +1,16 @@
+######################################################################
+# #
+# German Compuserve Pro Online Rules at 05.December 2001 #
+# #
+# created 01/12/05 by Timo <timo@userland.de> #
+######################################################################
+
+name=Compuserve Pro
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+default=(0.009, 60)
+
+# Täglich von 18:00 bis 08:59
+on (monday..sunday) between (18:00..08:59) use (0.014, 60)
+
diff --git a/kppp/Rules/Germany/E-Plus-Online_Jedermann.rst b/kppp/Rules/Germany/E-Plus-Online_Jedermann.rst
new file mode 100644
index 00000000..a8293d25
--- /dev/null
+++ b/kppp/Rules/Germany/E-Plus-Online_Jedermann.rst
@@ -0,0 +1,60 @@
+################################################################
+#
+# E-Plus-Online accounting rules for everybody
+# although without a handy!!
+#
+# created 02/03/31 by Robert Klier<Robert.Klier@eplus-online.de>
+#
+################################################################
+#
+#
+# Name:
+#
+name=E-Plus-Online_für_Jedermann
+#
+#
+# Währungseinstellungen
+#
+currency_symbol=EUR
+currency_position=right
+currency_digits=4
+#
+#
+# Kosten pro Verbindung
+#
+per_connection=0.0
+minimum_costs=0.0
+#
+#
+# Kosten pro Zeit EUR/Min
+# Mo. - Fr. 9 -18 Uhr 0,0175
+# übrige Zeit sowie an bundeseinh. Feiertagen 0,0125
+#
+default=(0.002083, 10)
+on (monday..friday) between (9:00..18:00) use (0.002917, 10)
+on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/24..12/26, 12/31) between (0:00..23:59) use (0.002083, 10)
+#
+#
+#
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
+#
+# Zusaetzliche Tage mit Feiertagstarif:
+# 12/24 Heiligabend
+# 12/31 Silvester
+
+
+
+
+
+
diff --git a/kppp/Rules/Germany/Easynet_easy-call.rst b/kppp/Rules/Germany/Easynet_easy-call.rst
new file mode 100644
index 00000000..95a71b7d
--- /dev/null
+++ b/kppp/Rules/Germany/Easynet_easy-call.rst
@@ -0,0 +1,36 @@
+################################################################
+#
+# kppp ruleset for Easynet easy-call accounts
+# created 02/02/01 by Jochen Fecht
+#
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Easynet easy-call-Tarif
+
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=EUR
+currency_position=right
+currency_digits=3
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.0148, 60)
+on () between (18:00..8:59) use (0.0097, 60)
+
+
+
diff --git a/kppp/Rules/Germany/Freenet_Enterprise.rst b/kppp/Rules/Germany/Freenet_Enterprise.rst
new file mode 100644
index 00000000..8ceb482b
--- /dev/null
+++ b/kppp/Rules/Germany/Freenet_Enterprise.rst
@@ -0,0 +1,28 @@
+################################################################
+# Ruleset for Freenet Enterprice Tarif (Internet by Call with
+# Application)
+# based on the KDE Template
+# created 2000/04/15 by Ingo von Borstel <ingo.vonborstel@web.de>
+#
+# Again the cheapest call-by-call provider in Germany
+# though it requires application
+################################################################
+
+name=Freenet_Enterprise
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+# 2,5 Pf / min mit minutengenauer Abrechnung
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.025, 60)
diff --git a/kppp/Rules/Germany/Freenet_Sorglos.rst b/kppp/Rules/Germany/Freenet_Sorglos.rst
new file mode 100644
index 00000000..cb8c0612
--- /dev/null
+++ b/kppp/Rules/Germany/Freenet_Sorglos.rst
@@ -0,0 +1,33 @@
+################################################################
+# Ruleset for Freenet Sorglos
+# Internet by Call with Application
+#
+# Created 2002-03-07 by Valentin Funk <valentin.funk@computerfabrik.de>
+#
+# One of the cheapest call-by-call provider with application in
+# Germany.
+# Note: Balanced as Freenet StandardTarif until application.
+################################################################
+
+################################################################
+# Name of the ruleset - absolutly requiered!
+################################################################
+
+name=Freenet_Sorglos
+
+################################################################
+# Currency settings
+################################################################
+
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+################################################################
+# Connection settings
+# 1,29 Ē/Min mit minutengenauer Abrechnung
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.0129, 60)
diff --git a/kppp/Rules/Germany/Freenet_StandardTarif.rst b/kppp/Rules/Germany/Freenet_StandardTarif.rst
new file mode 100644
index 00000000..0eed3a95
--- /dev/null
+++ b/kppp/Rules/Germany/Freenet_StandardTarif.rst
@@ -0,0 +1,32 @@
+################################################################
+# Ruleset for Freenet StandardTarif
+# Internet by Call _without_ Application
+#
+# Created 2002-04-29 by Valentin Funk <valentin.funk@computerfabrik.de>
+#
+# An ordinary german internet call-by-call rate. Also used as
+# fallback rate until application for other Freenet rates.
+################################################################
+
+################################################################
+# Name of the ruleset - absolutly requiered!
+################################################################
+
+name=Freenet_StandardTarif
+
+################################################################
+# Currency settings
+################################################################
+
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+################################################################
+# Connection settings
+# 2,505 Ē/Min mit minutengenauer Abrechnung
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.02505, 60)
diff --git a/kppp/Rules/Germany/Freenet_Super_CbC.rst b/kppp/Rules/Germany/Freenet_Super_CbC.rst
new file mode 100644
index 00000000..f1f4c2be
--- /dev/null
+++ b/kppp/Rules/Germany/Freenet_Super_CbC.rst
@@ -0,0 +1,40 @@
+################################################################
+# Ruleset for Freenet Super CbC
+# Internet by Call _without_ Application
+#
+# Created 2002-04-29 by Valentin Funk <valentin.funk@computerfabrik.de>
+#
+# One of the cheapest internet call-by-call rates.
+# Notes:
+# Once, you have to use a special dial in number: 019231760!
+# Twice, you could be stressed by additional HTML code for
+# advertisement.
+################################################################
+
+################################################################
+# Name of the ruleset - absolutly requiered!
+################################################################
+
+name=Freenet_Super_CbC
+
+################################################################
+# Currency settings
+################################################################
+
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+################################################################
+# Connection settings
+# 1,45 Ē/Min 8-18 Uhr
+# 0,89 Ē/Min 18-8 Uhr
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+default=(0.0145, 60)
+
+on () between (08:00..18:00) use (0.0145, 60)
+on () between (18:00..08:00) use (0.0089, 60)
diff --git a/kppp/Rules/Germany/Freenet_special_call_by_call.rst b/kppp/Rules/Germany/Freenet_special_call_by_call.rst
new file mode 100644
index 00000000..7cebaa51
--- /dev/null
+++ b/kppp/Rules/Germany/Freenet_special_call_by_call.rst
@@ -0,0 +1,57 @@
+################################################################
+#
+# German Freenet accounting rules
+# created 2000-11-24 by thomas holst (tho), holstt@thoserve.de
+# up-to-date 2000-11-01 by volker schlechter, schlecht@selk-stuttgart.de
+# up-to-date 2002-02-11 by Friedemann Schorer, friedemann.schorer@gmx.de
+#
+################################################################
+#
+# name of ruleset
+#
+################################################################
+
+name=Freenet
+
+################################################################
+#
+# currency settings
+#
+################################################################
+
+currency_symbol=ÂĪ
+currency_position=left
+currency_digits=2
+
+################################################################
+#
+# connection settings
+#
+################################################################
+
+#per_connection=0.06
+#minimum_costs=0.0
+
+# Default - falls mal was nicht klappt, wird sicherheitshalber
+# der teuerste Tarif genommen
+default=(0.0145,60)
+
+on (monday..sunday) between (22:00..09:00) use (0.0089,60)
+on (monday..sunday) between (09:00..18:00) use (0.0145,60)
+on (monday..sunday) between (18:00..22:00) use (0.0115,60)
+
+
+# on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/25, 12/26) between () use (0.025, 60)
+
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
diff --git a/kppp/Rules/Germany/MSN.rst b/kppp/Rules/Germany/MSN.rst
new file mode 100644
index 00000000..a8f0e0ea
--- /dev/null
+++ b/kppp/Rules/Germany/MSN.rst
@@ -0,0 +1,18 @@
+################################################################
+# MSN (Microsoft NetWork) Ruleset
+#
+# created on 30.07.2000 by Tobias Toedter
+# <t.toedter@web.de>
+#
+################################################################
+
+name=MSN
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+# one rate for every date and time...
+default=(0.00055, 1)
+
diff --git a/kppp/Rules/Germany/Makefile.am b/kppp/Rules/Germany/Makefile.am
new file mode 100644
index 00000000..f96201b4
--- /dev/null
+++ b/kppp/Rules/Germany/Makefile.am
@@ -0,0 +1,34 @@
+pkg_DATA = 2.5min.rst 2.5s.rst \
+ Arcor_Internet_by_Call_easy.rst \
+ AddCom_by_Call.rst Addcom.rst \
+ Callino_Surf_Basic.rst Callino_Surf_Plus.rst \
+ Callisa_City.rst \
+ CallOkaynet.rst \
+ Cityweb.rst \
+ City_Activ_Plus_Option.rst \
+ CompuservePro.rst \
+ Easynet_easy-call.rst \
+ expressnet.rst Netcom_Kassel.rst \
+ Freenet_Sorglos.rst \
+ Freenet_StandardTarif.rst \
+ Freenet_Super_CbC.rst \
+ Mobilcom_Freenet.rst \
+ Nikoma.rst Nikoma_Internet_by_Call.rst Nikoma_Study_and_Surf.rst \
+ Telekom_City_Select_5_30.rst \
+ knUUt-by-Call.rst \
+ talkline_by_call.rst \
+ vossnet_fun.rst vossnet_fun_light.rst vossnet_kompl.rst \
+ Planet-Interkom_Internet_by_call.rst \
+ Puretec.rst \
+ NGI_Call_By_Call.rst \
+ MSN.rst \
+ Freenet_special_call_by_call.rst \
+ Freenet_Enterprise.rst \
+ E-Plus-Online_Jedermann.rst \
+ 1und1_InternetZugang.rst \
+ VR-Web.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Germany
+
+EXTRA_DIST = $(pkg_DATA)
+
diff --git a/kppp/Rules/Germany/Mobilcom_Freenet.rst b/kppp/Rules/Germany/Mobilcom_Freenet.rst
new file mode 100644
index 00000000..8c60cd39
--- /dev/null
+++ b/kppp/Rules/Germany/Mobilcom_Freenet.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# German Mobilcom Freenet accounting rules
+#
+# created 1999/11/27 by Sebastian Linz <Sebastian.Linz@gmx.net>
+#
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+
+name=Mobilcom_Freenet
+
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0
+minimum_costs=0.0
+# flat_init_costs=(0.74,180)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.05, 60)
+
+
+
diff --git a/kppp/Rules/Germany/NGI_Call_By_Call.rst b/kppp/Rules/Germany/NGI_Call_By_Call.rst
new file mode 100644
index 00000000..dafb8275
--- /dev/null
+++ b/kppp/Rules/Germany/NGI_Call_By_Call.rst
@@ -0,0 +1,14 @@
+################################################################
+# Rule for NGI (Next Generation Internet) Call By Call
+# bablokb@gmx.de (Bernhard Bablok)
+################################################################
+
+name=NGI Call By Call
+
+currency_symbol=DM
+currency_position=right
+currency_digits=8
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.000415,1)
diff --git a/kppp/Rules/Germany/Netcom_Kassel.rst b/kppp/Rules/Germany/Netcom_Kassel.rst
new file mode 100644
index 00000000..d1e06744
--- /dev/null
+++ b/kppp/Rules/Germany/Netcom_Kassel.rst
@@ -0,0 +1,20 @@
+########################################################
+# Netcom-Kassel (Hercules L-XL) Hotline-Tel:9202020
+# internet:9202000
+#
+# createt on 13.05.2001 by Stefan Zintel
+# <zintel@netcomcity.de>
+#
+########################################################
+
+name=Netcom-Kassel
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+# Standardtarif ist 3 Pf pro Minute
+default=(0.0005, 1)
+# Taeglich zwischen 18 Uhr und 19 Uhr ist es Kostenlos
+on () between (18:00..19:00) use (0.0, 2)
+
diff --git a/kppp/Rules/Germany/Nikoma.rst b/kppp/Rules/Germany/Nikoma.rst
new file mode 100644
index 00000000..0d80e963
--- /dev/null
+++ b/kppp/Rules/Germany/Nikoma.rst
@@ -0,0 +1,34 @@
+######################################################################
+# Nikoma Internet by Call Ruleset
+# Gebuehren: 08:00 - 01:00 4.79Pf/min, 01:00 - 08:00 2.99Pf/min
+# created on 18.10.1999 by Thomas Escher
+# <thomas-escher@notesdev.de>
+# Please visit my Linux Homepage: http://www.linux-power.notrix.de
+#######################################################################
+
+name=Nikoma
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+# default cost auf Maximum setzen
+default=(0.000793, 1)
+
+# Deutschlandweiter Tarif
+on (monday..sunday) between (1:00..7:59) use (0.000498, 1)
+on (monday..sunday) between (8:00..0:59) use (0.000793, 1)
+
+# Bundesweite Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
diff --git a/kppp/Rules/Germany/Nikoma_Internet_by_Call.rst b/kppp/Rules/Germany/Nikoma_Internet_by_Call.rst
new file mode 100644
index 00000000..c404d329
--- /dev/null
+++ b/kppp/Rules/Germany/Nikoma_Internet_by_Call.rst
@@ -0,0 +1,35 @@
+################################################################
+#
+# created 99/09/27 by M.Jerger
+# email:micha@mjerger.de
+#
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Nikoma Internet by Call
+
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.0479, 60)
+on () between (01:00..08:00) use (0.0299, 60)
+
+
diff --git a/kppp/Rules/Germany/Nikoma_Study_and_Surf.rst b/kppp/Rules/Germany/Nikoma_Study_and_Surf.rst
new file mode 100644
index 00000000..a286f9f1
--- /dev/null
+++ b/kppp/Rules/Germany/Nikoma_Study_and_Surf.rst
@@ -0,0 +1,41 @@
+#################################################################################
+# German Nikoma Study & Surf - Internet by Call accounting rules
+#
+# Study & Surf is especially for students
+#
+#
+# created 99/10/14 by Claus Atzenbeck <claus.atzenbeck@stud.uni-regensburg.de>
+# based on costs of 99/10/14
+# look at http://www.nikoma.de/
+#
+# This file is based on German_Arcor_Internet_by_Call
+#################################################################################
+
+name=German_Nikoma_Study_and_Surf
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.0007983333333333, 1)
+
+# Montag bis Sonntag
+on (monday..sunday) between (8:00..20:59) use (0.0007983333333333, 1)
+on (monday..sunday) between (21:00..0:59) use (0.0006483333333333, 1)
+on (monday..sunday) between (1:00..7:59) use (0.0004983333333333, 1)
+
+# Bundeseinheitliche Feiertage (kein Unterschied zu Werktagen)
+#on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/25, 12/26) between (0:00..23:59) use (0.10, 60)
+
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
diff --git a/kppp/Rules/Germany/Planet-Interkom_Internet_by_call.rst b/kppp/Rules/Germany/Planet-Interkom_Internet_by_call.rst
new file mode 100644
index 00000000..dbf509cb
--- /dev/null
+++ b/kppp/Rules/Germany/Planet-Interkom_Internet_by_call.rst
@@ -0,0 +1,23 @@
+#=========================================================================
+# Planet Interkom by call
+# http://www.planet-interkom.de/planet/access/access_index.asp
+#
+# Authentifikation: chap
+# Username: internet@planetbycall.de
+# Passwort: internet
+# in /etc/ppp/chap-secrets eintragen: internet@planetbycall.de * internet
+#
+# 05-Jul-2000 numbermumbler <numbermumbler@i.am> http://i.am/numbermumbler
+# 16-Aug-2000 tages-tarif korrigiert; zugangsdaten geaendert
+#=========================================================================
+name=Planet Interkom by call
+currency_position=right
+currency_symbol=DM
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.00041666666667, 1)
+on (monday..friday) between (18:00..07:59) use (0.00041666666667, 1)
+on (monday..friday) between (08:00..17:59) use (0.00053333333333, 1)
+on (easter-2, easter, easter+1, easter+39, easter+49, easter+50) between (0:00..23:59) use (0.00041666666667, 1)
+on (01/01, 05/01, 10/03, 12/24, 12/25, 12/26, 12/31) between (0:00..23:59) use (0.00041666666667, 1)
diff --git a/kppp/Rules/Germany/Puretec.rst b/kppp/Rules/Germany/Puretec.rst
new file mode 100644
index 00000000..a47dc130
--- /dev/null
+++ b/kppp/Rules/Germany/Puretec.rst
@@ -0,0 +1,13 @@
+######################################################################
+# #
+# Puretec Customer Tariff Online Rules at 05.December 2001 #
+# #
+# created 01/12/05 by Timo <timo@userland.de> #
+######################################################################
+
+name=Puretec Customer Tariff
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+default=(0.012, 60)
+
diff --git a/kppp/Rules/Germany/Telekom_City_Select_5_30.rst b/kppp/Rules/Germany/Telekom_City_Select_5_30.rst
new file mode 100644
index 00000000..d6c0636c
--- /dev/null
+++ b/kppp/Rules/Germany/Telekom_City_Select_5_30.rst
@@ -0,0 +1,48 @@
+#################################################################################
+# German Telekom accounting rules
+#
+# CityCall Select 5/30
+#
+# based on "Telekom_City.rst"
+# created 97/07/18 by Stefan Markgraf <S_Markgraf@hotmail.com>
+# modified 98/05/01 by Stefan Troeger <stefan.troeger@wirtschaft.tu-chemnitz.de>
+# modified to Select 5/30 99/10/17 by Reinhard Kunert<reinhard.kunert@gmx.de>
+#################################################################################
+
+name=German_Telekom_City_Call_Select_5_30
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.084, 90)
+
+# Montag bis Freitag
+on (monday..friday) between (5:00..8:59) use (0.084, 150)
+on (monday..friday) between (18:00..20:59) use (0.084, 150)
+on (monday..friday) between (21:00..4:59) use (0.084, 240)
+
+# Sonnabend, Sonntag
+on (saturday..sunday) between (5:00..20:59) use (0.084, 150)
+on (saturday..sunday) between (21:00..4:59) use (0.084, 240)
+
+# Bundeseinheitliche Feiertage, Heiligabend und Silvester
+on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/24, 12/25, 12/26, 12/31) between (5:00..20:59) use (0.121, 150)
+on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/24, 12/25, 12/26, 12/31) between (21:00..4:59) use (0.121, 240)
+
+# Bundeseinheitliche Feiertage:
+# 01/01 Neujahr
+# easter-2 Karfreitag
+# easter Ostersonntag
+# easter+1 Ostermontag
+# 05/01 Maifeiertag Tag der Arbeit
+# easter+39 Christi Himmelfahrt
+# easter+49 Pfingstsonntag
+# easter+50 Pfingstmontag
+# 10/03 Tag der Deutschen Einheit
+# 12/25 1. Weihnachtstag
+# 12/26 2. Weihnachtstag
+
+# Zusaetzliche Tage mit Feiertagstarif:
+# 12/24 Heiligabend
+# 12/31 Silvester
diff --git a/kppp/Rules/Germany/VR-Web.rst b/kppp/Rules/Germany/VR-Web.rst
new file mode 100644
index 00000000..78c3c651
--- /dev/null
+++ b/kppp/Rules/Germany/VR-Web.rst
@@ -0,0 +1,33 @@
+
+################################################################
+#
+# German Vr-Web
+# created 2001-12-09 by frank großmann,f.grossi@web.de
+#
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=VR-Web
+################################################################
+#
+# currency settings
+#
+################################################################
+
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+
+
+################################################################
+#
+# connection settings
+#
+################################################################
+
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.024, 60)
diff --git a/kppp/Rules/Germany/expressnet.rst b/kppp/Rules/Germany/expressnet.rst
new file mode 100644
index 00000000..1f94a67b
--- /dev/null
+++ b/kppp/Rules/Germany/expressnet.rst
@@ -0,0 +1,20 @@
+########################################################
+# expressnet hotline:01801-556556
+# internet:019256310
+# Username:expressnet
+# Password:Internet
+#
+# createt on 13.05.2001 by Stefan Zintel
+# <zintel@netcomcity.de>
+#
+########################################################
+
+name=expressnet
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+# Standardtarif ist 2,79 Pf pro Minute
+default=(0.0279, 60)
+
diff --git a/kppp/Rules/Germany/knUUt-by-Call.rst b/kppp/Rules/Germany/knUUt-by-Call.rst
new file mode 100644
index 00000000..48595939
--- /dev/null
+++ b/kppp/Rules/Germany/knUUt-by-Call.rst
@@ -0,0 +1,22 @@
+
+################################################################
+#German UUNET - Internet By Call accounting rules
+#
+#UUNET Deutschland GmbH
+#
+#knUUt-by-Call
+#
+#created 99/10/17 by Reinhard Kunert <reinhard.kunert@gmx.de>
+#costs based on "www.knuut.de/call" Sunday 99/10/17
+################################################################
+
+name=knUUt-by-Call
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.055, 60)
+
+# Abendtarif
+on (monday..sunday) between (21:00..8:59) use (0.049, 60)
diff --git a/kppp/Rules/Germany/talkline_by_call.rst b/kppp/Rules/Germany/talkline_by_call.rst
new file mode 100644
index 00000000..047c75ad
--- /dev/null
+++ b/kppp/Rules/Germany/talkline_by_call.rst
@@ -0,0 +1,19 @@
+##########################################################################
+# #
+# German talknet call by call Online Rules at 12.August 1999 #
+# #
+# created 99/08/17 by olke<olke@tfz.net> #
+# #
+# #
+# #
+##########################################################################
+
+name=talknet_by_call
+currency_symbol=DM
+currency_position=right
+currency_digits=3
+
+default=(0.144, 180)
+
+# Montag bis Sonntag
+on (monday..sunday) between (0:00..23:59) use (0.144, 180)
diff --git a/kppp/Rules/Germany/vossnet_fun.rst b/kppp/Rules/Germany/vossnet_fun.rst
new file mode 100644
index 00000000..37e76476
--- /dev/null
+++ b/kppp/Rules/Germany/vossnet_fun.rst
@@ -0,0 +1,19 @@
+##########################################################################
+# #
+# German vossnet Fun Online Rules at 12.October 1999 #
+# #
+# created 99/08/17 by olke<olke@tfz.net> #
+# #
+# #
+# #
+##########################################################################
+
+name=vossnet Fun
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+default=(0.06, 60)
+
+# Montag bis Sonntag
+on (monday..sunday) between (9:00..18:00) use (0.06, 60)
+
diff --git a/kppp/Rules/Germany/vossnet_fun_light.rst b/kppp/Rules/Germany/vossnet_fun_light.rst
new file mode 100644
index 00000000..e63dd76b
--- /dev/null
+++ b/kppp/Rules/Germany/vossnet_fun_light.rst
@@ -0,0 +1,19 @@
+##########################################################################
+# #
+# German vossnet Fun-Light Online Rules at 12.October 1999 #
+# #
+# created 99/08/17 by olke<olke@tfz.net> #
+# #
+# #
+# #
+##########################################################################
+
+name=vossnet Fun Light
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+default=(0.06, 60)
+
+# Montag bis Sonntag
+on (monday..sunday) between (9:00..18:00) use (0.06, 60)
+
diff --git a/kppp/Rules/Germany/vossnet_kompl.rst b/kppp/Rules/Germany/vossnet_kompl.rst
new file mode 100644
index 00000000..cdd80c13
--- /dev/null
+++ b/kppp/Rules/Germany/vossnet_kompl.rst
@@ -0,0 +1,29 @@
+##########################################################################
+# #
+# German vossnet-Komplett Online Rules at 11.October 1999 #
+# #
+# created 99/10/11 by olke<olke@tfz.net> #
+# #
+# der Tarif, welchen man mit Strom- und/oder Telefon-Vertrag bekommt #
+# #
+##########################################################################
+
+name=vossnet-komplett
+currency_symbol=DM
+currency_position=right
+currency_digits=2
+default=(0.12, 90)
+
+# Montag bis Freitag
+on (monday..friday) between (9:00..18:00) use (0.12, 90)
+on (monday..friday) between (18:00..21:00) use (0.12, 150)
+on (monday..friday) between (21:00..5:00) use (0.12, 240)
+
+# Wochenende
+on (saturday..sunday) between (21:00..5:00) use (0.12, 240)
+on (saturday..sunday) between (5:00..21:00) use (0.12, 150)
+
+# Feiertage ein Dankeschön an Joachim Wesner,Stefan Markgraf,Stefan Troeger für die Feiertage
+on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/24, 12/25, 12/26, 12/31) between (21:00..5:00) use (0.12, 240)
+on (01/01, easter-2, easter, easter+1, 05/01, easter+39, easter+49, easter+50, 10/03, 12/24, 12/25, 12/26, 12/31) between (5:00..21:00) use (0.12, 150)
+
diff --git a/kppp/Rules/Greece/Hellas_EPAK_Zone1_in_euro.rst b/kppp/Rules/Greece/Hellas_EPAK_Zone1_in_euro.rst
new file mode 100644
index 00000000..d6058d37
--- /dev/null
+++ b/kppp/Rules/Greece/Hellas_EPAK_Zone1_in_euro.rst
@@ -0,0 +1,56 @@
+################################################################
+# NOTES:
+# These rules were made at May 25th, 2001
+# These rules are valid since March, 2001
+# You can check for changes in prices at http://www.ote.gr/
+# These rules apply to you if you are accessing an ISP using an EPAK or PEAK
+# number (0965-) in a city that is up to 45 km from your own, or in the same perfecture.
+# The costs for an EPAK Zone 1 long distance phone-call are:
+# prices are in euro, with the convention 10,5 drs = 0.03084 euro
+# 1 Unit (0.03084) every 1 minute (60secs).
+# Exception1: 22:00 - 08:00 :1 Unit every 630 sec.
+# mail d.kamenopoulos@mail.ntua.gr for comments.
+################################################################
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+################################################################
+name=Hellas_EPAK_Zone1_in_euro.rts
+
+################################################################
+# currency settings
+################################################################
+
+# defines DRS (Hellenic draxmi) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=euro
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is the default rule which is used when no other rule
+# applies. The first component "10.5" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.03084
+# euro are added to the bill"
+default=(0.03084, 60)
+
+#
+# more complicated rules:
+#
+
+# "on monday until sunday from 22:00 until 08:00 the costs
+# are 0.03084 drs each 630 seconds"
+on (monday..sunday) between (22:00..08:00) use (0.03084, 630)
+
diff --git a/kppp/Rules/Greece/Hellas_EPAK_Zone2_in_euro.rst b/kppp/Rules/Greece/Hellas_EPAK_Zone2_in_euro.rst
new file mode 100644
index 00000000..cc4e0b45
--- /dev/null
+++ b/kppp/Rules/Greece/Hellas_EPAK_Zone2_in_euro.rst
@@ -0,0 +1,51 @@
+################################################################
+# NOTES:
+# these rules were made at May 25th 2001 (25/2/2001)
+# they are valid since March 2001
+# prices are in Euro. 10.5 drs = 0.03084 euro
+################################################################
+# Dimitris Kamenopoulos, el97146@mail.ntua.gr
+################################################################
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+################################################################
+name=Hellas_EPAK_Zone2_in_euro.rts
+
+################################################################
+# currency settings
+################################################################
+
+# defines Euro to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=euro
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is the default rule which is used when no other rule
+# applies. The first component "10.5" is the price of one
+# "unit", while "0.03084" is the duration in seconds.
+# Therefore the following rule means: "Every 22.5 seconds 0.03084
+# euro are added to the bill"
+default=(0.03084, 22.5)
+
+#
+# more complicated rules:
+#
+
+# "on monday until sunday from 22:00 until 08:00 the costs
+# are 0.03084 each 630 seconds"
+on (monday..sunday) between (22:00..08:00) use (0.03084, 630)
+
diff --git a/kppp/Rules/Greece/Hellas_EPAK_local_in_euro.rst b/kppp/Rules/Greece/Hellas_EPAK_local_in_euro.rst
new file mode 100644
index 00000000..ef140040
--- /dev/null
+++ b/kppp/Rules/Greece/Hellas_EPAK_local_in_euro.rst
@@ -0,0 +1,64 @@
+################################################################
+# NOTES:
+# These rules were made at May 25th, 2001 (25/5/2001)
+# These rules are valid since March, 2001
+# You can check for changes in prices at http://www.ote.gr/
+# These rules apply to you if you are accessing an ISP using an EPAK or PEAK
+# number (0965-) in the same city as you.
+# H an o ISP vrisketai stin prwtevousa tou Nomou sas (plin
+# Aitwloakarnanias kai Argolidas)
+# The costs for an EPAK local phone-call are:
+# 1 Unit (0.03084 euro) every 315 sec.
+# Exception: 22:00 - 08:00 :1 Unit every 630 sec .
+# prices are in euro. I assumed
+# 10.5 drs = 0.03084 though 10.5drs = 0.030843.... euro
+# this leads to an underestimation of the costs by less than
+# 1 Euro per year, say 50 Hrs of dialup usage per week.
+# email me if you think something should be corrected.
+# creator:
+# Dimitris Kamenopoulos, d.kamenopoulos@mail.ntua.gr
+# studying Electr. and Computer Engineering in National Technical
+# University of Athens
+################################################################
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+################################################################
+name=Hellas_EPAK_local_in_euro.rts
+
+################################################################
+# currency settings
+################################################################
+
+# defines euro to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=euro
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.03084" is the price of one
+# "unit", while "315" is the duration in seconds.
+# Therefore the following rule means: "Every 315 seconds 0.03084
+# euro is added to the bill"
+default=(0.03084, 315)
+
+#
+# more complicated rules:
+#
+
+# "on monday until sunday from 22:00 until 08:00 the costs
+# are half as above"
+on (monday..sunday) between (22:00..08:00) use (0.03084, 630)
diff --git a/kppp/Rules/Greece/Hellas_analog_local_in_euro.rst b/kppp/Rules/Greece/Hellas_analog_local_in_euro.rst
new file mode 100644
index 00000000..88e7c5d0
--- /dev/null
+++ b/kppp/Rules/Greece/Hellas_analog_local_in_euro.rst
@@ -0,0 +1,45 @@
+################################################################
+# NOTES:
+# You can check for changes in prices at http://www.ote.gr/
+# These rules apply to you if you are accessing an ISP without using an EPAK or PEAK
+# number (0965-) in the same city as you, from an analog phone (lucky you).
+# The costs for an analog local phone-call are:
+# 0.03084 euro per connection.
+################################################################
+# Dimitris Kamenopoulos d.kamenopoulos@mail.ntua.gr
+################################################################
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+################################################################
+name=Hellas_analog_local_in_euro.rts
+
+################################################################
+# currency settings
+################################################################
+
+# defines DRS (Hellenic draxmi) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=euro
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.03084
+
+# This is the default rule which is used when no other rule
+# applies.
+default=(0.0, 0)
diff --git a/kppp/Rules/Greece/Hellas_digital_local_in_euro.rst b/kppp/Rules/Greece/Hellas_digital_local_in_euro.rst
new file mode 100644
index 00000000..6545d393
--- /dev/null
+++ b/kppp/Rules/Greece/Hellas_digital_local_in_euro.rst
@@ -0,0 +1,43 @@
+################################################################
+# NOTES:
+# You can check for changes in prices at http://www.ote.gr/
+# These rules apply to you if you are accessing an ISP without using an EPAK or PEAK
+# number (0965-) in the same city as you, from a digital phone.
+# The costs for a digital local phone-call are:
+# 1 Unit (0.03084 euro) every 1 minute (60 secs).
+# Exception: 22:00 - 08:00 :1 Unit every 2 minutes (120secs).
+################################################################
+# Dimitris Kamenopoulos el97146@mail.ntua.gr
+################################################################
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+################################################################
+name=Hellas_digital_local_in_euro.rts
+
+################################################################
+# currency settings
+################################################################
+
+# defines euro to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=euro
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+
+default=(0.03084, 60)
+
+on (monday..sunday) between (22:00..08:00) use (0.03084, 120)
diff --git a/kppp/Rules/Greece/Makefile.am b/kppp/Rules/Greece/Makefile.am
new file mode 100644
index 00000000..e665b1b6
--- /dev/null
+++ b/kppp/Rules/Greece/Makefile.am
@@ -0,0 +1,9 @@
+pkg_DATA = Hellas_digital_local_in_euro.rst \
+ Hellas_EPAK_Zone1_in_euro.rst \
+ Hellas_EPAK_Zone2_in_euro.rst \
+ Hellas_EPAK_local_in_euro.rst \
+ Hellas_analog_local_in_euro.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Greece
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/HongKong/Hong_Kong_Telecom.rst b/kppp/Rules/HongKong/Hong_Kong_Telecom.rst
new file mode 100644
index 00000000..9fcbec03
--- /dev/null
+++ b/kppp/Rules/HongKong/Hong_Kong_Telecom.rst
@@ -0,0 +1,18 @@
+name=Hong Kong Telecom
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=HK$
+currency_position=right
+currency_digits=4
+
+
+
+################################################################
+# connection settings
+################################################################
+per_connection=0
+minimum_costs=0
+default=(0.0007, 1)
+
diff --git a/kppp/Rules/HongKong/Makefile.am b/kppp/Rules/HongKong/Makefile.am
new file mode 100644
index 00000000..6d60772f
--- /dev/null
+++ b/kppp/Rules/HongKong/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = Hong_Kong_Telecom.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Hong_Kong
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Hungary/Local.rst b/kppp/Rules/Hungary/Local.rst
new file mode 100644
index 00000000..7c1b05bc
--- /dev/null
+++ b/kppp/Rules/Hungary/Local.rst
@@ -0,0 +1,42 @@
+################################################################
+#
+# Local calls in Hungary
+# Valid all way in 1999 before 31Th March (I really hope)
+# by Laszlo Megyer <abulla@mail.elender.hu> from Hungary, Szekesfehervar
+# I like motorcycles, hacking and Linux.
+#
+# Please DON'T erase anything from this document, instead of correcting
+# mistakes in the sentences and rules. Thanks.
+#
+################################################################
+name=Hungary_local
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=Ft
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=8.25
+minimum_costs=0
+
+default=(1.75, 10)
+
+on (monday..friday) between (0:00..4:59) use (0.4383, 10)
+on (monday..friday) between (5:00..6:59) use (0.43833, 10)
+on (monday..friday) between (7:00..17:59) use (1.75, 10)
+on (monday..friday) between (18:00..21:59) use (0.43833, 10)
+on (monday..friday) between (22:00..23:59) use (0.4383, 10)
+
+on (saturday..sunday) between (0:00..4:59) use (0.4383, 10)
+on (saturday..sunday) between (5:00..21:59) use (0.6883, 10)
+on (saturday..sunday) between (22:00..23:59) use (0.4383, 10)
+
+# Well, there is a maximum cost of 150 Ft if the call is started any day after
+# 18:00 and finished before 7:00 or it is started after 5:00 at weekend and
+# finished before 22:00.
diff --git a/kppp/Rules/Hungary/LocalTop_MATAV.rst b/kppp/Rules/Hungary/LocalTop_MATAV.rst
new file mode 100644
index 00000000..67268f8d
--- /dev/null
+++ b/kppp/Rules/Hungary/LocalTop_MATAV.rst
@@ -0,0 +1,67 @@
+###################################################################
+#
+# B I G F A T W A R N I N G ! ! !
+#
+# T h i s i s n o t a r e a l l y f u n c t i o n a l
+# r s t f i l e
+#
+###################################################################
+
+################################################################
+#
+# Local calls in Hungary in MATAV districts
+# tarifs based on secundums!!!!! (processor eating settings)
+# Valid all way in 1999 (I hope)
+# by Gabor Jant <jamm@mail.interware.hu> (this will change soon)
+#
+################################################################
+name=Hungary_MATAV_local
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=Ft
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+per_connection=8.25
+minimum_costs=0
+default=(0.04375,1)
+
+#######################default=(0.175, 1)
+
+on (monday..friday) between (0:00..4:59) use (0.04375, 1) max (150)
+on (monday..friday) between (5:00..6:59) use (0.06875, 1) max (150)
+
+# in this peek hours interwall there is not a maximum per call....
+on (monday..friday) between (7:00..17:59) use (0.175, 1) max ()
+
+on (monday..friday) between (18:00..21:59) use (0.06875, 1) max (150)
+on (monday..friday) between (22:00..23:59) use (0.04375, 1) max (150)
+
+on (saturday..sunday) between (0:00..4:59) use (0.04375, 1) max (150)
+on (saturday..sunday) between (5:00..21:59) use (0.06875, 1) max (150)
+on (saturday..sunday) between (22:00..23:59) use (0.04375, 1) max (150)
+
+#############################################################
+# hours |2 2#0 | | 1 |1 2 |#
+# of day |2 3 4#1 2 3 4 5|6 7|8 9 0 1 2 3 4 5 6 7|8 9 0 1|#
+#############################################################
+#monday | | | | |#
+#..........| | | #
+#tuesday | 8.25/call | | 8.25 per call | |#
+#..........| | | #
+#wednesday | + | | + | |#
+#..........| | | #
+#thursday | 2.63/60sec | | 10.50 / 60 sec | |#
+#..........| | | #
+#friday | but | | | |#
+#..........| max --------------------- #
+#saturday | 150 | 8.25 per call + |#
+#..........| per call ---> 4.13 / 60 sec #
+#sunday | | but max 150 per call ------>
+#############################################################
diff --git a/kppp/Rules/Hungary/Local_MATAV.rst b/kppp/Rules/Hungary/Local_MATAV.rst
new file mode 100644
index 00000000..702a3e55
--- /dev/null
+++ b/kppp/Rules/Hungary/Local_MATAV.rst
@@ -0,0 +1,35 @@
+################################################################
+#
+# Local calls in Hungary in MATAV districts
+# tarifs based on 10 seconds
+# Valid all way in 1999 (I hope)
+# by Gabor Jant <jamm@mail.interware.hu> (this will change soon)
+#
+################################################################
+name=Hungary_MATAV_local
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=Ft
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+per_connection=8.25
+minimum_costs=0
+
+default=(1.75, 10)
+
+on (monday..friday) between (0:00..4:59) use (0.4375, 10)
+on (monday..friday) between (5:00..6:59) use (0.6875, 10)
+on (monday..friday) between (7:00..17:59) use (1.75, 10)
+on (monday..friday) between (18:00..21:59) use (0.6875, 10)
+on (monday..friday) between (22:00..23:59) use (0.4375, 10)
+
+on (saturday..sunday) between (0:00..4:59) use (0.4375, 10)
+on (saturday..sunday) between (5:00..21:59) use (0.6875, 10)
+on (saturday..sunday) between (22:00..23:59) use (0.4375, 10)
diff --git a/kppp/Rules/Hungary/Makefile.am b/kppp/Rules/Hungary/Makefile.am
new file mode 100644
index 00000000..cf6a726d
--- /dev/null
+++ b/kppp/Rules/Hungary/Makefile.am
@@ -0,0 +1,8 @@
+pkg_DATA = Local.rst \
+ Local_MATAV.rst \
+ LocalTop_MATAV.rst \
+ PapaTel.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Hungary
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Hungary/PapaTel.rst b/kppp/Rules/Hungary/PapaTel.rst
new file mode 100644
index 00000000..f8929083
--- /dev/null
+++ b/kppp/Rules/Hungary/PapaTel.rst
@@ -0,0 +1,51 @@
+################################################################
+#
+# For Hungarian text scroll down
+# Internet calls in the areacode 89 in Hungary
+# Phone number: 0651389301
+# Valid by 1st March 2001
+# By Miklos Pataki <pataki.miklos.1@freemail.hu> from Hungary, Papa
+# Date: 10th Feb 2002
+#
+# If you find some bugs or if you have any questions
+# please feel free to send me an e-mail
+#
+################################################################
+name=PapaTel
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=Ft
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+default=(0.17, 1)
+
+on (monday..friday) between (18:00..6:59) use (0.05, 1)
+on (saturday..sunday) between () use (0.05, 1)
+
+#public holidays
+on (01/01, 03/15, 05/01, 08/20, 10/23, 11/01, 12/25, 12/26) between () use (0.05, 1)
+on (easter+1) between () use (0.05, 1)
+on (easter+50) between () use (0.05, 1)
+
+################################################################
+#
+# Internet hivasok a 89-es korzetben Magyarorszagon (PapaTel korzete)
+# Behivoszam: 0651389301
+# Ervenyes: 2001. marc. 1-tol
+# Keszitette: Pataki Miklos <pataki.miklos.1@freemail.hu> Papan
+# Datum: 2002. feb. 10.
+#
+# Ha hibat eszlel vagy kerdese van
+# kerem irjon nekem egy e-mail -t
+#
+################################################################ \ No newline at end of file
diff --git a/kppp/Rules/Iceland/Iceland_general.rst b/kppp/Rules/Iceland/Iceland_general.rst
new file mode 100644
index 00000000..2c40cd07
--- /dev/null
+++ b/kppp/Rules/Iceland/Iceland_general.rst
@@ -0,0 +1,110 @@
+################################################################
+# #
+# Phone cost rules for Landsimi Islands (Iceland Telecom) #
+# #
+# Authors: Thorarinn R. Einarsson (thori@mindspring.com) #
+# Bjarni R. Einarsson (bre@netverjar.is) #
+# #
+# Created on February 2, 1999 #
+# Last updated on 5. September, 1999 #
+# #
+# Ath. Höfundar bera EKKI ábyrgð á röngum útreikningum ! #
+# #
+# Vitað er að útreikningar eru ónákvæmir, því Landssíminn #
+# rukkar fyrir skrefið, ekki mínútuna. Þessi gjaldskrá miðast #
+# hinsvegar við mínútur, og byggir á upplýsingum úr síma- #
+# skránni frá 1999. #
+# #
+################################################################
+
+### Name of ruleset ###
+name=Island_almennur_taxti
+
+### Currency symbol ### (ekki það alþjóðlega heldur það sem birtist)
+currency_symbol=kr.
+
+# Define the position of the currency symbol.
+currency_position=right
+
+# Define the number of significant digits.
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+#
+# Kostnaður við tengingu (1 skref)
+#
+
+per_connection=3.32
+
+#
+# Lágmarkskostnaður (þarf ekki að nota því 3.32 kemur á hverja tengingu)
+#
+
+minimum_costs=0.0
+
+#
+# Sjálfgefinn kostnaður - Alla virka daga á daginn.
+# Virka daga bætast 1.56 kr. við á hverjum 60 sekúndum
+# (eða 128 sek. í skrefi)
+#
+default=(1.56, 60)
+
+
+###################
+# Aukareglurnar: #################################
+###################
+
+#
+# Kvöld og næturtaxti alla virka daga
+#
+# 0.78 kr. á mín. (eða 256 sek. í skrefi)
+#
+
+on (monday..friday) between (19:00..07:59) use (0.78, 60)
+
+#
+# Helgartaxti
+#
+# Sama og K&N taxti eða 0.78 kr. á mín.
+#
+
+on (saturday..sunday) between () use (0.78, 60)
+
+
+#
+# Hátíðisdagar: Nota kvöld- og næturtaxta
+#
+# Jóladagur
+#
+
+on (12/25) between () use (0.78, 60)
+
+#
+# Hátíðisdagar nota kvöld- og næturtaxta
+#
+# Hér eru nokkrir...
+
+on (12/1, 12/24..12/26, 12/31, 01/01, 05/01, 06/17) between () use (0.78, 60)
+
+#
+# og aðrir tengdir páskum
+#
+
+# Skírdagur
+on (easter-3) between() use (0.78, 60)
+
+# Föstudagurinn langi
+on (easter-2) between() use (0.78, 60)
+
+# Annar í Páskum
+on (easter+1) between () use (0.78, 60)
+
+# Hvítasunnudagur
+on (easter+50) between () use (0.78, 60)
diff --git a/kppp/Rules/Iceland/Makefile.am b/kppp/Rules/Iceland/Makefile.am
new file mode 100644
index 00000000..a000983b
--- /dev/null
+++ b/kppp/Rules/Iceland/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = Iceland_general.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Iceland
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/India/BSNL_Local.rst b/kppp/Rules/India/BSNL_Local.rst
new file mode 100644
index 00000000..1f6008a3
--- /dev/null
+++ b/kppp/Rules/India/BSNL_Local.rst
@@ -0,0 +1,113 @@
+#####################################################################
+#
+# This is the latest rule set for Bharat Sanchar Nigam Limited,
+# It works arround 50 k.m. from any major cities in India.
+# This rule set is for M-Call to Internet Service Provider,
+# (numbers dialing with the 17XXXX format).
+# This revised tariff is applicable from 1st May 2003.
+# This is based on the BSNL Alternate packages and is applicable
+# to all the subcatogaries in this package scheme.
+#
+# Name : Thomas Mathew
+# email : thomasmathewk@netscape.net
+#
+#
+# NOTE: THIS IS MADE UNDER THE LATEST INDIAN TELECOM TARIFF.
+# I AM NOT RESPONSIBLE FOR ANY DAMAGE DUE TO USE OF THIS RULE SET.
+#
+#
+# Thanks, Bernd Wuebben
+# wuebben@math.cornell.edu / wuebben@kde.org
+#####################################################################
+
+
+#####################################################################
+#
+# BSNL_local.rst Applicable only arround 50 k.m of any major
+# cities in India. Numbers dialing with 17XXXX format without
+# any prefix.
+#
+# Salient features of Revised Telecom Tariff.
+# Local call charging 1 unit per 3 minutes during peak hours.
+# Peak hours - 06:30AM to 10:30PM.
+# Local call charging 1 unit per 10 minutes during Off peak hours.
+# Off peak hours - 10:30PM to 06:30AM.
+# Off peak rates are applicable for 24 hrs. on National Holidays
+# & Sundays.
+# Unit of call charge Rs.1.20 per unit
+#####################################################################
+name=default
+
+#####################################################################
+# Rs.1.00= Paise100
+#####################################################################
+
+# defines Rs. (Indian Rupee) to be used as currency
+# symbol (default = "$")
+currency_symbol=Rs.
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+#####################################################################
+# connection settings
+#####################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=1.20
+
+
+# You pay 1.20 for the first 180 seconds ( 3 minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+# flat_init_costs=(1.20, 180)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "1.20" is the price of one
+# "unit", while "180" is the duration in seconds.
+# Therefore the following rule means: "Every 180 seconds 1.20
+# Rs. are added to the bill"
+# default=(1.20, 180)
+
+#
+# more complicated rules:
+#
+
+# On peak hours from 06:30AM until 10:30PM the costs
+# are 1.20 each 180 seconds.
+on (monday..sunday) between (06:30..22:30) use (1.20, 180)
+# On Off peak hours from 10:30PM until 06:30AM the costs
+# are 1.20 each 600 seconds.
+on (monday..sunday) between (22:30..06:30) use (1.20, 600)
+# On all the Sundays and the three National Holidays
+# viz. Republic Day (Jan 26th), Independance Day (Aug 15th)
+# and Mahatma Gandhi's Birthday (Oct 2nd)the costs
+# are 1.20 each 600 seconds.
+on (sunday, 1/26, 8/15, 10/2) between () use (1.20,600)
+#
+# NOTE: This rule set is applicable only if your system date and
+# time are correct to your local settings.
+# End of Rules.
+# Updates to this rule set and suggessions are most welcome.
+#####################################################################
+
diff --git a/kppp/Rules/India/BSNL_Long_101_To_200.rst b/kppp/Rules/India/BSNL_Long_101_To_200.rst
new file mode 100644
index 00000000..bd4590e9
--- /dev/null
+++ b/kppp/Rules/India/BSNL_Long_101_To_200.rst
@@ -0,0 +1,86 @@
+################################################################
+#
+# This is the latest rule set for Bharat Sanchar Nigam Limited,
+# It works between 101k.m. to 200k.m. from any major cities in
+# India. This revised tariff is applicable from 01-02-2001.
+#
+# Name : Rex
+# email : rex@caltiger.com
+#
+#
+# NOTE: THIS IS MADE UNDER LATEST INDIAN TELECOM TARIFF. I AM
+# NOT RESPONSIBLE FOR ANY DAMAGE DUE TO USE OF THIS RULE SET.
+#
+#
+# Thanks, Bernd Wuebben
+# wuebben@math.cornell.edu / wuebben@kde.org
+################################################################
+
+
+################################################################
+#
+# BSNL_Long_101_To_200.rst Applicable between 101 k.m to 200k.m.
+# from any major cities in India.
+#
+# Salient features of Revised Telecom Tariff.
+# Medium-long distance (101k.m. - 200k.m.) call charging 1 unit
+# per 30 seconds.
+# Unit of call charge Rs.1.20 per unit.
+# for all types of charges : Service Tax @ 5% to be paid extra.
+################################################################
+name=default
+
+################################################################
+# Rs.1.00= Paise100
+################################################################
+
+# defines ATS (Austrian Schilling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=Rs.
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+
+# You pay .74 for the first 180 seconds ( 3 minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+flat_init_costs=(1.26, 30)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(1.26, 30)
+
+#
+# more complicated rules:
+#
diff --git a/kppp/Rules/India/BSNL_Medium_51_To_100.rst b/kppp/Rules/India/BSNL_Medium_51_To_100.rst
new file mode 100644
index 00000000..65241e62
--- /dev/null
+++ b/kppp/Rules/India/BSNL_Medium_51_To_100.rst
@@ -0,0 +1,86 @@
+################################################################
+#
+# This is the latest rule set for Bharat Sanchar Nigam Limited,
+# It works between 51 k.m. to 100k.m. from any major cities in
+# India. This revised tariff is applicable from 01-02-2001.
+#
+# Name : Rex
+# email : rex@caltiger.com
+#
+#
+# NOTE: THIS IS MADE UNDER LATEST INDIAN TELECOM TARIFF. I AM
+# NOT RESPONSIBLE FOR ANY DAMAGE DUE TO USE OF THIS RULE SET.
+#
+#
+# Thanks, Bernd Wuebben
+# wuebben@math.cornell.edu / wuebben@kde.org
+################################################################
+
+
+################################################################
+#
+# BSNL_Medium_51_To_100.rst Applicable between 51 k.m to 101k.m.
+# from any major cities in India.
+#
+# Salient features of Revised Telecom Tariff.
+# Medium distance (51k.m.-100k.m.) calls charging 1 unit per 2
+# minutes.
+# Unit of call charge Rs.1.20 per unit.
+# for all types of charges : Service Tax @ 5% to be paid extra.
+################################################################
+name=default
+
+################################################################
+# Rs.1.00= Paise100
+################################################################
+
+# defines ATS (Austrian Schilling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=Rs.
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+
+# You pay .74 for the first 180 seconds ( 3 minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+flat_init_costs=(1.26, 120)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(1.26, 120)
+
+#
+# more complicated rules:
+#
diff --git a/kppp/Rules/India/Makefile.am b/kppp/Rules/India/Makefile.am
new file mode 100644
index 00000000..a7f85ba1
--- /dev/null
+++ b/kppp/Rules/India/Makefile.am
@@ -0,0 +1,7 @@
+pkg_DATA = Vsnl_local.rst BSNL_Local.rst \
+ BSNL_Long_101_To_200.rst \
+ BSNL_Medium_51_To_100.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/India
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/India/Vsnl_local.rst b/kppp/Rules/India/Vsnl_local.rst
new file mode 100644
index 00000000..914e4e0f
--- /dev/null
+++ b/kppp/Rules/India/Vsnl_local.rst
@@ -0,0 +1,102 @@
+################################################################
+# India's Vsnl Accounting rules (for local phone dial up connections).
+# Created 18th June, 1999 by Madhusudan Singh (kchhabra@ch1.dot.net.in)
+# Valid till : next second or next great civilization (as your judgement
+# thinks !!!)
+################################################################
+#DISCLAIMER:
+#There is no guarantee that these rules are valid for all users.
+#They work for me and I can't care more. In case, you find another rule
+#set appropriate to your region, please mail it to wuebben@kde.org
+#I do not accept any responsibility for any damage/inconvenience caused by
+#the use of these rules. Use at your own risk.
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=vsnl
+
+################################################################
+# currency settings
+################################################################
+#defines Indian rupees as the currency.
+# Re 1/- = 100 paise.
+#Plural for Re. is Rs.
+#Paise is the lowest unit of coinage (Though it is hard to find any change
+#in the market, I think that we should believe the GOI that it is really the lowest
+#monetary unit)
+# symbol (not absolutely needed, default = "Rs")
+currency_symbol=Rs.
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+
+#flat_init_costs=(1.25,120)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "1.40" is the price of one
+# "unit", while "180" is the duration in seconds.
+# Therefore the following rule means: "Every 180 seconds 1.40
+# Rupees are added to the bill"
+default=(1.40, 180)
+
+# This is a major simplification.
+# Local phone call rates vary with the number of local calls made.
+# I am assuming the worst case scenario.
+# Upto 150 phone calls : Free !
+# 151-500 phone calls : 0.80
+# 501-1000 phone calls : 1.00
+# 1001-2000 phone calls : 1.25
+# >2000 phone calls : 1.40
+
+#I have not attempted to code this as it is possible that you are using
+# your phone line for ordinary voice calls/fax as well. In that case, it would
+# really be fajool di gall to code all that.
+
+#This rule set also does not do justice to those unlucky ones amongst us who have to
+#dial an outstation STD number to get to the nearest VSNL/DOT node. For them : aape karo !
+#Ate navin .rst file Wuebben nu ghall deo. (wuebben@kde.org).
+#Rabb Rakha.
+#
+# more complicated rules:
+#
+
+# The "on()" rules above all relates to current time only. You can also
+# make a rule depend on the number of seconds you have been connected
+# by specifying this time as a third argument to "use()".
+# For instance, let's say normal rate in the evening is 0.20 per minute,
+# and it drops by 20% after one hour of connect time. This can be modelled
+# like:
+
+#on () between (19:30..08:00) use (0.20, 60)
+#on () between (19:30..08:00) use (0.16, 60, 3600)
+
+# Note that these rules, just like other rules, are sensitive to the
+# order in which they appear.
+
diff --git a/kppp/Rules/Indonesia/Lokal_1_Metropolitan.rst b/kppp/Rules/Indonesia/Lokal_1_Metropolitan.rst
new file mode 100644
index 00000000..c9c71611
--- /dev/null
+++ b/kppp/Rules/Indonesia/Lokal_1_Metropolitan.rst
@@ -0,0 +1,60 @@
+################################################################
+# This is the rule set for Indonesia local calls,
+# including tax, according to Petunjuk Telepon Bandung
+# Juni 1998-1999
+# by Priyadi Iman Nurcahyo <priyadi@priyadi.ml.org>
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Lokal-1-metropolitan
+
+################################################################
+# currency settings
+################################################################
+
+# defines IDR (Indonesian Rupiah) to be used as currency
+currency_symbol=IDR
+
+# Define the position of the currency symbol.
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=0
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=160
+
+
+# This is the default rule which is used when no other rule
+# applies. The first component "160" is the price of one
+# "unit", while "120" is the duration in seconds.
+# Therefore the following rule means: "Every 120 seconds 160
+# IDR are added to the bill"
+default=(160, 120)
+
+#
+# more complicated rules:
+#
+
+on () between (00:00..08:59) use (160, 180)
+on () between (09:00..14:59) use (160, 120)
+on () between (15:00..23:59) use (160, 180)
+
diff --git a/kppp/Rules/Indonesia/Lokal_2_Metropolitan.rst b/kppp/Rules/Indonesia/Lokal_2_Metropolitan.rst
new file mode 100644
index 00000000..b437842c
--- /dev/null
+++ b/kppp/Rules/Indonesia/Lokal_2_Metropolitan.rst
@@ -0,0 +1,60 @@
+################################################################
+# This is the rule set for Indonesia local calls,
+# including tax, according to Petunjuk Telepon Bandung
+# Juni 1998-1999
+# by Priyadi Iman Nurcahyo <priyadi@priyadi.ml.org>
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Lokal-non-metropolitan
+
+################################################################
+# currency settings
+################################################################
+
+# defines IDR (Indonesian Rupiah) to be used as currency
+currency_symbol=IDR
+
+# Define the position of the currency symbol.
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=0
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=160
+
+
+# This is the default rule which is used when no other rule
+# applies. The first component "160" is the price of one
+# "unit", while "120" is the duration in seconds.
+# Therefore the following rule means: "Every 120 seconds 160
+# IDR are added to the bill"
+default=(160, 120)
+
+#
+# more complicated rules:
+#
+
+on () between (00:00..08:59) use (160, 120)
+on () between (09:00..14:59) use (160, 90)
+on () between (15:00..23:59) use (160, 120)
+
diff --git a/kppp/Rules/Indonesia/Lokal_non_metropolitan.rst b/kppp/Rules/Indonesia/Lokal_non_metropolitan.rst
new file mode 100644
index 00000000..7b293d10
--- /dev/null
+++ b/kppp/Rules/Indonesia/Lokal_non_metropolitan.rst
@@ -0,0 +1,60 @@
+################################################################
+# This is the rule set for Indonesia local calls,
+# including tax, according to Petunjuk Telepon Bandung
+# Juni 1998-1999
+# by Priyadi Iman Nurcahyo <priyadi@priyadi.ml.org>
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Lokal-non-metropolitan
+
+################################################################
+# currency settings
+################################################################
+
+# defines IDR (Indonesian Rupiah) to be used as currency
+currency_symbol=IDR
+
+# Define the position of the currency symbol.
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=0
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=160
+
+
+# This is the default rule which is used when no other rule
+# applies. The first component "160" is the price of one
+# "unit", while "120" is the duration in seconds.
+# Therefore the following rule means: "Every 120 seconds 160
+# IDR are added to the bill"
+default=(160, 120)
+
+#
+# more complicated rules:
+#
+
+on () between (00:00..08:59) use (160, 180)
+on () between (09:00..14:59) use (160, 120)
+on () between (15:00..23:59) use (160, 180)
+
diff --git a/kppp/Rules/Indonesia/Makefile.am b/kppp/Rules/Indonesia/Makefile.am
new file mode 100644
index 00000000..1de8c5c6
--- /dev/null
+++ b/kppp/Rules/Indonesia/Makefile.am
@@ -0,0 +1,7 @@
+pkg_DATA = Lokal_1_Metropolitan.rst \
+ Lokal_non_metropolitan.rst \
+ Lokal_2_Metropolitan.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Indonesia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Ireland/Eircom_Internet.rst b/kppp/Rules/Ireland/Eircom_Internet.rst
new file mode 100644
index 00000000..9aadfdae
--- /dev/null
+++ b/kppp/Rules/Ireland/Eircom_Internet.rst
@@ -0,0 +1,164 @@
+################################################################
+#
+# This is a kppp ruleset for Eircom (formerly Telecom Eireann)
+# for special-rate Internet 1891 calls ONLY.
+#
+# Unbelievably, Eircom has now dropped the former (ludicrously
+# irrelevant) distance-based charge-bands on direct-dialled calls.
+# They still remain for operator-connected calls but these are
+# (a) a rarity and (b) unusable for modems anyway. Calls in Ireland
+# are therefore in one of the following categories:
+#
+# 1. Local calls
+# 2. Special-rate Internet calls (ISPs with 1891 numbers)
+# 3. National calls (ie all other trunk or long-distance calls)
+#
+# Note that some Telcos offer special deals of a fixed-rate per-month
+# charge which gives you unlimited, uncharged local calls in off-peak
+# times. At other times, your standard Telco rates apply.
+#
+# "Local" is as hard to define as in any other Telco administration,
+# as it can cross area codes, even when they are in different regions,
+# in order to allow people to call their neighbours 100 yards away
+# even though they may technically be in an area code which would
+# normally qualify as "long-distance", because such calls don't go
+# onto the trunk, just the local exchange.
+#
+# Note all values here include Value-Added Tax at 21% current
+# at 31-Dec-1999
+#
+# Peter Flynn <peter@silmaril.ie>
+################################################################
+
+name=Ireland_Eircom_Internet
+
+# Define IEP (Irish Pounds) to be used as currency symbol
+# ??? There is no way to define the currency code AND the symbol !!!
+# WARNING this will have to be changed to EUR from 2002-01-01
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+# ??? Curious default, why not left, which is _way_ more common? !!!
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# It costs 11.5p the moment a call connects. This covers the first
+# 450 secs (peak hours, 8am-6pm M-F) or first 15 mins (off-peak)
+per_connection=0.115
+
+# Therefore the minimum cost is the same as the per-connection cost
+minimum_costs=0.115
+
+# Therefore the first 450 secs costs this much no matter what.
+flat_init_costs=(0.115,450)
+# A pity there's no peak/offpeak differential for this one.
+
+# All subsequent charging is done per-second, based on the unit
+# charge of 11.5p for 450 secs (peak hours) or 11.5p for 15mins
+# (off-peak), which works out at Ģ0.00025556/sec and Ģ0.000127778p/sec
+# respectively...that's what they claim, anyway.
+
+# Rather than expect kppp to check the rate every second and add
+# tiny fractions, I've expressed these rates in terms of the amount
+# needed to clock up half a penny (or the closest amount exceeding
+# that value obtainable by multiplying the per-second rate by an
+# integer). Not a whole penny, because you may be damn certain the
+# bean-counters will round up half-penny amounts to the nearest
+# whole penny anyway (anal-retentive, are we? :-)
+
+# Thus the base rate for peak-time calls is Ģ0.005111 for 20 secs
+# (0.115 / 450 = 0.00025556 / 0.005 = 0.051111 inv = 19.56521)
+# and off-peak is Ģ0.005111 for 40 secs
+# (0.115 / 900 = 0.000127778 / 0.005 = 0.25556 inv = 39.1304)
+# so accounting should happen in approx 1/2p increments...
+
+# OK, here we go...
+
+# Because of the need to detect time-of-day as well as initial-period,
+# this default should never actually get applied, but we assume that
+# connections are made in the peak rate period...
+default=(0.00511,20)
+
+# PEAK-TIME CALLS are 8am to 6pm Mon-Fri, so after flat_init_costs
+# this rule should apply:
+on (monday..friday) between (08:00..18:00) use (0.005111,20,450)
+
+# OFF-PEAK CALLS are 6pm to 8am Mon-Fri plus all day weekends and holidays
+# This needs to supersede the flat_init_costs on time, because that
+# only applies to the first 450 secs of PEAK-TIME calls
+on (monday..friday) between (00:00..08:00) use (0.115,900)
+on (monday..friday) between (18:00..23:59) use (0.115,900)
+on (saturday..sunday) between (00:00..23:59) use (0.115,900)
+# Thereafter the default applies after the first 15mins
+on (monday..friday) between (00:00..08:00) use (0.005111,40,900)
+on (monday..friday) between (18:00..23:59) use (0.005111,40,900)
+on (saturday..sunday) between (00:00..23:59) use (0.005111,40,900)
+
+# KNOWN HOLIDAYS
+
+# New Year's Day
+on (01/01) between (00:00..23:59) use (0.115,900)
+on (01/01) between (00:00..23:59) use (0.005111,40,900)
+
+# St Patrick's Day
+on (03/17) between (00:00..23:59) use (0.115,900)
+on (03/17) between (00:00..23:59) use (0.005111,40,900)
+
+# Easter Monday
+on (easter+1) between (00:00..23:59) use (0.115,900)
+on (easter+1) between (00:00..23:59) use (0.005111,40,900)
+
+# May Day (Bealtaine)
+on (05/01) between (00:00..23:59) use (0.115,900)
+on (05/01) between (00:00..23:59) use (0.005111,40,900)
+
+# Christmas Day and St Stephen's Day
+on (12/25) between (00:00..23:59) use (0.115,900)
+on (12/25) between (00:00..23:59) use (0.005111,40,900)
+on (12/26) between (00:00..23:59) use (0.115,900)
+on (12/26) between (00:00..23:59) use (0.005111,40,900)
+
+# This file should be refreshed every year to take account of the
+# moveable public holidays we inherited from the British practice,
+# known as "Bank Holidays" (originally the quarter-days when banks
+# had to close for accounting purposes, but now almost unpredictable).
+# These happen several times a year, always on a Monday. Dates
+# for 2000 are June 5th, August 7th, and October 30th.
+# The exact dates are known several years in advance and are fixed
+# by the Taoiseach's Office and the Dept of Local Government.
+# They are NOT the same days as British Bank Holidays, which are
+# fixed on a different basis.
+
+# June Bank Holiday 2000 (in lieu of Oimelc/Imbolc, which was in Feb)
+on (06/05) between (00:00..23:59) use (0.115,900)
+on (06/05) between (00:00..23:59) use (0.005111,40,900)
+
+# August Bank Holiday 2000 (Lughnasa)
+on (08/07) between (00:00..23:59) use (0.115,900)
+on (08/07) between (00:00..23:59) use (0.005111,40,900)
+
+# October Bank Holiday 2000 (Samhain)
+on (10/30) between (00:00..23:59) use (0.115,900)
+on (10/30) between (00:00..23:59) use (0.005111,40,900)
+
+# No automatic account is taken of Transference, when a fixed public
+# holiday occurs on a weekend, which means the following Monday becomes
+# a holiday in compensation. (1/1/2000 is a good example!!)
+
+# Transfer New Year's Day holiday 2000 to first working day afterwards
+on (01/03) between (00:00..23:59) use (0.115,900)
+on (01/03) between (00:00..23:59) use (0.005111,40,900)
+
+# None of the other fixed holidays in 2000 needs this doing.
+
+# When Christmas occurs on a Saturday (and St Stephen's Day therefore
+# on a Sunday), ONLY the following Monday is a holiday, not the Tuesday
+# as well (sorry, guys :-)
diff --git a/kppp/Rules/Ireland/Eircom_Local.rst b/kppp/Rules/Ireland/Eircom_Local.rst
new file mode 100644
index 00000000..5c898cdb
--- /dev/null
+++ b/kppp/Rules/Ireland/Eircom_Local.rst
@@ -0,0 +1,164 @@
+################################################################
+#
+# This is a kppp ruleset for Eircom (formerly Telecom Eireann)
+# for standard local calls (NOT special-rate Internet 1891 calls).
+#
+# Unbelievably, Eircom has now dropped the former (ludicrously
+# irrelevant) distance-based charge-bands on direct-dialled calls.
+# They still remain for operator-connected calls but these are
+# (a) a rarity and (b) unusable for modems anyway. Calls in Ireland
+# are therefore in one of the following categories:
+#
+# 1. Local calls
+# 2. Special-rate Internet calls (ISPs with 1891 numbers)
+# 3. National calls (ie all other trunk or long-distance calls)
+#
+# Note that some Telcos offer special deals of a fixed-rate per-month
+# charge which gives you unlimited, uncharged local calls in off-peak
+# times. At other times, your standard Telco rates apply.
+#
+# "Local" is as hard to define as in any other Telco administration,
+# as it can cross area codes, even when they are in different regions,
+# in order to allow people to call their neighbours 100 yards away
+# even though they may technically be in an area code which would
+# normally qualify as "long-distance", because such calls don't go
+# onto the trunk, just the local exchange.
+#
+# Note all values here include Value-Added Tax at 21% current
+# at 31-Dec-1999
+#
+# Peter Flynn <peter@silmaril.ie>
+################################################################
+
+name=Ireland_Eircom_Local
+
+# Define IEP (Irish Pounds) to be used as currency symbol
+# ??? There is no way to define the currency code AND the symbol !!!
+# WARNING this will have to be changed to EUR from 2002-01-01
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+# ??? Curious default, why not left, which is _way_ more common? !!!
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# It costs 11.5p the moment a call connects. This covers the first
+# 3 mins (peak hours, 8am-6pm M-F) or first 15 mins (off-peak)
+per_connection=0.115
+
+# Therefore the minimum cost is the same as the per-connection cost
+minimum_costs=0.115
+
+# Therefore the first 180 secs costs this much no matter what.
+flat_init_costs=(0.115,180)
+# A pity there's no peak/offpeak differential for this one.
+
+# All subsequent charging is done per-second, based on the unit
+# charge of 11.5p for 3mins (peak hours) or 11.5p for 15mins
+# (off-peak), which works out at Ģ0.000638889/sec and Ģ0.000127778p/sec
+# respectively...that's what they claim, anyway.
+
+# Rather than expect kppp to check the rate every second and add
+# tiny fractions, I've expressed these rates in terms of the amount
+# needed to clock up half a penny (or the closest amount exceeding
+# that value obtainable by multiplying the per-second rate by an
+# integer). Not a whole penny, because you may be damn certain the
+# bean-counters will round up half-penny amounts to the nearest
+# whole penny anyway (anal-retentive, are we? :-)
+
+# Thus the base rate for peak-time calls is Ģ0.005111 for 8 secs
+# (0.115 / 180 = 0.000638889 / 0.005 = 0.127778 inv = 7.8261)
+# and off-peak is Ģ0.005111 for 40 secs
+# (0.115 / 900 = 0.000127778 / 0.005 = 0.25556 inv = 39.1304)
+# so accounting should happen in approx 1/2p increments...
+
+# OK, here we go...
+
+# Because of the need to detect time-of-day as well as initial-period,
+# this default should never actually get applied, but we assume that
+# connections are made in the peak rate period...
+default=(0.005111,8)
+
+# PEAK-TIME CALLS are 8am to 6pm Mon-Fri, so after flat_init_costs
+# this rule should apply:
+on (monday..friday) between (08:00..18:00) use (0.005111,8,180)
+
+# OFF-PEAK CALLS are 6pm to 8am Mon-Fri plus all day weekends and holidays
+# This needs to supersede the flat_init_costs on time, because that
+# only applies to the first 180 secs of PEAK-TIME calls
+on (monday..friday) between (00:00..08:00) use (0.115,900)
+on (monday..friday) between (18:00..23:59) use (0.115,900)
+on (saturday..sunday) between (00:00..23:59) use (0.115,900)
+# Thereafter the default applies after the first 15mins
+on (monday..friday) between (00:00..08:00) use (0.005111,40,900)
+on (monday..friday) between (18:00..23:59) use (0.005111,40,900)
+on (saturday..sunday) between (00:00..23:59) use (0.005111,40,900)
+
+# KNOWN HOLIDAYS
+
+# New Year's Day
+on (01/01) between (00:00..23:59) use (0.115,900)
+on (01/01) between (00:00..23:59) use (0.005111,40,900)
+
+# St Patrick's Day
+on (03/17) between (00:00..23:59) use (0.115,900)
+on (03/17) between (00:00..23:59) use (0.005111,40,900)
+
+# Easter Monday
+on (easter+1) between (00:00..23:59) use (0.115,900)
+on (easter+1) between (00:00..23:59) use (0.005111,40,900)
+
+# May Day (Bealtaine)
+on (05/01) between (00:00..23:59) use (0.115,900)
+on (05/01) between (00:00..23:59) use (0.005111,40,900)
+
+# Christmas Day and St Stephen's Day
+on (12/25) between (00:00..23:59) use (0.115,900)
+on (12/25) between (00:00..23:59) use (0.005111,40,900)
+on (12/26) between (00:00..23:59) use (0.115,900)
+on (12/26) between (00:00..23:59) use (0.005111,40,900)
+
+# This file should be refreshed every year to take account of the
+# moveable public holidays we inherited from the British practice,
+# known as "Bank Holidays" (originally the quarter-days when banks
+# had to close for accounting purposes, but now almost unpredictable).
+# These happen several times a year, always on a Monday. Dates
+# for 2000 are June 5th, August 7th, and October 30th.
+# The exact dates are known several years in advance and are fixed
+# by the Taoiseach's Office and the Dept of Local Government.
+# They are NOT the same days as British Bank Holidays, which are
+# fixed on a different basis.
+
+# June Bank Holiday 2000 (in lieu of Oimelc/Imbolc, which was in Feb)
+on (06/05) between (00:00..23:59) use (0.115,900)
+on (06/05) between (00:00..23:59) use (0.005111,40,900)
+
+# August Bank Holiday 2000 (Lughnasa)
+on (08/07) between (00:00..23:59) use (0.115,900)
+on (08/07) between (00:00..23:59) use (0.005111,40,900)
+
+# October Bank Holiday 2000 (Samhain)
+on (10/30) between (00:00..23:59) use (0.115,900)
+on (10/30) between (00:00..23:59) use (0.005111,40,900)
+
+# No automatic account is taken of Transference, when a fixed public
+# holiday occurs on a weekend, which means the following Monday becomes
+# a holiday in compensation. (1/1/2000 is a good example!!)
+
+# Transfer New Year's Day holiday 2000 to first working day afterwards
+on (01/03) between (00:00..23:59) use (0.115,900)
+on (01/03) between (00:00..23:59) use (0.005111,40,900)
+
+# None of the other fixed holidays in 2000 needs this doing.
+
+# When Christmas occurs on a Saturday (and St Stephen's Day therefore
+# on a Sunday), ONLY the following Monday is a holiday, not the Tuesday
+# as well (sorry, guys :-)
diff --git a/kppp/Rules/Ireland/Eircom_National.rst b/kppp/Rules/Ireland/Eircom_National.rst
new file mode 100644
index 00000000..640c9a96
--- /dev/null
+++ b/kppp/Rules/Ireland/Eircom_National.rst
@@ -0,0 +1,173 @@
+################################################################
+#
+# This is a kppp ruleset for Eircom (formerly Telecom Eireann)
+# for standard national calls (NOT special-rate Internet 1891 calls).
+#
+# Unbelievably, Eircom has now dropped the former (ludicrously
+# irrelevant) distance-based charge-bands on direct-dialled calls.
+# They still remain for operator-connected calls but these are
+# (a) a rarity and (b) unusable for modems anyway. Calls in Ireland
+# are therefore in one of the following categories:
+#
+# 1. Local calls
+# 2. Special-rate Internet calls (ISPs with 1891 numbers)
+# 3. National calls (ie all other trunk or long-distance calls)
+#
+# Note that some Telcos offer special deals of a fixed-rate per-month
+# charge which gives you unlimited, uncharged local calls in off-peak
+# times. At other times, your standard Telco rates apply.
+#
+# "Local" is as hard to define as in any other Telco administration,
+# as it can cross area codes, even when they are in different regions,
+# in order to allow people to call their neighbours 100 yards away
+# even though they may technically be in an area code which would
+# normally qualify as "long-distance", because such calls don't go
+# onto the trunk, just the local exchange.
+#
+# Note all values here include Value-Added Tax at 21% current
+# at 31-Dec-1999
+#
+# Peter Flynn <peter@silmaril.ie>
+################################################################
+
+name=Ireland_Eircom_National
+
+# Define IEP (Irish Pounds) to be used as currency symbol
+# ??? There is no way to define the currency code AND the symbol !!!
+# WARNING this will have to be changed to EUR from 2002-01-01
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+# ??? Curious default, why not left, which is _way_ more common? !!!
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# It costs 11.5p the moment a call connects. This covers the first
+# 69.01 secs (peak hours, 8am-6pm M-F) or first 103.64 secs (evenings)
+# or 10 mins (weekends). Yes, they calculate to the 1/100th sec...
+per_connection=0.115
+
+# Therefore the minimum cost is the same as the per-connection cost
+minimum_costs=0.115
+
+# Therefore the first 69 secs costs this much no matter what.
+flat_init_costs=(0.115,69)
+# A pity there's no peak/offpeak differential for this one.
+
+# All subsequent charging is done per-second, based on the unit
+# charge of 11.5p for 69.01 sec (peak hours) or 11.5p for 103.64 sec
+# (evenings) or 11.5p for 600 sec (weekends), which works out at
+# Ģ0.0016664/sec, Ģ0.00110961p/sec, and Ģ0.0001916667p/sec
+# respectively...that's what they claim, anyway.
+
+# Rather than expect kppp to check the rate every second and add
+# tiny fractions, I've expressed these rates in terms of the amount
+# needed to clock up half a penny (or the closest amount exceeding
+# that value obtainable by multiplying the per-second rate by an
+# integer). Not a whole penny, because you may be damn certain the
+# bean-counters will round up half-penny amounts to the nearest
+# whole penny anyway (anal-retentive, are we? :-)
+
+# Thus the base rate for peak-time calls is Ģ0.004999 for 3 secs
+# (0.115 / 69.01 = 0.0016664251 / 0.005 = 0.3332850 inv = 3.0004)
+# evenings is Ģ0.0055481 for 5 secs
+# (0.115 / 103.64 = 0.00110961 / 0.005 = 0.2219220 inv = 4.5060869565)
+# and weekends is Ģ0.005175 for 27 secs
+# (0.115 / 600 = 0.0001916667 / 0.005 = 0.0383333 inv = 26.086956522)
+# so accounting should happen in approx 1/2p increments...
+
+# OK, here we go...
+
+# Because of the need to detect time-of-day as well as initial-period,
+# this default should never actually get applied, but we assume that
+# connections are made in the peak rate period...
+default=(0.004999,3)
+
+# PEAK-TIME CALLS are 8am to 6pm Mon-Fri, so after flat_init_costs
+# this rule should apply:
+on (monday..friday) between (08:00..18:00) use (0.004999,3,69)
+
+# EVENING CALLS are 6pm to 8am Mon-Fri
+# This needs to supersede the flat_init_costs on time, because that
+# only applies to the first 69.01 secs of PEAK-TIME calls
+on (monday..friday) between (00:00..08:00) use (0.115,104)
+on (monday..friday) between (18:00..23:59) use (0.115,104)
+# Thereafter the per-second rate applies after the first 104 secs
+on (monday..friday) between (00:00..08:00) use (0.0055481,5,104)
+on (monday..friday) between (18:00..23:59) use (0.0055481,5,104)
+
+# WEEKEND CALLS are midnight Friday to midnight Sunday
+# This needs to supersede the flat_init_costs on time, because that
+# only applies to the first 69.01 secs of PEAK-TIME calls
+on (saturday..sunday) between (00:00..23:59) use (0.115,600)
+# Thereafter the per-second rate applies after the first 104 secs
+on (saturday..sunday) between (00:00..23:59) use (0.005175,27,600)
+
+# KNOWN HOLIDAYS are all at weekend rates
+
+# New Year's Day
+on (01/01) between (00:00..23:59) use (0.115,600)
+on (01/01) between (00:00..23:59) use (0.005175,27,600)
+
+# St Patrick's Day
+on (03/17) between (00:00..23:59) use (0.115,600)
+on (03/17) between (00:00..23:59) use (0.005175,27,600)
+
+# Easter Monday
+on (easter+1) between (00:00..23:59) use (0.115,600)
+on (easter+1) between (00:00..23:59) use (0.005175,27,600)
+
+# May Day (Bealtaine)
+on (05/01) between (00:00..23:59) use (0.115,600)
+on (05/01) between (00:00..23:59) use (0.005175,27,600)
+
+# Christmas Day and St Stephen's Day
+on (12/25) between (00:00..23:59) use (0.115,600)
+on (12/25) between (00:00..23:59) use (0.005175,27,600)
+on (12/26) between (00:00..23:59) use (0.115,600)
+on (12/26) between (00:00..23:59) use (0.005175,27,600)
+
+# This file should be refreshed every year to take account of the
+# moveable public holidays we inherited from the British practice,
+# known as "Bank Holidays" (originally the quarter-days when banks
+# had to close for accounting purposes, but now almost unpredictable).
+# These happen several times a year, always on a Monday. Dates
+# for 2000 are June 5th, August 7th, and October 30th.
+# The exact dates are known several years in advance and are fixed
+# by the Taoiseach's Office and the Dept of Local Government.
+# They are NOT the same days as British Bank Holidays, which are
+# fixed on a different basis.
+
+# June Bank Holiday 2000 (in lieu of Oimelc/Imbolc, which was in Feb)
+on (06/05) between (00:00..23:59) use (0.115,600)
+on (06/05) between (00:00..23:59) use (0.005175,27,600)
+
+# August Bank Holiday 2000 (Lughnasa)
+on (08/07) between (00:00..23:59) use (0.115,600)
+on (08/07) between (00:00..23:59) use (0.005175,27,600)
+
+# October Bank Holiday 2000 (Samhain)
+on (10/30) between (00:00..23:59) use (0.115,600)
+on (10/30) between (00:00..23:59) use (0.005175,27,600)
+
+# No automatic account is taken of Transference, when a fixed public
+# holiday occurs on a weekend, which means the following Monday becomes
+# a holiday in compensation. (1/1/2000 is a good example!!)
+
+# Transfer New Year's Day holiday 2000 to first working day afterwards
+on (01/03) between (00:00..23:59) use (0.115,600)
+on (01/03) between (00:00..23:59) use (0.005175,27,600)
+
+# None of the other fixed holidays in 2000 needs this doing.
+
+# When Christmas occurs on a Saturday (and St Stephen's Day therefore
+# on a Sunday), ONLY the following Monday is a holiday, not the Tuesday
+# as well (sorry, guys :-)
diff --git a/kppp/Rules/Ireland/Eircom_Special.rst b/kppp/Rules/Ireland/Eircom_Special.rst
new file mode 100644
index 00000000..4db7ee1e
--- /dev/null
+++ b/kppp/Rules/Ireland/Eircom_Special.rst
@@ -0,0 +1,173 @@
+################################################################
+#
+# This is a kppp ruleset for Eircom (formerly Telecom Eireann)
+# for a special Esat deal of Ģ17/month flat rate to get you their
+# ISP calls uncharged and unrated evenings and weekends. Other times
+# they cost a regular phone call from your Telco (eg Eircom)
+#
+# Unbelievably, Eircom has now dropped the former (ludicrously
+# irrelevant) distance-based charge-bands on direct-dialled calls.
+# They still remain for operator-connected calls but these are
+# (a) a rarity and (b) unusable for modems anyway. Calls in Ireland
+# are therefore in one of the following categories:
+#
+# 1. Local calls
+# 2. Special-rate Internet calls (ISPs with 1891 numbers)
+# 3. National calls (ie all other trunk or long-distance calls)
+#
+# Note that some Telcos offer special deals of a fixed-rate per-month
+# charge which gives you unlimited, uncharged local calls in off-peak
+# times. At other times, your standard Telco rates apply. *THIS FILE*
+#
+# "Local" is as hard to define as in any other Telco administration,
+# as it can cross area codes, even when they are in different regions,
+# in order to allow people to call their neighbours 100 yards away
+# even though they may technically be in an area code which would
+# normally qualify as "long-distance", because such calls don't go
+# onto the trunk, just the local exchange.
+#
+# Note all values here include Value-Added Tax at 21% current
+# at 31-Dec-1999
+#
+# Peter Flynn <peter@silmaril.ie>
+################################################################
+
+name=Ireland_Eircom_Special
+
+# Define IEP (Irish Pounds) to be used as currency symbol
+# ??? There is no way to define the currency code AND the symbol !!!
+# WARNING this will have to be changed to EUR from 2002-01-01
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+# ??? Curious default, why not left, which is _way_ more common? !!!
+currency_position=left
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# It costs 11.5p the moment a call connects. This covers the first
+# 3 mins (peak hours, 8am-6pm M-F) or first 15 mins (off-peak)
+# For this special deal, this should be covered by the rules below
+per_connection=0.0
+
+# Therefore the minimum cost is the same as the per-connection cost
+minimum_costs=0.0
+
+# Therefore the first 180 secs costs this much no matter what.
+flat_init_costs=(0,0)
+# A pity there's no peak/offpeak differential for this one.
+
+# All subsequent charging is done per-second, based on the unit
+# charge of 11.5p for 3mins (peak hours) or 11.5p for 15mins
+# (off-peak), which works out at Ģ0.000638889/sec and Ģ0.000127778p/sec
+# respectively...that's what they claim, anyway.
+
+# Rather than expect kppp to check the rate every second and add
+# tiny fractions, I've expressed these rates in terms of the amount
+# needed to clock up half a penny (or the closest amount exceeding
+# that value obtainable by multiplying the per-second rate by an
+# integer). Not a whole penny, because you may be damn certain the
+# bean-counters will round up half-penny amounts to the nearest
+# whole penny anyway (anal-retentive, are we? :-)
+
+# Thus the base rate for peak-time calls is Ģ0.005111 for 8 secs
+# (0.115 / 180 = 0.000638889 / 0.005 = 0.127778 inv = 7.8261)
+# and off-peak is Ģ0.005111 for 40 secs
+# (0.115 / 900 = 0.000127778 / 0.005 = 0.25556 inv = 39.1304)
+# so accounting should happen in approx 1/2p increments...
+
+# OK, here we go...
+
+# Because of the need to detect time-of-day as well as initial-period,
+# this default should never actually get applied, but we assume that
+# connections are made in the peak rate period...
+default=(0.005111,8)
+
+# PEAK-TIME CALLS are 8am to 6pm Mon-Fri, so after flat_init_costs
+# this rule should apply:
+on (monday..friday) between (08:00..18:00) use (0.115,180)
+on (monday..friday) between (08:00..18:00) use (0.005111,8,180)
+
+# OFF-PEAK CALLS are 6pm to 8am Mon-Fri plus all day weekends and holidays
+# This needs to supersede the flat_init_costs on time, because that
+# only applies to the first 180 secs of PEAK-TIME calls
+on (monday..friday) between (00:00..08:00) use (0.115,900)
+on (monday..friday) between (18:00..23:59) use (0.115,900)
+on (saturday..sunday) between (00:00..23:59) use (0.115,900)
+# Thereafter the default applies after the first 15mins
+on (monday..friday) between (00:00..08:00) use (0.005111,40,900)
+on (monday..friday) between (18:00..23:59) use (0.005111,40,900)
+on (saturday..sunday) between (00:00..23:59) use (0.005111,40,900)
+
+# KNOWN HOLIDAYS
+
+# New Year's Day
+on (01/01) between (00:00..23:59) use (0.115,900)
+on (01/01) between (00:00..23:59) use (0.005111,40,900)
+
+# St Patrick's Day
+on (03/17) between (00:00..23:59) use (0.115,900)
+on (03/17) between (00:00..23:59) use (0.005111,40,900)
+
+# Easter Monday
+on (easter+1) between (00:00..23:59) use (0.115,900)
+on (easter+1) between (00:00..23:59) use (0.005111,40,900)
+
+# May Day (Bealtaine)
+on (05/01) between (00:00..23:59) use (0.115,900)
+on (05/01) between (00:00..23:59) use (0.005111,40,900)
+
+# Christmas Day and St Stephen's Day
+on (12/25) between (00:00..23:59) use (0.115,900)
+on (12/25) between (00:00..23:59) use (0.005111,40,900)
+on (12/26) between (00:00..23:59) use (0.115,900)
+on (12/26) between (00:00..23:59) use (0.005111,40,900)
+
+# This file should be refreshed every year to take account of the
+# moveable public holidays we inherited from the British practice,
+# known as "Bank Holidays" (originally the quarter-days when banks
+# had to close for accounting purposes, but now almost unpredictable).
+# These happen several times a year, always on a Monday. Dates
+# for 2000 are June 5th, August 7th, and October 30th.
+# The exact dates are known several years in advance and are fixed
+# by the Taoiseach's Office and the Dept of Local Government.
+# They are NOT the same days as British Bank Holidays, which are
+# fixed on a different basis.
+
+# June Bank Holiday 2000 (in lieu of Oimelc/Imbolc, which was in Feb)
+on (06/05) between (00:00..23:59) use (0.115,900)
+on (06/05) between (00:00..23:59) use (0.005111,40,900)
+
+# August Bank Holiday 2000 (Lughnasa)
+on (08/07) between (00:00..23:59) use (0.115,900)
+on (08/07) between (00:00..23:59) use (0.005111,40,900)
+
+# October Bank Holiday 2000 (Samhain)
+on (10/30) between (00:00..23:59) use (0.115,900)
+on (10/30) between (00:00..23:59) use (0.005111,40,900)
+
+# No automatic account is taken of Transference, when a fixed public
+# holiday occurs on a weekend, which means the following Monday becomes
+# a holiday in compensation. (1/1/2000 is a good example!!)
+
+# Transfer New Year's Day holiday 2000 to first working day afterwards
+on (01/03) between (00:00..23:59) use (0.115,900)
+on (01/03) between (00:00..23:59) use (0.005111,40,900)
+
+# None of the other fixed holidays in 2000 needs this doing.
+
+# When Christmas occurs on a Saturday (and St Stephen's Day therefore
+# on a Sunday), ONLY the following Monday is a holiday, not the Tuesday
+# as well (sorry, guys :-)
+
+# This is where the Esat deal bites:
+on (monday..friday) between (18:00..23:59) use (0,0)
+on (monday..friday) between (00:00..08:00) use (0,0)
+on (saturday..sunday) between (00:00..23:59) use (0,0)
diff --git a/kppp/Rules/Ireland/Makefile.am b/kppp/Rules/Ireland/Makefile.am
new file mode 100644
index 00000000..54c65e0a
--- /dev/null
+++ b/kppp/Rules/Ireland/Makefile.am
@@ -0,0 +1,8 @@
+pkg_DATA = Eircom_Internet.rst \
+ Eircom_Local.rst \
+ Eircom_National.rst \
+ Eircom_Special.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Ireland
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Israel/Bezeq_Interurban.rst b/kppp/Rules/Israel/Bezeq_Interurban.rst
new file mode 100644
index 00000000..3b006713
--- /dev/null
+++ b/kppp/Rules/Israel/Bezeq_Interurban.rst
@@ -0,0 +1,76 @@
+################################################################
+# Kppp phone cost ruleset for local calls in Israel (Sicha BeinIronit)
+#
+# Created on April 20, 2000 by Meni Livne <meni@mail.com>
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION. IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR TELEPHONE PROVIDER, CONFIGURE THIS YOURSELF AND DO
+# NOT USE THIS FILE.
+#
+# Rates valid from May 1, 2000
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Israel_Interurban
+
+################################################################
+# currency settings
+################################################################
+
+# Define NIS (New Israeli Shekel) to be used as currency symbol
+currency_symbol=NIS
+
+# Define the position of the currency symbol.
+currency_position=left
+
+# Define the number of significant digits.
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+default=(0.26, 60)
+
+# Minimum costs for a call are 23.1 Agorot. If the costs of a
+# call are less than this value, this value is used instead
+minimum_costs=0.231
+
+
+# On weekdays from 8:00 to 18:00, and on fridays from
+# 8:00 to 13:00 costs are 26 Agorot per minute
+on (sunday..thursday) between (8:00..18:00) use (0.26, 60)
+on (friday) between (8:00..13:00) use (0.26, 60)
+
+# On weekdays from 18:00 to 22:00
+# costs are 4.5 Agorot per minute
+on (sunday..thursday) between (8:00..18:00) use (0.045, 60)
+
+# On weekdays from 22:00 to 8:00, on fridays from 13:00,
+# and on saturdays costs are 1.5 Agorot per minute
+on (sunday..thursday) between (8:00..18:00) use (0.015, 60)
+on (friday) between (13:00..23:59) use (0.015, 60)
+on (saturday) between () use (0.015, 60)
+
+
+# On holiday eves from 13:00 and on holidays
+# costs are 1.5 Agorot per minute
+
+# Holidays for 2001:
+# Passover (8,14/4) Independence day (26/4), Lag Ba'Omer (11/5), Shavuot (28/5)
+on (04/07, 04/13, 04/25, 05/10, 05/27) between (13:00..23:59) use (0.015, 60)
+on (04/08, 04/14, 04/26, 05/11, 05/28) between () use (0.015, 60)
+# Rosh HaShana (18-19/9), Yom Kippur (27/9)
+on (09/17, 09/26) between (13:00..23:59) use (0.015, 60)
+on (09/18, 08/19, 09/27) between () use (0.015, 60)
diff --git a/kppp/Rules/Israel/Bezeq_Local.rst b/kppp/Rules/Israel/Bezeq_Local.rst
new file mode 100644
index 00000000..77321f0b
--- /dev/null
+++ b/kppp/Rules/Israel/Bezeq_Local.rst
@@ -0,0 +1,76 @@
+################################################################
+# Kppp phone cost ruleset for local calls in Israel (Sicha Mekomit)
+#
+# Created on April 20, 2000 by Meni Livne <meni@mail.com>
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION. IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR TELEPHONE PROVIDER, CONFIGURE THIS YOURSELF AND DO
+# NOT USE THIS FILE.
+#
+# Rates valid from May 1, 2000
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Israel_Local
+
+################################################################
+# currency settings
+################################################################
+
+# Define NIS (New Israeli Shekel) to be used as currency symbol
+currency_symbol=NIS
+
+# Define the position of the currency symbol.
+currency_position=left
+
+# Define the number of significant digits.
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+default=(0.09, 60)
+
+# Minimum costs for a call are 23.1 Agorot. If the costs of a
+# call are less than this value, this value is used instead
+minimum_costs=0.231
+
+
+# On weekdays from 8:00 to 18:00, and on fridays from
+# 8:00 to 13:00 costs are 9 Agorot per minute
+on (sunday..thursday) between (8:00..18:00) use (0.09, 60)
+on (friday) between (8:00..13:00) use (0.09, 60)
+
+# On weekdays from 18:00 to 22:00
+# costs are 4.5 Agorot per minute
+on (sunday..thursday) between (8:00..18:00) use (0.045, 60)
+
+# On weekdays from 22:00 to 8:00, on fridays from 13:00,
+# and on saturdays costs are 1.5 Agorot per minute
+on (sunday..thursday) between (8:00..18:00) use (0.015, 60)
+on (friday) between (13:00..23:59) use (0.015, 60)
+on (saturday) between () use (0.015, 60)
+
+
+# On holiday eves from 13:00 and on holidays
+# costs are 1.5 Agorot per minute
+
+# Holidays for 2001:
+# Passover (8,14/4) Independence day (26/4), Lag Ba'Omer (11/5), Shavuot (28/5)
+on (04/07, 04/13, 04/25, 05/10, 05/27) between (13:00..23:59) use (0.015, 60)
+on (04/08, 04/14, 04/26, 05/11, 05/28) between () use (0.015, 60)
+# Rosh HaShana (18-19/9), Yom Kippur (27/9)
+on (09/17, 09/26) between (13:00..23:59) use (0.015, 60)
+on (09/18, 08/19, 09/27) between () use (0.015, 60)
diff --git a/kppp/Rules/Israel/Makefile.am b/kppp/Rules/Israel/Makefile.am
new file mode 100644
index 00000000..33c16585
--- /dev/null
+++ b/kppp/Rules/Israel/Makefile.am
@@ -0,0 +1,6 @@
+pkg_DATA = Bezeq_Local.rst \
+ Bezeq_Interurban.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Israel
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Italy/Atlanet.rst b/kppp/Rules/Italy/Atlanet.rst
new file mode 100644
index 00000000..410c0162
--- /dev/null
+++ b/kppp/Rules/Italy/Atlanet.rst
@@ -0,0 +1,59 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Pino Toscano (toscano.pino@tiscali.it)
+#
+# Atlanet_Internet.rst
+#
+# COLLEGAMENTI AD INTERNET
+#
+# Ultimo aggiornamento: 16 Luglio 2003.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0 EUR.(!!) ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: 0,01 EUR ##
+## Tariffa INTERA: 0,017 EUR ##
+## ##
+## | intera dalle 08:00 alle 18:30 ##
+## Giorni FERIALI: | ridotta dalle 18:30 alle 08:00 ##
+## ##
+## Sabato e FESTIVI: ridotta tutto il giorno ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Atlanet_Internet
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0
+
+# Tariffa ridotta
+default=(0.01, 60)
+
+# Giorni feriali, sabato e domenica
+on (monday..friday) between (8:00..18:30) use (0.017, 60)
+
+# Giorni festivi
+on (01/01) between () use (0.01, 60)
+on (01/06) between () use (0.01, 60)
+on (04/25) between () use (0.01, 60)
+on (05/01) between () use (0.01, 60)
+on (08/15) between () use (0.01, 60)
+on (11/01) between () use (0.01, 60)
+on (12/08) between () use (0.01, 60)
+on (12/25) between () use (0.01, 60)
+on (12/26) between () use (0.01, 60)
+on (easter) between () use (0.01, 60)
+on (easter + 1) between () use (0.01, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Cheapnet.rst b/kppp/Rules/Italy/Cheapnet.rst
new file mode 100644
index 00000000..89629238
--- /dev/null
+++ b/kppp/Rules/Italy/Cheapnet.rst
@@ -0,0 +1,79 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Giovanni Venturi (jumpyj@tiscali.it)
+#
+# Cheapnet.rst
+#
+# CHIAMATE URBANE
+#
+# Ultimo aggiornamento: 28 Settembre 2005.
+#
+#################################################################
+## ##
+## Addebito alla risposta di 0,06192 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: fino a 15 min = 0,01092 oltre = 0,00984 ##
+## Tariffa INTERA: fino a 15 min = 0,01896 oltre = 0,01716 ##
+## ##
+## | intera dalle 08:00 alle 18:30 ##
+## Giorni FERIALI: | ridotta dalle 18:30 alle 08:00 ##
+## ##
+## Giorni FESTIVI: ridotta tutto il giorno ##
+## ##
+## Sabato: | intera dalle 08:00 alle 13:00 ##
+## | ridotta dalle 13:00 alle 08:00 ##
+## ##
+#################################################################
+
+# Nome del ruleset
+name=Cheapnet
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.06192
+
+# Tariffa ridotta fino a 15 min
+default=(0.01092, 60)
+
+# Giorni feriali, sabato e domenica
+on (monday..friday) between (18:30..8:00) use (0.00984, 60, 900)
+on (monday..friday) between (8:00..18:30) use (0.01896, 60)
+on (monday..friday) between (8:00..18:30) use (0.01716, 60, 900)
+on (saturday) between (13:00..8:00) use (0.00984, 60, 900)
+on (saturday) between (8:00..13:00) use (0.01896, 60)
+on (saturday) between (8:00..13:00) use (0.01716, 60, 900)
+on (sunday) between () use (0.00984, 60, 900)
+
+# Giorni festivi
+on (01/01) between () use (0.01092, 60)
+on (01/01) between () use (0.00984, 60, 900)
+on (01/06) between () use (0.01092, 60)
+on (01/06) between () use (0.00984, 60, 900)
+on (04/25) between () use (0.01092, 60)
+on (04/25) between () use (0.00984, 60, 900)
+on (05/01) between () use (0.01092, 60)
+on (05/01) between () use (0.00984, 60, 900)
+on (08/15) between () use (0.01092, 60)
+on (08/15) between () use (0.00984, 60, 900)
+on (11/01) between () use (0.01092, 60)
+on (11/01) between () use (0.00984, 60, 900)
+on (12/08) between () use (0.01092, 60)
+on (12/08) between () use (0.00984, 60, 900)
+on (12/25) between () use (0.01092, 60)
+on (12/25) between () use (0.00984, 60, 900)
+on (12/26) between () use (0.01092, 60)
+on (12/26) between () use (0.00984, 60, 900)
+on (easter) between () use (0.01092, 60)
+on (easter) between () use (0.00984, 60, 900)
+on (easter + 1) between () use (0.01092, 60)
+on (easter + 1) between () use (0.00984, 60, 900)
+
+# Fine
diff --git a/kppp/Rules/Italy/Infostrada_Internet_SpZero.rst b/kppp/Rules/Italy/Infostrada_Internet_SpZero.rst
new file mode 100644
index 00000000..8ba3ad9c
--- /dev/null
+++ b/kppp/Rules/Italy/Infostrada_Internet_SpZero.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Infostrada_Internet_SpZero.rst
+#
+# INTERNET
+# Collegamenti tramite numero 1055-421010
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0620 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA compresa. ##
+## ##
+## ##
+## Tariffa UNICA : 0,0095 EUR ##
+## ##
+## ##
+## Tutti i giorni : dalle 00:00 alle 24:00 ##
+## ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Infostrada_Internet_SpZero
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0620
+
+# Tutti i giorni a tutte le ore
+default=(0.0095, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Infostrada_Libero1055_Base.rst b/kppp/Rules/Italy/Infostrada_Libero1055_Base.rst
new file mode 100644
index 00000000..17502626
--- /dev/null
+++ b/kppp/Rules/Italy/Infostrada_Libero1055_Base.rst
@@ -0,0 +1,68 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Infostrada_Libero1055_Base.rst
+#
+# INTERNET
+# Collegamenti Internet con Libero 1055.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0775 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## ##
+## Tariffa RIDOTTA: 0,0190 EUR ##
+## Tariffa INTERA : 0,0350 EUR ##
+## Tariffa MINIMA : 0,0095 EUR ##
+## ##
+## | Ridotta dalle 18:30 alle 08:00 ##
+## Giorni FERIALI : | ##
+## | Intera dalle 08:00 alle 18:30 ##
+## ##
+## ##
+## Giorni FESTIVI : | Minima dalle 00:00 alle 24:00 ##
+## e SABATO : | ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Infostrada_Libero1055_Base
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0775
+
+# Giorni feriali a tariffa ridotta
+default=(0.0190, 60)
+
+# Giorni feriali a tariffa intera
+on (monday..friday) between (8:00..18:30) use (0.0350, 60)
+
+# Giorni festivi e sabato: tariffa minima
+on (saturday) between () use (0.0095, 60)
+on (sunday) between () use (0.0095, 60)
+on (01/01) between () use (0.0095, 60)
+on (01/06) between () use (0.0095, 60)
+on (04/25) between () use (0.0095, 60)
+on (05/01) between () use (0.0095, 60)
+on (08/15) between () use (0.0095, 60)
+on (11/01) between () use (0.0095, 60)
+on (12/08) between () use (0.0095, 60)
+on (12/25) between () use (0.0095, 60)
+on (12/26) between () use (0.0095, 60)
+on (easter) between () use (0.0095, 60)
+on (easter + 1) between () use (0.0095, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Infostrada_Libero1055_SpZero.rst b/kppp/Rules/Italy/Infostrada_Libero1055_SpZero.rst
new file mode 100644
index 00000000..4ae56497
--- /dev/null
+++ b/kppp/Rules/Italy/Infostrada_Libero1055_SpZero.rst
@@ -0,0 +1,73 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Infostrada_Libero1055_SpZero.rst
+#
+# NOTA:
+# Questa tariffa e' identica a Infostrada_Libero1055_Base.
+# E' stata inserita per maggior chiarezza, dato che l'operatore
+# la applica anche per i contratti SpazioZero.
+#
+# INTERNET
+# Collegamenti Internet con Libero 1055.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0775 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## ##
+## Tariffa RIDOTTA: 0,0190 EUR ##
+## Tariffa INTERA : 0,0350 EUR ##
+## Tariffa MINIMA : 0,0095 EUR ##
+## ##
+## | Ridotta dalle 18:30 alle 08:00 ##
+## Giorni FERIALI : | ##
+## | Intera dalle 08:00 alle 18:30 ##
+## ##
+## ##
+## Giorni FESTIVI : | Minima dalle 00:00 alle 24:00 ##
+## e SABATO : | ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Infostrada_Libero1055_SpZero
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0775
+
+# Giorni feriali a tariffa ridotta
+default=(0.0190, 60)
+
+# Giorni feriali a tariffa intera
+on (monday..friday) between (8:00..18:30) use (0.0350, 60)
+
+# Giorni festivi e sabato: tariffa minima
+on (saturday) between () use (0.0095, 60)
+on (sunday) between () use (0.0095, 60)
+on (01/01) between () use (0.0095, 60)
+on (01/06) between () use (0.0095, 60)
+on (04/25) between () use (0.0095, 60)
+on (05/01) between () use (0.0095, 60)
+on (08/15) between () use (0.0095, 60)
+on (11/01) between () use (0.0095, 60)
+on (12/08) between () use (0.0095, 60)
+on (12/25) between () use (0.0095, 60)
+on (12/26) between () use (0.0095, 60)
+on (easter) between () use (0.0095, 60)
+on (easter + 1) between () use (0.0095, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Infostrada_Loc_Reg_Naz_SpZero.rst b/kppp/Rules/Italy/Infostrada_Loc_Reg_Naz_SpZero.rst
new file mode 100644
index 00000000..f50befce
--- /dev/null
+++ b/kppp/Rules/Italy/Infostrada_Loc_Reg_Naz_SpZero.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Infostrada_Loc_Reg_Naz_SpZero.rst
+#
+# LOCALI, REGIONALI e NAZIONALI
+# Chiamate verso rete fissa italiana
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0620 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA compresa. ##
+## ##
+## ##
+## Tariffa UNICA : 0,0125 EUR ##
+## ##
+## ##
+## Tutti i giorni : dalle 00:00 alle 24:00 ##
+## ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Infostrada_Locali_Regionali_Nazionali_SpZero
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0620
+
+# Tutti i giorni a tutte le ore
+default=(0.0125, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Infostrada_Locali_Base.rst b/kppp/Rules/Italy/Infostrada_Locali_Base.rst
new file mode 100644
index 00000000..ab06d100
--- /dev/null
+++ b/kppp/Rules/Italy/Infostrada_Locali_Base.rst
@@ -0,0 +1,65 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Infostrada_Locali_Base.rst
+#
+# LOCALI
+# Chiamate verso localita' con lo stesso prefisso del chiamante.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0620 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## ##
+## Tariffa RIDOTTA: 0,0095 EUR ##
+## Tariffa INTERA : 0,0175 EUR ##
+## ##
+## | Ridotta dalle 18:30 alle 08:00 ##
+## Giorni FERIALI : | ##
+## | Intera dalle 08:00 alle 18:30 ##
+## ##
+## ##
+## Giorni FESTIVI : | Ridotta dalle 00:00 alle 24:00 ##
+## e SABATO : | ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Infostrada_Locali_Base
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0620
+
+# Giorni feriali a tariffa ridotta, sabato e domenica
+default=(0.0095, 60)
+
+# Giorni feriali a tariffa intera
+on (monday..friday) between (8:00..18:30) use (0.0175, 60)
+
+# Giorni festivi: tariffa ridotta
+on (01/01) between () use (0.0095, 60)
+on (01/06) between () use (0.0095, 60)
+on (04/25) between () use (0.0095, 60)
+on (05/01) between () use (0.0095, 60)
+on (08/15) between () use (0.0095, 60)
+on (11/01) between () use (0.0095, 60)
+on (12/08) between () use (0.0095, 60)
+on (12/25) between () use (0.0095, 60)
+on (12/26) between () use (0.0095, 60)
+on (easter) between () use (0.0095, 60)
+on (easter + 1) between () use (0.0095, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Infostrada_Reg_Naz_Base.rst b/kppp/Rules/Italy/Infostrada_Reg_Naz_Base.rst
new file mode 100644
index 00000000..4e424c0f
--- /dev/null
+++ b/kppp/Rules/Italy/Infostrada_Reg_Naz_Base.rst
@@ -0,0 +1,66 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Infostrada_Reg_Naz_Base.rst
+#
+# REGIONALI e NAZIONALI
+# Chiamate verso localita' con prefisso diverso dal chiamante
+# sia all'interno della stessa regione sia in una regione diversa.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0775 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA compresa. ##
+## ##
+## Tariffa RIDOTTA: 0,0295 EUR ##
+## Tariffa INTERA : 0,1085 EUR ##
+## ##
+## ##
+## | Ridotta dalle 18:30 alle 08:00 ##
+## Giorni FERIALI : | ##
+## | Intera dalle 08:00 alle 18:30 ##
+## ##
+## ##
+## Giorni FESTIVI : | Ridotta dalle 00:00 alle 24:00 ##
+## e SABATO : | ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Infostrada_Regionali_Nazionali_Base
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0775
+
+# Giorni feriali a tariffa ridotta, sabato e domenica
+default=(0.0295, 60)
+
+# Giorni feriali a tariffa intera
+on (monday..friday) between (8:00..18:30) use (0.1085, 60)
+
+# Giorni festivi: tariffa ridotta
+on (01/01) between () use (0.0295, 60)
+on (01/06) between () use (0.0295, 60)
+on (04/25) between () use (0.0295, 60)
+on (05/01) between () use (0.0295, 60)
+on (08/15) between () use (0.0295, 60)
+on (11/01) between () use (0.0295, 60)
+on (12/08) between () use (0.0295, 60)
+on (12/25) between () use (0.0295, 60)
+on (12/26) between () use (0.0295, 60)
+on (easter) between () use (0.0295, 60)
+on (easter + 1) between () use (0.0295, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Makefile.am b/kppp/Rules/Italy/Makefile.am
new file mode 100644
index 00000000..4039dc79
--- /dev/null
+++ b/kppp/Rules/Italy/Makefile.am
@@ -0,0 +1,34 @@
+pkg_DATA = Atlanet.rst \
+ Cheapnet.rst \
+ Infostrada_Internet_SpZero.rst \
+ Infostrada_Libero1055_Base.rst \
+ Infostrada_Libero1055_SpZero.rst \
+ Infostrada_Loc_Reg_Naz_SpZero.rst \
+ Infostrada_Locali_Base.rst \
+ Infostrada_Reg_Naz_Base.rst \
+ Tele2_Altri_ISP.rst \
+ Tele2_Internet_Tele2.rst \
+ Telecom_Interurbane_Fino15Km.rst \
+ Telecom_Interurbane_Oltre15Km.rst \
+ Telecom_Locali.rst \
+ Teleconomy24_Internet.rst \
+ Teleconomy24_Nazionali.rst \
+ Teleconomy_NoStop_Internet.rst \
+ Wind_24ore_Internet_AltriISP.rst \
+ Wind_24ore_Internet_InWind.rst \
+ Wind_24ore_Interurbane.rst \
+ Wind_24ore_Urbane.rst \
+ Wind_Family+SuperLight_Internet_InWind.rst \
+ Wind_Family+SuperLight_Urbane_Interurbane.rst \
+ Wind_Family_Internet_AltriISP.rst \
+ Wind_Family_Internet_InWind.rst \
+ Wind_Family_Interurbane.rst \
+ Wind_Family_Urbane.rst \
+ Wind_Flat_Internet_AltriISP.rst \
+ Wind_Flat_Internet_InWind.rst \
+ Wind_Urbana_1088_Light.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Italy
+
+EXTRA_DIST = $(pkg_DATA)
+
diff --git a/kppp/Rules/Italy/Tele2_Altri_ISP.rst b/kppp/Rules/Italy/Tele2_Altri_ISP.rst
new file mode 100644
index 00000000..4ba34d9d
--- /dev/null
+++ b/kppp/Rules/Italy/Tele2_Altri_ISP.rst
@@ -0,0 +1,64 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Giovanni Venturi (gventuri73@tiscali.it)
+#
+# Tele2_Alti_ISP.rst
+#
+# URBANE.
+#
+# Ultimo aggiornamento: 26 Giugno 2003.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0619 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## ##
+## Tariffa RIDOTTA: 0,017 EUR ##
+## Tariffa INTERA : 0,026 EUR ##
+## ##
+## | Ridotta dalle 18:30 alle 08:00 ##
+## Giorni FERIALI : | ##
+## | Intera dalle 08:00 alle 18:30 ##
+## ##
+## ##
+## Giorni FESTIVI : | Ridotta dalle 00:00 alle 24:00 ##
+## e SABATO : | ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Tele2_Altri_ISP
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0619
+
+# Giorni feriali, sabato e domenica a tariffa ridotta
+default=(0.017, 60)
+
+# Giorni feriali a tariffa intera
+on (monday..friday) between (08:00..18:30) use (0.026, 60)
+
+# Giorni festivi a tariffa ridotta
+on (01/01) between () use (0.017, 60)
+on (01/06) between () use (0.017, 60)
+on (04/25) between () use (0.017, 60)
+on (05/01) between () use (0.017, 60)
+on (08/15) between () use (0.017, 60)
+on (11/01) between () use (0.017, 60)
+on (12/08) between () use (0.017, 60)
+on (12/25) between () use (0.017, 60)
+on (12/26) between () use (0.017, 60)
+on (easter) between () use (0.017, 60)
+on (easter + 1) between () use (0.017, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Tele2_Internet_Tele2.rst b/kppp/Rules/Italy/Tele2_Internet_Tele2.rst
new file mode 100644
index 00000000..5a7b6205
--- /dev/null
+++ b/kppp/Rules/Italy/Tele2_Internet_Tele2.rst
@@ -0,0 +1,64 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Giovanni Venturi (gventuri73@tiscali.it)
+#
+# Tele2_Internet_Tele2.rst
+#
+# URBANE.
+#
+# Ultimo aggiornamento: 29 Marzo 2005.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0787 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## ##
+## Tariffa RIDOTTA: 0,0070 EUR ##
+## Tariffa INTERA : 0,0120 EUR ##
+## ##
+## | Ridotta dalle 18:30 alle 08:00 ##
+## Giorni FERIALI : | ##
+## | Intera dalle 08:00 alle 18:30 ##
+## ##
+## ##
+## Giorni FESTIVI : | Ridotta dalle 00:00 alle 24:00 ##
+## e SABATO : | ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Tele2_Internet_Tele2
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0787
+
+# Giorni feriali, sabato e domenica a tariffa ridotta
+default=(0.0070, 60)
+
+# Giorni feriali a tariffa intera
+on (monday..friday) between (08:00..18:30) use (0.0120, 60)
+
+# Giorni festivi a tariffa ridotta
+on (01/01) between () use (0.0070, 60)
+on (01/06) between () use (0.0070, 60)
+on (04/25) between () use (0.0070, 60)
+on (05/01) between () use (0.0070, 60)
+on (08/15) between () use (0.0070, 60)
+on (11/01) between () use (0.0070, 60)
+on (12/08) between () use (0.0070, 60)
+on (12/25) between () use (0.0070, 60)
+on (12/26) between () use (0.0070, 60)
+on (easter) between () use (0.0070, 60)
+on (easter + 1) between () use (0.0070, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Telecom_Interurbane_Fino15Km.rst b/kppp/Rules/Italy/Telecom_Interurbane_Fino15Km.rst
new file mode 100644
index 00000000..3b078176
--- /dev/null
+++ b/kppp/Rules/Italy/Telecom_Interurbane_Fino15Km.rst
@@ -0,0 +1,61 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it, jungbn@netsacape.net)
+#
+# Telecom_Interurbane_Fino15Km.rst
+#
+# CHIAMATE INTERURBANE ENTRO 15 KM
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0787 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: 0,0310 EUR ##
+## Tariffa INTERA : 0,0619 EUR ##
+## ##
+## | intera dalle 08:00 alle 18:30 ##
+## Giorni FERIALI: | ridotta dalle 18:30 alle 08:00 ##
+## ##
+## Giorni FESTIVI: | ridotta tutto il giorno ##
+## e SABATO: | ##
+## ##
+################################################################
+
+
+# Nome ruleset
+name=Telecom_Interurbane_Fino15Km
+
+# Impostazione valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0787
+
+# Giorni feriali, sabato e domenica a tariffa ridotta
+default=(0.0310, 60)
+
+# Giorni feriali a tariffa intera
+on (monday..friday) between (8:00..18:30) use (0.0619, 60)
+
+# Giorni festivi a tariffa ridotta
+on (01/01) between () use (0.0310, 60)
+on (01/06) between () use (0.0310, 60)
+on (04/25) between () use (0.0310, 60)
+on (05/01) between () use (0.0310, 60)
+on (08/15) between () use (0.0310, 60)
+on (11/01) between () use (0.0310, 60)
+on (12/08) between () use (0.0310, 60)
+on (12/25) between () use (0.0310, 60)
+on (12/26) between () use (0.0310, 60)
+on (easter) between () use (0.0310, 60)
+on (easter + 1) between () use (0.0310, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Telecom_Interurbane_Oltre15Km.rst b/kppp/Rules/Italy/Telecom_Interurbane_Oltre15Km.rst
new file mode 100644
index 00000000..d5371c98
--- /dev/null
+++ b/kppp/Rules/Italy/Telecom_Interurbane_Oltre15Km.rst
@@ -0,0 +1,61 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it, jungbn@netsacape.net)
+#
+# Telecom_Interurbane_Oltre15Km.rst
+#
+# CHIAMATE INTERURBANE OLTRE I 15 KM
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0787 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: 0,0310 EUR ##
+## Tariffa INTERA : 0,1146 EUR ##
+## ##
+## | intera dalle 08:00 alle 18:30 ##
+## Giorni FERIALI: | ridotta dalle 18:30 alle 08:00 ##
+## ##
+## Giorni FESTIVI: | ridotta tutto il giorno ##
+## e SABATO: | ##
+## ##
+################################################################
+
+
+# Nome ruleset
+name=Telecom_Interurbane_Oltre15Km
+
+# Impostazione valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0787
+
+# Giorni feriali, sabato e domenica a tariffa ridotta
+default=(0.0310, 60)
+
+# Giorni feriali a tariffa intera
+on (monday..friday) between (8:00..18:30) use (0.1146, 60)
+
+# Giorni festivi a tariffa ridotta
+on (01/01) between () use (0.0310, 60)
+on (01/06) between () use (0.0310, 60)
+on (04/25) between () use (0.0310, 60)
+on (05/01) between () use (0.0310, 60)
+on (08/15) between () use (0.0310, 60)
+on (11/01) between () use (0.0310, 60)
+on (12/08) between () use (0.0310, 60)
+on (12/25) between () use (0.0310, 60)
+on (12/26) between () use (0.0310, 60)
+on (easter) between () use (0.0310, 60)
+on (easter + 1) between () use (0.0310, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Telecom_Locali.rst b/kppp/Rules/Italy/Telecom_Locali.rst
new file mode 100644
index 00000000..a3e88e80
--- /dev/null
+++ b/kppp/Rules/Italy/Telecom_Locali.rst
@@ -0,0 +1,79 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Telecom_Locali.rst
+#
+# CHIAMATE URBANE
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0619 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: fino a 15 min = 0,0109 oltre = 0,0098 ##
+## Tariffa INTERA: fino a 15 min = 0,0190 oltre = 0,0172 ##
+## ##
+## | intera dalle 08:00 alle 18:30 ##
+## Giorni FERIALI: | ridotta dalle 18:30 alle 08:00 ##
+## ##
+## Giorni FESTIVI: ridotta tutto il giorno ##
+## ##
+## Sabato: | intera dalle 08:00 alle 13:00 ##
+## | ridotta dalle 13:00 alle 08:00 ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Telecom_Locali
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0619
+
+# Tariffa ridotta fino a 15 min
+default=(0.0109, 60)
+
+# Giorni feriali, sabato e domenica
+on (monday..friday) between (18:30..8:00) use (0.0098, 60, 900)
+on (monday..friday) between (8:00..18:30) use (0.0190, 60)
+on (monday..friday) between (8:00..18:30) use (0.0172, 60, 900)
+on (saturday) between (13:00..8:00) use (0.0098, 60, 900)
+on (saturday) between (8:00..13:00) use (0.0190, 60)
+on (saturday) between (8:00..13:00) use (0.0172, 60, 900)
+on (sunday) between () use (0.0098, 60, 900)
+
+# Giorni festivi
+on (01/01) between () use (0.0190, 60)
+on (01/01) between () use (0.0098, 60, 900)
+on (01/06) between () use (0.0190, 60)
+on (01/06) between () use (0.0098, 60, 900)
+on (04/25) between () use (0.0190, 60)
+on (04/25) between () use (0.0098, 60, 900)
+on (05/01) between () use (0.0190, 60)
+on (05/01) between () use (0.0098, 60, 900)
+on (08/15) between () use (0.0190, 60)
+on (08/15) between () use (0.0098, 60, 900)
+on (11/01) between () use (0.0190, 60)
+on (11/01) between () use (0.0098, 60, 900)
+on (12/08) between () use (0.0190, 60)
+on (12/08) between () use (0.0098, 60, 900)
+on (12/25) between () use (0.0190, 60)
+on (12/25) between () use (0.0098, 60, 900)
+on (12/26) between () use (0.0190, 60)
+on (12/26) between () use (0.0098, 60, 900)
+on (easter) between () use (0.0190, 60)
+on (easter) between () use (0.0098, 60, 900)
+on (easter + 1) between () use (0.0190, 60)
+on (easter + 1) between () use (0.0098, 60, 900)
+
+# Fine
diff --git a/kppp/Rules/Italy/Teleconomy24_Internet.rst b/kppp/Rules/Italy/Teleconomy24_Internet.rst
new file mode 100644
index 00000000..0cb9de05
--- /dev/null
+++ b/kppp/Rules/Italy/Teleconomy24_Internet.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Teleconomy24_Internet.rst
+#
+# Chiamate dirette ad un ISP qualsiasi (con numero appartenente
+# allo stesso distretto telefonico del chiamante o ad addebito
+# ripartito del tipo 848 anche su linea ISDN o offerta BB.B).
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0619 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: 0,0092 tutti i giorni a tutte le ore ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Teleconomy24_Internet
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0619
+
+# Tariffa unica
+default=(0.0092, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Teleconomy24_Nazionali.rst b/kppp/Rules/Italy/Teleconomy24_Nazionali.rst
new file mode 100644
index 00000000..28937a27
--- /dev/null
+++ b/kppp/Rules/Italy/Teleconomy24_Nazionali.rst
@@ -0,0 +1,39 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Teleconomy24_Nazionali.rst
+#
+# CHIAMATE NAZIONALI (urbane, distrettuali e interdistrettuali
+# verso telefoni fissi) anche su linea ISDN e offerta BB.B.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0619 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: 0,0149 tutti i giorni a tutte le ore ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Teleconomy24_Nazionali
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0619
+
+# Tariffa unica
+default=(0.0149, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Teleconomy_NoStop_Internet.rst b/kppp/Rules/Italy/Teleconomy_NoStop_Internet.rst
new file mode 100644
index 00000000..f3b1169d
--- /dev/null
+++ b/kppp/Rules/Italy/Teleconomy_NoStop_Internet.rst
@@ -0,0 +1,48 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Teleconomy_NoStop_Internet.rst
+#
+# Chiamate dirette ad un ISP qualsiasi (con numero appartenente
+# allo stesso distretto telefonico del chiamante o ad addebito
+# ripartito del tipo 848 anche su linea ISDN o offerta BB.B).
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0619 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: 0,0092 tutti i giorni a tutte le ore ##
+## ##
+## ##
+## ATTENZIONE: ##
+## ----------- ##
+## La tariffa prevede 72000 secondi (20 ore) gratis al mese. ##
+## Kppp pero' non e' in grado di tenerne conto. ##
+## Quindi ai fini del calcolo della spesa, questa tariffa e' ##
+## identica a "Teloconomy24_Internet.rst". ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Teleconomy_NoStop_Internet
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0619
+
+# Tariffa unica
+default=(0.0092, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Tiscali_Urbane.rst b/kppp/Rules/Italy/Tiscali_Urbane.rst
new file mode 100644
index 00000000..e6845b6f
--- /dev/null
+++ b/kppp/Rules/Italy/Tiscali_Urbane.rst
@@ -0,0 +1,63 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Pino Toscano (toscano.pino@tiscali.it)
+#
+# Tiscali_Urbane.rst
+#
+# CHIAMATE URBANE
+#
+# Ultimo aggiornamento: 16 Luglio 2003.
+#
+################################################################
+## ##
+## Addebito alla risposta di 0,0619 EUR. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: 0,0095 ##
+## Tariffa INTERA: 0,0169 ##
+## ##
+## | intera dalle 08:00 alle 18:30 ##
+## Giorni FERIALI: | ridotta dalle 18:30 alle 08:00 ##
+## ##
+## Giorni FESTIVI: ridotta tutto il giorno ##
+## ##
+## Sabato: | intera dalle 08:00 alle 13:00 ##
+## | ridotta dalle 13:00 alle 08:00 ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Tiscali_Urbane
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Addebito alla risposta
+per_connection=0.0619
+
+# Tariffa ridotta
+default=(0.0095, 60)
+
+# Giorni feriali, sabato e domenica
+on (monday..friday) between (8:00..18:30) use (0.0169, 60)
+on (saturday) between (8:00..13:00) use (0.0169, 60)
+
+# Giorni festivi
+on (01/01) between () use (0.0095, 60)
+on (01/06) between () use (0.0095, 60)
+on (04/25) between () use (0.0095, 60)
+on (05/01) between () use (0.0095, 60)
+on (08/15) between () use (0.0095, 60)
+on (11/01) between () use (0.0095, 60)
+on (12/08) between () use (0.0095, 60)
+on (12/25) between () use (0.0095, 60)
+on (12/26) between () use (0.0095, 60)
+on (easter) between () use (0.0095, 60)
+on (easter + 1) between () use (0.0095, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_24ore_Internet_AltriISP.rst b/kppp/Rules/Italy/Wind_24ore_Internet_AltriISP.rst
new file mode 100644
index 00000000..a4e8421f
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_24ore_Internet_AltriISP.rst
@@ -0,0 +1,38 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Internet_InWind.rst
+#
+# Chiamate dirette ad un ISP diverso da Wind.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: 0,0341 tutti i giorni a tutte le ore ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=24ore_Internet_AltriISP
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa unica
+default=(0.0341, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_24ore_Internet_InWind.rst b/kppp/Rules/Italy/Wind_24ore_Internet_InWind.rst
new file mode 100644
index 00000000..79d26db7
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_24ore_Internet_InWind.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Internet_InWind.rst
+#
+# Chiamate dirette ad un POP InWind.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: fino a 3 min = 0,0155 oltre = 0,0124 ##
+## Tutti i giorni a tutte le ore ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=24ore_Internet_InWind
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa unica
+default=(0.0155, 60)
+default=(0.0124, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_24ore_Interurbane.rst b/kppp/Rules/Italy/Wind_24ore_Interurbane.rst
new file mode 100644
index 00000000..c48dae84
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_24ore_Interurbane.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Interurbane.rst
+#
+# CHIAMATE INTERURBANE
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: fino a 3 min = 0,1116 oltre = 0,0107 ##
+## Tutti i giorni a tutte le ore ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=24ore_Interurbane
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa unica
+default=(0.1116, 60)
+default=(0.0107, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_24ore_Urbane.rst b/kppp/Rules/Italy/Wind_24ore_Urbane.rst
new file mode 100644
index 00000000..2262f872
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_24ore_Urbane.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Urbane.rst
+#
+# CHIAMATE URBANE
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: fino a 3 min = 0,0341 oltre = 0,0273 ##
+## Tutti i giorni a tutte le ore ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=24ore_Urbane
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa unica
+default=(0.0341, 60)
+default=(0.0273, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Family+SuperLight_Internet_InWind.rst b/kppp/Rules/Italy/Wind_Family+SuperLight_Internet_InWind.rst
new file mode 100644
index 00000000..29a37867
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Family+SuperLight_Internet_InWind.rst
@@ -0,0 +1,64 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Internet_InWind.rst
+#
+# Chiamate dirette ad un POP InWind.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: fino a 3 min = 0,0106 oltre = 0,0085 ##
+## Tariffa INTERA: fino a 3 min = 0,0205 oltre = 0,0164 ##
+## ##
+## | intera dalle 09:00 alle 19:00 ##
+## Giorni FERIALI: | ridotta dalle 19:00 alle 09:00 ##
+## ##
+## Giorni FESTIVI: | ridotta tutto il giorno ##
+## e SABATO: | ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Family+SuperLight_Internet_InWind
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa ridotta fino a 3 min
+default=(0.0106, 60)
+
+# Giorni feriali
+on (monday..friday) between (19:00..9:00) use (0.0085, 60, 180)
+on (monday..friday) between (9:00..19:00) use (0.0205, 60)
+on (monday..friday) between (9:00..19:00) use (0.0164, 60, 180)
+
+# Giorni festivi, sabato e domenica oltre 3 minuti
+on (saturday) between () use (0.0085, 60, 180)
+on (sunday) between () use (0.0085, 60, 180)
+on (01/01) between () use (0.0085, 60, 180)
+on (01/06) between () use (0.0085, 60, 180)
+on (04/25) between () use (0.0085, 60, 180)
+on (05/01) between () use (0.0085, 60, 180)
+on (08/15) between () use (0.0085, 60, 180)
+on (11/01) between () use (0.0085, 60, 180)
+on (12/08) between () use (0.0085, 60, 180)
+on (12/25) between () use (0.0085, 60, 180)
+on (12/26) between () use (0.0085, 60, 180)
+on (easter) between () use (0.0085, 60, 180)
+on (easter + 1) between () use (0.0085, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Family+SuperLight_Urbane_Interurbane.rst b/kppp/Rules/Italy/Wind_Family+SuperLight_Urbane_Interurbane.rst
new file mode 100644
index 00000000..ce5f46d0
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Family+SuperLight_Urbane_Interurbane.rst
@@ -0,0 +1,64 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Urbane_Interurbane.rst
+#
+# CHIAMATE URBANE E INTERURBANE
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: fino a 3 min = 0,0248 oltre = 0,0198 ##
+## Tariffa INTERA: fino a 3 min = 0,0341 oltre = 0,0273 ##
+## ##
+## | intera dalle 09:00 alle 19:00 ##
+## Giorni FERIALI: | ridotta dalle 19:00 alle 09:00 ##
+## ##
+## Giorni FESTIVI: | ridotta tutto il giorno ##
+## e SABATO: | ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Family+SuperLight_Urbane_Interurbane
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa ridotta fino a 3 min
+default=(0.0248, 60)
+
+# Giorni feriali
+on (monday..friday) between (19:00..9:00) use (0.0198, 60, 180)
+on (monday..friday) between (9:00..19:00) use (0.0341, 60)
+on (monday..friday) between (9:00..19:00) use (0.0273, 60, 180)
+
+# Giorni festivi, sabato e domenica oltre 3 minuti
+on (saturday) between () use (0.0198, 60, 180)
+on (sunday) between () use (0.0198, 60, 180)
+on (01/01) between () use (0.0198, 60, 180)
+on (01/06) between () use (0.0198, 60, 180)
+on (04/25) between () use (0.0198, 60, 180)
+on (05/01) between () use (0.0198, 60, 180)
+on (08/15) between () use (0.0198, 60, 180)
+on (11/01) between () use (0.0198, 60, 180)
+on (12/08) between () use (0.0198, 60, 180)
+on (12/25) between () use (0.0198, 60, 180)
+on (12/26) between () use (0.0198, 60, 180)
+on (easter) between () use (0.0198, 60, 180)
+on (easter + 1) between () use (0.0198, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Family_Internet_AltriISP.rst b/kppp/Rules/Italy/Wind_Family_Internet_AltriISP.rst
new file mode 100644
index 00000000..0d9322f1
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Family_Internet_AltriISP.rst
@@ -0,0 +1,60 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Internet_AltriISP.rst
+#
+# Chiamate dirette ad un ISP diverso da Wind.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: 0,0248 EUR ##
+## Tariffa INTERA : 0,0341 EUR ##
+## ##
+## | intera dalle 09:00 alle 19:00 ##
+## Giorni FERIALI: | ridotta dalle 19:00 alle 09:00 ##
+## ##
+## Giorni FESTIVI: | ridotta tutto il giorno ##
+## e SABATO: | ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Wind_Family_Internet_AltriISP
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa ridotta
+default=(0.0248, 60)
+
+# Giorni feriali
+on (monday..friday) between (9:00..19:00) use (0.0341, 60)
+
+# Giorni festivi
+on (01/01) between () use (0.0248, 60)
+on (01/06) between () use (0.0248, 60)
+on (04/25) between () use (0.0248, 60)
+on (05/01) between () use (0.0248, 60)
+on (08/15) between () use (0.0248, 60)
+on (11/01) between () use (0.0248, 60)
+on (12/08) between () use (0.0248, 60)
+on (12/25) between () use (0.0248, 60)
+on (12/26) between () use (0.0248, 60)
+on (easter) between () use (0.0248, 60)
+on (easter + 1) between () use (0.0248, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Family_Internet_InWind.rst b/kppp/Rules/Italy/Wind_Family_Internet_InWind.rst
new file mode 100644
index 00000000..9cd7291a
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Family_Internet_InWind.rst
@@ -0,0 +1,64 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Internet_InWind.rst
+#
+# Chiamate dirette ad un POP InWind.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: fino a 3 min = 0,0106 oltre = 0,0085 ##
+## Tariffa INTERA: fino a 3 min = 0,0205 oltre = 0,0164 ##
+## ##
+## | intera dalle 09:00 alle 19:00 ##
+## Giorni FERIALI: | ridotta dalle 19:00 alle 09:00 ##
+## ##
+## Giorni FESTIVI: | ridotta tutto il giorno ##
+## e SABATO: | ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Wind_Family_Internet_InWind
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa ridotta fino a 3 min
+default=(0.0106, 60)
+
+# Giorni feriali
+on (monday..friday) between (19:00..9:00) use (0.0085, 60, 180)
+on (monday..friday) between (9:00..19:00) use (0.0205, 60)
+on (monday..friday) between (9:00..19:00) use (0.0164, 60, 180)
+
+# Giorni festivi, sabato e domenica oltre 3 minuti
+on (saturday) between () use (0.0085, 60, 180)
+on (sunday) between () use (0.0085, 60, 180)
+on (01/01) between () use (0.0085, 60, 180)
+on (01/06) between () use (0.0085, 60, 180)
+on (04/25) between () use (0.0085, 60, 180)
+on (05/01) between () use (0.0085, 60, 180)
+on (08/15) between () use (0.0085, 60, 180)
+on (11/01) between () use (0.0085, 60, 180)
+on (12/08) between () use (0.0085, 60, 180)
+on (12/25) between () use (0.0085, 60, 180)
+on (12/26) between () use (0.0085, 60, 180)
+on (easter) between () use (0.0085, 60, 180)
+on (easter + 1) between () use (0.0085, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Family_Interurbane.rst b/kppp/Rules/Italy/Wind_Family_Interurbane.rst
new file mode 100644
index 00000000..144d64a3
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Family_Interurbane.rst
@@ -0,0 +1,64 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Interurbane.rst
+#
+# CHIAMATE INTERURBANE
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: fino a 3 min = 0,0775 oltre = 0,0620 ##
+## Tariffa INTERA: fino a 3 min = 0,1240 oltre = 0,0992 ##
+## ##
+## | intera dalle 09:00 alle 19:00 ##
+## Giorni FERIALI: | ridotta dalle 19:00 alle 09:00 ##
+## ##
+## Giorni FESTIVI: | ridotta tutto il giorno ##
+## e SABATO: | ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Wind_Family_Interurbane
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa ridotta fino a 3 min
+default=(0.0775, 60)
+
+# Giorni feriali
+on (monday..friday) between (19:00..9:00) use (0.0620, 60, 180)
+on (monday..friday) between (9:00..19:00) use (0.1240, 60)
+on (monday..friday) between (9:00..19:00) use (0.0992, 60, 180)
+
+# Giorni festivi, sabato e domenica oltre 3 minuti
+on (saturday) between () use (0.0620, 60, 180)
+on (sunday) between () use (0.0620, 60, 180)
+on (01/01) between () use (0.0620, 60, 180)
+on (01/06) between () use (0.0620, 60, 180)
+on (04/25) between () use (0.0620, 60, 180)
+on (05/01) between () use (0.0620, 60, 180)
+on (08/15) between () use (0.0620, 60, 180)
+on (11/01) between () use (0.0620, 60, 180)
+on (12/08) between () use (0.0620, 60, 180)
+on (12/25) between () use (0.0620, 60, 180)
+on (12/26) between () use (0.0620, 60, 180)
+on (easter) between () use (0.0620, 60, 180)
+on (easter + 1) between () use (0.0620, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Family_Urbane.rst b/kppp/Rules/Italy/Wind_Family_Urbane.rst
new file mode 100644
index 00000000..c2cacfd3
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Family_Urbane.rst
@@ -0,0 +1,64 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Urbane.rst
+#
+# CHIAMATE URBANE
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa RIDOTTA: fino a 3 min = 0,0248 oltre = 0,0198 ##
+## Tariffa INTERA: fino a 3 min = 0,0341 oltre = 0,0273 ##
+## ##
+## | intera dalle 09:00 alle 19:00 ##
+## Giorni FERIALI: | ridotta dalle 19:00 alle 09:00 ##
+## ##
+## Giorni FESTIVI: | ridotta tutto il giorno ##
+## e SABATO: | ##
+## ##
+################################################################
+
+# Nome del ruleset
+name=Wind_Family_Urbane
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa ridotta fino a 3 min
+default=(0.0248, 60)
+
+# Giorni feriali
+on (monday..friday) between (19:00..9:00) use (0.0198, 60, 180)
+on (monday..friday) between (9:00..19:00) use (0.0341, 60)
+on (monday..friday) between (9:00..19:00) use (0.0273, 60, 180)
+
+# Giorni festivi, sabato e domenica oltre 3 minuti
+on (saturday) between () use (0.0198, 60, 180)
+on (sunday) between () use (0.0198, 60, 180)
+on (01/01) between () use (0.0198, 60, 180)
+on (01/06) between () use (0.0198, 60, 180)
+on (04/25) between () use (0.0198, 60, 180)
+on (05/01) between () use (0.0198, 60, 180)
+on (08/15) between () use (0.0198, 60, 180)
+on (11/01) between () use (0.0198, 60, 180)
+on (12/08) between () use (0.0198, 60, 180)
+on (12/25) between () use (0.0198, 60, 180)
+on (12/26) between () use (0.0198, 60, 180)
+on (easter) between () use (0.0198, 60, 180)
+on (easter + 1) between () use (0.0198, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Flat_Internet_AltriISP.rst b/kppp/Rules/Italy/Wind_Flat_Internet_AltriISP.rst
new file mode 100644
index 00000000..68b1c522
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Flat_Internet_AltriISP.rst
@@ -0,0 +1,38 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Internet_AltriISP.rst
+#
+# Chiamate dirette ad un ISP diverso da Wind.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: 0,0341 tutti i giorni a tutte le ore ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Flat_Internet_AltriISP
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa unica
+default=(0.0341, 60)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Flat_Internet_InWind.rst b/kppp/Rules/Italy/Wind_Flat_Internet_InWind.rst
new file mode 100644
index 00000000..1a1cbb03
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Flat_Internet_InWind.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# kppp ruleset for Italy
+#
+# by Luca Boni (me9139@mclink.it)
+#
+# Internet_InWind.rst
+#
+# Chiamate dirette ad un POP InWind.
+#
+# Ultimo aggiornamento: 7 Marzo 2002.
+#
+################################################################
+## ##
+## Nessun addebito alla risposta. ##
+## ##
+## Tutti i prezzi si intendono in EUR/min IVA COMPRESA. ##
+## ##
+## Tariffa unica: fino a 3 min = 0,0155 oltre = 0,0093 ##
+## Tutti i giorni a tutte le ore ##
+## ##
+################################################################
+
+
+# Nome del ruleset
+name=Flat_Internet_InWind
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+# Nessun addebito alla risposta
+per_connection=0
+
+# Tariffa unica
+default=(0.0155, 60)
+default=(0.0093, 60, 180)
+
+# Fine
diff --git a/kppp/Rules/Italy/Wind_Urbana_1088_Light.rst b/kppp/Rules/Italy/Wind_Urbana_1088_Light.rst
new file mode 100644
index 00000000..969e38d0
--- /dev/null
+++ b/kppp/Rules/Italy/Wind_Urbana_1088_Light.rst
@@ -0,0 +1,53 @@
+################################################################
+# kppp ruleset for Italy
+#
+# Wind con piano telefonico '1088 light'
+# Tariffa: urbana
+#
+# by Giovanni Venturi (jumpyj@tiscali.it)
+################################################################
+
+# Nome del ruleset
+name=Wind_1088_light
+
+# Impostazioni della valuta
+currency_symbol=EUR
+currency_position=right
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+#
+# The cost is Ī 0,3719 every hour of connection.
+# Il costo e` Ī 0,3719 ogni ora di connessione.
+################################################################
+
+# Nessun addebito alla risposta
+per_connection=0.0
+minimum_costs=0.0
+
+default=(0.0001, 1)
+
+
+# Il costo e` di Ī 0,7437 l'ora nei giorni feriali
+on (monday..friday) between (09:00..19:00) use (0.0002, 1)
+
+# Giorni festivi, sabato e domenica
+on (saturday) between () use (0.0001, 1)
+on (sunday) between () use (0.0001, 1)
+on (01/01) between () use (0.0001, 1)
+on (01/06) between () use (0.0001, 1)
+on (04/25) between () use (0.0001, 1)
+on (05/01) between () use (0.0001, 1)
+on (08/15) between () use (0.0001, 1)
+on (11/01) between () use (0.0001, 1)
+on (12/08) between () use (0.0001, 1)
+on (12/25) between () use (0.0001, 1)
+on (12/26) between () use (0.0001, 1)
+on (easter) between () use (0.0001, 1)
+on (easter + 1) between () use (0.0001, 1)
+# NOTA: IVA inclusa
+
+# End of file
diff --git a/kppp/Rules/Jamaica/CWJ_InterParish.rst b/kppp/Rules/Jamaica/CWJ_InterParish.rst
new file mode 100644
index 00000000..f6393eec
--- /dev/null
+++ b/kppp/Rules/Jamaica/CWJ_InterParish.rst
@@ -0,0 +1,120 @@
+################################################################
+# This is the Ruleset for Jamaica.
+# 8 Mar 1998 (Valid until CWJamaica disides to do some deaper
+# price gaoging ?)
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE READ THE
+# RELEVANT SECTION OF THE PHONE BOOK AND CONFIGURE THIS YOURSELF.
+# AND DO NOT USE THIS FILE.
+#
+# Kevin Forge
+# <forgeltd@usa.net>
+#
+# If you use an ISP in another parish, these rules aply
+#
+# CWJ_InterParish.rst
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=default
+
+################################################################
+# currency settings
+################################################################
+
+# defines ATS (Austrian Schilling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=$
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.38
+
+
+# You pay .76 for the first 60 seconds ( 1minute ) no matter
+# whether you are connected for 1 second or 60 seconds.
+# This rule will take priority during the first 60 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+flat_init_costs=(0.76, 60)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.76" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.76, 60)
+
+#
+# more complicated rules:
+#
+
+# "on monday until sunday from 7:00 pm until 6:59 am the costs
+# are 0.38 each 60 seconds"
+on () between (19:00..11:59) use (0.38, 60)
+on () between (0:0..6:59) use (0.38, 60)
+
+
+# same as above
+# on (monday..sunday) between () use (0.2, 2)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+# on (monday..sunday) between (0:00..23:59) use (0.2, 2)
+
+# applies on sunday
+on (sunday) between () use(0.38, 60)
+
+# ATTENTION:
+# on(monday..friday) between (21:00..5:00) use (0.4,2)
+# does NOT include saturday 0:00-5:00, just monday..friday, as it says.
+
+# applies on a given date (christmas)
+# on (12/25) between () use (0.3,72)
+
+# This is most of the holidays
+on (1/1, 8/4, 12/25, 12/26, ) between () use (0.38, 60)
+
+# use this for easter
+on (easter) between () use (0.38, 60)
+
+# easter + 60 days (Pfingstmontag/ Pentecost Monday )
+# easter - 44 days ( Ash Wedensday )
+on (easter-44) between () use (0.38, 60)
+
+# ATTENTION:
+# Enable this if within your program easter is just good friday
+# and change "(easter+3)" to "(easter-3)" if it's Easter Monday
+# on (easter+3) between () use (0.38, 60)
+
+# on (thursday) between (20:00..21:52) use (8.2, 1)
diff --git a/kppp/Rules/Jamaica/CWJ_Local.rst b/kppp/Rules/Jamaica/CWJ_Local.rst
new file mode 100644
index 00000000..48cf198a
--- /dev/null
+++ b/kppp/Rules/Jamaica/CWJ_Local.rst
@@ -0,0 +1,118 @@
+################################################################
+# This is the Ruleset for Jamaica.
+# 8 Mar 1998 (Valid until CWJamaica disides to do some deaper
+# price gaoging ?)
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE READ THE
+# RELEVANT SECTION OF THE PHONE BOOK AND CONFIGURE THIS YOURSELF.
+# AND DO NOT USE THIS FILE.
+#
+# Kevin Forge
+# <forgeltd@usa.net>
+#
+# If you use an ISP in the same parish, these rules aply
+#
+# CWJ_Local.rst
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=default
+
+################################################################
+# currency settings
+################################################################
+
+# defines ATS (Austrian Schilling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=$
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.15
+
+
+# You pay .76 for the first 60 secons ( 1minute ) no matter
+# whether you are connected for 1 second or 60 seconds.
+# This rule will take priority during the first 60 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+flat_init_costs=(0.15, 60)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.15" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.15
+# Cents are added to the bill"
+default=(0.15, 60)
+
+#
+# more complicated rules:
+# do not aply since for you there is NO MERCY!!
+
+# "on monday until sunday from 7:00 pm until 6:59 am the costs
+# are 0.38 each 60 seconds"
+# on () between () use (0.15, 60)
+
+# same as above
+# on (monday..sunday) between () use (0.2, 2)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+# on (monday..sunday) between (0:00..23:59) use (0.2, 2)
+
+# applies on sunday
+# on (sunday) between () use(0.38, 60)
+
+# ATTENTION:
+# on(monday..friday) between (21:00..5:00) use (0.4,2)
+# does NOT include saturday 0:00-5:00, just monday..friday, as it says.
+
+# applies on a given date (christmas)
+# on (12/25) between () use (0.3,72)
+
+# This is most of the holidays
+# on (1/1, 8/4, 12/25, 12/26, ) between () use (0.38, 60)
+
+# use this for easter
+# on (easter) between () use (0.38, 60)
+
+# easter + 60 days (Pfingstmontag/ Pentecost Monday )
+# easter - 44 days ( Ash Wedensday )
+# on (easter-44) between () use (0.38, 60)
+
+# ATTENTION:
+# Enable this if within your program easter is just good friday
+# and change "(easter+3)" to "(easter-3)" if it's Easter Monday
+# on (easter+3) between () use (0.38, 60)
+
+# on (thursday) between (20:00..21:52) use (8.2, 1)
diff --git a/kppp/Rules/Jamaica/Makefile.am b/kppp/Rules/Jamaica/Makefile.am
new file mode 100644
index 00000000..4d05e297
--- /dev/null
+++ b/kppp/Rules/Jamaica/Makefile.am
@@ -0,0 +1,6 @@
+pkg_DATA = CWJ_InterParish.rst \
+ CWJ_Local.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Jamaica
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Japan/Makefile.am b/kppp/Rules/Japan/Makefile.am
new file mode 100644
index 00000000..486f523f
--- /dev/null
+++ b/kppp/Rules/Japan/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = NTT_Local.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Japan
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Japan/NTT_Local.rst b/kppp/Rules/Japan/NTT_Local.rst
new file mode 100644
index 00000000..c9ded14e
--- /dev/null
+++ b/kppp/Rules/Japan/NTT_Local.rst
@@ -0,0 +1,58 @@
+################################################################
+# This is the rule set for Japan, local NTT charge
+#
+# Jacek Cwielong <cwielong@annie.co.jp>
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=NTT-Local
+
+################################################################
+# currency settings
+################################################################
+
+# defines JPY (Japanese Yen) to be used as currency
+currency_symbol=JPY
+
+# Define the position of the currency symbol.
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+# This is the default rule which is used when no other rule
+# applies. The first component "10" is the price of one
+# "unit", while "180" is the duration in seconds.
+# Therefore the following rule means: "Every 180 seconds
+# 10 YPJ are added to the bill"
+default=(10,180)
+
+# applies 8am until 11pm: every 180 seconds 10 JPY
+# are added to the bill
+on () between (8:00..22:59) use(10,180)
+
+# applies 23pm until 8am: every 240 seconds 10 JPY
+# are added to the bill
+on () between (23:00..7:59) use(10,240)
diff --git a/kppp/Rules/Kazakhstan/Akparat_Sprint.rst b/kppp/Rules/Kazakhstan/Akparat_Sprint.rst
new file mode 100644
index 00000000..2e929114
--- /dev/null
+++ b/kppp/Rules/Kazakhstan/Akparat_Sprint.rst
@@ -0,0 +1,95 @@
+################################################################
+#
+# This is a sample rule set for kppp. You can use it as a
+# template when you have to create your own ruleset. If you do
+# so, remove all comments and add your own. This will allow
+# other users to check your ruleset more easily.
+#
+# Please sign the the tarif file with your name an email address
+# so that I can contact you if necessary.
+#
+# NOTE: the rules in this rule set do not make much sense and
+# are only for demonstration purposes
+#
+# NOTE ON FILENAMES:
+# when you create your own ruleset, use "_" in filename
+# instead of spaces and use ".rst as extension
+# i.e. "Austria city calls"
+# --> file should be saved as "Austria_city_calls.rst"
+#
+# Thanks, Bernd Wuebben
+# wuebben@math.cornell.edu / wuebben@kde.org
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Akparat Sprint
+
+################################################################
+# currency settings
+################################################################
+
+# defines ATS (Austrian Schilling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol="$"
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+# flat_init_costs=(0.74,180)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.1333, 60)
+
+#
+# more complicated rules:
+#
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+# on () between () use (0.2, 2)
+
+# same as above
+on (monday..sunday) between (0:00..10:00) use (0.016, 60)
+on (monday..sunday) between (23:00..23:59) use (0.016, 60)
+on (monday..friday) between (20:00..23:00) use (0.0666, 60)
+on (saturday..sunday) between (10:00..23:00) use (0.0666, 60)
diff --git a/kppp/Rules/Kazakhstan/Makefile.am b/kppp/Rules/Kazakhstan/Makefile.am
new file mode 100644
index 00000000..27aa305b
--- /dev/null
+++ b/kppp/Rules/Kazakhstan/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = Akparat_Sprint.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Kazakhstan
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Luxembourg/CMD_InternetGratuit.rst b/kppp/Rules/Luxembourg/CMD_InternetGratuit.rst
new file mode 100644
index 00000000..747d3710
--- /dev/null
+++ b/kppp/Rules/Luxembourg/CMD_InternetGratuit.rst
@@ -0,0 +1,71 @@
+################################################################
+#
+# KPPP accounting rules for "Internet Gratuit" by CMD
+#
+# The information is taken from www.cmd.lu. The rules concerning
+# legal holidays have been confirmed by CMD. (There was no
+# mention of holidays on their website.)
+# Taxes are included.
+#
+# 11.02.2005
+# Gilles Schintgen <gilles@vonet.lu>
+#
+# ##############################################################
+
+################################################################
+# name of the ruleset
+################################################################
+name=CMD_InternetGratuit
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=₮
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+# per_connection=0.0
+
+# Minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+# minimum_costs=0.0
+
+# This is what you pay for the first unit.
+# flat_init_costs=(0.0, 0)
+
+# This is the default rule which is used when no other rule
+# applies. One unit (60 seconds) accounts for 0.031 ₮
+# (= 1,25 LUF)
+default=(0.031, 60)
+
+# Normal Costs
+on (monday..friday) between (06:00..17:59) use (0.031, 60)
+on (monday..friday) between (18:00..22:59) use (0.0155, 60)
+on (saturday..sunday) between (06:00..22:59) use (0.0155, 60)
+on () between (00:00..05:59) use (0.0077, 60)
+on () between (23:00..23:59) use (0.0077, 60)
+
+# Legal Holidays
+# these days are billed just as if they were sundays
+on (01/01, easter+1, 05/01, easter+39, easter+50) between (06:00..22:59) use (0.0155, 60)
+on (06/23, 08/15, 11/01, 12/25) between (06:00..22:59) use (0.0155, 60)
+
+# 01/01: Nouvel An (New Year)
+# easter+1: Lundi de PÃĒques (Easter Monday)
+# 05/01: FÊte du travail (Labor Day)
+# easter+39: Ascension
+# easter+50: Lundi de PentecÃīte (Whit Monday)
+# 06/23: FÊte nationale (national holiday)
+# 08/15: Assomption (Assumption)
+# 11/01: Toussaint (All Saint's Day)
+# 12/25: NoÃŦl (Christmas)
diff --git a/kppp/Rules/Luxembourg/LuxembourgOnline_FreeInternet.rst b/kppp/Rules/Luxembourg/LuxembourgOnline_FreeInternet.rst
new file mode 100644
index 00000000..5431c918
--- /dev/null
+++ b/kppp/Rules/Luxembourg/LuxembourgOnline_FreeInternet.rst
@@ -0,0 +1,72 @@
+################################################################
+#
+# KPPP accounting rules for "Free Internet" by Luxembourg Online
+# (www.internet.lu; dialup number 27300030)
+#
+# For this ISP you'll only have to pay the costs of a local phone
+# call.
+# The information is taken from the current (as of 11.02.2005)
+# official price list of the "Entreprise des Postes et
+# TÃĐlÃĐcommunications Luxembourg". (Taxes are included.)
+#
+# 11.02.2005
+# Gilles Schintgen <gilles@vonet.lu>
+#
+# ##############################################################
+
+################################################################
+# name of the ruleset
+################################################################
+name=LuxembourgOnline_FreeInternet
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=₮
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+# per_connection=0.0
+
+# Minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+# minimum_costs=0.0
+
+# This is what you pay for the first unit.
+# flat_init_costs=(0.0, 0)
+
+# This is the default rule which is used when no other rule
+# applies. One unit (60 seconds) accounts for 0.0309 ₮
+# (= 1,25 LUF)
+default=(0.0309, 60)
+
+# Normal Costs
+on (monday..friday) between (00:00..07:59) use (0.0154, 60)
+on (monday..friday) between (08:00..18:59) use (0.0309, 60)
+on (monday..friday) between (19:00..23:59) use (0.0154, 60)
+on (saturday..sunday) between () use (0.0154, 60)
+
+# Legal Holidays
+# these days are billed just as if they were sundays
+on (01/01, easter+1, 05/01, easter+39, easter+50) between () use (0.0154, 60)
+on (06/23, 08/15, 11/01, 12/25) between () use (0.0154, 60)
+
+# 01/01: Nouvel An (New Year)
+# easter+1: Lundi de PÃĒques (Easter Monday)
+# 05/01: FÊte du travail (Labor Day)
+# easter+39: Ascension
+# easter+50: Lundi de PentecÃīte (Whit Monday)
+# 06/23: FÊte nationale (national holiday)
+# 08/15: Assomption (Assumption)
+# 11/01: Toussaint (All Saint's Day)
+# 12/25: NoÃŦl (Christmas)
diff --git a/kppp/Rules/Luxembourg/Makefile.am b/kppp/Rules/Luxembourg/Makefile.am
new file mode 100644
index 00000000..0c8005fd
--- /dev/null
+++ b/kppp/Rules/Luxembourg/Makefile.am
@@ -0,0 +1,6 @@
+pkg_DATA = CMD_InternetGratuit.rst LuxembourgOnline_FreeInternet.rst \
+ PetT_ClassicSurf.rst PetT_KioskSurf.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Luxembourg
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Luxembourg/PetT_ClassicSurf.rst b/kppp/Rules/Luxembourg/PetT_ClassicSurf.rst
new file mode 100644
index 00000000..329d4382
--- /dev/null
+++ b/kppp/Rules/Luxembourg/PetT_ClassicSurf.rst
@@ -0,0 +1,70 @@
+################################################################
+#
+# KPPP accounting rules for "ClassicSurf" by "Entreprise des Postes
+# et TÃĐlÃĐcommunications Luxembourg".
+#
+# The information is taken from the current (as of 11.02.2005)
+# official price list of the "Entreprise des Postes et
+# TÃĐlÃĐcommunications Luxembourg". (Taxes are included.)
+#
+# 11.02.2005
+# Gilles Schintgen <gilles@vonet.lu>
+#
+# ##############################################################
+
+################################################################
+# name of the ruleset
+################################################################
+name=PetT_ClassicSurf
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=₮
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+# per_connection=0.0
+
+# Minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+# minimum_costs=0.0
+
+# This is what you pay for the first unit.
+# flat_init_costs=(0.0, 0)
+
+# This is the default rule which is used when no other rule
+# applies.
+default=(0.0285, 60)
+
+# Normal Costs
+on (monday..friday) between (06:00..17:59) use (0.0285, 60)
+on (monday..friday) between (18:00..22:59) use (0.0155, 60)
+on (saturday..sunday) between (06:00..22:59) use (0.0155, 60)
+on () between (00:00..05:59) use (0.0092, 60)
+on () between (23:00..23:59) use (0.0092, 60)
+
+# Legal Holidays
+# these days are billed just as if they were sundays
+on (easter+1, 05/01, easter+39, easter+50) between (06:00..22:59) use (0.0155, 60)
+on (01/01, 06/23, 08/15, 11/01, 12/25) between (06:00..22:59) use (0.0155, 60)
+
+# 01/01: Nouvel An (New Year)
+# easter+1: Lundi de PÃĒques (Easter Monday)
+# 05/01: FÊte du travail (Labor Day)
+# easter+39: Ascension
+# easter+50: Lundi de PentecÃīte (Whit Monday)
+# 06/23: FÊte nationale (national holiday)
+# 08/15: Assomption (Assumption)
+# 11/01: Toussaint (All Saint's Day)
+# 12/25: NoÃŦl (Christmas)
diff --git a/kppp/Rules/Luxembourg/PetT_KioskSurf.rst b/kppp/Rules/Luxembourg/PetT_KioskSurf.rst
new file mode 100644
index 00000000..e17afded
--- /dev/null
+++ b/kppp/Rules/Luxembourg/PetT_KioskSurf.rst
@@ -0,0 +1,70 @@
+################################################################
+#
+# KPPP accounting rules for "KioskSurf" by "Entreprise des Postes
+# et TÃĐlÃĐcommunications Luxembourg".
+#
+# The information is taken from the current (as of 11.02.2005)
+# official price list of the "Entreprise des Postes et
+# TÃĐlÃĐcommunications Luxembourg". (Taxes are included.)
+#
+# 11.02.2005
+# Gilles Schintgen <gilles@vonet.lu>
+#
+# ##############################################################
+
+################################################################
+# name of the ruleset
+################################################################
+name=PetT_KioskSurf
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=₮
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+# per_connection=0.0
+
+# Minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+# minimum_costs=0.0
+
+# This is what you pay for the first unit.
+# flat_init_costs=(0.0, 0)
+
+# This is the default rule which is used when no other rule
+# applies.
+default=(0.0496, 60)
+
+# Normal Costs
+on (monday..friday) between (06:00..17:59) use (0.0496, 60)
+on (monday..friday) between (18:00..22:59) use (0.0248, 60)
+on (saturday..sunday) between (06:00..22:59) use (0.0248, 60)
+on () between (00:00..05:59) use (0.0155, 60)
+on () between (23:00..23:59) use (0.0155, 60)
+
+# Legal Holidays
+# these days are billed just as if they were sundays
+on (easter+1, 05/01, easter+39, easter+50) between (06:00..22:59) use (0.0248, 60)
+on (01/01, 06/23, 08/15, 11/01, 12/25) between (06:00..22:59) use (0.0248, 60)
+
+# 01/01: Nouvel An (New Year)
+# easter+1: Lundi de PÃĒques (Easter Monday)
+# 05/01: FÊte du travail (Labor Day)
+# easter+39: Ascension
+# easter+50: Lundi de PentecÃīte (Whit Monday)
+# 06/23: FÊte nationale (national holiday)
+# 08/15: Assomption (Assumption)
+# 11/01: Toussaint (All Saint's Day)
+# 12/25: NoÃŦl (Christmas)
diff --git a/kppp/Rules/Macedonia/Macedonia_GenericISP_interurban.rst b/kppp/Rules/Macedonia/Macedonia_GenericISP_interurban.rst
new file mode 100644
index 00000000..17ce3306
--- /dev/null
+++ b/kppp/Rules/Macedonia/Macedonia_GenericISP_interurban.rst
@@ -0,0 +1,30 @@
+##########################################################
+# kppp ruleset for all Macedonian ISPs (except MTnet)
+# This ruleset is for interurban connections
+# For the latest prices, call the phone number 971
+#
+# Created on 4-Jun-2001
+# Last modified on 1-Jul-2004
+#
+# Darko Spasovski, darkos@mt.net.mk
+# Georgi Stanojevski, georgi@unet.com.mk
+##########################################################
+
+name=Macedonia_GenericISP_interurban
+
+currency_symbol=DEN
+currency_position=right
+currency_digits=2
+
+per_connection=0.0
+minimum_costs=0.0
+default=(1.00, 20)
+
+#############################################################
+# 06:00-17:59 3.00 den. za 1 minuta (1 den za 20 sekundi)
+# 18:00-05:59 1.50 den. za 1 minuta (.05 den za 20 sekundi)
+# Vo cenite ne e presmetan DDV (+18%)
+#############################################################
+
+on () between (6:00..17:59) use (1.00,20)
+on () between (18:00..5:59) use (0.50,20)
diff --git a/kppp/Rules/Macedonia/Macedonia_GenericISP_local.rst b/kppp/Rules/Macedonia/Macedonia_GenericISP_local.rst
new file mode 100644
index 00000000..aa0f3005
--- /dev/null
+++ b/kppp/Rules/Macedonia/Macedonia_GenericISP_local.rst
@@ -0,0 +1,30 @@
+##########################################################
+# kppp ruleset for all Macedonian ISPs (except MTnet)
+# This ruleset is for local connections
+# For the latest prices, call the phone number 971
+#
+# Created on 4-Jun-2001
+# Last modified on 1-Jul-2004
+#
+# Darko Spasovski, darkos@mt.net.mk
+# Georgi Stanojevski, georgi@mt.net.mk
+##########################################################
+
+name=Macedonia_GenericISP_local
+
+currency_symbol=DEN
+currency_position=right
+currency_digits=2
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0.33, 20)
+
+#############################################################
+# 06:00-17:59 1 den. za 1 minuta (0,33 na 20 sekundi)
+# 18:00-05:59 0,6 den. za 1 minuta (0,2 na 20 sekundi)
+# Vo cenite ne e presmetan DDV (+18%)
+#############################################################
+
+on () between (6:00..17:59) use (0.33,20)
+on () between (18:00..5:59) use (0.20,20)
diff --git a/kppp/Rules/Macedonia/Macedonia_MTnet.rst b/kppp/Rules/Macedonia/Macedonia_MTnet.rst
new file mode 100644
index 00000000..dc2e8217
--- /dev/null
+++ b/kppp/Rules/Macedonia/Macedonia_MTnet.rst
@@ -0,0 +1,33 @@
+##########################################################
+# kppp ruleset for MTnet, local Macedonian ISP
+# See www.mt.net.mk for price updates
+#
+# Last updated on 4-Jun-2001
+#
+# Darko Spasovski, darkos@mt.net.mk
+##########################################################
+
+name=Macedonia_MTnet
+
+currency_symbol=DEN
+currency_position=right
+currency_digits=2
+
+per_connection=0.0
+minimum_costs=0.0
+default=(1.60, 60)
+
+#############################################################
+# 06:00-17:59 od ponedelnik do petok, 1.60 den. za minuta
+# 18:00-23:59 od ponedelnik do petok, 0.80 den. za minuta
+# 06:00-23:59 vikend i praznici, 0.80 den. za minuta
+# (za praznici se smetaat samo 1.01 i 2.05)
+# 00:00-05:59 sekoj den vo nedelata, 0.35 den. za minuta
+# Vo cenite ne e presmetan DDV (+18%)
+#############################################################
+
+on (monday..friday) between (6:00..17:59) use (1.60,60)
+on (monday..friday) between (18:00..23:59) use (0.80,60)
+on (saturday..sunday) between (6:00..23:59) use (0.80,60)
+on (01/01, 05/02) between (6:00..23:59) use (0.80,60)
+on () between (0:00..5:59) use (0.35,60)
diff --git a/kppp/Rules/Macedonia/Makefile.am b/kppp/Rules/Macedonia/Makefile.am
new file mode 100644
index 00000000..68515e48
--- /dev/null
+++ b/kppp/Rules/Macedonia/Makefile.am
@@ -0,0 +1,7 @@
+emo_DATA = Macedonia_GenericISP_interurban.rst \
+ Macedonia_GenericISP_local.rst \
+ Macedonia_MTnet.rst
+
+emodir = $(kde_datadir)/kppp/Rules/Macedonia
+
+EXTRA_DIST = $(emo_DATA)
diff --git a/kppp/Rules/Makefile.am b/kppp/Rules/Makefile.am
new file mode 100644
index 00000000..eb449306
--- /dev/null
+++ b/kppp/Rules/Makefile.am
@@ -0,0 +1,9 @@
+SUBDIRS = $(AUTODIRS)
+
+pkg_DATA = TEMPLATE
+pkg_SCRIPTS = checkrules
+
+pkgdir = $(kde_datadir)/kppp/Rules
+
+EXTRA_DIST = $(pkg_DATA)
+
diff --git a/kppp/Rules/Malaysia/Makefile.am b/kppp/Rules/Malaysia/Makefile.am
new file mode 100644
index 00000000..107f61d8
--- /dev/null
+++ b/kppp/Rules/Malaysia/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = malaysia.rst TMNet_Jaring.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Malaysia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Malaysia/TMNet_Jaring.rst b/kppp/Rules/Malaysia/TMNet_Jaring.rst
new file mode 100644
index 00000000..34d9aba6
--- /dev/null
+++ b/kppp/Rules/Malaysia/TMNet_Jaring.rst
@@ -0,0 +1,33 @@
+################################################################
+# This is the cost rule for local calls in Malaysia.
+# This cost rule include Dial-Up charge from Telekom and
+# Access charges from both Jaring or TMnet
+#
+# Paul Tan
+# root@vicert.eu.org | petra@shellyeah.org
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Malaysia_TelekomISP
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=RM
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.025
+minimum_costs=0.025
+flat_init_costs=(0.025,60)
+default=(0.025, 60)
diff --git a/kppp/Rules/Malaysia/malaysia.rst b/kppp/Rules/Malaysia/malaysia.rst
new file mode 100644
index 00000000..bf07b894
--- /dev/null
+++ b/kppp/Rules/Malaysia/malaysia.rst
@@ -0,0 +1,38 @@
+################################################################
+# This is the cost rule for local calls in Malaysia, if you
+# using Telekom, TMnet or Jaring as of 03/01/98.
+# This cost rule include only Dial-Up charge from Telekom and
+# not Access charges from both Jaring or TMnet
+# Acess : RM0.01 per minute (from TMnet and Jaring)
+# Dial-up : RM0.015 per minute (from Telekom)
+# Total : RM0.025 per minute
+# Or in other words the cost rule only calculate phone bill !
+#
+# Choong Hong Cheng
+# chc@tm.net.my OR chc@rocketmail.com
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Malaysia_Telekom
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=RM
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.015
+minimum_costs=0.015
+flat_init_costs=(0.015,60)
+default=(0.015, 60)
diff --git a/kppp/Rules/Netherlands/12Move.rst b/kppp/Rules/Netherlands/12Move.rst
new file mode 100644
index 00000000..83fa9af2
--- /dev/null
+++ b/kppp/Rules/Netherlands/12Move.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# kppp rules voor 12Move
+# informatie gehaald van http://www.12move.nl/content/article/376150.htm
+# laatste bijwerking op 26-11-2002
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 3.08 cpm = 0.0513333 cps 08:00-18:59
+# daltarief 1.65 cpm = 0.0275 cps 19:00-23:59
+# nacht 1.09 cpm = 0.0181667 cps 00:00-07:59
+# Zaterdag 1.09 cpm = 0.0181667 cps 00:00-23:59
+# Zondag 1.09 cpm = 0.0181667 cps 00:00-23:59
+#
+# Starttarief 4.14 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBudget Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0414
+minimum_costs=0.0
+
+# standaardtarief:
+default=(0.000513333, 1)
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.000275, 1)
+
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.000181667, 1)
+
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.000181667, 1)
+on (sunday) between (00:00..23:59) use (0.000181667, 1)
diff --git a/kppp/Rules/Netherlands/BelBasis_Buiten_Regio.rst b/kppp/Rules/Netherlands/BelBasis_Buiten_Regio.rst
new file mode 100644
index 00000000..90032c6f
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelBasis_Buiten_Regio.rst
@@ -0,0 +1,31 @@
+################################################################
+#
+# kppp rules voor KPN BelBasis abonnement per seconde
+#
+# Alleen voor buiten de regio gesprekken
+#
+# Kosten:
+# standaardtarief doordeweeks 4.25 cpm=.0708333 cps 08:00-18:59
+# daltarief 'savonds 2.01 cpm= 0.335 cps 19.00-23.59
+# 's-nachts en in weekend 4.44 cpm=0.074 cps
+#
+# Starttarief 5 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBasis Buiten Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.05
+minimum_costs=0.0
+
+default=(0.000335, 1)
+on (monday..friday) between (08:00..18:59) use (0.000708333, 1)
+on (monday..friday) between (19:00..23:59) use (0.000335, 1)
diff --git a/kppp/Rules/Netherlands/BelBasis_Buiten_Regio_Nummervoordeel.rst b/kppp/Rules/Netherlands/BelBasis_Buiten_Regio_Nummervoordeel.rst
new file mode 100644
index 00000000..2ccb26fc
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelBasis_Buiten_Regio_Nummervoordeel.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# kppp rules voor KPN BelBasis abonnement per seconde + nummervoordeel
+#
+# Alleen voor buiten de regio gesprekken
+#
+# Kosten:
+# standaardtarief doordeweeks 3.83 cpm=0.000638333 cps 08:00-18:59
+# 's-avonds en in weekend 1.81 cpm=0.000301667 cps
+#
+# Starttarief 4.5 ct per gesprek #
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBasis Buiten Regio Nummervoordeel
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.045
+minimum_costs=0.0
+
+default=(0.000301667, 1)
+on (monday..friday) between (08:00..18:59) use (0.000638333, 1)
+
diff --git a/kppp/Rules/Netherlands/BelBasis_Regio.rst b/kppp/Rules/Netherlands/BelBasis_Regio.rst
new file mode 100644
index 00000000..b249c9df
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelBasis_Regio.rst
@@ -0,0 +1,35 @@
+################################################################
+#
+# kppp rules voor KPN BelBasis abonnement per seconde
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 2,80 cpm=0.0466667 cps 08:00-18:59
+# daltarief 1.5 cpm=0.025 cps 19:00-23:59
+# nacht 1 cpm=0.0166667 cps 00:00-07:59
+# Zaterdag 1 cpm=0.0166667 cps 00:00-23:59
+# Zondag 1 cpm=0.0166667 cps 00:00-23:59
+#
+# Starttarief 4.14 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBasis Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0414
+minimum_costs=0.0
+
+default=(0.000466667, 1)
+on (monday..friday) between (19:00..23:59) use (0.00025, 1)
+on (monday..friday) between (00:00..07:59) use (0.000166667, 1)
+on (saturday) between (00:00..23:59) use (0.000166667, 1)
+on (sunday) between (00:00..23:59) use (0.000166667, 1)
diff --git a/kppp/Rules/Netherlands/BelBasis_Regio_Nummervoordeel.rst b/kppp/Rules/Netherlands/BelBasis_Regio_Nummervoordeel.rst
new file mode 100644
index 00000000..a2100c6f
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelBasis_Regio_Nummervoordeel.rst
@@ -0,0 +1,35 @@
+################################################################
+#
+# kppp rules voor KPN BelBasis abonnement + nummervoordeel per seconde
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 2.52 cpm=0.042 cps 08:00-18:59
+# daltarief 1.35 cpm=0.0225 cps 19:00-23:59
+# nacht 0.9 cpm=0.015 cps 00:00-07:59
+# Zaterdag 0.9 cpm=0.015 cps 00:00-23:59
+# Zondag 0.9 cpm=0.015 cps 00:00-23:59
+#
+# Starttarief 3.73 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBasis Regio Nummervoordeel per seconde
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0373
+minimum_costs=0.0
+
+default=(0.00042, 1)
+on (monday..friday) between (19:00..23:59) use (0.000225, 1)
+on (monday..friday) between (00:00..07:59) use (0.00015, 1)
+on (saturday) between (00:00..23:59) use (0.00015, 1)
+on (sunday) between (00:00..23:59) use (0.00015, 1)
diff --git a/kppp/Rules/Netherlands/BelBudget_Buiten_Regio.rst b/kppp/Rules/Netherlands/BelBudget_Buiten_Regio.rst
new file mode 100644
index 00000000..0a4b696b
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelBudget_Buiten_Regio.rst
@@ -0,0 +1,30 @@
+################################################################
+#
+# kppp rules voor KPN BelBudget abonnement per seconde
+#
+# Alleen voor buiten de regio gesprekken
+#
+# Kosten:
+# standaardtarief doordeweeks 21,25 cpm=0.354167 cps 08:00-18:59
+# 's-avonds en in weekend 10,06 cpm=0.167667 cps
+#
+# Starttarief 4.9 ct per gesprek #
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands Belbudget Buiten Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.049
+minimum_costs=0.0
+
+default=(0.00167667, 1)
+on (monday..friday) between (08:00..18:59) use (0.00354167, 1)
+
diff --git a/kppp/Rules/Netherlands/BelBudget_Regio.rst b/kppp/Rules/Netherlands/BelBudget_Regio.rst
new file mode 100644
index 00000000..7fff5134
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelBudget_Regio.rst
@@ -0,0 +1,36 @@
+################################################################
+#
+# kppp rules voor KPN BelBudget abonnement
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 9.18 cpm=0.153 cps 08:00-18:59
+# daltarief 4.54 cpm=0.0756667 cps 19:00-23:59
+# nacht 3.28 cpm=0.0546667 cps 00:00-07:59
+# Zaterdag 3.28 cpm=0.0546667 cps 00:00-23:59
+# Zondag 3.28 cpm=0.0546667 cps 00:00-23:59
+#
+# Starttarief 4.14 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBudget Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0414
+minimum_costs=0.0
+
+default=(0.00153, 1)
+on (monday..friday) between (19:00..23:59) use (0.000756667, 1)
+on (monday..friday) between (00:00..07:59) use (0.000546667, 1)
+on (saturday) between (00:00..23:59) use (0.000546667, 1)
+on (sunday) between (00:00..23:59) use (0.000546667, 1)
diff --git a/kppp/Rules/Netherlands/BelPlus_Buiten_Regio.rst b/kppp/Rules/Netherlands/BelPlus_Buiten_Regio.rst
new file mode 100644
index 00000000..3bc7a742
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelPlus_Buiten_Regio.rst
@@ -0,0 +1,32 @@
+################################################################
+#
+# kppp rules voor KPN Belplus abonnement per seconde
+#
+# Alleen voor buiten de regio gesprekken
+# Laatste wijziging: 09-07-2003
+#
+# Kosten:
+# standaardtarief doordeweeks 4.39 cpm= 0.07316666667 cps 08:00-18:59
+# daltarief 'savonds 2,08 cpm= 0.03466666667 cps 19.00-23.59
+# 's-nachts en in weekend 2,08 cpm= 0.03466666667 cps
+#
+# Starttarief 0,0518 euro per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBasis Buiten Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0518
+minimum_costs=0.0
+
+default=(0.03466666667, 1)
+on (monday..friday) between (08:00..18:59) use (0.07316666667, 1)
+on (monday..friday) between (19:00..23:59) use (0.03466666667, 1)
diff --git a/kppp/Rules/Netherlands/BelPlus_Buiten_Regio_Nummervoordeel.rst b/kppp/Rules/Netherlands/BelPlus_Buiten_Regio_Nummervoordeel.rst
new file mode 100644
index 00000000..114761e8
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelPlus_Buiten_Regio_Nummervoordeel.rst
@@ -0,0 +1,31 @@
+################################################################
+#
+# kppp rules voor KPN Belplus abonnement per seconde + nummervoordeel
+#
+# Alleen voor buiten de regio gesprekken
+# Laatste wijziging: 09-07-2003
+#
+# Kosten:
+# standaardtarief doordeweeks 3.51 cpm = 0.000585 euro ps 08:00-18:59
+# 's-avonds en in weekend 1,66 cpm = 0.0002766666667 euro ps
+#
+# Starttarief 4.14 ct per gesprek #
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBasis Buiten Regio Nummervoordeel
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0414
+minimum_costs=0.0
+
+default=(0.0002766666667, 1)
+on (monday..friday) between (08:00..18:59) use (0.000585, 1)
+
diff --git a/kppp/Rules/Netherlands/BelPlus_Regio.rst b/kppp/Rules/Netherlands/BelPlus_Regio.rst
new file mode 100644
index 00000000..385ac99d
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelPlus_Regio.rst
@@ -0,0 +1,37 @@
+################################################################
+#
+# kppp rules voor KPN BelPlus abonnement per seconde
+# Laatste wijziging 09-07-2003
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 2,89 cpm=0.0007583333333 euro ps 08:00-18:59
+# daltarief 1,55 cpm=0.0002583333333 euro ps 19:00-23:59
+# nacht 1,04 cpm=0.0001733333333 euro ps 00:00-07:59
+# Zaterdag 1,04 cpm=0.0001733333333 euro ps 00:00-23:59
+# Zondag 1,04 cpm=0.0001733333333 euro ps 00:00-23:59
+#
+# Starttarief 4.27 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelPlus Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0427
+minimum_costs=0.0
+
+default=(0.0007583333333, 1)
+on (monday..friday) between (19:00..23:59) use (0.0002583333333, 1)
+on (monday..friday) between (00:00..07:59) use (0.0001733333333, 1)
+on (saturday) between (00:00..23:59) use (0.0001733333333, 1)
+on (sunday) between (00:00..23:59) use (0.0001733333333, 1)
diff --git a/kppp/Rules/Netherlands/BelPlus_Regio_Nummervoordeel.rst b/kppp/Rules/Netherlands/BelPlus_Regio_Nummervoordeel.rst
new file mode 100644
index 00000000..bbb3d5ad
--- /dev/null
+++ b/kppp/Rules/Netherlands/BelPlus_Regio_Nummervoordeel.rst
@@ -0,0 +1,37 @@
+######################################################################
+#
+# kppp rules voor KPN BelPlus abonnement+ nummervoordeel per seconde
+# laatste wijziging 30-07-2003
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 2.60 cpm = 0.0004333333333 euro ps 08:00-18:59
+# daltarief 1.40 cpm = 0.0002333333333 euro ps 19:00-23:59
+# nacht 0.94 cpm = 0.0001566666667 euro ps 00:00-07:59
+# Zaterdag 0.94 cpm = 0.0001566666667 euro ps 00:00-23:59
+# Zondag 0.94 cpm = 0.0001566666667 euro ps 00:00-23:59
+#
+# Starttarief 3.84 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+######################################################################
+
+name=Nederlands BelPlus Regio Nummervoordeel
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0384
+minimum_costs=0.0
+
+default=(0.0004333333333, 1)
+on (monday..friday) between (19:00..23:59) use (0.0002333333333, 1)
+on (monday..friday) between (00:00..07:59) use (0.0001566666667, 1)
+on (saturday) between (00:00..23:59) use (0.0001566666667, 1)
+on (sunday) between (00:00..23:59) use (0.0001566666667, 1)
diff --git a/kppp/Rules/Netherlands/Cistron b/kppp/Rules/Netherlands/Cistron
new file mode 100644
index 00000000..68adc4b0
--- /dev/null
+++ b/kppp/Rules/Netherlands/Cistron
@@ -0,0 +1,36 @@
+######################################################################
+#
+# kppp rules voor KPN BelPlus abonnement+ nummervoordeel per seconde
+# Gegevens gebruikt voor gespreksosten voor Cistron
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 2.52 cpm=0.042 cps 08:00-18:59
+# daltarief 1.13 cpm=0.0188333 cps 19:00-23:59
+# nacht 0.9 cpm=0.015 cps 00:00-07:59
+# Zaterdag 0.9 cpm=0.015 cps 00:00-23:59
+# Zondag 0.9 cpm=0.015 cps 00:00-23:59
+#
+# Starttarief 3.73 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+######################################################################
+
+name=Nederlands BelPlus Regio Nummervoordeel
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0373
+minimum_costs=0.0
+
+default=(0.00042, 1)
+on (monday..friday) between (19:00..23:59) use (0.000188333, 1)
+on (monday..friday) between (00:00..07:59) use (0.00015, 1)
+on (saturday) between (00:00..23:59) use (0.00015, 1)
+on (sunday) between (00:00..23:59) use (0.00015, 1)
diff --git a/kppp/Rules/Netherlands/Freeler_Basis.rst b/kppp/Rules/Netherlands/Freeler_Basis.rst
new file mode 100644
index 00000000..d96cb207
--- /dev/null
+++ b/kppp/Rules/Netherlands/Freeler_Basis.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# kppp rules voor Freeler Basis abonnement per seconde
+# http://www.freeler.nl/service/tarieven.html
+# bijgewerkt op 30-11-2002
+# Alleen voor lokale gesprekken
+# Let op! bedragen in euro per seconde!!
+# Kosten:
+# Lokaal: piektarief 0.0325 euro pm = 0.00054167 cps 08:00-18:59
+# daltarief 0.0177 euro pm = 0.000295 cps 19:00-23:59
+# nacht 0.0129 euro pm = 0.00215 cps 00:00-07:59
+# Zaterdag 0.0129 euro pm = 0.00215 cps 00:00-23:59
+# Zondag 0.0129 euro pm = 0.00215 cps 00:00-23:59
+#
+# Starttarief 0.0414 euro per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Freeler Basis
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0414
+minimum_costs=0.0
+
+# piektarief
+default=(0.00054167, 1)
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.000295, 1)
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.00215, 1)
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.00215, 1)
+on (sunday) between (00:00..23:59) use (0.00215, 1)
diff --git a/kppp/Rules/Netherlands/Freeler_Voordelig.rst b/kppp/Rules/Netherlands/Freeler_Voordelig.rst
new file mode 100644
index 00000000..93c58a9b
--- /dev/null
+++ b/kppp/Rules/Netherlands/Freeler_Voordelig.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# kppp rules voor Freeler Voordelig per seconde
+# http://www.freeler.nl/service/tarieven.html
+# bijgewerkt op 30-11-2002
+# Alleen voor lokale gesprekken
+# Let op! bedragen in euro per seconde!!
+# Kosten:
+# Lokaal: piektarief 0.0196 euro pm = 0.00032667 euro ps 08:00-18:59
+# daltarief 0.0105 euro pm = 0.000175 euro ps 19:00-23:59
+# nacht 0.0070 euro pm = 0.00011667 euro ps 00:00-07:59
+# Zaterdag 0.0070 euro pm = 0.00011667 euro ps 00:00-23:59
+# Zondag 0.0070 euro pm = 0.00011667 euro ps 00:00-23:59
+#
+# Starttarief 0.0290 euro per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Freeler Voordelig
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0290
+minimum_costs=0.0
+
+# piektarief
+default=(0.00032667, 1)
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.000175, 1)
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.00011667, 1)
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.00011667, 1)
+on (sunday) between (00:00..23:59) use (0.00011667, 1)
diff --git a/kppp/Rules/Netherlands/HetNet_Regelmatig_Surfen.rst b/kppp/Rules/Netherlands/HetNet_Regelmatig_Surfen.rst
new file mode 100644
index 00000000..80cff58d
--- /dev/null
+++ b/kppp/Rules/Netherlands/HetNet_Regelmatig_Surfen.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# kppp rules voor HetNet Regelmatig Surfen
+# HetNet Regelmatig Surfen is 20% goekoper dan KPN BelBasis.
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten KPN BelBasis Regio: -20%:
+# Lokaal: standaardtarief 2,80 cpm=0.0466667 cps 08:00-18:59 0.0373334 cps
+# daltarief 1.5 cpm=0.025 cps 19:00-23:59 0.02 cps
+# nacht 1 cpm=0.0166667 cps 00:00-07:59 0.0133334 cps
+# Zaterdag 1 cpm=0.0166667 cps 00:00-23:59 0.0133334 cps
+# Zondag 1 cpm=0.0166667 cps 00:00-23:59 0.0133334 cps
+#
+# Starttarief 4.14 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=HetNet Regelmatig Surfen
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0414
+minimum_costs=0.0
+
+# standaardtarief
+default=(0.000373334, 1)
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.0002, 1)
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.000133334, 1)
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.000133334, 1)
+on (sunday) between (00:00..23:59) use (0.000133334, 1)
diff --git a/kppp/Rules/Netherlands/InterNLnet.rst b/kppp/Rules/Netherlands/InterNLnet.rst
new file mode 100644
index 00000000..0cf64214
--- /dev/null
+++ b/kppp/Rules/Netherlands/InterNLnet.rst
@@ -0,0 +1,43 @@
+################################################################
+#
+# kppp rules voor InterNLnet
+# gegevens van http://www.internl.net/telefoontarieven/
+# laatste wijziging op 27-11-2002
+#
+# Alleen voor lokale gesprekken
+# Let op!! InterNLnet rekent in euro's per uur!!
+#
+# Kosten InterNLnet:
+# Lokaal: standaardtarief 1.25 euro pu = 0.000347222 euro ps 08:00-18:59
+# daltarief 0.60 euro pu = 0.000166667 euro ps 19:00-23:59
+# nacht 0.45 euro pu = 0.000125 euro ps 00:00-07:59
+# Zaterdag 0.45 euro pu = 0.000125 euro ps 00:00-23:59
+# Zondag 0.45 euro pu = 0.000125 euro ps 00:00-23:59
+#
+# Starttarief 0,03 euro per geslaagde verbinding
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=HetNet Regelmatig Surfen
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+flat_init_costs=(0.03, 5)
+
+# standaardtarief
+default=(0.000347222, 1)
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.000166667, 1)
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.000125, 1)
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.000125, 1)
+on (sunday) between (00:00..23:59) use (0.000125, 1)
diff --git a/kppp/Rules/Netherlands/Makefile.am b/kppp/Rules/Netherlands/Makefile.am
new file mode 100644
index 00000000..c1f98657
--- /dev/null
+++ b/kppp/Rules/Netherlands/Makefile.am
@@ -0,0 +1,34 @@
+pkg_DATA = 12Move.rst \
+ Cistron \
+ Priority_Telecom_Nationaal.rst \
+ BelBasis_Buiten_Regio.rst \
+ Freeler_Basis.rst \
+ Priority_Telecom_Regionaal.rst \
+ BelBasis_Buiten_Regio_Nummervoordeel.rst \
+ Freeler_Voordelig.rst \
+ Tele2_Extra_Buiten_Regio.rst \
+ BelBasis_Regio.rst \
+ HetNet_Regelmatig_Surfen.rst \
+ Tele2_Extra_Regio.rst \
+ BelBasis_Regio_Nummervoordeel.rst \
+ InterNLnet.rst \
+ Tele2_Preselect_Buiten_Regio.rst \
+ BelBudget_Buiten_Regio.rst \
+ Tele2_Preselect_Regio.rst \
+ BelBudget_Regio.rst \
+ OneTel_Spaarstand_Buiten_Regio.rst \
+ Tele2_Toets_1609_Buiten_Regio.rst \
+ BelPlus_Buiten_Regio.rst \
+ OneTel_Spaarstand_Regio.rst \
+ Tele2_Toets_1609_Regio.rst \
+ BelPlus_Regio.rst \
+ OneTel_Toets_1658_Buiten_Regio.rst \
+ Wannadoo_Budget_Plus \
+ BelPlus_Regio_Nummervoordeel.rst \
+ OneTel_Toets_1658_Regio.rst \
+ Planet_Internet.rst
+
+
+pkgdir = $(kde_datadir)/kppp/Rules/Netherlands
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Netherlands/OneTel_Spaarstand_Buiten_Regio.rst b/kppp/Rules/Netherlands/OneTel_Spaarstand_Buiten_Regio.rst
new file mode 100644
index 00000000..9fdddd98
--- /dev/null
+++ b/kppp/Rules/Netherlands/OneTel_Spaarstand_Buiten_Regio.rst
@@ -0,0 +1,37 @@
+################################################################
+#
+# kppp rules voor OneTel Spaarstand Buiten Regio abonnement
+#
+# Alleen voor buiten de regio gesprekken
+#
+# Tarieven gedownload van http://www.onetel.nl/tarieven_nationaal.php
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# piektarief doordeweeks 3.7 cpm = 0.0616667 cps 08:00-18:59
+# 's-avonds en in weekend 1.6 cpm = 0.0266667 cps
+#
+# Starttarief 25 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=OneTel Spaarstand Buiten Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.25
+minimum_costs=0.0
+
+#daltarief
+default=(0.0266667, 1)
+
+#piektarief
+on (monday..friday) between (08:00..18:59) use (0.000616667, 1)
+
diff --git a/kppp/Rules/Netherlands/OneTel_Spaarstand_Regio.rst b/kppp/Rules/Netherlands/OneTel_Spaarstand_Regio.rst
new file mode 100644
index 00000000..16be4327
--- /dev/null
+++ b/kppp/Rules/Netherlands/OneTel_Spaarstand_Regio.rst
@@ -0,0 +1,42 @@
+################################################################
+# kppp rules voor Onetel Spaarstand Regio abonnement
+# Alleen voor lokale gesprekken
+# Tarieven gedownload van http://www.onetel.nl/tarieven_nationaal.php
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# Lokaal: piektarief 2.4 cpm = 0.04 cps 08:00-18:59
+# daltarief 1.2 cpm = 0.02 cps 19:00-23:59
+# nacht 0.9 cpm = 0.015 cps 00:00-07:59
+# Zaterdag 0.9 cpm = 0.015 cps 00:00-23:59
+# Zondag 0.9 cpm = 0.015 cps 00:00-23:59
+#
+# Starttarief 25 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Onetel Spaarstand Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.25
+minimum_costs=0.0
+
+# piektarief
+default=(0.0004, 1)
+
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.0002, 1)
+
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.00015, 1)
+
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.00015, 1)
+on (sunday) between (00:00..23:59) use (0.00015, 1)
diff --git a/kppp/Rules/Netherlands/OneTel_Toets_1658_Buiten_Regio.rst b/kppp/Rules/Netherlands/OneTel_Toets_1658_Buiten_Regio.rst
new file mode 100644
index 00000000..d432dbb5
--- /dev/null
+++ b/kppp/Rules/Netherlands/OneTel_Toets_1658_Buiten_Regio.rst
@@ -0,0 +1,37 @@
+################################################################
+#
+# kppp rules voor OneTel Spaarstand Buiten Regio abonnement
+#
+# Alleen voor buiten de regio gesprekken
+#
+# Tarieven gedownload van http://www.onetel.nl/tarieven_nationaal.php
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# piektarief doordeweeks 4.1 cpm = 0.0683333 cps 08:00-18:59
+# 's-avonds en in weekend 1.8 cpm = 0.03 cps
+#
+# Starttarief 25 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=OneTel Toets 1658 Buiten Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.25
+minimum_costs=0.0
+
+#daltarief
+default=(0.0003, 1)
+
+#piektarief
+on (monday..friday) between (08:00..18:59) use (0.000683333, 1)
+
diff --git a/kppp/Rules/Netherlands/OneTel_Toets_1658_Regio.rst b/kppp/Rules/Netherlands/OneTel_Toets_1658_Regio.rst
new file mode 100644
index 00000000..e0e1e3ab
--- /dev/null
+++ b/kppp/Rules/Netherlands/OneTel_Toets_1658_Regio.rst
@@ -0,0 +1,42 @@
+################################################################
+# kppp rules voor Onetel Spaarstand Regio abonnement
+# Alleen voor lokale gesprekken
+#
+# Tarieven gedownload van http://www.onetel.nl/tarieven_nationaal.php
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# Lokaal: piektarief 4.1 cpm = 0.0683333 cps 08:00-18:59
+# daltarief 1.8 cpm = 0.03 cps 19:00-23:59
+# nacht 1.8 cpm = 0.03 cps 00:00-07:59
+# Zaterdag 1.8 cpm = 0.03 cps 00:00-23:59
+# Zondag 1.8 cpm = 0.03 cps 00:00-23:59
+#
+# Starttarief 25 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#################################################################
+
+name=Onetel Spaarstand Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.25
+minimum_costs=0.0
+
+#piektarief
+default=(0.000683333, 1)
+
+#daltarief
+on (monday..friday) between (19:00..23:59) use (0.0003, 1)
+
+#nachttarief
+on (monday..friday) between (00:00..07:59) use (0.0003, 1)
+
+#zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.0003, 1)
+on (sunday) between (00:00..23:59) use (0.0003, 1)
diff --git a/kppp/Rules/Netherlands/Planet_Internet.rst b/kppp/Rules/Netherlands/Planet_Internet.rst
new file mode 100644
index 00000000..f8b2cc4f
--- /dev/null
+++ b/kppp/Rules/Netherlands/Planet_Internet.rst
@@ -0,0 +1,41 @@
+################################################################
+#
+# kppp rules voor Planet Internet per seconde
+# http://web.planet.nl/klantenservice/helpdesk/inbelpunten.html#3
+# tarieven vanaf 1 januari 2003
+# laatste bijwerking op 28-11-2003
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten:
+# Lokaal: standaardtarief 2,74 cpm = 0.0456667 cps 08:00-18:59
+# daltarief 1.47 cpm = 0.0245 cps 19:00-23:59
+# nacht 0.98 cpm = 0.0163333 cps 00:00-07:59
+# Zaterdag 0.98 cpm = 0.0163333 cps 00:00-23:59
+# Zondag 0.98 cpm = 0.0163333 cps 00:00-23:59
+#
+# Starttarief 4.05 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBasis Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0405
+minimum_costs=0.0
+
+# standaardtarief
+default=(0.000456667, 1)
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.000245, 1)
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.000163333, 1)
+on (saturday) between (00:00..23:59) use (0.000163333, 1)
+on (sunday) between (00:00..23:59) use (0.000163333, 1)
diff --git a/kppp/Rules/Netherlands/Priority_Telecom_Nationaal.rst b/kppp/Rules/Netherlands/Priority_Telecom_Nationaal.rst
new file mode 100644
index 00000000..e88c5d41
--- /dev/null
+++ b/kppp/Rules/Netherlands/Priority_Telecom_Nationaal.rst
@@ -0,0 +1,37 @@
+# Kppp rules voor Priority Telecom nationaal, naar niet Priority-nummers
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 20-11-2002
+# Oorspronkelijk script voor Nedpoint gemaakt door:
+# Mike Klinkert (michael@cs.vu.nl)
+#
+# Piektarief: 3 cpm, 08:00-18:59 (maandag t/m vrijdag)
+# Daltarief: 1.5 cpm, 19:00-23:59 (maandag t/m vrijdag)
+# Nachttarief 1.5 cpm, 00:00-07:59 (maandag t/m vrijdag en weekend)
+# Starttarief: 5 cent
+
+name=Priority Telecom Nationaal
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.05
+minimum_costs=0.0
+
+# Piektarief (0.03 / 60 = 0.0005)
+on (monday..friday) between (8:00..18:59) use (0.0005, 1)
+
+# Daltarief (0,015 / 60 = 0.00025)
+on (monday..friday) between (19:00..23:59) use (0.00025, 1)
+
+
+# Nachttarief (0.015 / 60 = 0.00025)
+default=(0.00015, 1)
+# Kerstmis
+# on (12/25..12/26, 12/31) between () use (0.00025, 1)
+# Nieuwjaar
+# on (01/01) between () use (0.00025, 1)
+# Koninginnedag
+# on (04/30) between () use (0.00025, 1)
+# Pasen
+on (easter) between () use (0.00025, 1)
+# Pinksteren
+on (easter+56) between () use (0.00025, 1)
diff --git a/kppp/Rules/Netherlands/Priority_Telecom_Regionaal.rst b/kppp/Rules/Netherlands/Priority_Telecom_Regionaal.rst
new file mode 100644
index 00000000..42692742
--- /dev/null
+++ b/kppp/Rules/Netherlands/Priority_Telecom_Regionaal.rst
@@ -0,0 +1,32 @@
+# Kppp rules voor Priority Telecom Regionaal, naar niet Priority-nummers
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 20-11-2002
+# Oorspronkelijk script voor Nedpoint gemaakt door:
+# Mike Klinkert (michael@cs.vu.nl)
+#
+# Piektarief: 5,40 cpm, 08:00-18:00 (maandag t/m vrijdag)
+# Daltarief: 2,70 cpm, 18:00-08:00 (maandag t/m vrijdag en in het weekend)
+# Starttarief: 10 cent
+
+name=Priority Telecom Regionaal
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.035
+minimum_costs=0.0
+
+# Piektarief (0.054 / 60)
+on (monday..friday) between (8:00..18:00) use (0.0009, 1)
+
+# Daltarief (0.027 / 60)
+default=(0.00045, 1)
+# Kerstmis
+on (12/25..12/26, 12/31) between () use (0.00045, 1)
+# Nieuwjaar
+on (01/01) between () use (0.00045, 1)
+# Koninginnedag
+on (04/30) between () use (0.00045, 1)
+# Pasen
+on (easter) between () use (0.00045,1)
+# Pinksteren
+on (easter+56) between () use (0.00045,1)
diff --git a/kppp/Rules/Netherlands/Tele2_Extra_Buiten_Regio.rst b/kppp/Rules/Netherlands/Tele2_Extra_Buiten_Regio.rst
new file mode 100644
index 00000000..4e118d92
--- /dev/null
+++ b/kppp/Rules/Netherlands/Tele2_Extra_Buiten_Regio.rst
@@ -0,0 +1,37 @@
+################################################################
+#
+# kppp rules voor Tele2 Extra Buiten Regio abonnement
+#
+# Alleen voor buiten de regio gesprekken
+#
+# Tarieven gedownload van http://www.tele2.nl/chap02/c020201.html
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# piektarief doordeweeks 3.4 cpm = 0.0566667 cps 08:00-18:59
+# 's-avonds en in weekend 1.5 cpm = 0.025 cps
+#
+# Starttarief 4.5 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Tele2 Extra Buiten Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.045
+minimum_costs=0.0
+
+#daltarief
+default=(0.00025, 1)
+
+#piektarief
+on (monday..friday) between (08:00..18:59) use (0.000566667, 1)
+
diff --git a/kppp/Rules/Netherlands/Tele2_Extra_Regio.rst b/kppp/Rules/Netherlands/Tele2_Extra_Regio.rst
new file mode 100644
index 00000000..87f5229d
--- /dev/null
+++ b/kppp/Rules/Netherlands/Tele2_Extra_Regio.rst
@@ -0,0 +1,42 @@
+################################################################
+# kppp rules voor Tele2 Extra Regio abonnement
+# Alleen voor lokale gesprekken
+# Tarieven gedownload van http://www.tele2.nl/chap02/c020201.html
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# Lokaal: piektarief 2.25 cpm = 0.0375 cps 08:00-18:59
+# daltarief 1.17 cpm = 0.0195 cps 19:00-23:59
+# nacht 0.81 cpm = 0.0135 cps 00:00-07:59
+# Zaterdag 0.81 cpm = 0.0135 cps 00:00-23:59
+# Zondag 0.81 cpm = 0.0135 cps 00:00-23:59
+#
+# Starttarief 3.51 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Tele2 Extra 1602 Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0351
+minimum_costs=0.0
+
+# piektarief
+default=(0.000375, 1)
+
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.000195, 1)
+
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.000135, 1)
+
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.000135, 1)
+on (sunday) between (00:00..23:59) use (0.000135, 1)
diff --git a/kppp/Rules/Netherlands/Tele2_Preselect_Buiten_Regio.rst b/kppp/Rules/Netherlands/Tele2_Preselect_Buiten_Regio.rst
new file mode 100644
index 00000000..bd558494
--- /dev/null
+++ b/kppp/Rules/Netherlands/Tele2_Preselect_Buiten_Regio.rst
@@ -0,0 +1,37 @@
+################################################################
+#
+# kppp rules voor Tele2 Preselect Buiten Regio abonnement
+#
+# Alleen voor buiten de regio gesprekken
+#
+# Tarieven gedownload van http://www.tele2.nl/chap02/c020201.html
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# piektarief doordeweeks 3.8 cpm = 0.0633333 cps 08:00-18:59
+# 's-avonds en in weekend 1.7 cpm = 0.0283333 cps
+#
+# Starttarief 4.9 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Tele2 Preselect Buiten Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.049
+minimum_costs=0.0
+
+#daltarief
+default=(0.000283333, 1)
+
+#piektarief
+on (monday..friday) between (08:00..18:59) use (0.000633333, 1)
+
diff --git a/kppp/Rules/Netherlands/Tele2_Preselect_Regio.rst b/kppp/Rules/Netherlands/Tele2_Preselect_Regio.rst
new file mode 100644
index 00000000..a45d4376
--- /dev/null
+++ b/kppp/Rules/Netherlands/Tele2_Preselect_Regio.rst
@@ -0,0 +1,42 @@
+################################################################
+# kppp rules voor Preselect Regio abonnement
+# Alleen voor lokale gesprekken
+# Tarieven gedownload van http://www.tele2.nl/chap02/c020201.html
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# Lokaal: piektarief 2.5 cpm = 0.0416667 cps 08:00-18:59
+# daltarief 1.3 cpm = 0.0216667 cps 19:00-23:59
+# nacht 0.9 cpm = 0.015 cps 00:00-07:59
+# Zaterdag 0.9 cpm = 0.015 cps 00:00-23:59
+# Zondag 0.9 cpm = 0.015 cps 00:00-23:59
+#
+# Starttarief 3.9 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Tele2 Preselect 1602 Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.039
+minimum_costs=0.0
+
+# piektarief
+default=(0.000416667, 1)
+
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.000216667, 1)
+
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.00015, 1)
+
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.00015, 1)
+on (sunday) between (00:00..23:59) use (0.00015, 1)
diff --git a/kppp/Rules/Netherlands/Tele2_Toets_1609_Buiten_Regio.rst b/kppp/Rules/Netherlands/Tele2_Toets_1609_Buiten_Regio.rst
new file mode 100644
index 00000000..921c3013
--- /dev/null
+++ b/kppp/Rules/Netherlands/Tele2_Toets_1609_Buiten_Regio.rst
@@ -0,0 +1,37 @@
+################################################################
+#
+# kppp rules voor Tele2 Toets 1602 Buiten Regio abonnement
+#
+# Alleen voor buiten de regio gesprekken
+#
+# Tarieven gedownload van http://www.tele2.nl/chap02/c020201.html
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# piektarief doordeweeks 3.8 cpm = 0.0633333 cps 08:00-18:59
+# 's-avonds en in weekend 1.7 cpm = 0.0283333 cps
+#
+# Starttarief 4.9 ct per gesprek
+#
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Tele2 Toets 1602 Buiten Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.049
+minimum_costs=0.0
+
+#daltarief
+default=(0.000283333, 1)
+
+#piektarief
+on (monday..friday) between (08:00..18:59) use (0.000633333, 1)
+
diff --git a/kppp/Rules/Netherlands/Tele2_Toets_1609_Regio.rst b/kppp/Rules/Netherlands/Tele2_Toets_1609_Regio.rst
new file mode 100644
index 00000000..91b3d297
--- /dev/null
+++ b/kppp/Rules/Netherlands/Tele2_Toets_1609_Regio.rst
@@ -0,0 +1,42 @@
+################################################################
+# kppp rules voor Onetel Spaarstand Regio abonnement
+# Alleen voor lokale gesprekken
+# Tarieven gedownload van http://www.onetel.nl/tarieven_nationaal.php
+# Laatste wijziging op 24-11-2002
+#
+# Kosten:
+# Lokaal: piektarief 2.5 cpm = 0.0416667 cps 08:00-18:59
+# daltarief 1.3 cpm = 0.0216667 cps 19:00-23:59
+# nacht 0.9 cpm = 0.015 cps 00:00-07:59
+# Zaterdag 0.9 cpm = 0.015 cps 00:00-23:59
+# Zondag 0.9 cpm = 0.015 cps 00:00-23:59
+#
+# Starttarief 3.9 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Onetel Spaarstand Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.039
+minimum_costs=0.0
+
+# piektarief
+default=(0.000416667, 1)
+
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.000216667, 1)
+
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.00015, 1)
+
+# zaterdag en zondag
+on (saturday) between (00:00..23:59) use (0.00015, 1)
+on (sunday) between (00:00..23:59) use (0.00015, 1)
diff --git a/kppp/Rules/Netherlands/Wannadoo_Budget_Plus b/kppp/Rules/Netherlands/Wannadoo_Budget_Plus
new file mode 100644
index 00000000..23282f03
--- /dev/null
+++ b/kppp/Rules/Netherlands/Wannadoo_Budget_Plus
@@ -0,0 +1,41 @@
+################################################################
+#
+# kppp rules voor Wannadoor Budget Plus per seconde
+# Wannadoor Budget Plus is 25% goedkoper dan KBN BelBasis Regio
+# laatste bijwerking op 28-11-2002
+#
+# Alleen voor lokale gesprekken
+#
+# Kosten KPN BelBasis Regio: -25%
+# Lokaal: standaardtarief 2,80 cpm=0.0466667 cps 08:00-18:59 0.0349992
+# daltarief 1.5 cpm=0.025 cps 19:00-23:59 0.01875
+# nacht 1 cpm=0.0166667 cps 00:00-07:59 0.0125
+# Zaterdag 1 cpm=0.0166667 cps 00:00-23:59 0.0125
+# Zondag 1 cpm=0.0166667 cps 00:00-23:59 0.0125
+#
+# Starttarief 4.14 ct per gesprek
+#
+# Gemaakt door: Rinse de Vries <rinse@kde.nl>
+# Datum: 21-11-2002
+#
+# Oorspronkelijk script gemaakt door: Michel Weijts <mweijts@yahoo.com>
+# Created on 1 October 2000
+#
+################################################################
+
+name=Nederlands BelBasis Regio
+currency_symbol=euro
+currency_position=left
+currency_digits=2
+per_connection=0.0414
+minimum_costs=0.0
+
+# standaardtarief:
+default=(0.000349992, 1)
+# daltarief
+on (monday..friday) between (19:00..23:59) use (0.0001875, 1)
+# nachttarief
+on (monday..friday) between (00:00..07:59) use (0.000125, 1)
+# weekendtarief
+on (saturday) between (00:00..23:59) use (0.000125, 1)
+on (sunday) between (00:00..23:59) use (0.000125, 1)
diff --git a/kppp/Rules/Norway/Local_Area.rst b/kppp/Rules/Norway/Local_Area.rst
new file mode 100644
index 00000000..f45e0be8
--- /dev/null
+++ b/kppp/Rules/Norway/Local_Area.rst
@@ -0,0 +1,16 @@
+################################################################
+#
+# Ruleset for Telenor Norway
+# Local Area
+# Created 97/09/20 by Arne Coucheron <arneco@online.no>
+# Updated 99/05/23 by Arne Coucheron <arneco@online.no>
+#
+################################################################
+name=Norway_Local_Area
+currency_symbol=Kr
+currency_position=left
+currency_digits=2
+per_connection=0.45
+minimum_costs=0.0
+default=(0.14,60)
+on (monday..friday) between (8:00..17:00) use (0.22,60)
diff --git a/kppp/Rules/Norway/Long_Distance.rst b/kppp/Rules/Norway/Long_Distance.rst
new file mode 100644
index 00000000..f2c0f529
--- /dev/null
+++ b/kppp/Rules/Norway/Long_Distance.rst
@@ -0,0 +1,16 @@
+################################################################
+#
+# Ruleset for Telenor Norway
+# Long Distance
+# Created 97/09/20 by Arne Coucheron <arneco@online.no>
+# Updated 99/05/23 by Arne Coucheron <arneco@online.no>
+#
+################################################################
+name=Norway_Long_Distance
+currency_symbol=Kr
+currency_position=left
+currency_digits=2
+per_connection=0.45
+minimum_costs=0.0
+default=(0.35,60)
+on (monday..friday) between (8:00..17:00) use (0.40,60)
diff --git a/kppp/Rules/Norway/Makefile.am b/kppp/Rules/Norway/Makefile.am
new file mode 100644
index 00000000..95c9127e
--- /dev/null
+++ b/kppp/Rules/Norway/Makefile.am
@@ -0,0 +1,7 @@
+pkg_DATA = Local_Area.rst \
+ Long_Distance.rst \
+ Netcom.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Norway
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Norway/Netcom.rst b/kppp/Rules/Norway/Netcom.rst
new file mode 100644
index 00000000..a8855b8d
--- /dev/null
+++ b/kppp/Rules/Norway/Netcom.rst
@@ -0,0 +1,15 @@
+################################################################
+#
+# Ruleset for Netcom Internett
+#
+# Created 02/01/23 by Jostein Henriksen <josteihe@online.no>
+#
+################################################################
+name=Norway_Netcom_Internett
+currency_symbol=Kr
+currency_position=left
+currency_digits=2
+per_connection=0.45
+minimum_costs=0.0
+default=(0.10,60)
+on (monday..sunday) between (24:00..06:00) use (0,5,60) \ No newline at end of file
diff --git a/kppp/Rules/Poland/Internetia.rst b/kppp/Rules/Poland/Internetia.rst
new file mode 100644
index 00000000..1b5357dd
--- /dev/null
+++ b/kppp/Rules/Poland/Internetia.rst
@@ -0,0 +1,19 @@
+################################################################
+# Reguģy obliczania kosztów poģączeņ modemowych w Netii dla uŋytkowników TP S.A.
+# Aktualizacja: 4.03.2002
+# autor: Dariusz Dobosz <D.Dobosz@pik-net.pl>
+# aktualizacje: http:/www.dobex.prv.pl/
+################################################################
+
+name=Internetia
+currency_symbol=PLN
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+# Co 360 sekund będzie naliczany impuls o wartoķci 25 grosze.
+# To znaczy między 22,00 a 8,00
+default=(0.25, 360)
+# poza tym co 180 sekund.
+on (monday..friday) between (8:00..21:59) use (0.25, 180)
diff --git a/kppp/Rules/Poland/Makefile.am b/kppp/Rules/Poland/Makefile.am
new file mode 100644
index 00000000..12d1d82b
--- /dev/null
+++ b/kppp/Rules/Poland/Makefile.am
@@ -0,0 +1,12 @@
+pkg_DATA = Netia_Lokalne_Niebieska.rst \
+ Netia_Lokalne_Zielona.rst \
+ Netia_100km_Niebieska.rst \
+ Netia_100km_Zielona.rst \
+ TPSA.rst \
+ Internetia.rst \
+ TP_Lokalne.rst \
+ TP_100km.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Poland
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Poland/Netia_100km_Niebieska.rst b/kppp/Rules/Poland/Netia_100km_Niebieska.rst
new file mode 100644
index 00000000..958b0c2c
--- /dev/null
+++ b/kppp/Rules/Poland/Netia_100km_Niebieska.rst
@@ -0,0 +1,40 @@
+################################################################
+# Reguģki obliczania kosztów poģączeņ międzymiastowych w sieci Netia,
+# na odlegģoķæ do 100 km między centralami wojewódzkimi.
+# Taryfa niebieska (o taņszym abonamencie)
+# autor: Jacek Stolarczyk <jacek@mer.chemia.polsl.gliwice.pl>
+################################################################
+
+name=Netia_100km_Niebieska
+currency_symbol=PLN
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.59, 60)
+
+# taryfa do 100km
+on (monday..friday) between (8:00..18:00) use (0.59, 60)
+on (monday..friday) between (18:00..22:00) use (0.44, 60)
+on (monday..friday) between (22:00..8:00) use (0.29, 60)
+on (saturday..sunday) between (8:00..22:00) use (0.44, 60)
+on (saturday..sunday) between (22:00..8:00) use (0.29, 60)
+
+# Ķwięta (taryfa sobotnio-niedzielna)
+on (01/01, easter, easter+1, 05/01, 05/03, 08/15, 11/01, 11/11, 12/25, 12/26) between (8:00..22:00) use (0.44, 60)
+on (01/01, easter, easter+1, 05/01, 05/03, 08/15, 11/01, 11/11, 12/25, 12/26) between (22:00..8:00) use (0.29, 60)
+
+#objaķnienia dni ķwiątecznych
+# 01/01 Nowy Rok
+# easter Niedziela Wielkanocna
+# easter+1 Poniedziaģek Wielkanocny
+# 05/01 Ķwięto Pracy
+# 05/03 Dzieņ Konstytucji 3 Maja
+# 08/15 Wniebowzięcie
+# 11/01 Wszystkich Ķwiętych
+# 11/11 Ķwięto Niepodlegģoķci
+# 12/25 Boŋe Narodzenie
+# 12/26 Boŋe Narodzenie
+# niestety na liķcie brakuje Boŋego Ciaģa - nie wiem jaka reguģa rządzi jego
+# wyborem tego czwartku
+
diff --git a/kppp/Rules/Poland/Netia_100km_Zielona.rst b/kppp/Rules/Poland/Netia_100km_Zielona.rst
new file mode 100644
index 00000000..7ecbc3a9
--- /dev/null
+++ b/kppp/Rules/Poland/Netia_100km_Zielona.rst
@@ -0,0 +1,39 @@
+################################################################
+# Reguģki obliczania kosztów poģączeņ międzymiastowych w sieci Netia,
+# na odlegģoķæ do 100 km między centralami wojewódzkimi.
+# Taryfa zielona
+# autor: Jacek Stolarczyk <jacek@mer.chemia.polsl.gliwice.pl>
+################################################################
+
+name=Netia_100km_Zielona
+currency_symbol=PLN
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.66, 60)
+
+# taryfa do 100km
+on (monday..friday) between (8:00..18:00) use (0.56, 60)
+on (monday..friday) between (18:00..22:00) use (0.43, 60)
+on (monday..friday) between (22:00..8:00) use (0.28, 60)
+on (saturday..sunday) between (8:00..22:00) use (0.43, 60)
+on (saturday..sunday) between (22:00..8:00) use (0.28, 60)
+
+# Ķwięta (taryfa sobotnio-niedzielna)
+on (01/01, easter, easter+1, 05/01, 05/03, 08/15, 11/01, 11/11, 12/25, 12/26) between (8:00..22:00) use (0.43, 60)
+on (01/01, easter, easter+1, 05/01, 05/03, 08/15, 11/01, 11/11, 12/25, 12/26) between (22:00..8:00) use (0.28, 60)
+
+#objaķnienia dni ķwiątecznych
+# 01/01 Nowy Rok
+# easter Niedziela Wielkanocna
+# easter+1 Poniedziaģek Wielkanocny
+# 05/01 Ķwięto Pracy
+# 05/03 Dzieņ Konstytucji 3 Maja
+# 08/15 Wniebowzięcie
+# 11/01 Wszystkich Ķwiętych
+# 11/11 Ķwięto Niepodlegģoķci
+# 12/25 Boŋe Narodzenie
+# 12/26 Boŋe Narodzenie
+# niestety na liķcie brakuje Boŋego Ciaģa - nie wiem jaka reguģa rządzi jego
+# wyborem tego czwartku
diff --git a/kppp/Rules/Poland/Netia_Lokalne_Niebieska.rst b/kppp/Rules/Poland/Netia_Lokalne_Niebieska.rst
new file mode 100644
index 00000000..59b6dd5f
--- /dev/null
+++ b/kppp/Rules/Poland/Netia_Lokalne_Niebieska.rst
@@ -0,0 +1,20 @@
+################################################################
+# Reguģki obliczania kosztów poģączeņ lokalnych w sieci Netia
+# Taryfa niebieska (abonament 24.40PLN)
+# Napisane na podstawie http://www.netia.pl/dom/taryfa.html
+# autor: Jacek Stolarczyk <jacek@mer.chemia.polsl.gliwice.pl>
+################################################################
+
+name=Netia_Lokalne_Niebieska
+currency_symbol=PLN
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+# Co 360 sekund dodawane bedzie 33 groszy do rachunku.
+# Jest to taryfa nocna
+default=(0.33, 360)
+# niestety w ciągu dnia czas między impulsami jest 2x krótszy
+on (monday..sunday) between (8:00..21:59) use (0.33, 180)
+
diff --git a/kppp/Rules/Poland/Netia_Lokalne_Zielona.rst b/kppp/Rules/Poland/Netia_Lokalne_Zielona.rst
new file mode 100644
index 00000000..8e71743f
--- /dev/null
+++ b/kppp/Rules/Poland/Netia_Lokalne_Zielona.rst
@@ -0,0 +1,21 @@
+################################################################
+# Reguģki obliczania kosztów poģączeņ lokalnych w sieci Netia
+# Taryfa zielona (abonament 28.06PLN)
+# Napisane na podstawie http://www.netia.pl/dom/taryfa.html
+# autor: Jacek Stolarczyk <jacek@mer.chemia.polsl.gliwice.pl>
+################################################################
+
+name=Netia_Lokalne_Zielona
+currency_symbol=PLN
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+# Co 180 sekund dodawane będą 32 grosze do rachunku.
+# Jest to taryfa nocna
+default=(0.32, 360)
+# niestety w ciągu dnia czas między impulsami jest 2x krótszy
+on (monday..sunday) between (8:00..21:59) use (0.32, 180)
+
+
diff --git a/kppp/Rules/Poland/TPSA.rst b/kppp/Rules/Poland/TPSA.rst
new file mode 100644
index 00000000..719873bc
--- /dev/null
+++ b/kppp/Rules/Poland/TPSA.rst
@@ -0,0 +1,22 @@
+################################################################
+# Reguģki obliczania kosztów poģączeņ lokalnych w sieci TP S.A.
+# Aktualizacja: 4.03.2002
+# autor: Jacek Stolarczyk <jacek@mer.chemia.polsl.gliwice.pl>
+# poprawki: Dariusz Dobosz <D.Dobosz@pik-net.pl>
+# aktualizacje: http://www.dobex.prv.pl
+################################################################
+
+name=TPSA
+currency_symbol=PLN
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+# Co 360 sekund dodawane będzie 31 groszy do rachunku.
+# Jest to tak zwana taryfa nocna.
+default=(0.31, 360)
+# niestety w ciągu dnia czas między impulsami jest 2x krótszy
+on (monday..friday) between (8:00..21:59) use (0.31, 180)
+# Ķwięta
+on (1/01, 1/05, 3/05, 1/11, 11/11, 25/12, 26/12) between () use (0.31, 360)
diff --git a/kppp/Rules/Poland/TP_100km.rst b/kppp/Rules/Poland/TP_100km.rst
new file mode 100644
index 00000000..c7874eff
--- /dev/null
+++ b/kppp/Rules/Poland/TP_100km.rst
@@ -0,0 +1,39 @@
+################################################################
+# Reguģki obliczania kosztów poģączeņ międzymiastowych w sieci TP S.A.,
+# na odlegģoķæ do 100 km między centralami wojewódzkimi.
+# Taryfa obowiązująca od 1 lipca 1999
+# autor: Jacek Stolarczyk <jacek@mer.chemia.polsl.gliwice.pl>
+################################################################
+
+name=TP_100km
+currency_symbol=PLN
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+default=(0.59,60)
+
+# taryfa do 100km
+on (monday..friday) between (8:00..18:00) use (0.59, 60)
+on (monday..friday) between (18:00..22:00) use (0.44, 60)
+on (monday..friday) between (22:00..8:00) use (0.29, 60)
+on (saturday..sunday) between (8:00..22:00) use (0.44, 60)
+on (saturday..sunday) between (22:00..8:00) use (0.29, 60)
+
+# Ķwięta (taryfa sobotnio-niedzielna)
+on (01/01, easter, easter+1, 05/01, 05/03, 08/15, 11/01, 11/11, 12/25, 12/26) between (8:00..22:00) use (0.44, 60)
+on (01/01, easter, easter+1, 05/01, 05/03, 08/15, 11/01, 11/11, 12/25, 12/26) between (22:00..8:00) use (0.29, 60)
+
+#objaķnienia dni ķwiątecznych
+# 01/01 Nowy Rok
+# easter Niedziela Wielkanocna
+# easter+1 Poniedziaģek Wielkanocny
+# 05/01 Ķwięto Pracy
+# 05/03 Dzieņ Konstytucji 3 Maja
+# 08/15 Wniebowzięcie
+# 11/01 Wszystkich Ķwiętych
+# 11/11 Ķwięto Niepodlegģoķci
+# 12/25 Boŋe Narodzenie
+# 12/26 Boŋe Narodzenie
+# niestety na liķcie brakuje Boŋego Ciaģa - nie wiem jaka reguģa rządzi jego
+# wyborem tego czwartku
diff --git a/kppp/Rules/Poland/TP_Lokalne.rst b/kppp/Rules/Poland/TP_Lokalne.rst
new file mode 100644
index 00000000..3192bbdc
--- /dev/null
+++ b/kppp/Rules/Poland/TP_Lokalne.rst
@@ -0,0 +1,19 @@
+################################################################
+# Reguģki obliczania kosztów poģączeņ lokalnych w sieci TP S.A.
+# Obowiązują od 1 lipca 1999, podwyŋka 16 stycznia 2000
+# autor: Jacek Stolarczyk <jacek@mer.chemia.polsl.gliwice.pl>
+################################################################
+
+name=TP_Lokalne
+currency_symbol=PLN
+currency_position=right
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.0
+
+# Co 360 sekund dodawane bedzie 33 groszy do rachunku.
+# Jest to tak zwana taryfa nocna.
+default=(0.33, 360)
+# niestety w ciągu dnia czas między impulsami jest 2x krótszy
+on (monday..sunday) between (8:00..21:59) use (0.33, 180)
+
diff --git a/kppp/Rules/Portugal/Makefile.am b/kppp/Rules/Portugal/Makefile.am
new file mode 100644
index 00000000..1118456d
--- /dev/null
+++ b/kppp/Rules/Portugal/Makefile.am
@@ -0,0 +1,6 @@
+pkg_DATA = PT_Local.rst PT_Local_Ilhas.rst PT_Regional.rst \
+ PT_Regional_Ilhas.rst PT_YesNET.rst PT_YesNET_Ilhas.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Portugal
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Portugal/PT_Local.rst b/kppp/Rules/Portugal/PT_Local.rst
new file mode 100644
index 00000000..92c873dc
--- /dev/null
+++ b/kppp/Rules/Portugal/PT_Local.rst
@@ -0,0 +1,54 @@
+################################################################
+#
+# Portugal Telecom Ruleset for local calls
+# origem: Continente
+#
+# changes 2000-01-02
+# José Carlos Monteiro
+# jcm@oninet.pt
+################################################################
+
+name=PT Local (Continente)
+
+currency_symbol=$
+currency_position=right
+currency_digits=0
+
+# No Activation
+per_connection=0
+
+# Preįo inicial (60 s)
+minimum_costs=18.72
+flat_init_costs=(18.72,60)
+
+# Economico: semana das 21:00 ās 09:00; fim-de-semana todo o dia
+#
+default=(0.03705, 1)
+
+# desconto de 30% após o 10š minuto
+on (saturday..sunday) between () use (0.025935, 1, 600)
+on () between (21:00..09:00) use (0.025935, 1, 600)
+
+# Daylight rates
+on (monday..friday) between (09:00..21:00) use (0.078, 1)
+on (monday..friday) between (09:00..21:00) use (0.0546, 1, 600)
+
+# Feriados Nacionais (tarifa económica):
+# 1/1 Ano Novo
+# easter-47 Carnaval
+# easter-2 Sexta-feira Santa
+# easter Páscoa
+# 4/25 25 de Abril
+# 5/1 Dia do Trabalhador
+# easter+60 Corpo de Deus
+# 6/10 Dia de Portugal
+# 8/15 Nossa Senhora da Assunįão
+# 10/5 Dia da República
+# 11/1 Dia de Todos os Santos
+# 12/1 Dia da Independęncia
+# 12/8 Imaculada Conceiįão
+# 12/25 Natal
+#
+on (1/1, easter-47, easter-2, easter, 4/25, 5/1, easter+60, 6/10, 8/15, 10/5, 11/1, 12/1,12/8, 12/25) between () use (0.03705, 1)
+on (1/1, easter-47, easter-2, easter, 4/25, 5/1, easter+60, 6/10, 8/15, 10/5, 11/1, 12/1,12/8, 12/25) between () use (0.025935, 1, 600)
+
diff --git a/kppp/Rules/Portugal/PT_Local_Ilhas.rst b/kppp/Rules/Portugal/PT_Local_Ilhas.rst
new file mode 100644
index 00000000..eca624da
--- /dev/null
+++ b/kppp/Rules/Portugal/PT_Local_Ilhas.rst
@@ -0,0 +1,54 @@
+################################################################
+#
+# Portugal Telecom Ruleset for local calls
+# origem: Ilhas
+#
+# changes 2000-01-02
+# José Carlos Monteiro
+# jcm@oninet.pt
+################################################################
+
+name=PT Local (Ilhas)
+
+currency_symbol=$
+currency_position=right
+currency_digits=0
+
+# No Activation
+per_connection=0
+
+# Preįo inicial (60 s)
+minimum_costs=17.92
+flat_init_costs=(17.92, 60)
+
+# Economico: semana das 21:00 ās 09:00; fim-de-semana todo o dia
+#
+default=(0.1064, 3)
+
+# desconto de 30% após o 10š minuto
+on (saturday..sunday) between () use (0.07448, 3, 600)
+on () between (21:00..09:00) use (0.07448, 3, 600)
+
+# Daylight rates
+on (monday..friday) between (09:00..21:00) use (0.224, 3)
+on (monday..friday) between (09:00..21:00) use (0.1568, 3, 600)
+
+# Feriados Nacionais (tarifa económica):
+# 1/1 Ano Novo
+# easter-47 Carnaval
+# easter-2 Sexta-feira Santa
+# easter Páscoa
+# 4/25 25 de Abril
+# 5/1 Dia do Trabalhador
+# easter+60 Corpo de Deus
+# 6/10 Dia de Portugal
+# 8/15 Nossa Senhora da Assunįão
+# 10/5 Dia da República
+# 11/1 Dia de Todos os Santos
+# 12/1 Dia da Independęncia
+# 12/8 Imaculada Conceiįão
+# 12/25 Natal
+#
+on (1/1, easter-47, easter-2, easter, 4/25, 5/1, easter+60, 6/10, 8/15, 10/5, 11/1, 12/1,12/8, 12/25) between () use (0.1064, 3)
+on (1/1, easter-47, easter-2, easter, 4/25, 5/1, easter+60, 6/10, 8/15, 10/5, 11/1, 12/1,12/8, 12/25) between () use (0.07448, 3, 600)
+
diff --git a/kppp/Rules/Portugal/PT_Regional.rst b/kppp/Rules/Portugal/PT_Regional.rst
new file mode 100644
index 00000000..3de69213
--- /dev/null
+++ b/kppp/Rules/Portugal/PT_Regional.rst
@@ -0,0 +1,47 @@
+################################################################
+#
+# Portugal Telecom Ruleset for regional calls
+# origem: Continente
+#
+# changes 2000-01-02
+# José Carlos Monteiro
+# jcm@oninet.pt
+################################################################
+
+name=PT Regional (Continente)
+
+currency_symbol=$
+currency_position=right
+currency_digits=0
+
+# No Activation
+per_connection=0
+
+# Preįo inicial (20 s)
+minimum_costs=18.72
+flat_init_costs=(18.72,20)
+
+# Economico: semana das 21:00 ās 09:00; fim-de-semana todo o dia
+#
+default=(0.156, 1)
+
+# Daylight rates
+on (monday..friday) between (9:00..21:00) use (0.30225, 1)
+
+# Feriados Nacionais (tarifa económica):
+# 1/1 Ano Novo
+# easter-47 Carnaval
+# easter-2 Sexta-feira Santa
+# easter Páscoa
+# 4/25 25 de Abril
+# 5/1 Dia do Trabalhador
+# easter+60 Corpo de Deus
+# 6/10 Dia de Portugal
+# 8/15 Nossa Senhora da Assunįão
+# 10/5 Dia da República
+# 11/1 Dia de Todos os Santos
+# 12/1 Dia da Independęncia
+# 12/8 Imaculada Conceiįão
+# 12/25 Natal
+#
+on (1/1, easter-47, easter-2, easter, 4/25, 5/1, easter+60, 6/10, 8/15, 10/5, 11/1, 12/1,12/8, 12/25) between () use (0.156, 1)
diff --git a/kppp/Rules/Portugal/PT_Regional_Ilhas.rst b/kppp/Rules/Portugal/PT_Regional_Ilhas.rst
new file mode 100644
index 00000000..fd4d3a67
--- /dev/null
+++ b/kppp/Rules/Portugal/PT_Regional_Ilhas.rst
@@ -0,0 +1,47 @@
+################################################################
+#
+# Portugal Telecom Ruleset for regional calls
+# origem: Ilhas
+#
+# changes 2000-01-02
+# José Carlos Monteiro
+# jcm@oninet.pt
+################################################################
+
+name=PT Regional (Ilhas)
+
+currency_symbol=$
+currency_position=right
+currency_digits=0
+
+# No Activation
+per_connection=0
+
+# Preįo inicial (20 s)
+minimum_costs=17.92
+flat_init_costs=(17.92,20)
+
+# Economico: semana das 21:00 ās 09:00; fim-de-semana todo o dia
+#
+default=(0.448, 3)
+
+# Daylight rates
+on (monday..friday) between (9:00..21:00) use (0.868, 3)
+
+# Feriados Nacionais (tarifa económica):
+# 1/1 Ano Novo
+# easter-47 Carnaval
+# easter-2 Sexta-feira Santa
+# easter Páscoa
+# 4/25 25 de Abril
+# 5/1 Dia do Trabalhador
+# easter+60 Corpo de Deus
+# 6/10 Dia de Portugal
+# 8/15 Nossa Senhora da Assunįão
+# 10/5 Dia da República
+# 11/1 Dia de Todos os Santos
+# 12/1 Dia da Independęncia
+# 12/8 Imaculada Conceiįão
+# 12/25 Natal
+#
+on (1/1, easter-47, easter-2, easter, 4/25, 5/1, easter+60, 6/10, 8/15, 10/5, 11/1, 12/1,12/8, 12/25) between () use (0.448, 3)
diff --git a/kppp/Rules/Portugal/PT_YesNET.rst b/kppp/Rules/Portugal/PT_YesNET.rst
new file mode 100644
index 00000000..4ddd514a
--- /dev/null
+++ b/kppp/Rules/Portugal/PT_YesNET.rst
@@ -0,0 +1,49 @@
+################################################################
+#
+# Portugal Telecom Ruleset for local calls for
+# Internet numbers 67
+# origem: Continente
+#
+# changes 2000-01-02
+# José Carlos Monteiro
+# jcm@oninet.pt
+################################################################
+
+name=PT YesNET 67
+
+currency_symbol=$
+currency_position=right
+currency_digits=0
+
+# No Activation
+per_connection=0
+
+# Preįo inicial (180 s)
+minimum_costs=10.53
+flat_init_costs=(10.53,180)
+
+# Economico: semana das 18:00 ās 09:00; fim-de-semana todo o dia
+#
+default=(0.027495, 1)
+
+# Daylight rates
+on (monday..friday) between (9:00..18:00) use (0.05655, 1)
+
+# Feriados Nacionais (tarifa económica):
+# 1/1 Ano Novo
+# easter-47 Carnaval
+# easter-2 Sexta-feira Santa
+# easter Páscoa
+# 4/25 25 de Abril
+# 5/1 Dia do Trabalhador
+# easter+60 Corpo de Deus
+# 6/10 Dia de Portugal
+# 8/15 Nossa Senhora da Assunįão
+# 10/5 Dia da República
+# 11/1 Dia de Todos os Santos
+# 12/1 Dia da Independęncia
+# 12/8 Imaculada Conceiįão
+# 12/25 Natal
+#
+on (1/1, easter-47, easter-2, easter, 4/25, 5/1, easter+60, 6/10, 8/15, 10/5, 11/1, 12/1,12/8, 12/25) between () use (0.027495, 1)
+
diff --git a/kppp/Rules/Portugal/PT_YesNET_Ilhas.rst b/kppp/Rules/Portugal/PT_YesNET_Ilhas.rst
new file mode 100644
index 00000000..90e848c4
--- /dev/null
+++ b/kppp/Rules/Portugal/PT_YesNET_Ilhas.rst
@@ -0,0 +1,49 @@
+################################################################
+#
+# Portugal Telecom Ruleset for local calls for
+# Internet numbers 67
+# origem: Ilhas
+#
+# changes 2000-01-02
+# José Carlos Monteiro
+# jcm@oninet.pt
+################################################################
+
+name=PT YesNET 67 (Ilhas)
+
+currency_symbol=$
+currency_position=right
+currency_digits=0
+
+# No Activation
+per_connection=0
+
+# Preįo inicial (180 s)
+minimum_costs=10.08
+flat_init_costs=(10.08,180)
+
+# Economico: semana das 18:00 ās 09:00; fim-de-semana todo o dia
+#
+default=(0.02632, 1)
+
+# Daylight rates
+on (monday..friday) between (9:00..18:00) use (0.1624, 3)
+
+# Feriados Nacionais (tarifa económica):
+# 1/1 Ano Novo
+# easter-47 Carnaval
+# easter-2 Sexta-feira Santa
+# easter Páscoa
+# 4/25 25 de Abril
+# 5/1 Dia do Trabalhador
+# easter+60 Corpo de Deus
+# 6/10 Dia de Portugal
+# 8/15 Nossa Senhora da Assunįão
+# 10/5 Dia da República
+# 11/1 Dia de Todos os Santos
+# 12/1 Dia da Independęncia
+# 12/8 Imaculada Conceiįão
+# 12/25 Natal
+#
+on (1/1, easter-47, easter-2, easter, 4/25, 5/1, easter+60, 6/10, 8/15, 10/5, 11/1, 12/1,12/8, 12/25) between () use (0.02632, 1)
+
diff --git a/kppp/Rules/Romania/ClickNet.rst b/kppp/Rules/Romania/ClickNet.rst
new file mode 100644
index 00000000..5238ad22
--- /dev/null
+++ b/kppp/Rules/Romania/ClickNet.rst
@@ -0,0 +1,33 @@
+##################################################################
+# RomTelecom ClickNet Start (Tarife cu TVA 20 martie 2005) #
+# acces internet la 0870 222 222 #
+# actualizat de Sorin Batariuc <sorin@bonbon.net> #
+##################################################################
+
+# Nota:
+# 1) Tarif I (normal): 60 secunde = 0.0125 Euro (fara TVA)
+# 2) Tarif II (redus): 60 secunde = 0.0070 Euro (fara TVA)
+#
+# TVA = 19%
+#
+
+name=ClickNet Start
+currency_symbol=Euro
+currency_position=right
+currency_digits=6
+per_connection=0.00
+minimum_costs=0.00833
+default=(0.014875, 60)
+
+# TARIFUL I
+on (monday..friday) between (08:00..19:59) use (0.014875, 60)
+
+# TARIFUL II
+on (1/1) between () use (0.00833, 60)
+on (1/2) between () use (0.00833, 60)
+on (5/1) between () use (0.00833, 60)
+on (12/1) between () use (0.00833, 60)
+on (12/31) between () use (0.00833, 60)
+on (monday..friday) between (20:00..07:59) use (0.00833, 60)
+on (saturday..sunday) between (00:00..23:59) use (0.00833, 60)
+
diff --git a/kppp/Rules/Romania/Easynet.rst b/kppp/Rules/Romania/Easynet.rst
new file mode 100644
index 00000000..fb5ff88d
--- /dev/null
+++ b/kppp/Rules/Romania/Easynet.rst
@@ -0,0 +1,20 @@
+################################################################
+# Ruleset for Easynet (inclusiv TVA) #
+# written by Sorin Batariuc <sorin@bonbon.net> #
+# actualizat la 20 Martie 2005, pentru convorbiri 89(3)0123 #
+################################################################
+
+name=Easynet
+currency_symbol=Euro
+currency_position=right
+currency_digits=4
+per_connection=0.0
+minimum_costs=0.01428
+default=(0.022372, 60)
+
+# TARIFUL I
+on (monday..sunday) between (08:00..19:59) use (0.022372,60)
+
+# TARIFUL II
+on (monday..sunday) between (20:00..07:59) use (0.01428,60)
+
diff --git a/kppp/Rules/Romania/Makefile.am b/kppp/Rules/Romania/Makefile.am
new file mode 100644
index 00000000..122456e5
--- /dev/null
+++ b/kppp/Rules/Romania/Makefile.am
@@ -0,0 +1,9 @@
+pkg_DATA = Romtelecom_Acces_Special_Internet.rst \
+ Romtelecom_Interjudetean.rst \
+ Romtelecom_Local.rst \
+ RomTelecom_GSM.rst \
+ Zapp-Mobile.rst Easynet.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Romania
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Romania/RomTelecom_GSM.rst b/kppp/Rules/Romania/RomTelecom_GSM.rst
new file mode 100644
index 00000000..7ab791df
--- /dev/null
+++ b/kppp/Rules/Romania/RomTelecom_GSM.rst
@@ -0,0 +1,23 @@
+##################################################################
+# RomTelecom GSM - Tarife cu TVA (25 mai 2004) #
+# Sorin Batariuc <sorin@bonbon.net> #
+# actualizari de la Sorin Batariuc <sorin@bonbon.net> #
+##################################################################
+
+# Nota:
+# 1) 60 secunde = 0.145 Euro (fara TVA)
+# 2) Tariful este valabil de la 1 Iunie 2004
+#
+# TVA = 19%
+#
+#
+# Referinta: "Anexa II Apeluri de la abonat in centrale automate cu Call Colection si Acces Internet.doc"
+#
+
+name=RomTelecom_GSM
+currency_symbol=Euro
+currency_position=right
+currency_digits=6
+per_connection=0.0
+minimum_costs=0.17255
+default=(0.17255, 60)
diff --git a/kppp/Rules/Romania/Romtelecom_Acces_Special_Internet.rst b/kppp/Rules/Romania/Romtelecom_Acces_Special_Internet.rst
new file mode 100644
index 00000000..725729b6
--- /dev/null
+++ b/kppp/Rules/Romania/Romtelecom_Acces_Special_Internet.rst
@@ -0,0 +1,37 @@
+##################################################################
+# RomTelecom A.S.I. - Tarife cu TVA (8 martie 2004) #
+# Claudiu Costin <claudiuc@kde.org> #
+# actualizari de la Sorin Batariuc <sorin@bonbon.net> #
+##################################################################
+
+# Nota:
+# 1) Tarif I (normal): 60 secunde = 0.0095 Euro (fara TVA)
+# 2) Tarif II (redus): 60 secunde = 0.0045 Euro (fara TVA)
+# 3) Tariful este valabil de la 1 Iunie 2004
+#
+# TVA = 19%
+#
+#
+# Referinta: "Anexa II Apeluri de la abonat in centrale automate cu Call Colection si Acces Internet.doc"
+#
+
+name=Romtelecom Acces Special Internet
+currency_symbol=Euro
+currency_position=right
+currency_digits=6
+per_connection=0.00
+minimum_costs=0.005355
+default=(0.011305, 60)
+
+# TARIFUL I
+on (monday..friday) between (08:00..19:59) use (0.011305, 60)
+
+# TARIFUL II
+on (1/1) between () use (0.005355, 60)
+on (1/2) between () use (0.005355, 60)
+on (5/1) between () use (0.005355, 60)
+on (12/1) between () use (0.005355, 60)
+on (12/31) between () use (0.005355, 60)
+on (monday..friday) between (20:00..07:59) use (0.005355, 60)
+on (saturday..sunday) between (00:00..23:59) use (0.005355, 60)
+
diff --git a/kppp/Rules/Romania/Romtelecom_Interjudetean.rst b/kppp/Rules/Romania/Romtelecom_Interjudetean.rst
new file mode 100644
index 00000000..33d06da1
--- /dev/null
+++ b/kppp/Rules/Romania/Romtelecom_Interjudetean.rst
@@ -0,0 +1,31 @@
+##################################################################
+# RomTelecom Interjudetean - Tarife cu TVA (20 martie 2005) #
+# #
+# actualizat de Sorin Batariuc <sorin@bonbon.net> #
+##################################################################
+
+# Nota:
+# 1) Tarif I (normal): 60 secunde = 0.054 Euro (fara TVA)
+# 2) Tarif II (redus): 60 secunde = 0.040 Euro (fara TVA)
+#
+# TVA = 19%
+
+name=Romtelecom Interjudetean
+currency_symbol=Euro
+currency_position=right
+currency_digits=5
+per_connection=0.00
+minimum_costs=0.0476
+default=(0.06426, 60)
+
+# TARIFUL I
+on (monday..friday) between (08:00..19:59) use (0.06426, 60)
+
+# TARIFUL II
+on (1/1) between () use (0.0476, 60)
+on (1/2) between () use (0.0476, 60)
+on (5/1) between () use (0.0476, 60)
+on (12/1) between () use (0.0476, 60)
+on (12/31) between () use (0.0476, 60)
+on (monday..friday) between (20:00..07:59) use (0.0476, 60)
+on (saturday..sunday) between (00:00..23:59) use (0.0476, 60)
diff --git a/kppp/Rules/Romania/Romtelecom_Local.rst b/kppp/Rules/Romania/Romtelecom_Local.rst
new file mode 100644
index 00000000..e391269a
--- /dev/null
+++ b/kppp/Rules/Romania/Romtelecom_Local.rst
@@ -0,0 +1,36 @@
+##################################################################
+# RomTelecom Local - Tarife cu TVA (25 mai 2004) #
+# Claudiu Costin <claudiuc@kde.org> #
+# actualizari de la Sorin Batariuc <sorin@bonbon.net> #
+##################################################################
+
+# Nota:
+# 1) Tarif I (normal): 60 secunde = 0.029 Euro (fara TVA)
+# 2) Tarif II (redus): 60 secunde = 0.010 Euro (fara TVA)
+# 3) Tariful este valabil de la 1 Iunie 2004
+#
+# TVA = 19%
+#
+#
+# Referinta: "Anexa II Apeluri de la abonat in centrale automate cu Call Colection si Acces Internet.doc"
+#
+
+name=Romtelecom Local
+currency_symbol=Euro
+currency_position=right
+currency_digits=6
+per_connection=0.00
+minimum_costs=0.0119
+default=(0.03451, 60)
+
+# TARIFUL I
+on (monday..friday) between (08:00..19:59) use (0.03451, 60)
+
+# TARIFUL II
+on (1/1) between () use (0.0119, 60)
+on (1/2) between () use (0.0119, 60)
+on (5/1) between () use (0.0119, 60)
+on (12/1) between () use (0.0119, 60)
+on (12/31) between () use (0.0119, 60)
+on (monday..friday) between (20:00..07:59) use (0.0119, 60)
+on (saturday..sunday) between (00:00..23:59) use (0.0119, 60)
diff --git a/kppp/Rules/Romania/Zapp-Mobile.rst b/kppp/Rules/Romania/Zapp-Mobile.rst
new file mode 100644
index 00000000..ecc64431
--- /dev/null
+++ b/kppp/Rules/Romania/Zapp-Mobile.rst
@@ -0,0 +1,19 @@
+##################################################################
+# Zapp Online - Tarife cu TVA (8 martie 2004) #
+# Andras Mantia <amantia@freemail.hu> #
+# modificari de Claudiu Costin <claudiuc@kde.org> #
+##################################################################
+
+# Nota:
+# 1) Cost: 0.02$/minut
+# 2) Taxarea se face la secunda
+# TVA = 19%
+#
+
+name=Zapp-Mobile
+currency_symbol=$
+currency_position=right
+currency_digits=4
+per_connection=0.00
+minimum_costs=0.00
+default=(0.0004, 1)
diff --git a/kppp/Rules/Russia/Makefile.am b/kppp/Rules/Russia/Makefile.am
new file mode 100644
index 00000000..4cb1a149
--- /dev/null
+++ b/kppp/Rules/Russia/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = TEMPLATE.ru mtu-intel_standart.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Russia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Russia/TEMPLATE.ru b/kppp/Rules/Russia/TEMPLATE.ru
new file mode 100644
index 00000000..e50a7890
--- /dev/null
+++ b/kppp/Rules/Russia/TEMPLATE.ru
@@ -0,0 +1,163 @@
+################################################################
+# There is a russian translation of same file named
+# "$prefix/kppp/Rules/TEMPLATE"
+# Code page of this file is KOI8-R
+################################################################
+#
+# Disclaimer/ėÉÃÅÎÚÉŅ
+# üÔÏÔ ÛÁÂĖÏÎ ÏÔ (c) Mario Weilguni <mweilguni@kde.org>
+# ïÎ ĖÉÃÅÎÚÉŌÕÅÔÓŅ ÎÁ ÔÅČ ÖÅ ÕÓĖÏŨÉŅČ, ÞÔÏ É ÐÁËÅÔ kppp,
+# ÞÁÓÔØĀ ËÏÔÏŌÏĮÏ ÏÎ ŅŨĖŅÅÔÓŅ.
+#
+################################################################
+#
+# ðōéíåþáîéå ðåōåũïäþéëá:
+# üÔÏÔ ÆÁĘĖ ŅŨĖŅÅÔÓŅ ÐÅŌÅŨÏÄÏÍ ÆÁĘĖÁ "TEMPLATE", ŌÁÓÐÏĖÏÖÅÎÎÏĮÏ
+# ŨÅŌÏŅÔÎÏ Ũ ÄÉŌÅËÔÏŌÉÉ "/usr/share/apps/kppp/Rules"
+#
+# üÔÏ ÐŌÉÍÅŌ ÕÓÔÁÎÏŨĖÅÎÎŲČ ÐŌÁŨÉĖ ÄĖŅ kppp. ũŲ ÍÏÖÅÔÅ ÉÓÐÏĖØÚÏŨÁÔØ
+# ÅĮÏ ËÁË ÛÁÂĖÏÎ, ËÏĮÄÁ ũŲ ÂÕÄÅÔÅ ÓÏÚÄÁŨÁÔØ ÓŨÏĘ ÎÁÂÏŌ ÐŌÁŨÉĖ. åÓĖÉ ũŲ
+# ÂÕÄÅÔÅ ÜÔÏ ÄÅĖÁÔØ, ÕÄÁĖÉÔÅ ŨÓÅ ËÏÍÍÅÎÔÁŌÉÉ É ÄÏÂÁŨØÔÅ ÓŨÏÉ. üÔÏ ÚÎÁÞÉÔÅĖØÎÏ
+# ÕÐŌÏÓÔÉÔ ÄŌÕĮÉÍ ÐÏĖØÚÏŨÁÔÅĖŅÍ ÐŌÏŨÅŌËÕ ÜÔÏĮÏ ÎÁÂÏŌÁ ÐŌÁŨÉĖ.
+#
+# ðÏÖÁĖÕĘÓÔÁ, ÐÏÄÐÉÛÉÔÅ ÜÔÏÔ ÔÁŌÉÆÎŲĘ ÐĖÁÎ ÓŨÏÉÍ ÉÍÅÎÅÍ Ó e-mail ÁÄŌÅÓÏÍ
+# ÞÔÏÂŲ Ņ ÍÏĮ ÓŨŅÚÁÔØÓŅ Ó ũÁÍÉ Ũ ÓĖÕÞÁÅ ÎÅÏÂČÏÄÉÍÏÓÔÉ.
+#
+# ðōéíåþáîéå: ðŌÁŨÉĖÁ Ũ ÜÔÏÍ ÛÁÂĖÏÎÅ ÎÅ ÉÍÅĀÔ ÏÓÏÂÏĮÏ ÓÍŲÓĖÁ É
+# ÐŌÉŨÅÄÅÎŲ ÔÏĖØËÏ Ũ ÄÅÍÏÎÓÔŌÁÃÉÏÎÎŲČ ÃÅĖŅČ
+#
+# ðōéíåþáîéå ðï éíåîáí æáęėïũ:
+# ëÏĮÄÁ ŨŲ ÓÏÚÄÁÅÔÅ ÓŨÏĘ ÎÁÂÏŌ ÐŌÁŨÉĖ, ÉÓÐÏĖØÚÕĘÔÅ "_" Ũ ÉÍÅÎÉ ÆÁĘĖÁ
+# ŨÍÅÓÔÏ ÐŌÏÂÅĖÏŨ É ÉÓÐÏĖØÚÕĘÔÅ ŌÁÓÛÉŌÅÎÉÅ ".rst"
+# Ô.Å. "Austria city calls"
+# --> ÆÁĘĖ ÄÏĖÖÅÎ ÂŲÔØ ÓÏČŌÁÎÅÎ ËÁË "Austria_city_calls.rst"
+#
+# âĖÁĮÏÄÁŌĀ, Bernd Wuebben
+# wuebben@math.cornell.edu / wuebben@kde.org
+#
+# ðÅŌÅŨÏÄ: (c) áĖÅËÓÁÎÄŌ á. ðÕÞËÏŨ, 03.08.2001
+# Translation: (c) Alex A. Puchkov, 03.08.2001
+# ôÅËÕÝÉĘ e-mail: mailex@nm.ru / mailex@mail.ru
+#
+# ðōéíåþáîéå ðåōåũïäþéëá: åÓĖÉ ũŲ ÏÂÎÁŌÕÖÉĖÉ ÏÛÉÂËÉ ÉĖÉ ÎÅÔÏÞÎÏÓÔÉ,
+# ÉĖÉ ÖÅ ČÏÔÉÔÅ ŨÎÅÓÔÉ ÓŨÏÉ ÐÏÖÅĖÁÎÉŅ - ÐÉÛÉÔÅ ÍÎÅ ÐÏ
+# ÕËÁÚÁÎÎÏÍÕ ŨŲÛÅ e-mail ÁÄŌÅÓÕ.
+################################################################
+
+
+################################################################
+#
+# îáúũáîéå ôáōéæá. ïÎÏ ÎÕÖÎÏ ÄĖŅ ÓÞÅÔÁ (accounting purposes).
+#
+################################################################
+name=default
+
+################################################################
+# õÓÔÁÎÏŨËÉ ŨÁĖĀÔŲ
+################################################################
+
+# úÁÄÁÅÍ ATS (áŨÓÔŌÉĘÓËÉĘ ÛÉĖĖÉÎĮ) ÄĖŅ ÉÓÐÏĖØÚÏŨÁÎÉŅ ÅĮÏ ËÁË ÓÉÍŨÏĖ
+# ŨÁĖĀÔŲ (ÎÅ ÏÂŅÚÁÔÅĖØÎÏ ÎÕÖÅÎ, ÐÏ ÕÍÏĖÞÁÎÉĀ = "$")
+# currency_symbol=ATS
+currency_symbol=$
+
+# úÁÄÁÅÍ ÐÏÚÉÃÉĀ ÓÉÍŨÏĖÁ ŨÁĖĀÔŲ.
+# (ÎÅ ÏÂŅÚÁÔÅĖØÎÏ ÎÕÖÎÏ, ÐÏ ÕÍÏĖÞÁÎÉĀ ÜÔÏ "right" /ÓÐŌÁŨÁ/)
+currency_position=right
+
+# úÁÄÁÅÍ ÞÉÓĖÏ ÚÎÁÞÉÍŲČ ÃÉÆŌ.
+# (ÎÅ ÏÂŅÚÁÔÅĖØÎÏ ÎÕÖÎÏ, ÐÏ ÕÍÏĖÞÁÎÉĀ ÜÔÏ "2")
+currency_digits=2
+
+
+
+################################################################
+# õÓÔÁÎÏŨËÉ ÓÏÅÄÉÎÅÎÉŅ
+################################################################
+
+# ðōéíåþáîéå: ÐŌÁŨÉĖÁ ÐŌÉÍÅÎŅĀÔÓŅ ÉÚ ÎÁÞÁĖÁ Ũ ËÏÎÅÃ - ÜÔÏ ÚÎÁÞÉÔ,
+# ÞÔÏ ÔÏĖØËÏ ðïóėåäîåå ÓÏÏÔŨÅÔÓÔŨÕĀÝÅÅ ÐŌÁŨÉĖÏ ÉÓÐÏĖØÚÕÅÔÓŅ
+# ÄĖŅ ŨŲÞÉÓĖÅÎÉŅ ÚÁÔŌÁÔ.
+
+# üÔÏ ÏÐĖÁÞÉŨÁÅÔÓŅ ËÁÖÄŲĘ ŌÁÚ, ËÏĮÄÁ ũŲ ÓÏÅÄÉÎŅÅÔÅÓØ Ó ÐŌÏŨÁĘÄÅŌÏÍ.
+# åÓĖÉ ũŲ ÎÅ ÐĖÁÔÉÔÅ ÐŌÉ ÓÏÅÄÉÎÅÎÉÉ, ÉÓÐÏĖØÚÕĘÔÅ "0" ÚÄÅÓØ ÉĖÉ
+# ÚÁËÏÍÍÅÎÔÉŌÕĘÔÅ ÜÔÕ ÓÔŌÏËÕ.
+per_connection=0.0
+
+
+# íÉÎÉÍÁĖØÎŲĘ ŨÚÎÏÓ ÐŌÉ ÓÏÅÄÉÎÅÎÉÉ. åÓĖÉ ŨÚÎÏÓ ÚÁ ÔÅĖÅÆÏÎÎŲĘ
+# ÚŨÏÎÏË ÍÅÎØÛÅ ÞÅÍ ÜÔÏ ÚÎÁÞÅÎÉÅ, ÔÏ ŨÚÁÍÅÎ ÉÓÐÏĖØÚÕÅÔÓŅ ÜÔÏ ÚÎÁÞÅÎÉÅ (?)
+# ðŌÉÍÅÞÁÎÉÅ ÐÅŌÅŨÏÄÞÉËÁ: ÓÍ. Ũ ÏŌÉĮÉÎÁĖÅ, ÅÓĖÉ ÎÅÐÏÎŅÔÎÏ.
+minimum_costs=0.0
+
+
+# ũŲ ÐĖÁÔÉÔÅ .74 ÚÁ ÐÅŌŨŲÅ 180 ÓÅËÕÎÄ (3 ÍÉÎÕÔŲ), ÐŌÉ ÜÔÏÍ ÂÅÚŌÁÚĖÉÞÎÏ,
+# ÓËÏĖØËÏ ũŲ ÐÏÄËĖĀÞÅÎŲ - 1 ÓÅËÕÎÄÕ ÉĖÉ 180 ÓÅËÕÎÄ.
+# üÔÏ ÐŌÁŨÉĖÏ ÐÏĖÕÞÁÅÔ ÐŌÉÏŌÉÔÅÔ Ũ ÔÅÞÅÎÉÉ ÐÅŌŨŲČ 180 ÓÅËÕÎÄ
+# ÎÁÄ ĖĀÂŲÍ ÄŌÕĮÉÍ ÐŌÁŨÉĖÏÍ, Ũ ÏÓÏÂÅÎÎÏÓÔÉ ÎÁÄ ÐŌÁŨÉĖÏÍ ÐÏ ÕÍÏĖÞÁÎÉĀ.
+# ðÏÓÍÏÔŌÉÔÅ ÎÁ ÆÁĘĖ costgraphs.gif Ũ ÄÉŌÅËÔÏŌÉÉ docs ÄÉÓÔŌÉÂÕÔÉŨÁ
+# kppp ÄĖŅ ĮŌÁÆÉÞÅÓËÏĘ ÉĖĖĀÓÔŌÁÃÉÉ ŨŲÛÅ ÎÁÐÉÓÁÎÎÏĮÏ.
+flat_init_costs=(0.74,180)
+
+# üÔÏ ÐŌÁŨÉĖÏ ÐÏ ÕÍÏĖÞÁÎÉĀ, ËÏÔÏŌÏÅ ÉÓÐÏĖØÚÕÅÔÓŅ ËÏĮÄÁ ÎÅ ÐŌÉÍÅÎŅĀÔÓŅ
+# ÄŌÕĮÉÅ ÐŌÁŨÉĖÁ. ðÅŌŨŲĘ ËÏÍÐÏÎÅÎÔ "0.1" ÜÔÏ ÃÅÎÁ ÚÁ ÏÄÎÕ "ÅÄÉÎÉÃÕ"
+# /"unit"/, ĮÄÅ "72" ÜÔÏ ŨŌÅÍŅ Ũ ÓÅËÕÎÄÁČ.
+# óĖÅÄÏŨÁÔÅĖØÎÏ, ÓĖÅÄÕĀÝÅÅ ÐŌÁŨÉĖÏ ÏÚÎÁÞÁÅÔ: "ëÁÖÄŲÅ 72 ÓÅËÕÎÄŲ 0.1
+# ATS ÐŌÉÂÁŨĖŅÅÔÓŅ Ë ÓÞÅÔÕ"
+default=(0.1, 72)
+
+#
+# âÏĖÅÅ ÓĖÏÖÎŲÅ ÐŌÁŨÉĖÁ:
+#
+
+# "Ó ÐÏÎÅÄÅĖØÎÉËÁ ÄÏ ŨÏÓËŌÅÓÅÎØŅ Ó 00:00 ÄÏ 23:59 ŨÚÎÏÓ
+# 0.2 ËÁÖÄŲÅ 72 ÓÅËÕÎÄŲ"
+# ðŌÉÍÅÞÁÎÉÅ ÐÅŌÅŨÏÄÞÉËÁ: Ũ ÏŌÉĮÉÎÁĖÅ Ó 12:00 am ÄÏ 11:59 pm
+on () between () use (0.2, 2)
+
+# ôÏÖÅ ÓÁÍÏÅ, ÞÔÏ É ŨŲÛÅ
+on (monday..sunday) between () use (0.2, 2)
+
+# ôÏÖÅ ÓÁÍÏÅ, ÞÔÏ É ŨŲÛÅ. ũŲ ÄÏĖÖÎŲ ÉÓÐÏĖØÚÏŨÁÔØ 24-Č ÞÁÓÏŨÏÅ ŨŌÅÍŅ,
+# ÉĖÉ ŨŲÞÉÓĖÅÎÉŅ ÎÅ ÂÕÄÕÔ ËÏŌŌÅËÔÎŲÍÉ. (ðŌÉÍÅŌ: ÐÉÛÉÔÅ 15:00 ÄĖŅ 3 pm)
+on (monday..sunday) between (0:00..23:59) use (0.2, 2)
+
+# ÐŌÉÍÅÎÉÔÅĖØÎÏ Ë ÐŅÔÎÉÃÅ, ÓÕÂÂÏÔÅ, ŨÏÓËŌÅÓÅÎØĀ É ÐÏÎÅÄÅĖØÎÉËÕ Ó 8:00 ÄÏ 13:00
+on (friday..monday) between (8:00..13:00) use(0.3,72)
+
+# ũîéíáîéå:
+on(monday..friday) between (21:00..5:00) use (0.4,2)
+# îå ŨËĖĀÞÁŅ ÓÕÂÂÏÔÕ 0:00-5:00, ÐÏÎÅÄÅĖØÎÉË..ÐŅÔÎÉÃÁ, ËÁË ÕËÁÚÁÎÏ.
+
+# ðŌÉÍÅÎÉÔÅĖØÎÏ Ë ÕËÁÚÁÎÎÏĘ ÄÁÔÅ (ËÁÔÏĖÉÞÅÓËÏÍÕ ōÏÖÄÅÓÔŨÕ)
+on (12/25) between () use (0.3,72)
+
+# éÎÔÅŌŨÁĖ ÄÁÔ É ÏÄÉÎ ÄÅÎØ ÎÅÄÅĖÉ
+on (12/25..12/27, 12/31, 07/04, monday) between () use (0.4, 72)
+
+# éÓÐÏĖØÚÕĘÔÅ ÜÔÏ ÄĖŅ ðÁÓČÉ
+# ðŌÉÍÅÞÁÎÉÅ ÐÅŌÅŨÏÄÞÉËÁ: äĖŅ ōÏÓÓÉÉ, ŨÅŌÏŅÔÎÏ, ĖÕÞÛÅ ÎÅ ÉÓÐÏĖØÚÏŨÁÔØ ÜÔÏ
+# ÚÎÁÞÅÎÉÅ, ÔÁË ËÁË ÐŌÁŨÏÓĖÁŨÎÁŅ ðÁÓČÁ ÍÏÖÅÔ ÎÅ ÓÏŨÐÁÄÁÔØ
+# Ó ËÁÔÏĖÉÞÅÓËÏĘ ÐÏ ÄÁÔÅ
+on (easter) between () use (0.3,72)
+
+# ðÁÓČÁ + 50 ÄÎÅĘ (ôŌÏÉÃÉÎ ÄÅÎØ) [Pfingstmontag/ Pentecost Monday]
+# ðŌÉÍÅÞÁÎÉÅ ÐÅŌÅŨÏÄÞÉËÁ: ÓÍ. ŨŲÛÅ
+on (easter+50) between () use (0.3,72)
+
+on (thursday) between (20:00..21:52) use (8.2, 1)
+
+
+# ðŌÁŨÉĖÁ "on()" ÐŌÅÖÄÅ ŨÓÅĮÏ ÓŨŅÚÁÎŲ ÔÏĖØËÏ Ó ÔÅËÕÝÉÍ ŨŌÅÍÅÎÅÍ. ũŲ ÍÏÖÅÔÅ
+# ÔÁËÖÅ ÓÏÚÄÁÔØ ÐŌÁŨÉĖÁ, ÚÁŨÉÓŅÝÉÅ ÏÔ ËÏĖÉÞÅÓÔŨÁ ÓÅËÕÎÄ, Ũ ÔÅÞÅÎÉÉ ËÏÔÏŌŲČ
+# ũŲ ÂŲĖÉ ÐÏÄËĖĀÞÅÎŲ Ë ÓŨÏÅÍÕ ÐŌÏŨÁĘÄÅŌÕ, ÚÁÄÁŨÁŅ ÜÔÏ ŨŌÅÍŅ ËÁË ÔŌÅÔÉĘ ÁŌĮÕÍÅÎÔ
+# Ë "use()".
+# ë ÐŌÉÍÅŌÕ, ÐÕÓÔØ ÂÕÄÅÔ ÎÏŌÍÁĖØÎŲĘ ÔÁŌÉÆ ŨÅÞÅŌÏÍ - 0.20 ÚÁ ÍÉÎÕÔÕ,
+# É ÏÎ ÕÍÅÎØÛÁÅÔÓŅ ÎÁ 20% ÐÏÓĖÅ 1-ĮÏ ÞÁÓÁ ÓÏÅÄÉÎÅÎÉŅ. üÔÏ ÍÏÖÅÔ ÂŲÔØ
+# ÓÍÏÄÅĖÉŌÏŨÁÎÏ ÔÁË:
+
+on () between (19:30..08:00) use (0.20, 60)
+on () between (19:30..08:00) use (0.16, 60, 3600)
+
+# ðŌÉÍÅÞÁÎÉÅ Ë ÜÔÉÍ ÐŌÁŨÉĖÁÍ, ÓÐŌÁŨÅÄĖÉŨÏÅ É Ë ÄŌÕĮÉÍ ÐŌÁŨÉĖÁÍ:
+# ðŌÁŨÉĖÁ ÞÕŨÓÔŨÉÔÅĖØÎŲ Ë ÐÏŌŅÄËÕ, Ũ ËÏÔÏŌÏÍ ÏÎÉ ÓĖÅÄÕĀÔ
diff --git a/kppp/Rules/Russia/mtu-intel_standart.rst b/kppp/Rules/Russia/mtu-intel_standart.rst
new file mode 100644
index 00000000..eeba0fd9
--- /dev/null
+++ b/kppp/Rules/Russia/mtu-intel_standart.rst
@@ -0,0 +1,51 @@
+################################################################
+# "MTU-Intel" (Russia, Moscow) rate ruleset
+# Created by "Alex A. Puchkov" <mailex@nm.ru>
+#
+# Code page of this file is KOI8-R
+# Date: 03.08.2001, Version 0.1b
+################################################################
+#
+# Disclaimer/ėÉÃÅÎÚÉŅ
+# üÔÏÔ ÔÁŌÉÆ ÏÓÎÏŨÁÎ ÎÁ ÛÁÂĖÏÎÅ ÏÔ (c) Mario Weilguni <mweilguni@kde.org>,
+# É ÓŨÏÅÍ ÓÏÂÓÔŨÅÎÎÏÍ ÐÅŌÅŨÏÄÅ ÜÔÏĮÏ ÛÁÂĖÏÎÁ, ËÏÔÏŌŲĘ ÍÏÖÎÏ ÎÁĘÔÉ Ũ ÄÉŌÅËÔÏŌÉÉ
+# "/usr/share/apps/kppp/Rules"
+# ïÎ ĖÉÃÅÎÚÉŌÕÅÔÓŅ ÎÁ ÔÅČ ÖÅ ÕÓĖÏŨÉŅČ, ÞÔÏ É ÐÁËÅÔ kppp.
+# ëÏŌŌÅËÔÎÏÓÔØ ŌÁÓÞÅÔÏŨ ÎÅ ĮÁŌÁÎÔÉŌÏŨÁÎÁ.
+#
+# ðōéíåþáîéå: åÓĖÉ ũŲ ÏÂÎÁŌÕÖÉĖÉ ÏÛÉÂËÉ ÉĖÉ ÎÅÔÏÞÎÏÓÔÉ,
+# ÉĖÉ ÖÅ ČÏÔÉÔÅ ŨÎÅÓÔÉ ÓŨÏÉ ÐÏÖÅĖÁÎÉŅ - ÐÉÛÉÔÅ ÍÎÅ ÐÏ
+# ÕËÁÚÁÎÎÏÍÕ ŨŲÛÅ e-mail ÁÄŌÅÓÕ.
+#
+################################################################
+
+################################################################
+# îáúũáîéå ôáōéæá. ïÎÏ ÎÕÖÎÏ ÄĖŅ ÓÞÅÔÁ (accounting purposes).
+################################################################
+name=MTU_INTEL_standart
+
+################################################################
+# õÓÔÁÎÏŨËÉ ÓÏÅÄÉÎÅÎÉŅ
+################################################################
+
+# ôÅËÕÝÉĘ ÔÁŌÉÆ ÎÁ ËÏÍÍÕÔÉŌÕÅÍŲĘ ÄÏÓÔÕÐ Ũ éÎÔÅŌÎÅÔ ÏÔ ËÏÍÐÁÎÉÉ íôõ-éÎÔÅĖ
+# ðÏŨŌÅÍÅÎÎÏĘ ÄÏÓÔÕÐ Į.íÏÓËŨÁ, ÍÏÄÅÍÎŲÅ ÐÕĖŲ 995-55-55/56, 721-33-11 É ÄŌÕĮÉÅ
+# äÎÅŨÎÏĘ ÔÁŌÉÆ, ÄÅĘÓÔŨÕÅÔ Ó 9:30 ÄÏ 20:00 ÞÁÓÏŨ. 0,75 Õ.Å./þÁÓ
+# ũÅÞÅŌÎÉĘ ÔÁŌÉÆ, ÄÅĘÓÔŨÕÅÔ Ó 20:00 ÄÏ 02:00 ÞÁÓÏŨ. 0,90 Õ.Å./þÁÓ
+# îÏÞÎÏĘ ÔÁŌÉÆ, ÄÅĘÓÔŨÕÅÔ Ó 02:00 ÄÏ 09:30 ÞÁÓÏŨ. 0,35 Õ.Å./þÁÓ
+
+# åÓĖÉ ũŲ ŌÁÂÏÔÁÅÔÅ ÐÅŌŨŲÅ 30 ÓÅËÕÎÄ, ÔÏ ũŲ ÎÅ ÐĖÁÔÉÔÅ ÎÉÞÅĮÏ :-)
+flat_init_costs=(0.0, 30)
+
+# äÎÅŨÎÏĘ ÔÁŌÉÆ, ÄÅĘÓÔŨÕÅÔ Ó 9:30 ÄÏ 20:00 ÞÁÓÏŨ. - 0,75 $/þÁÓ
+# üÔÏ ÐŌÁŨÉĖÏ ÐÏ ÕÍÏĖÞÁÎÉĀ, É Ũ ÄÁÎÎÏÍ ÓĖÕÞÁÅ ÏÎÏ ÏÚÎÁÞÁÅÔ:
+# "ëÁÖÄŲÅ 30 ÓÅËÕÎÄ 0.00625 ÐŌÉÂÁŨĖŅÅÔÓŅ Ë ÓÞÅÔÕ (ÄÎÅŨÎÏĘ ÔÁŌÉÆ - 0,75 $ Ũ ÞÁÓ)"
+default=(0.00625, 30)
+
+# ũÅÞÅŌÎÉĘ ÔÁŌÉÆ, ÄÅĘÓÔŨÕÅÔ Ó 20:00 ÄÏ 02:00 ÞÁÓÏŨ. - 0,90 $/þÁÓ
+# "ëÁÖÄŲĘ ÄÅÎØ ÎÅÄÅĖÉ Ó 20:00 ÄÏ 01:59 ŨÚÎÏÓ 0.0075 ËÁÖÄŲÅ 30 ÓÅËÕÎÄ"
+on () between (20:00..01:59) use (0.0075, 30)
+
+# îÏÞÎÏĘ ÔÁŌÉÆ, ÄÅĘÓÔŨÕÅÔ Ó 02:00 ÄÏ 09:30 ÞÁÓÏŨ. - 0,35 $/þÁÓ
+# "ëÁÖÄŲĘ ÄÅÎØ ÎÅÄÅĖÉ Ó 02:00 ÄÏ 09:29 ŨÚÎÏÓ 0.0029166 ËÁÖÄŲÅ 30 ÓÅËÕÎÄ"
+on () between (02:00..09:29) use (0.0029166, 30)
diff --git a/kppp/Rules/Singapore/Makefile.am b/kppp/Rules/Singapore/Makefile.am
new file mode 100644
index 00000000..52597b79
--- /dev/null
+++ b/kppp/Rules/Singapore/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = SingTel_Local.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Singapore
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Singapore/SingTel_Local.rst b/kppp/Rules/Singapore/SingTel_Local.rst
new file mode 100644
index 00000000..a70269a2
--- /dev/null
+++ b/kppp/Rules/Singapore/SingTel_Local.rst
@@ -0,0 +1,59 @@
+################################################################
+# This is the rule set for Singapore, local SingTel charge
+#
+# Boh Cheh Wee <bohcw@singnet.com.sg>
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=SingTel_Local
+
+################################################################
+# currency settings
+################################################################
+
+# defines Sing Dollar to be used as currency
+currency_symbol=S$
+
+# Define the position of the currency symbol.
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+# This is the default rule which is used when no other rule
+# applies.
+default=(0.00721,60)
+
+# applies 8am until 6pm: every 30 seconds 0.721 cents
+# are added to the bill
+on () between (8:00..18:00) use(0.00721,30)
+
+# applies 6pm until 8am: every 60 seconds 0.721 cents
+# are added to the bill
+on () between (18:00..7:59) use(0.00721,60)
+
+# applies weekends: every 60 seconds 0.721 cents
+# are added to the bill
+on (saturday..sunday) between (00:00..23:59) use (0.00721, 60) \ No newline at end of file
diff --git a/kppp/Rules/Slovakia/Internetovy_tarif_019XY.rst b/kppp/Rules/Slovakia/Internetovy_tarif_019XY.rst
new file mode 100644
index 00000000..2daf749c
--- /dev/null
+++ b/kppp/Rules/Slovakia/Internetovy_tarif_019XY.rst
@@ -0,0 +1,28 @@
+################################################################
+# Slovak Telecom rate ruleset for 019XY numbers after 1.7.2001
+#
+# created 01/07/31 by kayle <kayle@szm.sk>
+#
+# DISCLAIMER: Use at your own risk ;)
+################################################################
+
+name=Internetovy_tarif_019XY
+currency_symbol=Sk
+currency_position=right
+currency_digits=2
+per_connection=1.50
+minimum_costs=0.0
+default=(1.50, 240)
+
+# on (monday..friday) between (0:00..7:00) use (1.50, 240)
+on (monday..friday) between (7:00..19:00) use (1.50, 90)
+# on (monday..friday) between (19:00..24:00) use (1.50, 240)
+
+on (saturday..sunday) between () use (1.50, 290)
+
+on (1/1, 1/6, 5/1, 5/8, 7/5, 8/29) between () use (1.50, 290)
+on (9/1, 9/15, 11/1, 12/24..12/26) between () use (1.50, 290)
+
+on (easter) between () use (1.50, 290)
+
+
diff --git a/kppp/Rules/Slovakia/Makefile.am b/kppp/Rules/Slovakia/Makefile.am
new file mode 100644
index 00000000..fd0403b0
--- /dev/null
+++ b/kppp/Rules/Slovakia/Makefile.am
@@ -0,0 +1,7 @@
+pkg_DATA = Internetovy_tarif_019XY.rst \
+ ST_medzimesto.rst \
+ ST_mesto.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Slovakia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Slovakia/ST_medzimesto.rst b/kppp/Rules/Slovakia/ST_medzimesto.rst
new file mode 100644
index 00000000..04d3e629
--- /dev/null
+++ b/kppp/Rules/Slovakia/ST_medzimesto.rst
@@ -0,0 +1,25 @@
+################################################################
+# Slovak Telecom rate ruleset
+#
+# created 98/01/29 by Juraj Bednár <juraj@bednar.sk>
+#
+# no extensive testing...
+# updated 00/03/04 by carcass <carcass@gmx.net>
+# updates 01/07/03 by Juraj Bednar <juraj@bednar.sk>
+################################################################
+
+name=ST_medzimesto
+currency_symbol=Sk
+currency_position=right
+currency_digits=2
+per_connection=1.476
+minimum_costs=0.0
+default=(1.476, 20)
+
+on (monday..friday) between (19:00..7:00) use (1.476, 40)
+on (saturday..sunday) between () use (1.476, 60)
+
+on (1/1, 1/6, 5/1, 5/8, 7/5, 8/29) between () use (1.476, 60)
+on (9/1, 9/15, 11/1, 12/24..12/26) between () use (1.476, 60)
+
+on (easter) between () use (1.476, 60)
diff --git a/kppp/Rules/Slovakia/ST_mesto.rst b/kppp/Rules/Slovakia/ST_mesto.rst
new file mode 100644
index 00000000..b4d8572c
--- /dev/null
+++ b/kppp/Rules/Slovakia/ST_mesto.rst
@@ -0,0 +1,25 @@
+################################################################
+# Slovak Telecom rate ruleset
+#
+# created 98/01/29 by Juraj Bednár <juraj@bednar.sk>
+# updated 01/07/03 by Juraj Bednár <juraj@bednar.sk>
+#
+# no extensive testing...
+# updated 00/03/04 by carcass <carcass@gmx.net>
+################################################################
+
+name=ST_mesto
+currency_symbol=Sk
+currency_position=right
+currency_digits=2
+per_connection=1.476
+minimum_costs=0.0
+default=(1.476, 60)
+
+on (monday..friday) between (19:00..7:00) use (1.476, 120)
+on (saturday..sunday) between () use (1.476, 180)
+
+on (1/1, 1/6, 5/1, 5/8, 7/5, 8/29) between () use (1.476, 180)
+on (9/1, 9/15, 11/1, 12/24..12/26) between () use (1.476, 180)
+
+on (easter) between () use (1.476, 180)
diff --git a/kppp/Rules/Slovenia/Makefile.am b/kppp/Rules/Slovenia/Makefile.am
new file mode 100644
index 00000000..2d257b7c
--- /dev/null
+++ b/kppp/Rules/Slovenia/Makefile.am
@@ -0,0 +1,7 @@
+pkg_DATA = omrezje_0880.rst \
+ omrezje_0889.rst \
+ stacionarno_omrezje.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Slovenia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Slovenia/omrezje_0880.rst b/kppp/Rules/Slovenia/omrezje_0880.rst
new file mode 100644
index 00000000..437f0ba3
--- /dev/null
+++ b/kppp/Rules/Slovenia/omrezje_0880.rst
@@ -0,0 +1,67 @@
+################################################################
+# $Id$
+# $Source$
+#
+# RULES FOR KPPP WITH SLOVENIAN PHONE NETWORK 0880 (ISP PROVIDER).
+#
+# 2002-02-02:
+# Updated by roman.maurer@amis.net,
+# based on data provided by Primoz Hrvatin.
+#
+# 2000-09-25:
+# Prepared by Ales.Kosir@hermes.si,
+# based on data provided by Srdjan Cvjetovic.
+#
+# Calls from stationary phone network to the ISP numbers 0880:
+# A user pays to the phone company the fixed price for connection, and
+# the ISP will charge you per second for the duration of the call.
+# The cost is 2.04 SIT per minute on normal rate,
+# and 1.02 SIT on discounted.
+#
+################################################################
+name=omrezje_0880.rst
+
+################################################################
+# currency settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+currency_symbol=SIT
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# This is charged whenever you connect. The amount is payed to the
+# phone company.
+
+per_connection=6.30
+
+# "on monday until sunday the costs
+# are 2.04 on normal and 1.02 on discounted per each 60 seconds"
+
+on (monday..saturday) between (0:00..6:59) use (1.02, 60)
+on (monday..saturday) between (7:00..18:59) use (2.04, 60)
+on (monday..saturday) between (19:00..23:59) use (1.02, 60)
+on (sunday) between () use (1.02, 60)
+
+# Drzavni prazniki:
+# 1.1., 2.1 - Novo leto
+# 8.2. - Slovenski kulturni praznik
+# Easter - Velika noc
+# Easter Monday - Velikonocni ponedeljek
+# 27.4. - Dan upora proti okupatorju
+# 1.5.,2.5. - Praznik dela
+# - Binkosti
+# 25.6. - Dan drzavnosti
+# 15.8. - Marijino vnebovzetje
+# 31.10. - Dan reformacije
+# 1.11. - Dan spomina na mrtve
+# 25.12. - Bozic
+# 26.12. - Dan samostojnosti
+on (01/01, 01/02, 02/08, easter, easter+1, 04/26, 05/01, 05/02, easter+50, 06/25, 08/15, 10/31, 11/01, 12/25, 12/26) between () use (1.02, 60)
diff --git a/kppp/Rules/Slovenia/omrezje_0889.rst b/kppp/Rules/Slovenia/omrezje_0889.rst
new file mode 100644
index 00000000..e5f8d08f
--- /dev/null
+++ b/kppp/Rules/Slovenia/omrezje_0889.rst
@@ -0,0 +1,58 @@
+################################################################
+# $Id$
+# $Source$
+#
+# RULES FOR KPPP WITH SLOVENIAN PHONE NETWORK 0889 (ISP PROVIDERS).
+#
+# 2002-02-02:
+# Updated by roman.maurer@amis.net,
+# based on data provided by Primoz Hrvatin.
+#
+# 2000-09-25:
+# Prepared by Ales.Kosir@hermes.si,
+# based on data, provided by Srdjan Cvjetovic.
+#
+# Calls from stationary phone network to the ISP numbers 0889:
+#
+################################################################
+name=omrezje-0889.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=SIT
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=2.52
+
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+
+on (monday..saturday) between (0:00..6:59) use (1.26, 60)
+on (monday..saturday) between (7:00..18:59) use (2.52, 60)
+on (monday..saturday) between (19:00..23:59) use (1.26, 60)
+on (sunday) between () use (1.26, 60)
+
+# Drzavni prazniki:
+# 1.1., 2.1 - Novo leto
+# 8.2. - Slovenski kulturni praznik
+# Easter - Velika noc
+# Easter Monday - Velikonocni ponedeljek
+# 27.4. - Dan upora proti okupatorju
+# 1.5.,2.5. - Praznik dela
+# - Binkosti
+# 25.6. - Dan drzavnosti
+# 15.8. - Marijino vnebovzetje
+# 31.10. - Dan reformacije
+# 1.11. - Dan spomina na mrtve
+# 25.12. - Bozic
+# 26.12. - Dan samostojnosti
+on (01/01, 01/02, 02/08, easter, easter+1, 04/26, 05/01, 05/02, easter+50, 06/25, 08/15, 10/31, 11/01, 12/25, 12/26) between () use (1.26, 60)
diff --git a/kppp/Rules/Slovenia/stacionarno_omrezje.rst b/kppp/Rules/Slovenia/stacionarno_omrezje.rst
new file mode 100644
index 00000000..c4eb3305
--- /dev/null
+++ b/kppp/Rules/Slovenia/stacionarno_omrezje.rst
@@ -0,0 +1,53 @@
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+# Prepared by Ales.Kosir@hermes.si,
+# based on data, provided by Srdjan Cvjetovic
+#
+# This accounting information includes all calls from stationary
+# phone network to the numbers starting with 01, 02, 03 (except 031),
+# 04 (except 040 in 041), 05, and 07.
+#
+################################################################
+name=stacionarno_omrezje.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=SIT
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=4.11
+
+on (monday..saturday) between (0:00..6:59) use (4.11, 120)
+on (monday..saturday) between (7:00..18:59) use (4.11, 60)
+on (monday..saturday) between (19:00..23:59) use (4.11, 120)
+on (sunday) between () use (4.11, 120)
+
+# Drzavni prazniki:
+# 1.1., 2.1 - Novo leto
+# 8.2. - Slovenski kulturni praznik
+# Easter - Velika noc
+# Easter Monday - Velikonocni ponedeljek
+# 27.4. - Dan upora proti okupatorju
+# 1.5.,2.5. - Praznik dela
+# - Binkosti
+# 25.6. - Dan drzavnosti
+# 15.8. - Marijino vnebovzetje
+# 31.10. - Dan reformacije
+# 1.11. - Dan spomina na mrtve
+# 25.12. - Bozic
+# 26.12. - Dan samostojnosti
+on (01/01, 01/02, 02/08, easter, easter+1, 04/26, 05/01, 05/02, easter+50, 06/25, 08/15, 10/31, 11/01, 12/25, 12/26) between () use (4.11, 120)
+
+
+
+
diff --git a/kppp/Rules/SouthAfrica/Makefile.am b/kppp/Rules/SouthAfrica/Makefile.am
new file mode 100644
index 00000000..473e703f
--- /dev/null
+++ b/kppp/Rules/SouthAfrica/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = South_Africa_local.rst South_Africa_long_distance.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/South_Africa
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/SouthAfrica/South_Africa_local.rst b/kppp/Rules/SouthAfrica/South_Africa_local.rst
new file mode 100644
index 00000000..7df20914
--- /dev/null
+++ b/kppp/Rules/SouthAfrica/South_Africa_local.rst
@@ -0,0 +1,73 @@
+################################################################
+#
+# This is an accounting set for Telkom South Africa
+# Please note that the costs used are those corresponding to
+# the 2003/2004 directory and are based on local phone calls
+# being made. All calls are charged per second.
+# Callmore time is implemented in this rule set.
+# Call rates may change and I hold no responsibility for improper
+# use of this rule set.
+#
+# This rule set was last updated: 29 September 2003
+# by Males Tomlinson <vorsicht@webmail.co.za>
+# Distance:________________Local Call (0-50km)
+# Charges: Standard time:__0,37c per/min
+# Callmore time:__0,14c per/min
+# Minimum call charges:____55c
+#
+#
+# - If unsure, contact your Internet service provider to
+# determain your call distance and Telkom SA for up to date
+# charge rates.
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=South_African_Local_Call_0-50km
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol R ('Rand') eg, R 1.20 would imply 1 Rand and 20 cents
+currency_symbol=R
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.55
+
+#flat_init_costs=(0)
+#default=(0)
+
+#
+# more complicated rules:
+#
+
+# This is used for the so called 'CallMore Time' schedule that was
+# introduced by Telkom.(R0,0024 every second)
+#
+on (saturday..sunday) between (0:00..23:59) use (0.0024,1)
+on (monday..friday) between (0:00..06:59) use (0.0024,1)
+on (monday..friday) between (19:00..23:59) use (0.0024,1)
+
+# This is used for the so called 'Normal Time' schedule
+# (R0,0062 every second)
+on (monday..friday) between (07:00..18:59) use (0.0062,1)
diff --git a/kppp/Rules/SouthAfrica/South_Africa_long_distance.rst b/kppp/Rules/SouthAfrica/South_Africa_long_distance.rst
new file mode 100644
index 00000000..657708e2
--- /dev/null
+++ b/kppp/Rules/SouthAfrica/South_Africa_long_distance.rst
@@ -0,0 +1,73 @@
+################################################################
+#
+# This is an accounting set for Telkom South Africa
+# Please note that the costs used are those corresponding to
+# the 2003 directory and are based on long distance phone calls
+# being made. All calls are charged per second.
+# Callmore time is implemented in this rule set.
+# Call rates may change and I hold no responsibility for improper
+# use of this rule set.
+#
+# This rule set was last updated: 26 September 2003
+# by Males Tomlinson <vorsicht@webmail.co.za>
+# Distance:________________Long distance Call +50km
+# Charges: Standard time:__99c per/min
+# Callmore time:__50c per/min
+# Minimum call charges:____99c
+#
+#
+# - If unsure, contact your Internet service provider to
+# determain your call distance and Telkom SA for up to date
+# charge rates.
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=South_Africa_Long_distance_50km_plus
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol R ('Rand') eg, R 1.20 would imply 1 Rand and 20 cents
+currency_symbol=R
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.99
+
+#flat_init_costs=(0)
+#default=(0)
+
+#
+# more complicated rules:
+#
+
+# This is used for the so called 'CallMore Time' schedule that was
+# introduced by Telkom.(R0,0084 every second)
+#
+on (saturday..sunday) between (0:00..23:59) use (0.0084,1)
+on (monday..friday) between (0:00..06:59) use (0.0084,1)
+on (monday..friday) between (19:00..23:59) use (0.0084,1)
+
+# This is used for the so called 'Normal Time' schedule
+# (R0,0165 every second)
+on (monday..friday) between (07:00..18:59) use (0.0165,1)
diff --git a/kppp/Rules/SouthAfrika/Makefile.am b/kppp/Rules/SouthAfrika/Makefile.am
new file mode 100644
index 00000000..94c018fa
--- /dev/null
+++ b/kppp/Rules/SouthAfrika/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = South_Afrika.rst South_Afrika_Justin.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/South_Afrika
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/SouthAfrika/South_Afrika.rst b/kppp/Rules/SouthAfrika/South_Afrika.rst
new file mode 100644
index 00000000..cc45aba9
--- /dev/null
+++ b/kppp/Rules/SouthAfrika/South_Afrika.rst
@@ -0,0 +1,328 @@
+################################################################
+#
+# This is a accounting set for Telkom South Africa
+# Please note that the costs used are those corresponding to
+# the '97/'98 directory and are based on local phone calls
+# being made. Strictly speaking, the call charges are not 31c
+# but 30,9c per unit. The odd cost is due to the inclusion
+# of VAT. I've rounded it off to keep things simple.
+#
+# The postfix 'A'..'D' is related to the distance maps
+# and will affect the duration of 1 call unit
+#
+# Distance Table
+# Type Distance Std Time CallMore Time
+# ---- -------- -------- -------------
+# A 0-50 km 180 sec 480 sec
+# B >50-100 km 37,6 75,2
+# C >100-200 km 18,8 45,2
+# D >200 km 13,6 28,8
+#
+# South African residents, please note the following:
+# - Consult your local directory to determine which distance type
+# to use
+# - Most ISP providers in S.A. have pop's (point of pressence) in
+# the major cities, so it's very likely type A will be applicable
+# - If unsure, contact a local Telkom office in your area
+#
+# Any problems, please email me
+# Regards
+#
+# Jacques Eloff,
+# email: repstosd@global.co.za
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=South_African_Distance_A
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol R ('Rand') eg, R 1.20 would imply 1 Rand and 20 cents
+currency_symbol=R
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+flat_init_costs=(0.31,180)
+default=(0.31,180)
+
+#
+# more complicated rules:
+#
+
+# This is used for the so called 'CallMore Time' schedule that was
+# introduced by Telkom.
+on (saturday..sunday) between (0:00..23:59) use (0.31,480)
+on (monday..friday) between (0:00..06:59) use (0.31,480)
+on (monday..friday) between (19:00..23:59) use (0.31,480)
+
+# This is used for the so called 'Normal Time' schedule
+on (monday..friday) between (07:00..18:59) use (0.31,180)
+################################################################
+#
+# This is a accounting set for Telkom South Africa
+# Please note that the costs used are those corresponding to
+# the '97/'98 directory and are based on local phone calls
+# being made. Strictly speaking, the call charges are not 31c
+# but 30,9c per unit. The odd cost is due to the inclusion
+# of VAT. I've rounded it off to keep things simple.
+#
+# The postfix 'A'..'D' is related to the distance maps
+# and will affect the duration of 1 call unit
+#
+# Distance Table
+# Type Distance Std Time CallMore Time
+# ---- -------- -------- -------------
+# A 0-50 km 180 sec 480 sec
+# B >50-100 km 37,6 75,2
+# C >100-200 km 18,8 45,2
+# D >200 km 13,6 28,8
+#
+# South African residents, please note the following:
+# - Consult your local directory to determine which distance type
+# to use
+# - Most ISP providers in S.A. have pop's (point of pressence) in
+# the major cities, so it's very likely type A will be applicable
+# - If unsure, contact a local Telkom office in your area
+#
+# Any problems, please email me
+# Regards
+#
+# Jacques Eloff,
+# email: repstosd@global.co.za
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=South_African_Distance_B
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol R ('Rand') eg, R 1.20 would imply 1 Rand and 20 cents
+currency_symbol=R
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+flat_init_costs=(0.31,37.6)
+default=(0.31,37.6)
+
+#
+# more complicated rules:
+#
+
+# This is used for the so called 'CallMore Time' schedule that was
+# introduced by Telkom.
+on (saturday..sunday) between (0:00..23:59) use (0.31,75.2)
+on (monday..friday) between (0:00..06:59) use (0.31,75.2)
+on (monday..friday) between (19:00..23:59) use (0.31,75.2)
+
+# This is used for the so called 'Normal Time' schedule
+on (monday..friday) between (07:00..18:59) use (0.31,37.6)
+################################################################
+#
+# This is a accounting set for Telkom South Africa
+# Please note that the costs used are those corresponding to
+# the '97/'98 directory and are based on local phone calls
+# being made. Strictly speaking, the call charges are not 31c
+# but 30,9c per unit. The odd cost is due to the inclusion
+# of VAT. I've rounded it off to keep things simple.
+#
+# The postfix 'A'..'D' is related to the distance maps
+# and will affect the duration of 1 call unit
+#
+# Distance Table
+# Type Distance Std Time CallMore Time
+# ---- -------- -------- -------------
+# A 0-50 km 180 sec 480 sec
+# B >50-100 km 37,6 75,2
+# C >100-200 km 18,8 45,2
+# D >200 km 13,6 28,8
+#
+# South African residents, please note the following:
+# - Consult your local directory to determine which distance type
+# to use
+# - Most ISP providers in S.A. have pop's (point of pressence) in
+# the major cities, so it's very likely type A will be applicable
+# - If unsure, contact a local Telkom office in your area
+#
+# Any problems, please email me
+# Regards
+#
+# Jacques Eloff,
+# email: repstosd@global.co.za
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=South_African_Distance_C
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol R ('Rand') eg, R 1.20 would imply 1 Rand and 20 cents
+currency_symbol=R
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+flat_init_costs=(0.31,18.8)
+default=(0.31,18.8)
+
+#
+# more complicated rules:
+#
+
+# This is used for the so called 'CallMore Time' schedule that was
+# introduced by Telkom.
+on (saturday..sunday) between (0:00..23:59) use (0.31,45.2)
+on (monday..friday) between (0:00..06:59) use (0.31,45.2)
+on (monday..friday) between (19:00..23:59) use (0.31,45.2)
+
+# This is used for the so called 'Normal Time' schedule
+on (monday..friday) between (07:00..18:59) use (0.31,18.8)
+################################################################
+#
+# This is a accounting set for Telkom South Africa
+# Please note that the costs used are those corresponding to
+# the '97/'98 directory and are based on local phone calls
+# being made. Strictly speaking, the call charges are not 31c
+# but 30,9c per unit. The odd cost is due to the inclusion
+# of VAT. I've rounded it off to keep things simple.
+#
+# The postfix 'A'..'D' is related to the distance maps
+# and will affect the duration of 1 call unit
+#
+# Distance Table
+# Type Distance Std Time CallMore Time
+# ---- -------- -------- -------------
+# A 0-50 km 180 sec 480 sec
+# B >50-100 km 37,6 75,2
+# C >100-200 km 18,8 45,2
+# D >200 km 13,6 28,8
+#
+# South African residents, please note the following:
+# - Consult your local directory to determine which distance type
+# to use
+# - Most ISP providers in S.A. have pop's (point of pressence) in
+# the major cities, so it's very likely type A will be applicable
+# - If unsure, contact a local Telkom office in your area
+#
+# Any problems, please email me
+# Regards
+#
+# Jacques Eloff,
+# email: repstosd@global.co.za
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=South_African_Distance_D
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol R ('Rand') eg, R 1.20 would imply 1 Rand and 20 cents
+currency_symbol=R
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+flat_init_costs=(0.31,13.6)
+default=(0.31,13.6)
+
+#
+# more complicated rules:
+#
+
+# This is used for the so called 'CallMore Time' schedule that was
+# introduced by Telkom.
+on (saturday..sunday) between (0:00..23:59) use (0.31,28.8)
+on (monday..friday) between (0:00..06:59) use (0.31,28.8)
+on (monday..friday) between (19:00..23:59) use (0.31,28.8)
+
+# This is used for the so called 'Normal Time' schedule
+on (monday..friday) between (07:00..18:59) use (0.31,13.6)
diff --git a/kppp/Rules/SouthAfrika/South_Afrika_Justin.rst b/kppp/Rules/SouthAfrika/South_Afrika_Justin.rst
new file mode 100644
index 00000000..a8214bdf
--- /dev/null
+++ b/kppp/Rules/SouthAfrika/South_Afrika_Justin.rst
@@ -0,0 +1,123 @@
+################################################################
+#
+#
+#This was updated for personal use by and for Justin Porteous
+# I only Needed it for less than 50Km's IE a local call
+# Date 12/12/2001
+# Email nozlab@hotmail.com
+#
+# This is a accounting set for Telkom South Africa
+# Please note that the costs used are those corresponding to
+# the '97/'98 directory and are based on local phone calls
+# being made. Strictly speaking, the call charges are not 31c
+# but 30,9c per unit. The odd cost is due to the inclusion
+# of VAT. I've rounded it off to keep things simple.
+#
+# The postfix 'A'..'D' is related to the distance maps
+# and will affect the duration of 1 call unit
+#
+# Distance Table
+# Type Distance Std Time CallMore Time
+# ---- -------- -------- -------------
+# A 0-50 km 180 sec 480 sec
+# B >50-100 km 37,6 75,2
+# C >100-200 km 18,8 45,2
+# D >200 km 13,6 28,8
+#
+# South African residents, please note the following:
+# - Consult your local directory to determine which distance type
+# to use
+# - Most ISP providers in S.A. have pop's (point of pressence) in
+# the major cities, so it's very likely type A will be applicable
+# - If unsure, contact a local Telkom office in your area
+#
+# Any problems, please email me
+# Regards
+#
+# Jacques Eloff,
+# email: repstosd@global.co.za
+#
+################################################################
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=South_African_Distance_A
+
+################################################################
+# currency settings
+################################################################
+
+# Currency symbol R ('Rand') eg, R 1.20 would imply 1 Rand and 20 cents
+currency_symbol=R
+currency_position=left
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.58
+
+flat_init_costs=(0.58,86)
+
+default=(0.24,30)
+
+#
+# more complicated rules:
+#
+
+# This is used for the so called 'CallMore Time' schedule that was
+# introduced by Telkom.
+on (saturday..sunday) between (13:00..7:00) use (0.09,30)
+on (monday..friday) between (19:00..07:59) use (0.09,30)
+#on (monday..friday) between (19:00..23:59) use (0.09,30)
+
+# This is used for the so called 'Normal Time' schedule
+on (monday..friday) between (07:00..18:59) use (0.24,30)
+################################################################
+#
+# This is a accounting set for Telkom South Africa
+# Please note that the costs used are those corresponding to
+# the '97/'98 directory and are based on local phone calls
+# being made. Strictly speaking, the call charges are not 31c
+# but 30,9c per unit. The odd cost is due to the inclusion
+# of VAT. I've rounded it off to keep things simple.
+#
+# The postfix 'A'..'D' is related to the distance maps
+# and will affect the duration of 1 call unit
+#
+# Distance Table
+# Type Distance Std Time CallMore Time
+# ---- -------- -------- -------------
+# A 0-50 km 180 sec 480 sec
+# B >50-100 km 37,6 75,2
+# C >100-200 km 18,8 45,2
+# D >200 km 13,6 28,8
+#
+# South African residents, please note the following:
+# - Consult your local directory to determine which distance type
+# to use
+# - Most ISP providers in S.A. have pop's (point of pressence) in
+# the major cities, so it's very likely type A will be applicable
+# - If unsure, contact a local Telkom office in your area
+#
+# Any problems, please email me
+# Regards
+#
+# Jacques Eloff,
+# email: repstosd@global.co.za
+#
+################################################################
diff --git a/kppp/Rules/Spain/Infovia.rst b/kppp/Rules/Spain/Infovia.rst
new file mode 100644
index 00000000..b9c85c11
--- /dev/null
+++ b/kppp/Rules/Spain/Infovia.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Infovia at Spain
+#
+################################################################
+name=Spain Infovia
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0
+minimum_costs=11.40
+flat_init_costs=(11.40,160)
+
+# Por Defecto reducida
+default=(0.0274, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.0754, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.0754, 1)
+on (saturday) between (8:00..13:59) use (0.0754, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.0274, 1)
+on (1/6) between () use (0.0274, 1)
+on (5/1) between () use (0.0274, 1)
+on (10/12) between () use (0.0274, 1)
+on (11/1) between () use (0.0274, 1)
+on (12/6) between () use (0.0274, 1)
+on (12/8) between () use (0.0274, 1)
+on (12/25) between () use (0.0274, 1)
+on (easter) between () use (0.0274, 1)
+on (easter+50) between () use (0.0274, 1)
diff --git a/kppp/Rules/Spain/Infovia_IVA.rst b/kppp/Rules/Spain/Infovia_IVA.rst
new file mode 100644
index 00000000..b978599f
--- /dev/null
+++ b/kppp/Rules/Spain/Infovia_IVA.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Infovia at Spain
+#
+################################################################
+name=Spain Infovia IVA
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0
+minimum_costs=13.224
+flat_init_costs=(13.224,160)
+
+# Por Defecto reducida
+default=(0.0318, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.0875, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.0875, 1)
+on (saturday) between (8:00..13:59) use (0.0875, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.0318, 1)
+on (1/6) between () use (0.0318, 1)
+on (5/1) between () use (0.0318, 1)
+on (10/12) between () use (0.0318, 1)
+on (11/1) between () use (0.0318, 1)
+on (12/6) between () use (0.0318, 1)
+on (12/8) between () use (0.0318, 1)
+on (12/25) between () use (0.0318, 1)
+on (easter) between () use (0.0318, 1)
+on (easter+50) between () use (0.0318, 1)
diff --git a/kppp/Rules/Spain/Makefile.am b/kppp/Rules/Spain/Makefile.am
new file mode 100644
index 00000000..951487a6
--- /dev/null
+++ b/kppp/Rules/Spain/Makefile.am
@@ -0,0 +1,9 @@
+pkg_DATA = Infovia.rst Telefonica_Interprovincial.rst \
+ Infovia_IVA.rst Telefonica_Interprovincial_IVA.rst \
+ Telefonica_Metropolitana.rst Telefonica_Metropolitana_IVA.rst \
+ Telefonica_Nacional.rst Telefonica_Provincial.rst \
+ Telefonica_Provincial_IVA.rst Telefonica_Local.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Spain
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Spain/Telefonica_Interprovincial.rst b/kppp/Rules/Spain/Telefonica_Interprovincial.rst
new file mode 100644
index 00000000..8f7bcb89
--- /dev/null
+++ b/kppp/Rules/Spain/Telefonica_Interprovincial.rst
@@ -0,0 +1,43 @@
+################################################################
+#
+# Telefonica at Spain
+#
+################################################################
+name=Spain Telefonica Interprovincial
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=15
+minimum_costs=15
+
+# Por Defecto reducida
+default=(0.174, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.4169, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.6575, 1)
+on (saturday) between (8:00..13:59) use (0.6575, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.174, 1)
+on (1/6) between () use (0.174, 1)
+on (5/1) between () use (0.174, 1)
+on (10/12) between () use (0.174, 1)
+on (11/1) between () use (0.174, 1)
+on (12/6) between () use (0.174, 1)
+on (12/8) between () use (0.174, 1)
+on (12/25) between () use (0.174, 1)
+on (easter) between () use (0.174, 1)
+on (easter+50) between () use (0.174, 1)
diff --git a/kppp/Rules/Spain/Telefonica_Interprovincial_IVA.rst b/kppp/Rules/Spain/Telefonica_Interprovincial_IVA.rst
new file mode 100644
index 00000000..cae45154
--- /dev/null
+++ b/kppp/Rules/Spain/Telefonica_Interprovincial_IVA.rst
@@ -0,0 +1,43 @@
+################################################################
+#
+# Telefonica at Spain
+#
+################################################################
+name=Spain Telefonica Interprovincial IVA
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=17.4
+minimum_costs=17.4
+
+# Por Defecto reducida
+default=(0.2018, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.4836, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.7627, 1)
+on (saturday) between (8:00..13:59) use (0.7627, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.2018, 1)
+on (1/6) between () use (0.2018, 1)
+on (5/1) between () use (0.2018, 1)
+on (10/12) between () use (0.2018, 1)
+on (11/1) between () use (0.2018, 1)
+on (12/6) between () use (0.2018, 1)
+on (12/8) between () use (0.2018, 1)
+on (12/25) between () use (0.2018, 1)
+on (easter) between () use (0.2018, 1)
+on (easter+50) between () use (0.2018, 1)
diff --git a/kppp/Rules/Spain/Telefonica_Local.rst b/kppp/Rules/Spain/Telefonica_Local.rst
new file mode 100644
index 00000000..b086565d
--- /dev/null
+++ b/kppp/Rules/Spain/Telefonica_Local.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Infovia at Spain
+#
+################################################################
+name=Spain Telefonica Metropolitana
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0
+minimum_costs=11.40
+flat_init_costs=(11.40,160)
+
+# Por Defecto reducida
+default=(0.0274, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.0754, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.0754, 1)
+on (saturday) between (8:00..13:59) use (0.0754, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.0274, 1)
+on (1/6) between () use (0.0274, 1)
+on (5/1) between () use (0.0274, 1)
+on (10/12) between () use (0.0274, 1)
+on (11/1) between () use (0.0274, 1)
+on (12/6) between () use (0.0274, 1)
+on (12/8) between () use (0.0274, 1)
+on (12/25) between () use (0.0274, 1)
+on (easter) between () use (0.0274, 1)
+on (easter+50) between () use (0.0274, 1)
diff --git a/kppp/Rules/Spain/Telefonica_Metropolitana.rst b/kppp/Rules/Spain/Telefonica_Metropolitana.rst
new file mode 100644
index 00000000..b086565d
--- /dev/null
+++ b/kppp/Rules/Spain/Telefonica_Metropolitana.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Infovia at Spain
+#
+################################################################
+name=Spain Telefonica Metropolitana
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0
+minimum_costs=11.40
+flat_init_costs=(11.40,160)
+
+# Por Defecto reducida
+default=(0.0274, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.0754, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.0754, 1)
+on (saturday) between (8:00..13:59) use (0.0754, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.0274, 1)
+on (1/6) between () use (0.0274, 1)
+on (5/1) between () use (0.0274, 1)
+on (10/12) between () use (0.0274, 1)
+on (11/1) between () use (0.0274, 1)
+on (12/6) between () use (0.0274, 1)
+on (12/8) between () use (0.0274, 1)
+on (12/25) between () use (0.0274, 1)
+on (easter) between () use (0.0274, 1)
+on (easter+50) between () use (0.0274, 1)
diff --git a/kppp/Rules/Spain/Telefonica_Metropolitana_IVA.rst b/kppp/Rules/Spain/Telefonica_Metropolitana_IVA.rst
new file mode 100644
index 00000000..e646ca50
--- /dev/null
+++ b/kppp/Rules/Spain/Telefonica_Metropolitana_IVA.rst
@@ -0,0 +1,44 @@
+################################################################
+#
+# Infovia at Spain
+#
+################################################################
+name=Spain Telefonica Metropolitana IVA
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0
+minimum_costs=13.224
+flat_init_costs=(13.224,160)
+
+# Por Defecto reducida
+default=(0.0318, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.0875, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.0875, 1)
+on (saturday) between (8:00..13:59) use (0.0875, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.0318, 1)
+on (1/6) between () use (0.0318, 1)
+on (5/1) between () use (0.0318, 1)
+on (10/12) between () use (0.0318, 1)
+on (11/1) between () use (0.0318, 1)
+on (12/6) between () use (0.0318, 1)
+on (12/8) between () use (0.0318, 1)
+on (12/25) between () use (0.0318, 1)
+on (easter) between () use (0.0318, 1)
+on (easter+50) between () use (0.0318, 1)
diff --git a/kppp/Rules/Spain/Telefonica_Nacional.rst b/kppp/Rules/Spain/Telefonica_Nacional.rst
new file mode 100644
index 00000000..8f7bcb89
--- /dev/null
+++ b/kppp/Rules/Spain/Telefonica_Nacional.rst
@@ -0,0 +1,43 @@
+################################################################
+#
+# Telefonica at Spain
+#
+################################################################
+name=Spain Telefonica Interprovincial
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=15
+minimum_costs=15
+
+# Por Defecto reducida
+default=(0.174, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.4169, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.6575, 1)
+on (saturday) between (8:00..13:59) use (0.6575, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.174, 1)
+on (1/6) between () use (0.174, 1)
+on (5/1) between () use (0.174, 1)
+on (10/12) between () use (0.174, 1)
+on (11/1) between () use (0.174, 1)
+on (12/6) between () use (0.174, 1)
+on (12/8) between () use (0.174, 1)
+on (12/25) between () use (0.174, 1)
+on (easter) between () use (0.174, 1)
+on (easter+50) between () use (0.174, 1)
diff --git a/kppp/Rules/Spain/Telefonica_Provincial.rst b/kppp/Rules/Spain/Telefonica_Provincial.rst
new file mode 100644
index 00000000..3121674a
--- /dev/null
+++ b/kppp/Rules/Spain/Telefonica_Provincial.rst
@@ -0,0 +1,43 @@
+################################################################
+#
+# Telefonica at Spain
+#
+################################################################
+name=Spain Telefonica Interprovincial
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=15
+minimum_costs=15
+
+# Por Defecto reducida
+default=(0.1129, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.224, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.2575, 1)
+on (saturday) between (8:00..13:59) use (0.2575, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.1129, 1)
+on (1/6) between () use (0.1129, 1)
+on (5/1) between () use (0.1129, 1)
+on (10/12) between () use (0.1129, 1)
+on (11/1) between () use (0.1129, 1)
+on (12/6) between () use (0.1129, 1)
+on (12/8) between () use (0.1129, 1)
+on (12/25) between () use (0.1129, 1)
+on (easter) between () use (0.1129, 1)
+on (easter+50) between () use (0.1129, 1)
diff --git a/kppp/Rules/Spain/Telefonica_Provincial_IVA.rst b/kppp/Rules/Spain/Telefonica_Provincial_IVA.rst
new file mode 100644
index 00000000..0b8dd7e1
--- /dev/null
+++ b/kppp/Rules/Spain/Telefonica_Provincial_IVA.rst
@@ -0,0 +1,43 @@
+################################################################
+#
+# Telefonica at Spain
+#
+################################################################
+name=Spain Telefonica Interprovincial IVA
+
+################################################################
+# currency settings
+################################################################
+currency_symbol=PTS
+currency_position=right
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=17.4
+minimum_costs=17.4
+
+# Por Defecto reducida
+default=(0.131, 1)
+
+# Tarifa Normal
+on (monday..friday) between (17:00..21:59) use (0.2598, 1)
+
+# Tarifa Punta
+on (monday..friday) between (8:00..16:59) use (0.2987, 1)
+on (saturday) between (8:00..13:59) use (0.2987, 1)
+
+# Festivos: Reducida
+on (1/1) between () use (0.131, 1)
+on (1/6) between () use (0.131, 1)
+on (5/1) between () use (0.131, 1)
+on (10/12) between () use (0.131, 1)
+on (11/1) between () use (0.131, 1)
+on (12/6) between () use (0.131, 1)
+on (12/8) between () use (0.131, 1)
+on (12/25) between () use (0.131, 1)
+on (easter) between () use (0.131, 1)
+on (easter+50) between () use (0.131, 1)
diff --git a/kppp/Rules/Sweden/ACN.rst b/kppp/Rules/Sweden/ACN.rst
new file mode 100644
index 00000000..9a82d3b8
--- /dev/null
+++ b/kppp/Rules/Sweden/ACN.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with ACN
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=ACN_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 45 öre
+per_connection=0.45
+minimum_costs=0.0
+
+# Hög taxa: 17 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0028333333333, 1)
+
+# Låg taxa: 9,4 öre/min (räknat per sekund)
+default=(0.0015666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0015666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0015666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0015666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0015666666667, 1)
+# första maj
+on (05/01) between () use (0.0015666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0015666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0015666666667, 1)
+# juldagen
+on (12/25) between () use (0.0015666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0015666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0015666666667, 1)
+# julafton
+on (12/24) between () use (0.0015666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0015666666667, 1)
diff --git a/kppp/Rules/Sweden/Abonnera_com.rst b/kppp/Rules/Sweden/Abonnera_com.rst
new file mode 100644
index 00000000..85a64025
--- /dev/null
+++ b/kppp/Rules/Sweden/Abonnera_com.rst
@@ -0,0 +1,69 @@
+##############################################################
+# Swedish rate ruleset for calls with Abonnera.com
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Abonnera_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 48 öre
+per_connection=0.48
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 11 öre/min (räknat per sekund)
+default=(0.0018333333333, 1)
+
+# Specialpris över sommaren 2000 (6 öre/min)
+on (06/01..08/31) between () use (0.001, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0018333333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0018333333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0018333333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0018333333333, 1)
+# första maj
+on (05/01) between () use (0.0018333333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0018333333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0018333333333, 1)
+# juldagen
+on (12/25) between () use (0.0018333333333, 1)
+# annandag jul
+on (12/26) between () use (0.0018333333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0018333333333, 1)
+# julafton
+on (12/24) between () use (0.0018333333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0018333333333, 1)
diff --git a/kppp/Rules/Sweden/CNEAB-Route66.rst b/kppp/Rules/Sweden/CNEAB-Route66.rst
new file mode 100644
index 00000000..53fec7b5
--- /dev/null
+++ b/kppp/Rules/Sweden/CNEAB-Route66.rst
@@ -0,0 +1,65 @@
+##############################################################
+# Swedish rate ruleset for calls with CNEAB-Route66
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=CNEAB-Route66_Lokalt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 45 öre
+per_connection=0.45
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 10 öre/min (räknat per sekund)
+default=(0.0016666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016666666667, 1)
+# första maj
+on (05/01) between () use (0.0016666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016666666667, 1)
+# juldagen
+on (12/25) between () use (0.0016666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016666666667, 1)
+# julafton
+on (12/24) between () use (0.0016666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016666666667, 1)
diff --git a/kppp/Rules/Sweden/Crossnet-Affinity.rst b/kppp/Rules/Sweden/Crossnet-Affinity.rst
new file mode 100644
index 00000000..a2f0cef5
--- /dev/null
+++ b/kppp/Rules/Sweden/Crossnet-Affinity.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Crossnet-Affinity
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Crossnet-Affinity_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 50 öre
+per_connection=0.50
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 10 öre/min (räknat per sekund)
+default=(0.0016666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016666666667, 1)
+# första maj
+on (05/01) between () use (0.0016666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016666666667, 1)
+# juldagen
+on (12/25) between () use (0.0016666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016666666667, 1)
+# julafton
+on (12/24) between () use (0.0016666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016666666667, 1)
diff --git a/kppp/Rules/Sweden/Glocalnet.rst b/kppp/Rules/Sweden/Glocalnet.rst
new file mode 100644
index 00000000..7c720a0a
--- /dev/null
+++ b/kppp/Rules/Sweden/Glocalnet.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Glocalnet
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Glocalnet_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 50 öre
+per_connection=0.50
+minimum_costs=0.0
+
+# Hög taxa: 19 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0031666666667, 1)
+
+# Låg taxa: 9 öre/min (räknat per sekund)
+default=(0.0015, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0015, 1)
+# trettondag jul
+on (01/06) between () use (0.0015, 1)
+# långfredagen
+on (easter-2) between () use (0.0015, 1)
+# annandag påsk
+on (easter+1) between () use (0.0015, 1)
+# första maj
+on (05/01) between () use (0.0015, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0015, 1)
+# annandag pingst
+on (easter+50) between () use (0.0015, 1)
+# juldagen
+on (12/25) between () use (0.0015, 1)
+# annandag jul
+on (12/26) between () use (0.0015, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0015, 1)
+# julafton
+on (12/24) between () use (0.0015, 1)
+# nyårsafton
+on (12/31) between () use (0.0015, 1)
diff --git a/kppp/Rules/Sweden/Gts.rst b/kppp/Rules/Sweden/Gts.rst
new file mode 100644
index 00000000..1451498d
--- /dev/null
+++ b/kppp/Rules/Sweden/Gts.rst
@@ -0,0 +1,65 @@
+##############################################################
+# Swedish rate ruleset for calls with Gts
+# Created 2000-Aug-30 by Fredrik Ismyren <myrn@despammed.com>
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Gts_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 45 öre
+per_connection=0.45
+minimum_costs=0.0
+
+# Hög taxa: 21 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0035, 1)
+
+# Låg taxa: 11,5 öre/min (räknat per sekund)
+default=(0.0019166666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0019166666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0019166666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0019166666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0019166666667, 1)
+# första maj
+on (05/01) between () use (0.0019166666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0019166666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0019166666667, 1)
+# juldagen
+on (12/25) between () use (0.0019166666667, 1)
+# annandag jul
+on (12/26) between () use (0.0019166666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0019166666667, 1)
+# julafton
+on (12/24) between () use (0.0019166666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0019166666667, 1)
diff --git a/kppp/Rules/Sweden/Home_se.rst b/kppp/Rules/Sweden/Home_se.rst
new file mode 100644
index 00000000..7ec43579
--- /dev/null
+++ b/kppp/Rules/Sweden/Home_se.rst
@@ -0,0 +1,65 @@
+##############################################################
+# Swedish rate ruleset for calls with Home.se
+# Created 2000-Aug-30 by Fredrik Ismyren <myrn@despammed.com>
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Home.se_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 50 öre
+per_connection=0.50
+minimum_costs=0.0
+
+# Hög taxa: 19 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0031666666667, 1)
+
+# Låg taxa: 9 öre/min (räknat per sekund)
+default=(0.0015, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0015, 1)
+# trettondag jul
+on (01/06) between () use (0.0015, 1)
+# långfredagen
+on (easter-2) between () use (0.0015, 1)
+# annandag påsk
+on (easter+1) between () use (0.0015, 1)
+# första maj
+on (05/01) between () use (0.0015, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0015, 1)
+# annandag pingst
+on (easter+50) between () use (0.0015, 1)
+# juldagen
+on (12/25) between () use (0.0015, 1)
+# annandag jul
+on (12/26) between () use (0.0015, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0015, 1)
+# julafton
+on (12/24) between () use (0.0015, 1)
+# nyårsafton
+on (12/31) between () use (0.0015, 1)
diff --git a/kppp/Rules/Sweden/Makefile.am b/kppp/Rules/Sweden/Makefile.am
new file mode 100644
index 00000000..29fe64be
--- /dev/null
+++ b/kppp/Rules/Sweden/Makefile.am
@@ -0,0 +1,12 @@
+pkg_DATA = ACN.rst Abonnera_com.rst \
+ CNEAB-Route66.rst Crossnet-Affinity.rst Glocalnet.rst Gts.rst \
+ Home_se.rst Nemtel.rst Plusenergi.rst RSLCom.rst \
+ Rix_Telecom.rst Supertel.rst Svensk_Telekom.rst \
+ Tele1_Europe.rst Tele2.rst Tele8.rst Teleman.rst \
+ Telenordia.rst Telerian.rst Telia.rst Telia_Telebonus1.rst \
+ Telia_Telebonus2.rst Telitel.rst Transnet.rst \
+ Universal_Telecom.rst Utfors.rst Vattenfall.rst Tiscali.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Sweden
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Sweden/Nemtel.rst b/kppp/Rules/Sweden/Nemtel.rst
new file mode 100644
index 00000000..025d8b39
--- /dev/null
+++ b/kppp/Rules/Sweden/Nemtel.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Nemtel
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Nemtel_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 50 öre
+per_connection=0.50
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 10 öre/min (räknat per sekund)
+default=(0.0016666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016666666667, 1)
+# första maj
+on (05/01) between () use (0.0016666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016666666667, 1)
+# juldagen
+on (12/25) between () use (0.0016666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016666666667, 1)
+# julafton
+on (12/24) between () use (0.0016666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016666666667, 1)
diff --git a/kppp/Rules/Sweden/Plusenergi.rst b/kppp/Rules/Sweden/Plusenergi.rst
new file mode 100644
index 00000000..17d62841
--- /dev/null
+++ b/kppp/Rules/Sweden/Plusenergi.rst
@@ -0,0 +1,65 @@
+##############################################################
+# Swedish rate ruleset for calls with Plusenergi.se
+# Created 2000-Aug-30 by Fredrik Ismyren <myrn@despammed.com>
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Plusenergi_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 49 öre
+per_connection=0.49
+minimum_costs=0.0
+
+# Hög taxa: 19,5 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.00325, 1)
+
+# Låg taxa: 11 öre/min (räknat per sekund)
+default=(0.0018333333333, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0018333333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0018333333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0018333333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0018333333333, 1)
+# första maj
+on (05/01) between () use (0.0018333333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0018333333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0018333333333, 1)
+# juldagen
+on (12/25) between () use (0.0018333333333, 1)
+# annandag jul
+on (12/26) between () use (0.0018333333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0018333333333, 1)
+# julafton
+on (12/24) between () use (0.0018333333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0018333333333, 1)
diff --git a/kppp/Rules/Sweden/RSLCom.rst b/kppp/Rules/Sweden/RSLCom.rst
new file mode 100644
index 00000000..90d91b46
--- /dev/null
+++ b/kppp/Rules/Sweden/RSLCom.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with RSLCom
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=RSLCom_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 45 öre
+per_connection=0.45
+minimum_costs=0.0
+
+# Hög taxa: 19 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0031666666667, 1)
+
+# Låg taxa: 9,5 öre/min (räknat per sekund)
+default=(0.0015833333333, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0015833333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0015833333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0015833333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0015833333333, 1)
+# första maj
+on (05/01) between () use (0.0015833333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0015833333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0015833333333, 1)
+# juldagen
+on (12/25) between () use (0.0015833333333, 1)
+# annandag jul
+on (12/26) between () use (0.0015833333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0015833333333, 1)
+# julafton
+on (12/24) between () use (0.0015833333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0015833333333, 1)
diff --git a/kppp/Rules/Sweden/Rix_Telecom.rst b/kppp/Rules/Sweden/Rix_Telecom.rst
new file mode 100644
index 00000000..e1128af6
--- /dev/null
+++ b/kppp/Rules/Sweden/Rix_Telecom.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Rix Telecom
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Rix_Telecom_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 40 öre
+per_connection=0.40
+minimum_costs=0.0
+
+# Hög taxa: 19 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0031666666667, 1)
+
+# Låg taxa: 11 öre/min (räknat per sekund)
+default=(0.0018333333333, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0018333333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0018333333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0018333333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0018333333333, 1)
+# första maj
+on (05/01) between () use (0.0018333333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0018333333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0018333333333, 1)
+# juldagen
+on (12/25) between () use (0.0018333333333, 1)
+# annandag jul
+on (12/26) between () use (0.0018333333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0018333333333, 1)
+# julafton
+on (12/24) between () use (0.0018333333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0018333333333, 1)
diff --git a/kppp/Rules/Sweden/Supertel.rst b/kppp/Rules/Sweden/Supertel.rst
new file mode 100644
index 00000000..d1d595da
--- /dev/null
+++ b/kppp/Rules/Sweden/Supertel.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Supertel
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Supertel_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 40 öre
+per_connection=0.40
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 10 öre/min (räknat per sekund)
+default=(0.0016666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016666666667, 1)
+# första maj
+on (05/01) between () use (0.0016666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016666666667, 1)
+# juldagen
+on (12/25) between () use (0.0016666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016666666667, 1)
+# julafton
+on (12/24) between () use (0.0016666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016666666667, 1)
diff --git a/kppp/Rules/Sweden/Svensk_Telekom.rst b/kppp/Rules/Sweden/Svensk_Telekom.rst
new file mode 100644
index 00000000..4737522b
--- /dev/null
+++ b/kppp/Rules/Sweden/Svensk_Telekom.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Svensk Telekom
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Svensk_Telekom_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 50 öre
+per_connection=0.50
+minimum_costs=0.0
+
+# Hög taxa: 19 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0031666666667, 1)
+
+# Låg taxa: 10 öre/min (räknat per sekund)
+default=(0.0016666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016666666667, 1)
+# första maj
+on (05/01) between () use (0.0016666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016666666667, 1)
+# juldagen
+on (12/25) between () use (0.0016666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016666666667, 1)
+# julafton
+on (12/24) between () use (0.0016666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016666666667, 1)
diff --git a/kppp/Rules/Sweden/Tele1_Europe.rst b/kppp/Rules/Sweden/Tele1_Europe.rst
new file mode 100644
index 00000000..84514804
--- /dev/null
+++ b/kppp/Rules/Sweden/Tele1_Europe.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Tele1 Europe
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Tele1_Europe_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 40 öre
+per_connection=0.40
+minimum_costs=0.0
+
+# Hög taxa: 23 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0038333333333, 1)
+
+# Låg taxa: 11,5 öre/min (räknat per sekund)
+default=(0.0019166666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0019166666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0019166666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0019166666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0019166666667, 1)
+# första maj
+on (05/01) between () use (0.0019166666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0019166666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0019166666667, 1)
+# juldagen
+on (12/25) between () use (0.0019166666667, 1)
+# annandag jul
+on (12/26) between () use (0.0019166666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0019166666667, 1)
+# julafton
+on (12/24) between () use (0.0019166666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0019166666667, 1)
diff --git a/kppp/Rules/Sweden/Tele2.rst b/kppp/Rules/Sweden/Tele2.rst
new file mode 100644
index 00000000..714a0d46
--- /dev/null
+++ b/kppp/Rules/Sweden/Tele2.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Tele2
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Tele2_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 45 öre
+per_connection=0.45
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 11 öre/min (räknat per sekund)
+default=(0.0018333333333, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0018333333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0018333333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0018333333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0018333333333, 1)
+# första maj
+on (05/01) between () use (0.0018333333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0018333333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0018333333333, 1)
+# juldagen
+on (12/25) between () use (0.0018333333333, 1)
+# annandag jul
+on (12/26) between () use (0.0018333333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0018333333333, 1)
+# julafton
+on (12/24) between () use (0.0018333333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0018333333333, 1)
diff --git a/kppp/Rules/Sweden/Tele8.rst b/kppp/Rules/Sweden/Tele8.rst
new file mode 100644
index 00000000..b6ab1313
--- /dev/null
+++ b/kppp/Rules/Sweden/Tele8.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Tele8
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Tele8_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 0 öre
+per_connection=0.0
+minimum_costs=0.0
+
+# Hög taxa: 33 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0055, 1)
+
+# Låg taxa: 19 öre/min (räknat per sekund)
+default=(0.0031666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0031666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0031666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0031666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0031666666667, 1)
+# första maj
+on (05/01) between () use (0.0031666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0031666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0031666666667, 1)
+# juldagen
+on (12/25) between () use (0.0031666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0031666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0031666666667, 1)
+# julafton
+on (12/24) between () use (0.0031666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0031666666667, 1)
diff --git a/kppp/Rules/Sweden/Teleman.rst b/kppp/Rules/Sweden/Teleman.rst
new file mode 100644
index 00000000..f94bdeff
--- /dev/null
+++ b/kppp/Rules/Sweden/Teleman.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Teleman.com
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Teleman_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 35 öre
+per_connection=0.35
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 10 öre/min (räknat per sekund)
+default=(0.0016666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016666666667, 1)
+# första maj
+on (05/01) between () use (0.0016666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016666666667, 1)
+# juldagen
+on (12/25) between () use (0.0016666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016666666667, 1)
+# julafton
+on (12/24) between () use (0.0016666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016666666667, 1)
diff --git a/kppp/Rules/Sweden/Telenordia.rst b/kppp/Rules/Sweden/Telenordia.rst
new file mode 100644
index 00000000..2d3617b1
--- /dev/null
+++ b/kppp/Rules/Sweden/Telenordia.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Telenordia
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Telenordia_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 50 öre
+per_connection=0.50
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 10 öre/min (räknat per sekund)
+default=(0.0016666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016666666667, 1)
+# första maj
+on (05/01) between () use (0.0016666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016666666667, 1)
+# juldagen
+on (12/25) between () use (0.0016666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016666666667, 1)
+# julafton
+on (12/24) between () use (0.0016666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016666666667, 1)
diff --git a/kppp/Rules/Sweden/Telerian.rst b/kppp/Rules/Sweden/Telerian.rst
new file mode 100644
index 00000000..b0e108ca
--- /dev/null
+++ b/kppp/Rules/Sweden/Telerian.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Telerian
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Telerian_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 40 öre
+per_connection=0.40
+minimum_costs=0.0
+
+# Hög taxa: 19 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0031666666667, 1)
+
+# Låg taxa: 11 öre/min (räknat per sekund)
+default=(0.0018333333333, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0018333333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0018333333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0018333333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0018333333333, 1)
+# första maj
+on (05/01) between () use (0.0018333333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0018333333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0018333333333, 1)
+# juldagen
+on (12/25) between () use (0.0018333333333, 1)
+# annandag jul
+on (12/26) between () use (0.0018333333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0018333333333, 1)
+# julafton
+on (12/24) between () use (0.0018333333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0018333333333, 1)
diff --git a/kppp/Rules/Sweden/Telia.rst b/kppp/Rules/Sweden/Telia.rst
new file mode 100644
index 00000000..5becdcdc
--- /dev/null
+++ b/kppp/Rules/Sweden/Telia.rst
@@ -0,0 +1,68 @@
+##############################################################
+# Swedish rate ruleset for calls with Telia
+# Created 1997-09-16 by Anders Widell <d95-awi@nada.kth.se>
+# Updated 1998-04-26 by Anders Widell <d95-awi@nada.kth.se>
+# Updated 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Telia_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 45 öre
+per_connection=0.45
+minimum_costs=0.0
+
+# Hög taxa: 23 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0038333333333, 1)
+
+# Låg taxa: 11,5 öre/min (räknat per sekund)
+default=(0.0019166666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0019166666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0019166666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0019166666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0019166666667, 1)
+# första maj
+on (05/01) between () use (0.0019166666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0019166666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0019166666667, 1)
+# juldagen
+on (12/25) between () use (0.0019166666667, 1)
+# annandag jul
+on (12/26) between () use (0.0019166666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0019166666667, 1)
+# julafton
+on (12/24) between () use (0.0019166666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0019166666667, 1)
diff --git a/kppp/Rules/Sweden/Telia_Telebonus1.rst b/kppp/Rules/Sweden/Telia_Telebonus1.rst
new file mode 100644
index 00000000..9fc634c7
--- /dev/null
+++ b/kppp/Rules/Sweden/Telia_Telebonus1.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Telia /w Telebonus 1 (10% discount)
+# Created 1998-04-26 by Anders Widell <d95-awi@nada.kth.se>
+# Updated 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Telia_Lokalt_Telebonus1
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 40,5 öre
+per_connection=0.405
+minimum_costs=0.0
+
+# Hög taxa: 20,7 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.00345, 1)
+
+# Låg taxa: 10,35 öre/min (räknat per sekund)
+default=(0.001725, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.001725, 1)
+# trettondag jul
+on (01/06) between () use (0.001725, 1)
+# långfredagen
+on (easter-2) between () use (0.001725, 1)
+# annandag påsk
+on (easter+1) between () use (0.001725, 1)
+# första maj
+on (05/01) between () use (0.001725, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.001725, 1)
+# annandag pingst
+on (easter+50) between () use (0.001725, 1)
+# juldagen
+on (12/25) between () use (0.001725, 1)
+# annandag jul
+on (12/26) between () use (0.001725, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.001725, 1)
+# julafton
+on (12/24) between () use (0.001725, 1)
+# nyårsafton
+on (12/31) between () use (0.001725, 1)
diff --git a/kppp/Rules/Sweden/Telia_Telebonus2.rst b/kppp/Rules/Sweden/Telia_Telebonus2.rst
new file mode 100644
index 00000000..55bb0aa0
--- /dev/null
+++ b/kppp/Rules/Sweden/Telia_Telebonus2.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Telia /w Telebonus 2 (15% discount)
+# Created 1998-04-26 by Anders Widell <d95-awi@nada.kth.se>
+# Updated 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Telia_Lokalt_Telebonus2
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 38,25 öre
+per_connection=0.3825
+minimum_costs=0.0
+
+# Hög taxa: 19,55 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0032583333333, 1)
+
+# Låg taxa: 9,775 öre/min (räknat per sekund)
+default=(0.0016291666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016291666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016291666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016291666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016291666667, 1)
+# första maj
+on (05/01) between () use (0.0016291666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016291666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016291666667, 1)
+# juldagen
+on (12/25) between () use (0.0016291666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016291666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016291666667, 1)
+# julafton
+on (12/24) between () use (0.0016291666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016291666667, 1)
diff --git a/kppp/Rules/Sweden/Telitel.rst b/kppp/Rules/Sweden/Telitel.rst
new file mode 100644
index 00000000..d4487c92
--- /dev/null
+++ b/kppp/Rules/Sweden/Telitel.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Telitel
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Telitel_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 50 öre
+per_connection=0.50
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 9 öre/min (räknat per sekund)
+default=(0.0015, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0015, 1)
+# trettondag jul
+on (01/06) between () use (0.0015, 1)
+# långfredagen
+on (easter-2) between () use (0.0015, 1)
+# annandag påsk
+on (easter+1) between () use (0.0015, 1)
+# första maj
+on (05/01) between () use (0.0015, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0015, 1)
+# annandag pingst
+on (easter+50) between () use (0.0015, 1)
+# juldagen
+on (12/25) between () use (0.0015, 1)
+# annandag jul
+on (12/26) between () use (0.0015, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0015, 1)
+# julafton
+on (12/24) between () use (0.0015, 1)
+# nyårsafton
+on (12/31) between () use (0.0015, 1)
diff --git a/kppp/Rules/Sweden/Tiscali.rst b/kppp/Rules/Sweden/Tiscali.rst
new file mode 100644
index 00000000..1a91b0cb
--- /dev/null
+++ b/kppp/Rules/Sweden/Tiscali.rst
@@ -0,0 +1,65 @@
+##############################################################
+# Swedish rate ruleset for calls with Tiscali
+# Created 2001-01-01 by Anders Widell <awl@hem.passagen.se>
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Tiscali
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 40 öre
+per_connection=0.40
+minimum_costs=0.0
+
+# Hög taxa: 14 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0023333333333, 1)
+
+# Låg taxa: 8,5 öre/min (räknat per sekund)
+default=(0.0014166666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0014166666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0014166666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0014166666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0014166666667, 1)
+# första maj
+on (05/01) between () use (0.0014166666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0014166666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0014166666667, 1)
+# juldagen
+on (12/25) between () use (0.0014166666667, 1)
+# annandag jul
+on (12/26) between () use (0.0014166666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0014166666667, 1)
+# julafton
+on (12/24) between () use (0.0014166666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0014166666667, 1)
diff --git a/kppp/Rules/Sweden/Transnet.rst b/kppp/Rules/Sweden/Transnet.rst
new file mode 100644
index 00000000..cc68c970
--- /dev/null
+++ b/kppp/Rules/Sweden/Transnet.rst
@@ -0,0 +1,65 @@
+##############################################################
+# Swedish rate ruleset for calls with Transnet.nl
+# Created 2000-Aug-30 by Fredrik Ismyren <myrn@despammed.com>
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Transnet_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 45 öre
+per_connection=0.45
+minimum_costs=0.0
+
+# Hög taxa: 17 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0028333333333, 1)
+
+# Låg taxa: 8 öre/min (räknat per sekund)
+default=(0.0013333333333, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0013333333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0013333333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0013333333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0013333333333, 1)
+# första maj
+on (05/01) between () use (0.0013333333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0013333333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0013333333333, 1)
+# juldagen
+on (12/25) between () use (0.0013333333333, 1)
+# annandag jul
+on (12/26) between () use (0.0013333333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0013333333333, 1)
+# julafton
+on (12/24) between () use (0.0013333333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0013333333333, 1)
diff --git a/kppp/Rules/Sweden/Universal_Telecom.rst b/kppp/Rules/Sweden/Universal_Telecom.rst
new file mode 100644
index 00000000..1996f609
--- /dev/null
+++ b/kppp/Rules/Sweden/Universal_Telecom.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Universal Telecom
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Universal_Telecom_Lokalt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 30 öre
+per_connection=0.30
+minimum_costs=0.0
+
+# Hög taxa: 16 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0026666666667, 1)
+
+# Låg taxa: 11 öre/min (räknat per sekund)
+default=(0.0018333333333, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0018333333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0018333333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0018333333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0018333333333, 1)
+# första maj
+on (05/01) between () use (0.0018333333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0018333333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0018333333333, 1)
+# juldagen
+on (12/25) between () use (0.0018333333333, 1)
+# annandag jul
+on (12/26) between () use (0.0018333333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0018333333333, 1)
+# julafton
+on (12/24) between () use (0.0018333333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0018333333333, 1)
diff --git a/kppp/Rules/Sweden/Utfors.rst b/kppp/Rules/Sweden/Utfors.rst
new file mode 100644
index 00000000..fe3f9f30
--- /dev/null
+++ b/kppp/Rules/Sweden/Utfors.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Utfors
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Utfors_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 40 öre
+per_connection=0.40
+minimum_costs=0.0
+
+# Hög taxa: 20 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.0033333333333, 1)
+
+# Låg taxa: 10 öre/min (räknat per sekund)
+default=(0.0016666666667, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0016666666667, 1)
+# trettondag jul
+on (01/06) between () use (0.0016666666667, 1)
+# långfredagen
+on (easter-2) between () use (0.0016666666667, 1)
+# annandag påsk
+on (easter+1) between () use (0.0016666666667, 1)
+# första maj
+on (05/01) between () use (0.0016666666667, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0016666666667, 1)
+# annandag pingst
+on (easter+50) between () use (0.0016666666667, 1)
+# juldagen
+on (12/25) between () use (0.0016666666667, 1)
+# annandag jul
+on (12/26) between () use (0.0016666666667, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0016666666667, 1)
+# julafton
+on (12/24) between () use (0.0016666666667, 1)
+# nyårsafton
+on (12/31) between () use (0.0016666666667, 1)
diff --git a/kppp/Rules/Sweden/Vattenfall.rst b/kppp/Rules/Sweden/Vattenfall.rst
new file mode 100644
index 00000000..1a6bfc2a
--- /dev/null
+++ b/kppp/Rules/Sweden/Vattenfall.rst
@@ -0,0 +1,66 @@
+##############################################################
+# Swedish rate ruleset for calls with Vattenfall
+# Created 2000-Aug-01 by Fredrik Ismyren <myrn@despammed.com>
+# Updated 2000-Aug-30 by Fredrik Ismyren
+# May be distributed freely. I take no responsibility for
+# the correctness of the information in this file.
+##############################################################
+
+name=Vattenfall_Nationellt
+currency_symbol=SEK
+currency_position=right
+currency_digits=2
+
+# Så här beräknar Telia samtalskostnaden (enligt vad jag förstår...)
+#
+# * en öppningsavgift debiteras för alla samtal så fort man fått svar
+# * därefter beräknas kostnaden per sekund
+#
+# Kostnaden per sekund beror av tiden:
+# * hög taxa vardagar kl 08:00-18:00
+# * låg taxa övrig tid
+#
+# Som vardagar räknas måndag till fredag. Dock ej:
+# * röda dagar i almanackan
+# * Vissa övriga dagar. Vilka dessa är verkar något oklart, och kan kanske
+# variera från år till år efter Telias tycke och smak. Men en tumregel är
+# att "aftnar" typ julafton och nyårsafton inte räknas som vardagar.
+
+
+# Öppningsavgift: 45 öre
+per_connection=0.45
+minimum_costs=0.0
+
+# Hög taxa: 19,5 öre/min måndag-fredag 8-18
+on (monday..friday) between (8:00..17:59) use (0.00325, 1)
+
+# Låg taxa: 11 öre/min (räknat per sekund)
+default=(0.0018333333333, 1)
+
+# Röda helgdagar (de som infaller på en lördag/söndag utelämnade)
+# nyårsdagen
+on (01/01) between () use (0.0018333333333, 1)
+# trettondag jul
+on (01/06) between () use (0.0018333333333, 1)
+# långfredagen
+on (easter-2) between () use (0.0018333333333, 1)
+# annandag påsk
+on (easter+1) between () use (0.0018333333333, 1)
+# första maj
+on (05/01) between () use (0.0018333333333, 1)
+# kristi himmelfärds dag
+on (easter+39) between () use (0.0018333333333, 1)
+# annandag pingst
+on (easter+50) between () use (0.0018333333333, 1)
+# juldagen
+on (12/25) between () use (0.0018333333333, 1)
+# annandag jul
+on (12/26) between () use (0.0018333333333, 1)
+
+# "aftnar" (osäkert om följande är korrekt & fullständigt)
+# trettondagsafton
+on (01/05) between () use (0.0018333333333, 1)
+# julafton
+on (12/24) between () use (0.0018333333333, 1)
+# nyårsafton
+on (12/31) between () use (0.0018333333333, 1)
diff --git a/kppp/Rules/Switzerland/Makefile.am b/kppp/Rules/Switzerland/Makefile.am
new file mode 100644
index 00000000..87582e64
--- /dev/null
+++ b/kppp/Rules/Switzerland/Makefile.am
@@ -0,0 +1,10 @@
+pkg_DATA = Swisscom_Local.rst \
+ Swisscom_Remote.rst \
+ Swisscom_Surf.rst \
+ Sunrise_Freetime.rst \
+ Sunrise_Select_Internet.rst \
+ Sunrise_Local.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Switzerland
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Switzerland/Sunrise_Freetime.rst b/kppp/Rules/Switzerland/Sunrise_Freetime.rst
new file mode 100644
index 00000000..ebf15c2e
--- /dev/null
+++ b/kppp/Rules/Switzerland/Sunrise_Freetime.rst
@@ -0,0 +1,43 @@
+################################################################
+#
+# Sunrise Freetime (Unbeschränkt surfen mit 30.-/Monat)
+# Created by Gregor Zumstein (zumstein@ssd.ethz.ch)
+# Sep 29 2000
+#
+################################################################
+
+name=Sunrise_Freetime
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=CHF
+currency_position=right
+
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+default=(0, 1)
+
+# Niedertarif, tarif réduit
+# +30 Fr. Basisgebühr pro Monat, tarif de base par mois
+on (monday..friday) between (8:00..22:59) use (0.00046111, 1)
+
+on (01/01, 01/02, easter-2, easter+1, easter+39, easter+50, 08/01) between (0:00..23:59) use (0, 1)
+
+# Feiertage / Jours fériés:
+# 01/01 Neujahr / Nouvel an
+# 01/02 2. Januar / 2 janvier
+# easter-2 Karfreitag / Vendredi saint
+# easter+1 Ostermontag / Lundi de pâques
+# easter+39 Auffahrt / Ascenscion
+# easter+50 Pfingstmontag / Lundi de pentecôte
+# 08/01 Nationalfeiertag / Fęte nationale
+# 12/25 Weihnachten / Noël
+# 12/26 Stephanstag / 2čme jour de noël \ No newline at end of file
diff --git a/kppp/Rules/Switzerland/Sunrise_Local.rst b/kppp/Rules/Switzerland/Sunrise_Local.rst
new file mode 100644
index 00000000..7486c5c7
--- /dev/null
+++ b/kppp/Rules/Switzerland/Sunrise_Local.rst
@@ -0,0 +1,51 @@
+################################################################
+#
+# Sunrise local
+# Created by Daniel Brönnimann (dbroenni@g26.ethz.ch)
+# Nov 16 1998
+# Updated by Gregor Zumstein (zumstein@ssd.ethz.ch)
+# Sep 29 2000.
+#
+################################################################
+
+name=Sunrise_Local
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=CHF
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# Nachttarif, tarif de nuit
+default=(0.00019444, 1)
+
+# Normaltarif, tarif normal
+on (monday..friday) between (8:00..16:59) use (0.0011111, 1)
+
+# Niedertarif, tarif réduit
+# easter+39 = Ascension Day (Auffahrt), easter+50 = Whit Monday (Pfingstmontag)
+on (monday..friday) between (17:00..22:59) use (0.0005, 1)
+on (saturday..sunday) between (8:00..22:59) use (0.0005, 1)
+on (01/01, 01/02, easter-2, easter+1) between (8:00..22:59) use (0.0005, 1)
+on (easter+39, easter+50) between (8:00..22:59) use(0.0005, 1)
+on (08/01, 12/25, 12/26) between (8:00..22:59) use (0.0005, 1)
+
+# Feiertage / Jours fériés:
+# 01/01 Neujahr / Nouvel an
+# 01/02 2. Januar / 2 janvier
+# easter-2 Karfreitag / Vendredi saint
+# easter+1 Ostermontag / Lundi de pâques
+# easter+39 Auffahrt / Ascenscion
+# easter+50 Pfingstmontag / Lundi de pentecôte
+# 08/01 Nationalfeiertag / Fęte nationale
+# 12/25 Weihnachten / Noël
+# 12/26 Stephanstag / 2čme jour de noël
diff --git a/kppp/Rules/Switzerland/Sunrise_Select_Internet.rst b/kppp/Rules/Switzerland/Sunrise_Select_Internet.rst
new file mode 100644
index 00000000..0cda65f9
--- /dev/null
+++ b/kppp/Rules/Switzerland/Sunrise_Select_Internet.rst
@@ -0,0 +1,49 @@
+################################################################
+#
+# Sunrise Select Internet
+# Created by Daniel Brönnimann (dbroenni@g26.ethz.ch) Nov 19. 1998
+# Changed by Philipp Gressly (phi@gressly.ch) Sep. 16. 2000
+# Changed by Gregor Zumstein (zumstein@ssd.ethz.ch) Sep 29 2000
+#
+################################################################
+
+name=Sunrise_Select_Internet
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=CHF
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# Nachttarif, tarif de nuit
+default=(0.00023056, 1)
+
+# Normaltarif, Niedertarif tarif normal
+on (monday..sunday) between (8:00..22:59) use (0.0004639, 1)
+
+# "Nationale Feiertage"
+# easter+39 = Ascension Day (Auffahrt), easter+50 = Whit Monday (Pfingstmontag)
+on (01/01, 01/02, easter-2, easter+1) between (8:00..22:59) use (0.0004639, 1)
+on (easter+39, easter+50) between (8:00..22:59) use(0.0004639, 1)
+on (08/01, 12/25, 12/26) between (8:00..22:59) use (0.0004639, 1)
+
+
+# Feiertage / Jours fériés:
+# 01/01 Neujahr / Nouvel an
+# 01/02 2. Januar / 2 janvier
+# easter-2 Karfreitag / Vendredi saint
+# easter+1 Ostermontag / Lundi de pâques
+# easter+39 Auffahrt / Ascenscion
+# easter+50 Pfingstmontag / Lundi de pentecôte
+# 08/01 Nationalfeiertag / Fęte nationale
+# 12/25 Weihnachten / Noël
+# 12/26 Stephanstag / 2čme jour de noël
diff --git a/kppp/Rules/Switzerland/Swisscom_Local.rst b/kppp/Rules/Switzerland/Swisscom_Local.rst
new file mode 100644
index 00000000..4a4e446b
--- /dev/null
+++ b/kppp/Rules/Switzerland/Swisscom_Local.rst
@@ -0,0 +1,38 @@
+# Changed by Daniel Brönnimann (dbroenni@g26.ethz.ch)# Thu Nov 19 1998
+# Changed by Fritz Zaucker (zaucker@ee.ethz.ch)
+# Sun Oct 24 1999
+# Valid from 1-Oct-1999
+
+name=Swisscom_Local_2
+
+currency_symbol=CHF
+
+currency_position=left
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.00
+default=(0.10, 90)
+
+# Special dates:
+# easter - 2 days (Karfreitag/ ??? )
+# easter + 39 days (Auffahrt/ ??? )
+# easter + 50 days (Pfingstmontag/ Pentecost Monday )
+# 08/01 (August 1st, Swiss National Holiday)
+
+# Note: the previous version of this rule set erroneously had
+# 02/01 instead of 01/02 (January 2nd)
+# and 01/08 instead of 08/01 (August 1st)
+
+# Normal tarif
+on (monday..friday) between (8:00..17:00) use (0.10, 90)
+
+# Low tarif
+on (monday..friday) between (6:00..8:00) use (0.10, 180)
+on (monday..friday) between (17:00..22:00) use (0.10, 180)
+on (saturday..sunday) between (6:00..22:00) use (0.10, 180)
+on (01/01, 01/02, easter-2, easter+1) between (6:00..22:00) use(0.10, 180)
+on (easter+39, easter+50, 08/01, 12/25,12/26) between (6:00..22:00) use (0.10, 180)
+
+# Night tarif
+on (monday..sunday) between (22:00..0:00) use (0.10, 360)
+on (monday..sunday) between (0:00..6:00) use (0.10, 360)
diff --git a/kppp/Rules/Switzerland/Swisscom_Remote.rst b/kppp/Rules/Switzerland/Swisscom_Remote.rst
new file mode 100644
index 00000000..a614786e
--- /dev/null
+++ b/kppp/Rules/Switzerland/Swisscom_Remote.rst
@@ -0,0 +1,43 @@
+# Calls outside own area code
+# Created by J. Wezel (jwezel@access.ch)
+# Sun Sep 14 01:30:33 1997
+# Changed by Daniel Brönnimann (dbreonni@g26.ethz.ch)
+# Thu Nov 19 1998
+# Changed by Fritz Zaucker (zaucker@ee.ethz.ch)
+# Sun Oct 24 1999
+# Valid from 1-Oct-1999
+
+name=Swisscom_Remote
+
+currency_symbol=CHF
+
+currency_position=left
+currency_digits=2
+per_connection=0.00
+minimum_costs=0.00
+default=(0.10, 24)
+
+# Special dates:
+# easter - 2 days (Karfreitag/ ??? )
+# easter + 39 days (Auffahrt/ ??? )
+# easter + 50 days (Pfingstmontag/ Pentecost Monday )
+# 08/01 (August 1st, Swiss National Holiday)
+
+# Note: the previous version of this rule set erroneously had
+# 02/01 instead of 01/02 (January 2nd)
+# and 01/08 instead of 08/01 (August 1st)
+
+# Normal tarif
+on (monday..friday) between (8:00..17:00) use (0.10, 24)
+
+# Low tarif
+on (monday..friday) between (6:00..8:00) use (0.10, 48)
+on (monday..friday) between (17:00..22:00) use (0.10, 48)
+on (saturday..sunday) between (6:00..22:00) use (0.10, 48)
+
+on (01/01, 01/02, easter-2, easter+1) between (6:00..22:00) use (0.10, 48)
+on (easter+39, easter+50, 08/01, 12/25, 12/26) between (6:00..22:00) use (0.10, 48)
+
+# Night tarif
+on (monday..sunday) between (22:00..0:00) use (0.10, 96)
+on (monday..sunday) between (0:00..6:00) use (0.10, 96)
diff --git a/kppp/Rules/Switzerland/Swisscom_Surf.rst b/kppp/Rules/Switzerland/Swisscom_Surf.rst
new file mode 100644
index 00000000..5d1bb0c9
--- /dev/null
+++ b/kppp/Rules/Switzerland/Swisscom_Surf.rst
@@ -0,0 +1,35 @@
+# Swisscom surfing rates of 0840 Business NumbersISP, Switzerland
+# Created by J. Wezel (jwezel@access.ch)
+# Sun Sep 14 01:30:33 1997
+# Changed by Daniel Brönnimann (dbroenni@g26.ethz.ch)
+# Thu Nov 19 1998
+# Valid from 1-Aug-97
+# Changed by Uli Pfeiffer (uli@bluewin.ch), 29/04/2000
+# Changed by Günther Palfinger (guenther.palfinger@gmx.net), 2001-09-08
+# see http://www.swisscom.ch/gd/services/voice_com/call_charges/charges_internet-en.html
+# corrected Business surf 90 -> 129 s/0.1 CHF
+
+name=Swisscom_Surf
+
+currency_symbol=CHF
+
+currency_position=left
+currency_digits=2
+per_connection=0.0
+minimum_costs=0.00
+default=(0.10, 129)
+
+# Business-Surf (CHF 2.80/h)
+on (monday..friday) between (8:00..16:00) use (0.10, 129)
+
+# Evening-Surf (CHF 1.80/h)
+on (monday..friday) between (16:00..22:00) use (0.10, 200)
+
+# Moonlight-Surf / Weekend-night Surf (CHF 0.70/h)
+on (monday..sunday) between (22:00..8:00) use (0.10, 514)
+
+# Weekend-day Surf
+on (saturday..sunday) between (8:00..22:00) use (0.10, 200)
+on (01/01, 01/02, easter-2, easter+1) between (8:00..22:00) use(0.10, 200)
+on (easter+39, easter+50, 08/01, 12/25,12/26) between (8:00..22:00) use (0.10, 200)
+
diff --git a/kppp/Rules/TEMPLATE b/kppp/Rules/TEMPLATE
new file mode 100644
index 00000000..0c3114f5
--- /dev/null
+++ b/kppp/Rules/TEMPLATE
@@ -0,0 +1,147 @@
+################################################################
+#
+# Disclaimer/License
+# This Template ist (c) by Mario Weilguni <mweilguni@kde.org>
+# It ist licenced under the same terms as the kppp package,
+# which it is part of
+#
+################################################################
+#
+# This is a sample rule set for kppp. You can use it as a
+# template when you have to create your own ruleset. If you do
+# so, remove all comments and add your own. This will allow
+# other users to check your ruleset more easily.
+#
+# Please sign the the tarif file with your name an email address
+# so that we can contact you if necessary.
+#
+# NOTE: the rules in this rule set do not make much sense and
+# are only for demonstration purposes
+#
+# NOTE ON FILENAMES:
+# when you create your own ruleset, use "_" in filename
+# instead of spaces and use ".rst as extension
+# i.e. "Austria city calls"
+# --> file should be saved as "Austria_city_calls.rst"
+# As of KDE 3.2 non-ascii characters can be encoded
+# with the %xy escapes known from URLs.
+#
+# NOTE ON ENCODING:
+# As of KDE 3.1 kppp assumes rule set files to be in UTF-8
+# encoding. See the currency_symbol entry for an example
+# of a non-ASCII character.
+#
+# Thanks, Bernd Wuebben
+# wuebben@kde.org
+# Current maintainer: Harri Porten, porten@kde.org
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=default
+
+################################################################
+# currency settings
+################################################################
+
+# defines ÂĪ (Euro) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ÂĪ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.0
+
+
+# You pay .74 for the first 180 seconds ( 3 minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+flat_init_costs=(0.74,180)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+default=(0.1, 72)
+
+#
+# more complicated rules:
+#
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+on () between () use (0.2, 2)
+
+# same as above
+on (monday..sunday) between () use (0.2, 2)
+
+# same as above. You must use 24 hour notation, or the accounting
+# will not work correctly. (Example: write 15:00 for 3 pm)
+on (monday..sunday) between (0:00..23:59) use (0.2, 2)
+
+# applies on friday, saturday, sunday and monday 8am until 1pm
+on (friday..monday) between (8:00..13:00) use(0.3,72)
+
+# ATTENTION:
+on(monday..friday) between (21:00..5:00) use (0.4,2)
+# does NOT include saturday 0:00-5:00, just monday..friday, as it says.
+
+# applies on a given date (christmas)
+on (12/25) between () use (0.3,72)
+
+# a range of dates and one weekday
+on (12/25..12/27, 12/31, 07/04, monday) between () use (0.4, 72)
+
+# use this for easter
+on (easter) between () use (0.3,72)
+
+# easter + 50 days (Pfingstmontag/ Pentecost Monday )
+on (easter+50) between () use (0.3,72)
+
+on (thursday) between (20:00..21:52) use (8.2, 1)
+
+
+# The "on()" rules above all relates to current time only. You can also
+# make a rule depend on the number of seconds you have been connected
+# by specifying this time as a third argument to "use()".
+# For instance, let's say normal rate in the evening is 0.20 per minute,
+# and it drops by 20% after one hour of connect time. This can be modelled
+# like:
+
+on () between (19:30..08:00) use (0.20, 60)
+on () between (19:30..08:00) use (0.16, 60, 3600)
+
+# Note that these rules, just like other rules, are sensitive to the
+# order in which they appear.
+
diff --git a/kppp/Rules/Turkey/Makefile.am b/kppp/Rules/Turkey/Makefile.am
new file mode 100644
index 00000000..56ba2701
--- /dev/null
+++ b/kppp/Rules/Turkey/Makefile.am
@@ -0,0 +1,6 @@
+pkg_DATA = Turk_Telekom_Internet.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Turkey
+
+EXTRA_DIST = $(pkg_DATA)
+
diff --git a/kppp/Rules/Turkey/Turk_Telekom_Internet.rst b/kppp/Rules/Turkey/Turk_Telekom_Internet.rst
new file mode 100644
index 00000000..c2250059
--- /dev/null
+++ b/kppp/Rules/Turkey/Turk_Telekom_Internet.rst
@@ -0,0 +1,74 @@
+################################################################
+# 21 Jul 2003 (Please change when TT increases the costs)
+#
+# I take no responsibility for the validity and accuracy of
+# this information, if you are so concerned please contact
+# your own telephone provider and configure this yourself
+# and do not use this file.
+################################################################
+# Bu dosya sadece 0822'li hatlar icin gecerlidir.
+#
+# Lutfen TT zam yaptiginda use(xxxxx,yyy) ibarelerindeki xxxxx'i
+# yeni kontur ucreti ile degistirin.
+# Bu dosyanin nasil hazirlandigini ogrenmek istiyorsaniz
+# /usr/share/apps/kppp/rules dizinindeki TEMPLATE dosyasini
+# inceleyin.
+#
+#
+# Mesut Sismanoglu
+# mesuts@usa.net
+#
+# Ä°smail DÃķnmez
+# ismail.donmez@boun.edu.tr
+#
+################################################################
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Turk_Telekom_Internet
+################################################################
+# currency settings
+################################################################
+# defines TL (Turkish Lira) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=TL
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=right
+
+# Define the number of significant digits.
+# (not absolutely needed, default is "2"
+currency_digits=0
+
+# This is the default rule which is used when no other rule
+# applies.
+default=(72000, 324)
+################################################################
+# connection settings
+################################################################
+
+# Hafta arasi 1. indirim
+on(monday..friday) between (7:00..7:59) use(72000,309)
+
+ # Hafta arasi normal tarife
+on(monday..friday) between (8:00..19:59) use(72000,216)
+
+ # Hafta arasi 1. indirim
+on(monday..friday) between (20:00..22:29) use(72000,309)
+
+ # Hafta arasi 2. indirim
+on(monday..friday) between (22:30..6:59) use(72000,360)
+
+ # Cumartesi 1. indirim
+on(saturday) between (7:00..22:29) use(72000,309)
+
+ # Cumartesi 2. indirim
+on(saturday) between (22:30..6:59) use(72000,360)
+
+ # Pazar ve resmi tatil gunleri 2. indirim
+on(1/1, 04/23, 05/19, 08/30, 10/29, sunday) between () use(72000,360)
+
+################################################################
diff --git a/kppp/Rules/Ukraine/IPTelecom_hourly.rst b/kppp/Rules/Ukraine/IPTelecom_hourly.rst
new file mode 100644
index 00000000..2f020af9
--- /dev/null
+++ b/kppp/Rules/Ukraine/IPTelecom_hourly.rst
@@ -0,0 +1,86 @@
+################################################################
+# This file is in UTF-8 encoding.
+################################################################
+#
+# ПŅ€Ð°Ðēа/ÐŧŅ–Ņ†ÐĩÐ―Ð·Ņ–Ņ
+# РÐūзÐŋÐūÐēŅŅŽÐīÐķŅƒŅ”Ņ‚ŅŒŅŅ ÐŋŅ–Ðī ÐŧŅ–Ņ†ÐĩÐ―Ņ†Ð·Ņ–ŅŽ, ŅÐšŅƒ ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ” ÐŋаКŅƒÐ―ÐūК kppp
+# ÐÐ―ÐīŅ€Ņ–Ðđ РÐļŅŅ–Ð― <arysin@yahoo.com>
+# 18 ВÐĩŅ€ 2002 12:21:06
+#
+################################################################
+
+################################################################
+#
+# ІМ'ÐŊ НАБОРÐĢ ПРАВИЛ. ÐĶÐĩ НЕОБÐĨІДНО ÐīÐŧŅ ÐūÐąÐŧŅ–КŅƒ КÐūŅˆŅ‚Ņ–Ðē.
+#
+################################################################
+name=IPTelecom
+
+################################################################
+# ŅƒŅŅ‚Ð°Ð―ÐūÐēКÐļ ÐēаÐŧŅŽŅ‚Ðļ
+################################################################
+
+# ВÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ Ņƒ.Ðū. (ŅƒÐžÐūÐēÐ―Ņ– ÐūÐīÐļÐ―ÐļŅ†Ņ– Ð°ÐąÐū ŅŽÐ―Ņ–Ņ‚Ðļ)
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ = "$")
+currency_symbol=Ņƒ.Ðū.
+
+# ВÐļÐ·Ð―Ð°Ņ‡Ð°Ņ” Ņ€ÐūзŅ‚аŅˆŅƒÐēÐ°Ð―Ð―Ņ Ð·Ð―Ð°ÐšŅƒ ÐēаÐŧŅŽŅ‚Ðļ.
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ = "right")
+currency_position=right
+
+# ВÐļÐ·Ð―Ð°Ņ‡Ð°Ņ” КŅ–ÐŧŅŒÐšŅ–ŅŅ‚ŅŒ Ņ†ÐļŅ„Ņ€ ÐŋŅ–ŅÐŧŅ КÐūОÐļ.
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ - "2")
+currency_digits=2
+
+
+################################################################
+# ŅƒŅŅ‚Ð°Ð―ÐūÐēКÐļ з'Ņ”ÐīÐ―Ð°Ð―Ð―Ņ
+################################################################
+
+# ПРИМІÐĒКА: ÐŋŅ€Ð°ÐēÐļÐŧа заŅŅ‚ÐūŅÐūÐēŅƒŅŽŅ‚ŅŒŅŅ зÐēÐĩŅ€Ņ…Ņƒ ÐēÐ―Ðļз
+# ÐžÐĄÐĒАННЄ ÐēŅ–ÐīÐŋÐūÐēŅ–ÐīÐ―Ðĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ
+# ÐŋŅ€Ðļ Ņ€ÐūзŅ€Ð°Ņ…ŅƒÐ―КŅƒ КÐūŅˆŅ‚Ņ–Ðē.
+
+# ÐĶÐĩ Ņ†Ņ–Ð―а з'Ņ”ÐīÐ―Ð°Ð―Ð―Ņ. ÐŊКŅ‰Ðū Ņƒ ВаŅ Ņ—Ņ— Ð―ÐĩОаŅ”,
+# ÐēÐļŅŅ‚аÐēŅ‚Ðĩ "0", Ð°ÐąÐū заКÐūОÐĩÐ―Ņ‚ŅƒÐđŅ‚Ðĩ.
+per_connection=0.0
+
+
+# МŅ–Ð―Ņ–ОаÐŧŅŒÐ―а ŅŅƒÐžÐžÐ° ÐŋŅ€Ðļ з'Ņ”ÐīÐ―Ð―Ņ–. ÐŊКŅ‰Ðū ŅŅƒÐžÐžÐ° ОÐĩÐ―ŅˆÐĩ,
+# Ð―Ņ–Ðķ Ņ†Ðĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ, ÐŋÐŧаŅ‚ÐļŅ‚ŅŒŅŅ Ņ†Ņ ŅŅƒÐžÐžÐ°.
+minimum_costs=0.0
+
+
+# ВÐļ ÐŋÐŧаŅ‚ÐļŅ‚Ðĩ 0.74 за ÐŋÐĩŅ€ŅˆŅ– 180 ŅÐĩКŅƒÐ―Ðī (3 Ņ…Ðē.) Ņƒ ÐąŅƒÐīŅŒ ŅÐšÐūОŅƒ ÐēÐļÐŋаÐīКŅƒ,
+# Ð―Ð°ÐēŅ–Ņ‚ŅŒ, ŅÐšŅ‰Ðū ВÐļ ÐąŅƒÐŧÐļ з'Ņ”ÐīÐ―Ð°Ð―Ņ– ÐēŅŅŒÐūÐģÐū ÐūÐīÐ―Ņƒ ŅÐĩКŅƒÐ―ÐīŅƒ.
+# ÐĶÐĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū ÐąŅƒÐīÐĩ ОаŅ‚Ðļ ÐŋŅ€Ņ–ÐūŅ€ÐļŅ‚ÐĩŅ‚ ÐēÐŋŅ€ÐūÐīÐūÐēÐķ ÐŋÐĩŅ€ŅˆÐļŅ… 180 ŅÐĩКŅƒÐ―Ðī
+# Ð―Ð°Ðī ÐąŅƒÐīŅŒ-ŅÐšÐļО Ņ–Ð―ŅˆÐļО ÐŋŅ€Ð°ÐēÐļÐŧÐūО.
+# ПÐĩŅ€ÐĩÐģÐŧŅÐ―ŅŒŅ‚Ðĩ ОаÐŧŅŽÐ―ÐūК costgraphs.gif Ðē КаŅ‚аÐŧÐūÐģŅƒ docs
+# КÐūОÐŋÐŧÐĩКŅ‚Ņƒ kppp Ņ‰ÐūÐīÐū Ð―Ð°ÐūŅ‡Ð―ÐūÐģÐū зÐūÐąŅ€Ð°ÐķÐĩÐ―Ð―Ņ.
+#flat_init_costs=(0.74,180)
+
+# ÐĶÐĩ - Ņ‚ÐļÐŋÐūÐēÐĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū, ŅÐšÐĩ ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ, КÐūÐŧÐļ Ņ–Ð―ŅˆŅ– ÐŋŅ€Ð°ÐēÐļÐŧа
+# Ð―Ðĩ ÐŋŅ€Ð°Ņ†ŅŽŅŽŅ‚ŅŒ. ПÐĩŅ€ŅˆÐļÐđ аŅ€ÐģŅƒÐžÐĩÐ―Ņ‚, "0.00115" - Ņ†Ðĩ Ņ†Ņ–Ð―а ÐūÐīÐ―Ņ–Ņ”Ņ— "ÐūÐīÐļÐ―ÐļŅ†Ņ–"
+# ("unit"), а "60" - ÐīÐūÐēÐķÐļÐ―Ð° Ņƒ ŅÐĩКŅƒÐ―ÐīаŅ….
+default=(0.000575, 3)
+
+#
+# ÐąŅ–ÐŧŅŒŅˆ ŅÐšÐŧаÐīÐ―Ņ– ÐŋŅ€Ð°ÐēÐļÐŧа:
+#
+
+on (monday..friday) between (00:00..08:59) use (0.00008055, 1)
+on (saturday..sunday) between () use (0.00008055, 1)
+
+# ÐīŅ–аÐŋазÐūÐ― ÐīаŅ‚ Ņ‚а ÐūКŅ€ÐĩОÐļÐđ ÐīÐĩÐ―ŅŒ Ņ‚ÐļÐķÐ―Ņ
+#on (1/1,1/7,3/8,5/1,5/2,5/9,6/28,8/24) between () use (0.00008055, 1)
+on (1.1,7.1,8.3,1.5,2.5,9.5,28.6,24.8) between () use (0.00008055, 1)
+
+# Ņ†Ðĩ ÐīÐŧŅ ПаŅŅ…Ðļ - аÐŧÐĩ ÐŋŅ€Ð°ÐēÐūŅÐŧаÐēÐ―Ð° ПаŅŅ…а ÐēŅ–ÐīŅ€Ņ–Ð·Ð―ŅŅ”Ņ‚ŅŒŅŅ ÐēŅ–Ðī КаŅ‚ÐūÐŧÐļŅ†ŅŒÐšÐūŅ—
+on (easter+14) between () use (0.00008055, 1)
+
+# ПаŅŅ…а + 50 ÐīÐ―Ņ–Ðē (ÐĒŅ€ÐūŅ—Ņ†ÐļÐ― ÐīÐĩÐ―ŅŒ/П'ŅŅ‚ÐļÐīÐĩŅŅŅ‚Ð―ÐļŅ†Ņ)
+on (easter+64) between () use (0.00008055, 1)
+
+# ЗаŅƒÐēаÐķŅ‚Ðĩ, Ņ‰Ðū Ņ†Ņ– ÐŋŅ€Ð°ÐēÐļÐŧа, ŅÐš Ņ– Ņ–Ð―ŅˆŅ–, заÐŧÐĩÐķаŅ‚ŅŒ ÐēŅ–Ðī
+# ÐŋÐūŅÐŧŅ–ÐīÐūÐēÐ―ÐūŅŅ‚Ņ–, Ņƒ ŅÐšŅ–Ðđ ÐēÐūÐ―Ðļ заÐŋÐļŅÐ°Ð―Ņ–.
+
diff --git a/kppp/Rules/Ukraine/Makefile.am b/kppp/Rules/Ukraine/Makefile.am
new file mode 100644
index 00000000..695a2d34
--- /dev/null
+++ b/kppp/Rules/Ukraine/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = TEMPLATE.uk Utel_Unet.rst IPTelecom_hourly.rst NuVse_hourly.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Ukraine
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Ukraine/NuVse_hourly.rst b/kppp/Rules/Ukraine/NuVse_hourly.rst
new file mode 100644
index 00000000..a03b15cd
--- /dev/null
+++ b/kppp/Rules/Ukraine/NuVse_hourly.rst
@@ -0,0 +1,91 @@
+################################################################
+# This file is in UTF-8 encoding.
+################################################################
+#
+# ПŅ€Ð°Ðēа/ÐŧŅ–Ņ†ÐĩÐ―Ð·Ņ–Ņ
+# РÐūзÐŋÐūÐēŅŅŽÐīÐķŅƒŅ”Ņ‚ŅŒŅŅ ÐŋŅ–Ðī ÐŧŅ–Ņ†ÐĩÐ―Ņ†Ð·Ņ–ŅŽ, ŅÐšŅƒ ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ” ÐŋаКŅƒÐ―ÐūК kppp
+# ÐÐ―ÐīŅ€Ņ–Ðđ РÐļŅŅ–Ð― <arysin@yahoo.com>
+# 19 ВÐĩŅ€ 2002 12:21:06
+#
+################################################################
+
+################################################################
+#
+# ІМ'ÐŊ НАБОРÐĢ ПРАВИЛ. ÐĶÐĩ НЕОБÐĨІДНО ÐīÐŧŅ ÐūÐąÐŧŅ–КŅƒ КÐūŅˆŅ‚Ņ–Ðē.
+#
+################################################################
+name=NuVse
+
+################################################################
+# ŅƒŅŅ‚Ð°Ð―ÐūÐēКÐļ ÐēаÐŧŅŽŅ‚Ðļ
+################################################################
+
+# ВÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ Ņƒ.Ðū. (ŅƒÐžÐūÐēÐ―Ņ– ÐūÐīÐļÐ―ÐļŅ†Ņ– Ð°ÐąÐū ŅŽÐ―Ņ–Ņ‚Ðļ)
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ = "$")
+currency_symbol=ÐģŅ€.
+
+# ВÐļÐ·Ð―Ð°Ņ‡Ð°Ņ” Ņ€ÐūзŅ‚аŅˆŅƒÐēÐ°Ð―Ð―Ņ Ð·Ð―Ð°ÐšŅƒ ÐēаÐŧŅŽŅ‚Ðļ.
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ = "right")
+currency_position=right
+
+# ВÐļÐ·Ð―Ð°Ņ‡Ð°Ņ” КŅ–ÐŧŅŒÐšŅ–ŅŅ‚ŅŒ Ņ†ÐļŅ„Ņ€ ÐŋŅ–ŅÐŧŅ КÐūОÐļ.
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ - "2")
+currency_digits=2
+
+
+################################################################
+# ŅƒŅŅ‚Ð°Ð―ÐūÐēКÐļ з'Ņ”ÐīÐ―Ð°Ð―Ð―Ņ
+################################################################
+
+# ПРИМІÐĒКА: ÐŋŅ€Ð°ÐēÐļÐŧа заŅŅ‚ÐūŅÐūÐēŅƒŅŽŅ‚ŅŒŅŅ зÐēÐĩŅ€Ņ…Ņƒ ÐēÐ―Ðļз
+# ÐžÐĄÐĒАННЄ ÐēŅ–ÐīÐŋÐūÐēŅ–ÐīÐ―Ðĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ
+# ÐŋŅ€Ðļ Ņ€ÐūзŅ€Ð°Ņ…ŅƒÐ―КŅƒ КÐūŅˆŅ‚Ņ–Ðē.
+
+# ÐĶÐĩ Ņ†Ņ–Ð―а з'Ņ”ÐīÐ―Ð°Ð―Ð―Ņ. ÐŊКŅ‰Ðū Ņƒ ВаŅ Ņ—Ņ— Ð―ÐĩОаŅ”,
+# ÐēÐļŅŅ‚аÐēŅ‚Ðĩ "0", Ð°ÐąÐū заКÐūОÐĩÐ―Ņ‚ŅƒÐđŅ‚Ðĩ.
+per_connection=0.0
+
+
+# МŅ–Ð―Ņ–ОаÐŧŅŒÐ―а ŅŅƒÐžÐžÐ° ÐŋŅ€Ðļ з'Ņ”ÐīÐ―Ð―Ņ–. ÐŊКŅ‰Ðū ŅŅƒÐžÐžÐ° ОÐĩÐ―ŅˆÐĩ,
+# Ð―Ņ–Ðķ Ņ†Ðĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ, ÐŋÐŧаŅ‚ÐļŅ‚ŅŒŅŅ Ņ†Ņ ŅŅƒÐžÐžÐ°.
+minimum_costs=0.0
+
+
+# ВÐļ ÐŋÐŧаŅ‚ÐļŅ‚Ðĩ 0.74 за ÐŋÐĩŅ€ŅˆŅ– 180 ŅÐĩКŅƒÐ―Ðī (3 Ņ…Ðē.) Ņƒ ÐąŅƒÐīŅŒ ŅÐšÐūОŅƒ ÐēÐļÐŋаÐīКŅƒ,
+# Ð―Ð°ÐēŅ–Ņ‚ŅŒ, ŅÐšŅ‰Ðū ВÐļ ÐąŅƒÐŧÐļ з'Ņ”ÐīÐ―Ð°Ð―Ņ– ÐēŅŅŒÐūÐģÐū ÐūÐīÐ―Ņƒ ŅÐĩКŅƒÐ―ÐīŅƒ.
+# ÐĶÐĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū ÐąŅƒÐīÐĩ ОаŅ‚Ðļ ÐŋŅ€Ņ–ÐūŅ€ÐļŅ‚ÐĩŅ‚ ÐēÐŋŅ€ÐūÐīÐūÐēÐķ ÐŋÐĩŅ€ŅˆÐļŅ… 180 ŅÐĩКŅƒÐ―Ðī
+# Ð―Ð°Ðī ÐąŅƒÐīŅŒ-ŅÐšÐļО Ņ–Ð―ŅˆÐļО ÐŋŅ€Ð°ÐēÐļÐŧÐūО.
+# ПÐĩŅ€ÐĩÐģÐŧŅÐ―ŅŒŅ‚Ðĩ ОаÐŧŅŽÐ―ÐūК costgraphs.gif Ðē КаŅ‚аÐŧÐūÐģŅƒ docs
+# КÐūОÐŋÐŧÐĩКŅ‚Ņƒ kppp Ņ‰ÐūÐīÐū Ð―Ð°ÐūŅ‡Ð―ÐūÐģÐū зÐūÐąŅ€Ð°ÐķÐĩÐ―Ð―Ņ.
+#flat_init_costs=(0.74,180)
+
+# ÐĶÐĩ - Ņ‚ÐļÐŋÐūÐēÐĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū, ŅÐšÐĩ ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ, КÐūÐŧÐļ Ņ–Ð―ŅˆŅ– ÐŋŅ€Ð°ÐēÐļÐŧа
+# Ð―Ðĩ ÐŋŅ€Ð°Ņ†ŅŽŅŽŅ‚ŅŒ. ПÐĩŅ€ŅˆÐļÐđ аŅ€ÐģŅƒÐžÐĩÐ―Ņ‚, "0.00115" - Ņ†Ðĩ Ņ†Ņ–Ð―а ÐūÐīÐ―Ņ–Ņ”Ņ— "ÐūÐīÐļÐ―ÐļŅ†Ņ–"
+# ("unit"), а "60" - ÐīÐūÐēÐķÐļÐ―Ð° Ņƒ ŅÐĩКŅƒÐ―ÐīаŅ….
+default=(0.005, 9)
+
+#
+# ÐąŅ–ÐŧŅŒŅˆ ŅÐšÐŧаÐīÐ―Ņ– ÐŋŅ€Ð°ÐēÐļÐŧа:
+#
+
+on () between (01:00..02:59) use (0.0025, 9)
+on () between (07:00..08:59) use (0.0025, 9)
+on () between (03:00..06:59) use (0.0001, 9)
+
+# зÐīаŅ”Ņ‚ŅŒŅŅ ÐēÐļŅ…Ņ–ÐīÐ―Ņ– Ņ‚а ŅÐēŅŅ‚а Ð―Ðĩ ÐēŅ–ÐīŅ€Ņ–Ð·Ð―ŅŅŽŅ‚ŅŒŅŅ ÐēŅ–Ðī ÐąŅƒÐīÐ―ÐĩÐđ
+#on (monday..friday) between (00:00..08:59) use (0.004833, 60)
+#on (saturday..sunday) between () use (0.004833, 60)
+
+# ÐīŅ–аÐŋазÐūÐ― ÐīаŅ‚ Ņ‚а ÐūКŅ€ÐĩОÐļÐđ ÐīÐĩÐ―ŅŒ Ņ‚ÐļÐķÐ―Ņ
+#on (1/1,1/7,3/8,5/1,5/2,5/9,6/28,8/24) between () use (0.004833, 60)
+#on (1.1,7.1,8.3,1.5,2.5,9.5,28.6,24.8) between () use (0.004833, 60)
+
+# Ņ†Ðĩ ÐīÐŧŅ ПаŅŅ…Ðļ - аÐŧÐĩ ÐŋŅ€Ð°ÐēÐūŅÐŧаÐēÐ―Ð° ПаŅŅ…а ÐēŅ–ÐīŅ€Ņ–Ð·Ð―ŅŅ”Ņ‚ŅŒŅŅ ÐēŅ–Ðī КаŅ‚ÐūÐŧÐļŅ†ŅŒÐšÐūŅ—
+#on (easter+14) between () use (0.004833, 60)
+
+# ПаŅŅ…а + 50 ÐīÐ―Ņ–Ðē (ÐĒŅ€ÐūŅ—Ņ†ÐļÐ― ÐīÐĩÐ―ŅŒ/П'ŅŅ‚ÐļÐīÐĩŅŅŅ‚Ð―ÐļŅ†Ņ)
+#on (easter+64) between () use (0.004833, 60)
+
+# ЗаŅƒÐēаÐķŅ‚Ðĩ, Ņ‰Ðū Ņ†Ņ– ÐŋŅ€Ð°ÐēÐļÐŧа, ŅÐš Ņ– Ņ–Ð―ŅˆŅ–, заÐŧÐĩÐķаŅ‚ŅŒ ÐēŅ–Ðī
+# ÐŋÐūŅÐŧŅ–ÐīÐūÐēÐ―ÐūŅŅ‚Ņ–, Ņƒ ŅÐšŅ–Ðđ ÐēÐūÐ―Ðļ заÐŋÐļŅÐ°Ð―Ņ–.
+
diff --git a/kppp/Rules/Ukraine/TEMPLATE.uk b/kppp/Rules/Ukraine/TEMPLATE.uk
new file mode 100644
index 00000000..15073aae
--- /dev/null
+++ b/kppp/Rules/Ukraine/TEMPLATE.uk
@@ -0,0 +1,149 @@
+################################################################
+# This file is in UTF-8 encoding.
+################################################################
+#
+# ПŅ€Ð°Ðēа/ÐŧŅ–Ņ†ÐĩÐ―Ð·Ņ–Ņ
+# ÐĶÐĩÐđ ŅˆÐ°ÐąÐŧÐūÐ― ŅŅ‚ÐēÐūŅ€ÐĩÐ―Ðū (c) Mario Weilguni <mweilguni@kde.org>
+# РÐūзÐŋÐūÐēŅŅŽÐīÐķŅƒŅ”Ņ‚ŅŒŅŅ ÐŋŅ–Ðī ÐŧŅ–Ņ†ÐĩÐ―Ņ†Ð·Ņ–ŅŽ, ŅÐšŅƒ ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ” ÐŋаКŅƒÐ―ÐūК kppp,
+# ŅÐšÐŧаÐīÐūÐēÐūŅŽ ŅÐšÐūÐģÐū Ņ†ÐĩÐđ ŅˆÐ°ÐąÐŧÐūÐ― Ņ– Ņ”.
+#
+################################################################
+#
+# ÐĶÐĩ ÐŋŅ€ÐļКÐŧаÐī Ð―Ð°ÐąÐūŅ€Ņƒ ÐŋŅ€Ð°ÐēÐļÐŧ ÐīÐŧŅ kppp. ВÐļ ОÐūÐķÐĩŅ‚Ðĩ ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒÐēаŅ‚Ðļ
+# Ņ†ÐĩÐđ ŅˆÐ°ÐąÐŧÐūÐ― ÐīÐŧŅ ŅŅ‚ÐēÐūŅ€ÐĩÐ―Ð―Ņ ÐēÐŧаŅÐ―ÐļŅ… Ð―Ð°ÐąÐūŅ€Ņ–Ðē ÐŋŅ€Ð°ÐēÐļÐŧ. ПŅ€Ðļ ÐēÐļКÐūŅ€ÐļŅŅ‚Ð°Ð―Ð―Ņ–
+# ÐēÐļÐŧŅƒŅ‡Ņ–Ņ‚ŅŒ ÐēŅŅ– КÐūОÐĩÐ―Ņ‚аŅ€Ņ– Ņ‚а ÐīÐūÐīаÐđŅ‚Ðĩ ÐēÐŧаŅÐ―Ņ–. ÐĶÐĩ ÐīÐūзÐēÐūÐŧÐļŅ‚ŅŒ Ņ–Ð―ŅˆÐļО
+# КÐūŅ€ÐļŅŅ‚ŅƒÐēаŅ‡Ð°Ðž ÐŧÐĩÐģŅˆÐĩ ÐŋÐĩŅ€ÐĩÐēŅ–Ņ€ŅŅ‚Ðļ ÐēаŅˆÐļ ÐŋŅ€Ð°ÐēÐļÐŧа.
+#
+# БŅƒÐīŅŒ ÐŧаŅÐšÐ°, ÐŋŅ–ÐīÐŋÐļŅˆŅ–Ņ‚ŅŒ Ņ„аÐđÐŧ Ņ‚аŅ€ÐļŅ„Ņ–Ðē ВаŅˆÐļО Ņ–О'ŅÐž Ņ‚а аÐīŅ€ÐĩŅÐūŅŽ ÐĩÐŧ. ÐŋÐūŅˆŅ‚Ðļ,
+# Ņ‰ÐūÐą ÐŋŅ€Ðļ Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐūŅŅ‚Ņ– Ņ зОŅ–Ðģ з ВаОÐļ зÐē'ŅÐ·Ð°Ņ‚ÐļŅŅ.
+#
+# ПРИМІÐĒКА: ÐŋŅ€Ð°ÐēÐļÐŧа Ðē Ņ†ŅŒÐūОŅƒ Ņ„аÐđÐŧŅ– Ð―Ðĩ Ņ” Ņ€ÐĩаÐŧŅŒÐ―ÐļОÐļ Ņ– Ð―Ð°ÐēÐĩÐīÐĩÐ―Ņ–
+# ÐēÐļКÐŧŅŽŅ‡Ð―Ðū Ņƒ ÐīÐĩОÐūÐ―ŅŅ‚Ņ€Ð°Ņ†Ņ–ÐđÐ―ÐūОŅƒ ÐŋÐūŅ€ŅÐīКŅƒ
+#
+# ÐĐОДО ІМЕН ÐĪАЙЛІВ:
+# КÐūÐŧÐļ ВÐļ ŅŅ‚ÐēÐūŅ€ŅŽŅ”Ņ‚Ðĩ Ņ„аÐđÐŧ ÐŋŅ€Ð°ÐēÐļÐŧ, ÐēÐķÐļÐēаÐđŅ‚Ðĩ "_" Ņƒ Ņ–ОÐĩÐ―Ņ– Ņ„аÐđÐŧŅƒ
+# заОŅ–ŅŅ‚ŅŒ ÐŋŅ€ÐūÐŋŅƒŅÐšŅ–Ðē Ņ‚а ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒÐđŅ‚Ðĩ Ņ€ÐūзŅˆÐļŅ€ÐĩÐ―Ð―Ņ ".rst"
+# Ð―Ð°ÐŋŅ€. "ПŅ€ÐūÐēаÐđÐīÐĩŅ€ 1 ОŅ–ŅŅ‚а КÐļŅ”Ðēа"
+# --> Ņ–О'Ņ Ņ„аÐđÐŧа ÐąŅƒÐīÐĩ "ПŅ€ÐūÐēаÐđÐīÐĩŅ€_1_ОŅ–ŅŅ‚а_КÐļŅ”Ðēа.rst"
+#
+# ДŅÐšŅƒŅŽ, Bernd Wuebben
+# wuebben@math.cornell.edu / wuebben@kde.org
+################################################################
+
+
+################################################################
+#
+# ІМ'ÐŊ НАБОРÐĢ ПРАВИЛ. ÐĶÐĩ НЕОБÐĨІДНО ÐīÐŧŅ ÐūÐąÐŧŅ–КŅƒ КÐūŅˆŅ‚Ņ–Ðē.
+#
+################################################################
+name=default
+
+################################################################
+# ŅƒŅŅ‚Ð°Ð―ÐūÐēКÐļ ÐēаÐŧŅŽŅ‚Ðļ
+################################################################
+
+# ВÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ ГŅ€. (ГŅ€ÐļÐēÐ―Ņ)
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ = "$")
+currency_symbol=ГŅ€.
+
+# ВÐļÐ·Ð―Ð°Ņ‡Ð°Ņ” Ņ€ÐūзŅ‚аŅˆŅƒÐēÐ°Ð―Ð―Ņ Ð·Ð―Ð°ÐšŅƒ ÐēаÐŧŅŽŅ‚Ðļ.
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ = "right")
+currency_position=right
+
+# ВÐļÐ·Ð―Ð°Ņ‡Ð°Ņ” КŅ–ÐŧŅŒÐšŅ–ŅŅ‚ŅŒ Ð·Ð―Ð°Ņ‡ŅƒŅ‰ÐļŅ… Ņ†ÐļŅ„Ņ€.
+# (Ð―Ðĩ Ņ” Ð―ÐĩÐūÐąŅ…Ņ–ÐīÐ―ÐļО, Ņ‚ÐļÐŋÐūÐēÐĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ - "2")
+currency_digits=2
+
+
+
+################################################################
+# ŅƒŅŅ‚Ð°Ð―ÐūÐēКÐļ з'Ņ”ÐīÐ―Ð°Ð―Ð―Ņ
+################################################################
+
+# ПРИМІÐĒКА: ÐŋŅ€Ð°ÐēÐļÐŧа заŅŅ‚ÐūŅÐūÐēŅƒŅŽŅ‚ŅŒŅŅ зÐēÐĩŅ€Ņ…Ņƒ ÐēÐ―Ðļз
+# ÐžÐĄÐĒАННЄ ÐēŅ–ÐīÐŋÐūÐēŅ–ÐīÐ―Ðĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ
+# ÐŋŅ€Ðļ Ņ€ÐūзŅ€Ð°Ņ…ŅƒÐ―КŅƒ КÐūŅˆŅ‚Ņ–Ðē.
+
+# ÐĶÐĩ Ņ†Ņ–Ð―а з'Ņ”ÐīÐ―Ð°Ð―Ð―Ņ. ÐŊКŅ‰Ðū Ņƒ ВаŅ Ņ—Ņ— Ð―ÐĩОаŅ”,
+# ÐēÐļŅŅ‚аÐēŅ‚Ðĩ "0", Ð°ÐąÐū заКÐūОÐĩÐ―Ņ‚ŅƒÐđŅ‚Ðĩ.
+per_connection=0.0
+
+
+# МŅ–Ð―Ņ–ОаÐŧŅŒÐ―а ŅŅƒÐžÐžÐ° ÐŋŅ€Ðļ з'Ņ”ÐīÐ―Ð―Ņ–. ÐŊКŅ‰Ðū ŅŅƒÐžÐžÐ° ОÐĩÐ―ŅˆÐĩ,
+# Ð―Ņ–Ðķ Ņ†Ðĩ Ð·Ð―Ð°Ņ‡ÐĩÐ―Ð―Ņ, ÐŋÐŧаŅ‚ÐļŅ‚ŅŒŅŅ Ņ†Ņ ŅŅƒÐžÐžÐ°.
+minimum_costs=0.0
+
+
+# ВÐļ ÐŋÐŧаŅ‚ÐļŅ‚Ðĩ 0.74 за ÐŋÐĩŅ€ŅˆŅ– 180 ŅÐĩКŅƒÐ―Ðī (3 Ņ…Ðē.) Ņƒ ÐąŅƒÐīŅŒ ŅÐšÐūОŅƒ ÐēÐļÐŋаÐīКŅƒ,
+# Ð―Ð°ÐēŅ–Ņ‚ŅŒ, ŅÐšŅ‰Ðū ВÐļ ÐąŅƒÐŧÐļ з'Ņ”ÐīÐ―Ð°Ð―Ņ– ÐēŅŅŒÐūÐģÐū ÐūÐīÐ―Ņƒ ŅÐĩКŅƒÐ―ÐīŅƒ.
+# ÐĶÐĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū ÐąŅƒÐīÐĩ ОаŅ‚Ðļ ÐŋŅ€Ņ–ÐūŅ€ÐļŅ‚ÐĩŅ‚ ÐēÐŋŅ€ÐūÐīÐūÐēÐķ ÐŋÐĩŅ€ŅˆÐļŅ… 180 ŅÐĩКŅƒÐ―Ðī
+# Ð―Ð°Ðī ÐąŅƒÐīŅŒ-ŅÐšÐļО Ņ–Ð―ŅˆÐļО ÐŋŅ€Ð°ÐēÐļÐŧÐūО.
+# ПÐĩŅ€ÐĩÐģÐŧŅÐ―ŅŒŅ‚Ðĩ ОаÐŧŅŽÐ―ÐūК costgraphs.gif Ðē КаŅ‚аÐŧÐūÐģŅƒ docs
+# КÐūОÐŋÐŧÐĩКŅ‚Ņƒ kppp Ņ‰ÐūÐīÐū Ð―Ð°ÐūŅ‡Ð―ÐūÐģÐū зÐūÐąŅ€Ð°ÐķÐĩÐ―Ð―Ņ.
+flat_init_costs=(0.74,180)
+
+# ÐĶÐĩ - Ņ‚ÐļÐŋÐūÐēÐĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū, ŅÐšÐĩ ÐēÐļКÐūŅ€ÐļŅŅ‚ÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ, КÐūÐŧÐļ Ņ–Ð―ŅˆŅ– ÐŋŅ€Ð°ÐēÐļÐŧа
+# Ð―Ðĩ ÐŋŅ€Ð°Ņ†ŅŽŅŽŅ‚ŅŒ. ПÐĩŅ€ŅˆÐļÐđ аŅ€ÐģŅƒÐžÐĩÐ―Ņ‚, "0.1" - Ņ†Ðĩ Ņ†Ņ–Ð―а ÐūÐīÐ―Ņ–Ņ”Ņ— "ÐūÐīÐļÐ―ÐļŅ†Ņ–"
+# ("unit"), а "72" - ÐīÐūÐēÐķÐļÐ―Ð° Ņƒ ŅÐĩКŅƒÐ―ÐīаŅ….
+# ÐĒаКÐļО Ņ‡ÐļÐ―ÐūО, Ð―Ð°ŅŅ‚ŅƒÐŋÐ―Ðĩ ÐŋŅ€Ð°ÐēÐļÐŧÐū ÐūÐ·Ð―Ð°Ņ‡Ð°Ņ”: "КÐūÐķÐ―Ņ– 72 ŅÐĩКŅƒÐ―Ðī 0.1
+# ГŅ€. ÐīÐūÐīаŅ”Ņ‚ŅŒŅŅ ÐīÐū ВаŅˆÐūÐģÐū Ņ€Ð°Ņ…ŅƒÐ―КŅƒ"
+default=(0.1, 72)
+
+#
+# ÐąŅ–ÐŧŅŒŅˆ ŅÐšÐŧаÐīÐ―Ņ– ÐŋŅ€Ð°ÐēÐļÐŧа:
+#
+
+# "з ÐŋÐūÐ―ÐĩÐīŅ–ÐŧКа ÐŋÐū Ð―ÐĩÐīŅ–ÐŧŅŽ з 12:00 ÐīÐū 23:59 Ņ†Ņ–Ð―а
+# 0.2 за КÐūÐķÐ―Ņ– 72 ŅÐĩКŅƒÐ―Ðī"
+on () between () use (0.2, 2)
+
+# Ņ‚ÐĩÐķ ŅÐ°ÐžÐĩ
+on (monday..sunday) between () use (0.2, 2)
+
+# Ņ‚ÐĩÐķ ŅÐ°ÐžÐĩ. ВÐļ ÐŋÐūÐēÐļÐ―Ð―Ņ– ÐēÐķÐļÐēаŅ‚Ðļ 24-ÐģÐūÐīÐļÐ―Ð―ÐļÐđ заÐŋÐļŅ, Ņ–Ð―аКŅˆÐĩ
+# ÐūÐąÐŧŅ–К Ð―Ðĩ ÐąŅƒÐīÐĩ ÐŋŅ€Ð°Ņ†ŅŽÐēаŅ‚Ðļ. (НаÐŋŅ€ÐļКÐŧаÐī: заÐŋÐļŅŅƒÐđŅ‚Ðĩ 15:00 ÐīÐŧŅ 3 pm)
+on (monday..sunday) between (0:00..23:59) use (0.2, 2)
+
+# заŅŅ‚ÐūŅÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ ÐīÐū Ðŋ'ŅŅ‚Ð―ÐļŅ†Ņ–, ŅŅƒÐąÐūŅ‚Ðļ, Ð―ÐĩÐīŅ–ÐŧŅ– Ņ‚а ÐŋÐūÐ―ÐĩÐīŅ–Ка з 8am ÐīÐū 1pm
+on (friday..monday) between (8:00..13:00) use(0.3,72)
+
+# ÐĢВАГА:
+on(monday..friday) between (21:00..5:00) use (0.4,2)
+# Ð―Ðĩ ÐēКÐŧŅŽŅ‡Ð°Ņ” Ðē ŅÐĩÐąÐĩ ŅŅƒÐąÐūŅ‚Ņƒ 0:00-5:00, Ņ‚Ņ–ÐŧŅŒÐšÐļ з ÐŋÐūÐ―ÐĩÐīŅ–ÐŧКа ÐŋÐū Ðŋ'ŅŅ‚Ð―ÐļŅ†ŅŽ.
+
+# заŅŅ‚ÐūŅÐūÐēŅƒŅ”Ņ‚ŅŒŅŅ Ð―Ð° ÐūКŅ€ÐĩОŅƒ ÐīаŅ‚Ņƒ (РŅ–зÐīÐēÐū)
+on (1/07) between () use (0.3,72)
+# ÐīаŅ‚Ņƒ Ņ‚аКÐūÐķ ОÐūÐķÐ―Ð° заÐŋÐļŅŅƒÐēаŅ‚Ðļ ŅÐš <ÐīÐĩÐ―ŅŒ>.<ОŅ–ŅŅŅ†ŅŒ>
+on (7.1) between () use (0.3,72)
+
+# ÐīŅ–аÐŋазÐūÐ― ÐīаŅ‚ Ņ‚а ÐūКŅ€ÐĩОÐļÐđ ÐīÐĩÐ―ŅŒ Ņ‚ÐļÐķÐ―Ņ
+on (12/25..12/27, 12/31, 07/04, monday) between () use (0.4, 72)
+# ÐīаŅ‚Ņƒ Ņ‚аКÐūÐķ ОÐūÐķÐ―Ð° заÐŋÐļŅŅƒÐēаŅ‚Ðļ ŅÐš <ÐīÐĩÐ―ŅŒ>.<ОŅ–ŅŅŅ†ŅŒ>
+on (25.12..27.12, 31.12, 04.07, monday) between () use (0.4, 72)
+
+# Ņ†Ðĩ ÐīÐŧŅ (КаŅ‚ÐūÐŧÐļŅ†ŅŒÐšÐūŅ—) ПаŅŅ…Ðļ
+on (easter) between () use (0.3,72)
+# Ņ†Ðĩ ÐīÐŧŅ (ÐŋŅ€Ð°ÐēÐūŅÐŧаÐēÐ―ÐūŅ—) ПаŅŅ…Ðļ
+on (easter+14) between () use (0.3,72)
+
+# ПаŅŅ…а + 50 ÐīÐ―Ņ–Ðē (ÐĒŅ€ÐūŅ—Ņ†ÐļÐ― ÐīÐĩÐ―ŅŒ/П'ŅŅ‚ÐļÐīÐĩŅŅŅ‚Ð―ÐļŅ†Ņ)
+on (easter+50) between () use (0.3,72)
+# (ÐŋŅ€Ð°ÐēÐūŅÐŧаÐēÐ―Ð°) ПаŅŅ…а + 50 ÐīÐ―Ņ–Ðē (ÐĒŅ€ÐūŅ—Ņ†ÐļÐ― ÐīÐĩÐ―ŅŒ/П'ŅŅ‚ÐļÐīÐĩŅŅŅ‚Ð―ÐļŅ†Ņ)
+on (easter+64) between () use (0.3,72)
+
+on (thursday) between (20:00..21:52) use (8.2, 1)
+
+
+# ПŅ€Ð°ÐēÐļÐŧа "on()", Ð―Ð°ÐēÐĩÐīÐĩÐ―Ņ– ÐēÐģÐūŅ€Ņ–, ÐēŅ–ÐīÐ―ÐūŅŅŅ‚ŅŒŅŅ Ņ‚Ņ–ÐŧŅŒÐšÐļ ÐīÐū ÐŋÐūŅ‚ÐūŅ‡Ð―ÐūÐģÐū Ņ‡Ð°ŅŅƒ.
+# ВÐļ Ņ‚аКÐūÐķ ОÐūÐķÐĩŅ‚Ðĩ ŅŅ‚ÐēÐūŅ€ŅŽÐēаŅ‚Ðļ ÐŋŅ€Ð°ÐēÐļÐŧа, Ņ‰Ðū заÐŧÐĩÐķаŅ‚ŅŒ ÐēŅ–Ðī Ņ‚Ņ€ÐļÐēаÐŧÐūŅŅ‚Ņ– з'Ņ”ÐīÐ―Ð°Ð―Ð―Ņ
+# ÐēКазŅƒŅŽŅ‡Ņ– Ņ†ÐĩÐđ Ņ‡Ð°Ņ Ņ‚Ņ€ÐĩŅ‚Ņ–О ÐŋаŅ€Ð°ÐžÐĩŅ‚Ņ€ÐūО Ņƒ "use()".
+# НаÐŋŅ€ÐļКÐŧаÐī, ŅÐšÐ°ÐķŅ–ОÐū, Ð―ÐūŅ€ÐžÐ°ÐŧŅŒÐ―ÐļÐđ Ņ‚аŅ€ÐļŅ„ ÐīÐŧŅ ÐēÐĩŅ‡ÐūŅ€Ð° - 0.20 за Ņ…ÐēÐļÐŧÐļÐ―Ņƒ,
+# Ņ– ÐēŅ–Ð― Ð·Ð―ÐļÐķŅƒŅ”Ņ‚ŅŒŅŅ Ð―Ð° 20% ÐŋŅ–ŅÐŧŅ КÐūÐķÐ―ÐūŅ— ÐģÐūÐīÐļÐ―Ðļ з'Ņ”ÐīÐ―Ð°Ð―Ð―Ņ. ÐĶÐĩ ОÐūÐķÐĩ ÐąŅƒŅ‚Ðļ
+# заÐŋÐļŅÐ°Ð―Ðū Ð―Ð°ŅŅ‚ŅƒÐŋÐ―ÐļО Ņ‡ÐļÐ―ÐūО:
+
+on () between (19:30..08:00) use (0.20, 60)
+on () between (19:30..08:00) use (0.16, 60, 3600)
+
+# ЗаŅƒÐēаÐķŅ‚Ðĩ, Ņ‰Ðū Ņ†Ņ– ÐŋŅ€Ð°ÐēÐļÐŧа, ŅÐš Ņ– Ņ–Ð―ŅˆŅ–, заÐŧÐĩÐķаŅ‚ŅŒ ÐēŅ–Ðī
+# ÐŋÐūŅÐŧŅ–ÐīÐūÐēÐ―ÐūŅŅ‚Ņ–, Ņƒ ŅÐšŅ–Ðđ ÐēÐūÐ―Ðļ заÐŋÐļŅÐ°Ð―Ņ–.
+
diff --git a/kppp/Rules/Ukraine/Utel_Unet.rst b/kppp/Rules/Ukraine/Utel_Unet.rst
new file mode 100644
index 00000000..fc73d533
--- /dev/null
+++ b/kppp/Rules/Ukraine/Utel_Unet.rst
@@ -0,0 +1,23 @@
+##############################################################
+# This file is in UTF-8 encoding
+# Ukrainnish rate ruleset for calls with Utel Unet
+# Created 2002-28-02 by Serhy O.Reshetnyuk <reshtnk7@unet.net.ua>
+##############################################################
+
+name=Utel_Unet
+currency_symbol=ГŅ€.
+currency_position=right
+currency_digits=2
+
+
+# ÐĶÐĩ заÐģаÐŧŅŒÐ―ÐļÐđ ÐīÐŧŅ ÐĢКŅ€Ð°Ņ—Ð―Ðļ Ņ‚аŅ€ÐļŅ„,
+# ÐīÐŧŅ КÐļŅ”Ðēа Ņ– КÐļŅ—Ņ–ÐēŅŅŒÐšÐūŅ— ÐūÐąÐŧаŅŅ‚Ņ–
+# ÐŋÐūŅ‚Ņ€Ņ–ÐąÐ―Ðū зОŅ–Ð―ÐļŅ‚Ðļ
+# 10.80 ГŅ€Ð―./ÐģÐūÐī,
+# 0.18 ГŅ€Ð―./MIN,
+# 0.003 ГŅ€Ð―/SEK
+
+per_connection=0.0
+minimum_costs=0.0
+
+default=(0.003, 1)
diff --git a/kppp/Rules/United_Kingdom/BirminghamCable_Local.rst b/kppp/Rules/United_Kingdom/BirminghamCable_Local.rst
new file mode 100644
index 00000000..a9da69fc
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/BirminghamCable_Local.rst
@@ -0,0 +1,106 @@
+################################################################
+#
+# 27 Oct 1997 (Valid until who knows?)
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR OWN TELEPHONE PROVIDER AND CONFIGURE THIS YOURSELF.
+# AND DO NOT USE THIS FILE.
+#
+#
+# Darryl L Miles
+# <dlm@g7led.demon.co.uk>
+#
+# Under 35 miles (approx)
+# British_BirminghamCable_Local
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=British_BirminghamCable_Local
+
+
+################################################################
+# currency settings
+################################################################
+
+# 1 pound sterling = 100 pence sterling
+# 1 pence sterling is our lowest unit of coinage, but
+# I suspect telephone companys may remember the
+# fractions of pence for billing.
+#
+# Our monetry format:
+#
+# e.g. ÂĢ1.57 = 1 pound and 57 pence.
+# e.g. 157p = 1 pund and 57 pence.
+#
+# defines UKP (PoundSterling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.04
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.033" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.033
+# PoundsSterling are added to the bill"
+#
+# I've simply taken the worst case price for this, peak time
+# calls. Just in case I miss a period of time out.
+default=(0.033, 60)
+
+################################################################
+# charge bands
+################################################################
+
+# We are actually charged to the second, but I don't really
+# need the PPP program to be so accurate myself (all that
+# CPU power working out costs, when it can be browsing the
+# Web, ho ho ho :-). To the nearest 10 (or so) seconds is
+# fine for me.
+
+# Charge: 3.3p/min (peak time)
+# Min Charge: 4p/call
+# Unit Time: per second
+#
+on (monday..friday) between (8:00..17:59) use (0.0055, 10)
+
+# Change: 1.5p/min (off-peak time)
+# Min Charge: 4p/call
+# Unit Time: per second
+#
+on (monday..friday) between (18:00..7:59) use (0.0025, 10)
+
+# Charge: 0.9p/min (weekend rate)
+# Min Charge: 4p/call
+# Unit Time: per second
+#
+on (saturday..sunday) between () use (0.0015, 10)
diff --git a/kppp/Rules/United_Kingdom/BirminghamCable_National.rst b/kppp/Rules/United_Kingdom/BirminghamCable_National.rst
new file mode 100644
index 00000000..1f32b36d
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/BirminghamCable_National.rst
@@ -0,0 +1,111 @@
+################################################################
+#
+# 27 Oct 1997 (Valid until who knows?)
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY OR ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR OWN TELEPHONE PROVIDER AND CONFIGURE THIS YOURSELF;
+# AND DO NOT USE THIS FILE.
+#
+#
+# Darryl L Miles
+# <dlm@g7led.demon.co.uk>
+#
+# Over 35 miles (approx)
+# British_BirminghamCable_National
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=British_BirminghamCable_National
+
+
+################################################################
+# currency settings
+################################################################
+
+# 1 pound sterling = 100 pence sterling
+# 1 pence sterling is our lowest unit of coinage, but
+# I suspect telephone companys may remember the
+# fractions of pence for billing.
+#
+# Our monetry format:
+#
+# e.g. ÂĢ1.57 = 1 pound and 57 pence.
+# e.g. 157p = 1 pund and 57 pence.
+#
+# defines UKP (PoundSterling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.04
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.075" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.075
+# PoundsSterling are added to the bill"
+#
+# I've simply taken the worst case price for this, peak time
+# calls. Just in case I miss a period of time out.
+default=(0.075, 60)
+
+################################################################
+# charge bands
+################################################################
+
+# We are actually charged to the second, but I don't really
+# need the PPP program to be so accurate myself (all that
+# CPU power working out costs, when it can be browsing the
+# Web, ho ho ho :-). To the nearest 10 (or so) seconds is
+# fine for me.
+
+# Charge: 7.5p/min (peak time)
+# Min Charge: 4p/call
+# Unit Time: per second
+on (monday..friday) between (8:00..17:59) use (0.0125, 10)
+
+# Change: 3.5p/min (off-peak time)
+# Min Charge: 4p/call
+# Unit Time: per second
+# Notes: This one doesn't nicely divide up for 10 seconds, so 12
+# is being used. The value for 10 seconds turns into a
+# recurring fraction. (0.0058333333/10secs)
+#
+on (monday..friday) between (18:00..7:59) use (0.007, 12)
+
+# Charge: 2.9p/min (weekend rate)
+# Min Charge: 4p/call
+# Unit Time: per second
+# Notes: This one doesn't nicely divide up for 10 seconds, so 12
+# is being used. The value for 10 seconds turns into a
+# recurring fraction. (0.0048333333/10secs)
+#
+on (saturday..sunday) between () use (0.0058, 12)
diff --git a/kppp/Rules/United_Kingdom/BirminghamCable_SameTelco.rst b/kppp/Rules/United_Kingdom/BirminghamCable_SameTelco.rst
new file mode 100644
index 00000000..8909e740
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/BirminghamCable_SameTelco.rst
@@ -0,0 +1,111 @@
+################################################################
+#
+# 27 Oct 1997 (Valid until who knows?)
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR OWN TELEPHONE PROVIDER AND CONFIGURE THIS YOURSELF.
+# AND DO NOT USE THIS FILE.
+#
+#
+# SameTelco as a generic name (???) for BirminghamCable to
+# BirminghamCable call. i.e. within the "same telephone
+# company".
+#
+#
+# Darryl L Miles
+# <dlm@g7led.demon.co.uk>
+#
+# Under 35 miles (approx)
+# British_BirminghamCable_SameTelco
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=British_BirminghamCable_SameTelco
+
+
+################################################################
+# currency settings
+################################################################
+
+# 1 pound sterling = 100 pence sterling
+# 1 pence sterling is our lowest unit of coinage, but
+# I suspect telephone companys may remember the
+# fractions of pence for billing.
+#
+# Our monetry format:
+#
+# e.g. ÂĢ1.57 = 1 pound and 57 pence.
+# e.g. 157p = 1 pund and 57 pence.
+#
+# defines UKP (PoundSterling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.04
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.033" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.033
+# PoundsSterling are added to the bill"
+#
+# I've simply taken the worst case price for this, peak time
+# calls. Just in case I miss a period of time out.
+default=(0.033, 60)
+
+################################################################
+# charge bands
+################################################################
+
+# We are actually charged to the second, but I don't really
+# need the PPP program to be so accurate myself (all that
+# CPU power working out costs, when it can be browsing the
+# Web, ho ho ho :-). To the nearest 10 (or so) seconds is
+# fine for me.
+
+# Charge: 3.3p/min (peak time)
+# Min Charge: 4p/call
+# Unit Time: per second
+#
+on (monday..friday) between (8:00..17:59) use (0.0055, 10)
+
+# Change: 1.5p/min (off-peak time)
+# Min Charge: 4p/call
+# Unit Time: per second
+#
+on (monday..friday) between (18:00..7:59) use (0.0025, 10)
+
+# Charge: 0.5p/min (weekend rate)
+# Min Charge: 4p/call
+# Unit Time: per second
+#
+on (saturday..sunday) between () use (0.001, 12)
diff --git a/kppp/Rules/United_Kingdom/BritishTelecom_Local.rst b/kppp/Rules/United_Kingdom/BritishTelecom_Local.rst
new file mode 100644
index 00000000..e567f40d
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/BritishTelecom_Local.rst
@@ -0,0 +1,110 @@
+################################################################
+#
+# 27 Oct 1997 (Valid until who knows?)
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR OWN TELEPHONE PROVIDER AND CONFIGURE THIS YOURSELF.
+# AND DO NOT USE THIS FILE.
+#
+#
+# Darryl L Miles
+# <dlm@g7led.demon.co.uk>
+#
+# Under 35 miles (approx) and WITHIN same STD code (for many regions
+# the local band will cover a few adjecent STD code areas as well).
+# British_BritishTelecom_Local
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=British_BritishTelecom_Local
+
+
+################################################################
+# currency settings
+################################################################
+
+# 1 pound sterling = 100 pence sterling
+# 1 pence sterling is our lowest unit of coinage, but
+# I suspect telephone companys may remember the
+# fractions of pence for billing.
+#
+# Our monetry format:
+#
+# e.g. ÂĢ1.57 = 1 pound and 57 pence.
+# e.g. 157p = 1 pund and 57 pence.
+#
+# defines UKP (PoundSterling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+# They quote 5p _*inclusive*_ of VAT (Value Added Tax, whose
+# current rate is 17.5%). All other charges are exclusive
+# of VAT.
+minimum_costs=0.04256
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.04" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.04
+# PoundsSterling are added to the bill"
+#
+# I've simply taken the worst case price for this, peak time
+# calls. Just in case I miss a period of time out.
+default=(0.04, 60)
+
+################################################################
+# charge bands
+################################################################
+
+# We are actually charged to the second, but I don't really
+# need the PPP program to be so accurate myself (all that
+# CPU power working out costs, when it can be browsing the
+# Web, ho ho ho :-). To the nearest 10 (or so) seconds is
+# fine for me.
+
+# Charge: 4p/min (peak time)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (monday..friday) between (8:00..17:59) use (0.008, 12)
+
+# Change: 1.7p/min (off-peak time)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (monday..friday) between (18:00..7:59) use (0.0034, 12)
+
+# Charge: 1p/min (weekend rate)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (saturday..sunday) between () use (0.002, 12)
diff --git a/kppp/Rules/United_Kingdom/BritishTelecom_National.rst b/kppp/Rules/United_Kingdom/BritishTelecom_National.rst
new file mode 100644
index 00000000..f1580be4
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/BritishTelecom_National.rst
@@ -0,0 +1,109 @@
+################################################################
+#
+# 27 Oct 1997 (Valid until who knows?)
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR OWN TELEPHONE PROVIDER AND CONFIGURE THIS YOURSELF.
+# AND DO NOT USE THIS FILE.
+#
+#
+# Darryl L Miles
+# <dlm@g7led.demon.co.uk>
+#
+# Over 35 miles (approx)
+# British_BritishTelecom_National
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=British_BritishTelecom_National
+
+
+################################################################
+# currency settings
+################################################################
+
+# 1 pound sterling = 100 pence sterling
+# 1 pence sterling is our lowest unit of coinage, but
+# I suspect telephone companys may remember the
+# fractions of pence for billing.
+#
+# Our monetry format:
+#
+# e.g. ÂĢ1.57 = 1 pound and 57 pence.
+# e.g. 157p = 1 pund and 57 pence.
+#
+# defines UKP (PoundSterling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+# They quote 5p _*inclusive*_ of VAT (Value Added Tax, whose
+# current rate is 17.5%). All other charges are exclusive
+# of VAT.
+minimum_costs=0.04256
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.08" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.08
+# PoundsSterling are added to the bill"
+#
+# I've simply taken the worst case price for this, peak time
+# calls. Just in case I miss a period of time out.
+default=(0.08, 60)
+
+################################################################
+# charge bands
+################################################################
+
+# We are actually charged to the second, but I don't really
+# need the PPP program to be so accurate myself (all that
+# CPU power working out costs, when it can be browsing the
+# Web, ho ho ho :-). To the nearest 10 (or so) seconds is
+# fine for me.
+
+# Charge: 8p/min (peak time)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (monday..friday) between (8:00..17:59) use (0.016, 12)
+
+# Change: 4.2p/min (off-peak time)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (monday..friday) between (18:00..7:59) use (0.007, 10)
+
+# Charge: 3.3p/min (weekend rate)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (saturday..sunday) between () use (0.0055, 10)
diff --git a/kppp/Rules/United_Kingdom/BritishTelecom_Regional.rst b/kppp/Rules/United_Kingdom/BritishTelecom_Regional.rst
new file mode 100644
index 00000000..6d6ed5f9
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/BritishTelecom_Regional.rst
@@ -0,0 +1,109 @@
+################################################################
+#
+# 27 Oct 1997 (Valid until who knows?)
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR OWN TELEPHONE PROVIDER AND CONFIGURE THIS YOURSELF.
+# AND DO NOT USE THIS FILE.
+#
+#
+# Darryl L Miles
+# <dlm@g7led.demon.co.uk>
+#
+# Under 35 miles (approx)
+# British_BritishTelecom_Regional
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=British_BritishTelecom_Regional
+
+
+################################################################
+# currency settings
+################################################################
+
+# 1 pound sterling = 100 pence sterling
+# 1 pence sterling is our lowest unit of coinage, but
+# I suspect telephone companys may remember the
+# fractions of pence for billing.
+#
+# Our monetry format:
+#
+# e.g. ÂĢ1.57 = 1 pound and 57 pence.
+# e.g. 157p = 1 pund and 57 pence.
+#
+# defines UKP (PoundSterling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+# They quote 5p _*inclusive*_ of VAT (Value Added Tax, whose
+# current rate is 17.5%). All other charges are exclusive
+# of VAT.
+minimum_costs=0.04256
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.08" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.08
+# PoundsSterling are added to the bill"
+#
+# I've simply taken the worst case price for this, peak time
+# calls. Just in case I miss a period of time out.
+default=(0.08, 60)
+
+################################################################
+# charge bands
+################################################################
+
+# We are actually charged to the second, but I don't really
+# need the PPP program to be so accurate myself (all that
+# CPU power working out costs, when it can be browsing the
+# Web, ho ho ho :-). To the nearest 10 (or so) seconds is
+# fine for me.
+
+# Charge: 8p/min (peak time)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (monday..friday) between (8:00..17:59) use (0.016, 12)
+
+# Change: 4p/min (off-peak time)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (monday..friday) between (18:00..7:59) use (0.008, 12)
+
+# Charge: 3.3p/min (weekend rate)
+# Min Charge: 4.256p/call
+# Unit Time: per second
+#
+on (saturday..sunday) between () use (0.0055, 10)
diff --git a/kppp/Rules/United_Kingdom/British_OneTel.rst b/kppp/Rules/United_Kingdom/British_OneTel.rst
new file mode 100644
index 00000000..d8f39f21
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/British_OneTel.rst
@@ -0,0 +1,83 @@
+
+################################################################
+#
+# 6 Jan 2001
+#
+# I TAKE NO RESPONSIBILITY FOR THE VALIDITY AND ACCURACY OF
+# THIS INFORMATION, IF YOU ARE SO CONCERNED PLEASE CONTACT
+# YOUR OWN TELEPHONE PROVIDER AND CONFIGURE THIS YOURSELF.
+# AND DO NOT USE THIS FILE.
+#
+#
+# Alain Trembleau
+# <alain@platodesigns.com
+#
+# OneTel have a flat rate of 1p per minute at all times
+# British_OneTel
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=British_OneTel
+
+
+################################################################
+# currency settings
+################################################################
+
+# 1 pound sterling = 100 pence sterling
+#
+# British monetary format examples:
+#
+# ÂĢ1.57 = 1 pound and 57 pence.
+# 157p = 1 pound and 57 pence.
+#
+# defines GBP (Pound Sterling) to be used as currency symbol
+# (default = "$")
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (default is "2")
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per connection. If the costs of a phone call
+# are less than this value, this value is used instead.
+# I haven't checked this, but I believe that there is a minimum
+# cost per call of 5p.
+minimum_costs=0.05
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.01" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.01
+# Pounds Sterling are added to the bill"
+#
+# Considering it is a flat rate, that's all that's needed!
+default=(0.01, 60)
+
+################################################################
+# charge bands
+################################################################
+
+# No charge bands are needed since this uses a flat rate.
diff --git a/kppp/Rules/United_Kingdom/Connaught_Telecom.rst b/kppp/Rules/United_Kingdom/Connaught_Telecom.rst
new file mode 100644
index 00000000..bca78a54
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/Connaught_Telecom.rst
@@ -0,0 +1,100 @@
+################################################################
+#
+# Prices valid on 1st April 2001
+#
+# I am not responsible for the accuracy of this information. If
+# you know this file to be out of date or inaccurate, please
+# modify it.
+#
+# Jonathan Melhuish <jonathanmelhuish@email.com>
+#
+# Some comments copied from BT ruleset by Darryl L Miles
+# <dlm@g7led.demon.co.uk>
+#
+# This ruleset covers numbers covered by the Connaught Telecom
+# 'Internet' tarif - ie. 0845 numbers.
+#
+# All prices are *exclusive* of V.A.T.
+#
+################################################################
+
+
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Connaught_Connaught_Telecom
+
+
+################################################################
+# currency settings
+################################################################
+
+# 1 pound sterling = 100 pence sterling
+# 1 pence sterling is our lowest unit of coinage, but
+# I suspect telephone companys may remember the
+# fractions of pence for billing.
+#
+# Our monetry format:
+#
+# e.g. ÂĢ1.57 = 1 pound and 57 pence.
+# e.g. 157p = 1 pound and 57 pence.
+#
+# defines UKP (PoundSterling) to be used as currency
+# symbol (not absolutely needed, default = "$")
+currency_symbol=ÂĢ
+
+# Define the position of the currency symbol.
+# (not absolutely needed, default is "right")
+currency_position=left
+
+# Define the number of significat digits.
+# (not absolutely needed, default is "2"
+currency_digits=2
+
+
+################################################################
+# connection settings
+################################################################
+
+# NOTE: rules are applied from top to bottom - the
+# LAST matching rule is the one used for the
+# cost computations.
+
+# This is charged whenever you connect. If you don't have to
+# pay per-connection, use "0" here or comment it out.
+per_connection=0.0
+
+# minimum costs per per connection. If the costs of a phone
+# call are less than this value, this value is used instead
+minimum_costs=0.01
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.04" is the price of one
+# "unit", while "60" is the duration in seconds.
+# Therefore the following rule means: "Every 60 seconds 0.04
+# PoundsSterling are added to the bill"
+#
+# I've simply taken the worst case price for this, peak time
+# calls. Just in case I miss a period of time out.
+default=(0.04, 60)
+
+################################################################
+# charge bands
+################################################################
+
+# Charge: 3.3p/min (peak time)
+# Unit Time: per second
+#
+on (monday..friday) between (8:00..17:59) use (0.00055, 1)
+
+# Change: 1.7p/min (off-peak time)
+# Unit Time: per second
+#
+on (monday..friday) between (18:00..7:59) use (0.0002, 1)
+
+# Charge: 0.8p/min (weekend rate)
+# Unit Time: per second
+#
+on (saturday..sunday) between () use (0.0001, 1)
diff --git a/kppp/Rules/United_Kingdom/Makefile.am b/kppp/Rules/United_Kingdom/Makefile.am
new file mode 100644
index 00000000..7c69e97f
--- /dev/null
+++ b/kppp/Rules/United_Kingdom/Makefile.am
@@ -0,0 +1,12 @@
+pkg_DATA = BirminghamCable_Local.rst \
+ BirminghamCable_National.rst \
+ BirminghamCable_SameTelco.rst \
+ BritishTelecom_Local.rst \
+ BritishTelecom_National.rst \
+ BritishTelecom_Regional.rst \
+ British_OneTel.rst \
+ Connaught_Telecom.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/United_Kingdom
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Uruguay/Adinet_cIVA.rst b/kppp/Rules/Uruguay/Adinet_cIVA.rst
new file mode 100644
index 00000000..eb1a4a1a
--- /dev/null
+++ b/kppp/Rules/Uruguay/Adinet_cIVA.rst
@@ -0,0 +1,40 @@
+################################################################
+#
+# Disclaimer/License
+# This Template ist (c) by Mario Weilguni <mweilguni@kde.org>
+# It ist licenced under the same terms as the kppp package,
+# which it is part of
+#
+################################################################
+#
+# Cost rules for Adinet including VAT
+#
+# Otto Duarte
+# duvoel@adinet.com.uy
+################################################################
+
+################################################################
+name=Adinet_cIVA
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=$
+currency_position=right
+currency_digits=2
+
+################################################################
+default=(0.8612, 60)
+
+# tarifa reducida
+on (monday..friday) between (00:00..08:59) use (0.8612, 100)
+on (monday..friday) between (21:00..23:59) use (0.8612, 100)
+on (saturday..sunday) between (00:00..23:59) use (0.8612, 100)
+
+# feriados
+on (1/1) between (00:00..23:59) use (0.8612, 100)
+on (1/5) between (00:00..23:59) use (0.8612, 100)
+on (7/8) between (00:00..23:59) use (0.8612, 100)
+on (8/25) between (00:00..23:59) use (0.8612, 100)
+on (12/25) between (00:00..23:59) use (0.8612, 100)
diff --git a/kppp/Rules/Uruguay/Makefile.am b/kppp/Rules/Uruguay/Makefile.am
new file mode 100644
index 00000000..8c2b55cb
--- /dev/null
+++ b/kppp/Rules/Uruguay/Makefile.am
@@ -0,0 +1,5 @@
+pkg_DATA = Adinet_cIVA.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Uruguay
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/Yugoslavia/041_1xx_xxx.rst b/kppp/Rules/Yugoslavia/041_1xx_xxx.rst
new file mode 100644
index 00000000..cf59c819
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/041_1xx_xxx.rst
@@ -0,0 +1,64 @@
+################################################################
+# POSEBAN SAOBRACAJ
+# Telefonski brojevi sa negeografskim kodom (041)
+# sa prvom cifrom 9 (041 1xx xxx) tarifni interval je 1 sekunde
+# u jakom i 2 sekunde u slabom saobraæaju
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=041_1xx_xxx.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,1)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 1)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+# on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 2)
+on (monday..friday) between (15:00..17:00) use (0.3644, 2)
+on (monday..friday) between (21:00..23:59) use (0.3644, 2)
+on (saturday) between (21:00..23:59) use (0.3644, 2)
+on (sunday) between () use (0.3644, 2)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+#on (01/01, 02/01, 07/01, 27/03, 28/4, 01/05, 02/05) between () use (0.3644, 2)
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 2)
diff --git a/kppp/Rules/Yugoslavia/041_2xx_xxx.rst b/kppp/Rules/Yugoslavia/041_2xx_xxx.rst
new file mode 100644
index 00000000..8f70a537
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/041_2xx_xxx.rst
@@ -0,0 +1,63 @@
+################################################################
+# POSEBAN SAOBRACAJ
+# Telefonski brojevi sa negeografskim kodom (041)
+# sa prvom cifrom 9 (041 2xx xxx) tarifni interval je 1 sekunde
+# u jakom i 2 sekunde u slabom saobraæaju
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=041_2xx_xxx.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,1)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 1)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+# on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 2)
+on (monday..friday) between (15:00..17:00) use (0.3644, 2)
+on (monday..friday) between (21:00..23:59) use (0.3644, 2)
+on (saturday) between (21:00..23:59) use (0.3644, 2)
+on (sunday) between () use (0.3644, 2)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 2)
diff --git a/kppp/Rules/Yugoslavia/041_3xx_xxx.rst b/kppp/Rules/Yugoslavia/041_3xx_xxx.rst
new file mode 100644
index 00000000..7b1d60c0
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/041_3xx_xxx.rst
@@ -0,0 +1,63 @@
+################################################################
+# POSEBAN SAOBRACAJ
+# Telefonski brojevi sa negeografskim kodom (041)
+# sa prvom cifrom 9 (041 3xx xxx) tarifni interval je 2 sekunde
+# u jakom i 4 sekunde u slabom saobraæaju
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=041_3xx_xxx.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,2)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 2)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+# on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 4)
+on (monday..friday) between (15:00..17:00) use (0.3644, 4)
+on (monday..friday) between (21:00..23:59) use (0.3644, 4)
+on (saturday) between (21:00..23:59) use (0.3644, 4)
+on (sunday) between () use (0.3644, 4)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 4)
diff --git a/kppp/Rules/Yugoslavia/041_4xx_xxx.rst b/kppp/Rules/Yugoslavia/041_4xx_xxx.rst
new file mode 100644
index 00000000..0d776edc
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/041_4xx_xxx.rst
@@ -0,0 +1,63 @@
+################################################################
+# POSEBAN SAOBRACAJ
+# Telefonski brojevi sa negeografskim kodom (041)
+# sa prvom cifrom 9 (041 4xx xxx) tarifni interval je 3 sekunde
+# u jakom i 6 sekundi u slabom saobraæaju
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=041_4xx_xxx.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,3)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 3)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+# on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 6)
+on (monday..friday) between (15:00..17:00) use (0.3644, 6)
+on (monday..friday) between (21:00..23:59) use (0.3644, 6)
+on (saturday) between (21:00..23:59) use (0.3644, 6)
+on (sunday) between () use (0.3644, 6)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 6)
diff --git a/kppp/Rules/Yugoslavia/041_5xx_xxx.rst b/kppp/Rules/Yugoslavia/041_5xx_xxx.rst
new file mode 100644
index 00000000..180b38af
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/041_5xx_xxx.rst
@@ -0,0 +1,63 @@
+################################################################
+# POSEBAN SAOBRACAJ
+# Telefonski brojevi sa negeografskim kodom (041)
+# sa prvom cifrom 9 (041 5xx xxx) tarifni interval je 15 sekundi
+# u jakom i 30 sekundi u slabom saobraæaju
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=041_5xx_xxx.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,15)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 15)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+# on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 30)
+on (monday..friday) between (15:00..17:00) use (0.3644, 30)
+on (monday..friday) between (21:00..23:59) use (0.3644, 30)
+on (saturday) between (21:00..23:59) use (0.3644, 30)
+on (sunday) between () use (0.3644, 30)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 30)
diff --git a/kppp/Rules/Yugoslavia/041_9xx_xxx.rst b/kppp/Rules/Yugoslavia/041_9xx_xxx.rst
new file mode 100644
index 00000000..3ae93b40
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/041_9xx_xxx.rst
@@ -0,0 +1,63 @@
+################################################################
+# POSEBAN SAOBRACAJ
+# Telefonski brojevi sa negeografskim kodom (041)
+# sa prvom cifrom 9 (041 9xx xxx) tarifni interval je 8 sekundi
+# u jakom i 16 sekundi u slabom saobraæaju
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=041_9xx_xxx.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,8)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 8)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+# on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 16)
+on (monday..friday) between (15:00..17:00) use (0.3644, 16)
+on (monday..friday) between (21:00..23:59) use (0.3644, 16)
+on (saturday) between (21:00..23:59) use (0.3644, 16)
+on (sunday) between () use (0.3644, 16)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 16)
diff --git a/kppp/Rules/Yugoslavia/III_zona-preko_200km.rst b/kppp/Rules/Yugoslavia/III_zona-preko_200km.rst
new file mode 100644
index 00000000..b6fb0edb
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/III_zona-preko_200km.rst
@@ -0,0 +1,65 @@
+################################################################
+# III ZONA
+# Obuhvata telefonske razgovore izmeðu mreūnih grupa meðusobn
+# o udaljenih preko 200 km impulsni interval u jakom saobraæaju
+# je 8 sekundi, a u slabom 16 sekundi
+# Primer (za fizička lica): 1 minut u jakom saobraæaju:
+# 7,5 impulsa x 0,3644 = 2,73 din
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=III_zona-preko_200km.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,8)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 8)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 16)
+on (monday..friday) between (15:00..17:00) use (0.3644, 16)
+on (monday..friday) between (21:00..23:59) use (0.3644, 16)
+on (saturday) between (21:00..23:59) use (0.3644, 16)
+on (sunday) between () use (0.3644, 16)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 16)
diff --git a/kppp/Rules/Yugoslavia/II_zona-do_200km.rst b/kppp/Rules/Yugoslavia/II_zona-do_200km.rst
new file mode 100644
index 00000000..37f97ffe
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/II_zona-do_200km.rst
@@ -0,0 +1,65 @@
+################################################################
+# II ZONA
+# Obuhvata telefonske razgovore izmeðu mreūnih grupa meðusobno
+# udaljenih do 200 km impulsni interval u jakom saobraæaju je
+# 15 sekundi, a u slabom 15 sekundi.
+# Primer (za fizička lica): 1 minut u jakom saobraæaju:
+# 4 impulsa x 0,3644 = 1,46 din
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=II_zona-do_200km.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,15)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 15)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 30)
+on (monday..friday) between (15:00..17:00) use (0.3644, 30)
+on (monday..friday) between (21:00..23:59) use (0.3644, 30)
+on (saturday) between (21:00..23:59) use (0.3644, 30)
+on (sunday) between () use (0.3644, 30)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 30)
diff --git a/kppp/Rules/Yugoslavia/I_zona-ista_mreza.rst b/kppp/Rules/Yugoslavia/I_zona-ista_mreza.rst
new file mode 100644
index 00000000..cbb5e268
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/I_zona-ista_mreza.rst
@@ -0,0 +1,65 @@
+################################################################
+# I ZONA
+# Obuhvata telefonske razgovore u okviru iste mreūne grupe
+# impulsni interval u jakom saobraæaju je 30 sekundi, a u
+# slabom 60 sekundi.
+# Primer (za fizička lica): 1 minut u jakom saobraæaju: 2 impulsa
+# x 0,3644 = 0,73 din
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=I_zona-ista_mreza.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,30)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 30)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 60)
+on (monday..friday) between (15:00..17:00) use (0.3644, 60)
+on (monday..friday) between (21:00..23:59) use (0.3644, 60)
+on (saturday) between (21:00..23:59) use (0.3644, 60)
+on (sunday) between () use (0.3644, 60)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 60)
diff --git a/kppp/Rules/Yugoslavia/Lokalni_poziv.rst b/kppp/Rules/Yugoslavia/Lokalni_poziv.rst
new file mode 100644
index 00000000..858fd25c
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/Lokalni_poziv.rst
@@ -0,0 +1,80 @@
+################################################################
+# LOKALNI SAOBRACAJ
+# Obuhvata razgovore obavljene u okviru mesne mreūe.
+# Ovi razgovori tarifiraju se impulsnim intervalom od 2 minuta
+# u jakom saobraæaju i impulsnim intervalom od 4 minuta u period
+# u slabog saobraæaja.
+#
+# JAK SAOBRACAJ
+# Podrazumeva razgovore obavljene u vremenskom periodu
+# od 07-15 h i od 17-21 h
+#
+# SLAB SAOBRACAJ
+# * Podrazumeva razgovore obavljene u vremenskom periodu od
+# 15-17 h i od 21-07 h narednog dana
+# * Razgovore obavljene vikendom:
+# od subote u 21 h do ponedeljka do 07 h
+# * Razgovore obavljene u dane drūavnih praznika
+#
+# CENA IMPULSA
+# za fizička lica iznosi 0,3644 din
+# za pravna lica iznosi 0,6023 din.
+#
+################################################################
+#
+# NAME OF THE RULESET. This is NEEDED for accounting purposes.
+#
+################################################################
+name=Lokalni_poziv.rst
+
+################################################################
+# currency settings
+################################################################
+
+currency_symbol=DIN
+currency_position=right
+currency_digits=2
+
+################################################################
+# connection settings
+################################################################
+
+per_connection=0.0
+minimum_costs=0.0
+
+# You pay .74 for the first 180 secons ( 3minutes) no matter
+# whether you are connected for 1 second or 180 seconds.
+# This rule will take priority during the first 180 seconds
+# over any other rule, in particular the 'default' rule.
+# have a look at costgraphs.gif in the docs directory
+# of the kppp distribution for a graphic illustration.
+
+flat_init_costs=(0.3644,120)
+
+# This is the default rule which is used when no other rule
+# applies. The first component "0.1" is the price of one
+# "unit", while "72" is the duration in seconds.
+# Therefore the following rule means: "Every 72 seconds 0.1
+# ATS are added to the bill"
+
+default=(0.3644, 120)
+
+# more complicated rules:
+
+# "on monday until sunday from 12:00 am until 11:59 pm the costs
+# are 0.2 each 72 seconds"
+#on () between () use (0.2, 2)
+
+on (monday..friday) between (0:00..7:00) use (0.3644, 240)
+on (monday..friday) between (15:00..16:17) use (0.3644, 240)
+on (monday..friday) between (21:00..23:59) use (0.3644, 240)
+on (saturday) between (21:00..23:59) use (0.3644, 240)
+on (sunday) between () use (0.3644, 240)
+
+# Praznici
+# 1.1, 2.1 Nova Godina
+# 7.1. Bozic
+# 27.3. SRJ
+# 28.4. Srbija
+# 1.5, 2.5 Prvi Maj
+on (01.01, 02.01, 07.01, 27.03, 28.4, 01.05, 02.05) between () use (0.3644, 240)
diff --git a/kppp/Rules/Yugoslavia/Makefile.am b/kppp/Rules/Yugoslavia/Makefile.am
new file mode 100644
index 00000000..26f103fd
--- /dev/null
+++ b/kppp/Rules/Yugoslavia/Makefile.am
@@ -0,0 +1,8 @@
+pkg_DATA = 041_1xx_xxx.rst 041_5xx_xxx.rst II_zona-do_200km.rst \
+ 041_2xx_xxx.rst 041_9xx_xxx.rst I_zona-ista_mreza.rst \
+ 041_3xx_xxx.rst Lokalni_poziv.rst 041_4xx_xxx.rst \
+ III_zona-preko_200km.rst
+
+pkgdir = $(kde_datadir)/kppp/Rules/Yugoslavia
+
+EXTRA_DIST = $(pkg_DATA)
diff --git a/kppp/Rules/checkrules b/kppp/Rules/checkrules
new file mode 100755
index 00000000..9e695d5b
--- /dev/null
+++ b/kppp/Rules/checkrules
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+KPPP=`which kppp` || (echo "cannot find kppp"; exit 1)
+
+cd `dirname $0 2> /dev/null` || (echo "\"dirname\" required"; exit 1)
+
+FILESTOCHECK=`find -name "*.rst" -type f 2> /dev/null` || \
+ (echo "\"find\" required\""; exit 1)
+
+for i in ${FILESTOCHECK}
+do
+ echo -n "checking $i ..."
+ if ${KPPP} -r $i > /dev/null 2>&1
+ then
+ echo ok
+ else
+ echo "failed"
+ echo -n " "
+ ${KPPP} -r $i
+ #exit 1
+ fi
+done
+exit 0
+
diff --git a/kppp/TODO b/kppp/TODO
new file mode 100644
index 00000000..2fbad962
--- /dev/null
+++ b/kppp/TODO
@@ -0,0 +1,25 @@
+TODO
+====
+o modem-setup wizard
+o provider-setup wizard
+o Create an own dialer communicating with slots. This will allow non-X kpppīs
+o Separate GUI and non-GUI code in different classes
+o Enhance "Send" to allow special (control) characters
+o version detection of pppd fails on debian (rwsr-x---). Allow manual conf.
+
+Dropped
+=======
+o MS-CHAP support (since this relies on pppd, we cannot do it)
+o separate setup and dialer (very difficult, both parts would require to be
+ be SUID)
+
+Done
+====
+o signal catching for accounting
+o help users with those "pppd died unexpected..." bugs
+o CHAP support
+o All modem related code should be put in one class
+o replace "$" in config entries with "$$"
+o button for clearing volume accounting
+o better FAQ (itīs better now, still not perfect, and will never be)
+o deal with interfaces different from ppp0
diff --git a/kppp/accounting.cpp b/kppp/accounting.cpp
new file mode 100644
index 00000000..36751190
--- /dev/null
+++ b/kppp/accounting.cpp
@@ -0,0 +1,477 @@
+/* -*- C++ -*-
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file contributed by: Mario Weilguni, <mweilguni@sime.com>
+ * Thanks Mario!
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <qdir.h>
+
+#include <kstandarddirs.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <time.h>
+
+#include "accounting.h"
+#include "pppdata.h"
+#include "pppstats.h"
+
+// defines the maximum duration until the current costs
+// are saved again (to prevent loss due to "kill")
+// specifying -1 disables the features
+#define UPDATE_TIME (5*60*1000)
+
+extern PPPData gpppdata;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Helper functions
+//
+/////////////////////////////////////////////////////////////////////////////
+static QString timet2qstring(time_t t) {
+ QString s;
+
+ s.sprintf("%lu", t);
+ return s;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// The base class for the accounting system provides a base set of usefull
+// and common functions, but does not do any accounting by itself. The
+// accounting is accomplished withing it's derived classes
+//
+/////////////////////////////////////////////////////////////////////////////
+AccountingBase::AccountingBase(QObject *parent) :
+ QObject(parent),
+ _total(0),
+ _session(0)
+{
+ QDate dt = QDate::currentDate();
+ LogFileName = QString("%1-%2.log")
+ .arg(QDate::shortMonthName(dt.month()))
+ .arg(dt.year(), 4);
+
+ LogFileName = KGlobal::dirs()->saveLocation("appdata", "Log")
+ + "/" + LogFileName;
+
+ kdDebug(5002) << "LogFileName: " << LogFileName << endl;
+}
+
+AccountingBase::~AccountingBase() {
+ if(running())
+ slotStop();
+}
+
+
+double AccountingBase::total() const {
+ return _total + _session;
+}
+
+
+
+double AccountingBase::session() const {
+ return _session;
+}
+
+
+// set costs back to zero ( typically once per month)
+void AccountingBase::resetCosts(const QString & accountname){
+ QString prev_account = gpppdata.accname();
+
+ gpppdata.setAccount(accountname);
+ gpppdata.setTotalCosts("");
+
+ gpppdata.setAccount(prev_account);
+}
+
+
+void AccountingBase::resetVolume(const QString & accountname){
+ QString prev_account = gpppdata.accname();
+
+ gpppdata.setAccount(accountname);
+ gpppdata.setTotalBytes(0);
+
+ gpppdata.setAccount(prev_account);
+}
+
+
+void AccountingBase::logMessage(QString s, bool newline) {
+ int old_umask = umask(0077);
+
+ QFile f(LogFileName);
+
+ bool result = f.open(IO_ReadWrite);
+ if(result) {
+ // move to eof, and place \n if necessary
+ if(f.size() > 0) {
+ if(newline) {
+ f.at(f.size());
+ char c = 0;
+ f.readBlock(&c, 1);
+ if(c != '\n')
+ f.writeBlock("\n", 1);
+ } else
+ f.at(f.size());
+ }
+
+ QCString tmp = s.local8Bit();
+ f.writeBlock(tmp, tmp.length());
+ f.close();
+ }
+
+ // restore umask
+ umask(old_umask);
+}
+
+
+QString AccountingBase::getCosts(const QString & accountname) {
+ QString prev_account = gpppdata.accname();
+
+ gpppdata.setAccount(accountname);
+ QString val = gpppdata.totalCosts();
+ // ### currency from rule file
+ // QString val = KGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency);
+
+ gpppdata.setAccount(prev_account);
+
+ return val;
+}
+
+
+
+bool AccountingBase::saveCosts() {
+ if(!_name.isNull() && _name.length() > 0) {
+ QString val;
+ val.setNum(total());
+
+ gpppdata.setTotalCosts(val);
+ gpppdata.save();
+
+ return TRUE;
+ } else
+ return FALSE;
+}
+
+
+bool AccountingBase::loadCosts() {
+ QString val = gpppdata.totalCosts();
+
+ if(val.isNull()) // QString will segfault if isnull and toDouble called
+ _total = 0.0;
+ else {
+ bool ok;
+ _total = val.toDouble(&ok);
+ if(!ok)
+ _total = 0.0;
+ }
+
+ return TRUE;
+}
+
+
+QString AccountingBase::getAccountingFile(const QString &accountname) {
+ QString f = "kppp/Rules/";
+ f += accountname;
+ QString d = locate("data", f);
+
+ if(d.isNull())
+ return "";
+ else
+ return d;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accounting class for ruleset files
+//
+/////////////////////////////////////////////////////////////////////////////
+Accounting::Accounting(QObject *parent, PPPStats *st) :
+ AccountingBase(parent),
+ acct_timer_id(0),
+ update_timer_id(0),
+ stats(st)
+{
+}
+
+
+bool Accounting::running() const {
+ return (bool)(acct_timer_id != 0);
+}
+
+
+void Accounting::timerEvent(QTimerEvent *t) {
+ if(t->timerId() == acct_timer_id) {
+
+ double newCosts;
+ double newLen;
+ double connect_time = difftime(time(0), start_time);
+
+ rules.getActiveRule(QDateTime::currentDateTime(), connect_time, newCosts, newLen);
+ if(newLen < 1) { // changed to < 1
+ slotStop();
+ return; // no default rule found
+ }
+
+ // check if we have a new rule. If yes,
+ // kill the timer and restart it with new
+ // duration
+ if((newCosts != _lastcosts) || (newLen != _lastlen)) {
+
+ kdDebug(5002).form("SWITCHING RULES, new costs = %0.2f, new len = %0.2f\n",
+ newCosts, newLen);
+
+ killTimer(acct_timer_id);
+ if(newLen > 0)
+ acct_timer_id = startTimer((int)(newLen * 1000.0));
+
+ _lastlen = newLen;
+ _lastcosts = newCosts;
+ }
+
+ // emit changed() signal if necessary
+ if(newCosts != 0) {
+ _session += newCosts;
+ emit changed(rules.currencyString(total()),
+ rules.currencyString(session()));
+
+
+ }
+ } // if(t->timerId() == acct_timer_id)...
+
+ if(t->timerId() == update_timer_id) {
+ // just to be sure, save the current costs
+ // every n seconds (see UPDATE_TIME)
+ saveCosts();
+ }
+}
+
+
+void Accounting::slotStart() {
+ if(!running()) {
+ loadCosts();
+ _lastcosts = 0.0;
+ _lastlen = 0.0;
+ _session = rules.perConnectionCosts();
+ rules.setStartTime(QDateTime::currentDateTime());
+ acct_timer_id = startTimer(1);
+ if(UPDATE_TIME > 0)
+ update_timer_id = startTimer(UPDATE_TIME);
+
+ start_time = time(0);
+ QString s;
+ s = timet2qstring(start_time);
+ s += ":";
+ s += gpppdata.accname();
+ s += ":";
+ s += rules.currencySymbol();
+
+ logMessage(s, TRUE);
+ }
+}
+
+
+void Accounting::slotStop() {
+ if(running()) {
+ killTimer(acct_timer_id);
+ if(update_timer_id != 0)
+ killTimer(update_timer_id);
+ acct_timer_id = 0;
+ update_timer_id = 0;
+
+ QString s;
+ s.sprintf(":%s:%0.4e:%0.4e:%u:%u\n",
+ timet2qstring(time(0)).utf8().data(),
+ session(),
+ total(),
+ stats->ibytes,
+ stats->obytes);
+
+ logMessage(s, FALSE);
+ saveCosts();
+ }
+}
+
+
+bool Accounting::loadRuleSet(const QString & name) {
+
+ if (name.isEmpty()) {
+ rules.load(""); // delete old rules
+ return TRUE;
+ }
+
+ QString d = AccountingBase::getAccountingFile(name);
+
+ QFileInfo fg(d);
+ if(fg.exists()) {
+ int ret = rules.load(d);
+ _name = rules.name();
+ return (bool)(ret == 0);
+ }
+
+ return FALSE;
+}
+
+
+double Accounting::total() const {
+ if(rules.minimumCosts() <= _session)
+ return _total + _session;
+ else
+ return _total + rules.minimumCosts();
+}
+
+
+
+double Accounting::session() const {
+ if(rules.minimumCosts() <= _session)
+ return _session;
+ else
+ return rules.minimumCosts();
+}
+
+
+
+
+ExecutableAccounting::ExecutableAccounting(PPPStats *st, QObject *parent) :
+ AccountingBase(parent),
+ proc(0),
+ stats(st)
+{
+}
+
+
+bool ExecutableAccounting::running() const {
+ return (proc != 0) || proc->isRunning();
+}
+
+
+bool ExecutableAccounting::loadRuleSet(const QString &) {
+ QString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ return (access(QFile::encodeName(s), X_OK) == 0);
+}
+
+
+void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*buflen*/) {
+ QString field[8];
+ int nFields = 0;
+ int pos, last_pos = 0;
+
+ // split string
+ QString b(buffer);
+ pos = b.find(':');
+ while(pos != -1 && nFields < 8) {
+ field[nFields++] = b.mid(last_pos, pos-last_pos);
+ last_pos = pos+1;
+ pos = b.find(':', last_pos);
+ }
+
+ for(int i = 0; i < nFields;i++)
+ fprintf(stderr, "FIELD[%d] = %s\n", i, field[i].local8Bit().data());
+
+ QString __total, __session;
+ QString s(buffer);
+ int del1, del2, del3;
+
+ del1 = s.find(':');
+ del2 = s.find(':', del1+1);
+ del3 = s.find(':', del2+1);
+ if(del1 == -1 || del2 == -1 || del3 == -1) {
+ // TODO: do something usefull here
+ return;
+ }
+
+ provider = s.left(del1);
+ currency = s.mid(del1, del2-del1);
+ __total = s.mid(del2, del2-del1);
+ __session = s.mid(del3, s.length()-del3+1);
+
+ bool ok1, ok2;
+ _total = __total.toDouble(&ok1);
+ _session = __session.toDouble(&ok2);
+
+ if(!ok1 || !ok2) {
+ // TODO: do something usefull here
+ return;
+ }
+
+ printf("PROVIDER=%s, CURRENCY=%s, TOTAL=%0.3e, SESSION=%0.3e\n",
+ provider.local8Bit().data(),
+ currency.local8Bit().data(),
+ _total,
+ _session);
+}
+
+
+void ExecutableAccounting::slotStart() {
+ if(proc != 0)
+ slotStop(); // just to make sure
+
+ loadCosts();
+ QString s = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ proc = new KProcess;
+
+ QString s_total;
+ s_total.sprintf("%0.8f", total());
+ *proc << s << s_total;
+ connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)),
+ this, SLOT(gotData(KProcess *, char *, int)));
+ proc->start();
+
+ time_t start_time = time(0);
+ s = timet2qstring(start_time);
+ s += ":";
+ s += gpppdata.accname();
+ s += ":";
+ s += currency;
+
+ logMessage(s, TRUE);
+}
+
+
+void ExecutableAccounting::slotStop() {
+ if(proc != 0) {
+ proc->kill();
+ delete proc;
+ proc = 0;
+
+ QString s;
+ s.sprintf(":%s:%0.4e:%0.4e:%u:%u\n",
+ timet2qstring(time(0)).local8Bit().data(),
+ session(),
+ total(),
+ stats->ibytes,
+ stats->obytes);
+
+ logMessage(s, FALSE);
+ saveCosts();
+ }
+}
+
+#include "accounting.moc"
+
diff --git a/kppp/accounting.h b/kppp/accounting.h
new file mode 100644
index 00000000..2d3a299c
--- /dev/null
+++ b/kppp/accounting.h
@@ -0,0 +1,144 @@
+/* -*- C++ -*-
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ * This file contributed by: Mario Weilguni, <mweilguni@sime.com>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __ACCOUNTING__H__
+#define __ACCOUNTING__H__
+
+#include <qobject.h>
+#include <kprocess.h>
+#include "ruleset.h"
+
+class PPPStats;
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accounting base class
+//
+/////////////////////////////////////////////////////////////////////////////
+class AccountingBase : public QObject {
+ Q_OBJECT
+public:
+ AccountingBase(QObject *parent);
+ virtual ~AccountingBase();
+
+ virtual double total() const;
+ virtual double session() const;
+
+ virtual bool running() const { return false; };
+ virtual bool loadRuleSet(const QString & name) = 0;
+
+public slots:
+ virtual void slotStart() {};
+ virtual void slotStop() {};
+
+signals:
+ void changed(QString total, QString session);
+
+protected:
+ void logMessage(QString, bool = FALSE);
+ bool saveCosts();
+ bool loadCosts();
+
+ QString LogFileName;
+ double _total, _session;
+ QString _name;
+
+ // static members
+public:
+ static void resetCosts(const QString & accountname);
+ static void resetVolume(const QString & accountname);
+ static QString getCosts(const QString & accountname);
+ static QString getAccountingFile(const QString &accountname);
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accounting based on ruleset files
+//
+/////////////////////////////////////////////////////////////////////////////
+class Accounting : public AccountingBase {
+ Q_OBJECT
+public:
+ Accounting(QObject *parent, PPPStats *st);
+
+ virtual double total() const;
+ virtual double session() const;
+
+ virtual bool loadRuleSet(const QString & name);
+ virtual bool running() const;
+
+private:
+ virtual void timerEvent(QTimerEvent *t);
+
+public slots:
+ virtual void slotStart();
+ virtual void slotStop();
+
+signals:
+ void changed(QString total, QString session);
+
+private:
+ int acct_timer_id;
+ int update_timer_id;
+ time_t start_time;
+ double _lastcosts;
+ double _lastlen;
+ RuleSet rules;
+ PPPStats *stats;
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accounting based on executable files
+//
+/////////////////////////////////////////////////////////////////////////////
+class ExecutableAccounting : public AccountingBase {
+ Q_OBJECT
+public:
+ ExecutableAccounting(PPPStats *st, QObject *parent = 0);
+
+ virtual bool loadRuleSet(const QString & );
+ virtual bool running() const;
+
+public slots:
+ virtual void slotStart();
+ virtual void slotStop();
+
+private slots:
+ void gotData(KProcess *proc, char *buffer, int buflen);
+
+signals:
+ void changed(QString total, QString session);
+
+private:
+ KProcess *proc;
+ QString currency;
+ QString provider;
+ PPPStats *stats;
+};
+
+#endif
diff --git a/kppp/accounts.cpp b/kppp/accounts.cpp
new file mode 100644
index 00000000..be5a5996
--- /dev/null
+++ b/kppp/accounts.cpp
@@ -0,0 +1,484 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <qdir.h>
+#include <stdlib.h>
+#include <qlayout.h>
+#include <qtabdialog.h>
+#include <qwhatsthis.h>
+#include <qmessagebox.h>
+
+#include <kapplication.h>
+#include <kbuttonbox.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <kwin.h>
+#include <kdialogbase.h>
+#include <kstdguiitem.h>
+#include <qvgroupbox.h>
+
+#include <errno.h>
+
+#include "pppdata.h"
+#include "accounts.h"
+#include "accounting.h"
+#include "providerdb.h"
+#include "edit.h"
+
+void parseargs(char* buf, char** args);
+
+AccountWidget::AccountWidget( QWidget *parent, const char *name )
+ : QWidget( parent, name )
+{
+ int min = 0;
+ QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
+
+ // add a hbox
+ QHBoxLayout *l11 = new QHBoxLayout;
+ l1->addLayout(l11);
+
+ accountlist_l = new QListBox(parent);
+ accountlist_l->setMinimumSize(160, 128);
+ connect(accountlist_l, SIGNAL(highlighted(int)),
+ this, SLOT(slotListBoxSelect(int)));
+ connect(accountlist_l, SIGNAL(selected(int)),
+ this, SLOT(editaccount()));
+ l11->addWidget(accountlist_l, 10);
+
+ QVBoxLayout *l111 = new QVBoxLayout;
+ l11->addLayout(l111, 1);
+ edit_b = new QPushButton(i18n("&Edit..."), parent);
+ connect(edit_b, SIGNAL(clicked()), SLOT(editaccount()));
+ QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
+
+ min = edit_b->sizeHint().width();
+ min = QMAX(70,min);
+ edit_b->setMinimumWidth(min);
+
+ l111->addWidget(edit_b);
+
+ new_b = new QPushButton(i18n("&New..."), parent);
+ connect(new_b, SIGNAL(clicked()), SLOT(newaccount()));
+ l111->addWidget(new_b);
+ QWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
+ "to the Internet"));
+
+ copy_b = new QPushButton(i18n("Co&py"), parent);
+ connect(copy_b, SIGNAL(clicked()), SLOT(copyaccount()));
+ l111->addWidget(copy_b);
+ QWhatsThis::add(copy_b,
+ i18n("Makes a copy of the selected account. All\n"
+ "settings of the selected account are copied\n"
+ "to a new account that you can modify to fit your\n"
+ "needs"));
+
+ delete_b = new QPushButton(i18n("De&lete"), parent);
+ connect(delete_b, SIGNAL(clicked()), SLOT(deleteaccount()));
+ l111->addWidget(delete_b);
+ QWhatsThis::add(delete_b,
+ i18n("<p>Deletes the selected account\n\n"
+ "<font color=\"red\"><b>Use with care!</b></font>"));
+
+ QHBoxLayout *l12 = new QHBoxLayout;
+ l1->addStretch(1);
+ l1->addLayout(l12);
+
+ QVBoxLayout *l121 = new QVBoxLayout;
+ l12->addLayout(l121);
+ l121->addStretch(1);
+ costlabel = new QLabel(i18n("Phone costs:"), parent);
+ costlabel->setEnabled(FALSE);
+ l121->addWidget(costlabel);
+
+ costedit = new QLineEdit(parent);
+ costedit->setFocusPolicy(QWidget::NoFocus);
+ costedit->setFixedHeight(costedit->sizeHint().height());
+ costedit->setEnabled(FALSE);
+ l121->addWidget(costedit);
+ l121->addStretch(1);
+ QString tmp = i18n("<p>This shows the accumulated phone costs\n"
+ "for the selected account.\n"
+ "\n"
+ "<b>Important</b>: If you have more than one \n"
+ "account - beware, this is <b>NOT</b> the sum \n"
+ "of the phone costs of all your accounts!");
+ QWhatsThis::add(costlabel, tmp);
+ QWhatsThis::add(costedit, tmp);
+
+ vollabel = new QLabel(i18n("Volume:"), parent);
+ vollabel->setEnabled(FALSE);
+ l121->addWidget(vollabel);
+
+ voledit = new QLineEdit(parent,"voledit");
+ voledit->setFocusPolicy(QWidget::NoFocus);
+ voledit->setFixedHeight(voledit->sizeHint().height());
+ voledit->setEnabled(FALSE);
+ l121->addWidget(voledit);
+ tmp = i18n("<p>This shows the number of bytes transferred\n"
+ "for the selected account (not for all of your\n"
+ "accounts. You can select what to display in\n"
+ "the accounting dialog.\n"
+ "\n"
+ "<a href=\"#volaccounting\">More on volume accounting</a>");
+
+ QWhatsThis::add(vollabel,tmp);
+ QWhatsThis::add(voledit, tmp);
+
+ QVBoxLayout *l122 = new QVBoxLayout;
+ l12->addStretch(1);
+ l12->addLayout(l122);
+
+ l122->addStretch(1);
+ reset = new QPushButton(i18n("&Reset..."), parent);
+ reset->setEnabled(FALSE);
+ connect(reset, SIGNAL(clicked()),
+ this, SLOT(resetClicked()));
+ l122->addWidget(reset);
+
+ log = new QPushButton(i18n("&View Logs"), parent);
+ connect(log, SIGNAL(clicked()),
+ this, SLOT(viewLogClicked()));
+ l122->addWidget(log);
+ l122->addStretch(1);
+
+ //load up account list from gppdata to the list box
+ if(gpppdata.accountCount() > 0) {
+ for(int i=0; i <= gpppdata.accountCount()-1; i++) {
+ gpppdata.setAccountByIndex(i);
+ accountlist_l->insertItem(gpppdata.accname());
+ }
+ }
+
+ slotListBoxSelect(accountlist_l->currentItem());
+
+ l1->activate();
+}
+
+
+
+void AccountWidget::slotListBoxSelect(int idx) {
+ delete_b->setEnabled((bool)(idx != -1));
+ edit_b->setEnabled((bool)(idx != -1));
+ copy_b->setEnabled((bool)(idx != -1));
+ if(idx!=-1) {
+ QString account = gpppdata.accname();
+ gpppdata.setAccountByIndex(accountlist_l->currentItem());
+ reset->setEnabled(TRUE);
+ costlabel->setEnabled(TRUE);
+ costedit->setEnabled(TRUE);
+ costedit->setText(AccountingBase::getCosts(accountlist_l->text(accountlist_l->currentItem())));
+
+ vollabel->setEnabled(TRUE);
+ voledit->setEnabled(TRUE);
+ int bytes = gpppdata.totalBytes();
+ voledit->setText(prettyPrintVolume(bytes));
+ gpppdata.setAccount(account);
+ } else{
+ reset->setEnabled(FALSE);
+ costlabel->setEnabled(FALSE);
+ costedit->setText("");
+ costedit->setEnabled(FALSE);
+ vollabel->setEnabled(FALSE);
+ voledit->setText("");
+ voledit->setEnabled(FALSE);
+ }
+}
+
+
+void AccountWidget::viewLogClicked(){
+
+ QApplication::flushX();
+ if(fork() == 0) {
+ if (setgid(getgid()) < 0 && errno != EPERM)
+ _exit(2);
+ setuid(getuid());
+ if( geteuid() != getuid() )
+ _exit(1);
+ // TODO: use execvp
+ system("kppplogview -kppp");
+ _exit(0);
+ }
+}
+
+
+void AccountWidget::resetClicked(){
+ if(accountlist_l->currentItem() == -1)
+ return;
+
+ QueryReset dlg(this);
+ int what = dlg.exec();
+
+ if((what & QueryReset::COSTS)) {
+ emit resetCosts(accountlist_l->text(accountlist_l->currentItem()));
+ costedit->setText("0");
+ }
+
+ if((what & QueryReset::VOLUME)) {
+ emit resetVolume(accountlist_l->text(accountlist_l->currentItem()));
+ voledit->setText(prettyPrintVolume(0));
+ }
+}
+
+
+void AccountWidget::editaccount() {
+ gpppdata.setAccount(accountlist_l->text(accountlist_l->currentItem()));
+
+ int result = doTab();
+
+ if(result == QDialog::Accepted) {
+ accountlist_l->changeItem(gpppdata.accname(),accountlist_l->currentItem());
+ emit resetaccounts();
+ gpppdata.save();
+ }
+}
+
+
+void AccountWidget::newaccount() {
+ if(accountlist_l->count() == MAX_ACCOUNTS) {
+ KMessageBox::sorry(this, i18n("Maximum number of accounts reached."));
+ return;
+ }
+
+ int result;
+ int query = KMessageBox::questionYesNoCancel(this,
+ i18n("Do you want to use the wizard to create the new account or the "
+ "standard, dialog-based setup?\n"
+ "The wizard is easier and sufficient in most cases. If you need "
+ "very special settings, you might want to try the standard, "
+ "dialog-based setup."),
+ i18n("Create New Account"),
+ i18n("&Wizard"), i18n("&Manual Setup"));
+
+ switch(query) {
+ case KMessageBox::Yes:
+ {
+ if (gpppdata.newaccount() == -1)
+ return;
+ ProviderDB pdb(this);
+ result = pdb.exec();
+ break;
+ }
+ case KMessageBox::No:
+ if (gpppdata.newaccount() == -1)
+ return;
+ result = doTab();
+ break;
+ default:
+ return;
+ }
+
+ if(result == QDialog::Accepted) {
+ accountlist_l->insertItem(gpppdata.accname());
+ accountlist_l->setSelected(accountlist_l->findItem(gpppdata.accname()),
+ true);
+ emit resetaccounts();
+ gpppdata.save();
+ } else
+ gpppdata.deleteAccount();
+}
+
+
+void AccountWidget::copyaccount() {
+ if(accountlist_l->count() == MAX_ACCOUNTS) {
+ KMessageBox::sorry(this, i18n("Maximum number of accounts reached."));
+ return;
+ }
+
+ if(accountlist_l->currentItem()<0) {
+ KMessageBox::sorry(this, i18n("No account selected."));
+ return;
+ }
+
+ gpppdata.copyaccount(accountlist_l->currentItem());
+
+ accountlist_l->insertItem(gpppdata.accname());
+ emit resetaccounts();
+ gpppdata.save();
+}
+
+
+void AccountWidget::deleteaccount() {
+
+ QString s = i18n("Are you sure you want to delete\nthe account \"%1\"?")
+ .arg(accountlist_l->text(accountlist_l->currentItem()));
+
+ if(KMessageBox::warningYesNo(this, s, i18n("Confirm"), KGuiItem(i18n("Delete"), "editdelete"), KStdGuiItem::cancel()) != KMessageBox::Yes)
+ return;
+
+ if(gpppdata.deleteAccount(accountlist_l->text(accountlist_l->currentItem())))
+ accountlist_l->removeItem(accountlist_l->currentItem());
+
+ emit resetaccounts();
+ gpppdata.save();
+
+ slotListBoxSelect(accountlist_l->currentItem());
+
+}
+
+
+int AccountWidget::doTab(){
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null,
+ KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
+ 0, 0, true);
+ KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
+ bool isnewaccount;
+
+ if(gpppdata.accname().isEmpty()) {
+ tabWindow->setCaption(i18n("New Account"));
+ isnewaccount = true;
+ } else {
+ QString tit = i18n("Edit Account: ");
+ tit += gpppdata.accname();
+ tabWindow->setCaption(tit);
+ isnewaccount = false;
+ }
+
+ dial_w = new DialWidget(tabWindow->addPage(i18n("Dial"), i18n("Dial Setup")), isnewaccount);
+ ip_w = new IPWidget(tabWindow->addPage(i18n("IP"), i18n("IP Setup")), isnewaccount);
+ gateway_w = new GatewayWidget(tabWindow->addPage(i18n("Gateway"), i18n("Gateway Setup")), isnewaccount);
+ dns_w = new DNSWidget(tabWindow->addPage(i18n("DNS"), i18n("DNS Servers")), isnewaccount);
+ script_w = new ScriptWidget(tabWindow->addPage(i18n("Login Script"), i18n("Edit Login Script")), isnewaccount);
+ ExecWidget *exec_w = new ExecWidget(tabWindow->addPage(i18n("Execute"), i18n("Execute Programs")), isnewaccount);
+ acct = new AccountingSelector(tabWindow->addPage(i18n("Accounting")), isnewaccount);
+
+ int result = 0;
+ bool ok = false;
+ while (!ok){
+
+ result = tabWindow->exec();
+ ok = true;
+
+ if(result == QDialog::Accepted) {
+ if (script_w->check()) {
+ if(dial_w->save()) {
+ ip_w->save();
+ dns_w->save();
+ gateway_w->save();
+ script_w->save();
+ exec_w->save();
+ acct->save();
+ } else {
+ // ### add: "and valid"
+ KMessageBox::error(this, i18n( "You must enter a unique\n"
+ "account name"));
+ ok = false;
+ }
+ } else {
+ KMessageBox::error(this, i18n("Login script has unbalanced "
+ "loop Start/End"));
+ ok = false;
+ }
+ }
+ }
+
+ delete tabWindow;
+ return result;
+}
+
+
+QString AccountWidget::prettyPrintVolume(unsigned int n) {
+ int idx = 0;
+ const QString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), QString::null};
+
+ float n1 = n;
+ while(n >= 1024 && !quant[idx].isNull()) {
+ idx++;
+ n /= 1024;
+ }
+
+ int i = idx;
+ while(i--)
+ n1 = n1 / 1024.0;
+
+ QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ s += " " + quant[idx];
+ return s;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Queries the user what to reset: costs, volume or both
+//
+/////////////////////////////////////////////////////////////////////////////
+QueryReset::QueryReset(QWidget *parent) : QDialog(parent, 0, true) {
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+ setCaption(i18n("Reset Accounting"));
+
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ QVGroupBox *f = new QVGroupBox(i18n("What to Reset"), this);
+
+ QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
+ costs = new QCheckBox(i18n("Reset the accumulated p&hone costs"), f);
+ costs->setChecked(true);
+ l1->addWidget(costs);
+ QWhatsThis::add(costs, i18n("Check this to set the phone costs\n"
+ "to zero. Typically you will want to\n"
+ "do this once a month."));
+
+ volume = new QCheckBox(i18n("Reset &volume accounting"), f);
+ volume->setChecked(true);
+ l1->addWidget(volume);
+ QWhatsThis::add(volume, i18n("Check this to set the volume accounting\n"
+ "to zero. Typically you will want to do this\n"
+ "once a month."));
+
+ l1->activate();
+
+ // this activates the f-layout and sets minimumSize()
+ f->show();
+
+ tl->addWidget(f);
+
+ KButtonBox *bbox = new KButtonBox(this);
+ bbox->addStretch(1);
+ QPushButton *ok = bbox->addButton(KStdGuiItem::ok());
+ ok->setDefault(true);
+ QPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
+
+ connect(ok, SIGNAL(clicked()),
+ this, SLOT(accepted()));
+ connect(cancel, SIGNAL(clicked()),
+ this, SLOT(reject()));
+
+ bbox->layout();
+ tl->addWidget(bbox);
+
+ // TODO: activate if KGroupBox is fixed
+ // setFixedSize(sizeHint());
+}
+
+
+void QueryReset::accepted() {
+ int result = costs->isChecked() ? COSTS : 0;
+ result += volume->isChecked() ? VOLUME : 0;
+
+ done(result);
+}
+
+#include "accounts.moc"
diff --git a/kppp/accounts.h b/kppp/accounts.h
new file mode 100644
index 00000000..fe290f85
--- /dev/null
+++ b/kppp/accounts.h
@@ -0,0 +1,109 @@
+/* -*- C++ -*-
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _ACCOUNTS_H_
+#define _ACCOUNTS_H_
+
+#include <qwidget.h>
+#include <qpushbutton.h>
+#include <qlistbox.h>
+#include "acctselect.h"
+
+class KDialogBase;
+class QCheckBox;
+class QLineEdit;
+class QTabDialog;
+class DialWidget;
+class ScriptWidget;
+class IPWidget;
+class DNSWidget;
+class GatewayWidget;
+
+class AccountWidget : public QWidget {
+ Q_OBJECT
+public:
+ AccountWidget( QWidget *parent=0, const char *name=0 );
+ ~AccountWidget() {}
+
+private slots:
+ void editaccount();
+ void copyaccount();
+ void newaccount();
+ void deleteaccount();
+ void slotListBoxSelect(int);
+ void resetClicked();
+ void viewLogClicked();
+
+private:
+ int doTab();
+
+signals:
+ void resetaccounts();
+ void resetCosts(const QString &);
+ void resetVolume(const QString &);
+
+private:
+ QString prettyPrintVolume(unsigned int);
+
+ KDialogBase *tabWindow;
+ DialWidget *dial_w;
+ AccountingSelector *acct;
+ IPWidget *ip_w;
+ DNSWidget *dns_w;
+ GatewayWidget *gateway_w;
+ ScriptWidget *script_w;
+
+ QPushButton *reset;
+ QPushButton *log;
+ QLabel *costlabel;
+ QLineEdit *costedit;
+ QLabel *vollabel;
+ QLineEdit *voledit;
+
+ QListBox *accountlist_l;
+ QPushButton *edit_b;
+ QPushButton *copy_b;
+ QPushButton *new_b;
+ QPushButton *delete_b;
+};
+
+
+class QueryReset : public QDialog {
+ Q_OBJECT
+public:
+ QueryReset(QWidget *parent);
+
+ enum {COSTS=1, VOLUME=2};
+
+private slots:
+ void accepted();
+
+private:
+ QCheckBox *costs, *volume;
+};
+
+#endif
+
diff --git a/kppp/acctselect.cpp b/kppp/acctselect.cpp
new file mode 100644
index 00000000..4fa16605
--- /dev/null
+++ b/kppp/acctselect.cpp
@@ -0,0 +1,330 @@
+//---------------------------------------------------------------------------
+//
+// kPPP: A pppd front end for the KDE project
+//
+//---------------------------------------------------------------------------
+//
+// (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+// (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+// (c) 1998-1999 Harri Porten <porten@kde.org>
+//
+// derived from Jay Painters "ezppp"
+//
+//---------------------------------------------------------------------------
+//
+// $Id$
+//
+//---------------------------------------------------------------------------
+//
+// This program is free software; you can redistribute it and-or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//---------------------------------------------------------------------------
+
+
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <kurllabel.h>
+#include <qlayout.h>
+#include <qlistview.h>
+#include <qdir.h>
+#include <qregexp.h>
+#include <qwmatrix.h>
+#include <qcheckbox.h>
+#include <kdialog.h>
+#include <kstandarddirs.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <krun.h>
+
+#include "acctselect.h"
+#include "pppdata.h"
+
+
+AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, const char *name)
+ : QWidget(parent, name),
+ isnewaccount(_isnewaccount)
+{
+ QVBoxLayout *l1 = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+
+ enable_accounting = new QCheckBox(i18n("&Enable accounting"), parent);
+ l1->addWidget(enable_accounting, 1);
+ connect(enable_accounting, SIGNAL(toggled(bool)), this, SLOT(enableItems(bool)));
+
+ // insert the tree widget
+ tl = new QListView(parent, "treewidget");
+
+ connect(tl, SIGNAL(selectionChanged(QListViewItem*)), this,
+ SLOT(slotSelectionChanged(QListViewItem*)));
+ tl->setMinimumSize(220, 200);
+ l1->addWidget(tl, 1);
+
+ KURLLabel *up = new KURLLabel(parent);
+ up->setText(i18n("Check for rule updates"));
+ up->setURL("http://developer.kde.org/~kppp/rules.html");
+ connect(up, SIGNAL(leftClickedURL(const QString&)), SLOT(openURL(const QString&)));
+
+ l1->addWidget(up, 1);
+
+ // label to display the currently selected ruleset
+ QHBoxLayout *l11 = new QHBoxLayout;
+ l1->addSpacing(10);
+ l1->addLayout(l11);
+ QLabel *lsel = new QLabel(i18n("Selected:"), parent);
+ selected = new QLabel(parent);
+ selected->setFrameStyle(QFrame::Sunken | QFrame::WinPanel);
+ selected->setLineWidth(1);
+ selected->setFixedHeight(selected->sizeHint().height() + 16);
+ l11->addWidget(lsel, 0);
+ l11->addSpacing(10);
+ l11->addWidget(selected, 1);
+
+ // volume accounting
+ l1->addStretch(1);
+ QHBoxLayout *l12 = new QHBoxLayout;
+ l1->addLayout(l12);
+ QLabel *usevol_l = new QLabel(i18n("Volume accounting:"), parent);
+ use_vol = new QComboBox(parent);
+ use_vol->insertItem(i18n("No Accounting"), 0);
+ use_vol->insertItem(i18n("Bytes In"), 1);
+ use_vol->insertItem(i18n("Bytes Out"), 2);
+ use_vol->insertItem(i18n("Bytes In & Out"), 3);
+ use_vol->setCurrentItem(gpppdata.VolAcctEnabled());
+ l12->addWidget(usevol_l);
+ l12->addWidget(use_vol);
+
+ // load the pmfolder pixmap from KDEdir
+ pmfolder = UserIcon("folder");
+
+ // scale the pixmap
+ if(pmfolder.width() > 0) {
+ QWMatrix wm;
+ wm.scale(16.0/pmfolder.width(), 16.0/pmfolder.width());
+ pmfolder = pmfolder.xForm(wm);
+ }
+
+ // load the pmfolder pixmap from KDEdir
+ pmfile = UserIcon("phone");
+
+ // scale the pixmap
+ if(pmfile.width() > 0) {
+ QWMatrix wm;
+ wm.scale(16.0/pmfile.width(), 16.0/pmfile.width());
+ pmfile = pmfile.xForm(wm);
+ }
+
+ enable_accounting->setChecked(gpppdata.AcctEnabled());
+
+ setupTreeWidget();
+
+ l1->activate();
+}
+
+
+QString AccountingSelector::fileNameToName(QString s) {
+
+ s.replace('_', " ");
+ return KURL::decode_string(s);
+
+}
+
+
+QString AccountingSelector::nameToFileName(QString s) {
+
+ s.replace(' ', "_");
+ return s;
+
+}
+
+QListViewItem *AccountingSelector::findByName(QString name)
+{
+ QListViewItem *ch = tl->firstChild();
+ while(ch) {
+ if(ch->text(0) == name)
+ return ch;
+ ch = ch->nextSibling();
+ }
+ return 0;
+}
+
+
+void AccountingSelector::insertDir(QDir d, QListViewItem *root) {
+
+ QListViewItem* tli = 0;
+
+ // sanity check
+ if(!d.exists() || !d.isReadable())
+ return;
+
+
+ // set up filter
+ d.setNameFilter("*.rst");
+ d.setFilter(QDir::Files);
+ d.setSorting(QDir::Name);
+
+ // read the list of files
+ const QFileInfoList *list = d.entryInfoList();
+ QFileInfoListIterator it( *list );
+ QFileInfo *fi;
+
+ // traverse the list and insert into the widget
+ while((fi = it.current())) {
+ ++it;
+
+ QString samename = fi->fileName();
+
+ QListViewItem *i = findByName(samename);
+
+ // skip this file if already in tree
+ if(i)
+ continue;
+
+ // check if this is the file we should mark
+ QString name = fileNameToName(fi->baseName(true));
+ if(root)
+ tli = new QListViewItem(root, name);
+ else
+ tli = new QListViewItem(tl, name);
+
+ tli->setPixmap(0, pmfile);
+
+ // check if this is the item we are searching for
+ // (only in "Edit"-mode, not in "New"-mode
+ if(!isnewaccount && !edit_s.isEmpty() &&
+ (edit_s == QString(fi->filePath()).right(edit_s.length()))) {
+ edit_item = tli;
+ }
+ }
+
+ // set up a filter for the directories
+ d.setFilter(QDir::Dirs);
+ d.setNameFilter("*");
+ const QFileInfoList *dlist = d.entryInfoList();
+ QFileInfoListIterator dit(*dlist);
+
+ while((fi = dit.current())) {
+ // skip "." and ".." directories
+ if(fi->fileName().left(1) != ".") {
+ // convert to human-readable name
+ QString name = fileNameToName(fi->fileName());
+
+ // if the tree already has an item with this name,
+ // skip creation and use this one, otherwise
+ // create a new entry
+ QListViewItem *i = findByName(name);
+ if(!i) {
+ QListViewItem* item;
+
+ if(root)
+ item = new QListViewItem(root, name);
+ else
+ item = new QListViewItem(tl, name);
+
+ item->setPixmap(0, pmfolder);
+
+ insertDir(QDir(fi->filePath()), item);
+ } else
+ insertDir(QDir(fi->filePath()), i);
+ }
+ ++dit;
+ }
+}
+
+
+void AccountingSelector::setupTreeWidget() {
+ // search the item
+ edit_item = 0;
+ if(!isnewaccount) {
+ edit_s = gpppdata.accountingFile();
+ }
+ else
+ edit_s = "";
+
+ tl->addColumn( i18n("Available Rules") );
+ tl->setColumnWidth(0, 205);
+ tl->setRootIsDecorated(true);
+
+ // look in ~/.kde/share/apps/kppp/Rules and $KDEDIR/share/apps/kppp/Rules
+ QStringList dirs = KGlobal::dirs()->resourceDirs("appdata");
+ for (QStringList::ConstIterator it = dirs.begin();
+ it != dirs.end(); it++) {
+ insertDir(QDir((*it) + "Rules"), 0);
+ }
+
+ // when mode is "Edit", then hightlight the
+ // appropriate item
+ if(!isnewaccount && edit_item) {
+ tl->setSelected(edit_item, true);
+ tl->setOpen(edit_item->parent(), true);
+ tl->ensureItemVisible(edit_item);
+ }
+
+ enableItems(enable_accounting->isChecked());
+}
+
+
+void AccountingSelector::enableItems(bool enabled) {
+
+ tl->setEnabled(enabled);
+
+ if(!enabled || (!tl->currentItem()))
+ selected->setText(i18n("(none)"));
+ else {
+ QListViewItem* i = tl->currentItem();
+ QString s;
+ while(i) {
+ s = "/" + i->text(0) + s;
+ i = i->parent();
+ }
+ selected->setText(s.mid(1));
+
+ s += ".rst";
+ edit_s = nameToFileName(s);
+ }
+}
+
+
+void AccountingSelector::slotSelectionChanged(QListViewItem* i) {
+
+ if(!i || i->childCount())
+ return;
+
+ if(!enable_accounting->isChecked())
+ return;
+
+ enableItems(true);
+}
+
+
+bool AccountingSelector::save() {
+
+ if(enable_accounting->isChecked()) {
+ gpppdata.setAccountingFile(edit_s);
+ gpppdata.setAcctEnabled(true);
+ } else {
+ gpppdata.setAccountingFile("");
+ gpppdata.setAcctEnabled(false);
+ }
+
+ gpppdata.setVolAcctEnabled(use_vol->currentItem());
+
+ return true;
+}
+
+void AccountingSelector::openURL(const QString &url) {
+ new KRun( KURL( url ) );
+}
+
+#include "acctselect.moc"
+
diff --git a/kppp/acctselect.h b/kppp/acctselect.h
new file mode 100644
index 00000000..3e48199b
--- /dev/null
+++ b/kppp/acctselect.h
@@ -0,0 +1,81 @@
+//---------------------------------------------------------------------------
+//
+// kPPP: A pppd front end for the KDE project
+//
+//---------------------------------------------------------------------------
+//
+// (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+// (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+// (c) 1998-1999 Harri Porten <porten@kde.org>
+//
+// derived from Jay Painters "ezppp"
+//
+//---------------------------------------------------------------------------
+//
+// $Id$
+//
+//---------------------------------------------------------------------------
+//
+// This program is free software; you can redistribute it and-or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//---------------------------------------------------------------------------
+
+#ifndef __ACCTSELECT__H__
+#define __ACCTSELECT__H__
+
+#include <qwidget.h>
+#include <qpixmap.h>
+#include <qdir.h>
+
+class QCheckBox;
+class QComboBox;
+class QLabel;
+class QListView;
+class QListViewItem;
+
+class AccountingSelector : public QWidget {
+ Q_OBJECT
+public:
+ AccountingSelector(QWidget *parent = 0, bool _isnewaccount = false, const char *name = 0);
+ ~AccountingSelector() {}
+
+ bool save();
+
+private:
+ QListViewItem *findByName(QString name);
+ void setupTreeWidget();
+ void insertDir(QDir, QListViewItem * = 0);
+ QString fileNameToName(QString);
+ QString nameToFileName(QString);
+
+private slots:
+ void openURL(const QString &);
+ void enableItems(bool);
+ void slotSelectionChanged(QListViewItem* i);
+
+private:
+ QCheckBox *enable_accounting;
+ QListView *tl;
+ QComboBox *use_vol;
+ QPixmap pmfolder, pmfile;
+ QLabel *selected;
+
+ QListViewItem *edit_item;
+ QString edit_s;
+ bool isnewaccount;
+};
+
+#endif
+
diff --git a/kppp/auth.h b/kppp/auth.h
new file mode 100644
index 00000000..aef26946
--- /dev/null
+++ b/kppp/auth.h
@@ -0,0 +1,36 @@
+/*
+ *
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was contributed by Mario Weilguni <mweilguni@sime.com>
+ * Thanks Mario!
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __AUTH__H__
+#define __AUTH__H__
+
+#define AUTH_SCRIPT 0
+#define AUTH_PAP 1
+#define AUTH_TERMINAL 2
+#define AUTH_CHAP 3
+#define AUTH_PAPCHAP 4
+
+#endif
diff --git a/kppp/configure.in.in b/kppp/configure.in.in
new file mode 100644
index 00000000..867d5f07
--- /dev/null
+++ b/kppp/configure.in.in
@@ -0,0 +1,53 @@
+AC_MSG_CHECKING(if kppp's headers are installed)
+# this is a little piece of code out of kppp. If it doesn't compile,
+# kppp is not good for this system. It doesn't do anything, but enough
+# to fail ;)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_LINK([
+#if defined(__osf__) || defined(__svr4__)
+ #define _POSIX_PII_SOCKET
+ extern "C" int sethostname(char *name, int name_len);
+#endif
+#include <unistd.h>
+#include <arpa/inet.h>
+#ifdef __DragonFly__
+#include <net/ppp_layer/ppp_defs.h>
+#else
+#include <net/ppp_defs.h>
+#endif
+#include <netinet/in.h>
+
+#ifdef __svr4__
+ #include <sys/stropts.h>
+ #include <net/pppio.h> /* SVR4, Solaris 2, etc. */
+
+#else
+ #include <sys/time.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
+
+ #ifndef STREAMS
+
+ #if defined(linux)
+ #include <linux/if_ppp.h>
+ #elif defined(__DragonFly__)
+ #include <net/ppp/if_ppp.h>
+ #else
+ #include <net/if_ppp.h> /* BSD, NeXT, etc. */
+ #endif
+
+ #else /* SunOS 4, AIX 4, OSF/1, etc. */
+ #include <sys/stream.h>
+ #include <net/ppp_str.h>
+ #endif
+#endif
+],[
+ sethostname("", 1); /* never run this program! :*/
+],
+[ AC_MSG_RESULT(yes) ],
+[ DO_NOT_COMPILE="$DO_NOT_COMPILE kppp"
+ AC_MSG_RESULT(no)
+])
+AC_LANG_RESTORE
+AC_CHECK_HEADERS(sys/param.h string.h)
diff --git a/kppp/connect.cpp b/kppp/connect.cpp
new file mode 100644
index 00000000..1203f4ba
--- /dev/null
+++ b/kppp/connect.cpp
@@ -0,0 +1,1535 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ * Copyright (C) 1998-2001 Harri Porten <porten@kde.org>
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+
+#include <qlayout.h>
+#include <qregexp.h>
+
+#include <kapplication.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kpushbutton.h>
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/ioctl.h>
+#include <assert.h>
+
+#ifdef _XPG4_2
+#define __xnet_connect connect
+#endif
+
+#include <errno.h>
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef __linux__
+#include "runtests.h"
+#endif
+
+#include "auth.h"
+#include "connect.h"
+#include "docking.h"
+#include "main.h"
+#include "modem.h"
+#include "kpppconfig.h"
+#include "pppdata.h"
+#include "pppstats.h"
+#include "requester.h"
+#include "utils.h"
+
+extern KPPPWidget *p_kppp;
+
+QString old_hostname;
+bool modified_hostname;
+
+
+ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st)
+ : QWidget(parent, name),
+ // initialize some important variables
+ myreadbuffer(""),
+ main_timer_ID(0),
+ vmain(0),
+ substate(-1),
+ scriptindex(0),
+ loopnest(0),
+ loopend(false),
+ semaphore(false),
+ expecting(false),
+ readbuffer(""),
+ scanvar(""),
+ scanning(false),
+ pausing(false),
+ termwindow(0),
+ dialnumber(0),
+ stats(st)
+{
+ modified_hostname = false;
+
+ QVBoxLayout *tl = new QVBoxLayout(this, 8, 10);
+ QString tit = i18n("Connecting to: ");
+ setCaption(tit);
+
+ QHBoxLayout *l0 = new QHBoxLayout(10);
+ tl->addLayout(l0);
+ l0->addSpacing(10);
+ messg = new QLabel(this, "messg");
+ messg->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ messg->setAlignment(AlignCenter);
+ messg->setText(i18n("Unable to create modem lock file."));
+ messg->setMinimumHeight(messg->sizeHint().height() + 5);
+ int messw = (messg->sizeHint().width() * 12) / 10;
+ messw = QMAX(messw,280);
+ messg->setMinimumWidth(messw);
+ messg->setText(i18n("Looking for modem..."));
+ l0->addWidget(messg);
+ l0->addSpacing(10);
+
+ QHBoxLayout *l1 = new QHBoxLayout(10);
+ tl->addLayout(l1);
+ l1->addStretch(1);
+
+ debug = new QPushButton(i18n("&Log"), this);
+ debug->setToggleButton(true);
+ connect(debug, SIGNAL(clicked()), SIGNAL(toggleDebugWindow()));
+
+ cancel = new KPushButton(KStdGuiItem::cancel(), this);
+ cancel->setFocus();
+ connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton()));
+
+ int maxw = QMAX(cancel->sizeHint().width(),
+ debug->sizeHint().width());
+ maxw = QMAX(maxw,65);
+ debug->setFixedWidth(maxw);
+ cancel->setFixedWidth(maxw);
+ l1->addWidget(debug);
+ l1->addWidget(cancel);
+ l1->addSpacing(10);
+
+ setFixedSize(sizeHint());
+
+ pausetimer = new QTimer(this);
+ connect(pausetimer, SIGNAL(timeout()), SLOT(pause()));
+
+ kapp->processEvents();
+
+ timeout_timer = new QTimer(this);
+ connect(timeout_timer, SIGNAL(timeout()), SLOT(script_timed_out()));
+
+ inittimer = new QTimer(this);
+ connect(inittimer, SIGNAL(timeout()), SLOT(init()));
+
+ if_timeout_timer = new QTimer(this);
+ connect(if_timeout_timer, SIGNAL(timeout()), SLOT(if_waiting_timed_out()));
+
+ connect(this,SIGNAL(if_waiting_signal()),this,SLOT(if_waiting_slot()));
+
+ prompt = new PWEntry( this, "pw" );
+ if_timer = new QTimer(this);
+ connect(if_timer,SIGNAL(timeout()), SLOT(if_waiting_slot()));
+}
+
+
+ConnectWidget::~ConnectWidget() {
+}
+
+
+void ConnectWidget::disableButtons()
+{
+ debug->setEnabled(false);
+ cancel->setEnabled(false);
+}
+
+void ConnectWidget::enableButtons()
+{
+ debug->setEnabled(true);
+ cancel->setEnabled(true);
+}
+
+void ConnectWidget::preinit() {
+ // this is all just to keep the GUI nice and snappy ....
+ // you have to see to believe ...
+ messg->setText(i18n("Looking for modem..."));
+ inittimer->start(100);
+}
+
+void ConnectWidget::init() {
+ gpppdata.setpppdError(0);
+ inittimer->stop();
+ vmain = 0;
+ substate = -1;
+ expecting = false;
+ pausing = false;
+ scriptindex = 0;
+ myreadbuffer = "";
+ scanning = false;
+ scanvar = "";
+ firstrunID = true;
+ firstrunPW = true;
+ stats->totalbytes = 0;
+ dialnumber = 0;
+
+ p_kppp->con_speed = "";
+
+ p_kppp->setQuitOnDisconnect (p_kppp->quitOnDisconnect() || gpppdata.quit_on_disconnect());
+
+ comlist = &gpppdata.scriptType();
+ arglist = &gpppdata.script();
+
+ QString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
+ setCaption(tit);
+
+ kapp->processEvents();
+
+ // signal other applications that we are about to get connected
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToConnect()", QByteArray());
+
+ // run the "before-connect" command
+ if (!gpppdata.command_before_connect().isEmpty()) {
+ messg->setText(i18n("Running pre-startup command..."));
+ emit debugMessage(i18n("Running pre-startup command..."));
+
+ kapp->processEvents();
+ QApplication::flushX();
+ pid_t id = execute_command(gpppdata.command_before_connect());
+ int i, status;
+
+ do {
+ kapp->processEvents();
+ i = waitpid(id, &status, WNOHANG);
+ usleep(100000);
+ } while (i == 0 && errno == 0);
+ }
+
+ int lock = Modem::modem->lockdevice();
+
+ if (lock == 1) {
+ messg->setText(i18n("Modem device is locked."));
+ vmain = 20; // wait until cancel is pressed
+ return;
+ }
+
+ if (lock == -1) {
+ messg->setText(i18n("Unable to create modem lock file."));
+ vmain = 20; // wait until cancel is pressed
+ return;
+ }
+
+ if(Modem::modem->opentty()) {
+ messg->setText(Modem::modem->modemMessage());
+ kapp->processEvents();
+ if(Modem::modem->hangup()) {
+
+ kapp->processEvents();
+
+ semaphore = false;
+
+ Modem::modem->stop();
+ Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+
+ // if we are stuck anywhere we will time out
+ timeout_timer->start(gpppdata.modemTimeout()*1000);
+
+ // this timer will run the script etc.
+ main_timer_ID = startTimer(10);
+
+ return;
+ }
+ }
+
+ // initialization failed
+ messg->setText(Modem::modem->modemMessage());
+ vmain = 20; // wait until cancel is pressed
+ Modem::modem->unlockdevice();
+}
+
+
+void ConnectWidget::timerEvent(QTimerEvent *) {
+ if (semaphore || pausing)
+ return;
+
+ if(vmain == 0) {
+#ifdef DEBUG_WO_DIALING
+ vmain = 10;
+ return;
+#endif
+
+ assert(PPPData::NumInitStrings > 0);
+ // first init string ?
+ if(substate == -1) {
+ messg->setText(i18n("Initializing modem..."));
+ emit debugMessage(i18n("Initializing modem..."));
+ substate = 0;
+ }
+
+ QString initStr = gpppdata.modemInitStr(substate);
+ if (!initStr.isEmpty()) {
+ // send a carriage return and then wait a bit so that the modem will
+ // let us issue commands.
+ if(gpppdata.modemPreInitDelay() > 0) {
+ usleep(gpppdata.modemPreInitDelay() * 5000);
+ writeline("");
+ usleep(gpppdata.modemPreInitDelay() * 5000);
+ }
+ setExpect(gpppdata.modemInitResp());
+ writeline(initStr);
+ usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec
+ }
+
+ substate++;
+
+ /*
+ * FIXME after 3.0: Make it possible to disable ATS11 since it
+ * seems to be incompatible with some ISDN adapters (e.g. DataBox
+ * Speed Dragon). Even better would be to detect this when doing
+ * a "Modem Query"
+ */
+ if (MODEM_TONEDURATION != gpppdata.modemToneDuration())
+ vmain = 5;
+ else
+ vmain = 3;
+
+ return;
+ }
+
+ if (vmain == 5) {
+ if(!expecting) {
+ QString sToneDuration = "ATS11=" + QString::number(gpppdata.modemToneDuration());
+ QString msg = i18n("Setting ") + sToneDuration;
+ messg->setText(msg);
+ emit debugMessage(msg);
+ setExpect(gpppdata.modemInitResp());
+ writeline(sToneDuration);
+ }
+ vmain = 3;
+ return;
+ }
+
+ if(vmain == 3) {
+ if(!expecting) {
+ // done with all init strings ?
+ if(substate < PPPData::NumInitStrings) {
+ vmain = 0;
+ return;
+ }
+ substate = -1;
+ // skip setting the volume if command is empty
+ if(gpppdata.volumeInitString().isEmpty()) {
+ vmain = 4;
+ return;
+ }
+ messg->setText(i18n("Setting speaker volume..."));
+ emit debugMessage(i18n("Setting speaker volume..."));
+
+ setExpect(gpppdata.modemInitResp());
+ QString vol("AT");
+ vol += gpppdata.volumeInitString();
+ writeline(vol);
+ usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec
+ vmain = 4;
+ return;
+ }
+ }
+
+ if(vmain == 4) {
+ if(!expecting) {
+ if(!gpppdata.waitForDialTone() || gpppdata.waitCallback()) {
+ QString msg = i18n("Turning off dial tone waiting...");
+ messg->setText(msg);
+ emit debugMessage(msg);
+ setExpect(gpppdata.modemInitResp());
+ writeline(gpppdata.modemNoDialToneDetectionStr());
+ }
+ vmain = 1;
+ return;
+ }
+ }
+
+ // dial the number and wait to connect
+ if(vmain == 1) {
+ if(!expecting) {
+
+ timeout_timer->stop();
+ timeout_timer->start(gpppdata.modemTimeout()*1000);
+
+ if(gpppdata.waitCallback()) {
+ QString msg = i18n("Waiting for callback...");
+ messg->setText(msg);
+ emit debugMessage(msg);
+ setExpect(gpppdata.modemRingResp());
+ vmain = 102;
+ return;
+ }
+
+ QStringList &plist = gpppdata.phonenumbers();
+ QString bmarg= gpppdata.dialPrefix();
+ bmarg += *plist.at(dialnumber);
+ QString bm = i18n("Dialing %1").arg(bmarg);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ QString pn = gpppdata.modemDialStr();
+ pn += gpppdata.dialPrefix();
+ pn += *plist.at(dialnumber);
+ if(++dialnumber >= plist.count())
+ dialnumber = 0;
+ writeline(pn);
+
+ setExpect(gpppdata.modemConnectResp());
+ vmain = 100;
+ return;
+ }
+ }
+
+ // wait for connect, but redial if BUSY or wait for user cancel
+ // if NO CARRIER or NO DIALTONE
+ if(vmain == 100) {
+ if(!expecting) {
+ myreadbuffer = gpppdata.modemConnectResp();
+ setExpect("\n");
+ vmain = 101;
+ return;
+ }
+
+ if(readbuffer.contains(gpppdata.modemBusyResp())) {
+ timeout_timer->stop();
+ timeout_timer->start(gpppdata.modemTimeout()*1000);
+
+ messg->setText(i18n("Line busy. Hanging up..."));
+ emit debugPutChar('\n');
+ Modem::modem->hangup();
+
+ if(gpppdata.busyWait() > 0) {
+ QString bm = i18n("Line busy. Waiting: %1 seconds").arg(gpppdata.busyWait());
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ pausing = true;
+
+ pausetimer->start(gpppdata.busyWait()*1000, true);
+ timeout_timer->stop();
+ }
+
+ Modem::modem->setDataMode(false);
+ vmain = 0;
+ substate = -1;
+ gpppdata.setWaitCallback(false);
+ return;
+ }
+
+ if(readbuffer.contains(gpppdata.modemNoDialtoneResp())) {
+ timeout_timer->stop();
+
+ messg->setText(i18n("No Dial Tone"));
+ vmain = 20;
+ Modem::modem->unlockdevice();
+ gpppdata.setWaitCallback(false);
+ return;
+ }
+
+ if(readbuffer.contains(gpppdata.modemNoCarrierResp())) {
+ if (gpppdata.get_redial_on_nocarrier()) {
+ timeout_timer->stop();
+ timeout_timer->start(gpppdata.modemTimeout()*1000);
+
+ if(gpppdata.busyWait() > 0) {
+ QString bm = i18n("No carrier. Waiting: %1 seconds").arg(gpppdata.busyWait());
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ pausing = true;
+
+ pausetimer->start(gpppdata.busyWait()*1000, true);
+ timeout_timer->stop();
+ }
+
+ Modem::modem->setDataMode(false);
+ vmain = 0;
+ substate = -1;
+ return;
+ } else {
+ timeout_timer->stop();
+
+ messg->setText(i18n("No Carrier"));
+ vmain = 20;
+ Modem::modem->unlockdevice();
+ gpppdata.setWaitCallback(false);
+ }
+ return;
+ }
+
+ if(readbuffer.contains(gpppdata.modemDLPResp())) {
+ timeout_timer->stop();
+
+ messg->setText(i18n("Digital Line Protection Detected."));
+ vmain = 20;
+ Modem::modem->unlockdevice();
+ KMessageBox::error(this,
+ i18n("A Digital Line Protection (DLP) error response "
+ "has been detected.\n"
+ "Please disconnect the phone line.\n\n"
+ "Do NOT connect this modem to a digital phone "
+ "line or the modem could get permanently "
+ "damaged"));
+ gpppdata.setWaitCallback(false);
+ return;
+ }
+
+
+ }
+
+ // wait for newline after CONNECT response (so we get the speed)
+ if(vmain == 101) {
+ if(!expecting) {
+ Modem::modem->setDataMode(true); // modem will no longer respond to AT commands
+
+ emit startAccounting();
+ p_kppp->con_win->startClock();
+
+ vmain = 2;
+ scriptTimeout=gpppdata.modemTimeout()*1000;
+ return;
+ }
+ }
+
+ // send answer on callback phase
+ if(vmain == 102) {
+ if(!expecting) {
+ writeline(gpppdata.modemAnswerStr());
+ setExpect(gpppdata.modemConnectResp());
+ vmain = 100;
+ return;
+ }
+ }
+
+ // execute the script
+ if(vmain == 2) {
+ if(!expecting && !pausing && !scanning) {
+
+ timeout_timer->stop();
+ timeout_timer->start(scriptTimeout);
+
+ if((unsigned) scriptindex < comlist->count()) {
+ scriptCommand = *(comlist->at(scriptindex));
+ scriptArgument = *(arglist->at(scriptindex));
+ } else {
+ kdDebug(5002) << "End of script" << endl;
+ vmain = 10;
+ return;
+ }
+
+ if (scriptCommand == "Scan") {
+ QString bm = i18n("Scanning %1").arg(scriptArgument);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ setScan(scriptArgument);
+ scriptindex++;
+ return;
+ }
+
+ if (scriptCommand == "Save") {
+ QString bm = i18n("Saving %1").arg(scriptArgument);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ if (scriptArgument.lower() == "password") {
+ gpppdata.setPassword(scanvar);
+ p_kppp->setPW_Edit(scanvar);
+ if(gpppdata.storePassword())
+ gpppdata.setStoredPassword(scanvar);
+ firstrunPW = true;
+ }
+
+ scriptindex++;
+ return;
+ }
+
+
+ if (scriptCommand == "Send" || scriptCommand == "SendNoEcho") {
+ QString bm = i18n("Sending %1");
+
+ // replace %USERNAME% and %PASSWORD%
+ QString arg = scriptArgument;
+ QRegExp re1("%USERNAME%");
+ QRegExp re2("%PASSWORD%");
+ arg = arg.replace(re1, gpppdata.storedUsername());
+ arg = arg.replace(re2, gpppdata.storedPassword());
+
+ if (scriptCommand == "Send")
+ bm = bm.arg(scriptArgument);
+ else {
+ for(uint i = 0; i < scriptArgument.length(); i++)
+ bm = bm.arg("*");
+ }
+
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ writeline(scriptArgument);
+ scriptindex++;
+ return;
+ }
+
+ if (scriptCommand == "Expect") {
+ QString bm = i18n("Expecting %1").arg(scriptArgument);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ // The incrementing of the scriptindex MUST be before the
+ // call to setExpect otherwise the expect will miss a string that is
+ // already in the buffer.
+ scriptindex++;
+ setExpect(scriptArgument);
+ return;
+ }
+
+
+ if (scriptCommand == "Pause") {
+ QString bm = i18n("Pause %1 seconds").arg(scriptArgument);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ pausing = true;
+
+ pausetimer->start(scriptArgument.toInt()*1000, true);
+ timeout_timer->stop();
+
+ scriptindex++;
+ return;
+ }
+
+ if (scriptCommand == "Timeout") {
+
+ timeout_timer->stop();
+
+ QString bm = i18n("Timeout %1 seconds").arg(scriptArgument);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ scriptTimeout=scriptArgument.toInt()*1000;
+ timeout_timer->start(scriptTimeout);
+
+ scriptindex++;
+ return;
+ }
+
+ if (scriptCommand == "Hangup") {
+ messg->setText(i18n("Hangup"));
+ emit debugMessage(i18n("Hangup"));
+
+ writeline(gpppdata.modemHangupStr());
+ setExpect(gpppdata.modemHangupResp());
+
+ scriptindex++;
+ return;
+ }
+
+ if (scriptCommand == "Answer") {
+
+ timeout_timer->stop();
+
+ messg->setText(i18n("Answer"));
+ emit debugMessage(i18n("Answer"));
+
+ setExpect(gpppdata.modemRingResp());
+ vmain = 150;
+ return;
+ }
+
+ if (scriptCommand == "ID") {
+ QString bm = i18n("ID %1").arg(scriptArgument);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ QString idstring = gpppdata.storedUsername();
+
+ if(!idstring.isEmpty() && firstrunID) {
+ // the user entered an Id on the main kppp dialog
+ writeline(idstring);
+ firstrunID = false;
+ scriptindex++;
+ }
+ else {
+ // the user didn't enter and Id on the main kppp dialog
+ // let's query for an ID
+ /* if not around yet, then post window... */
+ if (prompt->Consumed()) {
+ if (!(prompt->isVisible())) {
+ prompt->setPrompt(scriptArgument);
+ prompt->setEchoModeNormal();
+ prompt->show();
+ }
+ } else {
+ /* if prompt withdrawn ... then, */
+ if(!(prompt->isVisible())) {
+ writeline(prompt->text());
+ prompt->setConsumed();
+ scriptindex++;
+ return;
+ }
+ /* replace timeout value */
+ }
+ }
+ }
+
+ if (scriptCommand == "Password") {
+ QString bm = i18n("Password %1").arg(scriptArgument);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ QString pwstring = gpppdata.password();
+
+ if(!pwstring.isEmpty() && firstrunPW) {
+ // the user entered a password on the main kppp dialog
+ writeline(pwstring);
+ firstrunPW = false;
+ scriptindex++;
+ }
+ else {
+ // the user didn't enter a password on the main kppp dialog
+ // let's query for a password
+ /* if not around yet, then post window... */
+ if (prompt->Consumed()) {
+ if (!(prompt->isVisible())) {
+ prompt->setPrompt(scriptArgument);
+ prompt->setEchoModePassword();
+ prompt->show();
+ }
+ } else {
+ /* if prompt withdrawn ... then, */
+ if(!(prompt->isVisible())) {
+ p_kppp->setPW_Edit(prompt->text());
+ writeline(prompt->text());
+ prompt->setConsumed();
+ scriptindex++;
+ return;
+ }
+ /* replace timeout value */
+ }
+ }
+ }
+
+ if (scriptCommand == "Prompt") {
+ QString bm = i18n("Prompting %1");
+
+ // if the scriptindex (aka the prompt text) includes a ## marker
+ // this marker should get substituted with the contents of our stored
+ // variable (from the subsequent scan).
+
+ QString ts = scriptArgument;
+ int vstart = ts.find( "##" );
+ if( vstart != -1 ) {
+ ts.remove( vstart, 2 );
+ ts.insert( vstart, scanvar );
+ }
+
+ bm = bm.arg(ts);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ /* if not around yet, then post window... */
+ if (prompt->Consumed()) {
+ if (!(prompt->isVisible())) {
+ prompt->setPrompt( ts );
+ prompt->setEchoModeNormal();
+ prompt->show();
+ }
+ } else {
+ /* if prompt withdrawn ... then, */
+ if (!(prompt->isVisible())) {
+ writeline(prompt->text());
+ prompt->setConsumed();
+ scriptindex++;
+ return;
+ }
+ /* replace timeout value */
+ }
+ }
+
+ if (scriptCommand == "PWPrompt") {
+ QString bm = i18n("PW Prompt %1").arg(scriptArgument);
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ /* if not around yet, then post window... */
+ if (prompt->Consumed()) {
+ if (!(prompt->isVisible())) {
+ prompt->setPrompt(scriptArgument);
+ prompt->setEchoModePassword();
+ prompt->show();
+ }
+ } else {
+ /* if prompt withdrawn ... then, */
+ if (!(prompt->isVisible())) {
+ writeline(prompt->text());
+ prompt->setConsumed();
+ scriptindex++;
+ return;
+ }
+ /* replace timeout value */
+ }
+ }
+
+ if (scriptCommand == "LoopStart") {
+
+ QString bm = i18n("Loop Start %1").arg(scriptArgument);
+
+ // The incrementing of the scriptindex MUST be before the
+ // call to setExpect otherwise the expect will miss a string that is
+ // already in the buffer.
+ scriptindex++;
+
+ if ( loopnest > (MAXLOOPNEST-2) ) {
+ bm += i18n("ERROR: Nested too deep, ignored.");
+ vmain=20;
+ cancelbutton();
+ KMessageBox::error(0, i18n("Loops nested too deeply."));
+ } else {
+ setExpect(scriptArgument);
+ loopstartindex[loopnest] = scriptindex;
+ loopstr[loopnest] = scriptArgument;
+ loopend = false;
+ loopnest++;
+ }
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ }
+
+ if (scriptCommand == "LoopEnd") {
+ QString bm = i18n("Loop End %1").arg(scriptArgument);
+ if ( loopnest <= 0 ) {
+ bm = i18n("LoopEnd without matching Start. Line: %1").arg(bm);
+ vmain=20;
+ cancelbutton();
+ KMessageBox::error(0, bm);
+ return;
+ } else {
+ // NB! The incrementing of the scriptindex MUST be before the
+ // call to setExpect otherwise the expect will miss a string
+ // that is already in the buffer.
+ scriptindex++;
+ setExpect(scriptArgument);
+ loopnest--;
+ loopend = true;
+ }
+ messg->setText(bm);
+ emit debugMessage(bm);
+
+ }
+ }
+ }
+
+ // this is a subroutine for the "Answer" script option
+
+ if(vmain == 150) {
+ if(!expecting) {
+ writeline(gpppdata.modemAnswerStr());
+ setExpect(gpppdata.modemAnswerResp());
+
+ vmain = 2;
+ scriptindex++;
+ return;
+ }
+ }
+
+ if(vmain == 30) {
+ if (termwindow->isVisible())
+ return;
+ if (termwindow->pressedContinue())
+ vmain = 10;
+ else
+ cancelbutton();
+ }
+
+ if(vmain == 10) {
+ if(!expecting) {
+
+ int result;
+
+ timeout_timer->stop();
+ if_timeout_timer->stop(); // better be sure.
+
+ // stop reading of data
+ Modem::modem->stop();
+
+ if(gpppdata.authMethod() == AUTH_TERMINAL) {
+ if (termwindow) {
+ delete termwindow;
+ termwindow = 0L;
+ show();
+ } else {
+ termwindow = new LoginTerm(0L, 0L);
+ hide();
+ termwindow->show();
+ vmain = 30;
+ return;
+ }
+ }
+
+ // Close the tty. This prevents the QTimer::singleShot() in
+ // Modem::readtty() from re-enabling the socket notifier.
+ // The port is still held open by the helper process.
+ Modem::modem->closetty();
+
+ killTimer( main_timer_ID );
+
+ if_timeout_timer->start(gpppdata.pppdTimeout()*1000);
+ kdDebug(5002) << "started if timeout timer with " << gpppdata.pppdTimeout()*1000 << endl;
+
+ // find out PPP interface and notify the stats module
+ stats->setUnit(pppInterfaceNumber());
+
+ kapp->flushX();
+ semaphore = true;
+ result = execppp();
+
+ emit debugMessage(i18n("Starting pppd..."));
+ kdDebug(5002) << "execppp() returned with return-code " << result << endl;
+
+ if(result) {
+ if(!gpppdata.autoDNS())
+ adddns();
+
+ // O.K we are done here, let's change over to the if_waiting loop
+ // where we wait for the ppp if (interface) to come up.
+
+ emit if_waiting_signal();
+ } else {
+
+ // starting pppd wasn't successful. Error messages were
+ // handled by execppp();
+ if_timeout_timer->stop();
+
+ hide();
+ messg->setText("");
+ p_kppp->quit_b->setFocus();
+ p_kppp->show();
+ kapp->processEvents();
+ Modem::modem->hangup();
+ emit stopAccounting();
+ p_kppp->con_win->stopClock();
+ Modem::modem->closetty();
+ Modem::modem->unlockdevice();
+
+ }
+
+ return;
+ }
+ }
+
+ // this is a "wait until cancel" entry
+
+ if(vmain == 20) {
+ gpppdata.setWaitCallback(false);
+ }
+}
+
+
+void ConnectWidget::set_con_speed_string() {
+ // Here we are trying to determine the speed at which we are connected.
+ // Usually the modem responds after connect with something like
+ // CONNECT 115200, so all we need to do is find the number after CONNECT
+ // or whatever the modemConnectResp() is.
+ p_kppp->con_speed = Modem::modem->parseModemSpeed(myreadbuffer);
+}
+
+
+
+void ConnectWidget::readChar(unsigned char c) {
+ if(semaphore)
+ return;
+
+ readbuffer += c;
+ myreadbuffer += c;
+
+ // While in scanning mode store each char to the scan buffer
+ // for use in the prompt command
+ if( scanning )
+ scanbuffer += c;
+
+ // add to debug window
+ emit debugPutChar(c);
+
+ checkBuffers();
+}
+
+
+void ConnectWidget::checkBuffers() {
+ // Let's check if we are finished with scanning:
+ // The scanstring have to be in the buffer and the latest character
+ // was a carriage return or an linefeed (depending on modem setup)
+ if( scanning && scanbuffer.contains(scanstr) &&
+ ( scanbuffer.right(1) == "\n" || scanbuffer.right(1) == "\r") ) {
+ scanning = false;
+
+ int vstart = scanbuffer.find( scanstr ) + scanstr.length();
+ scanvar = scanbuffer.mid( vstart, scanbuffer.length() - vstart);
+ scanvar = scanvar.stripWhiteSpace();
+
+ // Show the Variabel content in the debug window
+ QString sv = i18n("Scan Var: %1").arg(scanvar);
+ emit debugMessage(sv);
+ }
+
+ if(expecting) {
+ if(readbuffer.contains(expectstr)) {
+ expecting = false;
+ // keep everything after the expected string
+ readbuffer.remove(0, readbuffer.find(expectstr) + expectstr.length());
+
+ QString ts = i18n("Found: %1").arg(expectstr);
+ emit debugMessage(ts);
+
+ if (loopend) {
+ loopend=false;
+ }
+ }
+
+ if (loopend && readbuffer.contains(loopstr[loopnest])) {
+ expecting = false;
+ readbuffer = "";
+ QString ts = i18n("Looping: %1").arg(loopstr[loopnest]);
+ emit debugMessage(ts);
+ scriptindex = loopstartindex[loopnest];
+ loopend = false;
+ loopnest++;
+ }
+ // notify event loop if expected string was found
+ if(!expecting)
+ timerEvent((QTimerEvent *) 0);
+ }
+}
+
+
+
+void ConnectWidget::pause() {
+ pausing = false;
+ pausetimer->stop();
+}
+
+
+void ConnectWidget::cancelbutton() {
+ gpppdata.setWaitCallback(false);
+ Modem::modem->stop();
+ killTimer(main_timer_ID);
+ timeout_timer->stop();
+ if_timer->stop();
+ if_timeout_timer->stop();
+
+ if (termwindow) {
+ delete termwindow;
+ termwindow = 0L;
+ show();
+ }
+
+ messg->setText(i18n("One moment please..."));
+
+ // just to be sure
+ Requester::rq->removeSecret(AUTH_PAP);
+ Requester::rq->removeSecret(AUTH_CHAP);
+ removedns();
+
+ kapp->processEvents();
+
+ Requester::rq->killPPPDaemon();
+ Modem::modem->hangup();
+
+ hide();
+ messg->setText("");
+ p_kppp->quit_b->setFocus();
+ p_kppp->show();
+ emit stopAccounting(); // just to be sure
+ p_kppp->con_win->stopClock();
+ Modem::modem->closetty();
+ Modem::modem->unlockdevice();
+
+ //abort prompt window...
+ if (prompt->isVisible()) {
+ prompt->hide();
+ }
+ prompt->setConsumed();
+
+ if(p_kppp->quitOnDisconnect())
+ kapp->exit(0);
+}
+
+
+void ConnectWidget::script_timed_out() {
+ if(vmain == 20) { // we are in the 'wait for the user to cancel' state
+ timeout_timer->stop();
+ emit stopAccounting();
+ p_kppp->con_win->stopClock();
+ return;
+ }
+
+ if (prompt->isVisible())
+ prompt->hide();
+
+ prompt->setConsumed();
+ messg->setText(i18n("Script timed out."));
+ Modem::modem->hangup();
+ emit stopAccounting();
+ p_kppp->con_win->stopClock();
+
+ vmain = 0; // let's try again.
+ substate = -1;
+}
+
+
+void ConnectWidget::setScan(const QString &n) {
+ scanning = true;
+ scanstr = n;
+ scanbuffer = "";
+
+ QString ts = i18n("Scanning: %1").arg(n);
+ emit debugMessage(ts);
+}
+
+
+void ConnectWidget::setExpect(const QString &n) {
+ expecting = true;
+ expectstr = n;
+
+ QString ts = i18n("Expecting: %1").arg(n);
+ ts.replace(QRegExp("\n"), "<LF>");
+ emit debugMessage(ts);
+
+ // check if the expected string is in the read buffer already.
+ checkBuffers();
+}
+
+
+void ConnectWidget::if_waiting_timed_out() {
+ if_timer->stop();
+ if_timeout_timer->stop();
+ kdDebug(5002) << "if_waiting_timed_out()" << endl;
+
+ gpppdata.setpppdError(E_IF_TIMEOUT);
+
+ // let's kill the stuck pppd
+ Requester::rq->killPPPDaemon();
+
+ emit stopAccounting();
+ p_kppp->con_win->stopClock();
+
+
+ // killing ppp will generate a SIGCHLD which will be caught in pppdie()
+ // in main.cpp what happens next will depend on the boolean
+ // reconnect_on_disconnect which is set in ConnectWidget::init();
+}
+
+void ConnectWidget::pppdDied()
+{
+ if_timer->stop();
+ if_timeout_timer->stop();
+}
+
+void ConnectWidget::if_waiting_slot() {
+ messg->setText(i18n("Logging on to network..."));
+
+ if(!stats->ifIsUp()) {
+
+ if(gpppdata.pppdError() != 0) {
+ // we are here if pppd died immediately after starting it.
+ pppdDied();
+ // error message handled in main.cpp: sigPPPDDied()
+ return;
+ }
+
+ if_timer->start(100, TRUE); // single shot
+ return;
+ }
+
+ // O.K the ppp interface is up and running
+ // give it a few time to come up completly (0.2 seconds)
+ if_timeout_timer->stop();
+ if_timer->stop();
+ usleep(200000);
+
+ if(gpppdata.autoDNS())
+ addpeerdns();
+
+ // Close the debugging window. If we are connected, we
+ // are not really interested in debug output
+ emit closeDebugWindow();
+ p_kppp->statdlg->take_stats(); // start taking ppp statistics
+ auto_hostname();
+
+ // signal other applications that we are connected now
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "connected()", QByteArray());
+
+ if(!gpppdata.command_on_connect().isEmpty()) {
+ messg->setText(i18n("Running startup command..."));
+
+ // make sure that we don't get any async errors
+ kapp->flushX();
+ execute_command(gpppdata.command_on_connect());
+ messg->setText(i18n("Done"));
+ }
+
+ // remove the authentication file
+ Requester::rq->removeSecret(AUTH_PAP);
+ Requester::rq->removeSecret(AUTH_CHAP);
+
+ emit debugMessage(i18n("Done"));
+ set_con_speed_string();
+
+ p_kppp->con_win->setConnectionSpeed(p_kppp->con_speed);
+ hide();
+ messg->setText("");
+
+ // prepare the con_win so as to have the right size for
+ // accounting / non-accounting mode
+ if(p_kppp->acct != 0)
+ p_kppp->con_win->accounting(p_kppp->acct->running());
+ else
+ p_kppp->con_win->accounting(false);
+
+ if (gpppdata.get_dock_into_panel()) {
+ DockWidget::dock_widget->show();
+ DockWidget::dock_widget->take_stats();
+ hide();
+ }
+ else {
+ p_kppp->con_win->show();
+
+ if(gpppdata.get_iconify_on_connect()) {
+ p_kppp->con_win->showMinimized();
+ }
+ }
+
+ Modem::modem->closetty();
+}
+
+
+bool ConnectWidget::execppp() {
+ QString command;
+
+ command = "pppd";
+
+ // as of version 2.3.6 pppd falls back to the real user rights when
+ // opening a device given in a command line. To avoid permission conflicts
+ // we'll simply leave this argument away. pppd will then use the default tty
+ // which is the serial port we connected stdin/stdout to in opener.cpp.
+ // command += " ";
+ // command += gpppdata.modemDevice();
+
+ command += " " + gpppdata.speed();
+
+ command += " -detach";
+
+ if(gpppdata.ipaddr() != "0.0.0.0" ||
+ gpppdata.gateway() != "0.0.0.0") {
+ if(gpppdata.ipaddr() != "0.0.0.0") {
+ command += " ";
+ command += gpppdata.ipaddr();
+ command += ":";
+ }
+ else {
+ command += " ";
+ command += ":";
+ }
+
+ if(gpppdata.gateway() != "0.0.0.0")
+ command += gpppdata.gateway();
+ }
+
+ if(gpppdata.subnetmask() != "0.0.0.0")
+ command += " netmask " + gpppdata.subnetmask();
+
+ // the english/i18n mix below is ugly but we want to keep working
+ // after someone changed the code to use i18n'ed config values
+ QString flowCtrl = gpppdata.flowcontrol();
+ if(flowCtrl != "None" && flowCtrl != i18n("None")) {
+ if(flowCtrl == "CRTSCTS" || flowCtrl == "Hardware [CRTSCTS]" ||
+ flowCtrl == i18n("Hardware [CRTSCTS]"))
+ command += " crtscts";
+ else
+ command += " xonxoff";
+ }
+
+ if(gpppdata.defaultroute())
+ command += " defaultroute";
+
+ if(gpppdata.autoDNS())
+ command += " usepeerdns";
+
+ QStringList &arglist = gpppdata.pppdArgument();
+ for ( QStringList::Iterator it = arglist.begin();
+ it != arglist.end();
+ ++it )
+ {
+ command += " " + *it;
+ }
+
+ // Callback settings
+ if(gpppdata.callbackType() && !gpppdata.waitCallback()) {
+ if(!gpppdata.pppdVersionMin(2, 4, 2)) {
+ command += " +callback";
+ if(gpppdata.callbackType() == CBTYPE_USER)
+ command += " callback " + gpppdata.callbackPhone();
+ } else {
+ command += " callback ";
+ command += gpppdata.callbackType() == CBTYPE_ADMIN ?
+ QString("0") : gpppdata.callbackPhone();
+ }
+ } else
+ gpppdata.setWaitCallback(false);
+
+ // PAP settings
+ if(gpppdata.authMethod() == AUTH_PAP) {
+ command += " -chap user ";
+ command = command + "\"" + gpppdata.storedUsername() + "\"";
+ }
+
+ // CHAP settings
+ if(gpppdata.authMethod() == AUTH_CHAP) {
+ command += " -pap user ";
+ command = command + "\"" + gpppdata.storedUsername() + "\"";
+ }
+
+ // PAP/CHAP settings
+ if(gpppdata.authMethod() == AUTH_PAPCHAP) {
+ command += " user ";
+ command = command + "\"" + gpppdata.storedUsername() + "\"";
+ }
+
+ // check for debug
+ if(gpppdata.getPPPDebug())
+ command += " debug";
+
+ if (command.length() > MAX_CMDLEN) {
+ KMessageBox::error(this, i18n(
+ "pppd command + command-line arguments exceed "
+ "2024 characters in length."
+ ));
+
+ return false; // nonsensically long command which would bust my buffer buf.
+ }
+
+ kapp->flushX();
+
+ return Requester::rq->execPPPDaemon(command);
+}
+
+
+void ConnectWidget::closeEvent( QCloseEvent *e ) {
+ e->ignore();
+ emit cancelbutton();
+}
+
+
+void ConnectWidget::setMsg(const QString &msg) {
+ messg->setText(msg);
+}
+
+void ConnectWidget::writeline(const QString &s) {
+ Modem::modem->writeLine(s.local8Bit());
+}
+
+// Set the hostname and domain from DNS Server
+void auto_hostname() {
+ struct in_addr local_ip;
+ struct hostent *hostname_entry;
+ QString new_hostname;
+ int dot;
+ char tmp_str[100]; // buffer overflow safe
+
+ gethostname(tmp_str, sizeof(tmp_str));
+ tmp_str[sizeof(tmp_str)-1]=0; // panic
+ old_hostname=tmp_str; // copy to QString
+
+ if (!p_kppp->stats->local_ip_address.isEmpty() && gpppdata.autoname()) {
+ local_ip.s_addr=inet_addr(p_kppp->stats->local_ip_address.ascii());
+ hostname_entry=gethostbyaddr((const char *)&local_ip,sizeof(in_addr),AF_INET);
+
+ if (hostname_entry != 0L) {
+ new_hostname=hostname_entry->h_name;
+ dot=new_hostname.find('.');
+ new_hostname=new_hostname.remove(dot,new_hostname.length()-dot);
+ Requester::rq->setHostname(new_hostname);
+ modified_hostname = TRUE;
+
+ new_hostname=hostname_entry->h_name;
+ new_hostname.remove(0,dot+1);
+
+ add_domain(new_hostname);
+ }
+ }
+
+}
+
+// Replace the DNS domain entry in the /etc/resolv.conf file and
+// disable the nameserver entries if option is enabled
+void add_domain(const QString &domain) {
+
+ int fd;
+ char c;
+ QString resolv[MAX_RESOLVCONF_LINES];
+
+ if (domain.isEmpty())
+ return;
+
+ if((fd = Requester::rq->openResolv(O_RDONLY)) >= 0) {
+
+ int i=0;
+ while((read(fd, &c, 1) == 1) && (i < MAX_RESOLVCONF_LINES)) {
+ if(c == '\n') {
+ i++;
+ }
+ else {
+ resolv[i] += c;
+ }
+ }
+ close(fd);
+ if ((c != '\n') && (i < MAX_RESOLVCONF_LINES)) i++;
+
+ if((fd = Requester::rq->openResolv(O_WRONLY|O_TRUNC)) >= 0) {
+ QCString tmp = "domain " + domain.local8Bit() +
+ " \t\t#kppp temp entry\n";
+ write(fd, tmp.data(), tmp.length());
+
+ for(int j=0; j < i; j++) {
+ if((resolv[j].contains("domain") ||
+ ( resolv[j].contains("nameserver")
+ && !resolv[j].contains("#kppp temp entry")
+ && gpppdata.exDNSDisabled()))
+ && !resolv[j].contains("#entry disabled by kppp")) {
+ QCString tmp = "# " + resolv[j].local8Bit() +
+ " \t#entry disabled by kppp\n";
+ write(fd, tmp, tmp.length());
+ }
+ else {
+ QCString tmp = resolv[j].local8Bit() + "\n";
+ write(fd, tmp, tmp.length());
+ }
+ }
+ }
+ close(fd);
+ }
+}
+
+
+// adds the DNS entries in the /etc/resolv.conf file
+void adddns()
+{
+ int fd;
+
+ if ((fd = Requester::rq->openResolv(O_WRONLY|O_APPEND)) >= 0) {
+ QStringList &dnslist = gpppdata.dns();
+ for ( QStringList::Iterator it = dnslist.begin();
+ it != dnslist.end();
+ ++it )
+ {
+ QCString dns = "nameserver " + (*it).local8Bit() +
+ " \t#kppp temp entry\n";
+ write(fd, dns.data(), dns.length());
+ }
+ close(fd);
+ }
+ add_domain(gpppdata.domain());
+}
+
+void addpeerdns() {
+ int fd, fd2;
+
+ if((fd = Requester::rq->openResolv(O_WRONLY|O_APPEND)) >= 0) {
+ if((fd2 = open("/etc/ppp/resolv.conf", O_RDONLY)) >= 0) {
+ char c;
+ int i = 0;
+ while(i++ < 100 && read(fd2, &c, 1) == 1) {
+ if(c == '\n')
+ write(fd, "\t#kppp temp entry\n", 18);
+ else
+ write(fd, &c, 1);
+ }
+ close(fd2);
+ } else
+ fprintf(stderr, "failed to read from /etc/ppp/resolv.conf\n");
+ close(fd);
+ }
+ add_domain(gpppdata.domain());
+}
+
+// remove the dns entries from the /etc/resolv.conf file
+void removedns() {
+
+ int fd;
+ char c;
+ QString resolv[MAX_RESOLVCONF_LINES];
+
+ if((fd = Requester::rq->openResolv(O_RDONLY)) >= 0) {
+
+ int i=0;
+ while(read(fd, &c, 1) == 1 && i < MAX_RESOLVCONF_LINES) {
+ if(c == '\n') {
+ i++;
+ }
+ else {
+ resolv[i] += c;
+ }
+ }
+ close(fd);
+
+ if((fd = Requester::rq->openResolv(O_WRONLY|O_TRUNC)) >= 0) {
+ for(int j=0; j < i; j++) {
+ if(resolv[j].contains("#kppp temp entry")) continue;
+ if(resolv[j].contains("#entry disabled by kppp")) {
+ QCString tmp = resolv[j].local8Bit();
+ write(fd, tmp.data()+2, tmp.length() - 27);
+ write(fd, "\n", 1);
+ }
+ else {
+ QCString tmp = resolv[j].local8Bit() + "\n";
+ write(fd, tmp, tmp.length());
+ }
+ }
+ }
+ close(fd);
+
+ }
+
+ if ( modified_hostname ) {
+ Requester::rq->setHostname(old_hostname);
+ modified_hostname = FALSE;
+ }
+
+}
+
+#include "connect.moc"
diff --git a/kppp/connect.h b/kppp/connect.h
new file mode 100644
index 00000000..129a50fa
--- /dev/null
+++ b/kppp/connect.h
@@ -0,0 +1,157 @@
+/* -*- C++ -*-
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _CONNECT_H_
+#define _CONNECT_H_
+
+#include <qtimer.h>
+#include <kpushbutton.h>
+#include <qlabel.h>
+#include <qevent.h>
+
+#include "kpppconfig.h"
+#include "pwentry.h"
+#include "docking.h"
+#include "loginterm.h"
+
+#define MAXLOOPNEST (MAX_SCRIPT_ENTRIES/2)
+
+class PPPStats;
+
+class ConnectWidget : public QWidget {
+ Q_OBJECT
+public:
+ ConnectWidget(QWidget *parent, const char *name, PPPStats *st);
+ ~ConnectWidget();
+
+public:
+ void set_con_speed_string();
+ void setMsg(const QString &);
+ void pppdDied();
+
+ // these are only necessary to prevent the user from clicking in the cancel
+ // button during the disconnect delay in KPPPWidget
+ void disableButtons();
+ void enableButtons();
+
+protected:
+ void timerEvent(QTimerEvent *);
+ void closeEvent( QCloseEvent *e );
+
+private slots:
+ void readChar(unsigned char);
+ void pause();
+ void if_waiting_slot();
+
+public slots:
+ void init();
+ void preinit();
+ void script_timed_out();
+ void if_waiting_timed_out();
+ void cancelbutton();
+
+signals:
+ void if_waiting_signal();
+ void debugMessage(const QString &);
+ void toggleDebugWindow();
+ void closeDebugWindow();
+ void debugPutChar(unsigned char);
+ void startAccounting();
+ void stopAccounting();
+
+public:
+ QString myreadbuffer; // we want to keep every thing in order to fish for the
+
+ // connection speed later on
+ QPushButton *debug;
+ int main_timer_ID;
+
+private:
+ int vmain;
+ int substate;
+ int scriptindex;
+ QString scriptCommand, scriptArgument;
+ QStringList *comlist, *arglist;
+
+ // static const int maxloopnest=(MAX_SCRIPT_ENTRIES/2);
+ int loopnest;
+ int loopstartindex[MAXLOOPNEST];
+ bool loopend;
+ QString loopstr[MAXLOOPNEST];
+
+ bool semaphore;
+ QTimer *inittimer;
+
+ QTimer *timeout_timer;
+ bool execppp();
+ void writeline(const QString &);
+ void checkBuffers();
+
+ void setExpect(const QString &);
+ bool expecting;
+ QString expectstr;
+
+ QString readbuffer;
+
+ void setScan(const QString &);
+ QString scanvar;
+ QString scanstr;
+ QString scanbuffer;
+ bool scanning;
+
+ bool pausing;
+ PWEntry *prompt;
+ LoginTerm *termwindow;
+
+ int scriptTimeout;
+ QTimer *pausetimer;
+ QTimer *if_timer;
+ QTimer *if_timeout_timer;
+
+ QLabel *messg;
+ KPushButton *cancel;
+
+ bool firstrunID;
+ bool firstrunPW;
+
+ unsigned int dialnumber; // the current number to dial
+
+ PPPStats *stats;
+};
+
+
+// non-member function to kill&wait on the pppd child process
+extern void killppp();
+void adddns();
+void addpeerdns();
+void removedns();
+void add_domain(const QString & newdomain);
+void auto_hostname();
+
+#endif
+
diff --git a/kppp/convlog.tcl b/kppp/convlog.tcl
new file mode 100644
index 00000000..d5e97a1b
--- /dev/null
+++ b/kppp/convlog.tcl
@@ -0,0 +1,64 @@
+#!/usr/bin/tclsh
+
+proc err { msg } {
+ global argv0
+
+ puts stderr "[lindex $argv0 0]: $msg"
+}
+
+foreach i [glob -nocomplain ~/.kde/share/apps/kppp/Log/*-199?] {
+
+ if {[catch { set fin [open $i "r"] }]} {
+ err "cannot open $i for reading"
+ continue
+ }
+
+ if {[catch { set fout [open ${i}.log "a"] }]} {
+ err "cannot open ${i}.log for writing"
+ continue
+ }
+
+ puts -nonewline "converting $i... "
+ flush stdout
+
+ set PHASE 1
+ while {[eof $fin] == 0} {
+ gets $fin line
+
+ if {[regexp {(.*:.*:.*):.*:(.*):.*} $line s s1 s2]} {
+ set date [clock scan $s1]
+ if {$PHASE == 2} {
+ # newline
+ puts $fout ""
+ }
+ puts -nonewline $fout "$date:$s2"
+ set PHASE 2
+ } else {
+ set PHASE 1
+ if {[regexp {(.*:.*:.*):} $line s s1]} {
+ set date [clock scan $s1]
+
+ gets $fin line1
+ gets $fin line2
+ regexp {.*:\ *([0-9.]+)\ *(.*)} $line1 s s1 s2
+ regexp {.*:\ *([0-9.]+)\ *(.*)} $line2 s s3 s4
+ puts $fout ":$s2:$date:$s1:$s3:-1:-1"
+ }
+ }
+ }
+ close $fin
+ close $fout
+
+ # remove duplicate entries
+ if {[catch { exec cat ${i}.log | sort -n | uniq | egrep {^[0-9]} > ${i}.log.new} ret]} {
+ err "cannot sort ${i}.log $ret"
+ } else {
+ catch { exec mv ${i}.log.new ${i}.log }
+ }
+
+ catch {
+ exec chmod 600 ${i}.log
+ }
+
+ puts "done"
+} \ No newline at end of file
diff --git a/kppp/conwindow.cpp b/kppp/conwindow.cpp
new file mode 100644
index 00000000..ae63de85
--- /dev/null
+++ b/kppp/conwindow.cpp
@@ -0,0 +1,340 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <qtooltip.h>
+#include "conwindow.h"
+#include "docking.h"
+#include "pppdata.h"
+#include "pppstats.h"
+#include <klocale.h>
+#include <kglobal.h>
+
+extern PPPData gpppdata;
+
+ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget,
+ PPPStats *st)
+ : QWidget(parent, name, 0),
+ minutes(0),
+ seconds(0),
+ hours(0),
+ days(0),
+ tl1(0),
+ stats(st),
+ accountingEnabled(false),
+ volumeAccountingEnabled(false)
+{
+ info1 = new QLabel(i18n("Connected at:"), this);
+ info2 = new QLabel("", this);
+
+ timelabel1 = new QLabel(i18n("Time connected:"), this);
+ timelabel2 = new QLabel("000:00:00", this);
+
+ vollabel = new QLabel(i18n("Volume:"), this);
+ volinfo = new QLabel("", this);
+
+ // now the stuff for accounting
+ session_bill_l = new QLabel(i18n("Session bill:"), this);
+ session_bill = new QLabel("", this);
+ total_bill_l = new QLabel(i18n("Total bill:"), this);
+ total_bill = new QLabel("", this);
+
+ setCaption("kppp");
+
+ cancelbutton = new QPushButton(this);
+ cancelbutton->setText(i18n("&Disconnect"));
+ connect(cancelbutton, SIGNAL(clicked()), mainwidget, SLOT(disconnect()));
+
+ statsbutton = new QPushButton(this);
+ statsbutton->setText(i18n("De&tails"));
+ statsbutton->setFocus();
+ connect(statsbutton, SIGNAL(clicked()), mainwidget, SLOT(showStats()));
+
+ clocktimer = new QTimer(this);
+ connect(clocktimer, SIGNAL(timeout()), SLOT(timeclick()));
+
+ // read window position from config file
+ int p_x, p_y;
+ gpppdata.winPosConWin(p_x, p_y);
+ setGeometry(p_x, p_y, 320, 110);
+}
+
+ConWindow::~ConWindow() {
+ stopClock();
+}
+
+// save window position when window was closed
+bool ConWindow::event(QEvent *e) {
+ if (e->type() == QEvent::Hide)
+ {
+ gpppdata.setWinPosConWin(x(), y());
+ return true;
+ }
+ else
+ return QWidget::event(e);
+}
+
+QString ConWindow::prettyPrintVolume(unsigned int n) {
+ int idx = 0;
+ const QString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), QString::null};
+
+ float n1 = n;
+ while(n >= 1024 && !quant[idx].isNull()) {
+ idx++;
+ n /= 1024;
+ }
+
+ int i = idx;
+ while(i--)
+ n1 = n1 / 1024.0;
+
+ QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ s += " " + quant[idx];
+ return s;
+}
+
+void ConWindow::accounting(bool on) {
+ // cache accounting settings
+ accountingEnabled = on;
+ volumeAccountingEnabled = gpppdata.VolAcctEnabled();
+
+ // delete old layout
+ if(tl1 != 0)
+ delete tl1;
+
+ // add layout now
+ tl1 = new QVBoxLayout(this, 10, 10);
+ tl1->addSpacing(5);
+ QHBoxLayout *tl = new QHBoxLayout;
+ tl1->addLayout(tl);
+ tl->addSpacing(20);
+ QGridLayout *l1;
+
+ int vol_lines = 0;
+ if(gpppdata.VolAcctEnabled())
+ vol_lines = 1;
+
+ if(accountingEnabled)
+ l1 = new QGridLayout(4 + vol_lines, 2, 5);
+ else
+ l1 = new QGridLayout(2 + vol_lines, 2, 5);
+ tl->addLayout(l1);
+ l1->setColStretch(0, 0);
+ l1->setColStretch(1, 1);
+
+ info2->setAlignment(AlignRight|AlignVCenter);
+ timelabel2->setAlignment(AlignRight|AlignVCenter);
+ session_bill->setAlignment(AlignRight|AlignVCenter);
+ total_bill->setAlignment(AlignRight|AlignVCenter);
+ volinfo->setAlignment(AlignRight|AlignVCenter);
+ // make sure that there's enough space for the bills
+ QString s1 = session_bill->text();
+ QString s2 = total_bill->text();
+ QString s3 = volinfo->text();
+
+ session_bill->setText("888888.88 XXX");
+ total_bill->setText("888888.88 XXX");
+ volinfo->setText("8888.8 MB");
+ session_bill->setFixedSize(session_bill->sizeHint());
+ total_bill->setFixedSize(total_bill->sizeHint());
+ volinfo->setFixedSize(volinfo->sizeHint());
+ session_bill->setText(s1);
+ total_bill->setText(s2);
+ volinfo->setText(s3);
+
+ l1->addWidget(info1, 0, 0);
+ l1->addWidget(info2, 0, 1);
+ l1->addWidget(timelabel1, 1, 0);
+ l1->addWidget(timelabel2, 1, 1);
+ if(accountingEnabled) {
+ session_bill_l->show();
+ session_bill->show();
+ total_bill_l->show();
+ total_bill->show();
+ l1->addWidget(session_bill_l, 2, 0);
+ l1->addWidget(session_bill, 2, 1);
+ l1->addWidget(total_bill_l, 3, 0);
+ l1->addWidget(total_bill, 3, 1);
+
+ if(volumeAccountingEnabled) {
+ vollabel->show();
+ volinfo->show();
+ l1->addWidget(vollabel, 4, 0);
+ l1->addWidget(volinfo, 4, 1);
+ } else {
+ vollabel->hide();
+ volinfo->hide();
+ }
+
+ } else {
+ session_bill_l->hide();
+ session_bill->hide();
+ total_bill_l->hide();
+ total_bill->hide();
+
+ if(volumeAccountingEnabled) {
+ vollabel->show();
+ volinfo->show();
+ l1->addWidget(vollabel, 2, 0);
+ l1->addWidget(volinfo, 2, 1);
+ } else {
+ vollabel->hide();
+ volinfo->hide();
+ }
+ }
+
+ tl->addSpacing(10);
+ QVBoxLayout *l2 = new QVBoxLayout(5);
+ tl->addLayout(l2);
+ l2->addStretch(1);
+ l2->addWidget(statsbutton);
+ l2->addWidget(cancelbutton);
+
+ l2->addStretch(1);
+
+ tl1->addSpacing(5);
+
+ setFixedSize(sizeHint());
+/*
+ do not overwrite position read from config
+ // If this gets re-enabled, fix it for Xinerama before committing to CVS.
+ setGeometry((QApplication::desktop()->width() - width()) / 2,
+ (QApplication::desktop()->height() - height())/2,
+ width(),
+ height());
+*/
+}
+
+
+void ConWindow::dock() {
+ DockWidget::dock_widget->show();
+ hide();
+}
+
+
+void ConWindow::startClock() {
+ minutes = 0;
+ seconds = 0;
+ hours = 0;
+ QString title ;
+
+ title = gpppdata.accname();
+
+ if(gpppdata.get_show_clock_on_caption()){
+ title += " 00:00" ;
+ }
+ setCaption(title);
+
+ timelabel2->setText("00:00:00");
+ clocktimer->start(1000);
+}
+
+
+void ConWindow::setConnectionSpeed(const QString &speed) {
+ info2->setText(speed);
+}
+
+
+void ConWindow::stopClock() {
+ clocktimer->stop();
+}
+
+
+void ConWindow::timeclick() {
+ QString tooltip = i18n("Connection: %1\n"
+ "Connected at: %2\n"
+ "Time connected: %3")
+ .arg(gpppdata.accname()).arg(info2->text())
+ .arg(time_string2);
+
+ if(accountingEnabled)
+ tooltip += i18n("\nSession Bill: %1\nTotal Bill: %2")
+ .arg(session_bill->text()).arg(total_bill->text());
+ // volume accounting
+ if(volumeAccountingEnabled) {
+
+ volinfo->setEnabled(TRUE);
+ int bytes = gpppdata.totalBytes();
+ volinfo->setText(prettyPrintVolume(bytes));
+ }
+
+ seconds++;
+
+ if(seconds >= 60 ) {
+ minutes ++;
+ seconds = 0;
+ }
+
+ if (minutes >= 60){
+ minutes = 0;
+ hours ++;
+ }
+
+ if( hours >= 24){
+ days ++;
+ hours = 0;
+ }
+
+ time_string.sprintf("%02d:%02d",hours,minutes);
+ time_string2 = "";
+ if (days)
+ time_string2.sprintf("%d d %02d:%02d:%02d",
+ days,hours,minutes,seconds);
+
+ else
+ time_string2.sprintf("%02d:%02d:%02d",hours,minutes,seconds);
+
+ caption_string = gpppdata.accname();
+ caption_string += " ";
+ caption_string += time_string;
+
+
+ timelabel2->setText(time_string2);
+
+ if(gpppdata.get_show_clock_on_caption() && (seconds == 1)){
+ // we update the Caption only once per minute not every second
+ // otherwise I get a flickering icon
+ setCaption(caption_string);
+ }
+
+ QToolTip::add(DockWidget::dock_widget, tooltip);
+}
+
+
+void ConWindow::closeEvent( QCloseEvent *e ){
+ // we don't want to lose the
+ // conwindow since this is our last connection kppp.
+ // if we lost it we could only kill the program by hand to get on with life.
+ e->ignore();
+
+ if(gpppdata.get_dock_into_panel())
+ dock();
+}
+
+
+void ConWindow::slotAccounting(QString total, QString session) {
+ total_bill->setText(total);
+ session_bill->setText(session);
+}
+
+#include "conwindow.moc"
diff --git a/kppp/conwindow.h b/kppp/conwindow.h
new file mode 100644
index 00000000..4faaa0ed
--- /dev/null
+++ b/kppp/conwindow.h
@@ -0,0 +1,96 @@
+/* -*- C++ -*-
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _CONWINDOW_H_
+#define _CONWINDOW_H_
+
+
+#include <qtimer.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <qdialog.h>
+#include <qframe.h>
+#include <qevent.h>
+#include <qlayout.h>
+
+class PPPStats;
+
+class ConWindow : public QWidget {
+Q_OBJECT
+
+public:
+ ConWindow(QWidget *parent, const char *name,QWidget *main, PPPStats *st);
+ ~ConWindow();
+
+protected:
+ void closeEvent( QCloseEvent *e );
+ bool event( QEvent *e );
+
+private slots:
+ void timeclick();
+ void dock();
+
+public:
+ void setConnectionSpeed(const QString&);
+ void startClock();
+ void stopClock();
+ void accounting(bool); // show/ hide accounting info
+
+public slots:
+ void slotAccounting(QString, QString);
+
+private:
+ QLabel *info1;
+ QLabel *info2;
+ QPushButton *cancelbutton;
+ QPushButton *statsbutton;
+ QString prettyPrintVolume(unsigned int);
+ int minutes;
+ int seconds;
+ int hours;
+ int days;
+ QFrame *fline;
+ QLabel *timelabel1;
+ QLabel *timelabel2;
+ QLabel *total_bill, *total_bill_l;
+ QLabel *session_bill, *session_bill_l;
+ QString caption_string;
+ QString time_string2;
+ QString time_string;
+ QTimer *clocktimer;
+ QVBoxLayout *tl1;
+ QLabel *vollabel;
+ QLabel *volinfo;
+ PPPStats *stats;
+ bool accountingEnabled;
+ bool volumeAccountingEnabled;
+};
+
+
+#endif
+
+
+
+
+
diff --git a/kppp/debug.cpp b/kppp/debug.cpp
new file mode 100644
index 00000000..3a0939d3
--- /dev/null
+++ b/kppp/debug.cpp
@@ -0,0 +1,140 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ * Copyright (C) 1997 Bernd Wuebben
+ * wuebben@math.cornel.edu
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "debug.h"
+#include "main.h"
+#include "pppdata.h"
+#include <klocale.h>
+
+#include <assert.h>
+
+extern KPPPWidget *p_kppp;
+
+myMultiEdit::myMultiEdit(QWidget *parent, const char *name)
+ : QMultiLineEdit(parent, name)
+{
+ setReadOnly(true);
+}
+
+void myMultiEdit::insertChar(unsigned char c) {
+ QMultiLineEdit::insert(QChar(c));
+}
+
+
+void myMultiEdit::newLine() {
+ QMultiLineEdit::newLine();
+}
+
+
+DebugWidget::DebugWidget(QWidget *parent, const char *name)
+ : QDialog(parent, name, FALSE)
+{
+ setCaption(i18n("Login Script Debug Window"));
+
+ text_window = new myMultiEdit(this,"debugwindow");
+ text_window->setGeometry(2,5,400, 300);
+ // text_window->setReadOnly(FALSE);
+
+ statuslabel = new QLabel("", this, "statuslabel");
+
+ statuslabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ statuslabel->setAlignment( AlignLeft|AlignVCenter );
+ statuslabel->setGeometry(2, 307, 400, 20);
+ //statusPageLabel->setFont( KGlobalSettings::generalFont() );
+
+ dismiss = new QPushButton(this);
+ dismiss->setGeometry(330,340,70,30);
+ dismiss->setText(i18n("&Close"));
+ dismiss->setFocus();
+ connect(dismiss, SIGNAL(clicked()), SLOT(hide()));
+
+
+ /* fline = new QFrame(this,"line");
+ fline->setFrameStyle(QFrame::HLine |QFrame::Sunken);
+ fline->setGeometry(2,332,398,5);*/
+ adjustSize();
+ setMinimumSize(width(),height());
+
+}
+
+void DebugWidget::hideEvent(QHideEvent *)
+{
+ assert(p_kppp);
+ p_kppp->con->debug->setOn(false);
+}
+
+void DebugWidget::clear() {
+ text_window->clear();
+}
+
+
+void DebugWidget::addChar(unsigned char c) {
+ QString stuff;
+
+ if(c == '\r' || c == '\n') {
+ if(c == '\n')
+ text_window->newLine();
+ } else
+ text_window->insertChar(c);
+}
+
+
+void DebugWidget::statusLabel(const QString &s) {
+ statuslabel->setText(s);
+}
+
+
+/*
+void DebugWidget::keyPressEvent(QKeyEvent *k) {
+}
+
+*/
+void DebugWidget::resizeEvent(QResizeEvent *e){
+ int w = width() ;
+ int h = height();
+ e = e;
+
+ text_window->setGeometry(2,5,w - 2 ,h - 63);
+ statuslabel->setGeometry(2, h - 56 , w -2 , 20);
+ dismiss->setGeometry(w - 72 , h - 32, 70, 30);
+ // fline->setGeometry(2,h -70 ,w - 4,5);
+}
+
+
+void DebugWidget::enter() {
+ text_window->append("\r\n");
+}
+
+
+void DebugWidget::toggleVisibility() {
+ if(isVisible())
+ hide();
+ else
+ show();
+
+ bool showlog = isVisible();
+ gpppdata.set_show_log_window(showlog);
+}
+
+
+#include "debug.moc"
+
diff --git a/kppp/debug.h b/kppp/debug.h
new file mode 100644
index 00000000..e2454f0c
--- /dev/null
+++ b/kppp/debug.h
@@ -0,0 +1,70 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ * Copyright (C) 1997 Bernd Wuebben
+ * wuebben@math.cornel.edu
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _DEBUGWIDGET_
+#define _DEBUGWIDGET_
+
+#include <qdialog.h>
+#include <qstring.h>
+#include <qlabel.h>
+#include <qmultilineedit.h>
+#include <qpushbutton.h>
+
+
+class myMultiEdit : public QMultiLineEdit {
+public:
+
+ myMultiEdit(QWidget *parent=0, const char *name=0);
+
+ void newLine();
+ void insertChar(unsigned char c);
+};
+
+
+class DebugWidget : public QDialog {
+ Q_OBJECT
+public:
+ DebugWidget(QWidget *parent=0, const char *name=0);
+
+ void clear();
+
+public slots:
+ void statusLabel(const QString &);
+ void toggleVisibility();
+ void addChar(unsigned char);
+
+protected:
+ virtual void hideEvent(QHideEvent *);
+ virtual void resizeEvent(QResizeEvent *e);
+
+private:
+ void enter();
+ QFrame *fline;
+ QPushButton *dismiss;
+ myMultiEdit *text_window;
+
+ QLabel *statuslabel;
+};
+
+#endif
+
diff --git a/kppp/devices.h b/kppp/devices.h
new file mode 100644
index 00000000..9a78b5b0
--- /dev/null
+++ b/kppp/devices.h
@@ -0,0 +1,98 @@
+#ifndef _DEVICES_H_
+#define _DEVICES_H_
+
+#include "kpppconfig.h"
+
+static const char *devices[] = {
+#ifdef __FreeBSD__
+#if __FreeBSD_version > 600004
+ "/dev/cuad0",
+ "/dev/cuad1",
+ "/dev/cuad2",
+ "/dev/cuad3",
+ "/dev/cuad4",
+#else
+ "/dev/cuaa0",
+ "/dev/cuaa1",
+ "/dev/cuaa2",
+ "/dev/cuaa3",
+ "/dev/cuaa4",
+#endif
+#elif defined(__NetBSD__)
+ "/dev/tty00", /* "normal" modem lines */
+ "/dev/tty01",
+ "/dev/tty02",
+ "/dev/tty03",
+ "/dev/dty00", /* Dial out devices */
+ "/dev/dty01",
+ "/dev/dty02",
+ "/dev/dty03",
+ "/dev/ttyU0", /* USB stuff modems */
+ "/dev/ttyU1",
+ "/dev/ttyU2",
+ "/dev/ttyU3",
+ "/dev/dtyU0", /* USB stuff, too (dial out device) */
+ "/dev/dtyU1",
+ "/dev/dtyU2",
+ "/dev/dtyU3",
+#elif defined (__linux__)
+ "/dev/modem",
+ "/dev/ttyS0",
+ "/dev/ttyS1",
+ "/dev/ttyS2",
+ "/dev/ttyS3",
+ "/dev/ttyS4",
+#ifdef ISDNSUPPORT
+ "/dev/ttyI0",
+ "/dev/ttyI1",
+ "/dev/ttyI2",
+ "/dev/ttyI3",
+#endif
+ "/dev/usb/ttyACM0", /* USB stuff modems */
+ "/dev/usb/ttyACM1",
+ "/dev/usb/ttyACM2",
+ "/dev/usb/ttyACM3",
+ "/dev/usb/ttyUSB0", /* USB stuff modems */
+ "/dev/usb/ttyUSB1",
+ "/dev/usb/ttyUSB2",
+ "/dev/usb/ttyUSB3",
+ "/dev/ttyACM0", /* USB stuff modems with udev */
+ "/dev/ttyACM1",
+ "/dev/ttyACM2",
+ "/dev/ttyACM3",
+ "/dev/ttyUSB0",
+ "/dev/ttyUSB1",
+ "/dev/ttyUSB2",
+ "/dev/ttyUSB3",
+ "/dev/usb/tts/0", /* USB stuff modems with devfs*/
+ "/dev/usb/tts/1",
+ "/dev/usb/tts/2",
+ "/dev/usb/tts/3",
+ "/dev/rfcomm0", /* BlueTooth */
+ "/dev/rfcomm1",
+ "/dev/rfcomm2",
+ "/dev/rfcomm3",
+ "/dev/ircomm0", /* IrDA */
+ "/dev/ircomm1",
+ "/dev/ircomm2",
+ "/dev/ircomm3",
+ "/dev/ttySL0", /* necessary for slmodem driver http://www.smlink.com*/
+ "/dev/ttySL1",
+ "/dev/ttySL2",
+ "/dev/ttySL3",
+ "/dev/ttySHSF0",
+ "/dev/ttySHSF1",
+ "/dev/ttySHSF2",
+ "/dev/ttySHSF3", /* necessary for conexant modem which use hsfserial commercial module */
+#elif defined(__svr4__)
+ "/dev/cua/a",
+ "/dev/cua/b",
+ "/dev/ttya",
+ "/dev/ttyb",
+#endif
+ 0};
+
+// default device number from the list above
+const int DEV_DEFAULT = 0;
+
+#endif
diff --git a/kppp/docking.cpp b/kppp/docking.cpp
new file mode 100644
index 00000000..5375dd74
--- /dev/null
+++ b/kppp/docking.cpp
@@ -0,0 +1,148 @@
+/*
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was contributed by Harri Porten <porten@tu-harburg.de>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <kwin.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kpopupmenu.h>
+
+#include "docking.h"
+#include "main.h"
+#include "pppstats.h"
+
+extern KPPPWidget *p_kppp;
+
+// static member
+DockWidget *DockWidget::dock_widget = 0;
+
+DockWidget::DockWidget(QWidget *parent, const char *name, PPPStats *st)
+ : KSystemTray(parent, name), stats(st) {
+
+ // load pixmaps
+ dock_none_pixmap = UserIcon("dock_none");
+ dock_left_pixmap = UserIcon("dock_left");
+ dock_right_pixmap = UserIcon("dock_right");
+ dock_both_pixmap = UserIcon("dock_both");
+
+ // popup menu for right mouse button
+ popup_m = contextMenu();
+ toggleID = popup_m->insertItem(i18n("Restore"),
+ this, SLOT(toggle_window_state()));
+ popup_m->insertItem(i18n("Details"), p_kppp, SLOT(showStats()));
+ popup_m->insertSeparator();
+ popup_m->insertItem(i18n("Disconnect"), p_kppp, SLOT(disconnect()));
+ // connect to stats for little modem animation
+ connect(stats, SIGNAL(statsChanged(int)), SLOT(paintIcon(int)));
+
+ DockWidget::dock_widget = this;
+}
+
+
+DockWidget::~DockWidget() {
+ DockWidget::dock_widget = 0;
+}
+
+
+void DockWidget::paintEvent (QPaintEvent *) {
+ paintIcon(PPPStats::BytesNone);
+}
+
+
+void DockWidget::paintIcon (int status) {
+ // animate modem lights
+
+ const QPixmap *pixmap;
+
+ if(isVisible()) {
+ switch(status)
+ {
+ case PPPStats::BytesBoth:
+ pixmap = &dock_both_pixmap;
+ break;
+ case PPPStats::BytesIn:
+ pixmap = &dock_left_pixmap;
+ break;
+ case PPPStats::BytesOut:
+ pixmap = &dock_right_pixmap;
+ break;
+ case PPPStats::BytesNone:
+ default:
+ pixmap = &dock_none_pixmap;
+ break;
+ }
+
+ bitBlt(this, 0, 0, pixmap);
+ }
+}
+
+
+void DockWidget::take_stats() {
+ if (isVisible()) {
+ stats->initStats();
+ stats->start();
+ }
+}
+
+
+void DockWidget::stop_stats() {
+ stats->stop();
+}
+
+
+void DockWidget::mousePressEvent(QMouseEvent *e) {
+ // open/close connect-window on right mouse button
+ if ( e->button() == LeftButton ) {
+ toggle_window_state();
+ }
+
+ // open popup menu on left mouse button
+ if ( e->button() == RightButton ) {
+ QString text;
+ if(p_kppp->con_win->isVisible())
+ text = i18n("Minimize");
+ else
+ text = i18n("Restore");
+
+ popup_m->changeItem(text, toggleID);
+ popup_m->popup(e->globalPos());
+ popup_m->exec();
+ }
+}
+
+
+void DockWidget::toggle_window_state() {
+ // restore/hide connect-window
+ if(p_kppp != 0L) {
+ if (p_kppp->con_win->isVisible())
+ p_kppp->con_win->hide();
+ else {
+ p_kppp->con_win->show();
+ KWin::activateWindow(p_kppp->con_win->winId());
+ }
+ }
+}
+
+#include "docking.moc"
diff --git a/kppp/docking.h b/kppp/docking.h
new file mode 100644
index 00000000..870a5125
--- /dev/null
+++ b/kppp/docking.h
@@ -0,0 +1,70 @@
+/*
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was contributed by Harri Porten <porten@tu-harburg.de>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef _DOCKING_H_
+#define _DOCKING_H_
+
+#include <qpixmap.h>
+#include <ksystemtray.h>
+
+class PPPStats;
+
+class DockWidget : public KSystemTray {
+ Q_OBJECT
+public:
+ DockWidget(QWidget * parent, const char *name, PPPStats *st);
+ ~DockWidget();
+
+protected:
+ void paintEvent(QPaintEvent *e);
+ void showEvent(QShowEvent *) { }
+
+private slots:
+ void toggle_window_state();
+ void mousePressEvent(QMouseEvent *e);
+
+public slots:
+ void paintIcon(int);
+ void take_stats();
+ void stop_stats();
+
+public:
+ static DockWidget *dock_widget;
+
+private:
+ int toggleID;
+ PPPStats *stats;
+
+ KPopupMenu *popup_m;
+
+ QPixmap dock_none_pixmap;
+ QPixmap dock_left_pixmap;
+ QPixmap dock_right_pixmap;
+ QPixmap dock_both_pixmap;
+};
+
+#endif
diff --git a/kppp/edit.cpp b/kppp/edit.cpp
new file mode 100644
index 00000000..36df7c50
--- /dev/null
+++ b/kppp/edit.cpp
@@ -0,0 +1,1239 @@
+/*
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+#include <termios.h>
+#include <qlayout.h>
+#include <kmessagebox.h>
+#include <qwhatsthis.h>
+#include <qregexp.h>
+#include <kapplication.h>
+#include <kiconloader.h>
+#include <kbuttonbox.h>
+#include <klocale.h>
+#include <qvgroupbox.h>
+#include <qhbox.h>
+#include <kdialog.h>
+#include <kwin.h>
+
+#include "edit.h"
+#include "pppdata.h"
+#include "newwidget.h"
+#include "iplined.h"
+#include "auth.h"
+
+DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
+ : QWidget(parent, name)
+{
+ const int GRIDROWS = 8;
+
+ QGridLayout *tl = new QGridLayout(parent, GRIDROWS, 2, 0, KDialog::spacingHint());
+
+ connect_label = new QLabel(i18n("Connection &name:"), parent);
+ tl->addWidget(connect_label, 0, 0);
+
+ connectname_l = new QLineEdit(parent);
+ connectname_l->setMaxLength(ACCNAME_SIZE);
+ connect_label->setBuddy(connectname_l);
+
+ tl->addWidget(connectname_l, 0, 1);
+ QString tmp = i18n("Type in a unique name for this connection");
+
+ QWhatsThis::add(connect_label,tmp);
+ QWhatsThis::add(connectname_l,tmp);
+
+
+ number_label = new QLabel(i18n("P&hone number:"), parent);
+ number_label->setAlignment(AlignTop|AlignLeft);
+ tl->addWidget(number_label, 1, 0);
+
+ QHBoxLayout *lpn = new QHBoxLayout(5);
+ tl->addLayout(lpn, 1, 1);
+ numbers = new QListBox(parent);
+ number_label->setBuddy(numbers);
+ numbers->setMinimumSize(120, 70);
+ lpn->addWidget(numbers);
+ QVBoxLayout *lpn1 = new QVBoxLayout;
+ lpn->addLayout(lpn1);
+ add = new QPushButton(i18n("&Add..."), parent);
+ del = new QPushButton(i18n("&Remove"), parent);
+
+ up = new QPushButton(parent);
+ up->setIconSet(BarIconSet("up"));
+ down = new QPushButton(parent);
+ down->setIconSet(BarIconSet("down"));
+ lpn1->addWidget(add);
+ lpn1->addWidget(del);
+ lpn1->addStretch(1);
+ lpn1->addWidget(up);
+ lpn1->addWidget(down);
+ connect(add, SIGNAL(clicked()),
+ this, SLOT(addNumber()));
+ connect(del, SIGNAL(clicked()),
+ this, SLOT(delNumber()));
+ connect(up, SIGNAL(clicked()),
+ this, SLOT(upNumber()));
+ connect(down, SIGNAL(clicked()),
+ this, SLOT(downNumber()));
+ connect(numbers, SIGNAL(highlighted(int)),
+ this, SLOT(selectionChanged(int)));
+ numbersChanged();
+
+ tmp = i18n("<p>Specifies the phone numbers to dial. You\n"
+ "can supply multiple numbers here, simply\n"
+ "click on \"Add\". You can arrange the\n"
+ "order the numbers are tried by using the\n"
+ "arrow buttons.\n\n"
+ "When a number is busy or fails, <i>kppp</i> will \n"
+ "try the next number and so on");
+
+ QWhatsThis::add(number_label,tmp);
+ QWhatsThis::add(numbers,tmp);
+
+ auth_l = new QLabel(i18n("A&uthentication:"), parent);
+ tl->addWidget(auth_l, 3, 0);
+
+ auth = new QComboBox(parent);
+ auth_l->setBuddy(auth);
+ auth->insertItem(i18n("Script-based"));
+ auth->insertItem(i18n("PAP"));
+ auth->insertItem(i18n("Terminal-based"));
+ auth->insertItem(i18n("CHAP"));
+ auth->insertItem(i18n("PAP/CHAP"));
+ tl->addWidget(auth, 3, 1);
+ tmp = i18n("<p>Specifies the method used to identify yourself to\n"
+ "the PPP server. Most universities still use\n"
+ "<b>Terminal</b>- or <b>Script</b>-based authentication,\n"
+ "while most ISP use <b>PAP</b> and/or <b>CHAP</b>. If\n"
+ "unsure, contact your ISP.\n"
+ "\n"
+ "If you can choose between PAP and CHAP,\n"
+ "choose CHAP, because it's much safer. If you don't know\n"
+ "whether PAP or CHAP is right, choose PAP/CHAP.");
+
+ QWhatsThis::add(auth_l,tmp);
+ QWhatsThis::add(auth,tmp);
+
+ store_password = new QCheckBox(i18n("Store &password"), parent);
+ store_password->setChecked(true);
+ tl->addMultiCellWidget(store_password, 4, 4, 0, 1, AlignRight);
+ QWhatsThis::add(store_password,
+ i18n("<p>When this is turned on, your ISP password\n"
+ "will be saved in <i>kppp</i>'s config file, so\n"
+ "you do not need to type it in every time.\n"
+ "\n"
+ "<b><font color=\"red\">Warning:</font> your password will be stored as\n"
+ "plain text in the config file, which is\n"
+ "readable only to you. Make sure nobody\n"
+ "gains access to this file!"));
+
+ cbtype_l = new QLabel(i18n("&Callback type:"), parent);
+ tl->addWidget(cbtype_l, 5, 0);
+
+ cbtype = new QComboBox(parent);
+ cbtype_l->setBuddy(cbtype);
+ cbtype->insertItem(i18n("None"));
+ cbtype->insertItem(i18n("Administrator-defined"));
+ cbtype->insertItem(i18n("User-defined"));
+ connect(cbtype, SIGNAL(highlighted(int)),
+ this, SLOT(cbtypeChanged(int)));
+ tl->addWidget(cbtype, 5, 1);
+ tmp = i18n("Callback type");
+
+ QWhatsThis::add(cbtype_l,tmp);
+ QWhatsThis::add(cbtype,tmp);
+
+ cbphone_l = new QLabel(i18n("Call&back number:"), parent);
+ tl->addWidget(cbphone_l, 6, 0);
+
+ cbphone = new QLineEdit(parent);
+ cbphone_l->setBuddy(cbphone);
+ cbphone->setMaxLength(140);
+ tl->addWidget(cbphone, 6, 1);
+ tmp = i18n("Callback phone number");
+
+ QWhatsThis::add(cbphone_l,tmp);
+ QWhatsThis::add(cbphone,tmp);
+
+ pppdargs = new QPushButton(i18n("Customize &pppd Arguments..."), parent);
+ connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton()));
+ tl->addMultiCellWidget(pppdargs, 7, 7, 0, 1, AlignCenter);
+
+ // Set defaults if editing an existing connection
+ if(!isnewaccount) {
+ connectname_l->setText(gpppdata.accname());
+
+ // insert the phone numbers into the listbox
+ QString n = gpppdata.phonenumber();
+ QString tmp = "";
+ uint idx = 0;
+ while(idx != n.length()) {
+ if(n[idx] == ':') {
+ if(tmp.length() > 0)
+ numbers->insertItem(tmp);
+ tmp = "";
+ } else
+ tmp += n[idx];
+ idx++;
+ }
+ if(tmp.length() > 0)
+ numbers->insertItem(tmp);
+
+ auth->setCurrentItem(gpppdata.authMethod());
+ store_password->setChecked(gpppdata.storePassword());
+ cbtype->setCurrentItem(gpppdata.callbackType());
+ cbphone->setText(gpppdata.callbackPhone());
+ } else {
+ // select PAP/CHAP as default
+ auth->setCurrentItem(AUTH_PAPCHAP);
+ // select NONE as default
+ cbtype->setCurrentItem(CBTYPE_NONE);
+ }
+
+ emit cbtypeChanged(cbtype->currentItem());
+ numbersChanged();
+ tl->activate();
+}
+
+
+bool DialWidget::save() {
+ //first check to make sure that the account name is unique!
+ if(connectname_l->text().isEmpty() ||
+ !gpppdata.isUniqueAccname(connectname_l->text())) {
+ return false;
+ } else {
+ gpppdata.setAccname(connectname_l->text());
+
+ QString number = "";
+ for(uint i = 0; i < numbers->count(); i++) {
+ if(i != 0)
+ number += ":";
+ number += numbers->text(i);
+ }
+
+ gpppdata.setPhonenumber(number);
+ gpppdata.setAuthMethod(auth->currentItem());
+ gpppdata.setStorePassword(store_password->isChecked());
+ gpppdata.setCallbackType(cbtype->currentItem());
+ gpppdata.setCallbackPhone(cbphone->text());
+ return true;
+ }
+}
+
+
+void DialWidget::numbersChanged() {
+ int sel = numbers->currentItem();
+
+ del->setEnabled(sel != -1);
+ up->setEnabled(sel != -1 && sel != 0);
+ down->setEnabled(sel != -1 && sel != (int)numbers->count()-1);
+}
+
+void DialWidget::cbtypeChanged(int value) {
+ cbphone_l->setEnabled(value == CBTYPE_USER);
+ cbphone->setEnabled(value == CBTYPE_USER);
+}
+
+void DialWidget::selectionChanged(int) {
+ numbersChanged();
+}
+
+
+void DialWidget::addNumber() {
+ PhoneNumberDialog dlg(this);
+ if(dlg.exec()) {
+ numbers->insertItem(dlg.phoneNumber());
+ numbersChanged();
+ }
+}
+
+
+void DialWidget::delNumber() {
+ if(numbers->currentItem() != -1) {
+ numbers->removeItem(numbers->currentItem());
+ numbersChanged();
+ }
+}
+
+
+void DialWidget::upNumber() {
+ int idx = numbers->currentItem();
+ if(idx != -1) {
+ QString item = numbers->text(idx);
+ numbers->removeItem(idx);
+ numbers->insertItem(item, idx-1);
+ numbers->setCurrentItem(idx-1);
+ numbersChanged();
+ }
+}
+
+
+void DialWidget::downNumber() {
+ int idx = numbers->currentItem();
+ if(idx != -1) {
+ QString item = numbers->text(idx);
+ numbers->removeItem(idx);
+ numbers->insertItem(item, idx+1);
+ numbers->setCurrentItem(idx+1);
+ numbersChanged();
+ }
+}
+
+
+void DialWidget::pppdargsbutton() {
+ PPPdArguments pa(this);
+ pa.exec();
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+// ExecWidget
+/////////////////////////////////////////////////////////////////////////////
+ExecWidget::ExecWidget(QWidget *parent, bool isnewaccount, const char *name) :
+ QWidget(parent, name)
+{
+ QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+
+ QLabel *l = new QLabel(\
+i18n("Here you can select commands to run at certain stages of the\n"
+ "connection. The commands are run with your real user id, so\n"
+ "you cannot run any commands here requiring root permissions\n"
+ "(unless, of course, you are root).\n\n"
+ "Be sure to supply the whole path to the program otherwise\n"
+ "kppp might be unable to find it."), parent);
+ l->setMinimumHeight(l->sizeHint().height());
+ tl->addWidget(l);
+ tl->addStretch(1);
+
+ QGridLayout *l1 = new QGridLayout(4, 2, 10);
+ tl->addLayout(l1);
+ l1->setColStretch(0, 0);
+ l1->setColStretch(1, 1);
+
+ before_connect_l = new QLabel(i18n("&Before connect:"), parent);
+ before_connect_l->setAlignment(AlignVCenter);
+ l1->addWidget(before_connect_l, 0, 0);
+ before_connect = new QLineEdit(parent);
+ before_connect_l->setBuddy(before_connect);
+ before_connect->setMaxLength(COMMAND_SIZE);
+ l1->addWidget(before_connect, 0, 1);
+ QString tmp = i18n("Allows you to run a program <b>before</b> a connection\n"
+ "is established. It is called immediately before\n"
+ "dialing has begun.\n\n"
+ "This might be useful, e.g. to stop HylaFAX blocking the\n"
+ "modem.");
+
+ QWhatsThis::add(before_connect_l,tmp);
+ QWhatsThis::add(before_connect,tmp);
+
+ command_label = new QLabel(i18n("&Upon connect:"), parent);
+ command_label->setAlignment(AlignVCenter);
+ l1->addWidget(command_label, 1, 0);
+ command = new QLineEdit(parent);
+ command_label->setBuddy(command);
+ command->setMaxLength(COMMAND_SIZE);
+ l1->addWidget(command, 1, 1);
+ tmp = i18n("Allows you to run a program <b>after</b> a connection\n"
+ "is established. When your program is called, all\n"
+ "preparations for an Internet connection are finished.\n"
+ "\n"
+ "Very useful for fetching mail and news");
+
+ QWhatsThis::add(command_label,tmp);
+ QWhatsThis::add(command,tmp);
+
+ predisconnect_label = new QLabel(i18n("Before &disconnect:"),
+ parent);
+ predisconnect_label->setAlignment(AlignVCenter);
+ l1->addWidget(predisconnect_label, 2, 0);
+ predisconnect = new QLineEdit(parent);
+ predisconnect_label->setBuddy(predisconnect);
+ predisconnect->setMaxLength(COMMAND_SIZE);
+ l1->addWidget(predisconnect, 2, 1);
+ tmp = i18n("Allows you to run a program <b>before</b> a connection\n"
+ "is closed. The connection will stay open until\n"
+ "the program exits.");
+
+ QWhatsThis::add(predisconnect_label,tmp);
+ QWhatsThis::add(predisconnect,tmp);
+
+ discommand_label = new QLabel(i18n("U&pon disconnect:"),
+ parent);
+ discommand_label->setAlignment(AlignVCenter);
+ l1->addWidget(discommand_label, 3, 0);
+
+ discommand = new QLineEdit(parent);
+ discommand_label->setBuddy(discommand);
+ discommand->setMaxLength(COMMAND_SIZE);
+ l1->addWidget(discommand, 3, 1);
+ tmp = i18n("Allows you to run a program <b>after</b> a connection\n"
+ "has been closed.");
+
+ QWhatsThis::add(discommand_label,tmp);
+ QWhatsThis::add(discommand,tmp);
+
+ // extra space between entries
+ l1->addRowSpacing(1, 5);
+ l1->addRowSpacing(3, 5);
+
+ tl->addStretch(1);
+ tl->activate();
+
+ // Set defaults if editing an existing connection
+ if(!isnewaccount) {
+ before_connect->setText(gpppdata.command_before_connect());
+ command->setText(gpppdata.command_on_connect());
+ discommand->setText(gpppdata.command_on_disconnect());
+ predisconnect->setText(gpppdata.command_before_disconnect());
+ }
+}
+
+
+bool ExecWidget::save() {
+ gpppdata.setCommand_before_connect(before_connect->text());
+ gpppdata.setCommand_on_connect(command->text());
+ gpppdata.setCommand_before_disconnect(predisconnect->text());
+ gpppdata.setCommand_on_disconnect(discommand->text());
+ return true;
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// IPWidget
+//
+/////////////////////////////////////////////////////////////////////////////
+IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name )
+ : QWidget(parent, name)
+{
+ QVBoxLayout *topLayout = new QVBoxLayout(parent);
+ topLayout->setSpacing(KDialog::spacingHint());
+
+ box = new QVGroupBox(i18n("C&onfiguration"), parent);
+ box->setInsideSpacing(KDialog::spacingHint());
+
+ rb = new QButtonGroup(parent);
+ rb->hide();
+ connect(rb, SIGNAL(clicked(int)),
+ SLOT(hitIPSelect(int)));
+
+ dynamicadd_rb = new QRadioButton(box);
+ dynamicadd_rb->setText(i18n("Dynamic IP address"));
+ QWhatsThis::add(dynamicadd_rb,
+ i18n("Select this option when your computer gets an\n"
+ "internet address (IP) every time a\n"
+ "connection is made.\n"
+ "\n"
+ "Almost every Internet Service Provider uses\n"
+ "this method, so this should be turned on."));
+
+ staticadd_rb = new QRadioButton(box);
+ staticadd_rb->setText(i18n("Static IP address"));
+ rb->insert(dynamicadd_rb, 0);
+ rb->insert(staticadd_rb, 1);
+ QWhatsThis::add(staticadd_rb,
+ i18n("Select this option when your computer has a\n"
+ "fixed internet address (IP). Most computers\n"
+ "don't have this, so you should probably select\n"
+ "dynamic IP addressing unless you know what you\n"
+ "are doing."));
+
+ QWidget *ipWidget = new QWidget(box);
+ QGridLayout *ipLayout = new QGridLayout(ipWidget, 2, 2);
+ ipLayout->setSpacing(KDialog::spacingHint());
+
+ ipaddress_label = new QLabel(i18n("&IP address:"), ipWidget);
+ QString tmp = i18n("If your computer has a permanent internet\n"
+ "address, you must supply your IP address here.");
+ ipLayout->addWidget(ipaddress_label, 0, 0);
+
+ ipaddress_l = new IPLineEdit(ipWidget);
+ ipaddress_label->setBuddy(ipaddress_l);
+ ipLayout->addWidget(ipaddress_l, 0, 1);
+
+ QWhatsThis::add(ipaddress_label,tmp);
+ QWhatsThis::add(ipaddress_l,tmp);
+
+ sub_label = new QLabel(i18n("&Subnet mask:"), ipWidget);
+ tmp = i18n("<p>If your computer has a static Internet address,\n"
+ "you must supply a network mask here. In almost\n"
+ "all cases this netmask will be <b>255.255.255.0</b>,\n"
+ "but your mileage may vary.\n"
+ "\n"
+ "If unsure, contact your Internet Service Provider");
+ ipLayout->addWidget(sub_label, 1, 0);
+
+ subnetmask_l = new IPLineEdit(ipWidget);
+ sub_label->setBuddy(subnetmask_l);
+ ipLayout->addWidget(subnetmask_l, 1, 1);
+
+ QWhatsThis::add(sub_label,tmp);
+ QWhatsThis::add(subnetmask_l,tmp);
+
+ autoname = new QCheckBox(i18n("&Auto-configure hostname from this IP"), parent);
+ autoname->setChecked(gpppdata.autoname());
+ connect(autoname,SIGNAL(toggled(bool)),
+ this,SLOT(autoname_t(bool)));
+
+ QWhatsThis::add(autoname,
+ i18n("<p>Whenever you connect, this reconfigures\n"
+ "your hostname to match the IP address you\n"
+ "got from the PPP server. This may be useful\n"
+ "if you need to use a protocol which depends\n"
+ "on this information, but it can also cause several\n"
+ "<a href=\"kppp-7.html#autohostname\">problems</a>.\n"
+ "\n"
+ "Do not enable this unless you really need it."));
+
+ topLayout->addWidget(box);
+ topLayout->addWidget(autoname);
+ topLayout->addStretch();
+
+ //load info from gpppdata
+ if(!isnewaccount) {
+ if(gpppdata.ipaddr() == "0.0.0.0" &&
+ gpppdata.subnetmask() == "0.0.0.0") {
+ dynamicadd_rb->setChecked(true);
+ hitIPSelect(0);
+ autoname->setChecked(gpppdata.autoname());
+ }
+ else {
+ ipaddress_l->setText(gpppdata.ipaddr());
+ subnetmask_l->setText(gpppdata.subnetmask());
+ staticadd_rb->setChecked(true);
+ autoname->setChecked(false);
+ }
+ }
+ else {
+ dynamicadd_rb->setChecked(true);
+ hitIPSelect(0);
+ }
+
+}
+
+void IPWidget::autoname_t(bool on) {
+ static bool was_warned = false;
+
+ // big-fat warning when selecting the auto configure hostname option
+ if(on && !was_warned) {
+ KMessageBox::information(this,
+ i18n("Selecting this option might cause some weird "
+ "problems with the X-server and applications "
+ "while kppp is connected. Don't use it until "
+ "you know what you are doing!\n"
+ "For more information take a look at the "
+ "handbook (or help) in the section \"Frequently "
+ "asked questions\"."),
+ i18n("Warning"));
+ was_warned = true;
+ }
+}
+
+
+void IPWidget::save() {
+ if(dynamicadd_rb->isChecked()) {
+ gpppdata.setIpaddr("0.0.0.0");
+ gpppdata.setSubnetmask("0.0.0.0");
+ } else {
+ gpppdata.setIpaddr(ipaddress_l->text());
+ gpppdata.setSubnetmask(subnetmask_l->text());
+ }
+ gpppdata.setAutoname(autoname->isChecked());
+}
+
+
+void IPWidget::hitIPSelect( int i ) {
+ if(i == 0) {
+ ipaddress_label->setEnabled(false);
+ sub_label->setEnabled(false);
+ ipaddress_l->setEnabled(false);
+ subnetmask_l->setEnabled(false);
+ }
+ else {
+ ipaddress_label->setEnabled(true);
+ sub_label->setEnabled(true);
+ ipaddress_l->setEnabled(true);
+ subnetmask_l->setEnabled(true);
+ }
+}
+
+
+
+DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name )
+ : QWidget(parent, name)
+{
+ // box = new QGroupBox(parent);
+ QGridLayout *tl = new QGridLayout(parent, 7, 2, 0, KDialog::spacingHint());
+
+ dnsdomain_label = new QLabel(i18n("Domain &name:"), parent);
+ tl->addWidget(dnsdomain_label, 0, 0);
+
+ dnsdomain = new QLineEdit(parent);
+ dnsdomain_label->setBuddy(dnsdomain);
+ dnsdomain->setMaxLength(DOMAIN_SIZE);
+ tl->addWidget(dnsdomain, 0, 1);
+ QString tmp = i18n("If you enter a domain name here, this domain\n"
+ "name is used for your computer while you are\n"
+ "connected. When the connection is closed, the\n"
+ "original domain name of your computer is\n"
+ "restored.\n"
+ "\n"
+ "If you leave this field blank, no changes are\n"
+ "made to the domain name.");
+
+ QWhatsThis::add(dnsdomain_label,tmp);
+ QWhatsThis::add(dnsdomain,tmp);
+
+ conf_label = new QLabel(i18n("C&onfiguration:"), parent);
+ tl->addWidget(conf_label, 1, 0);
+
+ bg = new QButtonGroup("Group", this);
+ conf_label->setBuddy(bg);
+ connect(bg, SIGNAL(clicked(int)), SLOT(DNS_Mode_Selected(int)));
+ bg->hide();
+
+ autodns = new QRadioButton(i18n("Automatic"), parent);
+ bg->insert(autodns, 0);
+ tl->addWidget(autodns, 1, 1);
+ // no automatic DNS detection for pppd < 2.3.7
+ if(!gpppdata.pppdVersionMin(2, 3, 7))
+ autodns->setEnabled(false);
+
+ mandns = new QRadioButton(i18n("Manual"), parent);
+ bg->insert(mandns, 1);
+ tl->addWidget(mandns, 2, 1);
+
+ dns_label = new QLabel(i18n("DNS &IP address:"), parent);
+ tl->addWidget(dns_label, 3, 0);
+
+ QHBoxLayout *l2 = new QHBoxLayout;
+ tl->addLayout(l2, 3, 1);
+ dnsipaddr = new IPLineEdit(parent);
+ dns_label->setBuddy(dnsipaddr);
+ connect(dnsipaddr, SIGNAL(returnPressed()),
+ SLOT(adddns()));
+ connect(dnsipaddr, SIGNAL(textChanged(const QString &)),
+ SLOT(DNS_Edit_Changed(const QString &)));
+ l2->addWidget(dnsipaddr, 1);
+ l2->addStretch(1);
+ tmp = i18n("<p>Allows you to specify a new DNS server to be\n"
+ "used while you are connected. When the\n"
+ "connection is closed, this DNS entry will be\n"
+ "removed again.\n"
+ "\n"
+ "To add a DNS server, type in the IP address of\n"
+ "the DNS server here and click on <b>Add</b>");
+
+ QWhatsThis::add(dns_label, tmp);
+ QWhatsThis::add(dnsipaddr, tmp);
+
+ QHBoxLayout *l1 = new QHBoxLayout;
+ tl->addLayout(l1, 4, 1);
+ add = new QPushButton(i18n("&Add"), parent);
+ connect(add, SIGNAL(clicked()), SLOT(adddns()));
+ int width = add->sizeHint().width();
+ width = QMAX(width,60);
+ add->setMinimumWidth(width);
+ l1->addWidget(add);
+ l1->addStretch(1);
+ QWhatsThis::add(add,
+ i18n("Click this button to add the DNS server\n"
+ "specified in the field above. The entry\n"
+ "will then be added to the list below"));
+
+ remove = new QPushButton(i18n("&Remove"), parent);
+ connect(remove, SIGNAL(clicked()), SLOT(removedns()));
+ width = remove->sizeHint().width();
+ width = QMAX(width,60);
+ remove->setMinimumWidth(width);
+ l1->addWidget(remove);
+ QWhatsThis::add(remove,
+ i18n("Click this button to remove the selected DNS\n"
+ "server entry from the list below"));
+
+ servers_label = new QLabel(i18n("DNS address &list:"), parent);
+ servers_label->setAlignment(AlignTop|AlignLeft);
+ tl->addWidget(servers_label, 5, 0);
+
+ dnsservers = new QListBox(parent);
+ servers_label->setBuddy(dnsservers);
+ dnsservers->setMinimumSize(150, 80);
+ connect(dnsservers, SIGNAL(highlighted(int)),
+ SLOT(DNS_Entry_Selected(int)));
+ tl->addWidget(dnsservers, 5, 1);
+ tmp = i18n("<p>This shows all defined DNS servers to use\n"
+ "while you are connected. Use the <b>Add</b> and\n"
+ "<b>Remove</b> buttons to modify the list");
+
+ QWhatsThis::add(servers_label,tmp);
+ QWhatsThis::add(dnsservers,tmp);
+
+ exdnsdisabled_toggle = new QCheckBox(i18n( \
+"&Disable existing DNS servers during connection"),
+ parent);
+ exdnsdisabled_toggle->setChecked(gpppdata.exDNSDisabled());
+ tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter);
+ QWhatsThis::add(exdnsdisabled_toggle,
+ i18n("<p>When this option is selected, all DNS\n"
+ "servers specified in <tt>/etc/resolv.conf</tt> are\n"
+ "temporary disabled while the dialup connection\n"
+ "is established. After the connection is\n"
+ "closed, the servers will be re-enabled\n"
+ "\n"
+ "Typically, there is no reason to use this\n"
+ "option, but it may become useful under \n"
+ "some circumstances."));
+
+
+ // restore data if editing
+ if(!isnewaccount) {
+ dnsservers->insertStringList(gpppdata.dns());
+ dnsdomain->setText(gpppdata.domain());
+ }
+
+ int mode = gpppdata.autoDNS() ? 0 : 1;
+ bg->setButton(mode);
+ DNS_Mode_Selected(mode);
+
+ tl->activate();
+}
+
+void DNSWidget::DNS_Edit_Changed(const QString &text) {
+ QRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
+ add->setEnabled(text.find(r) != -1);
+}
+
+void DNSWidget::DNS_Entry_Selected(int) {
+ remove->setEnabled(true);
+}
+
+void DNSWidget::DNS_Mode_Selected(int mode) {
+ bool on = (mode == 1);
+ dns_label->setEnabled(on);
+ servers_label->setEnabled(on);
+ dnsipaddr->setText("");
+ dnsipaddr->setEnabled(on);
+ add->setEnabled(false);
+ remove->setEnabled(dnsservers->count()>0 && on);
+ dnsservers->clearSelection();
+ dnsservers->setEnabled(on);
+ dnsservers->triggerUpdate(false);
+}
+
+void DNSWidget::save() {
+ gpppdata.setAutoDNS(bg->id(bg->selected()) == 0);
+ QStringList serverlist;
+ for(uint i=0; i < dnsservers->count(); i++)
+ serverlist.append(dnsservers->text(i));
+ gpppdata.setDns(serverlist);
+
+ // strip leading dot
+ QString s(dnsdomain->text());
+ if(s.left(1) == ".")
+ gpppdata.setDomain(s.mid(1));
+ else
+ gpppdata.setDomain(dnsdomain->text());
+
+ gpppdata.setExDNSDisabled(exdnsdisabled_toggle->isChecked());
+}
+
+
+void DNSWidget::adddns() {
+ if(dnsservers->count() < MAX_DNS_ENTRIES) {
+ dnsservers->insertItem(dnsipaddr->text());
+ dnsipaddr->setText("");
+ }
+}
+
+
+void DNSWidget::removedns() {
+ int i;
+ i = dnsservers->currentItem();
+ if(i != -1)
+ dnsservers->removeItem(i);
+ remove->setEnabled(dnsservers->count()>0);
+}
+
+
+//
+// GatewayWidget
+//
+GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *name )
+ : QWidget(parent, name)
+{
+ QVBoxLayout *topLayout = new QVBoxLayout(parent);
+ topLayout->setSpacing(KDialog::spacingHint());
+
+ box = new QVGroupBox(i18n("C&onfiguration"), parent);
+ box->setInsideSpacing(KDialog::spacingHint());
+
+ rb = new QButtonGroup(parent);
+ rb->hide();
+ connect(rb, SIGNAL(clicked(int)), SLOT(hitGatewaySelect(int)));
+
+ defaultgateway = new QRadioButton(box);
+ defaultgateway->setText(i18n("Default gateway"));
+ rb->insert(defaultgateway, 0);
+ QWhatsThis::add(defaultgateway,
+ i18n("This makes the PPP peer computer (the computer\n"
+ "you are connected to with your modem) to act as\n"
+ "a gateway. Your computer will send all packets not\n"
+ "going to a computer inside your local net to this\n"
+ "computer, which will route these packets.\n"
+ "\n"
+ "This is the default for most ISPs, so you should\n"
+ "probably leave this option on."));
+
+
+ staticgateway = new QRadioButton(box);
+ staticgateway->setText(i18n("Static gateway"));
+ rb->insert(staticgateway, 1);
+ QWhatsThis::add(staticgateway,
+ i18n("<p>Allows you to specify which computer you want\n"
+ "to use as gateway (see <i>Default Gateway</i> above)"));
+
+ QHBox *gateBox = new QHBox(box);
+ gate_label = new QLabel(i18n("Gateway &IP address:"), gateBox);
+ gatewayaddr = new IPLineEdit(gateBox);
+ gate_label->setBuddy(gatewayaddr);
+
+ defaultroute = new QCheckBox(i18n("&Assign the default route to this gateway"),
+ parent);
+ QWhatsThis::add(defaultroute,
+ i18n("If this option is enabled, all packets not\n"
+ "going to the local net are routed through\n"
+ "the PPP connection.\n"
+ "\n"
+ "Normally, you should turn this on"));
+
+ topLayout->addWidget(box);
+ topLayout->addWidget(defaultroute);
+ topLayout->addStretch();
+
+ //load info from gpppdata
+ if(!isnewaccount) {
+ if(gpppdata.gateway() == "0.0.0.0") {
+ defaultgateway->setChecked(true);
+ hitGatewaySelect(0);
+ }
+ else {
+ gatewayaddr->setText(gpppdata.gateway());
+ staticgateway->setChecked(true);
+ }
+ defaultroute->setChecked(gpppdata.defaultroute());
+ }
+ else {
+ defaultgateway->setChecked(true);
+ hitGatewaySelect(0);
+ defaultroute->setChecked(true);
+ }
+}
+
+void GatewayWidget::save() {
+ gpppdata.setGateway(gatewayaddr->text());
+ gpppdata.setDefaultroute(defaultroute->isChecked());
+}
+
+
+void GatewayWidget::hitGatewaySelect( int i ) {
+ if(i == 0) {
+ gatewayaddr->setText("0.0.0.0");
+ gatewayaddr->setEnabled(false);
+ gate_label->setEnabled(false);
+ }
+ else {
+ gatewayaddr->setEnabled(true);
+ gatewayaddr->setText("");
+ gate_label->setEnabled(true);
+ }
+}
+
+
+
+ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name )
+ : QWidget(parent, name)
+{
+ QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+ se = new ScriptEdit(parent);
+ connect(se, SIGNAL(returnPressed()), SLOT(addButton()));
+ tl->addWidget(se);
+
+ // insert equal-sized buttons
+ KButtonBox *bbox = new KButtonBox(parent);
+ add = bbox->addButton(i18n("&Add"));
+ connect(add, SIGNAL(clicked()), SLOT(addButton()));
+ bbox->addStretch(1);
+ insert = bbox->addButton(i18n("&Insert"));
+ connect(insert, SIGNAL(clicked()), SLOT(insertButton()));
+ bbox->addStretch(1);
+ remove = bbox->addButton(i18n("&Remove"));
+ connect(remove, SIGNAL(clicked()), SLOT(removeButton()));
+ bbox->layout();
+ tl->addWidget(bbox);
+
+ QHBoxLayout *l12 = new QHBoxLayout(0);
+ tl->addLayout(l12);
+ stl = new QListBox(parent);
+ stl->setVScrollBarMode( QScrollView::AlwaysOff );
+ connect(stl, SIGNAL(highlighted(int)), SLOT(stlhighlighted(int)));
+ stl->setMinimumSize(QSize(70, 140));
+
+ sl = new QListBox(parent);
+ sl->setVScrollBarMode( QScrollView::AlwaysOff );
+ connect(sl, SIGNAL(highlighted(int)), SLOT(slhighlighted(int)));
+ sl->setMinimumSize(QSize(150, 140));
+
+ slb = new QScrollBar(parent);
+ slb->setFixedWidth(slb->sizeHint().width());
+ connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int)));
+
+ l12->addWidget(stl, 1);
+ l12->addWidget(sl, 3);
+ l12->addWidget(slb, 0);
+
+ //load data from gpppdata
+ if(!isnewaccount) {
+ QStringList &comlist = gpppdata.scriptType();
+ QStringList &arglist = gpppdata.script();
+ QStringList::Iterator itcom = comlist.begin();
+ QStringList::Iterator itarg = arglist.begin();
+
+ for ( ;
+ itcom != comlist.end() && itarg != arglist.end();
+ ++itcom, ++itarg )
+ {
+ stl->insertItem(*itcom);
+ sl->insertItem(*itarg);
+ }
+ }
+
+ insert->setEnabled(false);
+ remove->setEnabled(false);
+ adjustScrollBar();
+ tl->activate();
+}
+
+bool ScriptWidget::check() {
+ uint lstart = 0;
+ uint lend = 0;
+ uint errcnt = 0;
+
+ if(sl->count() > 0) {
+ for( uint i=0; i <= sl->count()-1; i++) {
+ if(stl->text(i) == "LoopStart") {
+ lstart++;
+ }
+ if (stl->text(i) == "LoopEnd") {
+ lend++;
+ }
+ if ( lend > lstart ) errcnt++;
+ }
+ return ( (errcnt == 0 ) && (lstart == lend) );
+ }
+ return true;
+}
+
+
+void ScriptWidget::save() {
+ QStringList typelist, arglist;
+ for(uint i=0; i < sl->count(); i++) {
+ typelist.append(stl->text(i));
+ arglist.append(sl->text(i));
+ }
+ gpppdata.setScriptType(typelist);
+ gpppdata.setScript(arglist);
+}
+
+
+
+void ScriptWidget::adjustScrollBar() {
+ if((int)sl->count() <= sl->numItemsVisible())
+ slb->setRange(0, 0);
+ else
+ slb->setRange(0, (sl->count() - sl->numItemsVisible())+1);
+}
+
+
+void ScriptWidget::scrolling(int i) {
+ sl->setTopItem(i);
+ stl->setTopItem(i);
+}
+
+
+void ScriptWidget::slhighlighted(int i) {
+ insert->setEnabled(true);
+ remove->setEnabled(true);
+ stl->setCurrentItem(i);
+}
+
+
+void ScriptWidget::stlhighlighted(int i) {
+ insert->setEnabled(true);
+ remove->setEnabled(true);
+ sl->setCurrentItem(i);
+}
+
+
+void ScriptWidget::addButton() {
+ //don't allow more than the maximum script entries
+ if(sl->count() == MAX_SCRIPT_ENTRIES-1)
+ return;
+
+ switch(se->type()) {
+ case ScriptEdit::Expect:
+ stl->insertItem("Expect");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::Send:
+ stl->insertItem("Send");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::SendNoEcho:
+ stl->insertItem("SendNoEcho");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::Pause:
+ stl->insertItem("Pause");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::Hangup:
+ stl->insertItem("Hangup");
+ sl->insertItem("");
+ break;
+
+ case ScriptEdit::Answer:
+ stl->insertItem("Answer");
+ sl->insertItem("");
+ break;
+
+ case ScriptEdit::Timeout:
+ stl->insertItem("Timeout");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::Password:
+ stl->insertItem("Password");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::ID:
+ stl->insertItem("ID");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::Prompt:
+ stl->insertItem("Prompt");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::PWPrompt:
+ stl->insertItem("PWPrompt");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::LoopStart:
+ stl->insertItem("LoopStart");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::LoopEnd:
+ stl->insertItem("LoopEnd");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::Scan:
+ stl->insertItem("Scan");
+ sl->insertItem(se->text());
+ break;
+
+ case ScriptEdit::Save:
+ stl->insertItem("Save");
+ sl->insertItem(se->text());
+ break;
+
+ default:
+ break;
+ }
+
+ //get the scrollbar adjusted, and scroll the list so we can see what
+ //we're adding to
+ adjustScrollBar();
+ slb->setValue(slb->maxValue());
+
+ //clear the text in the entry box
+ se->setText("");
+}
+
+
+void ScriptWidget::insertButton() {
+ //exit if there is no highlighted item, or we've reached the
+ //maximum entries in the script list
+ if(sl->currentItem() < 0 || (sl->count() == MAX_SCRIPT_ENTRIES-1))
+ return;
+
+ switch(se->type()) {
+ case ScriptEdit::Expect:
+ stl->insertItem("Expect", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::Send:
+ stl->insertItem("Send", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::SendNoEcho:
+ stl->insertItem("SendNoEcho", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::Pause:
+ stl->insertItem("Pause", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::Hangup:
+ stl->insertItem("Hangup", stl->currentItem());
+ sl->insertItem("", sl->currentItem());
+ break;
+
+ case ScriptEdit::Answer:
+ stl->insertItem("Answer", stl->currentItem());
+ sl->insertItem("", sl->currentItem());
+ break;
+
+ case ScriptEdit::Timeout:
+ stl->insertItem("Timeout", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::Password:
+ stl->insertItem("Password", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::ID:
+ stl->insertItem("ID", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::Prompt:
+ stl->insertItem("Prompt", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::PWPrompt:
+ stl->insertItem("PWPrompt", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::LoopStart:
+ stl->insertItem("LoopStart", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::LoopEnd:
+ stl->insertItem("LoopEnd", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::Scan:
+ stl->insertItem("Scan", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ case ScriptEdit::Save:
+ stl->insertItem("Save", stl->currentItem());
+ sl->insertItem(se->text(), sl->currentItem());
+ break;
+
+ default:
+ break;
+ }
+ adjustScrollBar();
+ se->setText("");
+}
+
+
+void ScriptWidget::removeButton() {
+ if(sl->currentItem() >= 0) {
+ int stlc = stl->currentItem();
+ sl->removeItem(sl->currentItem());
+ stl->removeItem(stlc);
+ adjustScrollBar();
+ insert->setEnabled(sl->currentItem() != -1);
+ remove->setEnabled(sl->currentItem() != -1);
+ }
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Used to specify a new phone number
+//
+/////////////////////////////////////////////////////////////////////////////
+PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) : KDialogBase(parent, 0, true, i18n("Add Phone Number"), Ok|Cancel) {
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+
+ QHBox *hbox = new QHBox(this);
+ setMainWidget(hbox);
+
+ hbox->setSpacing(KDialog::spacingHint());
+
+ new QLabel(i18n("Enter a phone number:"), hbox);
+
+ le = newLineEdit(14, hbox);
+ le->setMinimumWidth(125);
+
+ connect(le, SIGNAL(textChanged(const QString &)),
+ this, SLOT(textChanged(const QString &)));
+
+ le->setFocus();
+ textChanged("");
+
+ enableButtonSeparator(true);
+}
+
+
+QString PhoneNumberDialog::phoneNumber() {
+ QString s = le->text();
+
+ return s;
+}
+
+
+void PhoneNumberDialog::textChanged(const QString &s) {
+ enableButtonOK(s.length() > 0);
+}
+
+
+#include "edit.moc"
diff --git a/kppp/edit.h b/kppp/edit.h
new file mode 100644
index 00000000..dec7b11d
--- /dev/null
+++ b/kppp/edit.h
@@ -0,0 +1,256 @@
+/* -*- C++ -*-
+ *
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef _EDIT_H_
+#define _EDIT_H_
+
+#include <qdialog.h>
+#include <qpushbutton.h>
+#include <qgroupbox.h>
+#include <qscrollbar.h>
+#include <qcombobox.h>
+#include <qlineedit.h>
+#include <qlistbox.h>
+#include <qradiobutton.h>
+#include <qbuttongroup.h>
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <kdialogbase.h>
+#include "scriptedit.h"
+#include "kpppconfig.h"
+#include "pppdargs.h"
+
+class IPLineEdit;
+
+class DialWidget : public QWidget {
+ Q_OBJECT
+public:
+ DialWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ ~DialWidget() {}
+
+public slots:
+ bool save();
+ void pppdargsbutton();
+ void numbersChanged();
+ void cbtypeChanged(int);
+ void selectionChanged(int);
+ void addNumber();
+ void delNumber();
+ void upNumber();
+ void downNumber();
+
+private:
+ QLineEdit *connectname_l;
+ QLabel *connect_label;
+ QLabel *number_label;
+ QPushButton *pppdargs;
+ QComboBox *auth;
+ QLabel *auth_l;
+ QCheckBox *store_password;
+
+ // callback support
+ QComboBox *cbtype;
+ QLabel *cbtype_l;
+ QLineEdit *cbphone;
+ QLabel *cbphone_l;
+ // for the phonenumber selection
+ QPushButton *add, *del, *up, *down;
+ QListBox *numbers;
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// tab-window to select what to execute when
+//
+/////////////////////////////////////////////////////////////////////////////
+class ExecWidget : public QWidget {
+ Q_OBJECT
+public:
+ ExecWidget(QWidget *parent=0, bool isnewaccount=true, const char *name=0);
+
+public slots:
+ bool save();
+
+private:
+ QLineEdit *before_connect;
+ QLabel *before_connect_l;
+
+ QLineEdit *command;
+ QLabel *command_label;
+
+ QLineEdit *predisconnect;
+ QLabel *predisconnect_label;
+
+ QLineEdit *discommand;
+ QLabel *discommand_label;
+};
+
+
+class IPWidget : public QWidget {
+ Q_OBJECT
+public:
+ IPWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ ~IPWidget() {}
+
+public slots:
+ void save();
+
+protected slots:
+ void hitIPSelect( int );
+ void autoname_t(bool on);
+
+private:
+ QLabel *ipaddress_label;
+ QLabel *sub_label;
+ QGroupBox *box1;
+ QVGroupBox *box;
+
+ QButtonGroup *rb;
+ QRadioButton *dynamicadd_rb;
+ QRadioButton *staticadd_rb;
+
+ IPLineEdit *ipaddress_l;
+ IPLineEdit *subnetmask_l;
+
+ QCheckBox *autoname;
+};
+
+
+class DNSWidget : public QWidget {
+ Q_OBJECT
+public:
+ DNSWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ ~DNSWidget() {}
+
+public slots:
+ void save();
+
+protected slots:
+ void adddns();
+ void removedns();
+ void DNS_Edit_Changed(const QString &);
+ void DNS_Entry_Selected(int);
+ void DNS_Mode_Selected(int);
+
+private:
+ QLabel *conf_label;
+ QButtonGroup *bg;
+ QRadioButton *autodns, *mandns;
+ QLabel *dns_label;
+ QLabel *servers_label;
+ IPLineEdit *dnsipaddr;
+ QPushButton *add;
+ QPushButton *remove;
+ QListBox *dnsservers;
+ QLineEdit *dnsdomain;
+ QLabel *dnsdomain_label;
+ QCheckBox *exdnsdisabled_toggle;
+};
+
+
+class GatewayWidget : public QWidget {
+ Q_OBJECT
+public:
+ GatewayWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ ~GatewayWidget() {}
+
+public slots:
+ void save();
+
+private slots:
+ void hitGatewaySelect( int );
+
+private:
+ QGroupBox *box;
+ QLabel *gate_label;
+ QGroupBox *box1;
+ QButtonGroup *rb;
+ QRadioButton *defaultgateway;
+ QRadioButton *staticgateway;
+ IPLineEdit *gatewayaddr;
+ QCheckBox *defaultroute;
+};
+
+
+class ScriptWidget : public QWidget {
+ Q_OBJECT
+public:
+ ScriptWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
+ ~ScriptWidget() {}
+
+public slots:
+ void save();
+ bool check();
+
+private slots:
+ void addButton();
+ void insertButton();
+ void removeButton();
+
+ //signals linked to the scroll bar
+ void scrolling(int);
+
+ //signals to keep the two listboxes highlighted in sync
+ void slhighlighted(int);
+ void stlhighlighted(int);
+
+private:
+ void adjustScrollBar();
+
+ ScriptEdit *se;
+ QPushButton *add;
+ QPushButton *remove;
+ QPushButton *insert;
+ QListBox *sl, *stl;
+
+ QScrollBar *slb;
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Used to specify a new phone number
+//
+/////////////////////////////////////////////////////////////////////////////
+class PhoneNumberDialog : public KDialogBase {
+ Q_OBJECT
+public:
+ PhoneNumberDialog(QWidget *parent = 0);
+
+ QString phoneNumber();
+
+private slots:
+ void textChanged(const QString &);
+
+private:
+ QLineEdit *le;
+};
+
+
+#endif
diff --git a/kppp/general.cpp b/kppp/general.cpp
new file mode 100644
index 00000000..1ae31092
--- /dev/null
+++ b/kppp/general.cpp
@@ -0,0 +1,684 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <termios.h>
+#include <string.h>
+#include <qwhatsthis.h>
+
+#include <knuminput.h>
+#include <qslider.h>
+#include "general.h"
+#include "version.h"
+#include "miniterm.h"
+#include "modeminfo.h"
+#include "modemcmds.h"
+#include "devices.h"
+#include "pppdata.h"
+#include <klocale.h>
+#include <qlayout.h>
+#include <qgrid.h>
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Widget containing misc. configuration options
+//
+/////////////////////////////////////////////////////////////////////////////
+GeneralWidget::GeneralWidget( QWidget *parent, const char *name)
+ : QWidget(parent, name)
+{
+ QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+
+ QHBoxLayout *hbox = new QHBoxLayout(tl);
+ QLabel *label;
+ label = new QLabel(i18n("pppd version:"), parent);
+ hbox->addWidget(label);
+ QString version = gpppdata.pppdVersion();
+ if(version == "0.0.0")
+ version = "unknown";
+ label = new QLabel(version, parent);
+ label->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ hbox->addWidget(label);
+
+ KIntNumInput *pppdTimeout = new KIntNumInput(gpppdata.pppdTimeout(), parent);
+ pppdTimeout->setLabel(i18n("pppd &timeout:"));
+ pppdTimeout->setRange(1, TIMEOUT_SIZE, 5, true);
+ pppdTimeout->setSuffix(i18n(" sec"));
+ connect(pppdTimeout, SIGNAL(valueChanged(int)),
+ SLOT(pppdtimeoutchanged(int)));
+ tl->addWidget(pppdTimeout);
+ QString tmp = i18n("<i>kppp</i> will wait this number of seconds\n"
+ "to see if a PPP connection is established.\n"
+ "If no connection is made in this time frame,\n"
+ "<i>kppp</i> will give up and kill pppd.");
+ QWhatsThis::add(pppdTimeout,tmp);
+ label->setBuddy(pppdTimeout);
+
+ tl->addSpacing(10);
+
+ QCheckBox *chkBox;
+ chkBox = new QCheckBox(i18n("Doc&k into panel on connect"), parent);
+ QWhatsThis::add(chkBox,
+ i18n("<p>After a connection is established, the\n"
+ "window is minimized and a small icon\n"
+ "in the KDE panel represents this window.\n"
+ "\n"
+ "Clicking on this icon will restore the\n"
+ "window to its original location and\n"
+ "size."));
+
+ chkBox->setChecked(gpppdata.get_dock_into_panel());
+ connect(chkBox,SIGNAL(toggled(bool)),
+ this, SLOT(docking_toggled(bool)));
+ tl->addWidget(chkBox);
+
+ chkBox = new QCheckBox(i18n("A&utomatic redial on disconnect"), parent);
+ chkBox->setChecked(gpppdata.automatic_redial());
+ connect(chkBox,SIGNAL(toggled(bool)),
+ this, SLOT(redial_toggled(bool)));
+ tl->addWidget(chkBox);
+ QWhatsThis::add(chkBox,
+ i18n("<p>When a connection is established and\n"
+ "it somehow gets disconnected, <i>kppp</i>\n"
+ "will try to reconnect to the same account.\n"
+ "\n"
+ "See <a href=\"#redial\">here</a> for more on this topic."));
+
+ chkBox = new QCheckBox(i18n("Automatic redial on NO &CARRIER"), parent);
+ chkBox->setChecked(gpppdata.get_redial_on_nocarrier());
+ connect(chkBox,SIGNAL(toggled(bool)),
+ this, SLOT(nocarrier_toggled(bool)));
+ tl->addWidget(chkBox);
+ QWhatsThis::add(chkBox,
+ i18n("<p>When dialing if modem returns NO CARRIER\n"
+ "the program will make a new attempt to redial\n"
+ "instead of waiting for user to click <CANCEL>\n"
+ "button."));
+
+ chkBox = new QCheckBox(i18n("&Show clock on caption"), parent);
+ chkBox->setChecked(gpppdata.get_show_clock_on_caption());
+ connect(chkBox, SIGNAL(toggled(bool)),
+ this, SLOT(caption_toggled(bool)));
+ tl->addWidget(chkBox);
+ QWhatsThis::add(chkBox,
+ i18n("When this option is checked, the window\n"
+ "title shows the time since a connection\n"
+ "was established. Very useful, so you \n"
+ "should turn this on"));
+
+ chkBox = new QCheckBox(i18n("Disco&nnect on X server shutdown"), parent);
+ chkBox->setChecked(gpppdata.get_xserver_exit_disconnect());
+ connect(chkBox, SIGNAL(toggled(bool)),
+ this, SLOT(xserver_toggled(bool)));
+ tl->addWidget(chkBox);
+ QWhatsThis::add(chkBox,
+ i18n("<p>Checking this option will close any\n"
+ "open connection when the X-server is\n"
+ "shut down. You should enable this option\n"
+ "unless you know what you are doing.\n"
+ "\n"
+ "See <a href=\"#disxserver\">here</a> for more on this."));
+
+ chkBox = new QCheckBox(i18n("&Quit on disconnect"), parent);
+ chkBox->setChecked(gpppdata.quit_on_disconnect());
+ connect(chkBox, SIGNAL(toggled(bool)),
+ this, SLOT(quit_toggled(bool)));
+ tl->addWidget(chkBox);
+ QWhatsThis::add(chkBox,
+ i18n("When this option is turned on, <i>kppp</i>\n"
+ "will be closed when you disconnect"));
+
+ chkBox = new QCheckBox(i18n("Minimi&ze window on connect"), parent);
+ chkBox->setChecked(gpppdata.get_iconify_on_connect());
+ connect(chkBox,SIGNAL(toggled(bool)),
+ this,SLOT(iconify_toggled(bool)));
+ tl->addWidget(chkBox);
+ QWhatsThis::add(chkBox,
+ i18n("Iconifies <i>kppp</i>'s window when a\n"
+ "connection is established"));
+
+ tl->addStretch();
+
+}
+
+
+void GeneralWidget::docking_toggled(bool on){
+ gpppdata.set_dock_into_panel(on);
+}
+
+
+void GeneralWidget::iconify_toggled(bool on){
+ gpppdata.set_iconify_on_connect(on);
+}
+
+
+void GeneralWidget::caption_toggled(bool on){
+ gpppdata.set_show_clock_on_caption(on);
+}
+
+
+void GeneralWidget::redial_toggled(bool on){
+ gpppdata.set_automatic_redial(on);
+}
+
+void GeneralWidget::nocarrier_toggled(bool on){
+ gpppdata.set_redial_on_nocarrier(on);
+}
+
+void GeneralWidget::xserver_toggled(bool on){
+ gpppdata.set_xserver_exit_disconnect(on);
+}
+
+
+void GeneralWidget::quit_toggled(bool on){
+ gpppdata.set_quit_on_disconnect(on);
+}
+
+
+void GeneralWidget::pppdtimeoutchanged(int n) {
+ gpppdata.setpppdTimeout(n);
+
+}
+
+
+ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name)
+ : QWidget(parent, name)
+{
+ QGridLayout *tl = new QGridLayout(parent, 9, 2, 0, KDialog::spacingHint());
+
+ connect_label = new QLabel(i18n("Modem &name:"), parent);
+ tl->addWidget(connect_label, 0, 0);
+
+ connectname_l = new QLineEdit(parent);
+ connectname_l->setMaxLength(ACCNAME_SIZE);
+ connect_label->setBuddy(connectname_l);
+
+ tl->addWidget(connectname_l, 0, 1);
+ QString tmp = i18n("Type in a unique name for this modem");
+
+ QWhatsThis::add(connect_label,tmp);
+ QWhatsThis::add(connectname_l,tmp);
+
+ label1 = new QLabel(i18n("Modem de&vice:"), parent);
+ tl->addWidget(label1, 1, 0);
+
+ modemdevice = new QComboBox(false, parent);
+ label1->setBuddy(modemdevice);
+ // ### deviceExist mechanism not functional right now
+ bool deviceExist = false;
+ for(int k = 0; devices[k]; k++)
+ {
+ if ( devices[k] == gpppdata.modemDevice())
+ deviceExist = true;
+ modemdevice->insertItem(devices[k]);
+ }
+ if ( !deviceExist )
+ modemdevice->insertItem(gpppdata.modemDevice());
+
+ tl->addWidget(modemdevice, 1, 1);
+/* connect(modemdevice, SIGNAL(activated(int)),
+ SLOT(setmodemdc(int)));*/
+ tmp = i18n("This specifies the serial port your modem is attached \n"
+ "to. On Linux/x86, typically this is either /dev/ttyS0 \n"
+ "(COM1 under DOS) or /dev/ttyS1 (COM2 under DOS).\n"
+ "\n"
+ "If you have an internal ISDN card with AT command\n"
+ "emulation (most cards under Linux support this), you\n"
+ "should select one of the /dev/ttyIx devices.");
+
+ QWhatsThis::add(label1,tmp);
+ QWhatsThis::add(modemdevice,tmp);
+
+
+ label2 = new QLabel(i18n("&Flow control:"), parent);
+ tl->addWidget(label2, 2, 0);
+
+ flowcontrol = new QComboBox(false, parent);
+ label2->setBuddy(flowcontrol);
+ flowcontrol->insertItem(i18n("Hardware [CRTSCTS]")); // sync with pppdata.cpp
+ flowcontrol->insertItem(i18n("Software [XON/XOFF]"));
+ flowcontrol->insertItem(i18n("None"));
+
+ flowListItem << "Hardware [CRTSCTS]";
+ flowListItem << "Software [XON/XOFF]";
+ flowListItem << "None";
+
+ tl->addWidget(flowcontrol, 2, 1);
+ /*connect(flowcontrol, SIGNAL(activated(int)),
+ SLOT(setflowcontrol(int)));*/
+
+ tmp = i18n("<p>Specifies how the serial port and modem\n"
+ "communicate. You should not change this unless\n"
+ "you know what you are doing.\n"
+ "\n"
+ "<b>Default</b>: CRTSCTS");
+
+ QWhatsThis::add(label2,tmp);
+ QWhatsThis::add(flowcontrol,tmp);
+
+ labelenter = new QLabel(i18n("&Line termination:"), parent);
+ tl->addWidget(labelenter, 3, 0);
+
+ enter = new QComboBox(false, parent);
+ labelenter->setBuddy(enter);
+ enter->insertItem("CR");
+ enter->insertItem("LF");
+ enter->insertItem("CR/LF");
+ tl->addWidget(enter, 3, 1);
+ /* connect(enter, SIGNAL(activated(int)), SLOT(setenter(int)));*/
+ tmp = i18n("<p>Specifies how AT commands are sent to your\n"
+ "modem. Most modems will work fine with the\n"
+ "default <i>CR/LF</i>. If your modem does not react\n"
+ "to the init string, you should try different\n"
+ "settings here\n"
+ "\n"
+ "<b>Default</b>: CR/LF");
+
+ QWhatsThis::add(labelenter,tmp);
+ QWhatsThis::add(enter, tmp);
+
+ baud_label = new QLabel(i18n("Co&nnection speed:"), parent);
+ tl->addWidget(baud_label, 4, 0);
+ baud_c = new QComboBox(parent);
+ baud_label->setBuddy(baud_c);
+
+ static const char *baudrates[] = {
+
+#ifdef B921600
+ "921600",
+#endif
+
+#ifdef B460800
+ "460800",
+#endif
+
+#ifdef B230400
+ "230400",
+#endif
+
+#ifdef B115200
+ "115200",
+#endif
+
+#ifdef B57600
+ "57600",
+#endif
+
+ "38400",
+ "19200",
+ "9600",
+ "2400",
+ 0};
+
+ for(int k = 0; baudrates[k]; k++)
+ baud_c->insertItem(baudrates[k]);
+
+ baud_c->setCurrentItem(3);
+ /*connect(baud_c, SIGNAL(activated(int)),
+ this, SLOT(speed_selection(int)));*/
+ tl->addWidget(baud_c, 4, 1);
+
+ tmp = i18n("Specifies the speed your modem and the serial\n"
+ "port talk to each other. You should begin with\n"
+ "at least 115200 bits/sec (or more if you know\n"
+ "that your serial port supports higher speeds).\n"
+ "If you have connection problems, try to reduce\n"
+ "this value.");
+
+ QWhatsThis::add(baud_label,tmp);
+ QWhatsThis::add(baud_c,tmp);
+
+ for(int i=0; i <= enter->count()-1; i++) {
+ if(gpppdata.enter() == enter->text(i))
+ enter->setCurrentItem(i);
+ }
+
+ tl->addRowSpacing(4, 10);
+
+ //Modem Lock File
+ modemlockfile = new QCheckBox(i18n("&Use lock file"), parent);
+
+ modemlockfile->setChecked(gpppdata.modemLockFile());
+/* connect(modemlockfile, SIGNAL(toggled(bool)),
+ SLOT(modemlockfilechanged(bool)));*/
+ tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1);
+ // l12->addStretch(1);
+ QWhatsThis::add(modemlockfile,
+ i18n("<p>To prevent other programs from accessing the\n"
+ "modem while a connection is established, a\n"
+ "file can be created to indicate that the modem\n"
+ "is in use. On Linux an example file would be\n"
+ "<tt>/var/lock/LCK..ttyS1</tt>\n"
+ "Here you can select whether this locking will\n"
+ "be done.\n"
+ "\n"
+ "<b>Default</b>: On"));
+
+ // Modem Timeout Line Edit Box
+
+ modemtimeout = new KIntNumInput(gpppdata.modemTimeout(), parent);
+ modemtimeout->setLabel(i18n("Modem &timeout:"));
+ modemtimeout->setRange(1, 120, 1);
+ modemtimeout->setSuffix(i18n(" sec"));
+/* connect(modemtimeout, SIGNAL(valueChanged(int)),
+ SLOT(modemtimeoutchanged(int)));*/
+ tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1);
+
+ QWhatsThis::add(modemtimeout,
+ i18n("This specifies how long <i>kppp</i> waits for a\n"
+ "<i>CONNECT</i> response from your modem. The\n"
+ "recommended value is 30 seconds."));
+
+// Set defaults if editing an existing connection
+ if(!isnewmodem) {
+ connectname_l->setText(gpppdata.modname());
+
+ //set stuff from gpppdata
+ for(int i=0; i <= enter->count()-1; i++) {
+ if(gpppdata.enter() == enter->text(i))
+ enter->setCurrentItem(i);
+ }
+
+ for(int i=0; i <= modemdevice->count()-1; i++) {
+ if(gpppdata.modemDevice() == modemdevice->text(i))
+ modemdevice->setCurrentItem(i);
+ }
+
+ for(int i=0; i <= flowcontrol->count()-1; i++)
+ if(gpppdata.flowcontrol() == flowListItem[i])
+ flowcontrol->setCurrentItem(i);
+
+ //set the modem speed
+ for(int i=0; i < baud_c->count(); i++)
+ if(baud_c->text(i) == gpppdata.speed())
+ baud_c->setCurrentItem(i);
+
+ } else {
+ //Set the standard Items
+ enter->setCurrentItem(0);
+ modemdevice->setCurrentItem(0);
+ flowcontrol->setCurrentItem(0);
+ baud_c->setCurrentItem(0);
+ }
+
+ tl->setRowStretch(7, 1);
+}
+
+bool ModemWidget::save()
+{
+ //first check to make sure that the modem name is unique!
+ if(connectname_l->text().isEmpty() ||
+ !gpppdata.isUniqueModname(connectname_l->text())) {
+ return false;
+ } else {
+ gpppdata.setModname(connectname_l->text());
+ gpppdata.setSpeed(baud_c->text(baud_c->currentItem()));
+ gpppdata.setEnter(enter->text(enter->currentItem()));
+ gpppdata.setModemDevice(modemdevice->text(modemdevice->currentItem()));
+ gpppdata.setFlowcontrol(flowListItem[flowcontrol->currentItem()]);
+ gpppdata.setModemLockFile(modemlockfile->isOn());
+ gpppdata.setModemTimeout(modemtimeout->value());
+ return true;
+ }
+}
+
+
+ModemWidget2::ModemWidget2(QWidget *parent, const char *name)
+ : QWidget(parent, name)
+{
+ QVBoxLayout *l1 = new QVBoxLayout(parent, 0, KDialog::spacingHint());
+
+
+ waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), parent);
+ waitfordt->setChecked(gpppdata.waitForDialTone());
+ // connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool)));
+ l1->addWidget(waitfordt);
+ QWhatsThis::add(waitfordt,
+ i18n("<p>Normally the modem waits for a dial tone\n"
+ "from your phone line, indicating that it can\n"
+ "start to dial a number. If your modem does not\n"
+ "recognize this sound, or your local phone system\n"
+ "does not emit such a tone, uncheck this option\n"
+ "\n"
+ "<b>Default:</b>: On"));
+
+ busywait = new KIntNumInput(gpppdata.busyWait(), parent);
+ busywait->setLabel(i18n("B&usy wait:"));
+ busywait->setRange(0, 300, 5, true);
+ busywait->setSuffix(i18n(" sec"));
+ // connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int)));
+ l1->addWidget(busywait);
+
+ QWhatsThis::add(busywait,
+ i18n("Specifies the number of seconds to wait before\n"
+ "redial if all dialed numbers are busy. This is\n"
+ "necessary because some modems get stuck if the\n"
+ "same number is busy too often.\n"
+ "\n"
+ "The default is 0 seconds, you should not change\n"
+ "this unless you need to."));
+
+ l1->addSpacing(10);
+
+ QHBoxLayout *hbl = new QHBoxLayout;
+ hbl->setSpacing(KDialog::spacingHint());
+
+ QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), parent);
+ hbl->addWidget(volumeLabel);
+ volume = new QSlider(0, 2, 1, gpppdata.volume(), QSlider::Horizontal, parent);
+ volumeLabel->setBuddy(volume);
+ volume->setTickmarks(QSlider::Below);
+ hbl->addWidget(volume);
+
+ l1->addLayout(hbl);
+
+ /* connect(volume, SIGNAL(valueChanged(int)),
+ this, SLOT(volumeChanged(int)));*/
+ QString tmp = i18n("Most modems have a speaker which makes\n"
+ "a lot of noise when dialing. Here you can\n"
+ "either turn this completely off or select a\n"
+ "lower volume.\n"
+ "\n"
+ "If this does not work for your modem,\n"
+ "you must modify the modem volume command.");
+
+ QWhatsThis::add(volumeLabel,tmp);
+ QWhatsThis::add(volume, tmp);
+
+ l1->addSpacing(20);
+
+#if 0
+ chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), parent);
+ chkbox1->setChecked(gpppdata.UseCDLine());
+ connect(chkbox1,SIGNAL(toggled(bool)),
+ this,SLOT(use_cdline_toggled(bool)));
+ l12->addWidget(chkbox1);
+ l12->addStretch(1);
+ l1->addStretch(1);
+ QWhatsThis::add(chkbox1,
+ i18n("This controls how <i>kppp</i> detects that the modem\n"
+ "is not responding. Unless you are having\n"
+ "problems with this, do not modify this setting.\n"
+ "\n"
+ "<b>Default</b>: Off"));
+#endif
+
+ modemcmds = new QPushButton(i18n("Mod&em Commands..."), parent);
+ QWhatsThis::add(modemcmds,
+ i18n("Allows you to change the AT command for\n"
+ "your modem."));
+
+ modeminfo_button = new QPushButton(i18n("&Query Modem..."), parent);
+ QWhatsThis::add(modeminfo_button,
+ i18n("Most modems support the ATI command set to\n"
+ "find out vendor and revision of your modem.\n"
+ "\n"
+ "Press this button to query your modem for\n"
+ "this information. It can be useful to help\n"
+ "you set up the modem"));
+
+ terminal_button = new QPushButton(i18n("&Terminal..."), parent);
+ QWhatsThis::add(terminal_button,
+ i18n("Opens the built-in terminal program. You\n"
+ "can use this if you want to play around\n"
+ "with your modem's AT command set"));
+
+ QHBoxLayout *hbox = new QHBoxLayout();
+ l1->addLayout(hbox);
+ hbox->addStretch(1);
+ QVBoxLayout *vbox = new QVBoxLayout();
+ hbox->addLayout(vbox);
+
+ vbox->addWidget(modemcmds);
+ vbox->addWidget(modeminfo_button);
+ vbox->addWidget(terminal_button);
+
+ hbox->addStretch(1);
+ l1->addStretch(1);
+
+ connect(modemcmds, SIGNAL(clicked()),
+ SLOT(modemcmdsbutton()));
+ connect(modeminfo_button, SIGNAL(clicked()),
+ SLOT(query_modem()));
+ connect(terminal_button, SIGNAL(clicked()),
+ SLOT(terminal()));
+
+ // Create the Modem Command so if the window is not opened they are autosaved anyway
+ mc = new ModemCommands(this);
+}
+
+
+void ModemWidget2::modemcmdsbutton() {
+ mc->exec();
+}
+
+
+void ModemWidget2::query_modem() {
+ ModemTransfer mt(this);
+ mt.exec();
+}
+
+
+void ModemWidget2::terminal() {
+ MiniTerm terminal(NULL,NULL);
+ terminal.exec();
+}
+
+
+#if 0
+void ModemWidget2::use_cdline_toggled(bool on) {
+ gpppdata.setUseCDLine(on);
+}
+#endif
+
+bool ModemWidget2::save()
+{
+ gpppdata.setWaitForDialTone(waitfordt->isOn());
+ gpppdata.setbusyWait(busywait->value());
+ gpppdata.setVolume(volume->value());
+ return true;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Setup widget for the graph
+//
+/////////////////////////////////////////////////////////////////////////////
+GraphSetup::GraphSetup(QWidget *parent, const char *name) :
+ QWidget(parent, name)
+{
+ QVBoxLayout *tl = new QVBoxLayout(parent);
+
+ bool enable;
+ QColor bg, text, in, out;
+ gpppdata.graphingOptions(enable, bg, text, in, out);
+
+ enable_check = new QCheckBox(i18n("&Enable throughput graph"), parent);
+ tl->addWidget(enable_check);
+
+ grpColor = new QGroupBox(2, Qt::Horizontal,
+ i18n("Graph Colors"), parent);
+ tl->addWidget(grpColor);
+
+ QLabel *label;
+
+ label = new QLabel(i18n("Bac&kground:"), grpColor);
+ bg_color = new KColorButton(bg, grpColor);
+ bg_color->setFixedSize(80, 24);
+ label->setBuddy(bg_color);
+
+ label = new QLabel(i18n("&Text:"), grpColor);
+ text_color = new KColorButton(text, grpColor);
+ text_color->setFixedSize(80, 24);
+ label->setBuddy(text_color);
+
+ label = new QLabel(i18n("I&nput bytes:"), grpColor);
+ in_color = new KColorButton(in, grpColor);
+ in_color->setFixedSize(80, 24);
+ label->setBuddy(in_color);
+
+ label = new QLabel(i18n("O&utput bytes:"), grpColor);
+ out_color = new KColorButton(out, grpColor);
+ out_color->setFixedSize(80, 24);
+ label->setBuddy(out_color);
+
+ tl->addStretch();
+
+ connect(enable_check, SIGNAL(toggled(bool)), this, SLOT(enableToggled(bool)));
+ connect(bg_color, SIGNAL(changed(const QColor &)),
+ SLOT(colorChanged(const QColor&)));
+ connect(text_color, SIGNAL(changed(const QColor &)),
+ SLOT(colorChanged(const QColor&)));
+ connect(in_color, SIGNAL(changed(const QColor &)),
+ SLOT(colorChanged(const QColor&)));
+ connect(out_color, SIGNAL(changed(const QColor &)),
+ SLOT(colorChanged(const QColor&)));
+
+ tl->activate();
+
+ enable_check->setChecked(enable);
+ enableToggled(enable);
+}
+
+void GraphSetup::enableToggled(bool b) {
+ grpColor->setEnabled(b);
+ save();
+}
+
+
+void GraphSetup::colorChanged(const QColor &) {
+ save();
+}
+
+void GraphSetup::save() {
+ gpppdata.setGraphingOptions(enable_check->isChecked(),
+ bg_color->color(),
+ text_color->color(),
+ in_color->color(),
+ out_color->color());
+}
+
+#include "general.moc"
diff --git a/kppp/general.h b/kppp/general.h
new file mode 100644
index 00000000..2781ac50
--- /dev/null
+++ b/kppp/general.h
@@ -0,0 +1,137 @@
+/*
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _GENERAL_H_
+#define _GENERAL_H_
+
+#include <qwidget.h>
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <qcheckbox.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <kcolorbutton.h>
+
+class QSlider;
+class KIntNumInput;
+class ModemCommands;
+
+class GeneralWidget : public QWidget {
+ Q_OBJECT
+public:
+ GeneralWidget( QWidget *parent=0, const char *name=0 );
+
+private slots:
+ void pppdtimeoutchanged(int);
+ void caption_toggled(bool);
+ void iconify_toggled(bool on);
+ void redial_toggled(bool on);
+ void nocarrier_toggled(bool on);
+ void xserver_toggled(bool on);
+ void quit_toggled(bool);
+ void docking_toggled(bool on);
+
+};
+
+
+class ModemWidget : public QWidget {
+ Q_OBJECT
+public:
+ ModemWidget(QWidget *parent=0, bool isnewmodem=true, const char *name=0);
+ bool save();
+ QLineEdit *connectName() { return connectname_l;}
+private slots:
+
+private:
+ QLineEdit *connectname_l;
+ QLabel *connect_label;
+
+ QComboBox *enter;
+ QLabel *label1;
+ QLabel *label2;
+ QLabel *labeltmp;
+ QLabel *labelenter;
+ QComboBox *modemdevice;
+ QComboBox *flowcontrol;
+
+ QComboBox *baud_c;
+ QLabel *baud_label;
+
+ KIntNumInput *modemtimeout;
+ QCheckBox *modemlockfile;
+ QStringList flowListItem;
+};
+
+
+class ModemWidget2 : public QWidget {
+ Q_OBJECT
+public:
+ ModemWidget2(QWidget *parent=0, const char *name=0);
+ bool save();
+
+private slots:
+// void use_cdline_toggled(bool);
+ void modemcmdsbutton();
+ void terminal();
+ void query_modem();
+
+private:
+ QLabel *labeltmp;
+ QPushButton *modemcmds;
+ QPushButton *modeminfo_button;
+ QPushButton *terminal_button;
+ QFrame *fline;
+ QCheckBox *waitfordt;
+ KIntNumInput *busywait;
+ QCheckBox *chkbox1;
+ QSlider *volume;
+
+ ModemCommands* mc;
+};
+
+class GraphSetup : public QWidget {
+ Q_OBJECT
+public:
+ GraphSetup(QWidget *parent = 0, const char *name = 0);
+
+private slots:
+ void enableToggled(bool);
+ void colorChanged(const QColor &);
+
+private:
+ void save();
+
+ QGroupBox *grpColor;
+ QCheckBox *enable_check;
+
+ KColorButton *bg_color;
+ KColorButton *text_color;
+ KColorButton *in_color;
+ KColorButton *out_color;
+
+};
+
+#endif
+
+
diff --git a/kppp/icons/Makefile.am b/kppp/icons/Makefile.am
new file mode 100644
index 00000000..19595145
--- /dev/null
+++ b/kppp/icons/Makefile.am
@@ -0,0 +1 @@
+KDE_ICON = kppp
diff --git a/kppp/icons/hi128-app-kppp.png b/kppp/icons/hi128-app-kppp.png
new file mode 100644
index 00000000..245db427
--- /dev/null
+++ b/kppp/icons/hi128-app-kppp.png
Binary files differ
diff --git a/kppp/icons/hi16-app-kppp.png b/kppp/icons/hi16-app-kppp.png
new file mode 100644
index 00000000..9de4c896
--- /dev/null
+++ b/kppp/icons/hi16-app-kppp.png
Binary files differ
diff --git a/kppp/icons/hi22-app-kppp.png b/kppp/icons/hi22-app-kppp.png
new file mode 100644
index 00000000..664388a4
--- /dev/null
+++ b/kppp/icons/hi22-app-kppp.png
Binary files differ
diff --git a/kppp/icons/hi32-app-kppp.png b/kppp/icons/hi32-app-kppp.png
new file mode 100644
index 00000000..cfb9129e
--- /dev/null
+++ b/kppp/icons/hi32-app-kppp.png
Binary files differ
diff --git a/kppp/icons/hi48-app-kppp.png b/kppp/icons/hi48-app-kppp.png
new file mode 100644
index 00000000..68b8c9f5
--- /dev/null
+++ b/kppp/icons/hi48-app-kppp.png
Binary files differ
diff --git a/kppp/icons/hi64-app-kppp.png b/kppp/icons/hi64-app-kppp.png
new file mode 100644
index 00000000..e10d360e
--- /dev/null
+++ b/kppp/icons/hi64-app-kppp.png
Binary files differ
diff --git a/kppp/iplined.cpp b/kppp/iplined.cpp
new file mode 100644
index 00000000..43367b16
--- /dev/null
+++ b/kppp/iplined.cpp
@@ -0,0 +1,42 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "iplined.h"
+
+IPLineEdit::IPLineEdit( QWidget *parent, const char *name )
+ : KRestrictedLine(parent, name, "0123456789.")
+{
+ setMaxLength(3 * 4 + 1 * 3);
+}
+
+QSize IPLineEdit::sizeHint() const {
+ QFontMetrics fm = fontMetrics();
+
+ QSize s;
+ s.setHeight(QLineEdit::sizeHint().height());
+ s.setWidth(fm.boundingRect("888.888.888.888XX").width());
+ return s;
+}
diff --git a/kppp/iplined.h b/kppp/iplined.h
new file mode 100644
index 00000000..e7d47787
--- /dev/null
+++ b/kppp/iplined.h
@@ -0,0 +1,40 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _IPLINED_H_
+#define _IPLINED_H_
+
+#include <krestrictedline.h>
+
+class IPLineEdit : public KRestrictedLine {
+public:
+ IPLineEdit( QWidget *parent=0, const char *name=0 );
+ ~IPLineEdit() {}
+
+ virtual QSize sizeHint() const;
+};
+
+#endif
diff --git a/kppp/kpppconfig.h b/kppp/kpppconfig.h
new file mode 100644
index 00000000..c1741fd0
--- /dev/null
+++ b/kppp/kpppconfig.h
@@ -0,0 +1,139 @@
+/* -*- C++ -*-
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef _KPPPCONFIG_H_
+#define _KPPPCONFIG_H_
+
+#if defined(__svr4__)
+#define STREAMS
+#define _XOPEN_SOURCE 1
+#define _XOPEN_SOURCE_EXTENDED 1
+#define __EXTENSIONS__
+#endif
+
+#include <config.h>
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+// Warning: If you fiddle with the following directories you have
+// to adjust make_directories() in main.cpp()
+
+// file used for PAP authetication purposes
+#define PAP_AUTH_FILE "/etc/ppp/pap-secrets"
+
+// file used for CHAP authetication purposes
+#define CHAP_AUTH_FILE "/etc/ppp/chap-secrets"
+
+// Define the default modem response timeout
+#define MODEM_TIMEOUT 60
+
+// Define the default modem tone duration (ATS11=)
+#define MODEM_TONEDURATION 70
+
+// Define the default time for pppd to get the interface up
+#define PPPD_TIMEOUT 30
+
+// Define the default time to wait after a busy signal before redialing
+#define BUSY_WAIT 0
+
+
+
+// Every PPP_STATS_INTERVAL milli seconds kppp will read
+// and display the ppp statistics IF the stats window
+// is visible. If the stats window is not visible
+// the stats are not taken.
+// 200 milli secs is 5 times per second and results in
+// 0 load on my machine. Play with this parameter if
+// you feel like it.
+
+#define PPP_STATS_INTERVAL 200
+// comment this out to get some more debugging info
+/*
+#define MY_DEBUG
+*/
+
+// Define the maximum number of accounts
+#define MAX_ACCOUNTS 100
+
+// Define the maximum number of modems
+#define MAX_MODEMS 100
+
+// Define the mamimum number of script entries
+#define MAX_SCRIPT_ENTRIES 20
+
+// Define the maximun number of DNS entries
+#define MAX_DNS_ENTRIES 5
+
+// Maximum size of the command executing pppd
+const unsigned int MAX_CMDLEN = 2024;
+
+// Define the maximum number of arguments passed to the pppd daemon
+#define MAX_PPPD_ARGUMENTS 20
+
+// Define the maximun number of lines of /etc/resolv.conf
+#define MAX_RESOLVCONF_LINES 128
+
+// Directory for modem lock files (Needed by mgetty users)
+#ifdef __linux__
+# define LOCK_DIR "/var/lock"
+#else /* linux */
+# ifdef BSD
+# define LOCK_DIR "/var/spool/lock"
+# else /* BSD */
+# define LOCK_DIR "/var/spool/locks"
+# endif /* BSD */
+#endif /* linux */
+
+// search path for pppd binary
+#define PPPDSEARCHPATH "/sbin:/usr/sbin:/usr/local/sbin:/usr/bin:/usr/local/bin"
+
+// name of the pppd binary
+#define PPPDNAME "pppd"
+
+// support for internal ISDN cards and modem emulation
+#ifdef __linux__
+#define ISDNSUPPORT
+#endif
+
+#if defined(__linux__) || defined(BSD)
+#define PPP_PID_DIR "/var/run/"
+#else
+#define PPP_PID_DIR "/etc/ppp/"
+#endif
+
+// defined in opener.cpp
+extern const char * const kppp_syslog[];
+
+#ifdef _XPG4_2
+#define __xnet_connect connect
+#endif
+
+#define CBTYPE_NONE 0
+#define CBTYPE_ADMIN 1
+#define CBTYPE_USER 2
+
+#endif
diff --git a/kppp/kpppwidget.cpp b/kppp/kpppwidget.cpp
new file mode 100644
index 00000000..9e635815
--- /dev/null
+++ b/kppp/kpppwidget.cpp
@@ -0,0 +1,1073 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * Copyright (C) 1998-2002 Harri Porten <porten@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "kpppwidget.h"
+
+#include <qapplication.h>
+#include <qcombobox.h>
+#include <qdir.h>
+#include <qevent.h>
+#include <qdialog.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qregexp.h>
+#include <kdialogbase.h>
+#include <qwhatsthis.h>
+
+#include <kaboutdata.h>
+#include <kapplication.h>
+#include <kbuttonbox.h>
+#include <kglobalsettings.h>
+#include <kcmdlineargs.h>
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kiconloader.h> // For BarIcon
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kseparator.h>
+#include <kstandarddirs.h>
+#include <kwin.h>
+#include <khelpmenu.h>
+#include <kpushbutton.h>
+#include <kguiitem.h>
+#include <kstdguiitem.h>
+
+#include <stdlib.h>
+#include <errno.h>
+
+#include "runtests.h"
+
+#include "main.h"
+#include "auth.h"
+#include "modem.h"
+#include "ppplog.h"
+#include "opener.h"
+#include "requester.h"
+#include "pppstats.h"
+#include "pppdata.h"
+#include "general.h"
+#include "modems.h"
+
+// delay disconnection for a second
+#define DISCONNECT_DELAY 1000
+
+extern KPPPWidget *p_kppp;
+
+KPPPWidget::KPPPWidget( QWidget *parent, const char *name )
+ : DCOPObject( "KpppIface" ), QWidget(parent, name)
+ , acct(0)
+ , m_bCmdlAccount (false)
+ , m_bCmdlModem (false)
+{
+ tabWindow = 0;
+
+ // before doing anything else, run a few tests
+
+ int result = runTests();
+ if(result == TEST_CRITICAL)
+ exit(4);
+
+ installEventFilter(this);
+
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+
+ l1 = new QGridLayout(4, 4);
+ tl->addLayout(l1);
+ l1->addColSpacing(0, 10);
+ l1->addColSpacing(3, 10);
+ l1->setColStretch(1, 3);
+ l1->setColStretch(2, 4);
+
+ label1 = new QLabel(i18n("C&onnect to: "), this);
+ l1->addWidget(label1, 0, 1);
+
+ connectto_c = new QComboBox(false, this);
+ label1->setBuddy(connectto_c);
+
+ connect(connectto_c, SIGNAL(activated(int)),
+ SLOT(newdefaultaccount(int)));
+ l1->addWidget(connectto_c, 0, 2);
+
+ label7 = new QLabel(i18n("Use &modem: "), this);
+ // l1->addWidget(label7, 1, 1); (done in resetmodems())
+ modem_c = new QComboBox(false, this);
+ label7->setBuddy(connectto_c);
+ m_bModemCShown = false;
+
+ connect(modem_c, SIGNAL(activated(int)),
+ SLOT(newdefaultmodem(int)));
+ // l1->addWidget(modem_c, 1, 2); (done in resetmodems())
+
+ ID_Label = new QLabel(i18n("&Login ID:"), this);
+ l1->addWidget(ID_Label, 2, 1);
+
+ // the entry line for usernames
+ ID_Edit = new QLineEdit(this);
+ ID_Label->setBuddy(ID_Edit);
+ l1->addWidget(ID_Edit, 2, 2);
+ connect(ID_Edit, SIGNAL(returnPressed()),
+ this, SLOT(enterPressedInID()));
+ QString tmp = i18n("<p>Type in the username that you got from your\n"
+ "ISP. This is especially important for PAP\n"
+ "and CHAP. You may omit this when you use\n"
+ "terminal-based or script-based authentication.\n"
+ "\n"
+ "<b>Important</b>: case is important here:\n"
+ "<i>myusername</i> is not the same as <i>MyUserName</i>.");
+
+ QWhatsThis::add(ID_Label,tmp);
+ QWhatsThis::add(ID_Edit,tmp);
+
+ PW_Label = new QLabel(i18n("&Password:"), this);
+ l1->addWidget(PW_Label, 3, 1);
+
+ PW_Edit= new QLineEdit(this);
+ PW_Label->setBuddy(PW_Edit);
+ PW_Edit->setEchoMode(QLineEdit::Password);
+ l1->addWidget(PW_Edit, 3, 2);
+ connect(PW_Edit, SIGNAL(returnPressed()),
+ this, SLOT(enterPressedInPW()));
+
+ tmp = i18n("<p>Type in the password that you got from your\n"
+ "ISP. This is especially important for PAP\n"
+ "and CHAP. You may omit this when you use\n"
+ "terminal-based or script-based authentication.\n"
+ "\n"
+ "<b>Important</b>: case is important here:\n"
+ "<i>mypassword</i> is not the same as <i>MyPassword</i>.");
+
+ QWhatsThis::add(PW_Label,tmp);
+ QWhatsThis::add(PW_Edit,tmp);
+
+ QHBoxLayout *l3 = new QHBoxLayout;
+ tl->addSpacing(5);
+ tl->addLayout(l3);
+ tl->addSpacing(5);
+ l3->addSpacing(10);
+ log = new QCheckBox(i18n("Show lo&g window"), this);
+ connect(log, SIGNAL(toggled(bool)),
+ this, SLOT(log_window_toggled(bool)));
+ log->setChecked(gpppdata.get_show_log_window());
+ l3->addWidget(log);
+
+ QWhatsThis::add(log,
+ i18n("<p>This controls whether a log window is shown.\n"
+ "A log window shows the communication between\n"
+ "<i>kppp</i> and your modem. This will help you\n"
+ "in tracking down problems.\n"
+ "\n"
+ "Turn it off if <i>kppp</i> routinely connects without\n"
+ "problems"));
+
+ fline = new KSeparator( KSeparator::HLine, this);
+ tl->addWidget(fline);
+
+ QHBoxLayout *l2 = new QHBoxLayout;
+ tl->addLayout(l2);
+
+ int minw = 0;
+ quit_b = new KPushButton(KStdGuiItem::quit(), this);
+ connect( quit_b, SIGNAL(clicked()), SLOT(quitbutton()));
+ if(quit_b->sizeHint().width() > minw)
+ minw = quit_b->sizeHint().width();
+
+ setup_b = new KPushButton(KGuiItem(i18n("Co&nfigure..."), "configure"), this);
+ connect( setup_b, SIGNAL(clicked()), SLOT(expandbutton()));
+ if(setup_b->sizeHint().width() > minw)
+ minw = setup_b->sizeHint().width();
+
+ if(gpppdata.access() != KConfig::ReadWrite)
+ setup_b->setEnabled(false);
+
+ help_b = new KPushButton(KStdGuiItem::help(), this);
+ connect( help_b, SIGNAL(clicked()), SLOT(helpbutton()));
+
+ KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true);
+ help_b->setPopup((QPopupMenu*)helpMenu->menu());
+
+ if(help_b->sizeHint().width() > minw)
+ minw = help_b->sizeHint().width();
+
+ connect_b = new QPushButton(i18n("&Connect"), this);
+ connect_b->setDefault(true);
+ connect_b->setFocus();
+ connect(connect_b, SIGNAL(clicked()), SLOT(beginConnect()));
+ if(connect_b->sizeHint().width() > minw)
+ minw = connect_b->sizeHint().width();
+
+ quit_b->setFixedWidth(minw);
+ setup_b->setFixedWidth(minw);
+ help_b->setFixedWidth(help_b->sizeHint().width());
+ connect_b->setFixedWidth(minw);
+
+ l2->addWidget(quit_b);
+ l2->addWidget(setup_b);
+ l2->addWidget(help_b);
+ l2->addSpacing(20);
+ l2->addWidget(connect_b);
+
+ setFixedSize(sizeHint());
+
+ (void)new Modem;
+
+ // we also connect cmld_start to the beginConnect so that I can run
+ // the dialer through a command line argument
+ connect(this,SIGNAL(cmdl_start()),this,SLOT(beginConnect()));
+
+ stats = new PPPStats;
+
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+
+ // constructor of con_win reads position from config file
+ con_win = new ConWindow(0, "conw", this, stats);
+ KWin::setIcons(con_win->winId(), kapp->icon(), kapp->miniIcon());
+
+ statdlg = new PPPStatsDlg(0, "stats", this, stats);
+ statdlg->hide();
+
+ debugwindow = new DebugWidget(0,"debugwindow");
+ KWin::setIcons(debugwindow->winId(), kapp->icon(), kapp->miniIcon());
+ debugwindow->hide();
+
+ // load up the accounts combo box
+
+ resetaccounts();
+ resetmodems();
+ con = new ConnectWidget(0, "con", stats);
+ KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() );
+ connect(this, SIGNAL(begin_connect()),con, SLOT(preinit()));
+
+ QRect desk = KGlobalSettings::desktopGeometry(topLevelWidget());
+ con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110);
+
+ // connect the ConnectWidgets various signals
+ connect(con, SIGNAL(closeDebugWindow()),
+ debugwindow, SLOT(hide()));
+ connect(con, SIGNAL(debugMessage(const QString &)),
+ debugwindow, SLOT(statusLabel(const QString &)));
+ connect(con, SIGNAL(toggleDebugWindow()),
+ debugwindow, SLOT(toggleVisibility()));
+ connect(con, SIGNAL(debugPutChar(unsigned char)),
+ debugwindow, SLOT(addChar(unsigned char)));
+ connect(con, SIGNAL(startAccounting()),
+ this, SLOT(startAccounting()));
+ connect(con, SIGNAL(stopAccounting()),
+ this, SLOT(stopAccounting()));
+ connect(KApplication::kApplication(), SIGNAL(saveYourself()),
+ this, SLOT(saveMyself()));
+ connect(KApplication::kApplication(), SIGNAL(shutDown()),
+ this, SLOT(shutDown()));
+
+ debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55,
+ debugwindow->width(),debugwindow->height());
+
+ move(desk.center().x()-width()/2, desk.center().y()-height()/2);
+
+
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ m_strCmdlAccount = args->getOption("c");
+ m_strCmdlModem = args->getOption("m");
+ m_bQuitOnDisconnect = args->isSet("q");
+
+ if(!m_strCmdlAccount.isEmpty()) {
+ m_bCmdlAccount = true;
+ kdDebug(5002) << "cmdl_account: " << m_bCmdlAccount << endl;
+ }
+
+ if(!m_strCmdlModem.isEmpty()) {
+ m_bCmdlModem = true;
+ kdDebug(5002) << "cmdl_modem: " << m_bCmdlModem << endl;
+ }
+
+ if(m_bCmdlModem){
+ bool result = gpppdata.setModem(m_strCmdlModem);
+ if (!result){
+ QString string;
+ string = i18n("No such Modem:\n%1\nFalling back to default").arg(m_strCmdlModem);
+ KMessageBox::error(this, string);
+ m_bCmdlModem = false;
+ }
+ }
+
+ if(m_bCmdlAccount){
+ bool result = gpppdata.setAccount(m_strCmdlAccount);
+ if (!result){
+ QString string;
+ string = i18n("No such Account:\n%1").arg(m_strCmdlAccount);
+ KMessageBox::error(this, string);
+ m_bCmdlAccount = false;
+ show();
+ } else {
+ beginConnect();
+ }
+ } else
+ show();
+
+
+//#define KPPP_SHOW_NEWS
+#ifdef KPPP_SHOW_NEWS
+ // keep user informed about recent changes
+ if(!m_bCmdlAccount)
+ showNews();
+#endif
+
+ // attach to the DCOP server, if possible
+ if (!kapp->dcopClient()->attach())
+ kdDebug(5002) << "Error: Could not connect to the DCOP server" << endl;
+ else
+ kapp->dcopClient()->registerAs(kapp->name(), true);
+
+ // this timer will delay the actual disconnection DISCONNECTION_DELAY ms
+ // to give applications time to shutdown, logout, whatever..
+ disconnectTimer = new QTimer(this);
+ connect(disconnectTimer, SIGNAL(timeout()), this, SLOT(delayedDisconnect()));
+}
+
+KPPPWidget::~KPPPWidget()
+{
+ delete stats;
+}
+
+bool KPPPWidget::eventFilter(QObject *o, QEvent *e) {
+ if(e->type() == QEvent::User) {
+ switch(((SignalEvent*)e)->sigType()) {
+ case SIGINT:
+ kdDebug(5002) << "Received a SIGINT" << endl;
+ interruptConnection();
+ break;
+ case SIGCHLD:
+ sigChld();
+ break;
+ case SIGUSR1:
+ sigPPPDDied();
+ break;
+ }
+ return true;
+ }
+
+ if(o == connect_b) {
+ if(e->type() == QEvent::KeyPress) {
+ if(connect_b->hasFocus() && ((QKeyEvent *)e)->key() == Qt::Key_Return) {
+ beginConnect();
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+void KPPPWidget::prepareSetupDialog() {
+ if(tabWindow == 0) {
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, i18n("KPPP Configuration"),
+ KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
+ kapp->mainWidget(), 0, true);
+
+
+ KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
+
+ // tabWindow->setFixedSize( 365, 375 );
+
+ accounts = new AccountWidget(tabWindow->addPage( i18n("&Accounts"), i18n("Account Setup") ) );
+ connect(accounts, SIGNAL(resetaccounts()),
+ this, SLOT(resetaccounts()));
+ connect(accounts, SIGNAL(resetCosts(const QString &)),
+ this, SLOT(resetCosts(const QString &)));
+ connect(accounts, SIGNAL(resetVolume(const QString &)),
+ this, SLOT(resetVolume(const QString &)));
+
+ modems = new ModemsWidget(tabWindow->addPage( i18n("&Modems"), i18n("Modems Setup") ) );
+ connect(modems, SIGNAL(resetmodems()),
+ this, SLOT(resetmodems()));
+
+ graph = new GraphSetup( tabWindow->addPage( i18n("&Graph"), i18n("Throughput Graph" ) ) );
+ general = new GeneralWidget( tabWindow->addPage( i18n("M&isc"), i18n("Miscellaneous Settings") ) );
+ }
+}
+
+
+void KPPPWidget::enterPressedInID() {
+ PW_Edit->setFocus();
+}
+
+
+void KPPPWidget::enterPressedInPW() {
+ connect_b->setFocus();
+}
+
+// triggered by the session manager
+void KPPPWidget::saveMyself() {
+ gpppdata.save();
+}
+
+void KPPPWidget::shutDown() {
+ interruptConnection();
+ saveMyself();
+}
+
+void KPPPWidget::log_window_toggled(bool on) {
+ gpppdata.set_show_log_window(on);
+}
+
+
+void KPPPWidget::setup() {
+ prepareSetupDialog();
+
+ if(tabWindow->exec())
+ gpppdata.save();
+ else
+ gpppdata.cancel();
+}
+
+
+void KPPPWidget::resetaccounts() {
+ connectto_c->clear();
+
+ int count = gpppdata.accountCount();
+
+ // enable/disable controls
+ connectto_c->setEnabled(count > 0);
+ setButtons();
+
+ //load the accounts
+ for(int i=0; i < count; i++) {
+ gpppdata.setAccountByIndex(i);
+ connectto_c->insertItem(gpppdata.accname());
+ }
+
+ //set the default account
+ if(!gpppdata.defaultAccount().isEmpty()) {
+ for(int i=0; i < count; i++)
+ if(gpppdata.defaultAccount() == connectto_c->text(i)) {
+ connectto_c->setCurrentItem(i);
+ gpppdata.setAccountByIndex(i);
+
+ ID_Edit->setText(gpppdata.storedUsername());
+ PW_Edit->setText(gpppdata.storedPassword());
+ }
+ }
+ else
+ if(count > 0) {
+ gpppdata.setDefaultAccount(connectto_c->text(0));
+ gpppdata.save();
+ ID_Edit->setText(gpppdata.storedUsername());
+ PW_Edit->setText(gpppdata.storedPassword());
+ }
+
+ connect(ID_Edit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(usernameChanged(const QString &)));
+
+ connect(PW_Edit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(passwordChanged(const QString &)));
+
+ if (ID_Edit->text().isEmpty())
+ ID_Edit->setFocus();
+ else if (PW_Edit->text().isEmpty())
+ PW_Edit->setFocus();
+
+}
+
+void KPPPWidget::resetmodems() {
+ modem_c->clear();
+
+ int count = gpppdata.modemCount();
+
+ // enable/disable controls
+ modem_c->setEnabled(count > 0);
+ setButtons();
+
+ //load the modems
+ for(int i=0; i < count; i++) {
+ gpppdata.setModemByIndex(i);
+ modem_c->insertItem(gpppdata.modname());
+ }
+
+ if (count > 1 && !m_bModemCShown) {
+ l1->addWidget(label7, 1, 1);
+ l1->addWidget(modem_c, 1, 2);
+ m_bModemCShown = true;
+ } else if (count <= 1 && m_bModemCShown){
+ l1->remove(label7);
+ l1->remove(modem_c);
+ m_bModemCShown = false;
+ }
+ label7->setShown(m_bModemCShown);
+ modem_c->setShown(m_bModemCShown);
+ layout()->invalidate();
+ setFixedSize(sizeHint());
+
+ //set the default modem
+ if(!gpppdata.defaultModem().isEmpty()) {
+ for(int i=0; i < count; i++)
+ if(gpppdata.defaultModem() == modem_c->text(i)) {
+ modem_c->setCurrentItem(i);
+ gpppdata.setModemByIndex(i);
+
+ }
+ }
+ else
+ if(count > 0) {
+ gpppdata.setDefaultModem(modem_c->text(0));
+ gpppdata.save();
+ }
+}
+
+void KPPPWidget::setButtons()
+{
+ int acccount = gpppdata.accountCount();
+ int modcount = gpppdata.modemCount();
+
+ // enable/disable controls
+ connect_b->setEnabled(acccount > 0 && modcount > 0);
+ log->setEnabled(acccount > 0 && modcount > 0);
+ ID_Edit->setEnabled(acccount > 0 && modcount > 0);
+ PW_Edit->setEnabled(acccount > 0 && modcount > 0);
+
+}
+
+
+void KPPPWidget::interruptConnection() {
+ // interrupt dial up
+ if (con->isVisible())
+ emit con->cancelbutton();
+
+ // disconnect if online
+ if (gpppdata.pppdRunning())
+ emit disconnect(); /* FIXME: are we emitting a slot here!!!??? */
+}
+
+void KPPPWidget::sigPPPDDied() {
+ kdDebug(5002) << "Received a SIGUSR1" << endl;
+
+ // if we are not connected pppdpid is -1 so have have to check for that
+ // in the followin line to make sure that we don't raise a false alarm
+ // such as would be the case when the log file viewer exits.
+ if(gpppdata.pppdRunning() || gpppdata.pppdError()) {
+ kdDebug(5002) << "It was pppd that died" << endl;
+
+ // when we killpppd() on Cancel in ConnectWidget
+ // we set pppid to -1 so we won't
+ // enter this block
+
+ // just to be sure
+ Requester::rq->removeSecret(AUTH_PAP);
+ Requester::rq->removeSecret(AUTH_CHAP);
+
+ gpppdata.setpppdRunning(false);
+
+ // stop the disconnect timer (just in case)
+ disconnectTimer->stop();
+ // signal other applications that we are disconnected now
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+
+ kdDebug(5002) << "Executing command on disconnect since pppd has died." << endl;
+ QApplication::flushX();
+ execute_command(gpppdata.command_on_disconnect());
+
+ stopAccounting();
+
+ con_win->stopClock();
+ DockWidget::dock_widget->stop_stats();
+ DockWidget::dock_widget->hide();
+
+ if(!gpppdata.pppdError())
+ gpppdata.setpppdError(E_PPPD_DIED);
+ removedns();
+ Modem::modem->unlockdevice();
+ con->pppdDied();
+
+ Requester::rq->pppdExitStatus();
+ gpppdata.setWaitCallback(gpppdata.callbackType() && Requester::rq->lastStatus == E_CBCP_WAIT);
+
+ if(!gpppdata.automatic_redial() && !gpppdata.waitCallback()) {
+ quit_b->setFocus();
+ show();
+ con_win->stopClock();
+ stopAccounting();
+ con_win->hide();
+ con->hide();
+
+ gpppdata.setpppdRunning(false);
+ // // not in a signal handler !!! KNotifyClient::beep();
+ QString msg;
+ if (gpppdata.pppdError() == E_IF_TIMEOUT)
+ msg = i18n("Timeout expired while waiting for the PPP interface "
+ "to come up.");
+ else {
+ msg = i18n("<p>The pppd daemon died unexpectedly!</p>");
+ Requester::rq->pppdExitStatus();
+ if (Requester::rq->lastStatus != 99) { // more recent pppds only
+ msg += i18n("<p>Exit status: %1").arg(Requester::rq->lastStatus);
+ msg += i18n("</p><p>See 'man pppd' for an explanation of the error "
+ "codes or take a look at the kppp FAQ on "
+ " <a href=\"%1\">%2</a></p>")
+ .arg("http://developer.kde.org/~kppp/index.html")
+ .arg("http://developer.kde.org/~kppp/index.html");
+ }
+ }
+
+ if(KMessageBox::warningYesNo(0, msg, i18n("Error"), KStdGuiItem::ok(), i18n("&Details")) == KMessageBox::No)
+ PPPL_ShowLog();
+ } else { /* reconnect on disconnect */
+ if(gpppdata.waitCallback())
+ kdDebug(5002) << "Waiting for callback... " << endl;
+ else
+ kdDebug(5002) << "Trying to reconnect... " << endl;
+
+ if(gpppdata.authMethod() == AUTH_PAP ||
+ gpppdata.authMethod() == AUTH_CHAP ||
+ gpppdata.authMethod() == AUTH_PAPCHAP)
+ Requester::rq->setSecret(gpppdata.authMethod(),
+ encodeWord(gpppdata.storedUsername()),
+ encodeWord(gpppdata.password()));
+
+ con_win->hide();
+ con_win->stopClock();
+ stopAccounting();
+ gpppdata.setpppdRunning(false);
+ // not in a signal handler !!! KNotifyClient::beep();
+ emit cmdl_start();
+ }
+ }
+ gpppdata.setpppdError(0);
+}
+
+
+void KPPPWidget::sigChld() {
+ kdDebug(5002) << "sigchld()" << endl;
+ // pid_t id = wait(0L);
+ // if(id == helperPid && helperPid != -1) {
+ // kdDebug(5002) << "It was the setuid child that died" << endl;
+ // helperPid = -1;
+ QString msg = i18n("kppp's helper process just died.\n"
+ "Since further execution would be pointless, "
+ "kppp will shut down now.");
+ KMessageBox::error(0L, msg);
+ remove_pidfile();
+ exit(1);
+ // }
+}
+
+
+void KPPPWidget::newdefaultaccount(int i) {
+ gpppdata.setDefaultAccount(connectto_c->text(i));
+ gpppdata.save();
+ ID_Edit->setText(gpppdata.storedUsername());
+ PW_Edit->setText(gpppdata.storedPassword());
+}
+
+void KPPPWidget::newdefaultmodem(int i) {
+ gpppdata.setDefaultModem(modem_c->text(i));
+ gpppdata.save();
+}
+
+
+
+void KPPPWidget::expandbutton() {
+ setup();
+}
+
+
+void KPPPWidget::beginConnect() {
+ // make sure to connect to the account that is selected in the combo box
+ // (exeption: an account given by a command line argument)
+ if(!m_bCmdlAccount) {
+ gpppdata.setAccount(connectto_c->currentText());
+ gpppdata.setPassword(PW_Edit->text());
+ } else {
+ gpppdata.setPassword(gpppdata.storedPassword());
+ }
+
+ QFileInfo info(pppdPath());
+
+ if(!info.exists()){
+ KMessageBox::error(this, i18n("Cannot find the PPP daemon!\n"
+ "Make sure that pppd is installed and "
+ "that you have entered the correct path."));
+ return;
+ }
+#if 0
+ if(!info.isExecutable()){
+
+ QString string;
+ string = i18n("kppp cannot execute:\n %1\n"
+ "Please make sure that you have given kppp "
+ "setuid permission and that "
+ "pppd is executable.").arg(gpppdata.pppdPath());
+ KMessageBox::error(this, string);
+ return;
+
+ }
+#endif
+
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ QString device = "";
+ if (args->isSet("dev"))
+ device = args->getOption("dev");
+ else
+ device = gpppdata.modemDevice();
+
+ QFileInfo info2(device);
+
+ if(!info2.exists()){
+ QString string;
+ string = i18n("kppp can not find:\n %1\nPlease make sure you have setup "
+ "your modem device properly "
+ "and/or adjust the location of the modem device on "
+ "the modem tab of "
+ "the setup dialog.").arg(device);
+ KMessageBox::error(this, string);
+ return;
+ }
+
+ // if this is a PAP or CHAP account, ensure that username is
+ // supplied
+ if(gpppdata.authMethod() == AUTH_PAP ||
+ gpppdata.authMethod() == AUTH_CHAP ||
+ gpppdata.authMethod() == AUTH_PAPCHAP ) {
+ if(ID_Edit->text().isEmpty()) {
+ KMessageBox::error(this,
+ i18n(
+ "You have selected the authentication "
+ "method PAP or CHAP. This requires that you "
+ "supply a username and a password."));
+ return;
+ } else {
+ if(!Requester::rq->setSecret(gpppdata.authMethod(),
+ encodeWord(gpppdata.storedUsername()),
+ encodeWord(gpppdata.password()))) {
+ QString s;
+ s = i18n("Cannot create PAP/CHAP authentication\n"
+ "file \"%1\"").arg(PAP_AUTH_FILE);
+ KMessageBox::error(this, s);
+ return;
+ }
+ }
+ }
+
+ if (gpppdata.phonenumber().isEmpty()) {
+ QString s = i18n("You must specify a telephone number.");
+ KMessageBox::error(this, s);
+ return;
+ }
+
+ hide();
+
+ QString tit = i18n("Connecting to: %1").arg(gpppdata.accname());
+ con->setCaption(tit);
+ con->enableButtons();
+ con->show();
+
+ bool show_debug = gpppdata.get_show_log_window();
+ con->debug->setOn(show_debug); // toggle button
+ debugwindow->clear();
+ if (!show_debug)
+ debugwindow->hide();
+ else {
+ debugwindow->show();
+ con->raise();
+ }
+
+ emit begin_connect();
+}
+
+void KPPPWidget::disconnect() {
+ if (disconnectTimer->isActive()) return; // you had already pressed disconnect before
+
+ // signal other applications that we are about to go offline now
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToDisconnect()", QByteArray());
+ con_win->hide();
+ con->show();
+ con->disableButtons(); // will reenable them later in delayedDisconnect()
+ con->setCaption(i18n("Disconnecting..."));
+
+ if (!gpppdata.command_before_disconnect().isEmpty()) {
+ con->setMsg(i18n("Executing command before disconnection."));
+
+ kapp->processEvents();
+ QApplication::flushX();
+ pid_t id = execute_command(gpppdata.command_before_disconnect());
+ int i, status;
+
+ do {
+ kapp->processEvents();
+ i = waitpid(id, &status, WNOHANG);
+ usleep(500000);
+ } while (i == 0 && errno == 0);
+ }
+
+ con->setMsg(i18n("Announcing disconnection."));
+
+ // this is no longer necessary since I'm delaying disconnection usign a QTimer
+ // kapp->processEvents();
+
+ // set the timer to call delayedDisconnect() in DISCONNECT_DELAY ms
+ disconnectTimer->start(DISCONNECT_DELAY, true);
+}
+
+void KPPPWidget::delayedDisconnect() {
+ // this is where the actual disconnection takes place
+ con->hide();
+
+ statdlg->stop_stats();
+ Requester::rq->killPPPDaemon();
+
+ // signal other applications that we are disconnected now
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+
+ QApplication::flushX();
+ execute_command(gpppdata.command_on_disconnect());
+
+ Requester::rq->removeSecret(AUTH_PAP);
+ Requester::rq->removeSecret(AUTH_CHAP);
+
+ removedns();
+ Modem::modem->unlockdevice();
+
+ con_win->stopClock();
+ p_kppp->stopAccounting();
+ con_win->hide();
+
+ DockWidget::dock_widget->stop_stats();
+ DockWidget::dock_widget->hide();
+
+ if(m_bQuitOnDisconnect)
+ kapp->exit(0);
+ else {
+ quit_b->setFocus();
+ show();
+ }
+}
+
+
+void KPPPWidget::helpbutton() {
+ kapp->invokeHelp();
+}
+
+
+void KPPPWidget::quitbutton() {
+ if(gpppdata.pppdRunning()) {
+ int ok = KMessageBox::warningContinueCancel(this,
+ i18n("Exiting kPPP will close your PPP Session."),
+ i18n("Quit kPPP?"), KStdGuiItem::quit());
+ if(ok == KMessageBox::Continue) {
+ Requester::rq->killPPPDaemon();
+
+ // stop the disconnect delay timer
+ disconnectTimer->stop();
+
+ // signal other applications that we are disconnected now
+ kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray());
+
+ QApplication::flushX();
+ execute_command(gpppdata.command_on_disconnect());
+ removedns();
+ Modem::modem->unlockdevice();
+ }
+ } else {
+ if (!gpppdata.accname().isEmpty() && !gpppdata.storePassword())
+ gpppdata.setStoredPassword("");
+ }
+ gpppdata.save();
+ kapp->quit();
+}
+
+
+void KPPPWidget::rulesetLoadError() {
+ KMessageBox::error(this, ruleset_load_errmsg);
+}
+
+
+void KPPPWidget::startAccounting() {
+ // volume accounting
+ stats->totalbytes = 0;
+
+ kdDebug(5002) << "AcctEnabled: " << gpppdata.AcctEnabled() << endl;
+
+ // load the ruleset
+ if(!gpppdata.AcctEnabled())
+ return;
+
+ QString d = AccountingBase::getAccountingFile(gpppdata.accountingFile());
+ // if(::access(d.data(), X_OK) != 0)
+ acct = new Accounting(this, stats);
+ // else
+ // acct = new ExecutableAccounting(this);
+
+ // connect to the accounting object
+ connect(acct, SIGNAL(changed(QString, QString)),
+ con_win, SLOT(slotAccounting(QString, QString)));
+
+ if(!acct->loadRuleSet(gpppdata.accountingFile())) {
+ QString s= i18n("Can not load the accounting "
+ "ruleset \"%1\".").arg(gpppdata.accountingFile());
+
+ // starting the messagebox with a timer will prevent us
+ // from blocking the calling function ConnectWidget::timerEvent
+ ruleset_load_errmsg = s;
+ QTimer::singleShot(0, this, SLOT(rulesetLoadError()));
+ return;
+ } else
+ acct->slotStart();
+}
+
+void KPPPWidget::stopAccounting() {
+ // store volume accounting
+ if(stats->totalbytes != 0)
+ gpppdata.setTotalBytes(stats->totalbytes);
+
+ if(!gpppdata.AcctEnabled())
+ return;
+
+ if(acct != 0) {
+ acct->slotStop();
+ delete acct;
+ acct = 0;
+ }
+}
+
+
+void KPPPWidget::showStats() {
+ if(statdlg) {
+ statdlg->toCurrentDesktop();
+ statdlg->show();
+ statdlg->raise();
+ }
+}
+
+
+void KPPPWidget::usernameChanged(const QString &) {
+ // store username for later use
+ gpppdata.setStoredUsername(ID_Edit->text());
+}
+
+
+void KPPPWidget::passwordChanged(const QString &) {
+ // store the password if so requested
+ if(gpppdata.storePassword())
+ gpppdata.setStoredPassword(PW_Edit->text());
+ else
+ gpppdata.setStoredPassword("");
+}
+
+
+void KPPPWidget::setPW_Edit(const QString &pw) {
+ PW_Edit->setText(pw);
+}
+
+
+void KPPPWidget::resetCosts(const QString &s) {
+ AccountingBase::resetCosts(s);
+}
+
+
+void KPPPWidget::resetVolume(const QString &s) {
+ AccountingBase::resetVolume(s);
+}
+
+/**
+ * pppd's getword() function knows about escape characters.
+ * If we write the username and password to the secrets file
+ * we'll therefore have to escape back slashes.
+ */
+QString KPPPWidget::encodeWord(const QString &s) {
+ QString r = s;
+ r.replace(QRegExp("\\"), "\\\\");
+ return r;
+}
+
+void KPPPWidget::setQuitOnDisconnect (bool b)
+{
+ m_bQuitOnDisconnect = b;
+}
+
+void KPPPWidget::showNews() {
+#ifdef KPPP_SHOW_NEWS
+ /*
+ * Introduce the QuickHelp feature to new users of this version
+ */
+ #define QUICKHELP_HINT "Hint_QuickHelp"
+ if(gpppdata.readNumConfig(GENERAL_GRP, QUICKHELP_HINT, 0) == 0) {
+ QDialog dlg(0, 0, true);
+ dlg.setCaption(i18n("Recent Changes in KPPP"));
+
+ QVBoxLayout *tl = new QVBoxLayout(&dlg, 10, 10);
+ QHBoxLayout *l1 = new QHBoxLayout(10);
+ QVBoxLayout *l2 = new QVBoxLayout(10);
+ tl->addLayout(l1);
+
+ QLabel *icon = new QLabel(&dlg);
+ icon->setPixmap(BarIcon("exclamation"));
+ icon->setFixedSize(icon->sizeHint());
+ l1->addWidget(icon);
+ l1->addLayout(l2);
+
+ QLabel *l = new QLabel(i18n("From version 1.4.8 on, kppp has a new feature\n"
+ "called \"Quickhelp\". It's similar to a tooltip,\n"
+ "but you can activate it whenever you want.\n"
+ "\n"
+ "To activate it, simply click on a control like\n"
+ "a button or a label with the right mouse button.\n"
+ "If the item supports Quickhelp, a popup menu\n"
+ "will appear leading to Quickhelp.\n"
+ "\n"
+ "To test it, right-click somewhere in this text."),
+ &dlg);
+
+ QCheckBox *cb = new QCheckBox(i18n("Don't show this hint again"), &dlg);
+ cb->setFixedSize(cb->sizeHint());
+
+ KButtonBox *bbox = new KButtonBox(&dlg);
+ bbox->addStretch(1);
+ QPushButton *ok = bbox->addButton(KStdGuiItem::ok());
+ ok->setDefault(true);
+ dlg.connect(ok, SIGNAL(clicked()),
+ &dlg, SLOT(accept()));
+ bbox->addStretch(1);
+ bbox->layout();
+
+ l2->addWidget(l);
+ l2->addWidget(cb);
+ tl->addWidget(bbox);
+
+ QString tmp = i18n("This is an example of <b>QuickHelp</b>.\n"
+ "This window will stay open until you\n"
+ "click a mouse button or a press a key.\n");
+
+ QWhatsThis::add(cb,tmp);
+ QWhatsThis::add(l, tmp);
+
+ dlg.exec();
+ if(cb->isChecked()) {
+ gpppdata.writeConfig(GENERAL_GRP, QUICKHELP_HINT, 1);
+ gpppdata.save();
+ }
+ }
+#endif
+}
+
+
+#include "kpppwidget.moc"
+
diff --git a/kppp/kpppwidget.h b/kppp/kpppwidget.h
new file mode 100644
index 00000000..5ed4f85c
--- /dev/null
+++ b/kppp/kpppwidget.h
@@ -0,0 +1,174 @@
+/*
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * Copyright (C) 1998-2002 Harri Porten <porten@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __KPPPWIDGET_H__
+#define __KPPPWIDGET_H__
+
+#include <qstring.h>
+
+#include <dcopclient.h>
+
+#include "accounting.h"
+#include "conwindow.h"
+#include "accounts.h"
+#include "connect.h"
+#include "debug.h"
+#include "pppstatdlg.h"
+
+#include "KPPPIface.h"
+
+class GeneralWidget;
+class ModemsWidget;
+class ModemWidget;
+class ModemWidget2;
+class GraphSetup;
+class AboutWidget;
+class PPPStats;
+class KDialogBase;
+class KPushButton;
+
+class SignalEvent : public QEvent {
+public:
+ SignalEvent(int s) : QEvent(User), sig(s) { }
+ int sigType() const { return sig; }
+private:
+ int sig;
+};
+
+
+class KPPPWidget : public QWidget, virtual public KpppIface {
+ Q_OBJECT
+public:
+
+ KPPPWidget( QWidget *parent=0, const char *name=0 );
+ ~KPPPWidget();
+
+ void setPW_Edit(const QString &);
+ virtual bool eventFilter(QObject *, QEvent *);
+
+ void setQuitOnDisconnect (bool b);
+ bool quitOnDisconnect () {return m_bQuitOnDisconnect;};
+
+private slots:
+ void newdefaultaccount(int);
+ void newdefaultmodem(int);
+ void expandbutton();
+ void quitbutton();
+ void helpbutton();
+ void setup();
+ void rulesetLoadError();
+ void usernameChanged(const QString &);
+ void passwordChanged(const QString &);
+ void enterPressedInID();
+ void enterPressedInPW();
+ void saveMyself();
+ void shutDown();
+
+ void delayedDisconnect();
+
+public slots:
+ void beginConnect();
+ void resetaccounts();
+ void resetmodems();
+ void resetCosts(const QString &);
+ void resetVolume(const QString &);
+ void disconnect();
+ void log_window_toggled(bool on);
+ void startAccounting();
+ void stopAccounting();
+ void showStats();
+ bool isConnected() const {return connected;};
+signals:
+ void begin_connect();
+ void cmdl_start();
+
+public:
+ QCheckBox *log;
+ bool connected;
+ DebugWidget *debugwindow;
+ QString con_speed;
+ ConnectWidget *con;
+ ConWindow *con_win;
+ PPPStatsDlg *statdlg;
+ AccountingBase *acct;
+ KPushButton *quit_b;
+ PPPStats *stats;
+
+private:
+ void prepareSetupDialog();
+ void interruptConnection();
+ void sigChld();
+ void sigPPPDDied();
+ QString encodeWord(const QString &s);
+ void showNews ();
+ void setButtons();
+
+ QString ruleset_load_errmsg;
+
+ QGridLayout *l1;
+ KPushButton *help_b;
+ KPushButton *setup_b;
+ QFrame *fline;
+ QFrame *fline1;
+ QPushButton *connect_b;
+ QComboBox *connectto_c;
+ QComboBox *modem_c;
+ QLabel *ID_Label;
+ QLabel *PW_Label;
+ QLineEdit *ID_Edit;
+ QLineEdit *PW_Edit;
+ QLabel *label1;
+ QLabel *label2;
+ QLabel *label3;
+ QLabel *label4;
+ QLabel *label5;
+ QLabel *label6;
+ QLabel *label7;
+ QLabel *radio_label;
+
+
+ KDialogBase *tabWindow;
+ AccountWidget *accounts;
+ GeneralWidget *general;
+ ModemsWidget *modems;
+ GraphSetup *graph;
+ AboutWidget *about;
+
+
+ QString m_strCmdlAccount;
+ QString m_strCmdlModem;
+ bool m_bQuitOnDisconnect;
+ bool m_bCmdlAccount;
+ bool m_bCmdlModem;
+ bool m_bModemCShown;
+
+
+ QTimer *disconnectTimer;
+};
+
+
+#endif
+
diff --git a/kppp/loginterm.cpp b/kppp/loginterm.cpp
new file mode 100644
index 00000000..a01fcf2d
--- /dev/null
+++ b/kppp/loginterm.cpp
@@ -0,0 +1,168 @@
+/*
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997-98 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was contributed by Harri Porten <porten@tu-harburg.de>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "kstdguiitem.h"
+
+#include "loginterm.h"
+#include "main.h"
+#include "modem.h"
+
+#include <stdio.h>
+#include <klocale.h>
+
+extern KPPPWidget *p_kppp;
+
+LoginMultiLineEdit::LoginMultiLineEdit(QWidget *parent, const char *name)
+ : QMultiLineEdit(parent, name)
+{
+}
+
+
+LoginMultiLineEdit::~LoginMultiLineEdit() {
+ Modem::modem->stop();
+}
+
+
+void LoginMultiLineEdit::insertChar(unsigned char c) {
+ QMultiLineEdit::insert(QChar(c));
+ p_kppp->debugwindow->addChar(c);
+}
+
+
+void LoginMultiLineEdit::myreturn() {
+ QMultiLineEdit::home();
+}
+
+
+void LoginMultiLineEdit::mynewline() {
+ QMultiLineEdit::end(FALSE);
+ QMultiLineEdit::newLine();
+
+ p_kppp->debugwindow->addChar('\n');
+}
+
+
+void LoginMultiLineEdit::keyPressEvent(QKeyEvent *k) {
+ unsigned char c = (unsigned char) k->ascii();
+
+ if ((int)c == 0) return;
+
+ if((int)c == 13)
+ Modem::modem->writeLine("");
+ else
+ Modem::modem->writeChar(c);
+}
+
+
+void LoginMultiLineEdit::readChar(unsigned char c) {
+
+ if(((int)c != 13) && ((int)c != 10) && ((int)c != 8))
+ insertChar(c);
+
+ if((int)c == 8)
+ backspace();
+ if((int)c == 127)
+ backspace();
+ if((int)c == 10)
+ mynewline();
+ if((int)c == 13)
+ myreturn();
+}
+
+
+LoginTerm::LoginTerm (QWidget *parent, const char *name)
+ : QDialog(parent, name, FALSE)
+{
+ setCaption(i18n("Login Terminal Window"));
+ setMinimumSize(300, 200);
+ setMaximumSize(600, 400);
+ resize(400, 300);
+
+ QVBoxLayout *tl = new QVBoxLayout(this, 2);
+ QGridLayout *vgr = new QGridLayout(2, 1);
+ QGridLayout *hgr = new QGridLayout(1, 2, 30);
+
+ tl->addLayout(vgr);
+ vgr->addLayout(hgr, 1, 0);
+ vgr->setRowStretch(0, 1);
+ vgr->addRowSpacing(1, 40);
+
+ text_window = new LoginMultiLineEdit(this, "term");
+ text_window->setFocus();
+ vgr->addWidget(text_window, 0, 0);
+
+ cancel_b = new KPushButton(KStdGuiItem::cancel(), this, "cancel");
+ cancel_b->setFixedHeight(25);
+ connect(cancel_b, SIGNAL(clicked()), SLOT(cancelbutton()));
+
+ continue_b = new KPushButton(KStdGuiItem::cont(), this, "continue");
+ continue_b->setFixedHeight(25);
+ connect(continue_b, SIGNAL(clicked()), SLOT(continuebutton()));
+
+ int mwidth;
+ if (cancel_b->sizeHint().width() > continue_b->sizeHint().width())
+ mwidth = cancel_b->sizeHint().width();
+ else
+ mwidth = continue_b->sizeHint().width();
+
+ cancel_b->setFixedWidth(mwidth + 20);
+ continue_b->setFixedWidth(mwidth + 20);
+
+ hgr->addWidget(cancel_b, 0, 0, AlignCenter);
+ hgr->addWidget(continue_b, 0, 1, AlignCenter);
+
+ cont = false;
+
+ Modem::modem->notify(text_window, SLOT(readChar(unsigned char)));
+}
+
+
+void LoginTerm::cancelbutton () {
+ hide();
+}
+
+
+void LoginTerm::continuebutton() {
+ cont = true;
+ hide();
+}
+
+
+bool LoginTerm::pressedContinue() {
+ return cont;
+}
+
+
+#include "loginterm.moc"
+
+
+
+
+
+
+
+
+
diff --git a/kppp/loginterm.h b/kppp/loginterm.h
new file mode 100644
index 00000000..1fa3f05d
--- /dev/null
+++ b/kppp/loginterm.h
@@ -0,0 +1,50 @@
+#ifndef _LOGINTERM_H_
+#define _LOGINTERM_H_
+
+#include <qdialog.h>
+#include <qmultilineedit.h>
+#include <qapplication.h>
+#include <qtimer.h>
+
+class LoginMultiLineEdit : public QMultiLineEdit {
+
+ Q_OBJECT
+
+public:
+
+ LoginMultiLineEdit(QWidget *parent, const char *name);
+ ~LoginMultiLineEdit();
+
+ void keyPressEvent(QKeyEvent *k);
+ void insertChar(unsigned char c);
+ void myreturn();
+ void mynewline();
+
+public slots:
+ void readChar(unsigned char);
+};
+
+
+class LoginTerm : public QDialog {
+ Q_OBJECT
+public:
+ LoginTerm(QWidget *parent, const char *name);
+
+ bool pressedContinue();
+
+public slots:
+ void cancelbutton();
+ void continuebutton();
+
+private:
+ LoginMultiLineEdit *text_window;
+ QPushButton *cancel_b;
+ QPushButton *continue_b;
+
+ bool cont;
+};
+
+#endif
+
+
+
diff --git a/kppp/logview/Makefile.am b/kppp/logview/Makefile.am
new file mode 100644
index 00000000..e95b7c73
--- /dev/null
+++ b/kppp/logview/Makefile.am
@@ -0,0 +1,45 @@
+
+# this 10 paths are KDE specific. Use them:
+# kde_htmldir Where your docs should go to. (contains lang subdirs)
+# kde_appsdir Where your application file (.desktop) should go to.
+# kde_icondir Where your icon should go to.
+# kde_minidir Where your mini icon should go to.
+# kde_datadir Where you install application data. (Use a subdir)
+# kde_locale Where translation files should go to.(contains lang subdirs)
+# kde_cgidir Where cgi-bin executables should go to.
+# kde_confdir Where config files should go to.
+# kde_mimedir Where mimetypes should go to.
+# kde_toolbardir Where general toolbar icons should go to.
+# kde_wallpaperdir Where general wallpapers should go to.
+
+# if you use a variable *dir and have *_DATA, it will be installed by
+# make install
+xdg_apps_DATA = kppplogview.desktop
+
+EXTRA_DIST = $(xdg_apps_DATA)
+
+# set the include path for X, qt and KDE
+INCLUDES= $(all_includes)
+# claim, which subdirectories you want to install
+
+# This one gets installed
+bin_PROGRAMS = kppplogview
+
+# Which sources should be compiled for kppp.
+kppplogview_SOURCES = main.cpp loginfo.cpp log.cpp monthly.cpp export.cpp
+
+# the library search path
+kppplogview_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+
+# the libraries to link against. Be aware of the order. First the libraries,
+# that depend on the following ones.
+kppplogview_LDADD = -lm $(LIB_KDEUI) $(LIB_KFILE)
+
+# this option you can leave out. Just, if you use "make dist", you need it
+noinst_HEADERS = export.h loginfo.h log.h monthly.h main.h
+
+METASOURCES = main.moc monthly.moc export.moc
+
+messages:
+ $(XGETTEXT) *.cpp *.h -o $(podir)/kppplogview.pot
+
diff --git a/kppp/logview/export.cpp b/kppp/logview/export.cpp
new file mode 100644
index 00000000..6bbf2159
--- /dev/null
+++ b/kppp/logview/export.cpp
@@ -0,0 +1,276 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This file has been contributed by Tilo Ulbrich <TiloUlbrich@web.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "export.h"
+
+#include <qpushbutton.h>
+#include <qtextcodec.h>
+
+class Export;
+
+/***** ExportFormats *****/
+static struct {
+ int id;
+ QString name;
+ QString desc;
+ QString ext;
+ }
+
+ExportFormats [] = {
+ { 1, I18N_NOOP("CSV"),
+ I18N_NOOP("Export to a text file, using semicolons as separators.<p></p>Can be used for spreadsheet programs like <i>KSpread</i>."),
+ "csv" },
+ { 2, I18N_NOOP("HTML"),
+ I18N_NOOP("Export to a HTML Page.<p></p>Can be used for easy exchange over the <i>Internet</i>."),
+ "html" },
+ { 0, 0, 0, 0 } /* !! don't forget !! */
+};
+
+
+/***** ExportWizard *****/
+ExportWizard::ExportWizard(QWidget *parent, const QString &_date)
+ : KWizard(parent, "", true) {
+ date = _date;
+
+ filterID = 0;
+
+ setCaption(i18n("Export Wizard for kPPP Logs"));
+
+ /* format-page */
+ formatPage = new QWidget();
+ QHBoxLayout *formatLayout = new QHBoxLayout(formatPage);
+
+ typeList = new QListBox(formatPage);
+ connect(typeList, SIGNAL(highlighted(int)), SLOT (typeHighlighted(int)));
+ typeList->setMinimumSize(50, 200);
+ QToolTip::add(typeList, i18n("List with possible output formats"));
+ int i=0;
+ while (ExportFormats[i].id) { // add each format to the list
+ typeList->insertItem(i18n(ExportFormats[i].name.utf8()));
+ i++;
+ }
+
+ formatLayout->addWidget(typeList);
+ formatLayout->addSpacing(10);
+
+ typeInfo = new QLabel(formatPage);
+ typeInfo->setAlignment(Qt::AlignTop | Qt::WordBreak);
+ typeInfo->setText(i18n("<qt><b>Please choose the output format on the left side.</b></qt>"));
+ typeInfo->setMinimumSize(350, 200);
+ formatLayout->addWidget(typeInfo);
+
+ addPage(formatPage, i18n("Selection of Filetype"));
+
+
+ /* filename-page */
+ filenamePage = new QWidget();
+ QVBoxLayout *filenameLayout = new QVBoxLayout( filenamePage );
+
+ QLabel *fnLbl = new QLabel(filenamePage);
+ fnLbl->setText(i18n("Filename:"));
+ filenameLayout->addWidget(fnLbl);
+
+ fnLine = new QLineEdit(filenamePage);
+ fnLine->setText(i18n("[No file selected]"));
+ fnLine->setReadOnly(true);
+ filenameLayout->addWidget(fnLine);
+ filenameLayout->addStretch(1);
+
+ fnGet = new QPushButton(filenamePage);
+ fnGet->setText(i18n("&Select File..."));
+ fnGet->setMaximumWidth(200);
+ QToolTip::add(fnGet, i18n("Select the filename of the exported output file"));
+ filenameLayout->addWidget(fnGet);
+ connect(fnGet, SIGNAL(clicked()), SLOT(getFilename()));
+ filenameLayout->addStretch(2);
+
+ addPage(filenamePage, i18n("Selection of Filename"));
+ setNextEnabled( filenamePage, false );
+ setHelpEnabled( filenamePage, false );
+
+ setNextEnabled( formatPage, false );
+ setHelpEnabled( formatPage, false );
+}
+
+Export * ExportWizard::createExportFilter() {
+ switch (filterID) { // IDs: see data-struct ExportFormats
+ case 1 : return new CSVExport(filename, ";");
+ case 2 : return new HTMLExport(filename, date);
+ default : return NULL; // oops..
+ };
+}
+
+void ExportWizard::typeHighlighted(int index) {
+ typeInfo->setText("<qt><b>"+i18n(ExportFormats[index].name.utf8())+" " +
+ i18n("File Format") + "</b><p></p>" + i18n(ExportFormats[index].desc.utf8())
+ +"</qt>");
+ setNextEnabled(formatPage, true );
+}
+
+void ExportWizard::getFilename() {
+ int i = typeList->currentItem();
+ if ( i == -1 )
+ return;
+ // prepare filter: e.g.: HTML (*.html *.HTML)
+ QString filter = "*." + ExportFormats[i].ext + " *." + ExportFormats[i].ext.upper() + "|" +
+ i18n(ExportFormats[i].name.utf8()) + " (*." + ExportFormats[i].ext + " *." +
+ ExportFormats[i].ext.upper() + ")";
+
+ filename = KFileDialog::getSaveFileName(date + "." + ExportFormats[i].ext, filter, 0, i18n("Please Choose File"));
+ if (filename.isEmpty()) // no file selected
+ return;
+ fnLine->setText(filename);
+ setFinishEnabled(filenamePage, true);
+}
+
+void ExportWizard::reject() {
+ hide();
+ filename = QString::null;
+}
+
+void ExportWizard::accept() {
+ filterID = typeList->currentItem() + 1; // translate to ID-count in ExportFormats
+ hide();
+}
+
+
+/***** Export *****/
+Export::Export(const QString &_filename)
+ : filename(_filename),
+ buffer("")
+{
+}
+
+Export::~Export()
+{
+}
+
+bool Export::openFile() {
+ file.setName(filename);
+ return file.open(IO_WriteOnly);
+}
+
+bool Export::closeFile() {
+ bool ok = true;
+ if (file.writeBlock(buffer.local8Bit(), buffer.length())<0)
+ ok = false;
+ file.close();
+ return ok;
+}
+
+
+/***** CSVExport *****/
+CSVExport::CSVExport(const QString &filename, const QString &_separator)
+ : Export(filename),
+ separator(_separator)
+{
+}
+
+void CSVExport::addHeadline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h) {
+ // no especially style
+ addDataline(a, b, c, d, e, f, g, h);
+}
+
+void CSVExport::addDataline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h) {
+ buffer+=a + separator +
+ b + separator +
+ c + separator +
+ d + separator +
+ e + separator +
+ f + separator +
+ g + separator +
+ h + separator + "\n";
+}
+
+void CSVExport::addEmptyLine() {
+ // not needed
+}
+
+void CSVExport::setFinishCode() {
+ // not needed
+}
+
+
+/***** HTMLExport *****/
+HTMLExport::HTMLExport(const QString &filename, const QString &date)
+ : Export(filename) {
+ QString title = i18n("Connection log for %1").arg(date);
+ buffer = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
+ buffer.append("<html>\n<head>\n <title>"+title+"</title>\n");
+ buffer.append(QString::fromLatin1(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=")
+ + QTextCodec::codecForLocale()->mimeName() +
+ QString::fromLatin1("\">"));
+ buffer.append("\n</head>\n<body>\n<h1>"+title+"</h1>\n\n");
+ buffer.append("<table width=\"100%\" border=\"1\">\n");
+
+ trStartCode = "<tr>";
+ trEndCode = "</tr>\n";
+ tdStartCode = "<td>";
+ tdEndCode = "</td>";
+}
+
+void HTMLExport::addHeadline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h) {
+ // simply bold font
+ QString bak1 = tdStartCode; tdStartCode.append("<b>");
+ QString bak2 = tdEndCode; tdEndCode.prepend("</b>");
+
+ addDataline(a, b, c, d, e, f, g, h);
+
+ // reset font
+ tdStartCode = bak1;
+ tdEndCode = bak2;
+}
+
+void HTMLExport::addDataline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h) {
+ buffer+= trStartCode +
+ tdStartCode + a + tdEndCode +
+ tdStartCode + b + tdEndCode +
+ tdStartCode + c + tdEndCode +
+ tdStartCode + d + tdEndCode +
+ tdStartCode + e + tdEndCode +
+ tdStartCode + f + tdEndCode +
+ tdStartCode + g + tdEndCode +
+ tdStartCode + h + tdEndCode +
+ trEndCode;
+}
+
+void HTMLExport::addEmptyLine() {
+ addDataline("&nbsp;", "&nbsp;", "&nbsp;", "&nbsp;", "&nbsp;", "&nbsp;", "&nbsp;", "&nbsp;");
+}
+
+void HTMLExport::setFinishCode() {
+ buffer+= "</table>\n</body>\n</html>\n";
+}
+
+#include "export.moc"
diff --git a/kppp/logview/export.h b/kppp/logview/export.h
new file mode 100644
index 00000000..306b6fc6
--- /dev/null
+++ b/kppp/logview/export.h
@@ -0,0 +1,201 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This file has been contributed by Tilo Ulbrich <TiloUlbrich@web.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef KPPPEXPORT_H
+#define KPPPEXPORT_H
+
+#include <qwidget.h>
+#include <qfile.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qlistbox.h>
+#include <qlineedit.h>
+#include <qtooltip.h>
+
+#include <kwizard.h>
+#include <klocale.h>
+#include <kfiledialog.h>
+
+class Export;
+
+/***** ExportWizard *****/
+class ExportWizard : public KWizard {
+ Q_OBJECT
+public:
+ ExportWizard(QWidget *parent, const QString &_date);
+ Export *createExportFilter();
+
+ int filterID;
+ QString filename;
+
+public slots:
+ void typeHighlighted(int);
+ void getFilename();
+
+ void accept();
+ void reject();
+
+private:
+ QWidget *formatPage;
+ QListBox *typeList;
+ QLabel *typeInfo;
+
+ QWidget *filenamePage;
+ QLineEdit *fnLine;
+ QPushButton *fnGet;
+
+ QString date;
+};
+
+
+/***** Export (abstract)*****/
+class Export {
+public:
+ Export();
+ Export(const QString &filename);
+ virtual ~Export();
+ bool openFile();
+ bool closeFile();
+ virtual void addHeadline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h) = 0;
+ virtual void addDataline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h) = 0;
+ virtual void addEmptyLine() = 0;
+ virtual void setFinishCode() = 0;
+
+protected:
+ QFile file;
+ QString filename;
+ QString buffer;
+};
+
+
+/***** CSVExport *****/
+class CSVExport : public Export {
+public:
+ CSVExport(const QString &filename, const QString &separator);
+ virtual void addHeadline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h);
+ virtual void addDataline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h);
+ virtual void addEmptyLine();
+ virtual void setFinishCode();
+
+private:
+ QString separator;
+};
+
+
+/***** HTMLExport *****/
+class HTMLExport : public Export {
+public:
+ HTMLExport(const QString &filename, const QString &date);
+ virtual void addHeadline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h);
+ virtual void addDataline(const QString &a, const QString &b,
+ const QString &c, const QString &d,
+ const QString &e, const QString &f,
+ const QString &g, const QString &h);
+ virtual void addEmptyLine();
+ virtual void setFinishCode();
+
+private:
+ QString trStartCode;
+ QString trEndCode;
+ QString tdStartCode;
+ QString tdEndCode;
+};
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/kppp/logview/kppplogview.desktop b/kppp/logview/kppplogview.desktop
new file mode 100644
index 00000000..45b0ffa6
--- /dev/null
+++ b/kppp/logview/kppplogview.desktop
@@ -0,0 +1,77 @@
+[Desktop Entry]
+Name=KPPPLogview
+Name[bn]=āĶ•ā§‡-āĶŠāĶŋ-āĶŠāĶŋ-āĶŠāĶŋ āĶēāĶ—āĶ­āĶŋāĶ‰
+Name[bs]=Preglednik Kppp dnevnika
+Name[de]=KPPP-Protokoll-Betrachter
+Name[el]=ΠρÎŋÎēÎŋÎŧÎŪ ÎšÎąÏ„ÎąÎģÏÎąÏ†ÎŪς KPPP
+Name[eo]=PPP-protokolorigardilo
+Name[fa]=Ų†Ų…ای ØŦØĻØŠ KPPP
+Name[he]=KPPP ŨŠŨĶŨ•Ũ’ŨŠ ŨĻŨ™ŨĐŨ•Ũ
+Name[is]=KPPP annÃĄlaskoðari
+Name[it]=Visualizzatore log KPPP
+Name[ja]=KPPP - ログビãƒĨマã‚Ē
+Name[lt]=KPPP – Åūurnalo ÅūiÅŦriklis
+Name[nb]=KPPP loggviser
+Name[ne]=āĪ•āĨ‡ āĪŠāĨ€ āĪŠāĨ€ āĪŠāĨ€ āĪēāĪ— āĪĶāĨƒāĪķāĨāĪŊ
+Name[nn]=KPPP-loggvisar
+Name[pa]=KPPP āĻēāĻūāĻ— āĻĶāĻ°āĻļāĻžāĻ•
+Name[pl]=Dziennik połączeń KPPP
+Name[sk]=KPPP prehliadač zÃĄznamov
+Name[sl]=Ogled dnevnika KPPP
+Name[sv]=Kppp - Loggvisare
+Name[tr]=KPPP KayÄąt GÃķrÞntÞleyici
+Name[zh_TW]=KPPP - įī€éŒ„抔æŠĒčĶ–å™Ļ
+GenericName=Internet Dial-Up Tool Log Viewer
+GenericName[be]=АÐģÐŧŅÐīаÐŧŅŒÐ―Ņ–К ÐīзŅ‘Ð―Ð―Ņ–КаŅž KPPP
+GenericName[bg]=ПŅ€ÐĩÐģÐŧÐĩÐī Ð―Ð° ÐķŅƒŅ€Ð―аÐŧа Ð―Ð° KPPP
+GenericName[bn]=āĶ‡āĶĻā§āĶŸāĶūāĶ°āĶĻā§‡āĶŸ āĶĄāĶūā§ŸāĶūāĶē-āĶ†āĶŠ āĶļāĶ°āĶžā§āĶœāĶūāĶŪ āĶ•āĶūāĶ°ā§āĶŊāĶŽāĶŋāĶŽāĶ°āĶĢā§€ āĶŠā§āĶ°āĶĶāĶ°ā§āĶķāĶ•
+GenericName[bs]=Program za pregled dnevnika spajanja na Internet
+GenericName[ca]=Visor de la bitàcola de l'eina de connexiÃģ telefÃēnica a Internet
+GenericName[cs]=ProhlíÅūeč zÃĄznamÅŊ připojení přes vytÃĄÄenou linku
+GenericName[da]=Internet-opkaldsvÃĶrktÃļj-logviser
+GenericName[de]=Protokoll-Betrachter fÞr die Einwahl ins Internet
+GenericName[el]=ΠρÎŋÎēÎŋÎŧÎŪ ÎšÎąÏ„ÎąÎģÏÎąÏ†ÎŪς ÎĩρÎģÎąÎŧÎĩÎŊÎŋυ ÏƒÏÎ―ÎīÎĩσης Ξέσω τηÎŧÎĩÏ†ÏŽÎ―Îŋυ στÎŋ ÎīÎđÎąÎīÎŊΚτυÎŋ
+GenericName[es]=Visor del registro de conexiÃģn telefÃģnica a Internet
+GenericName[et]=Interneti sissehelistamise rakenduse logide nÃĪitaja
+GenericName[eu]=Internet markatzaile tresnaren erregistroaren ikusgailua
+GenericName[fa]=اØĻØēØ§Øą Ų…ØīاŲ‡ØŊŲ‡â€ŒÚŊØą ØŦØĻØŠ ØīŲ…Ø§ØąŲ‡â€ŒÚŊÛŒØąÛŒ ایŲ†ØŠØąŲ†ØŠ
+GenericName[fi]=Internet-yhteyden soitto-ohjelman lokin nÃĪytin
+GenericName[fr]=Afficheur de l'historique des connexion internet par modem
+GenericName[gl]=Visor de Rexistros da Ferramenta de ConexiÃģn a Internet por TelÃĐfono
+GenericName[he]=ŨŠŨĶŨ•Ũ’ŨŠ ŨĻŨ™ŨĐŨ•Ũ ŨĐŨœ Ũ›ŨœŨ™ Ũ—Ũ™Ũ•Ũ’ ŨœŨŨ™Ũ Ũ˜ŨĻŨ Ũ˜
+GenericName[hu]=TÃĄrcsÃĄzÃģ-naplÃģ
+GenericName[is]=Upphringisambands annÃĄlaskoðari
+GenericName[it]=Visualizzatore di log della connessione telefonica ad Internet
+GenericName[ja]=ã‚Īãƒģã‚ŋマネットダã‚Īã‚ĒãƒŦã‚ĒップツマãƒŦ ログビãƒĨマã‚Ē
+GenericName[ka]=ინáƒĒერნეáƒĒი Dial-Up áƒŪელსახყოს ჟáƒĢრნალის მáƒŪილველი
+GenericName[kk]=ÐĒÐĩÐŧÐĩŅ„ÐūÐ―ÐīŅ‹Ō› ÐķÐĩÐŧŅ– аŅ€Ō›Ņ‹ÐŧŅ‹ Ō›ÐūŅŅ‹ÐŧŅƒÐīŅ‹ŌĢ ÐķŅƒŅ€Ð―аÐŧŅ‹Ð― Ō›Ð°Ņ€Ð°Ņƒ Ō›ŌąŅ€Ð°ÐŧŅ‹
+GenericName[km]=កម្មវិធážļ​មážūល​កំណត់ហេតážŧរបស់ឧបករណ៍​ដែល​តភ្ជážķប់​ទៅ​ážĒ៊ážļនធរណិត​តážķម​រយៈ​ទើរស័ព្ទ​លážū​តážŧ
+GenericName[lt]=Interneto skambinimo priemonės Åūurnalo ÅūiÅŦriklis
+GenericName[nb]=Loggviser for verktÃļyet for oppringt Internet
+GenericName[nds]=Protokollkieker fÃķr Internetinwahl
+GenericName[ne]=āĪ‡āĪĻāĨāĪŸāĪ°āĪĻāĨ‡āĪŸ āĪĄāĪūāĪŊāĪē-āĪ…āĪŠ āĪ‰āĪŠāĪ•āĪ°āĪĢ āĪēāĪ— āĪĶāĪ°āĨāĪķāĪ•
+GenericName[nl]=Logviewer voor het inbelprogramma kppp
+GenericName[nn]=Loggvisar for verktÃļyet for Internett-oppringing
+GenericName[pl]=Narzędzie do przeglądania dziennika programu do łączenia z Internetem
+GenericName[pt]=Visualizador de Registos da Ferramenta de LigaçÃĢo à Internet
+GenericName[pt_BR]=Visualizador de Logs do KPPP
+GenericName[ro]=Jurnal conectare Internet
+GenericName[ru]=ПŅ€ÐūŅÐžÐūŅ‚Ņ€ ÐķŅƒŅ€Ð―аÐŧа ŅÐūÐĩÐīÐļÐ―ÐĩÐ―ÐļŅ Ņ Ð˜Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚ÐūО ÐŋÐūŅŅ€ÐĩÐīŅŅ‚ÐēÐūО Ņ‚ÐĩÐŧÐĩŅ„ÐūÐ―Ð―ÐūÐđ ÐŧÐļÐ―ÐļÐļ
+GenericName[sk]=Prehliadač zÃĄznamov nÃĄstroja pre pripojenie na internet cez modem
+GenericName[sl]=Orodje za ogled dnevnika KPPP
+GenericName[sr]=ПŅ€ÐļКазÐļÐēаŅ‡ ÐīÐ―ÐĩÐēÐ―ÐļКа ОÐūÐīÐĩОŅÐšÐĩ ÐēÐĩзÐĩ ŅÐ° Ð˜Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚ÐūО
+GenericName[sr@Latn]=Prikazivač dnevnika modemske veze sa Internetom
+GenericName[sv]=Loggvisning fÃķr Internetuppringningsverktyg
+GenericName[tr]=Ä°nternet Çevirmeli Ağ AracÄą KayÄąt GÃķrÞntÞleyici
+GenericName[uk]=ПÐĩŅ€ÐĩÐģÐŧŅÐīаŅ‡ ÐķŅƒŅ€Ð―аÐŧŅƒ заŅÐūÐąŅƒ ÐīÐūзÐēÐūÐ―Ņƒ Ðē Ð†Ð―Ņ‚ÐĩŅ€Ð―ÐĩŅ‚
+GenericName[zh_CN]=Internet æ‹Ļ号å·Ĩ具æ—Ĩåŋ—æŸĨįœ‹å™Ļ
+GenericName[zh_HK]=乒čŊįķēæ’Ĩ號å·Ĩ具čĻ˜éŒ„æŠĒčĶ–å™Ļ
+GenericName[zh_TW]=Internet æ’Ĩ號å·Ĩ具įī€éŒ„æŠĒčĶ–å™Ļ
+MimeType=
+Exec=kppplogview
+Icon=kppp
+Path=
+Type=Application
+Terminal=false
+X-DCOP-ServiceType=Multi
+Categories=Qt;KDE;Network;X-KDE-More;Dialup;
diff --git a/kppp/logview/log.cpp b/kppp/logview/log.cpp
new file mode 100644
index 00000000..66ff7c9c
--- /dev/null
+++ b/kppp/logview/log.cpp
@@ -0,0 +1,129 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "log.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <qprogressdialog.h>
+#include <qdir.h>
+
+#include <kapplication.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <kdebug.h>
+
+QPtrList<LogInfo> logList;
+QProgressDialog *dlg;
+
+int loadLogs() {
+ int logsize = 0;
+
+ QString logdirname = locateLocal("data", "kppp/Log/");
+ QDir logdir(logdirname, "*.log");
+
+ kdDebug(5002) << "logdirname: " << logdirname << endl;
+
+ // get log file size
+ const QFileInfoList *list = logdir.entryInfoList();
+ QFileInfoListIterator it( *list );
+ QFileInfo *fi;
+
+ while ((fi = it.current()) != 0) {
+ logsize += fi->size();
+ ++it;
+ }
+
+ dlg = new QProgressDialog(i18n("Loading log files"),
+ QString::null,
+ logsize);
+ dlg->setProgress(0);
+
+ // load logs
+ list = logdir.entryInfoList();
+ QFileInfoListIterator it1( *list );
+
+ int retval = 0;
+ while ((fi = it1.current()) != 0) {
+ retval += loadLog(fi->absFilePath());
+ ++it1;
+ }
+
+ delete dlg;
+ return retval;
+}
+
+int loadLog(QString fname) {
+ FILE *f;
+ int warning=0;
+
+ f = fopen(QFile::encodeName(fname), "r");
+ if(f == NULL)
+ return 1;
+
+ char buffer[2048+1];
+ int lineno = 0;
+ while(fgets(buffer, sizeof(buffer), f) != NULL) {
+ ++lineno;
+ buffer[sizeof(buffer) - 1] = 0;
+
+ int slen = strlen(buffer);
+
+ // skip blank lines
+ if(slen < 10)
+ continue;
+
+ dlg->setProgress(dlg->progress() + slen);
+ kapp->processEvents();
+
+ LogInfo *li = new LogInfo(buffer);
+ if(li->error()) {
+
+ // check if the connection has been terminated abnormally
+ if(li->error() != 3) {
+ warning++;
+ kdError() << "ERROR IN FILE " << fname << " LINE " << lineno << "\"" << buffer << "\" (" << li->error() << ")" << endl;
+ delete li;
+ } else
+ logList.append(li);
+ } else
+ logList.append(li);
+ }
+
+ fclose(f);
+
+ if(warning)
+ return 2;
+ else
+ return 0;
+}
+
+int QLogList::compareItems(Item a, Item b) {
+ LogInfo *la = (LogInfo *)a;
+ LogInfo *lb = (LogInfo *)b;
+
+ if(la->from() < lb->from())
+ return -1;
+ else if(la->from() > lb->from())
+ return 1;
+ else
+ return 0;
+}
diff --git a/kppp/logview/log.h b/kppp/logview/log.h
new file mode 100644
index 00000000..74d573e5
--- /dev/null
+++ b/kppp/logview/log.h
@@ -0,0 +1,40 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __LOG__H__
+#define __LOG__H__
+
+#include "loginfo.h"
+#include <qptrlist.h>
+
+typedef QPtrList<LogInfo> QLogInfoBase;
+typedef QPtrListIterator<LogInfo> QLogInfoIterator;
+
+class QLogList : public QLogInfoBase {
+public:
+ virtual int compareItems(Item, Item);
+};
+
+extern QPtrList<LogInfo> logList;
+
+int loadLogs();
+int loadLog(QString);
+
+#endif
diff --git a/kppp/logview/loginfo.cpp b/kppp/logview/loginfo.cpp
new file mode 100644
index 00000000..1e5a089a
--- /dev/null
+++ b/kppp/logview/loginfo.cpp
@@ -0,0 +1,197 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "loginfo.h"
+#include <stdlib.h>
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <kdebug.h>
+
+char *mystrsep (char **stringp, const char *delim);
+
+LogInfo::LogInfo(QCString data) {
+ parse(data);
+}
+
+QDateTime LogInfo::from() const {
+ QDateTime tm;
+ tm.setTime_t(_from);
+ return tm;
+}
+
+QDateTime LogInfo::until() const {
+ QDateTime tm;
+ tm.setTime_t(_until);
+ return tm;
+}
+
+QString LogInfo::connectionName() const {
+ return _conname;
+}
+
+QString LogInfo::currency() const {
+ return _currency;
+}
+
+double LogInfo::sessionCosts() const {
+ return _session_cost;
+}
+
+double LogInfo::totalCosts() const {
+ return _total_cost;
+}
+
+double LogInfo::bytesIn() const {
+ return _bytes_in;
+}
+
+double LogInfo::bytesOut() const {
+ return _bytes_out;
+}
+
+double LogInfo::bytes() const {
+ if(bytesIn() == -1 || bytesOut() == -1)
+ return -1;
+ else
+ return bytesIn() + bytesOut();
+}
+
+int LogInfo::error() const {
+ return errorfield;
+}
+
+void LogInfo::parse(QCString s) {
+ errorfield = 0;
+ char *c = (char *)malloc(s.length() + 1), *csep;
+ strcpy(c, s);
+
+ // init data
+ _from = _until = 0;
+ _conname = "";
+ _currency = "";
+ _bytes_in = _bytes_out = -1;
+ _session_cost = _total_cost = -1;
+
+ // start of connection time
+ csep = c;
+ char *p = mystrsep(&csep, ":");
+ int i = 0;
+ while(i < 8 && p != 0) {
+ QString token = QString::fromLocal8Bit(p);
+
+ switch(i) {
+ case 0:
+ _from = token.toULong();
+ break;
+
+ case 1:
+ _conname = token;
+ break;
+
+ case 2:
+ _currency = token;
+ break;
+
+ case 3:
+ _until = token.toULong();
+ break;
+
+ case 4:
+ _session_cost = token.toFloat();
+ break;
+
+ case 5:
+ _total_cost = token.toFloat();
+ break;
+
+ case 6:
+ _bytes_in = token.toLong();
+ break;
+
+ case 7:
+ _bytes_out = token.toLong();
+ break;
+ }
+
+ i++;
+ p = mystrsep(&csep, ":");
+ }
+
+ free(c);
+
+ if(i == 8)
+ errorfield = 0;
+ else
+ errorfield = i+1;
+}
+
+
+int LogInfo::duration() const {
+ if( _until - _from < 0)
+ return 0;
+ else
+ return _until - _from;
+}
+
+#ifdef MYDEBUG
+void LogInfo::dump() {
+ kdDebug(5002) << "LOGINFO " << this << endl;
+ kdDebug(5002) << "connection name : " << connectionName() << endl;
+ kdDebug(5002) << "currency symbol : " << currency() << endl;
+ kdDebug(5002) << "begin : " << ctime(&_from) << endl;
+ kdDebug(5002) << "end : " << ctime(&_until) << endl;
+ kdDebug(5002) << "duration : " << (int)_until - (int)_from << " seconds" << endl;
+ kdDebug(5002) << "session cost : " << sessionCosts() << endl;
+ kdDebug(5002) << "total cost : " << totalCosts() << endl;
+ kdDebug(5002) << "bytes in : " << bytesIn() << endl;
+ kdDebug(5002) << "bytes out : " << bytesOut() << endl;
+ kdDebug(5002) << "bytes total : " << bytes() << endl;
+ kdDebug(5002) << endl;
+}
+#endif
+
+char *mystrsep (char **stringp, const char *delim) {
+ char *begin, *end;
+
+ begin = *stringp;
+ if (begin == 0L)
+ return 0L;
+
+ /* Find the end of the token. */
+ end = strpbrk (begin, delim);
+ if (end) {
+ /* Terminate the token and set *STRINGP past NUL character. */
+ *end++ = '\0';
+ *stringp = end;
+ } else
+ /* No more delimiters; this is the last token. */
+ *stringp = 0L;
+
+ return begin;
+}
+
+
diff --git a/kppp/logview/loginfo.h b/kppp/logview/loginfo.h
new file mode 100644
index 00000000..6b2e992e
--- /dev/null
+++ b/kppp/logview/loginfo.h
@@ -0,0 +1,63 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __LOGINFO__H__
+#define __LOGINFO__H__
+#define MYDEBUG
+
+#include <qdatetime.h>
+#include <qstring.h>
+#include <time.h>
+
+class LogInfo {
+public:
+ LogInfo(QCString data);
+
+ int error() const;
+
+ QDateTime from() const;
+ time_t from_t() const { return _from; }
+ QDateTime until() const;
+ int duration() const;
+ QString connectionName() const;
+ QString currency() const;
+ double sessionCosts() const;
+ double totalCosts() const;
+ double bytesIn() const;
+ double bytesOut() const;
+ double bytes() const;
+
+#ifdef MYDEBUG
+ void dump();
+#endif
+
+private:
+ void parse(QCString );
+
+ int errorfield;
+
+ time_t _from, _until;
+ QString _conname, _currency;
+ double _session_cost, _total_cost;
+ double _bytes_in, _bytes_out;
+};
+
+
+#endif
diff --git a/kppp/logview/main.cpp b/kppp/logview/main.cpp
new file mode 100644
index 00000000..4e54236c
--- /dev/null
+++ b/kppp/logview/main.cpp
@@ -0,0 +1,127 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <kapplication.h>
+#include "log.h"
+#include "monthly.h"
+#include "main.h"
+#include <klocale.h>
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+#include <kpushbutton.h>
+#include <kstdguiitem.h>
+#include <kiconloader.h>
+
+#define F_EXIT 101
+
+
+static const char description[] =
+ I18N_NOOP("KPPP log viewer");
+
+static const char version[] = "v0.0.2";
+
+static KCmdLineOptions option[] =
+{
+ { "kppp", I18N_NOOP("Run in KPPP mode"), 0 },
+ KCmdLineLastOption
+};
+
+
+TopWidget::TopWidget() : KMainWindow(0, "") {
+ // Check command line args for "-kppp"
+
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ bool kpppmode = args->isSet("kppp");
+ args->clear();
+
+ setCaption(i18n("KPPP Log Viewer"));
+
+ w = new QWidget(this);
+
+ QBoxLayout *l = new QVBoxLayout(w, 5);
+
+ td = new QTabWidget(w, "");
+ mw = new MonthlyWidget(td);
+ td->addTab(mw, i18n("Monthly Log"));
+ l->addWidget(td);
+
+ // remove buttons
+ if(!kpppmode) {
+ // create menu
+ mb = new KMenuBar(this);
+ QPopupMenu *fm = new QPopupMenu;
+ fm->insertItem(SmallIcon("exit"),KStdGuiItem::quit().text(), F_EXIT);
+ mb->insertItem(i18n("&File"), fm);
+
+ mb->setAccel(CTRL + Key_Q, F_EXIT);
+ connect(mb, SIGNAL(activated(int)),
+ this, SLOT(menuCallback(int)));
+ } else {
+ mb = 0;
+ QPushButton *but = new KPushButton(KStdGuiItem::close(),w);
+ QHBoxLayout *lh = new QHBoxLayout(l);
+ lh->addStretch(10);
+ lh->addWidget(but);
+
+ connect(but, SIGNAL(clicked()),
+ kapp, SLOT(quit()));
+ }
+
+ setMinimumSize(mw->sizeHint().width() + 15,
+ mw->sizeHint().height() + 120);
+ setCentralWidget(w);
+}
+
+TopWidget::~TopWidget() {
+}
+
+void TopWidget::menuCallback(int id) {
+ switch(id) {
+ case F_EXIT:
+ exit(0);
+ break;
+ }
+}
+
+int main(int argc, char **argv) {
+ KAboutData aboutData("kppplogview", I18N_NOOP("KPPP Log Viewer"),
+ version, description, KAboutData::License_GPL,
+ I18N_NOOP("(c) 1999-2002, The KPPP Developers"));
+ aboutData.addAuthor("Bernd Wuebben",0, "wuebben@kde.org");
+ aboutData.addAuthor("Mario Weilguni",0, "");
+ aboutData.addAuthor("Harri Porten",0, "porten@kde.org");
+ KCmdLineArgs::init(argc, argv, &aboutData);
+
+ KCmdLineArgs::addCmdLineOptions( option );
+
+ KApplication a;
+
+ loadLogs();
+
+ TopWidget *w = new TopWidget;
+ w->show();
+ a.setMainWidget(w);
+
+ return a.exec();
+}
+
+#include "main.moc"
diff --git a/kppp/logview/main.h b/kppp/logview/main.h
new file mode 100644
index 00000000..eabe66df
--- /dev/null
+++ b/kppp/logview/main.h
@@ -0,0 +1,45 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __MAIN__H__
+#define __MAIN__H__
+
+#include <kmainwindow.h>
+#include <qtabwidget.h>
+#include <kmenubar.h>
+#include "monthly.h"
+
+class TopWidget : public KMainWindow {
+ Q_OBJECT
+public:
+ TopWidget();
+ ~TopWidget();
+
+private slots:
+ void menuCallback(int);
+
+private:
+ MonthlyWidget *mw;
+ KMenuBar *mb;
+ QWidget *w;
+ QTabWidget *td;
+};
+
+#endif
diff --git a/kppp/logview/monthly.cpp b/kppp/logview/monthly.cpp
new file mode 100644
index 00000000..668381e4
--- /dev/null
+++ b/kppp/logview/monthly.cpp
@@ -0,0 +1,729 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <qpainter.h>
+#include <qcombobox.h>
+#include <qfile.h>
+#include <qheader.h>
+
+#include <kcalendarsystem.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <klistview.h>
+#include <kdebug.h>
+#include <kmessagebox.h>
+
+#include "monthly.h"
+#include "export.h"
+#include <qstringlist.h>
+
+static void formatBytes(double bytes, QString &result) {
+ if(bytes < 1024)
+ result.setNum(bytes);
+ else if(bytes < 1024*1024)
+ result = i18n("%1 KB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
+ else
+ result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
+}
+
+static void formatBytesMonth(double bytes, QString &result) {
+
+ int day, days;
+ day = QDate::currentDate().day();
+ days = QDate::currentDate().daysInMonth();
+
+ bytes = (bytes / day) * days;
+
+ if(bytes < 1024)
+ result.setNum(bytes);
+ else if(bytes < 1024*1024)
+ result = i18n("%1 KB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
+ else
+ result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
+}
+
+static void formatDuration(int seconds, QString &result) {
+ QString sec;
+ sec.sprintf("%02d", seconds%60);
+ if(seconds < 60)
+ result = i18n("%1s").arg(sec);
+ else if(seconds < 3600)
+ result = i18n("%1m %2s").arg(seconds/60).arg(sec);
+ else
+ result = i18n("%1h %2m %3s")
+ .arg(seconds/3600)
+ .arg((seconds % 3600)/60)
+ .arg(sec);
+}
+
+static void formatDurationMonth(int seconds, QString &result) {
+
+ int day, days;
+ day = QDate::currentDate().day();
+ days = QDate::currentDate().daysInMonth();
+
+ seconds = (seconds / day) * days;
+
+ QString sec;
+ sec.sprintf("%02d", seconds%60);
+ if(seconds < 60)
+ result = i18n("%1s").arg(sec);
+ else if(seconds < 3600)
+ result = i18n("%1m %2s").arg(seconds/60).arg(sec);
+ else
+ result = i18n("%1h %2m %3s")
+ .arg(seconds/3600)
+ .arg((seconds % 3600)/60)
+ .arg(sec);
+}
+
+static void costsMonth(double costs, double &result) {
+
+ int day, days;
+ day = QDate::currentDate().day();
+ days = QDate::currentDate().daysInMonth();
+
+ result = (costs / day) * days;
+
+}
+
+class LogListItem : public QListViewItem {
+public:
+ LogListItem(LogInfo *l,
+ QListView * parent,
+ QString s1, QString s2,
+ QString s3, QString s4,
+ QString s5, QString s6,
+ QString s7, QString s8)
+ : QListViewItem(parent, s1, s2, s3, s4, s5, s6, s7, s8),
+ li(l)
+ {
+ }
+ virtual void paintCell( QPainter *p, const QColorGroup & cg,
+ int column, int width, int alignment );
+
+ virtual QString key(int, bool) const;
+
+ LogInfo *li;
+};
+
+void LogListItem::paintCell( QPainter *p, const QColorGroup & cg,
+ int column, int width, int alignment )
+{
+ QListViewItem::paintCell(p, cg, column, width, alignment);
+
+ // double line above sum
+ //if(!li) {
+ // p->drawLine(0, 0, width, 0);
+ //p->drawLine(0, 2, width, 2);
+ //}
+}
+
+QString LogListItem::key(int c, bool ascending) const
+{
+ if (!li) // we want the sum to be always at the bottom
+ return ascending ? "z" : " ";
+
+ QString k;
+ switch (c) {
+ case 0:
+ k = li->connectionName();
+ break;
+ case 1:
+ case 2:
+ case 3:
+ k.sprintf("%012u", (uint)li->from_t());
+ break;
+ case 4:
+ k.sprintf("%012d", li->duration());
+ break;
+ case 5:
+ k.sprintf("%012.2f", li->sessionCosts());
+ break;
+ case 6:
+ k.sprintf("%012f", li->bytesIn());
+ break;
+ case 7:
+ k.sprintf("%012f", li->bytesOut());
+ break;
+ }
+ return k;
+}
+
+MonthlyWidget::MonthlyWidget(QWidget *parent) :
+ QWidget(parent)
+{
+ tl = 0;
+
+ lv = new KListView(this);
+ lv->addColumn(i18n("Connection"));
+ lv->addColumn(i18n("Day"));
+ lv->addColumn(i18n("From"));
+ lv->addColumn(i18n("Until"));
+ lv->addColumn(i18n("Duration"));
+ lv->addColumn(i18n("Costs"));
+ lv->addColumn(i18n("Bytes In"));
+ lv->addColumn(i18n("Bytes Out"));
+ lv->setColumnAlignment(1, AlignRight);
+ lv->setColumnAlignment(2, AlignRight);
+ lv->setColumnAlignment(3, AlignRight);
+ lv->setColumnAlignment(4, AlignRight);
+ lv->setColumnAlignment(5, AlignRight);
+ lv->setColumnAlignment(6, AlignRight);
+ lv->setColumnAlignment(7, AlignRight);
+ lv->setAllColumnsShowFocus(true);
+ lv->setShowSortIndicator(true);
+ lv->setItemMargin(1);
+ lv->setSorting(1);
+ lv->setMinimumWidth(180);
+ lv->setMinimumHeight(280);
+ lv->setSelectionMode(QListView::Extended);
+ selectionItem = 0L;
+ connect(lv, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+
+ lv2 = new KListView(this);
+ lv2->addColumn(i18n("Connection"));
+ lv2->addColumn(i18n("Duration"));
+ lv2->addColumn(i18n("Costs"));
+ lv2->addColumn(i18n("Bytes In"));
+ lv2->addColumn(i18n("Bytes Out"));
+ lv2->setColumnAlignment(1, AlignRight);
+ lv2->setColumnAlignment(2, AlignRight);
+ lv2->setColumnAlignment(3, AlignRight);
+ lv2->setColumnAlignment(4, AlignRight);
+ lv2->setAllColumnsShowFocus(true);
+ lv2->setSorting(-1);
+ lv2->setItemMargin(2);
+ lv2->setMaximumHeight(100);
+ lv2->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
+ lv2->setSelectionMode(QListView::NoSelection);
+
+ title = new QLabel("X", this);
+ QFont f = title->font();
+ f.setPointSize(f.pointSize() + 2);
+ f.setBold(TRUE);
+ title->setFont(f);
+ title->setFixedHeight(title->sizeHint().height()*2);
+
+ cboConnections = new QComboBox(false, this); // add a combo box to select connections
+ cboConnections->setMaximumWidth(200); // a resonable size
+ cboConnections->insertItem(i18n("All Connections")); // default to all connections
+ connect(cboConnections, SIGNAL(activated(int)),
+ this, SLOT(slotConnections(int)));
+
+ bbox = new KButtonBox(this, Qt::Vertical);
+ prev = bbox->addButton(i18n("&Prev Month"));
+ next = bbox->addButton(i18n("&Next Month"));
+ bbox->addStretch(1);
+ today = bbox->addButton(i18n("C&urrent Month"));
+ bbox->addStretch(1);
+ exportBttn = bbox->addButton(i18n("&Export..."));
+
+ connect(prev, SIGNAL(released()),
+ this, SLOT(prevMonth()));
+ connect(next, SIGNAL(released()),
+ this, SLOT(nextMonth()));
+ connect(today, SIGNAL(released()),
+ this, SLOT(currentMonth()));
+ connect(exportBttn, SIGNAL(clicked()),
+ this, SLOT(exportWizard()));
+
+ bbox->addStretch(8);
+ bbox->layout();
+
+ currentMonth();
+ layoutWidget();
+}
+
+void MonthlyWidget::layoutWidget() {
+ if(tl)
+ delete tl;
+
+ tl = new QGridLayout(this, 1, 1, 11, 16, "MainLayout");
+ tl->addWidget(title, 0, 0);
+ tl->addWidget(cboConnections, 0, 1);
+ QLabel *l = new QLabel(this);
+ l->setText(i18n("Statistics:"));
+ QFont f2 = l->font();
+ f2.setPointSize(f2.pointSize() + 1);
+ f2.setBold(TRUE);
+ l->setFont(f2);
+ l->setFixedHeight(l->sizeHint().height());
+ l->setAlignment( AlignLeft );
+ tl->addWidget(l, 5, 0);
+ tl->addWidget(bbox, 1, 2);
+ tl->addMultiCellWidget(lv, 1, 4, 0, 1);
+ tl->addMultiCellWidget(lv2, 6, 6, 0, 1);
+
+ tl->activate();
+}
+
+int bestlen(QWidget *w, const char *s) {
+ return w->fontMetrics().boundingRect(s).width() + 8;
+}
+
+void MonthlyWidget::plotMonth() {
+ // name of the current connection
+ QString con;
+
+ // for collecting monthly statistics
+ int count = 0;
+ double costs = 0;
+ double bin = 0, bout = 0;
+ int duration = 0;
+ lv->clear();
+ selectionItem = 0L;
+ lv2->clear();
+
+ const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ QDate startDate = periodeFirst();
+
+ for(int i = 0; i < (int)logList.count(); i++) {
+ LogInfo *li = logList.at(i);
+
+ QDate logDate = li->from().date();
+ if ( periodeFirst() <= logDate && periodeLast() >= logDate ) {
+ // get connection name for this line
+ con = li->connectionName();
+
+ // this connection name not in the list and combo box
+ if(lstConnections.findIndex(con) == -1) {
+ lstConnections.append(con);
+ cboConnections->insertItem(con);
+ }
+ // if all connections or the selected one
+ if(cboConnections->currentText() != con &&
+ cboConnections->currentItem() != 0)
+ continue;
+ count++;
+ costs += li->sessionCosts();
+ if(bin >= 0) {
+ if(li->bytesIn() < 0)
+ bin = -1;
+ else
+ bin += li->bytesIn();
+ }
+
+ if(bout >= 0) {
+ if(li->bytesOut() < 0)
+ bout = -1;
+ else
+ bout += li->bytesOut();
+ }
+
+ duration += li->from().secsTo(li->until());
+
+ QString _bin, _bout, b;
+ if(li->bytesIn() >= 0)
+ formatBytes(li->bytesIn(), _bin);
+ else
+ _bin = i18n("n/a");
+
+ if(li->bytesOut() >= 0)
+ formatBytes(li->bytesOut(), _bout);
+ else
+ _bout = i18n("n/a");
+
+ if(li->bytes() > 0)
+ formatBytes(li->bytes(), b);
+ else
+ b = i18n("n/a");
+
+ QString day;
+ day.sprintf("%2d", li->from().date().day());
+
+ QString s_duration;
+ formatDuration(li->from().secsTo(li->until()),
+ s_duration);
+
+ QString s_lifrom, s_liuntil, s_costs;
+ s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false);
+ s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false);
+ s_costs = KGlobal::locale()->formatMoney(li->sessionCosts());
+
+ (void) new LogListItem(li, lv, con, day, s_lifrom, s_liuntil, s_duration, s_costs, _bin, _bout);
+ }
+ }
+
+ if(count) {
+ QString _bin, _bout, _b;
+
+ if(bin < 0)
+ _bin = i18n("n/a");
+ else
+ formatBytes(bin, _bin);
+
+ if(bout < 0)
+ _bout = i18n("n/a");
+ else
+ formatBytes(bout, _bout);
+
+ if(bin < 0 || bout < 0)
+ _b = i18n("n/a");
+ else
+ formatBytes(bout + bin, _b);
+
+ QString s_duration;
+ formatDuration(duration,
+ s_duration);
+
+ QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+
+ selectionItem = new LogListItem(0, lv2,
+ i18n("Selection (%n connection)", "Selection (%n connections)", 0),
+ QString::null, QString::null, QString::null,
+ QString::null, QString::null, QString::null, QString::null);
+ (void) new LogListItem(0, lv2,
+ i18n("%n connection", "%n connections", count),
+ s_duration, s_costs, _bin, _bout, QString::null, QString::null, QString::null);
+
+ const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+
+ if(calendar->month(periodeFirst()) == calendar->month(QDate::currentDate())) {
+
+ QString m_bin, m_bout;
+
+ if(bin < 0)
+ _bin = i18n("n/a");
+ else
+ formatBytesMonth(bin, m_bin);
+
+ if(bout < 0)
+ _bout = i18n("n/a");
+ else
+ formatBytesMonth(bout, m_bout);
+
+ QString m_duration;
+ formatDurationMonth(duration, m_duration);
+
+ costsMonth(costs, costs);
+ QString m_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+
+ (void) new QListViewItem(lv2, selectionItem,
+ i18n("Monthly estimates"), m_duration, m_costs, m_bin, m_bout,
+ QString::null, QString::null, QString::null);
+ }
+ }
+
+ QString t;
+ if(lv->childCount() > 0) {
+ exportBttn->setEnabled(true); // export possibility
+ t = i18n("Connection log for %1 %2")
+ .arg(calendar->monthName(startDate))
+ .arg(calendar->year(startDate));
+ } else {
+ exportBttn->setEnabled(false); // nothing to export
+ t = i18n("No connection log for %1 %2 available")
+ .arg(calendar->monthName(startDate))
+ .arg(calendar->year(startDate));
+ }
+
+ title->setText(t);
+}
+
+void MonthlyWidget::slotConnections(int) {
+ plotMonth();
+}
+
+void MonthlyWidget::nextMonth() {
+ m_periodeFirst = KGlobal::locale()->calendar()->addMonths(m_periodeFirst, 1);
+
+ plotMonth();
+}
+
+void MonthlyWidget::prevMonth() {
+ m_periodeFirst = KGlobal::locale()->calendar()->addMonths(m_periodeFirst, -1);
+
+ plotMonth();
+}
+
+void MonthlyWidget::currentMonth() {
+ const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ QDate dt = QDate::currentDate();
+ calendar->setYMD(m_periodeFirst, calendar->year(dt), calendar->month(dt), 1);
+
+ plotMonth();
+}
+
+void MonthlyWidget::exportWizard() {
+ const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ QString date = QString::fromLatin1("%1-%2") // e.g.: June-2001
+ .arg(calendar->monthName(periodeFirst()))
+ .arg(calendar->year(periodeFirst()));
+
+ ExportWizard *wizard = new ExportWizard(0, date);
+ wizard->exec();
+ if (wizard->filename.isEmpty()) { // wizard aborted...
+ return;
+ }
+ if (QFile::exists(wizard->filename)) { // overwrite?
+ if (KMessageBox::Continue!=KMessageBox::warningContinueCancel(0, i18n("A document with this name already exists."), i18n("Overwrite file?"), i18n("&Overwrite") /*, true*/)) { // no
+ return;
+ }
+ }
+
+ // open file
+ Export *exportIFace = wizard->createExportFilter();
+ if (exportIFace == NULL) { // error
+ return;
+ }
+
+ if (!exportIFace->openFile()) { // error opening
+ KMessageBox::sorry(0, i18n("An error occurred while trying to open this file"), i18n("Sorry"), true);
+ delete exportIFace;
+ return; // abort...
+ }
+
+ // start writing data
+ exportIFace->addHeadline(i18n("Connection"), i18n("Day"), i18n("From"), i18n("Until"),
+ i18n("Duration"), i18n("Costs"), i18n("Bytes In"), i18n("Bytes Out") );
+
+ // name of the current connection
+ QString con;
+
+ // for collecting monthly statistics
+ int count = 0;
+ double costs = 0;
+ double bin = 0, bout = 0;
+ int duration = 0;
+
+ for(int i = 0; i < (int)logList.count(); i++) {
+ LogInfo *li = logList.at(i);
+
+ QDate logDate = li->from().date();
+ if (periodeFirst() <= logDate && periodeLast() >= logDate ) {
+ // get connection name for this line
+ con = li->connectionName();
+
+ // this connection name not in the list and combo box
+ if(lstConnections.findIndex(con) == -1) {
+ lstConnections.append(con);
+ cboConnections->insertItem(con);
+ }
+ // if all connections or the selected one
+ if(cboConnections->currentText() != con &&
+ cboConnections->currentItem() != 0)
+ continue;
+
+ count++;
+ costs += li->sessionCosts();
+ if(bin >= 0) {
+ if(li->bytesIn() < 0)
+ bin = -1;
+ else
+ bin += li->bytesIn();
+ }
+
+ if(bout >= 0) {
+ if(li->bytesOut() < 0)
+ bout = -1;
+ else
+ bout += li->bytesOut();
+ }
+
+ duration += li->from().secsTo(li->until());
+
+ QString _bin, _bout, b;
+ if(li->bytesIn() >= 0)
+ formatBytes(li->bytesIn(), _bin);
+ else
+ _bin = i18n("n/a");
+
+ if(li->bytesOut() >= 0)
+ formatBytes(li->bytesOut(), _bout);
+ else
+ _bout = i18n("n/a");
+
+ if(li->bytes() > 0)
+ formatBytes(li->bytes(), b);
+ else
+ b = i18n("n/a");
+
+ QString day;
+ day.sprintf("%2d", li->from().date().day());
+ QString con = li->connectionName();
+
+ QString s_duration;
+ formatDuration(li->from().secsTo(li->until()),
+ s_duration);
+
+ QString s_lifrom, s_liuntil, s_costs;
+ s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false);
+ s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false);
+ s_costs = KGlobal::locale()->formatMoney(li->sessionCosts());
+
+ // call export method
+ exportIFace->addDataline(con, day, s_lifrom, s_liuntil, s_duration,
+ s_costs, _bin, _bout);
+
+ }
+ }
+
+ if(calendar->month(periodeFirst()) == calendar->month(QDate::currentDate())) {
+
+ QString m_bin, m_bout;
+ if(bin < 0)
+ m_bin = i18n("n/a");
+ else
+ formatBytesMonth(bin, m_bin);
+
+ if(bout < 0)
+ m_bout = i18n("n/a");
+ else
+ formatBytesMonth(bout, m_bout);
+
+ QString m_duration;
+ formatDurationMonth(duration, m_duration);
+
+ costsMonth(costs, costs);
+ QString m_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+
+ QString datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true);
+
+ exportIFace->addEmptyLine();
+ exportIFace->addDataline(i18n("Monthly estimates (%1)").arg(datetime),
+ QString::null, QString::null, QString::null, m_duration, m_costs, m_bin, m_bout);
+ }
+
+ if(count) {
+ QString _bin, _bout, _b;
+
+ if(bin < 0)
+ _bin = i18n("n/a");
+ else
+ formatBytes(bin, _bin);
+
+ if(bout < 0)
+ _bout = i18n("n/a");
+ else
+ formatBytes(bout, _bout);
+
+ if(bin < 0 || bout < 0)
+ _b = i18n("n/a");
+ else
+ formatBytes(bout + bin, _b);
+
+ QString s_duration;
+ formatDuration(duration,
+ s_duration);
+
+ QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+
+ // call export methods
+ exportIFace->addEmptyLine();
+ exportIFace->addDataline(i18n("%n connection", "%n connections", count), QString::null, QString::null, QString::null, s_duration,
+ s_costs, _bin, _bout);
+ exportIFace->setFinishCode();
+
+ // write buffer to file and close file
+ if (!exportIFace->closeFile()) {
+ KMessageBox::sorry(0, i18n("An error occurred while trying to write to this file."), i18n("Sorry"), true);
+ delete exportIFace;
+ return;
+ }
+
+ }
+ delete exportIFace;
+}
+
+QDate MonthlyWidget::periodeFirst() const
+{
+ return m_periodeFirst;
+}
+
+QDate MonthlyWidget::periodeLast() const
+{
+ const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+
+ // One month minus one day
+ return calendar->addDays(calendar->addMonths(m_periodeFirst, 1), -1);
+}
+
+void MonthlyWidget::slotSelectionChanged()
+{
+ if (selectionItem)
+ {
+ int count = 0;
+ double costs = 0;
+ double bin = 0, bout = 0;
+ int duration = 0;
+ LogListItem *item;
+ LogInfo *li;
+ QListViewItemIterator it(lv);
+ while ( it.current() )
+ {
+ item = dynamic_cast<LogListItem*>(it.current());
+ if ( item && item->isSelected() && item->li)
+ {
+ li = item->li;
+ costs += li->sessionCosts();
+ if(bin >= 0) {
+ if(li->bytesIn() < 0)
+ bin = -1;
+ else
+ bin += li->bytesIn();
+ }
+
+ if(bout >= 0) {
+ if(li->bytesOut() < 0)
+ bout = -1;
+ else
+ bout += li->bytesOut();
+ }
+
+ duration += li->from().secsTo(li->until());
+ count++;
+ }
+ ++it;
+ }
+ if(count)
+ {
+ QString _bin, _bout, _b;
+
+ if(bin < 0)
+ _bin = i18n("n/a");
+ else
+ formatBytes(bin, _bin);
+
+ if(bout < 0)
+ _bout = i18n("n/a");
+ else
+ formatBytes(bout, _bout);
+
+ if(bin < 0 || bout < 0)
+ _b = i18n("n/a");
+ else
+ formatBytes(bout + bin, _b);
+
+ QString s_duration;
+ formatDuration(duration,
+ s_duration);
+
+ QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2));
+ selectionItem->setText(0, i18n("Selection (%n connection)", "Selection (%n connections)", count));
+ selectionItem->setText(1, s_duration);
+ selectionItem->setText(2, s_costs);
+ selectionItem->setText(3, _bin);
+ selectionItem->setText(4, _bout);
+ }
+ }
+}
+
+#include "monthly.moc"
diff --git a/kppp/logview/monthly.h b/kppp/logview/monthly.h
new file mode 100644
index 00000000..2a3cefc8
--- /dev/null
+++ b/kppp/logview/monthly.h
@@ -0,0 +1,80 @@
+/*
+ * kPPPlogview: a accounting log system for kPPP
+ *
+ * Copyright (C) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef __MONTHLY__H__
+#define __MONTHLY__H__
+
+#include "log.h"
+#include <qwidget.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qvaluelist.h>
+#include <qdatetime.h>
+
+#include <kbuttonbox.h>
+
+class KListView;
+class QComboBox;
+class LogListItem;
+
+class MonthlyWidget : public QWidget {
+ Q_OBJECT
+public:
+ MonthlyWidget(QWidget *parent = 0);
+
+private slots:
+ void prevMonth();
+ void nextMonth();
+ void currentMonth();
+ void slotConnections(int);
+ void exportWizard();
+ void slotSelectionChanged();
+
+private:
+ void layoutWidget();
+ void plotMonth();
+
+ /**
+ * Returns the first day in the period
+ */
+ QDate periodeFirst() const;
+ /**
+ * Returns the last day in the period
+ */
+ QDate periodeLast() const;
+
+ QDate m_periodeFirst; // First day in month
+ //int _month, _year;
+
+ QComboBox *cboConnections;
+ KButtonBox *bbox;
+ KListView *lv;
+ KListView *lv2;
+ LogListItem* selectionItem;
+ QLabel *title;
+ QPushButton *next, *prev, *today, *exportBttn;
+ QValueList<QString> lstConnections;
+ QGridLayout *tl;
+ QDateTime *dt;
+};
+
+#endif
diff --git a/kppp/macros.h b/kppp/macros.h
new file mode 100644
index 00000000..134ec2cf
--- /dev/null
+++ b/kppp/macros.h
@@ -0,0 +1,15 @@
+// helper macros for layouting
+
+#ifndef __MACROS__H__
+#define __MACROS__H__
+
+#include <qlayout.h>
+
+#define MIN_WIDTH(w) w->setMinimumWidth(w->sizeHint().width());
+#define MIN_HEIGHT(w) w->setMinimumHeight(w->sizeHint().height());
+#define MIN_SIZE(w) w->setMinimumSize(w->sizeHint());
+#define FIXED_SIZE(w) w->setFixedSize(w->sizeHint());
+#define FIXED_WIDTH(w) w->setFixedWidth(w->sizeHint().width());
+#define FIXED_HEIGHT(w) w->setFixedHeight(w->sizeHint().height());
+
+#endif
diff --git a/kppp/main.cpp b/kppp/main.cpp
new file mode 100644
index 00000000..96476851
--- /dev/null
+++ b/kppp/main.cpp
@@ -0,0 +1,453 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ * Copyright (C) 1998-2002 Harri Porten <porten@kde.org>
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+
+#include "main.h"
+
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <locale.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+
+#ifdef _XPG4_2
+#define __xnet_connect connect
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#include <kaboutdata.h>
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kdebug.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstandarddirs.h>
+
+#include "kpppwidget.h"
+#include "opener.h"
+#include "pppdata.h"
+#include "providerdb.h"
+#include "version.h"
+#include "requester.h"
+
+#include <X11/Xlib.h>
+
+static const char description[] =
+ I18N_NOOP("A dialer and front-end to pppd");
+
+static const KCmdLineOptions options[] =
+{
+ { "c <account_name>", I18N_NOOP("Connect using 'account_name'"), 0 },
+ { "m <modem_name>", I18N_NOOP("Connect using 'modem_name'"), 0 },
+ { "k", I18N_NOOP("Terminate an existing connection"), 0 },
+ { "q", I18N_NOOP("Quit after end of connection"), 0 },
+ { "r <rule_file>", I18N_NOOP("Check syntax of rule_file"), 0 },
+ { "T", I18N_NOOP("Enable test-mode"), 0 },
+ { "dev <device_name>", I18N_NOOP("Use the specified device"), 0 },
+ KCmdLineLastOption
+};
+
+
+KPPPWidget* p_kppp;
+
+// for testing purposes
+bool TESTING=0;
+
+// initial effective user id before possible suid status is dropped
+uid_t euid;
+// helper process' pid
+pid_t helperPid = -1;
+
+QString local_ip_address;
+QString remote_ip_address;
+QString pidfile;
+
+#if 0
+extern "C" {
+ static int kppp_x_errhandler( Display *dpy, XErrorEvent *err ) {
+ char errstr[256]; // safe
+
+ /*
+ if(gpppdata.pppdpid() >= 0) {
+ kill(gpppdata.pppdpid(), SIGTERM);
+ }
+
+ p_kppp->stopAccounting();
+ removedns();
+ unlockdevice();*/
+
+ XGetErrorText( dpy, err->error_code, errstr, 256 );
+ kdFatal() << "X Error: " << errstr << endl;
+ kdFatal() << "Major opcode: " << err->request_code << endl;
+ exit(256);
+ return 0;
+ }
+
+
+ static int kppp_xio_errhandler( Display * ) {
+ if(gpppdata.get_xserver_exit_disconnect()) {
+ fprintf(stderr, "X11 Error!\n");
+ if(gpppdata.pppdRunning())
+ Requester::rq->killPPPDaemon();
+
+ p_kppp->stopAccounting();
+ removedns();
+ Modem::modem->unlockdevice();
+ return 0;
+ } else{
+ kdFatal() << "Fatal IO error: client killed" << endl;
+ exit(256);
+ return 0;
+ }
+ }
+} /* extern "C" */
+#endif
+
+int main( int argc, char **argv ) {
+ // make sure that open/fopen and so on NEVER return 1 or 2 (stdout and stderr)
+ // Expl: if stdout/stderr were closed on program start (by parent), open()
+ // would return a FD of 1, 2 (or even 0 if stdin was closed too)
+ if(fcntl(0, F_GETFL) == -1)
+ (void)open("/dev/null", O_RDONLY);
+
+ if(fcntl(1, F_GETFL) == -1)
+ (void)open("/dev/null", O_WRONLY);
+
+ if(fcntl(2, F_GETFL) == -1)
+ (void)open("/dev/null", O_WRONLY);
+
+ // Don't insert anything above this line unless you really know what
+ // you're doing. We're most likely running setuid root here,
+ // until we drop this status a few lines below.
+ int sockets[2];
+ if(socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets) != 0) {
+ fprintf(stderr, "error creating socketpair !\n");
+ return 1;
+ }
+
+ switch(helperPid = fork()) {
+ case 0:
+ // child process
+ // make process leader of new group
+ setsid();
+ umask(0);
+ close(sockets[0]);
+ signal(SIGHUP, SIG_IGN);
+ (void) new Opener(sockets[1]);
+ // we should never get here
+ _exit(1);
+
+ case -1:
+ perror("fork() failed");
+ exit(1);
+ }
+
+ // parent process
+ close(sockets[1]);
+
+ // drop setuid status
+ euid = geteuid();
+ if (setgid(getgid()) < 0 && errno != EPERM) {
+ perror("setgid() failed");
+ exit(1);
+ }
+ setuid(getuid());
+ if (geteuid() != getuid()) {
+ perror("setuid() failed");
+ exit(1);
+ }
+
+ //
+ // end of setuid-dropping block.
+ //
+
+ // install exit handler that will kill the helper process
+ atexit(myShutDown);
+
+ // not needed anymore, just causes problems with broken setup
+ // if(getHomeDir() != 0)
+ // setenv("HOME", getHomeDir(), 1);
+
+ (void) new Requester(sockets[0]);
+
+ KAboutData aboutData("kppp", I18N_NOOP("KPPP"),
+ KPPPVERSION, description, KAboutData::License_GPL,
+ I18N_NOOP("(c) 1999-2002, The KPPP Developers"));
+ aboutData.addAuthor("Harri Porten", I18N_NOOP("Current maintainer"), "porten@kde.org");
+ aboutData.addAuthor("Bernd Wuebben", I18N_NOOP("Original author"), "wuebben@kde.org");
+ aboutData.addAuthor("Mario Weilguni",0, "");
+
+ KCmdLineArgs::init( argc, argv, &aboutData );
+ KCmdLineArgs::addCmdLineOptions( options );
+
+
+
+ KApplication a;
+
+ // set portable locale for decimal point
+ setlocale(LC_NUMERIC ,"C");
+
+ // open configuration file
+ gpppdata.open();
+
+ kdDebug(5002) << "helperPid: " << (int) helperPid << endl;
+
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ bool terminate_connection = args->isSet("k");
+ if (args->isSet("r"))
+ return RuleSet::checkRuleFile(args->getOption("r"));
+
+ TESTING = args->isSet("T");
+
+ // make sure that nobody can read the password from the
+ // config file
+ QString configFile = KGlobal::dirs()->saveLocation("config")
+ + QString(kapp->name()) + "rc";
+ if(access(QFile::encodeName(configFile), F_OK) == 0)
+ chmod(QFile::encodeName(configFile), S_IRUSR | S_IWUSR);
+
+ // do we really need to generate an empty directory structure here ?
+ KGlobal::dirs()->saveLocation("appdata", "Rules");
+
+ int pid = create_pidfile();
+ QString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile);
+
+ if(pid < 0) {
+ KMessageBox::error(0L, err_msg);
+ return 1;
+ }
+
+ if (terminate_connection) {
+ setgid(getgid());
+ setuid(getuid());
+ if (pid > 0)
+ kill(pid, SIGINT);
+ else
+ remove_pidfile();
+ return 0;
+ }
+
+ // Mario: testing
+ if(TESTING) {
+ gpppdata.open();
+ gpppdata.setAccountByIndex(0);
+
+ QString s = argv[2];
+ urlEncode(s);
+ kdDebug(5002) << s << endl;
+
+ remove_pidfile();
+ return 0;
+ }
+
+ if (pid > 0) {
+ QString msg = i18n("kppp has detected a %1 file.\n"
+ "Another instance of kppp seems to be "
+ "running under process-ID %2.\n"
+ "Please click Exit, make sure that you are "
+ "not running another kppp, delete the pid "
+ "file, and restart kppp.\n"
+ "Alternatively, if you have determined that "
+ "there is no other kppp running, please "
+ "click Continue to begin.")
+ .arg(pidfile).arg(pid);
+ int button = KMessageBox::warningYesNo(0, msg, i18n("Error"),
+ i18n("Exit"), KStdGuiItem::cont());
+ if (button == KMessageBox::Yes) /* exit */
+ return 1;
+
+ remove_pidfile();
+ pid = create_pidfile();
+ if(pid) {
+ KMessageBox::error(0L, err_msg);
+ return 1;
+ }
+ }
+
+ KPPPWidget kppp;
+ p_kppp = &kppp;
+
+ (void)new DockWidget(p_kppp->con_win, "dockw", p_kppp->stats);
+
+ a.setMainWidget(&kppp);
+ a.setTopWidget(&kppp);
+
+ // we really don't want to die accidentally, since that would leave the
+ // modem connected. If you really really want to kill me you must send
+ // me a SIGKILL.
+ signal(SIGINT, sighandler);
+ signal(SIGCHLD, sighandler);
+ signal(SIGUSR1, sighandler);
+ signal(SIGTERM, SIG_IGN);
+
+ // XSetErrorHandler( kppp_x_errhandler );
+ // XSetIOErrorHandler( kppp_xio_errhandler );
+
+ int ret = a.exec();
+
+ remove_pidfile();
+
+ return ret;
+}
+
+
+pid_t execute_command (const QString & cmd) {
+ QCString command = QFile::encodeName(cmd);
+ if (command.isEmpty() || command.length() > COMMAND_SIZE)
+ return (pid_t) -1;
+
+ pid_t id;
+
+ kdDebug(5002) << "Executing command: " << command << endl;
+
+ QApplication::flushX();
+ if((id = fork()) == 0) {
+ // don't bother dieppp()
+ signal(SIGCHLD, SIG_IGN);
+
+ // close file descriptors
+ const int open_max = sysconf( _SC_OPEN_MAX );
+ for (int fd = 3; fd < open_max; ++fd)
+ close(fd);
+
+ // drop privileges if running setuid root
+ setgid(getgid());
+ setuid(getuid());
+
+ system(command);
+ _exit(0);
+ }
+
+ return id;
+}
+
+
+// Create a file containing the current pid. Returns 0 on success,
+// -1 on failure or the pid of an already running kppp process.
+pid_t create_pidfile() {
+ int fd = -1;
+ char pidstr[40]; // safe
+
+ pidfile = KGlobal::dirs()->saveLocation("appdata") + "kppp.pid";
+
+ if(access(QFile::encodeName(pidfile), F_OK) == 0) {
+
+ if((access(QFile::encodeName(pidfile), R_OK) < 0) ||
+ (fd = open(QFile::encodeName(pidfile), O_RDONLY)) < 0)
+ return -1;
+
+ int sz = read(fd, &pidstr, 32);
+ close (fd);
+ if (sz < 0)
+ return -1;
+ pidstr[sz] = '\0';
+
+ kdDebug(5002) << "found kppp.pid containing: " << pidstr << endl;
+
+ // non-empty file ?
+ if (sz > 0) {
+ int oldpid;
+ int match = sscanf(pidstr, "%d", &oldpid);
+
+ // found a pid in pidfile ?
+ if (match < 1 || oldpid <= 0)
+ return -1;
+
+ // check if process exists
+ if (kill((pid_t)oldpid, 0) == 0 || errno != ESRCH)
+ return oldpid;
+ }
+
+ kdDebug(5002) << "pidfile is stale\n" << endl;
+ remove_pidfile();
+ }
+
+ if((fd = open(QFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
+ return -1;
+
+ fchown(fd, getuid(), getgid());
+
+ sprintf(pidstr, "%d\n", getpid());
+ write(fd, pidstr, strlen(pidstr));
+ close(fd);
+
+ return 0;
+}
+
+
+bool remove_pidfile() {
+ struct stat st;
+
+ // only remove regular files with user write permissions
+ if(stat(QFile::encodeName(pidfile), &st) == 0 )
+ if(S_ISREG(st.st_mode) && (access(QFile::encodeName(pidfile), W_OK) == 0)) {
+ unlink(QFile::encodeName(pidfile));
+ return true;
+ }
+
+ fprintf(stderr, "error removing pidfile.\n");
+ return false;
+}
+
+
+void myShutDown() {
+ pid_t pid;
+ // don't bother about SIGCHLDs anymore
+ signal(SIGCHLD, SIG_IGN);
+ // fprintf(stderr, "myShutDown(%i)\n", status);
+ pid = helperPid;
+ if(pid > 0) {
+ helperPid = -1;
+ // fprintf(stderr, "killing child process %i", pid);
+ kill(pid, SIGKILL);
+ }
+}
+
+void sighandler(int sig) {
+ QEvent *e = 0L;
+ if(sig == SIGCHLD) {
+ pid_t id = wait(0L);
+ if(id >= 0 && id == helperPid) // helper process died
+ e = new SignalEvent(sig);
+ } else if(sig == SIGINT || sig == SIGUSR1)
+ e = new SignalEvent(sig);
+
+ // let eventFilter() deal with this when we're back in the loop
+ if (e)
+ QApplication::postEvent(p_kppp, e);
+
+ signal(sig, sighandler); // reinstall signal handler
+}
+
diff --git a/kppp/main.h b/kppp/main.h
new file mode 100644
index 00000000..72a00a4a
--- /dev/null
+++ b/kppp/main.h
@@ -0,0 +1,46 @@
+/*
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <signal.h>
+
+#include "kpppwidget.h"
+
+void killpppd();
+void sighandler(int);
+pid_t execute_command(const QString &);
+pid_t create_pidfile();
+bool remove_pidfile();
+void myShutDown();
+
+#endif
diff --git a/kppp/maintainer.h b/kppp/maintainer.h
new file mode 100644
index 00000000..74543260
--- /dev/null
+++ b/kppp/maintainer.h
@@ -0,0 +1,7 @@
+#ifndef __MAINTAINER__H__
+#define __MAINTAINER__H__
+
+#define PRIMARY_MAINTAINER "Harri Porten"
+#define PRIMARY_MAINTAINER_MAIL "<porten@kde.org>"
+
+#endif
diff --git a/kppp/miniterm.cpp b/kppp/miniterm.cpp
new file mode 100644
index 00000000..bd426be7
--- /dev/null
+++ b/kppp/miniterm.cpp
@@ -0,0 +1,281 @@
+/*
+ * kPPP: A front end for pppd for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <termios.h>
+#include <sys/types.h>
+#include <kwin.h>
+#include <khelpmenu.h>
+#include <kiconloader.h>
+#include "pppdata.h"
+#include "modem.h"
+#include "miniterm.h"
+#include <klocale.h>
+#include <kpopupmenu.h>
+#include <kglobalsettings.h>
+#include <kapplication.h>
+#include <kmenubar.h>
+#include <kstdguiitem.h>
+
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qtimer.h>
+#include <qpopupmenu.h>
+
+
+extern PPPData gpppdata;
+
+MiniTerm::MiniTerm(QWidget *parent, const char *name)
+ : QDialog(parent, name, true)
+{
+ setCaption(i18n("Kppp Mini-Terminal"));
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+
+ m_file = new QPopupMenu(this);
+ m_file->insertItem( SmallIcon("fileclose"), i18n("&Close"), this, SLOT(cancelbutton()) );
+ m_options = new QPopupMenu(this);
+ m_options->insertItem(i18n("&Reset Modem"),this,SLOT(resetModem()));
+ m_help =
+ new KHelpMenu(this,
+ i18n("MiniTerm - A terminal emulation for KPPP\n\n"
+ "(c) 1997 Bernd Johannes Wuebben <wuebben@kde.org>\n"
+ "(c) 1998 Harri Porten <porten@kde.org>\n"
+ "(c) 1998 Mario Weilguni <mweilguni@kde.org>\n\n"
+ "This program is published under the GNU GPL\n"
+ "(GNU General Public License)"
+ ));
+
+ menubar = new KMenuBar(this);
+ menubar->insertItem( i18n("&File"), m_file );
+ menubar->insertItem( i18n("&Modem"), m_options );
+ menubar->insertItem( KStdGuiItem::help().text(), m_help->menu());
+
+ statusbar = new QLabel(this);
+ statusbar->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+
+ terminal = new MyTerm(this, "term");
+
+ setupToolbar();
+
+ QVBoxLayout *layout=new QVBoxLayout(this);
+ layout->addWidget(menubar);
+ layout->addWidget(toolbar);
+ layout->addWidget(terminal);
+ layout->addWidget(statusbar);
+
+ inittimer = new QTimer(this);
+ connect(inittimer,SIGNAL(timeout()),this,SLOT(init()));
+ inittimer->start(500);
+
+ resize(550,400);
+}
+
+
+MiniTerm::~MiniTerm() {
+ delete toolbar;
+ delete statusbar;
+}
+
+
+void MiniTerm::setupToolbar() {
+ toolbar = new KToolBar( this );
+
+ toolbar->insertButton("exit", 0,
+ SIGNAL(clicked()), this,
+ SLOT(cancelbutton()), TRUE, i18n("Close MiniTerm"));
+
+ toolbar->insertButton("back", 0,
+ SIGNAL(clicked()), this,
+ SLOT(resetModem()), TRUE, i18n("Reset Modem"));
+
+ toolbar->insertButton("help", 0,
+ SIGNAL(clicked()), this,
+ SLOT(help()), TRUE, i18n("Help"));
+
+ toolbar->setBarPos( KToolBar::Top );
+ toolbar->setMovingEnabled(false);
+ toolbar->updateRects(true);
+}
+
+
+void MiniTerm::init() {
+ inittimer->stop();
+ statusbar->setText(i18n("Initializing Modem"));
+ kapp->processEvents();
+
+ int lock = Modem::modem->lockdevice();
+ if (lock == 1) {
+ statusbar->setText(i18n("Modem device is locked."));
+ return;
+ }
+
+ if (lock == -1) {
+ statusbar->setText(i18n("Unable to create modem lock file."));
+ return;
+ }
+
+ if(Modem::modem->opentty()) {
+ if(Modem::modem->hangup()) {
+ // send a carriage return and then wait a bit so that the modem will
+ // let us issue commands.
+ if(gpppdata.modemPreInitDelay() > 0) {
+ usleep(gpppdata.modemPreInitDelay() * 5000);
+ Modem::modem->writeLine("");
+ usleep(gpppdata.modemPreInitDelay() * 5000);
+ }
+ Modem::modem->writeLine(gpppdata.modemInitStr(0).local8Bit());
+ usleep(gpppdata.modemInitDelay() * 10000);
+
+ statusbar->setText(i18n("Modem Ready"));
+ terminal->setFocus();
+
+ kapp->processEvents();
+ kapp->processEvents();
+
+ Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+ return;
+ }
+ }
+
+ // opentty() or hangup() failed
+ statusbar->setText(Modem::modem->modemMessage());
+ Modem::modem->unlockdevice();
+}
+
+
+void MiniTerm::readChar(unsigned char c) {
+
+ switch((int)c) {
+ case 8:
+ terminal->backspace();
+ break;
+ case 10:
+ terminal->mynewline();
+ break;
+ case 13:
+ terminal->myreturn();
+ break;
+ case 127:
+ terminal->backspace();
+ break;
+ default:
+ terminal->insertChar(c);
+ }
+}
+
+
+void MiniTerm::cancelbutton() {
+ Modem::modem->stop();
+
+ statusbar->setText(i18n("Hanging up..."));
+ kapp->processEvents();
+ KApplication::flushX();
+
+ Modem::modem->hangup();
+
+ Modem::modem->closetty();
+ Modem::modem->unlockdevice();
+
+ reject();
+}
+
+
+void MiniTerm::resetModem() {
+ statusbar->setText(i18n("Resetting Modem"));
+ terminal->newLine();
+ kapp->processEvents();
+ KApplication::flushX();
+
+ Modem::modem->hangup();
+
+ statusbar->setText(i18n("Modem Ready"));
+}
+
+
+void MiniTerm::closeEvent( QCloseEvent *e ) {
+ cancelbutton();
+ e->accept();
+}
+
+
+void MiniTerm::help() {
+ kapp->invokeHelp();
+}
+
+
+MyTerm::MyTerm(QWidget *parent, const char* name)
+ : QMultiLineEdit(parent, name)
+{
+ setFont(KGlobalSettings::fixedFont());
+}
+
+void MyTerm::keyPressEvent(QKeyEvent *k) {
+ // ignore meta keys
+ if (k->ascii() == 0)
+ return;
+
+ if(k->ascii() == 13)
+ myreturn();
+
+ Modem::modem->writeChar((unsigned char) k->ascii());
+}
+
+
+void MyTerm::insertChar(unsigned char c) {
+ QMultiLineEdit::insert(QChar(c));
+}
+
+
+void MyTerm::newLine() {
+ QMultiLineEdit::newLine();
+}
+
+
+void MyTerm::del() {
+ QMultiLineEdit::del();
+}
+
+
+void MyTerm::backspace() {
+ QMultiLineEdit::backspace();
+}
+
+
+void MyTerm::myreturn() {
+ int column;
+ int line;
+
+ getCursorPosition(&line,&column);
+ for (int i = 0; i < column;i++)
+ QMultiLineEdit::cursorLeft();
+}
+
+
+void MyTerm::mynewline() {
+ QMultiLineEdit::end(FALSE);
+ QMultiLineEdit::newLine();
+}
+
+#include "miniterm.moc"
diff --git a/kppp/miniterm.h b/kppp/miniterm.h
new file mode 100644
index 00000000..aef973cb
--- /dev/null
+++ b/kppp/miniterm.h
@@ -0,0 +1,103 @@
+/*
+ *
+ * kPPP: A front end for pppd for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef _MINITERM_H_
+#define _MINITERM_H_
+
+#include <qdialog.h>
+#include <qpixmap.h>
+#include <qevent.h>
+#include <qmultilineedit.h>
+#include <ktoolbar.h>
+
+class KHelpMenu;
+
+class QTimer;
+class QMenuBar;
+class KToolBar;
+class KHelpMenu;
+class QPushButton;
+class QLabel;
+
+class MyTerm : public QMultiLineEdit {
+ Q_OBJECT
+public:
+ MyTerm(QWidget *parent=0, const char *name=0);
+
+ void keyPressEvent (QKeyEvent*);
+ void insertChar(unsigned char c);
+ void newLine();
+ void backspace();
+ void del();
+ void myreturn();
+ void mynewline();
+};
+
+
+class MiniTerm : public QDialog {
+ Q_OBJECT
+public:
+
+ MiniTerm(QWidget *parent=0, const char *name=0);
+ ~MiniTerm();
+
+ void closeEvent( QCloseEvent *e );
+
+public slots:
+ void cancelbutton();
+ void init();
+ void readChar(unsigned char);
+ void help();
+ void resetModem();
+
+protected:
+ void setupToolbar();
+
+ QPushButton *cancel;
+ MyTerm *terminal;
+ QTimer *inittimer;
+
+ QMenuBar * menubar;
+ KToolBar * toolbar;
+ QPopupMenu * m_file;
+ QPopupMenu * m_edit;
+ QPopupMenu * m_options;
+ KHelpMenu * m_help;
+ QLabel * statusbar;
+ QPushButton *pb1;
+ QPushButton *pb2;
+ QPushButton *pb3;
+ QPushButton *pb4;
+
+ QPixmap pb1_pixmap;
+ QPixmap pb2_pixmap;
+ QPixmap pb3_pixmap;
+ QPixmap pb4_pixmap;
+};
+
+
+#endif
diff --git a/kppp/modem.cpp b/kppp/modem.cpp
new file mode 100644
index 00000000..0e8b016c
--- /dev/null
+++ b/kppp/modem.cpp
@@ -0,0 +1,619 @@
+/*
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was added by Harri Porten <porten@tu-harburg.de>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/ioctl.h>
+#include <setjmp.h>
+#include <qregexp.h>
+#include <assert.h>
+
+#include "modem.h"
+#include "pppdata.h"
+#include "requester.h"
+#include <klocale.h>
+#include <kdebug.h>
+#include <kcmdlineargs.h>
+#include <config.h>
+
+static sigjmp_buf jmp_buffer;
+
+Modem *Modem::modem = 0;
+
+Modem::Modem() :
+ modemfd(-1),
+ sn(0L),
+ data_mode(false),
+ modem_is_locked(false)
+{
+ assert(modem==0);
+ modem = this;
+ args = KCmdLineArgs::parsedArgs();
+}
+
+
+Modem::~Modem() {
+ modem = 0;
+}
+
+
+speed_t Modem::modemspeed() {
+ // convert the string modem speed int the gpppdata object to a t_speed type
+ // to set the modem. The constants here should all be ifdef'd because
+ // other systems may not have them
+ int i = gpppdata.speed().toInt()/100;
+
+ switch(i) {
+ case 24:
+ return B2400;
+ break;
+ case 96:
+ return B9600;
+ break;
+ case 192:
+ return B19200;
+ break;
+ case 384:
+ return B38400;
+ break;
+#ifdef B57600
+ case 576:
+ return B57600;
+ break;
+#endif
+
+#ifdef B115200
+ case 1152:
+ return B115200;
+ break;
+#endif
+
+#ifdef B230400
+ case 2304:
+ return B230400;
+ break;
+#endif
+
+#ifdef B460800
+ case 4608:
+ return B460800;
+ break;
+#endif
+
+#ifdef B921600
+ case 9216:
+ return B921600;
+ break;
+#endif
+
+ default:
+ return B38400;
+ break;
+ }
+}
+
+
+bool Modem::opentty() {
+ // int flags;
+ QString device = "";
+ if (args->isSet("dev"))
+ device = args->getOption("dev");
+ else
+ device = gpppdata.modemDevice();
+ kdDebug() << "Opening Device: " << device << endl;
+
+ if((modemfd = Requester::rq->openModem(device))<0) {
+ errmsg = i18n("Unable to open modem.");
+ return false;
+ }
+
+#if 0
+ if(gpppdata.UseCDLine()) {
+ if(ioctl(modemfd, TIOCMGET, &flags) == -1) {
+ errmsg = i18n("Unable to detect state of CD line.");
+ ::close(modemfd);
+ modemfd = -1;
+ return false;
+ }
+ if ((flags&TIOCM_CD) == 0) {
+ errmsg = i18n("The modem is not ready.");
+ ::close(modemfd);
+ modemfd = -1;
+ return false;
+ }
+ }
+#endif
+
+ tcdrain (modemfd);
+ tcflush (modemfd, TCIOFLUSH);
+
+ if(tcgetattr(modemfd, &tty) < 0){
+ // this helps in some cases
+ tcsendbreak(modemfd, 0);
+ sleep(1);
+ if(tcgetattr(modemfd, &tty) < 0){
+ errmsg = i18n("The modem is busy.");
+ ::close(modemfd);
+ modemfd = -1;
+ return false;
+ }
+ }
+
+ memset(&initial_tty,'\0',sizeof(initial_tty));
+
+ initial_tty = tty;
+
+ tty.c_cc[VMIN] = 0; // nonblocking
+ tty.c_cc[VTIME] = 0;
+ tty.c_oflag = 0;
+ tty.c_lflag = 0;
+
+ tty.c_cflag &= ~(CSIZE | CSTOPB | PARENB);
+ tty.c_cflag |= CS8 | CREAD;
+ tty.c_cflag |= CLOCAL; // ignore modem status lines
+ tty.c_iflag = IGNBRK | IGNPAR /* | ISTRIP */ ;
+ tty.c_lflag &= ~ICANON; // non-canonical mode
+ tty.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHOKE);
+
+
+ // the english/i18n mix below is ugly but we want to keep working
+ // after someone changed the code to use i18n'ed config values
+ QString flowCtrl = gpppdata.flowcontrol();
+ if(flowCtrl != "None" && flowCtrl != i18n("None")) {
+ if(flowCtrl == "CRTSCTS" || flowCtrl == i18n("Hardware [CRTSCTS]")) {
+ tty.c_cflag |= CRTSCTS;
+ }
+ else {
+ tty.c_iflag |= IXON | IXOFF;
+ tty.c_cc[VSTOP] = 0x13; /* DC3 = XOFF = ^S */
+ tty.c_cc[VSTART] = 0x11; /* DC1 = XON = ^Q */
+ }
+ }
+ else {
+ tty.c_cflag &= ~CRTSCTS;
+ tty.c_iflag &= ~(IXON | IXOFF);
+ }
+
+ cfsetospeed(&tty, modemspeed());
+ cfsetispeed(&tty, modemspeed());
+
+ tcdrain(modemfd);
+
+ if(tcsetattr(modemfd, TCSANOW, &tty) < 0){
+ errmsg = i18n("The modem is busy.");
+ ::close(modemfd);
+ modemfd=-1;
+ return false;
+ }
+
+ errmsg = i18n("Modem Ready.");
+ return true;
+}
+
+
+bool Modem::closetty() {
+ if(modemfd >=0 ) {
+ stop();
+ /* discard data not read or transmitted */
+ tcflush(modemfd, TCIOFLUSH);
+
+ if(tcsetattr(modemfd, TCSANOW, &initial_tty) < 0){
+ errmsg = i18n("Can't restore tty settings: tcsetattr()\n");
+ ::close(modemfd);
+ modemfd = -1;
+ return false;
+ }
+ ::close(modemfd);
+ modemfd = -1;
+ }
+
+ return true;
+}
+
+
+void Modem::readtty(int) {
+ char buffer[200];
+ unsigned char c;
+ int len;
+
+ // read data in chunks of up to 200 bytes
+ if((len = ::read(modemfd, buffer, 200)) > 0) {
+ // split buffer into single characters for further processing
+ for(int i = 0; i < len; i++) {
+ c = buffer[i] & 0x7F;
+ emit charWaiting(c);
+ }
+ }
+}
+
+
+void Modem::notify(const QObject *receiver, const char *member) {
+ connect(this, SIGNAL(charWaiting(unsigned char)), receiver, member);
+ startNotifier();
+}
+
+
+void Modem::stop() {
+ disconnect(SIGNAL(charWaiting(unsigned char)));
+ stopNotifier();
+}
+
+
+void Modem::startNotifier() {
+ if(modemfd >= 0) {
+ if(sn == 0) {
+ sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this);
+ connect(sn, SIGNAL(activated(int)), SLOT(readtty(int)));
+ kdDebug(5002) << "QSocketNotifier started!" << endl;
+ } else {
+ // Debug("QSocketNotifier re-enabled!");
+ sn->setEnabled(true);
+ }
+ }
+}
+
+
+void Modem::stopNotifier() {
+ if(sn != 0) {
+ sn->setEnabled(false);
+ disconnect(sn);
+ delete sn;
+ sn = 0;
+ kdDebug(5002) << "QSocketNotifier stopped!" << endl;
+ }
+}
+
+
+void Modem::flush() {
+ char c;
+ while(read(modemfd, &c, 1) == 1);
+}
+
+
+bool Modem::writeChar(unsigned char c) {
+ int s;
+ do {
+ s = write(modemfd, &c, 1);
+ if (s < 0) {
+ kdError(5002) << "write() in Modem::writeChar failed" << endl;
+ return false;
+ }
+ } while(s == 0);
+
+ return true;
+}
+
+
+bool Modem::writeLine(const char *buf) {
+ int len = strlen(buf);
+ char *b = new char[len+2];
+ memcpy(b, buf, len);
+ // different modems seem to need different line terminations
+ QString term = gpppdata.enter();
+ if(term == "LF")
+ b[len++]='\n';
+ else if(term == "CR")
+ b[len++]='\r';
+ else if(term == "CR/LF") {
+ b[len++]='\r';
+ b[len++]='\n';
+ }
+ int l = len;
+ while(l) {
+ int wr = write(modemfd, &b[len-l], l);
+ if(wr < 0) {
+ if (errno == EAGAIN)
+ continue;
+ // TODO do something meaningful with the error code (or ignore it
+ kdError(5002) << "write() in Modem::writeLine failed" << endl;
+ delete[] b;
+ return false;
+ }
+ l -= wr;
+ }
+ delete[] b;
+ return true;
+}
+
+
+bool Modem::hangup() {
+ // this should really get the modem to hang up and go into command mode
+ // If anyone sees a fault in the following please let me know, since
+ // this is probably the most imporant snippet of code in the whole of
+ // kppp. If people complain about kppp being stuck, this piece of code
+ // is most likely the reason.
+ struct termios temptty;
+
+ if(modemfd >= 0) {
+
+ // is this Escape & HangupStr stuff really necessary ? (Harri)
+
+ if (data_mode) escape_to_command_mode();
+
+ // Then hangup command
+ writeLine(gpppdata.modemHangupStr().local8Bit());
+
+ usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec
+
+
+#ifndef DEBUG_WO_DIALING
+ if (sigsetjmp(jmp_buffer, 1) == 0) {
+ // set alarm in case tcsendbreak() hangs
+ signal(SIGALRM, alarm_handler);
+ alarm(2);
+
+ tcsendbreak(modemfd, 0);
+
+ alarm(0);
+ signal(SIGALRM, SIG_IGN);
+ } else {
+ kdWarning(5002) << "Modem did not respond properly." << endl;
+#if 0 // observed false alarms with some modems
+ // we reach this point if the alarm handler got called
+ closetty();
+ close(modemfd);
+ modemfd = -1;
+ errmsg = i18n("The modem does not respond.");
+ return false;
+#endif
+ }
+
+#ifndef __svr4__ // drops DTR but doesn't set it afterwards again. not good for init.
+ tcgetattr(modemfd, &temptty);
+ cfsetospeed(&temptty, B0);
+ cfsetispeed(&temptty, B0);
+ tcsetattr(modemfd, TCSAFLUSH, &temptty);
+#else
+ int modemstat;
+ ioctl(modemfd, TIOCMGET, &modemstat);
+ modemstat &= ~TIOCM_DTR;
+ ioctl(modemfd, TIOCMSET, &modemstat);
+ ioctl(modemfd, TIOCMGET, &modemstat);
+ modemstat |= TIOCM_DTR;
+ ioctl(modemfd, TIOCMSET, &modemstat);
+#endif
+
+ usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 secs
+
+ cfsetospeed(&temptty, modemspeed());
+ cfsetispeed(&temptty, modemspeed());
+ tcsetattr(modemfd, TCSAFLUSH, &temptty);
+#endif
+ return true;
+ } else
+ return false;
+}
+
+
+void Modem::escape_to_command_mode() {
+ // Send Properly bracketed escape code to put the modem back into command state.
+ // A modem will accept AT commands only when it is in command state.
+ // When a modem sends the host the CONNECT string, that signals
+ // that the modem is now in the connect state (no long accepts AT commands.)
+ // Need to send properly timed escape sequence to put modem in command state.
+ // Escape codes and guard times are controlled by S2 and S12 values.
+ //
+ tcflush(modemfd, TCIOFLUSH);
+
+ // +3 because quiet time must be greater than guard time.
+ usleep((gpppdata.modemEscapeGuardTime()+3)*20000);
+ QCString tmp = gpppdata.modemEscapeStr().local8Bit();
+ write(modemfd, tmp.data(), tmp.length());
+ tcflush(modemfd, TCIOFLUSH);
+ usleep((gpppdata.modemEscapeGuardTime()+3)*20000);
+
+ data_mode = false;
+}
+
+
+const QString Modem::modemMessage() {
+ return errmsg;
+}
+
+
+QString Modem::parseModemSpeed(const QString &s) {
+ // this is a small (and bad) parser for modem speeds
+ int rx = -1;
+ int tx = -1;
+ int i;
+ QString result;
+
+ kdDebug(5002) << "Modem reported result string: " << s << endl;
+
+ const int RXMAX = 7;
+ const int TXMAX = 2;
+ QRegExp rrx[RXMAX] = {
+ QRegExp("[0-9]+[:/ ]RX", false),
+ QRegExp("[0-9]+RX", false),
+ QRegExp("[/: -][0-9]+[/: ]", false),
+ QRegExp("[/: -][0-9]+$", false),
+ QRegExp("CARRIER [^0-9]*[0-9]+", false),
+ QRegExp("CONNECT [^0-9]*[0-9]+", false),
+ QRegExp("[0-9]+") // panic mode
+ };
+
+ QRegExp trx[TXMAX] = {
+ QRegExp("[0-9]+[:/ ]TX", false),
+ QRegExp("[0-9]+TX", false)
+ };
+
+ for(i = 0; i < RXMAX; i++) {
+ int len, idx, result;
+ if((idx = rrx[i].search(s)) > -1) {
+ len = rrx[i].matchedLength();
+
+ //
+ // rrx[i] has been matched, idx contains the start of the match
+ // and len contains how long the match is. Extract the match.
+ //
+ QString sub = s.mid(idx, len);
+
+ //
+ // Now extract the digits only from the match, which will
+ // then be converted to an int.
+ //
+ if ((idx = rrx[RXMAX-1].search( sub )) > -1) {
+ len = rrx[RXMAX-1].matchedLength();
+ sub = sub.mid(idx, len);
+ result = sub.toInt();
+ if(result > 0) {
+ rx = result;
+ break;
+ }
+ }
+ }
+ }
+
+ for(i = 0; i < TXMAX; i++) {
+ int len, idx, result;
+ if((idx = trx[i].search(s)) > -1) {
+ len = trx[i].matchedLength();
+
+ //
+ // trx[i] has been matched, idx contains the start of the match
+ // and len contains how long the match is. Extract the match.
+ //
+ QString sub = s.mid(idx, len);
+
+ //
+ // Now extract the digits only from the match, which will then
+ // be converted to an int.
+ //
+ if((idx = rrx[RXMAX-1].search(sub)) > -1) {
+ len = rrx[RXMAX-1].matchedLength();
+ sub = sub.mid(idx, len);
+ result = sub.toInt();
+ if(result > 0) {
+ tx = result;
+ break;
+ }
+ }
+ }
+ }
+
+ if(rx == -1 && tx == -1)
+ result = i18n("Unknown speed");
+ else if(tx == -1)
+ result.setNum(rx);
+ else if(rx == -1) // should not happen
+ result.setNum(tx);
+ else
+ result.sprintf("%d/%d", rx, tx);
+
+ kdDebug(5002) << "The parsed result is: " << result << endl;
+
+ return result;
+}
+
+
+// Lock modem device. Returns 0 on success 1 if the modem is locked and -1 if
+// a lock file can't be created ( permission problem )
+int Modem::lockdevice() {
+ int fd;
+ char newlock[80]=""; // safe
+
+ if(!gpppdata.modemLockFile()) {
+ kdDebug(5002) << "The user doesn't want a lockfile." << endl;
+ return 0;
+ }
+
+ if (modem_is_locked)
+ return 1;
+
+ QString device = "";
+ if (args->isSet("dev"))
+ device = args->getOption("dev");
+ else
+ device = gpppdata.modemDevice();
+
+ QString lockfile = LOCK_DIR"/LCK..";
+ lockfile += device.mid(5); // append everything after /dev/
+
+ if(access(QFile::encodeName(lockfile), F_OK) == 0) {
+ if ((fd = Requester::rq->openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
+ // Mario: it's not necessary to read more than lets say 32 bytes. If
+ // file has more than 32 bytes, skip the rest
+ char oldlock[33]; // safe
+ int sz = read(fd, &oldlock, 32);
+ close (fd);
+ if (sz <= 0)
+ return 1;
+ oldlock[sz] = '\0';
+
+ kdDebug(5002) << "Device is locked by: " << &oldlock << endl;
+
+ int oldpid;
+ int match = sscanf(oldlock, "%d", &oldpid);
+
+ // found a pid in lockfile ?
+ if (match < 1 || oldpid <= 0)
+ return 1;
+
+ // check if process exists
+ if (kill((pid_t)oldpid, 0) == 0 || errno != ESRCH)
+ return 1;
+
+ kdDebug(5002) << "lockfile is stale" << endl;
+ }
+ }
+
+ fd = Requester::rq->openLockfile(device,
+ O_WRONLY|O_TRUNC|O_CREAT);
+ if(fd >= 0) {
+ sprintf(newlock,"%010d\n", getpid());
+ kdDebug(5002) << "Locking Device: " << newlock << endl;
+
+ write(fd, newlock, strlen(newlock));
+ close(fd);
+ modem_is_locked=true;
+
+ return 0;
+ }
+
+ return -1;
+
+}
+
+
+// UnLock modem device
+void Modem::unlockdevice() {
+ if (modem_is_locked) {
+ kdDebug(5002) << "UnLocking Modem Device" << endl;
+ Requester::rq->removeLockfile();
+ modem_is_locked=false;
+ }
+}
+
+void alarm_handler(int) {
+ // fprintf(stderr, "alarm_handler(): Received SIGALRM\n");
+
+ // jump
+ siglongjmp(jmp_buffer, 1);
+}
+
+#include "modem.moc"
diff --git a/kppp/modem.h b/kppp/modem.h
new file mode 100644
index 00000000..3c744b38
--- /dev/null
+++ b/kppp/modem.h
@@ -0,0 +1,94 @@
+/*
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was added by Harri Porten <porten@tu-harburg.de>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _MODEM_H_
+#define _MODEM_H_
+
+#include <qdir.h>
+
+#include <sys/types.h>
+#include <termios.h>
+#include <unistd.h>
+
+#include <qsocketnotifier.h>
+
+#include <config.h>
+
+class KCmdLineArgs;
+
+void alarm_handler(int);
+
+class Modem : public QObject {
+ Q_OBJECT
+public:
+ Modem();
+ ~Modem();
+
+ bool opentty();
+ bool closetty();
+ bool hangup();
+ bool writeChar(unsigned char);
+ bool writeLine(const char *);
+ bool dataMode() const { return data_mode; }
+ void setDataMode(bool set) { data_mode = set; }
+ const QString modemMessage();
+ speed_t modemspeed();
+ static QString parseModemSpeed(const QString &);
+ void notify(const QObject *, const char *);
+ void stop();
+ void flush();
+
+ int lockdevice();
+ void unlockdevice();
+
+public:
+ static Modem *modem;
+
+signals:
+ void charWaiting(unsigned char);
+
+private slots:
+ void startNotifier();
+ void stopNotifier();
+ void readtty(int);
+
+private:
+ void escape_to_command_mode();
+ KCmdLineArgs *args;
+
+private:
+ int modemfd;
+ QSocketNotifier *sn;
+ bool data_mode;
+ QString errmsg;
+ struct termios initial_tty;
+ struct termios tty;
+ bool modem_is_locked;
+};
+
+#endif
+
+
diff --git a/kppp/modemcmds.cpp b/kppp/modemcmds.cpp
new file mode 100644
index 00000000..3f6e7af7
--- /dev/null
+++ b/kppp/modemcmds.cpp
@@ -0,0 +1,384 @@
+/*
+ * kPPP: A front end for pppd for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with dummyWidget program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <qlayout.h>
+#include <qslider.h>
+#include <kbuttonbox.h>
+#include <stdlib.h>
+#include <kapplication.h> // for getMiniIcon()
+#include <klocale.h>
+#include "modemcmds.h"
+#include "pppdata.h"
+#include <kwin.h>
+
+#include <qgroupbox.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+
+
+#define ADJUSTEDIT(e) e->setText("XXXXXXXXqy"); e->setMinimumSize(e->sizeHint()); e->setFixedHeight(e->sizeHint().height()); e->setText(""); e->setMaxLength(MODEMSTR_SIZE);
+
+// a little trick to make the label look like a disabled lineedit
+#define FORMATSLIDERLABEL(l) l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(QLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(QFrame::WinPanel|QFrame::Sunken); l->setLineWidth(2);
+
+ModemCommands::ModemCommands(QWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, i18n("Edit Modem Commands"), Ok|Cancel)
+{
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+ QWidget *dummyWidget = new QWidget(this);
+ setMainWidget(dummyWidget);
+
+ const int GRIDROWS = 22;
+ int row = 0;
+
+ // toplevel layout
+ QVBoxLayout *tl = new QVBoxLayout(dummyWidget, 10, 4);
+
+ // add grid + frame
+ QGridLayout *l1 = new QGridLayout(GRIDROWS, 4);
+ tl->addLayout(l1);
+ box = new QGroupBox(dummyWidget, "box");
+ l1->addMultiCellWidget(box, row++, GRIDROWS, 0, 3);
+
+ // put slider and label into a separate H-Box
+ QHBoxLayout *l2 = new QHBoxLayout;
+ l1->addLayout(l2, row, 2);
+ lpreinitslider = new QLabel("MMMM", dummyWidget);
+ FORMATSLIDERLABEL(lpreinitslider);
+
+ preinitslider = new QSlider(0, 300, 1, 0,
+ QSlider::Horizontal, dummyWidget);
+ preinitslider->setFixedHeight(preinitslider->sizeHint().height());
+ connect(preinitslider, SIGNAL(valueChanged(int)),
+ lpreinitslider, SLOT(setNum(int)));
+ l2->addWidget(lpreinitslider, 0);
+ l2->addWidget(preinitslider, 1);
+
+ lpreinit = new QLabel(i18n("Pre-init delay (sec/100):"), dummyWidget);
+ l1->addWidget(lpreinit, row++, 1);
+
+ for(int i = 0; i < PPPData::NumInitStrings; i++) {
+ initstr[i] = new QLineEdit(dummyWidget);
+ QLabel *initLabel = new QLabel(i18n("Initialization string %1:").arg(i + 1),
+ dummyWidget);
+ ADJUSTEDIT(initstr[i]);
+ l1->addWidget(initLabel, row, 1);
+ l1->addWidget(initstr[i], row++, 2);
+ }
+
+ QHBoxLayout *l3 = new QHBoxLayout;
+ l1->addLayout(l3, row, 2);
+ linitslider = new QLabel("MMMM", dummyWidget);
+ FORMATSLIDERLABEL(linitslider);
+ initslider = new QSlider(1, 300, 1, 0,
+ QSlider::Horizontal, dummyWidget);
+ initslider->setFixedHeight(initslider->sizeHint().height());
+ connect(initslider, SIGNAL(valueChanged(int)),
+ linitslider, SLOT(setNum(int)));
+ l3->addWidget(linitslider, 0);
+ l3->addWidget(initslider, 1);
+
+ label3 = new QLabel(i18n("Post-init delay (sec/100):"), dummyWidget);
+ l1->addWidget(label3, row++, 1);
+
+ /* Set ATS11 (Dial tone duration) between 0-255 (Default ~ 70) */
+ QHBoxLayout *l4 = new QHBoxLayout;
+ l1->addLayout(l4, row, 2);
+ ldurationslider = new QLabel("MMMM", dummyWidget);
+ FORMATSLIDERLABEL(ldurationslider);
+ durationslider = new QSlider(1, 255, 1, 0,
+ QSlider::Horizontal, dummyWidget);
+ durationslider->setFixedHeight(durationslider->sizeHint().height());
+ connect(durationslider, SIGNAL(valueChanged(int)),
+ ldurationslider, SLOT(setNum(int)));
+ l4->addWidget(ldurationslider, 0);
+ l4->addWidget(durationslider, 1);
+
+ lduration = new QLabel(i18n("Dialing speed (sec/100):"), dummyWidget);
+ l1->addWidget(lduration, row++, 1);
+
+
+ initresp = new QLineEdit(dummyWidget);
+ label2 = new QLabel(i18n("Init &response:"), dummyWidget);
+ label2->setBuddy(initresp);
+ ADJUSTEDIT(initresp);
+ l1->addWidget(label2, row, 1);
+ l1->addWidget(initresp, row++, 2);
+
+ nodetectdialtone = new QLineEdit(dummyWidget);
+ lnodetectdialtone = new QLabel(i18n("No di&al tone detection:"), dummyWidget);
+ lnodetectdialtone->setBuddy(nodetectdialtone);
+ ADJUSTEDIT(nodetectdialtone);
+ l1->addWidget(lnodetectdialtone, row, 1);
+ l1->addWidget(nodetectdialtone, row++, 2);
+
+ dialstr = new QLineEdit(dummyWidget);
+ label4 = new QLabel(i18n("Dial &string:"),dummyWidget);
+ label4->setBuddy(dialstr);
+ ADJUSTEDIT(dialstr);
+ l1->addWidget(label4, row, 1);
+ l1->addWidget(dialstr, row++, 2);
+
+ connectresp = new QLineEdit(dummyWidget);
+ label5 = new QLabel(i18n("Co&nnect response:"), dummyWidget);
+ label5->setBuddy(connectresp);
+ ADJUSTEDIT(connectresp);
+ l1->addWidget(label5, row, 1);
+ l1->addWidget(connectresp, row++, 2);
+
+ busyresp = new QLineEdit(dummyWidget);
+ label6 = new QLabel(i18n("Busy response:"), dummyWidget);
+ ADJUSTEDIT(busyresp);
+ l1->addWidget(label6, row, 1);
+ l1->addWidget(busyresp, row++, 2);
+
+ nocarrierresp = new QLineEdit(dummyWidget);
+ label7 = new QLabel(i18n("No carr&ier response:"), dummyWidget);
+ label7->setBuddy(nocarrierresp);
+ ADJUSTEDIT(nocarrierresp);
+ l1->addWidget(label7, row, 1);
+ l1->addWidget(nocarrierresp, row++, 2);
+
+ nodialtoneresp = new QLineEdit(dummyWidget);
+ label8 = new QLabel(i18n("No dial tone response:"), dummyWidget);
+ ADJUSTEDIT(nodialtoneresp);
+ l1->addWidget(label8, row, 1);
+ l1->addWidget(nodialtoneresp, row++, 2);
+
+ hangupstr = new QLineEdit(dummyWidget);
+ label9 = new QLabel(i18n("&Hangup string:"), dummyWidget);
+ label9->setBuddy(hangupstr);
+ ADJUSTEDIT(hangupstr);
+ l1->addWidget(label9, row, 1);
+ l1->addWidget(hangupstr, row++, 2);
+
+ hangupresp = new QLineEdit(dummyWidget);
+ label10 = new QLabel(i18n("Hangup response:"), dummyWidget);
+ ADJUSTEDIT(hangupresp);
+ l1->addWidget(label10, row, 1);
+ l1->addWidget(hangupresp, row++, 2);
+
+ answerstr = new QLineEdit(dummyWidget);
+ label11 = new QLabel(i18n("Answ&er string:"), dummyWidget);
+ label11->setBuddy(answerstr);
+ ADJUSTEDIT(answerstr);
+ l1->addWidget(label11, row, 1);
+ l1->addWidget(answerstr, row++, 2);
+
+ ringresp = new QLineEdit(dummyWidget);
+ label12 = new QLabel(i18n("Ring response:"), dummyWidget);
+ ADJUSTEDIT(ringresp);
+ l1->addWidget(label12, row, 1);
+ l1->addWidget(ringresp, row++, 2);
+
+ answerresp = new QLineEdit(dummyWidget);
+ label13 = new QLabel(i18n("Ans&wer response:"), dummyWidget);
+ label13->setBuddy(answerresp);
+ ADJUSTEDIT(answerresp);
+ l1->addWidget(label13, row, 1);
+ l1->addWidget(answerresp, row++, 2);
+
+ dlpresp = new QLineEdit(dummyWidget);
+ label17 = new QLabel(i18n("DLP response:"), dummyWidget);
+ ADJUSTEDIT(dlpresp);
+ l1->addWidget(label17, row, 1);
+ l1->addWidget(dlpresp, row++, 2);
+
+ escapestr = new QLineEdit(dummyWidget);
+ label14 = new QLabel(i18n("Escape strin&g:"), dummyWidget);
+ label14->setBuddy(escapestr);
+ ADJUSTEDIT(escapestr);
+ l1->addWidget(label14, row, 1);
+ l1->addWidget(escapestr, row++, 2);
+
+ escaperesp = new QLineEdit(dummyWidget);
+ label15 = new QLabel(i18n("Escape response:"), dummyWidget);
+ ADJUSTEDIT(escaperesp);
+ l1->addWidget(label15, row, 1);
+ l1->addWidget(escaperesp, row++, 2);
+
+ QHBoxLayout *l5 = new QHBoxLayout;
+ l1->addLayout(l5, row, 2);
+ lslider = new QLabel("MMMM", dummyWidget);
+ FORMATSLIDERLABEL(lslider);
+
+ slider = new QSlider(0, 255, 1, 0,
+ QSlider::Horizontal, dummyWidget);
+ slider->setFixedHeight(slider->sizeHint().height());
+ connect(slider, SIGNAL(valueChanged(int)),
+ lslider, SLOT(setNum(int)));
+ l5->addWidget(lslider, 0);
+ l5->addWidget(slider, 1);
+
+ label16 = new QLabel(i18n("Guard time (sec/50):"), dummyWidget);
+ l1->addWidget(label16, row++, 1);
+
+ QLabel *l = new QLabel(i18n("Volume off/low/high:"), dummyWidget);
+ l1->addWidget(l, row, 1);
+ QHBoxLayout *l6 = new QHBoxLayout;
+ l1->addLayout(l6, row++, 2);
+ volume_off = new QLineEdit(dummyWidget);
+ volume_off->setFixedHeight(volume_off->sizeHint().height());
+ volume_off->setMinimumWidth((int)(volume_off->sizeHint().width() / 2));
+ volume_medium = new QLineEdit(dummyWidget);
+ volume_medium->setFixedHeight(volume_medium->sizeHint().height());
+ volume_medium->setMinimumWidth((int)(volume_medium->sizeHint().width() / 2));
+ volume_high = new QLineEdit(dummyWidget);
+ volume_high->setFixedHeight(volume_high->sizeHint().height());
+ volume_high->setMinimumWidth((int)(volume_high->sizeHint().width() / 2));
+ l6->addWidget(volume_off);
+ l6->addWidget(volume_medium);
+ l6->addWidget(volume_high);
+
+ initstr[0]->setFocus();
+
+ l1->addColSpacing(0, 10);
+ l1->addColSpacing(3, 10);
+ l1->addRowSpacing(0, 5);
+ l1->addRowSpacing(GRIDROWS, 5);
+
+ //set stuff from gpppdata
+ preinitslider->setValue(gpppdata.modemPreInitDelay());
+ lpreinitslider->setNum(gpppdata.modemPreInitDelay());
+ for(int i = 0; i < PPPData::NumInitStrings; i++)
+ initstr[i]->setText(gpppdata.modemInitStr(i));
+ initslider->setValue(gpppdata.modemInitDelay());
+ linitslider->setNum(gpppdata.modemInitDelay());
+ initresp->setText(gpppdata.modemInitResp());
+
+ durationslider->setValue(gpppdata.modemToneDuration());
+ ldurationslider->setNum(gpppdata.modemToneDuration());
+
+ nodetectdialtone->setText(gpppdata.modemNoDialToneDetectionStr());
+ dialstr->setText(gpppdata.modemDialStr());
+ dlpresp->setText(gpppdata.modemDLPResp());
+
+ connectresp->setText(gpppdata.modemConnectResp());
+ busyresp->setText(gpppdata.modemBusyResp());
+ nocarrierresp->setText(gpppdata.modemNoCarrierResp());
+ nodialtoneresp->setText(gpppdata.modemNoDialtoneResp());
+
+ escapestr->setText(gpppdata.modemEscapeStr());
+ escaperesp->setText(gpppdata.modemEscapeResp());
+
+ hangupstr->setText(gpppdata.modemHangupStr());
+ hangupresp->setText(gpppdata.modemHangupResp());
+
+ answerstr->setText(gpppdata.modemAnswerStr());
+ ringresp->setText(gpppdata.modemRingResp());
+ answerresp->setText(gpppdata.modemAnswerResp());
+
+ slider->setValue(gpppdata.modemEscapeGuardTime());
+ lslider->setNum(gpppdata.modemEscapeGuardTime());
+
+ volume_off->setText(gpppdata.volumeOff());
+ volume_medium->setText(gpppdata.volumeMedium());
+ volume_high->setText(gpppdata.volumeHigh());
+
+ // Save the data, so if it not exist we save the default
+ gpppdata.save();
+}
+
+
+void ModemCommands::slotOk() {
+ gpppdata.setModemPreInitDelay(lpreinitslider->text().toInt());
+ for(int i = 0; i < PPPData::NumInitStrings; i++)
+ gpppdata.setModemInitStr(i, initstr[i]->text());
+ gpppdata.setModemInitResp(initresp->text());
+ gpppdata.setModemInitDelay(linitslider->text().toInt());
+
+ gpppdata.setModemToneDuration(ldurationslider->text().toInt());
+ gpppdata.setModemNoDialToneDetectionStr(nodetectdialtone->text());
+ gpppdata.setModemDialStr(dialstr->text());
+ gpppdata.setModemDLPResp(dlpresp->text());
+
+ gpppdata.setModemConnectResp(connectresp->text());
+ gpppdata.setModemBusyResp(busyresp->text());
+ gpppdata.setModemNoCarrierResp(nocarrierresp->text());
+ gpppdata.setModemNoDialtoneResp(nodialtoneresp->text());
+
+ gpppdata.setModemEscapeStr(escapestr->text());
+ gpppdata.setModemEscapeResp(escaperesp->text());
+ gpppdata.setModemEscapeGuardTime(lslider->text().toInt());
+ gpppdata.setModemHangupStr(hangupstr->text());
+ gpppdata.setModemHangupResp(hangupresp->text());
+
+ gpppdata.setModemAnswerStr(answerstr->text());
+ gpppdata.setModemRingResp(ringresp->text());
+ gpppdata.setModemAnswerResp(answerresp->text());
+
+ gpppdata.setVolumeHigh(volume_high->text());
+ gpppdata.setVolumeMedium(volume_medium->text());
+ gpppdata.setVolumeOff(volume_off->text());
+
+ gpppdata.save();
+ accept();
+}
+
+
+void ModemCommands::slotCancel() {
+ //set stuff from gpppdata
+ preinitslider->setValue(gpppdata.modemPreInitDelay());
+ lpreinitslider->setNum(gpppdata.modemPreInitDelay());
+ for(int i = 0; i < PPPData::NumInitStrings; i++)
+ initstr[i]->setText(gpppdata.modemInitStr(i));
+ initslider->setValue(gpppdata.modemInitDelay());
+ linitslider->setNum(gpppdata.modemInitDelay());
+ initresp->setText(gpppdata.modemInitResp());
+
+ durationslider->setValue(gpppdata.modemToneDuration());
+ ldurationslider->setNum(gpppdata.modemToneDuration());
+
+ nodetectdialtone->setText(gpppdata.modemNoDialToneDetectionStr());
+ dialstr->setText(gpppdata.modemDialStr());
+ dlpresp->setText(gpppdata.modemDLPResp());
+
+ connectresp->setText(gpppdata.modemConnectResp());
+ busyresp->setText(gpppdata.modemBusyResp());
+ nocarrierresp->setText(gpppdata.modemNoCarrierResp());
+ nodialtoneresp->setText(gpppdata.modemNoDialtoneResp());
+
+ escapestr->setText(gpppdata.modemEscapeStr());
+ escaperesp->setText(gpppdata.modemEscapeResp());
+
+ hangupstr->setText(gpppdata.modemHangupStr());
+ hangupresp->setText(gpppdata.modemHangupResp());
+
+ answerstr->setText(gpppdata.modemAnswerStr());
+ ringresp->setText(gpppdata.modemRingResp());
+ answerresp->setText(gpppdata.modemAnswerResp());
+
+ slider->setValue(gpppdata.modemEscapeGuardTime());
+ lslider->setNum(gpppdata.modemEscapeGuardTime());
+
+ volume_off->setText(gpppdata.volumeOff());
+ volume_medium->setText(gpppdata.volumeMedium());
+ volume_high->setText(gpppdata.volumeHigh());
+ reject();
+}
+
+#include "modemcmds.moc"
diff --git a/kppp/modemcmds.h b/kppp/modemcmds.h
new file mode 100644
index 00000000..5dd48b67
--- /dev/null
+++ b/kppp/modemcmds.h
@@ -0,0 +1,131 @@
+
+/*
+ *
+ * kPPP: A front end for pppd for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef _MODEMCMDS_H_
+#define _MODEMCMDS_H_
+
+#include <qgroupbox.h>
+#include <kdialogbase.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <pppdata.h>
+
+class QLineEdit;
+class QLabel;
+class QPushButton;
+class QGroupBox;
+
+class ModemCommands : public KDialogBase {
+
+Q_OBJECT
+
+public:
+
+ ModemCommands(QWidget *parent=0, const char *name=0);
+ ~ModemCommands() {}
+
+private slots:
+ void slotCancel();
+ void slotOk();
+
+private:
+
+ QGroupBox *box;
+
+ QLineEdit *initstr[int(PPPData::NumInitStrings)];
+
+ QLineEdit *initresp;
+ QLabel *label2;
+
+ QSlider *preinitslider;
+ QLabel *lpreinitslider;
+ QLabel *lpreinit;
+
+ QSlider *initslider;
+ QLabel *linitslider;
+ QLabel *label3;
+
+ QSlider *durationslider;
+ QLabel *ldurationslider;
+ QLabel *lduration;
+
+ QLineEdit *nodetectdialtone;
+ QLabel *lnodetectdialtone;
+
+ QLineEdit *dialstr;
+ QLabel *label4;
+
+ QLineEdit *connectresp;
+ QLabel *label5;
+
+ QLineEdit *busyresp;
+ QLabel *label6;
+
+ QLineEdit *nocarrierresp;
+ QLabel *label7;
+
+ QLineEdit *nodialtoneresp;
+ QLabel *label8;
+
+ QLineEdit *hangupstr;
+ QLabel *label9;
+
+ QLineEdit *hangupresp;
+ QLabel *label10;
+
+ QLineEdit *answerstr;
+ QLabel *label11;
+
+ QLineEdit *ringresp;
+ QLabel *label12;
+
+ QLineEdit *answerresp;
+ QLabel *label13;
+
+ QLineEdit *escapestr;
+ QLabel *label14;
+
+ QLineEdit *escaperesp;
+ QLineEdit *dlpresp;
+ QLabel *label17;
+
+ QLabel *label15;
+
+ QSlider *slider;
+ QLabel *lslider;
+ QLabel *label16;
+
+ QLineEdit *volume_off, *volume_medium, *volume_high;
+};
+#endif
+
+
+
diff --git a/kppp/modemdb.cpp b/kppp/modemdb.cpp
new file mode 100644
index 00000000..2afcf26e
--- /dev/null
+++ b/kppp/modemdb.cpp
@@ -0,0 +1,244 @@
+//---------------------------------------------------------------------------
+//
+// kPPP: A pppd front end for the KDE project
+//
+//---------------------------------------------------------------------------
+//
+// (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+// (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+// (c) 1998-1999 Harri Porten <porten@kde.org>
+//
+// derived from Jay Painters "ezppp"
+//
+//---------------------------------------------------------------------------
+//
+// $Id$
+//
+//---------------------------------------------------------------------------
+//
+// This program is free software; you can redistribute it and-or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//---------------------------------------------------------------------------
+
+#include <qlabel.h>
+#include <kbuttonbox.h>
+#include <qlayout.h>
+#include "modemdb.h"
+#include <klocale.h>
+#include <qpushbutton.h>
+#include <qlistbox.h>
+#include <kconfig.h>
+#include <kstdguiitem.h>
+
+ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) {
+ // set up widgets and such
+ setCaption(i18n("Select Modem Type"));
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ QLabel *l1 = new QLabel(i18n("To set up your modem, first choose its vendor in the "
+ "list to the left, and then select the model from the "
+ "right list. If you don't know which modem you have, "
+ "you can try out one of the \"Generic\" modems."),
+ this);
+ l1->setAlignment(AlignLeft | WordBreak);
+ l1->setFixedWidth(400);
+ l1->setMinimumHeight(50);
+ tl->addWidget(l1, 0);
+
+ tl->addSpacing(10);
+
+ QHBoxLayout *tl1 = new QHBoxLayout(10);
+ tl->addLayout(tl1, 1);
+ vendor = new QListBox(this);
+ model = new QListBox(this);
+ vendor->setMinimumSize(200, 130);
+ model->setMinimumSize(200, 130);
+ tl1->addWidget(vendor, 2);
+ tl1->addWidget(model, 3);
+
+ KButtonBox *bbox = new KButtonBox(this);
+ bbox->addStretch(1);
+ ok = bbox->addButton(KStdGuiItem::ok());
+ ok->setDefault(true);
+ ok->setEnabled(false);
+ cancel = bbox->addButton(KStdGuiItem::cancel());
+ bbox->layout();
+ tl->addWidget(bbox);
+ setFixedSize(sizeHint());
+
+ // set up modem database
+ db = new ModemDatabase();
+
+ // set up signal/slots
+ connect(ok, SIGNAL(clicked()),
+ this, SLOT(reject()));
+ connect(cancel, SIGNAL(clicked()),
+ this, SLOT(reject()));
+ connect(vendor, SIGNAL(highlighted(int)),
+ this, SLOT(vendorSelected(int)));
+ connect(model, SIGNAL(highlighted(int)),
+ this, SLOT(modelSelected(int)));
+ connect(model, SIGNAL(selected(int)),
+ this, SLOT(selected(int)));
+
+ // fill vendor list with life
+ vendor->insertStringList(*db->vendors());
+
+ vendor->setCurrentItem(0);
+}
+
+
+ModemSelector::~ModemSelector() {
+ delete db;
+}
+
+
+void ModemSelector::vendorSelected(int idx) {
+ ok->setEnabled(false);
+
+ QString name = vendor->text(idx);
+ QStringList *models = db->models(name);
+ model->clear();
+ model->insertStringList(*models);
+
+ // FIXME: work around Qt bug
+ if(models->count() == 0)
+ model->update();
+ delete models;
+}
+
+
+void ModemSelector::modelSelected(int) {
+ ok->setEnabled(true);
+}
+
+void ModemSelector::selected(int) {
+ accept();
+}
+
+
+ModemDatabase::ModemDatabase() {
+ load();
+}
+
+
+ModemDatabase::~ModemDatabase() {
+ delete lvendors;
+ delete modemDB;
+}
+
+
+const QStringList *ModemDatabase::vendors() {
+ return lvendors;
+}
+
+
+QStringList *ModemDatabase::models(QString vendor) {
+ QStringList *sl = new QStringList;
+ QString s = i18n("<Generic>");
+ if(vendor == s)
+ vendor = i18n("<Generic>");
+
+ for(uint i = 0; i < modems.count(); i++) {
+ CharDict *dict = modems.at(i);
+ if(dict->find("Vendor") != 0) {
+ if(vendor == *(*dict)["Vendor"] && (*(*dict)["Name"]).at(0) != '!')
+ sl->append(*(*dict)["Name"]);
+ }
+ }
+ sl->sort();
+
+ return sl;
+}
+
+
+void ModemDatabase::loadModem(const QString &key, CharDict &dict) {
+ // KEntryIterator *it = modemDB->entryIterator(key);
+ // KEntryDictEntry *e;
+ QMap <QString, QString> map;
+ QMap <QString, QString>::Iterator it;
+ // KEntryMapConstIterator e;
+ KEntry e;
+ map = modemDB->entryMap(key);
+ it = map.begin();
+
+ // remove parent attribute
+ dict.setAutoDelete(true);
+ dict.remove("Parent");
+
+ // e = it->current();
+ while(!it.key().isNull()) {
+ if(dict.find(it.key()) == 0) {
+ dict.insert(it.key(), new QString(it.data()));
+ }
+ it++;
+ }
+
+ // check name attribute
+ if(dict["Name"] == 0 || key[0]=='!') {
+ dict.replace("Name", new QString(key));
+ }
+
+ // check parent attribute
+ if(dict["Parent"] != 0)
+ loadModem(*dict["Parent"], dict);
+ else
+ // inherit common at last
+ if (key != "Common")
+ loadModem("Common", dict);
+
+}
+
+
+void ModemDatabase::load() {
+ modemDB = new KConfig("DB/modemDB.rc", 0);
+ lvendors = new QStringList;
+ modems.setAutoDelete(true);
+
+ QStringList list = modemDB->groupList();
+ QStringList::Iterator it = list.begin();
+ while(it != list.end()) {
+ modemDB->setGroup(*it);
+ CharDict *c = new CharDict;
+ c->setAutoDelete(true);
+ loadModem(*it, *c);
+
+ // if(strcmp(it->latin1(), "Common") == 0) {
+ if(*it == "Common") {
+ QString s = i18n("Hayes(tm) compatible modem");
+ c->replace("Name", new QString (s));
+
+ s = i18n("<Generic>");
+ c->replace("Vendor", new QString(s));
+ }
+ modems.append(c);
+
+ if(modemDB->hasKey("Vendor")) {
+ QString vendor = modemDB->readEntry("Vendor");
+ if(lvendors->findIndex(vendor) == -1)
+ lvendors->append(vendor);
+ }
+ ++it;
+ }
+
+ lvendors->sort();
+
+ lvendors->insert(0, i18n("<Generic>"));
+}
+
+
+void ModemDatabase::save(KConfig *) {
+}
+
+#include "modemdb.moc"
diff --git a/kppp/modemdb.h b/kppp/modemdb.h
new file mode 100644
index 00000000..ca743281
--- /dev/null
+++ b/kppp/modemdb.h
@@ -0,0 +1,85 @@
+//---------------------------------------------------------------------------
+//
+// kPPP: A pppd front end for the KDE project
+//
+//---------------------------------------------------------------------------
+//
+// (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+// (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+// (c) 1998-1999 Harri Porten <porten@kde.org>
+//
+// derived from Jay Painters "ezppp"
+//
+//---------------------------------------------------------------------------
+//
+// $Id$
+//
+//---------------------------------------------------------------------------
+//
+// This program is free software; you can redistribute it and-or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//---------------------------------------------------------------------------
+
+#ifndef __MODEMDB__H__
+#define __MODEMDB__H__
+
+#include <qdialog.h>
+#include <qstringlist.h>
+#include <qdict.h>
+#include <qptrlist.h>
+class KConfig;
+class QListBox;
+
+typedef QDict<QString> CharDict;
+
+class ModemDatabase {
+public:
+ ModemDatabase();
+ ~ModemDatabase();
+
+ const QStringList *vendors();
+ QStringList *models(QString vendor);
+
+ void save(KConfig *);
+
+private:
+ void load();
+ void loadModem(const QString & key, CharDict &dict);
+ QPtrList<CharDict> modems;
+
+ QStringList *lvendors;
+
+ KConfig *modemDB;
+};
+
+
+class ModemSelector : public QDialog {
+ Q_OBJECT
+public:
+ ModemSelector(QWidget *parent = 0);
+ ~ModemSelector();
+
+private slots:
+ void vendorSelected(int idx);
+ void modelSelected(int idx);
+ void selected(int idx);
+
+private:
+ QPushButton *ok, *cancel;
+ QListBox *vendor, *model;
+ ModemDatabase *db;
+};
+
+#endif
diff --git a/kppp/modeminfo.cpp b/kppp/modeminfo.cpp
new file mode 100644
index 00000000..a2338aac
--- /dev/null
+++ b/kppp/modeminfo.cpp
@@ -0,0 +1,292 @@
+/*
+ * kPPP: A front end for pppd for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file contributed by: Markus Wuebben, mwuebben@fiwi02.wiwi.uni-tuebingen.de
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+#include <qregexp.h>
+#include <qlayout.h>
+#include <kwin.h>
+#include <kmessagebox.h>
+#include <kapplication.h>
+#include <kpushbutton.h>
+#include "modeminfo.h"
+#include "modem.h"
+#include <klocale.h>
+
+ModemTransfer::ModemTransfer(QWidget *parent, const char *name)
+ : QDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder)
+{
+ setCaption(i18n("ATI Query"));
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+
+ progressBar = new KProgress(this, "bar");
+ progressBar->setTotalSteps(8);
+
+ statusBar = new QLabel(this,"sBar");
+ statusBar->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ statusBar->setAlignment(AlignCenter);
+
+ // This is a rather complicated case. Since we do not know which
+ // message is the widest in the national language, we'd to
+ // search all these messages. This is a little overkill, so I take
+ // the longest english message, translate it and give it additional
+ // 20 percent space. Hope this is enough.
+ statusBar->setText(i18n("Unable to create modem lock file."));
+ statusBar->setFixedWidth((statusBar->sizeHint().width() * 12) / 10);
+ statusBar->setFixedHeight(statusBar->sizeHint().height() + 4);
+
+ // set original text
+ statusBar->setText(i18n("Looking for modem..."));
+ progressBar->setFixedHeight(statusBar->minimumSize().height());
+ tl->addWidget(progressBar);
+ tl->addWidget(statusBar);
+
+ cancel = new KPushButton(KStdGuiItem::cancel(), this);
+ cancel->setFocus();
+ connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton()));
+
+ QHBoxLayout *l1 = new QHBoxLayout;
+ tl->addLayout(l1);
+ l1->addStretch(1);
+ l1->addWidget(cancel);
+
+ setFixedSize(sizeHint());
+
+ step = 0;
+
+ ////////////////////////////////////////////////
+
+ timeout_timer = new QTimer(this);
+ connect(timeout_timer, SIGNAL(timeout()), SLOT(time_out_slot()));
+
+ scripttimer = new QTimer(this);
+ connect(scripttimer, SIGNAL(timeout()), SLOT(do_script()));
+
+ timeout_timer->start(15000,TRUE); // 15 secs single shot
+ QTimer::singleShot(500, this, SLOT(init()));
+
+}
+
+
+void ModemTransfer::ati_done() {
+ scripttimer->stop();
+ timeout_timer->stop();
+ Modem::modem->closetty();
+ Modem::modem->unlockdevice();
+ hide();
+
+ // open the result window
+ ModemInfo *mi = new ModemInfo(this);
+ for(int i = 0; i < NUM_OF_ATI; i++)
+ mi->setAtiString(i, ati_query_strings[i]);
+ mi->exec();
+ delete mi;
+
+ accept();
+}
+
+
+void ModemTransfer::time_out_slot() {
+ timeout_timer->stop();
+ scripttimer->stop();
+
+ KMessageBox::error(this, i18n("Modem query timed out."));
+ reject();
+}
+
+
+void ModemTransfer::init() {
+
+ kapp->processEvents();
+
+ int lock = Modem::modem->lockdevice();
+ if (lock == 1) {
+
+ statusBar->setText(i18n("Modem device is locked."));
+ return;
+ }
+
+ if (lock == -1) {
+
+ statusBar->setText(i18n("Unable to create modem lock file."));
+ return;
+ }
+
+
+ if(Modem::modem->opentty()) {
+ if(Modem::modem->hangup()) {
+ usleep(100000); // wait 0.1 secs
+ Modem::modem->writeLine("ATE0Q1V1"); // E0 don't echo the commands I send ...
+
+ statusBar->setText(i18n("Modem Ready"));
+ kapp->processEvents();
+ usleep(100000); // wait 0.1 secs
+ kapp->processEvents();
+ scripttimer->start(1000); // this one does the ati query
+
+ // clear modem buffer
+ Modem::modem->flush();
+
+ Modem::modem->notify(this, SLOT(readChar(unsigned char)));
+ return;
+ }
+ }
+
+ // opentty() or hangup() failed
+ statusBar->setText(Modem::modem->modemMessage());
+ step = 99; // wait until cancel is pressed
+ Modem::modem->unlockdevice();
+}
+
+
+void ModemTransfer::do_script() {
+ QString msg;
+ QString query;
+
+ switch(step) {
+ case 0:
+ readtty();
+ statusBar->setText("ATI...");
+ progressBar->advance(1);
+ Modem::modem->writeLine("ATI\n");
+ break;
+
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ readtty();
+ msg.sprintf("ATI %d ...", step);
+ query.sprintf("ATI%d\n", step);
+ statusBar->setText(msg);
+ progressBar->advance(1);
+ Modem::modem->writeLine(query.local8Bit());
+ break;
+
+ default:
+ readtty();
+ ati_done();
+ }
+ step++;
+}
+
+void ModemTransfer::readChar(unsigned char c) {
+ if(readbuffer.length() < 255)
+ readbuffer += c;
+}
+
+void ModemTransfer::readtty() {
+
+ if (step == 0)
+ return;
+
+ readbuffer.replace(QRegExp("[\n\r]")," "); // remove stray \n and \r
+ readbuffer = readbuffer.stripWhiteSpace(); // strip of leading or trailing white
+ // space
+
+ if(step <= NUM_OF_ATI)
+ ati_query_strings[step-1] = readbuffer.copy();
+
+ readbuffer = "";
+}
+
+
+void ModemTransfer::cancelbutton() {
+ scripttimer->stop();
+ Modem::modem->stop();
+ timeout_timer->stop();
+
+ statusBar->setText(i18n("One moment please..."));
+ kapp->processEvents();
+
+ Modem::modem->hangup();
+
+ Modem::modem->closetty();
+ Modem::modem->unlockdevice();
+ reject();
+}
+
+
+void ModemTransfer::closeEvent( QCloseEvent *e ) {
+ cancelbutton();
+ e->accept();
+}
+
+
+ModemInfo::ModemInfo(QWidget *parent, const char* name)
+ : QDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder)
+{
+ QString label_text;
+
+ setCaption(i18n("Modem Query Results"));
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+
+ QGridLayout *l1 = new QGridLayout(NUM_OF_ATI, 2, 5);
+ tl->addLayout(l1, 1);
+ for(int i = 0 ; i < NUM_OF_ATI ; i++) {
+
+ label_text = "";
+ if ( i == 0)
+ label_text.sprintf("ATI :");
+ else
+ label_text.sprintf("ATI %d:", i );
+
+ ati_label[i] = new QLabel(label_text, this);
+ l1->addWidget(ati_label[i], i, 0);
+
+ ati_label_result[i] = new QLineEdit(this);
+ ati_label_result[i]->setMinimumWidth(fontMetrics().width('H') * 24);
+ l1->addWidget(ati_label_result[i], i, 1);
+ }
+ //tl->addSpacing(1);
+
+ QHBoxLayout *l2 = new QHBoxLayout;
+ QPushButton *ok = new KPushButton(KStdGuiItem::close(), this);
+ ok->setDefault(TRUE);
+ ok->setFocus();
+
+ tl->addLayout(l2);
+ l2->addStretch(1);
+
+ connect(ok, SIGNAL(clicked()), SLOT(accept()));
+ l2->addWidget(ok);
+
+ setMinimumSize(sizeHint());
+}
+
+
+void ModemInfo::setAtiString(int i, QString s) {
+ if(i < NUM_OF_ATI)
+ ati_label_result[i]->setText(s);
+}
+
+#include "modeminfo.moc"
diff --git a/kppp/modeminfo.h b/kppp/modeminfo.h
new file mode 100644
index 00000000..ccd3b6ea
--- /dev/null
+++ b/kppp/modeminfo.h
@@ -0,0 +1,88 @@
+/*
+ *
+ * kPPP: A front end for pppd for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef _MODEMINFO_H_
+#define _MODEMINFO_H_
+
+#include <qdialog.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <qevent.h>
+#include <qtimer.h>
+#include <kprogress.h>
+
+const int NUM_OF_ATI = 8;
+
+
+class ModemTransfer : public QDialog {
+ Q_OBJECT
+public:
+ ModemTransfer(QWidget *parent=0, const char *name=0);
+
+public slots:
+ void init();
+ void readtty();
+ void do_script();
+ void time_out_slot();
+ void cancelbutton();
+ void readChar(unsigned char);
+
+private:
+ void ati_done();
+
+protected:
+ void closeEvent(QCloseEvent *e);
+
+private:
+ int step;
+ QString readbuffer;
+
+ QPushButton *cancel;
+ KProgress *progressBar;
+ QLabel *statusBar;
+
+ QTimer *timeout_timer;
+ QTimer *scripttimer;
+ QString ati_query_strings[NUM_OF_ATI];
+};
+
+
+class ModemInfo : public QDialog {
+ Q_OBJECT
+public:
+ ModemInfo(QWidget *parent=0, const char *name=0);
+
+public:
+ void setAtiString(int num, QString s);
+
+private:
+ QLabel *ati_label[NUM_OF_ATI];
+ QLineEdit *ati_label_result[NUM_OF_ATI];
+};
+
+#endif
diff --git a/kppp/modems.cpp b/kppp/modems.cpp
new file mode 100644
index 00000000..570ca994
--- /dev/null
+++ b/kppp/modems.cpp
@@ -0,0 +1,277 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ *
+ *
+ *
+ * Copyright (C) 2004 Simone Gotti
+ * <simone.gotti@email.it>
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <qdir.h>
+#include <stdlib.h>
+#include <qlayout.h>
+#include <qtabdialog.h>
+#include <qwhatsthis.h>
+#include <qmessagebox.h>
+
+#include <kapplication.h>
+#include <kbuttonbox.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <kwin.h>
+#include <kdialogbase.h>
+#include <qvgroupbox.h>
+
+#include "general.h"
+#include "pppdata.h"
+#include "modems.h"
+#include "accounting.h"
+#include "providerdb.h"
+#include "edit.h"
+
+void parseargs(char* buf, char** args);
+
+ModemsWidget::ModemsWidget( QWidget *parent, const char *name )
+ : QWidget( parent, name )
+{
+ int min = 0;
+ QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10);
+
+ // add a hbox
+ QHBoxLayout *l11 = new QHBoxLayout;
+ l1->addLayout(l11);
+
+ modemlist_l = new QListBox(parent);
+ modemlist_l->setMinimumSize(160, 128);
+ connect(modemlist_l, SIGNAL(highlighted(int)),
+ this, SLOT(slotListBoxSelect(int)));
+ connect(modemlist_l, SIGNAL(selected(int)),
+ this, SLOT(editmodem()));
+ l11->addWidget(modemlist_l, 10);
+
+ QVBoxLayout *l111 = new QVBoxLayout;
+ l11->addLayout(l111, 1);
+ edit_b = new QPushButton(i18n("&Edit..."), parent);
+ connect(edit_b, SIGNAL(clicked()), SLOT(editmodem()));
+ QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account"));
+
+ min = edit_b->sizeHint().width();
+ min = QMAX(70,min);
+ edit_b->setMinimumWidth(min);
+
+ l111->addWidget(edit_b);
+
+ new_b = new QPushButton(i18n("&New..."), parent);
+ connect(new_b, SIGNAL(clicked()), SLOT(newmodem()));
+ l111->addWidget(new_b);
+ QWhatsThis::add(new_b, i18n("Create a new dialup connection\n"
+ "to the Internet"));
+
+ copy_b = new QPushButton(i18n("Co&py"), parent);
+ connect(copy_b, SIGNAL(clicked()), SLOT(copymodem()));
+ l111->addWidget(copy_b);
+ QWhatsThis::add(copy_b,
+ i18n("Makes a copy of the selected account. All\n"
+ "settings of the selected account are copied\n"
+ "to a new account that you can modify to fit your\n"
+ "needs"));
+
+ delete_b = new QPushButton(i18n("De&lete"), parent);
+ connect(delete_b, SIGNAL(clicked()), SLOT(deletemodem()));
+ l111->addWidget(delete_b);
+ QWhatsThis::add(delete_b,
+ i18n("<p>Deletes the selected account\n\n"
+ "<font color=\"red\"><b>Use with care!</b></font>"));
+
+ //load up account list from gppdata to the list box
+ // but keep the current one selected in gpppdata
+ if(gpppdata.modemCount() > 0) {
+ const QString currentmodem = gpppdata.modname();
+ for(int i=0; i <= gpppdata.modemCount()-1; i++) {
+ gpppdata.setModemByIndex(i);
+ modemlist_l->insertItem(gpppdata.modname());
+ }
+ gpppdata.setModem(currentmodem);
+ }
+
+ slotListBoxSelect(modemlist_l->currentItem());
+
+ l1->activate();
+}
+
+
+
+void ModemsWidget::slotListBoxSelect(int idx) {
+ delete_b->setEnabled((bool)(idx != -1));
+ edit_b->setEnabled((bool)(idx != -1));
+ copy_b->setEnabled((bool)(idx != -1));
+ if(idx!=-1) {
+ QString modem = gpppdata.modname();
+ gpppdata.setModemByIndex(modemlist_l->currentItem());
+ gpppdata.setModem(modem);
+ }
+}
+
+void ModemsWidget::editmodem() {
+ gpppdata.setModem(modemlist_l->text(modemlist_l->currentItem()));
+
+ int result = doTab();
+
+ if(result == QDialog::Accepted) {
+ modemlist_l->changeItem(gpppdata.modname(),modemlist_l->currentItem());
+ emit resetmodems();
+ gpppdata.save();
+ }
+}
+
+
+void ModemsWidget::newmodem() {
+ if(modemlist_l->count() == MAX_MODEMS) {
+ KMessageBox::sorry(this, i18n("Maximum number of modems reached."));
+ return;
+ }
+
+ int result;
+
+ if (gpppdata.newmodem() == -1)
+ return;
+ result = doTab();
+
+
+ if(result == QDialog::Accepted) {
+ modemlist_l->insertItem(gpppdata.modname());
+ modemlist_l->setSelected(modemlist_l->findItem(gpppdata.modname()),
+ true);
+ emit resetmodems();
+ gpppdata.save();
+ } else
+ gpppdata.deleteModem();
+}
+
+
+void ModemsWidget::copymodem() {
+ if(modemlist_l->count() == MAX_MODEMS) {
+ KMessageBox::sorry(this, i18n("Maximum number of modems reached."));
+ return;
+ }
+
+ if(modemlist_l->currentItem()<0) {
+ KMessageBox::sorry(this, i18n("No modem selected."));
+ return;
+ }
+
+ gpppdata.copymodem(modemlist_l->currentItem());
+
+ modemlist_l->insertItem(gpppdata.modname());
+ emit resetmodems();
+ gpppdata.save();
+}
+
+
+void ModemsWidget::deletemodem() {
+
+ QString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?")
+ .arg(modemlist_l->text(modemlist_l->currentItem()));
+
+ if(KMessageBox::warningContinueCancel(this, s, i18n("Confirm"), KStdGuiItem::del()) != KMessageBox::Continue)
+ return;
+
+ if(gpppdata.deleteModem(modemlist_l->text(modemlist_l->currentItem())))
+ modemlist_l->removeItem(modemlist_l->currentItem());
+
+ emit resetmodems();
+ gpppdata.save();
+
+ slotListBoxSelect(modemlist_l->currentItem());
+
+}
+
+
+int ModemsWidget::doTab(){
+ tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null,
+ KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
+ 0, 0, true);
+ KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon());
+ bool isnewmodem;
+
+ if(gpppdata.modname().isEmpty()) {
+ tabWindow->setCaption(i18n("New Modem"));
+ isnewmodem = true;
+ } else {
+ QString tit = i18n("Edit Modem: ");
+ tit += gpppdata.modname();
+ tabWindow->setCaption(tit);
+ isnewmodem = false;
+ }
+ modem1 = new ModemWidget(tabWindow->addPage( i18n("&Device"), i18n("Serial Device")), isnewmodem );
+ modem2 = new ModemWidget2(tabWindow->addPage( i18n("&Modem"), i18n("Modem Settings")));
+ connect ( modem1->connectName(), SIGNAL(textChanged ( const QString & )), this, SLOT(modemNameChanged(const QString & )));
+
+ modemNameChanged(modem1->connectName()->text());
+ int result = 0;
+ bool ok = false;
+ while (!ok){
+
+ result = tabWindow->exec();
+ ok = true;
+
+ if(result == QDialog::Accepted) {
+ if(modem1->save()) {
+ modem2->save();
+ } else {
+ KMessageBox::error(this, i18n( "You must enter a unique\n"
+ "modem name"));
+ ok = false;
+ }
+ }
+ }
+
+ delete tabWindow;
+ return result;
+}
+
+void ModemsWidget::modemNameChanged(const QString & text)
+{
+ tabWindow->enableButtonOK( !text.isEmpty() );
+}
+
+QString ModemsWidget::prettyPrintVolume(unsigned int n) {
+ int idx = 0;
+ const QString quant[] = {i18n("Byte"), i18n("KB"),
+ i18n("MB"), i18n("GB"), QString::null};
+
+ float n1 = n;
+ while(n >= 1024 && !quant[idx].isNull()) {
+ idx++;
+ n /= 1024;
+ }
+
+ int i = idx;
+ while(i--)
+ n1 = n1 / 1024.0;
+
+ QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 );
+ s += " " + quant[idx];
+ return s;
+}
+
+#include "modems.moc"
diff --git a/kppp/modems.h b/kppp/modems.h
new file mode 100644
index 00000000..67d0c6fd
--- /dev/null
+++ b/kppp/modems.h
@@ -0,0 +1,92 @@
+/* -*- C++ -*-
+ * kPPP: A pppd front end for the KDE project
+ *
+ *
+ *
+ *
+ * Copyright (C) 2004 Simone Gotti
+ * <simone.gotti@email.it>
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _MODEMS_H_
+#define _MODEMS_H_
+
+#include <qwidget.h>
+#include <qpushbutton.h>
+#include <qlistbox.h>
+#include "acctselect.h"
+
+class KDialogBase;
+class QCheckBox;
+class QLineEdit;
+class QTabDialog;
+class DialWidget;
+class ScriptWidget;
+class IPWidget;
+class DNSWidget;
+class GatewayWidget;
+
+class ModemsWidget : public QWidget {
+ Q_OBJECT
+public:
+ ModemsWidget( QWidget *parent=0, const char *name=0 );
+ ~ModemsWidget() {}
+
+private slots:
+ void editmodem();
+ void copymodem();
+ void newmodem();
+ void deletemodem();
+ void slotListBoxSelect(int);
+ void modemNameChanged(const QString &);
+
+private:
+ int doTab();
+
+signals:
+ void resetmodems();
+
+private:
+ QString prettyPrintVolume(unsigned int);
+
+ KDialogBase *tabWindow;
+ ModemWidget *modem1;
+ ModemWidget2 *modem2;
+ /* DialWidget *dial_w;
+ AccountingSelector *acct;
+ IPWidget *ip_w;
+ DNSWidget *dns_w;
+ GatewayWidget *gateway_w;
+ ScriptWidget *script_w;*/
+
+ QLabel *costlabel;
+ QLineEdit *costedit;
+ QLabel *vollabel;
+ QLineEdit *voledit;
+
+ QListBox *modemlist_l;
+ QPushButton *edit_b;
+ QPushButton *copy_b;
+ QPushButton *new_b;
+ QPushButton *delete_b;
+};
+
+#endif
+
diff --git a/kppp/newwidget.cpp b/kppp/newwidget.cpp
new file mode 100644
index 00000000..d2182fba
--- /dev/null
+++ b/kppp/newwidget.cpp
@@ -0,0 +1,17 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// functions generating layout-aware widgets
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#include "newwidget.h"
+
+QLineEdit *newLineEdit(int visiblewidth, QWidget *parent) {
+ QLineEdit *l = new QLineEdit(parent);
+ if(visiblewidth == 0)
+ l->setMinimumWidth(l->sizeHint().width());
+ else
+ l->setFixedWidth(l->fontMetrics().width('H') * visiblewidth);
+
+ return l;
+}
diff --git a/kppp/newwidget.h b/kppp/newwidget.h
new file mode 100644
index 00000000..52f2ec76
--- /dev/null
+++ b/kppp/newwidget.h
@@ -0,0 +1,19 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// functions generating layout-aware widgets
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef __NEWWIDGET__H__
+#define __NEWWIDGET__H__
+
+#include <qwidget.h>
+#include <qlineedit.h>
+
+#define L_FIXEDW 1
+#define L_FIXEDH 2
+#define L_FIXED (L_FIXEDW | L_FIXEDH)
+
+QLineEdit *newLineEdit(int visiblewidth, QWidget *parent);
+
+#endif
diff --git a/kppp/opener.cpp b/kppp/opener.cpp
new file mode 100644
index 00000000..be72f631
--- /dev/null
+++ b/kppp/opener.cpp
@@ -0,0 +1,722 @@
+
+/*
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997,98 Bernd Johannes Wuebben,
+ * Mario Weilguni
+ * Copyright (C) 1998-2002 Harri Porten <porten@kde.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* A note to developers:
+ *
+ * Apart from the first dozen lines in main() the following code represents
+ * the setuid root part of kppp. So please be careful !
+ * o restrain from using X, Qt or KDE library calls
+ * o check for possible buffer overflows
+ * o handle requests from the parent process with care. They might be forged.
+ * o be paranoid and think twice about everything you change.
+ */
+
+#include <config.h>
+
+#if defined(__osf__) || defined(__svr4__)
+#define _POSIX_PII_SOCKET
+extern "C" int sethostname(char *name, int name_len);
+#if !defined(__osf__)
+extern "C" int _Psendmsg(int, void*, int);
+extern "C" int _Precvmsg(int, void*, int);
+#endif
+#endif
+
+#include "kpppconfig.h"
+
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/un.h>
+#include <sys/wait.h>
+#include <sys/param.h>
+
+
+#include <netinet/in.h>
+
+#ifdef __FreeBSD__
+# include <sys/linker.h> // for kldload
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifndef HAVE_NET_IF_PPP_H
+# if defined(__DragonFly__)
+# include <net/ppp_layer/ppp_defs.h>
+# include <net/if.h>
+# include <net/ppp/if_ppp.h>
+# elif defined HAVE_LINUX_IF_PPP_H
+# include <linux/if_ppp.h>
+# endif
+#else
+# include <net/ppp_defs.h>
+# include <net/if.h>
+# include <net/if_ppp.h>
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <regex.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <termios.h>
+
+#include "opener.h"
+#include "devices.h"
+
+#ifdef HAVE_RESOLV_H
+# include <arpa/nameser.h>
+# include <resolv.h>
+#endif
+
+#ifndef _PATH_RESCONF
+#define _PATH_RESCONF "/etc/resolv.conf"
+#endif
+
+#ifdef _XPG4_2
+extern "C" {
+ ssize_t recvmsg(int, struct msghdr *, int);
+ ssize_t sendmsg(int, const struct msghdr *, int);
+}
+#endif
+
+#define MY_ASSERT(x) if (!(x)) { \
+ fprintf(stderr, "ASSERT: \"%s\" in %s (%d)\n",#x,__FILE__,__LINE__); \
+ exit(1); }
+
+#define MY_DEBUG
+#ifndef MY_DEBUG
+#define Debug(s) ((void)0);
+#define Debug2(s, i) ((void)0);
+#else
+#define Debug(s) fprintf(stderr, (s "\n"));
+#define Debug2(s, i) fprintf(stderr, (s), (i));
+#endif
+
+static void sighandler_child(int);
+static pid_t pppdPid = -1;
+static int pppdExitStatus = -1;
+static int checkForInterface();
+
+// processing will stop at first file that could be opened successfully
+const char * const kppp_syslog[] = { "/var/log/syslog.ppp",
+ "/var/log/syslog",
+ "/var/log/messages",
+ 0 };
+
+Opener::Opener(int s) : socket(s), ttyfd(-1) {
+ lockfile[0] = '\0';
+ signal(SIGUSR1, SIG_IGN);
+ signal(SIGTERM, SIG_IGN);
+ signal(SIGINT, SIG_IGN);
+ signal(SIGCHLD, sighandler_child);
+ mainLoop();
+}
+
+void Opener::mainLoop() {
+
+ int len;
+ int fd = -1;
+ int flags, mode;
+ const char *device, * const *logFile;
+ union AllRequests request;
+ struct ResponseHeader response;
+ struct msghdr msg;
+ struct iovec iov;
+
+ iov.iov_base = IOV_BASE_CAST &request;
+ iov.iov_len = sizeof(request);
+
+ msg.msg_name = 0L;
+ msg.msg_namelen = 0;
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+ msg.msg_control = 0L;
+ msg.msg_controllen = 0;
+
+ // loop forever
+ while(1) {
+ len = recvmsg(socket, &msg, 0);
+ if(len < 0) {
+ switch(errno) {
+ case EINTR:
+ Debug("Opener: interrupted system call, continuing");
+ break;
+ default:
+ perror("Opener: error reading from socket");
+ _exit(1);
+ }
+ } else {
+ switch(request.header.type) {
+
+ case OpenDevice:
+ Debug("Opener: received OpenDevice");
+ MY_ASSERT(len == sizeof(struct OpenModemRequest));
+ close(ttyfd);
+ device = deviceByIndex(request.modem.deviceNum);
+ response.status = 0;
+ if ((ttyfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) {
+ Debug("error opening modem device !");
+ fd = open(DEVNULL, O_RDONLY);
+ response.status = -errno;
+ sendFD(fd, &response);
+ close(fd);
+ } else
+ sendFD(ttyfd, &response);
+ break;
+
+ case OpenLock:
+ Debug("Opener: received OpenLock\n");
+ MY_ASSERT(len == sizeof(struct OpenLockRequest));
+ flags = request.lock.flags;
+ MY_ASSERT(flags == O_RDONLY || flags == O_WRONLY|O_TRUNC|O_CREAT);
+ if(flags == O_WRONLY|O_TRUNC|O_CREAT)
+ mode = 0644;
+ else
+ mode = 0;
+
+ device = deviceByIndex(request.lock.deviceNum);
+ MY_ASSERT(strlen(LOCK_DIR)+strlen(device) < MaxPathLen);
+ strlcpy(lockfile, LOCK_DIR"/LCK..", MaxPathLen);
+ strlcat(lockfile, strrchr(device, '/') + 1, MaxPathLen );
+ response.status = 0;
+ // TODO:
+ // struct stat st;
+ // if(stat(lockfile.data(), &st) == -1) {
+ // if(errno == EBADF)
+ // return -1;
+ // } else {
+ // // make sure that this is a regular file
+ // if(!S_ISREG(st.st_mode))
+ // return -1;
+ // }
+ if ((fd = open(lockfile, flags, mode)) == -1) {
+ Debug("error opening lockfile!");
+ lockfile[0] = '\0';
+ fd = open(DEVNULL, O_RDONLY);
+ response.status = -errno;
+ } else
+ fchown(fd, 0, 0);
+ sendFD(fd, &response);
+ close(fd);
+ break;
+
+ case RemoveLock:
+ Debug("Opener: received RemoveLock");
+ MY_ASSERT(len == sizeof(struct RemoveLockRequest));
+ close(ttyfd);
+ ttyfd = -1;
+ response.status = unlink(lockfile);
+ lockfile[0] = '\0';
+ sendResponse(&response);
+ break;
+
+ case OpenResolv:
+ Debug("Opener: received OpenResolv");
+ MY_ASSERT(len == sizeof(struct OpenResolvRequest));
+ flags = request.resolv.flags;
+ response.status = 0;
+ if ((fd = open(_PATH_RESCONF, flags)) == -1) {
+ Debug("error opening resolv.conf!");
+ fd = open(DEVNULL, O_RDONLY);
+ response.status = -errno;
+ }
+ sendFD(fd, &response);
+ close(fd);
+ break;
+
+ case OpenSysLog:
+ Debug("Opener: received OpenSysLog");
+ MY_ASSERT(len == sizeof(struct OpenLogRequest));
+ response.status = 0;
+ logFile = &kppp_syslog[0];
+ while (*logFile) {
+ if ((fd = open(*logFile, O_RDONLY)) >= 0)
+ break;
+ logFile++;
+ }
+ if (!*logFile) {
+ Debug("No success opening a syslog file !");
+ fd = open(DEVNULL, O_RDONLY);
+ response.status = -errno;
+ }
+ sendFD(fd, &response);
+ close(fd);
+ break;
+
+ case SetSecret:
+ Debug("Opener: received SetSecret");
+ MY_ASSERT(len == sizeof(struct SetSecretRequest));
+ response.status = !createAuthFile(request.secret.method,
+ request.secret.username,
+ request.secret.password);
+ sendResponse(&response);
+ break;
+
+ case RemoveSecret:
+ Debug("Opener: received RemoveSecret");
+ MY_ASSERT(len == sizeof(struct RemoveSecretRequest));
+ response.status = !removeAuthFile(request.remove.method);
+ sendResponse(&response);
+ break;
+
+ case SetHostname:
+ Debug("Opener: received SetHostname");
+ MY_ASSERT(len == sizeof(struct SetHostnameRequest));
+ response.status = 0;
+ if(sethostname(request.host.name, strlen(request.host.name)))
+ response.status = -errno;
+ sendResponse(&response);
+ break;
+
+ case ExecPPPDaemon:
+ Debug("Opener: received ExecPPPDaemon");
+ MY_ASSERT(len == sizeof(struct ExecDaemonRequest));
+ response.status = execpppd(request.daemon.arguments);
+ sendResponse(&response);
+ break;
+
+ case KillPPPDaemon:
+ Debug("Opener: received KillPPPDaemon");
+ MY_ASSERT(len == sizeof(struct KillDaemonRequest));
+ response.status = killpppd();
+ sendResponse(&response);
+ break;
+
+ case PPPDExitStatus:
+ Debug("Opener: received PPPDExitStatus");
+ MY_ASSERT(len == sizeof(struct PPPDExitStatusRequest));
+ response.status = pppdExitStatus;
+ sendResponse(&response);
+ break;
+
+ case Stop:
+ Debug("Opener: received STOP command");
+ _exit(0);
+ break;
+
+ default:
+ Debug("Opener: unknown command type. Exiting ...");
+ _exit(1);
+ }
+ } // else
+ }
+}
+
+
+//
+// Send an open fd over a UNIX socket pair
+//
+int Opener::sendFD(int fd, struct ResponseHeader *response) {
+
+ struct { struct cmsghdr cmsg; int fd; } control;
+ struct msghdr msg;
+ struct iovec iov;
+
+ msg.msg_name = 0L;
+ msg.msg_namelen = 0;
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ // Send data
+ iov.iov_base = IOV_BASE_CAST response;
+ iov.iov_len = sizeof(struct ResponseHeader);
+
+ // Send a (duplicate of) the file descriptor
+ control.cmsg.cmsg_len = sizeof(struct cmsghdr) + sizeof(int);
+ control.cmsg.cmsg_level = SOL_SOCKET;
+ control.cmsg.cmsg_type = MY_SCM_RIGHTS;
+
+ msg.msg_control = (char *) &control;
+ msg.msg_controllen = control.cmsg.cmsg_len;
+
+#ifdef CMSG_DATA
+ *((int *)CMSG_DATA(&control.cmsg)) = fd;
+#else
+ *((int *) &control.cmsg.cmsg_data) = fd;
+#endif
+
+ if (sendmsg(socket, &msg, 0) < 0) {
+ perror("unable to send file descriptors");
+ return -1;
+ }
+
+ return 0;
+}
+
+int Opener::sendResponse(struct ResponseHeader *response) {
+
+ struct msghdr msg;
+ struct iovec iov;
+
+ msg.msg_name = 0L;
+ msg.msg_namelen = 0;
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+ msg.msg_control = 0L;
+ msg.msg_controllen = 0;
+
+ // Send data
+ iov.iov_base = IOV_BASE_CAST response;
+ iov.iov_len = sizeof(struct ResponseHeader);
+
+ if (sendmsg(socket, &msg, 0) < 0) {
+ perror("unable to send response");
+ return -1;
+ }
+
+ return 0;
+}
+
+const char* Opener::deviceByIndex(int idx) {
+
+ const char *device = 0L;
+
+ for(int i = 0; devices[i]; i++)
+ if(i == idx)
+ device = devices[i];
+ MY_ASSERT(device);
+ return device;
+}
+
+bool Opener::createAuthFile(Auth method, char *username, char *password) {
+ const char *authfile, *oldName, *newName;
+ char line[100];
+ char regexp[2*MaxStrLen+30];
+ regex_t preg;
+
+ if(!(authfile = authFile(method)))
+ return false;
+
+ if(!(newName = authFile(method, New)))
+ return false;
+
+ // look for username, "username" or 'username'
+ // if you modify this RE you have to adapt regexp's size above
+ snprintf(regexp, sizeof(regexp), "^[ \t]*%s[ \t]\\|^[ \t]*[\"\']%s[\"\']",
+ username,username);
+ MY_ASSERT(regcomp(&preg, regexp, 0) == 0);
+
+ // copy to new file pap- or chap-secrets
+ int old_umask = umask(0077);
+ FILE *fout = fopen(newName, "w");
+ if(fout) {
+ // copy old file
+ FILE *fin = fopen(authfile, "r");
+ if(fin) {
+ while(fgets(line, sizeof(line), fin)) {
+ if(regexec(&preg, line, 0, 0L, 0) == 0)
+ continue;
+ fputs(line, fout);
+ }
+ fclose(fin);
+ }
+
+ // append user/pass pair
+ fprintf(fout, "\"%s\"\t*\t\"%s\"\n", username, password);
+ fclose(fout);
+ }
+
+ // restore umask
+ umask(old_umask);
+
+ // free memory allocated by regcomp
+ regfree(&preg);
+
+ if(!(oldName = authFile(method, Old)))
+ return false;
+
+ // delete old file if any
+ unlink(oldName);
+
+ rename(authfile, oldName);
+ rename(newName, authfile);
+
+ return true;
+}
+
+
+bool Opener::removeAuthFile(Auth method) {
+ const char *authfile, *oldName;
+
+ if(!(authfile = authFile(method)))
+ return false;
+ if(!(oldName = authFile(method, Old)))
+ return false;
+
+ if(access(oldName, F_OK) == 0) {
+ unlink(authfile);
+ return (rename(oldName, authfile) == 0);
+ } else
+ return false;
+}
+
+
+const char* Opener::authFile(Auth method, int version) {
+ switch(method|version) {
+ case PAP|Original:
+ return PAP_AUTH_FILE;
+ break;
+ case PAP|New:
+ return PAP_AUTH_FILE".new";
+ break;
+ case PAP|Old:
+ return PAP_AUTH_FILE".old";
+ break;
+ case CHAP|Original:
+ return CHAP_AUTH_FILE;
+ break;
+ case CHAP|New:
+ return CHAP_AUTH_FILE".new";
+ break;
+ case CHAP|Old:
+ return CHAP_AUTH_FILE".old";
+ break;
+ default:
+ return 0L;
+ }
+}
+
+
+bool Opener::execpppd(const char *arguments) {
+ char buf[MAX_CMDLEN];
+ char *args[MaxArgs];
+ pid_t pgrpid;
+
+ if(ttyfd<0)
+ return false;
+
+ pppdExitStatus = -1;
+
+ switch(pppdPid = fork())
+ {
+ case -1:
+ fprintf(stderr,"In parent: fork() failed\n");
+ return false;
+ break;
+
+ case 0:
+ // let's parse the arguments the user supplied into UNIX suitable form
+ // that is a list of pointers each pointing to exactly one word
+ strlcpy(buf, arguments, sizeof(buf));
+ parseargs(buf, args);
+ // become a session leader and let /dev/ttySx
+ // be the controlling terminal.
+ pgrpid = setsid();
+#ifdef TIOCSCTTY
+ if(ioctl(ttyfd, TIOCSCTTY, 0)<0)
+ fprintf(stderr, "ioctl() failed.\n");
+#elif defined (TIOCSPGRP)
+ if(ioctl(ttyfd, TIOCSPGRP, &pgrpid)<0)
+ fprintf(stderr, "ioctl() failed.\n");
+#endif
+ if(tcsetpgrp(ttyfd, pgrpid)<0)
+ fprintf(stderr, "tcsetpgrp() failed.\n");
+
+ dup2(ttyfd, 0);
+ dup2(ttyfd, 1);
+
+ switch (checkForInterface()) {
+ case 1:
+ fprintf(stderr, "Cannot determine if kernel supports ppp.\n");
+ break;
+ case -1:
+ fprintf(stderr, "Kernel does not support ppp, oops.\n");
+ break;
+ case 0:
+ fprintf(stderr, "Kernel supports ppp alright.\n");
+ break;
+ }
+
+ execve(pppdPath(), args, 0L);
+ _exit(0);
+ break;
+
+ default:
+ Debug2("In parent: pppd pid %d\n",pppdPid);
+ close(ttyfd);
+ ttyfd = -1;
+ return true;
+ break;
+ }
+}
+
+
+bool Opener::killpppd()const {
+ if(pppdPid > 0) {
+ Debug2("In killpppd(): Sending SIGTERM to %d\n", pppdPid);
+ if(kill(pppdPid, SIGTERM) < 0) {
+ Debug2("Error terminating %d. Sending SIGKILL\n", pppdPid);
+ if(kill(pppdPid, SIGKILL) < 0) {
+ Debug2("Error killing %d\n", pppdPid);
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+
+void Opener::parseargs(char* buf, char** args) {
+ int nargs = 0;
+ int quotes;
+
+ while(nargs < MaxArgs-1 && *buf != '\0') {
+
+ quotes = 0;
+
+ // Strip whitespace. Use nulls, so that the previous argument is
+ // terminated automatically.
+
+ while ((*buf == ' ' ) || (*buf == '\t' ) || (*buf == '\n' ) )
+ *buf++ = '\0';
+
+ // detect begin of quoted argument
+ if (*buf == '"' || *buf == '\'') {
+ quotes = *buf;
+ *buf++ = '\0';
+ }
+
+ // save the argument
+ if(*buf != '\0') {
+ *args++ = buf;
+ nargs++;
+ }
+
+ if (!quotes)
+ while ((*buf != '\0') && (*buf != '\n') &&
+ (*buf != '\t') && (*buf != ' '))
+ buf++;
+ else {
+ while ((*buf != '\0') && (*buf != quotes))
+ buf++;
+ *buf++ = '\0';
+ }
+ }
+
+ *args = 0L;
+}
+
+
+const char* pppdPath() {
+ // wasting a few bytes
+ static char buffer[sizeof(PPPDSEARCHPATH)+sizeof(PPPDNAME)];
+ static char *pppdPath = 0L;
+ char *p;
+
+ if(pppdPath == 0L) {
+ const char *c = PPPDSEARCHPATH;
+ while(*c != '\0') {
+ while(*c == ':')
+ c++;
+ p = buffer;
+ while(*c != '\0' && *c != ':')
+ *p++ = *c++;
+ *p = '\0';
+ strcat(p, "/");
+ strcat(p, PPPDNAME);
+ if(access(buffer, F_OK) == 0)
+ return (pppdPath = buffer);
+ }
+ }
+
+ return pppdPath;
+}
+
+int checkForInterface()
+{
+// I don't know if Linux needs more initialization to get the ioctl to
+// work, pppd seems to hint it does. But BSD doesn't, and the following
+// code should compile.
+#if (defined(HAVE_NET_IF_PPP_H) || defined(HAVE_LINUX_IF_PPP_H)) && !defined(__svr4__)
+ int s, ok;
+ struct ifreq ifr;
+ // extern char *no_ppp_msg;
+
+ if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ return 1; /* can't tell */
+
+ strlcpy(ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name));
+ ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) >= 0;
+ close(s);
+
+ if (ok == -1) {
+// This is ifdef'd FreeBSD, because FreeBSD is the only BSD that supports
+// KLDs, the old LKM interface couldn't handle loading devices
+// dynamically, and thus can't load ppp support on the fly
+#ifdef __FreeBSD__
+ // If we failed to load ppp support and don't have it already.
+ if (kldload("if_ppp") == -1) {
+ return -1;
+ }
+ return 0;
+#else
+ return -1;
+#endif
+ }
+ return 0;
+#else
+// We attempt to use the SunOS/SysVr4 method and stat /dev/ppp
+ struct stat buf;
+
+ memset(&buf, 0, sizeof(buf));
+ return stat("/dev/ppp", &buf);
+#endif
+}
+
+
+void sighandler_child(int) {
+ pid_t pid;
+ int status;
+
+ signal(SIGCHLD, sighandler_child);
+ if(pppdPid>0) {
+ pid = waitpid(pppdPid, &status, WNOHANG);
+ if(pid != pppdPid) {
+ fprintf(stderr, "received SIGCHLD from unknown origin.\n");
+ } else {
+ Debug("It was pppd that died");
+ pppdPid = -1;
+ if((WIFEXITED(status))) {
+ pppdExitStatus = (WEXITSTATUS(status));
+ Debug2("pppd exited with return value %d\n", pppdExitStatus);
+ } else {
+ pppdExitStatus = 99;
+ Debug("pppd exited abnormally.");
+ }
+ Debug2("Sending %i a SIGUSR1\n", getppid());
+ kill(getppid(), SIGUSR1);
+ }
+ } else
+ fprintf(stderr, "received unexpected SIGCHLD.\n");
+}
diff --git a/kppp/opener.h b/kppp/opener.h
new file mode 100644
index 00000000..812ec9ba
--- /dev/null
+++ b/kppp/opener.h
@@ -0,0 +1,147 @@
+#ifndef _FILEOPENER_H_
+#define _FILEOPENER_H_
+
+#define DEVNULL "/dev/null"
+
+// workaround for bug in glibc on RedHat 5.0 and Debian 2.1
+#if defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0 && defined(__linux__))
+# define MY_SCM_RIGHTS 1
+#else
+# define MY_SCM_RIGHTS SCM_RIGHTS
+#endif
+
+// ### add by bhughes - FreeBSD defines 'BSD' in sys/param.h
+#include <sys/param.h>
+
+#if defined(BSD) || defined(__svr4__)
+# define IOV_BASE_CAST (char *)
+#else
+# define IOV_BASE_CAST (void *)
+#endif
+
+const char *pppdPath();
+
+class Opener {
+
+public:
+ Opener(int);
+ ~Opener();
+
+ enum { OpenDevice = 1,
+ OpenLock, RemoveLock,
+ OpenResolv,
+ OpenSysLog,
+ SetSecret, RemoveSecret,
+ SetHostname,
+ ExecPPPDaemon, KillPPPDaemon,
+ PPPDExitStatus,
+ Stop };
+ enum Auth { PAP = 1, CHAP };
+ enum { MaxPathLen = 30, MaxStrLen = 40, MaxArgs = 100 };
+
+private:
+ enum { Original=0x100, New=0x200, Old=0x400 } Version;
+ void mainLoop();
+ int sendFD(int ttyfd, struct ResponseHeader *response);
+ int sendResponse(struct ResponseHeader *response);
+ const char *deviceByIndex(int idx);
+ bool createAuthFile(Auth method, char *username, char *password);
+ bool removeAuthFile(Auth method);
+ const char* authFile(Auth method, int version = Original);
+ bool execpppd(const char *arguments);
+ bool killpppd()const;
+ void parseargs(char* buf, char** args);
+
+ int socket;
+ int ttyfd;
+ char lockfile[MaxPathLen+1];
+};
+
+
+struct RequestHeader {
+ int type;
+ int len;
+ // int id; // TODO: Use a transmission id and check whether
+ // response matches request
+};
+
+struct ResponseHeader {
+ int status; /* 0 or errno */
+ // int id;
+};
+
+struct OpenModemRequest {
+ struct RequestHeader header;
+ int deviceNum;
+};
+
+struct RemoveLockRequest {
+ struct RequestHeader header;
+};
+
+struct OpenLockRequest {
+ struct RequestHeader header;
+ int deviceNum;
+ int flags;
+};
+
+struct OpenResolvRequest {
+ struct RequestHeader header;
+ int flags;
+};
+
+struct OpenLogRequest {
+ struct RequestHeader header;
+};
+
+struct SetSecretRequest {
+ struct RequestHeader header;
+ Opener::Auth method; // PAP or CHAP
+ char username[Opener::MaxStrLen+1];
+ char password[Opener::MaxStrLen+1];
+};
+
+struct RemoveSecretRequest {
+ struct RequestHeader header;
+ Opener::Auth method; // PAP or CHAP
+};
+
+struct SetHostnameRequest {
+ struct RequestHeader header;
+ char name[Opener::MaxStrLen+1];
+};
+
+struct ExecDaemonRequest {
+ struct RequestHeader header;
+ char arguments[MAX_CMDLEN+1];
+};
+
+struct KillDaemonRequest {
+ struct RequestHeader header;
+};
+
+struct PPPDExitStatusRequest {
+ struct RequestHeader header;
+};
+
+struct StopRequest {
+ struct RequestHeader header;
+};
+
+union AllRequests {
+ struct RequestHeader header;
+ struct OpenModemRequest modem;
+ struct OpenLockRequest lock;
+ struct RemoveLockRequest unlock;
+ struct OpenResolvRequest resolv;
+ struct SetSecretRequest secret;
+ struct RemoveSecretRequest remove;
+ struct SetHostnameRequest host;
+ struct OpenLogRequest log;
+ struct ExecDaemonRequest daemon;
+ struct ExecDaemonRequest kill;
+ struct PPPDExitStatusRequest status;
+ struct StopRequest stop;
+};
+
+#endif
diff --git a/kppp/pixmaps/Makefile.am b/kppp/pixmaps/Makefile.am
new file mode 100644
index 00000000..f7a89316
--- /dev/null
+++ b/kppp/pixmaps/Makefile.am
@@ -0,0 +1,10 @@
+
+# add here all files
+# leaving out kppplogo.png until it gets used
+emo_DATA = folder.png phone.png \
+ dock_both.png dock_left.png dock_none.png dock_right.png \
+ modemboth.png modemleft.png modemnone.png modemright.png
+
+emodir = $(kde_datadir)/kppp/pics
+
+EXTRA_DIST = $(emo_DATA)
diff --git a/kppp/pixmaps/dock_both.png b/kppp/pixmaps/dock_both.png
new file mode 100644
index 00000000..55ea265e
--- /dev/null
+++ b/kppp/pixmaps/dock_both.png
Binary files differ
diff --git a/kppp/pixmaps/dock_left.png b/kppp/pixmaps/dock_left.png
new file mode 100644
index 00000000..79811c5f
--- /dev/null
+++ b/kppp/pixmaps/dock_left.png
Binary files differ
diff --git a/kppp/pixmaps/dock_none.png b/kppp/pixmaps/dock_none.png
new file mode 100644
index 00000000..0656a555
--- /dev/null
+++ b/kppp/pixmaps/dock_none.png
Binary files differ
diff --git a/kppp/pixmaps/dock_right.png b/kppp/pixmaps/dock_right.png
new file mode 100644
index 00000000..fcd62180
--- /dev/null
+++ b/kppp/pixmaps/dock_right.png
Binary files differ
diff --git a/kppp/pixmaps/folder.png b/kppp/pixmaps/folder.png
new file mode 100644
index 00000000..e79a1b51
--- /dev/null
+++ b/kppp/pixmaps/folder.png
Binary files differ
diff --git a/kppp/pixmaps/kppplogo.png b/kppp/pixmaps/kppplogo.png
new file mode 100644
index 00000000..d5bb21d7
--- /dev/null
+++ b/kppp/pixmaps/kppplogo.png
Binary files differ
diff --git a/kppp/pixmaps/modemboth.png b/kppp/pixmaps/modemboth.png
new file mode 100644
index 00000000..a6024ec5
--- /dev/null
+++ b/kppp/pixmaps/modemboth.png
Binary files differ
diff --git a/kppp/pixmaps/modemleft.png b/kppp/pixmaps/modemleft.png
new file mode 100644
index 00000000..c88d7ae8
--- /dev/null
+++ b/kppp/pixmaps/modemleft.png
Binary files differ
diff --git a/kppp/pixmaps/modemnone.png b/kppp/pixmaps/modemnone.png
new file mode 100644
index 00000000..f10d0089
--- /dev/null
+++ b/kppp/pixmaps/modemnone.png
Binary files differ
diff --git a/kppp/pixmaps/modemright.png b/kppp/pixmaps/modemright.png
new file mode 100644
index 00000000..c3f87cf0
--- /dev/null
+++ b/kppp/pixmaps/modemright.png
Binary files differ
diff --git a/kppp/pixmaps/phone.png b/kppp/pixmaps/phone.png
new file mode 100644
index 00000000..ca416931
--- /dev/null
+++ b/kppp/pixmaps/phone.png
Binary files differ
diff --git a/kppp/pppdargs.cpp b/kppp/pppdargs.cpp
new file mode 100644
index 00000000..ce3f22e6
--- /dev/null
+++ b/kppp/pppdargs.cpp
@@ -0,0 +1,171 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <qlayout.h>
+#include <kbuttonbox.h>
+#include <kwin.h>
+#include <kapplication.h>
+#include "pppdargs.h"
+#include "pppdata.h"
+#include <klocale.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlistbox.h>
+#include <qlabel.h>
+#include <kstdguiitem.h>
+#include <kpushbutton.h>
+#include <kstdguiitem.h>
+
+PPPdArguments::PPPdArguments(QWidget *parent, const char *name)
+ : QDialog(parent, name, TRUE)
+{
+ setCaption(i18n("Customize pppd Arguments"));
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+ QVBoxLayout *l = new QVBoxLayout(this, 10, 10);
+ QHBoxLayout *tl = new QHBoxLayout(10);
+ l->addLayout(tl);
+ QVBoxLayout *l1 = new QVBoxLayout();
+ QVBoxLayout *l2 = new QVBoxLayout();
+ tl->addLayout(l1, 1);
+ tl->addLayout(l2, 0);
+
+ QHBoxLayout *l11 = new QHBoxLayout(10);
+ l1->addLayout(l11);
+
+ argument_label = new QLabel(i18n("Arg&ument:"), this);
+ l11->addWidget(argument_label);
+
+ argument = new QLineEdit(this);
+ argument_label->setBuddy(argument);
+ connect(argument, SIGNAL(returnPressed()),
+ SLOT(addbutton()));
+ l11->addWidget(argument);
+ connect(argument, SIGNAL(textChanged(const QString &)),
+ this, SLOT(textChanged(const QString &)));
+
+ arguments = new QListBox(this);
+ arguments->setMinimumSize(1, fontMetrics().lineSpacing()*10);
+ connect(arguments, SIGNAL(highlighted(int)),
+ this, SLOT(itemSelected(int)));
+ l1->addWidget(arguments, 1);
+
+ add = new QPushButton(i18n("&Add"), this);
+ connect(add, SIGNAL(clicked()), SLOT(addbutton()));
+ l2->addWidget(add);
+ l2->addStretch(1);
+
+ remove = new QPushButton(i18n("&Remove"), this);
+ connect(remove, SIGNAL(clicked()), SLOT(removebutton()));
+ l2->addWidget(remove);
+
+ defaults = new KPushButton(KStdGuiItem::defaults(), this);
+ connect(defaults, SIGNAL(clicked()), SLOT(defaultsbutton()));
+ l2->addWidget(defaults);
+
+ l->addSpacing(5);
+
+ KButtonBox *bbox = new KButtonBox(this);
+ bbox->addStretch(1);
+ closebtn = bbox->addButton(KStdGuiItem::ok());
+ connect(closebtn, SIGNAL(clicked()), SLOT(closebutton()));
+ QPushButton *cancel = bbox->addButton(KStdGuiItem::cancel());
+ connect(cancel, SIGNAL(clicked()),
+ this, SLOT(reject()));
+ bbox->layout();
+ l->addWidget(bbox);
+
+ setFixedSize(sizeHint());
+
+ //load info from gpppdata
+ init();
+
+ add->setEnabled(false);
+ remove->setEnabled(false);
+ argument->setFocus();
+}
+
+
+void PPPdArguments::addbutton() {
+ if(!argument->text().isEmpty() && arguments->count() < MAX_PPPD_ARGUMENTS) {
+ arguments->insertItem(argument->text());
+ argument->setText("");
+ }
+}
+
+
+void PPPdArguments::removebutton() {
+ if(arguments->currentItem() >= 0)
+ arguments->removeItem(arguments->currentItem());
+}
+
+
+void PPPdArguments::defaultsbutton() {
+ // all of this is a hack
+ // save current list
+ QStringList arglist(gpppdata.pppdArgument());
+
+ // get defaults
+ gpppdata.setpppdArgumentDefaults();
+ init();
+
+ // restore old list
+ gpppdata.setpppdArgument(arglist);
+}
+
+
+void PPPdArguments::closebutton() {
+ QStringList arglist;
+ for(uint i=0; i < arguments->count(); i++)
+ arglist.append(arguments->text(i));
+ gpppdata.setpppdArgument(arglist);
+
+ done(0);
+}
+
+
+void PPPdArguments::init() {
+ while(arguments->count())
+ arguments->removeItem(0);
+
+ QStringList &arglist = gpppdata.pppdArgument();
+ for ( QStringList::Iterator it = arglist.begin();
+ it != arglist.end();
+ ++it )
+ arguments->insertItem(*it);
+}
+
+
+void PPPdArguments::textChanged(const QString &s) {
+ add->setEnabled(s.length() > 0);
+}
+
+
+void PPPdArguments::itemSelected(int idx) {
+ remove->setEnabled(idx != -1);
+}
+
+#include "pppdargs.moc"
diff --git a/kppp/pppdargs.h b/kppp/pppdargs.h
new file mode 100644
index 00000000..43daa017
--- /dev/null
+++ b/kppp/pppdargs.h
@@ -0,0 +1,79 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _PPPDARGS_H_
+#define _PPPDARGS_H_
+
+#include <qdialog.h>
+
+class QListBox;
+class QLabel;
+class QPushButton;
+class QLineEdit;
+class KPushButton;
+
+
+class PPPdArguments : public QDialog {
+Q_OBJECT
+public:
+ PPPdArguments(QWidget *parent=0, const char *name=0);
+ ~PPPdArguments() {}
+
+private slots:
+ void addbutton();
+ void removebutton();
+ void defaultsbutton();
+ void closebutton();
+ void textChanged(const QString &);
+ void itemSelected(int);
+
+private:
+ void init();
+
+ QLabel *argument_label;
+
+ QLineEdit *argument;
+
+ QPushButton *add;
+ QPushButton *remove;
+ KPushButton *defaults;
+
+ QListBox *arguments;
+
+ QPushButton *closebtn;
+};
+#endif
+
+
+
+
+
+
+
+
+
+
diff --git a/kppp/pppdata.cpp b/kppp/pppdata.cpp
new file mode 100644
index 00000000..80bd79be
--- /dev/null
+++ b/kppp/pppdata.cpp
@@ -0,0 +1,1486 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "pppdata.h"
+#include "runtests.h"
+#include "devices.h"
+#include <klocale.h>
+#include <kconfig.h>
+#include <kmessagebox.h>
+#include <kapplication.h>
+#include <kglobalsettings.h>
+#include <assert.h>
+
+PPPData gpppdata;
+
+
+PPPData::PPPData()
+ : config(0L),
+ accounthighcount(-1), // start out with no account entries
+ caccount(-1), // set the current account index also
+ modemhighcount(-1), // start out with no modem entries
+ cmodem(-1), // set the current modem index also
+ suidprocessid(-1), // process ID of setuid child
+ pppdisrunning(false),
+ pppderror(0),
+ waitcallback(false)
+{
+}
+
+
+//
+// open configuration file
+//
+bool PPPData::open() {
+
+ config = kapp->config();
+
+ if (config->getConfigState() == KConfig::NoAccess) {
+ KMessageBox::error(0L,
+ i18n("The application-specific config file could not "
+ "be opened in either read-write or read-only mode.\n"
+ "The superuser might have to change its ownership "
+ "by issuing the following command in your home directory:\n"
+ "chown {YourUsername} .kde/share/config/kppprc"),
+ kapp->name());
+ return false;
+ }
+
+ // don't expand shell variables
+ config->setDollarExpansion(false);
+
+ accounthighcount = readNumConfig(GENERAL_GRP, NUMACCOUNTS_KEY, 0) - 1;
+
+ if (accounthighcount > MAX_ACCOUNTS)
+ accounthighcount = MAX_ACCOUNTS;
+
+ if(accounthighcount >= 0 && defaultAccount().isEmpty()) {
+ setAccountByIndex(0);
+ setDefaultAccount(accname());
+ } else if(!setAccount(defaultAccount()))
+ setDefaultAccount(accname());
+
+ modemhighcount = readNumConfig(GENERAL_GRP, NUMMODEMS_KEY, 0) - 1;
+
+ if (modemhighcount > MAX_MODEMS)
+ modemhighcount = MAX_MODEMS;
+
+ // if there aren't no ModemX setted and exists the [Modem] group,
+ // probably it's the first time we are using this new version
+ // with multiple modem profiles.
+ // So we copy the old [Modem] to the new [Modem0]
+ if(modemhighcount < 0 && defaultModem().isEmpty() && config->hasGroup("Modem"))
+ {
+ config->setGroup("Modem");
+
+ QMap <QString, QString> map = config->entryMap("Modem");
+ QMap <QString, QString>::ConstIterator it = map.begin();
+
+ newmodem();
+
+ while (it != map.end()) {
+ config->setGroup(cmodemgroup);
+ config->writeEntry(it.key(), *it);
+ it++;
+ }
+
+ QString newname("Modem0");
+ setModname(newname);
+ }
+
+ if(modemhighcount >= 0 && defaultModem().isEmpty()) {
+ setModemByIndex(0);
+ setDefaultModem(modname());
+ } else if(!setModem(defaultModem()))
+ setDefaultModem(modname());
+
+
+ // start out with internal debugging disabled
+ // the user is still free to specify `debug' on his own
+ setPPPDebug(false);
+
+ ::pppdVersion(&pppdVer, &pppdMod, &pppdPatch);
+
+ return true;
+}
+
+
+//
+// save configuration
+//
+void PPPData::save() {
+
+ if (config) {
+ writeConfig(GENERAL_GRP, NUMACCOUNTS_KEY, accountCount());
+ writeConfig(GENERAL_GRP, NUMMODEMS_KEY, modemCount());
+ config->sync();
+ }
+
+}
+
+
+//
+// cancel changes
+//
+void PPPData::cancel() {
+
+ if (config) {
+ config->rollback();
+ config->reparseConfiguration();
+ }
+
+}
+
+
+// currently differentiates between READWRITE and NONE only
+int PPPData::access() const {
+
+ return config->getConfigState();
+}
+
+
+// functions to read/write date to configuration file
+QString PPPData::readConfig(const QString &group, const QString &key,
+ const QString &defvalue = "")
+{
+ if (config) {
+ config->setGroup(group);
+ return config->readEntry(key, defvalue);
+ } else
+ return defvalue;
+}
+
+
+int PPPData::readNumConfig(const QString &group, const QString &key,
+ int defvalue) {
+ if (config) {
+ config->setGroup(group);
+ return config->readNumEntry(key, defvalue);
+ } else
+ return defvalue;
+
+}
+
+
+bool PPPData::readListConfig(const QString &group, const QString &key,
+ QStringList &list, char sep) {
+ list.clear();
+ if (config) {
+ config->setGroup(group);
+ list = config->readListEntry(key, sep);
+ return true;
+ } else
+ return false;
+}
+
+
+void PPPData::writeConfig(const QString &group, const QString &key,
+ const QString &value) {
+ if (config) {
+ config->setGroup(group);
+ config->writeEntry(key, value);
+ }
+}
+
+
+void PPPData::writeConfig(const QString &group, const QString &key, int value) {
+ if (config) {
+ config->setGroup(group);
+ config->writeEntry(key, value);
+ }
+}
+
+
+void PPPData::writeListConfig(const QString &group, const QString &key,
+ QStringList &list, char sep) {
+ if (config) {
+ config->setGroup(group);
+ config->writeEntry(key, list, sep);
+ }
+}
+
+
+//
+// functions to set/return general information
+//
+QString PPPData::password() const {
+ return passwd;
+}
+
+
+void PPPData::setPassword(const QString &pw) {
+ passwd = pw;
+}
+
+
+const QString PPPData::defaultAccount() {
+ return readConfig(GENERAL_GRP, DEFAULTACCOUNT_KEY);
+}
+
+
+void PPPData::setDefaultAccount(const QString &n) {
+ writeConfig(GENERAL_GRP, DEFAULTACCOUNT_KEY, n);
+
+ //now set the current account index to the default account
+ setAccount(defaultAccount());
+}
+
+
+const QString PPPData::defaultModem() {
+ return readConfig(GENERAL_GRP, DEFAULTMODEM_KEY);
+}
+
+
+void PPPData::setDefaultModem(const QString &n) {
+ writeConfig(GENERAL_GRP, DEFAULTMODEM_KEY, n);
+
+ //now set the current modem index to the default modem
+ setModem(defaultModem());
+}
+
+bool PPPData::get_show_clock_on_caption() {
+ return (bool) readNumConfig(GENERAL_GRP, SHOWCLOCK_KEY, true);
+}
+
+
+void PPPData::set_show_clock_on_caption(bool set) {
+ writeConfig(GENERAL_GRP, SHOWCLOCK_KEY, (int) set);
+}
+
+
+bool PPPData::get_xserver_exit_disconnect() {
+ return (bool) readNumConfig(GENERAL_GRP, DISCONNECT_KEY, true);
+}
+
+bool PPPData::get_redial_on_nocarrier() {
+ return (bool) readNumConfig(GENERAL_GRP, REDIALONNOCARR_KEY, false);
+}
+
+
+void PPPData::setPPPDebug(bool set) {
+ writeConfig(GENERAL_GRP, PPP_DEBUG_OPTION, (int)set);
+}
+
+
+bool PPPData::getPPPDebug() {
+ return (bool)readNumConfig(GENERAL_GRP, PPP_DEBUG_OPTION, false);
+}
+
+
+void PPPData::set_xserver_exit_disconnect(bool set) {
+ writeConfig(GENERAL_GRP, DISCONNECT_KEY, (int) set);
+}
+
+void PPPData::set_redial_on_nocarrier(bool set) {
+ writeConfig(GENERAL_GRP, REDIALONNOCARR_KEY, (int) set);
+}
+
+
+bool PPPData::quit_on_disconnect() {
+ return (bool) readNumConfig(GENERAL_GRP, QUITONDISCONNECT_KEY, false);
+}
+
+
+void PPPData::set_quit_on_disconnect(bool set) {
+ writeConfig(GENERAL_GRP, QUITONDISCONNECT_KEY, (int) set);
+}
+
+
+bool PPPData::get_show_log_window() {
+ return (bool) readNumConfig (GENERAL_GRP, SHOWLOGWIN_KEY, false);
+}
+
+
+void PPPData::set_show_log_window(bool set) {
+ writeConfig(GENERAL_GRP, SHOWLOGWIN_KEY, (int) set);
+}
+
+
+bool PPPData::automatic_redial() {
+ return (bool) readNumConfig(GENERAL_GRP, AUTOREDIAL_KEY, FALSE);
+}
+
+
+void PPPData::set_automatic_redial(bool set) {
+ writeConfig(GENERAL_GRP, AUTOREDIAL_KEY, (int) set);
+}
+
+
+bool PPPData::get_iconify_on_connect() {
+ return (bool) readNumConfig(GENERAL_GRP, ICONIFY_ON_CONNECT_KEY, TRUE);
+}
+
+
+void PPPData::set_iconify_on_connect(bool set) {
+ writeConfig(GENERAL_GRP, ICONIFY_ON_CONNECT_KEY, (int) set);
+}
+
+
+bool PPPData::get_dock_into_panel() {
+ return (bool) readNumConfig(GENERAL_GRP, DOCKING_KEY, false);
+}
+
+
+void PPPData::set_dock_into_panel(bool set) {
+ writeConfig(GENERAL_GRP, DOCKING_KEY, (int) set);
+}
+
+
+QString PPPData::pppdVersion() {
+ return QString("%1.%2.%3").arg(pppdVer).arg(pppdMod).arg(pppdPatch);
+}
+
+bool PPPData::pppdVersionMin(int ver, int mod, int patch) {
+ // check if pppd version fulfills minimum requirement
+ return (pppdVer > ver
+ || (pppdVer == ver && pppdMod > mod)
+ || (pppdVer == ver && pppdMod == mod && pppdPatch >= patch));
+}
+
+int PPPData::pppdTimeout() {
+ return readNumConfig(GENERAL_GRP, PPPDTIMEOUT_KEY, PPPD_TIMEOUT);
+}
+
+
+void PPPData::setpppdTimeout(int n) {
+ writeConfig(GENERAL_GRP, PPPDTIMEOUT_KEY, n);
+}
+
+//
+// functions to set/return modem information
+//
+
+
+//returns number of modems
+int PPPData::modemCount() const {
+ return modemhighcount + 1;
+}
+
+
+bool PPPData::setModem(const QString &mname) {
+ for(int i = 0; i <= modemhighcount; i++) {
+ setModemByIndex(i);
+ if(modname() == mname) {
+ cmodem = i;
+ return true;
+ }
+ }
+ return false;
+}
+
+
+bool PPPData::setModemByIndex(int i) {
+ if(i >= 0 && i <= modemhighcount) {
+ cmodem = i;
+ cmodemgroup.sprintf("%s%i", MODEM_GRP, i);
+ return true;
+ }
+ return false;
+}
+
+
+bool PPPData::isUniqueModname(const QString &n) {
+ int current = cmodem;
+ for(int i=0; i <= modemhighcount; i++) {
+ setModemByIndex(i);
+ if(modname() == n && i != current) {
+ setModemByIndex(current);
+ return false;
+ }
+ }
+ setModemByIndex(current);
+ return true;
+}
+
+
+bool PPPData::deleteModem() {
+ if(cmodem < 0)
+ return false;
+
+ QMap <QString, QString> map;
+ QMap <QString, QString>::Iterator it;
+
+ // set all entries of the current modem to ""
+ map = config->entryMap(cmodemgroup);
+ it = map.begin();
+ while (it != map.end()) {
+ config->writeEntry(it.key(), "");
+ it++;
+ }
+
+ // shift the succeeding modems
+ for(int i = cmodem+1; i <= modemhighcount; i++) {
+ setModemByIndex(i);
+ map = config->entryMap(cmodemgroup);
+ it = map.begin();
+ setModemByIndex(i-1);
+ config->setGroup(cmodemgroup);
+ while (it != map.end()) {
+ config->writeEntry(it.key(), *it);
+ it++;
+ }
+ }
+
+ // make sure the top modem is cleared
+ setModemByIndex(modemhighcount);
+ map = config->entryMap(cmodemgroup);
+ it = map.begin();
+ config->setGroup(cmodemgroup);
+ while (!it.key().isNull()) {
+ config->writeEntry(it.key(), "");
+ it++;
+ }
+
+ modemhighcount--;
+ if(cmodem > modemhighcount)
+ cmodem = modemhighcount;
+
+ setModemByIndex(cmodem);
+
+ return true;
+}
+
+bool PPPData::deleteModem(const QString &mname) {
+ if(!setModem(mname))
+ return false;
+
+ deleteModem();
+
+ return true;
+}
+
+
+int PPPData::newmodem() {
+
+ if(!config || modemhighcount >= MAX_MODEMS)
+ return -1;
+
+ modemhighcount++;
+ setModemByIndex(modemhighcount);
+
+ setpppdArgumentDefaults();
+
+ return cmodem;
+}
+
+int PPPData::copymodem(int i) {
+
+ config->setGroup(cmodemgroup);
+
+ if(modemhighcount >= MAX_MODEMS)
+ return -1;
+
+ setModemByIndex(i);
+
+ QMap <QString, QString> map = config->entryMap(cmodemgroup);
+ QMap <QString, QString>::ConstIterator it = map.begin();
+
+ QString newname = i18n("%1_copy").arg(modname());
+
+ newmodem();
+
+ while (it != map.end()) {
+ config->setGroup(cmodemgroup);
+ config->writeEntry(it.key(), *it);
+ it++;
+ }
+
+ setModname(newname);
+
+ return cmodem;
+}
+
+
+const QString PPPData::modname() {
+ return readConfig(cmodemgroup, MOD_NAME_KEY);
+}
+
+void PPPData::setModname(const QString &n) {
+ if(!cmodemgroup.isNull()) {
+ // are we manipulating the default modem's name ? then change it, too.
+ bool def = modname() == defaultModem();
+ writeConfig(cmodemgroup, MOD_NAME_KEY, n);
+ if (def)
+ setDefaultModem(n);
+ }
+}
+
+
+
+
+const QString PPPData::modemDevice() {
+ return readConfig (cmodemgroup, MODEMDEV_KEY, devices[DEV_DEFAULT]);
+}
+
+
+void PPPData::setModemDevice(const QString &n) {
+ writeConfig(cmodemgroup, MODEMDEV_KEY, n);
+}
+
+
+QString PPPData::flowcontrol() {
+ // keep default value in sync with general.cpp
+ return readConfig(cmodemgroup, FLOWCONTROL_KEY, i18n("Hardware [CRTSCTS]"));
+}
+
+
+void PPPData::setFlowcontrol(const QString &n) {
+ writeConfig(cmodemgroup, FLOWCONTROL_KEY, n);
+}
+
+
+const QString PPPData::speed() {
+ QString s = readConfig(cmodemgroup, SPEED_KEY, "57600");
+ // undo the damage of a bug in former versions. It left an empty Speed=
+ // entry in kppprc. kppp did set the serial port to 57600 as default but
+ // pppd wouldn't receive the speed via the command line.
+ if(s.toUInt() == 0)
+ s = "57600";
+ return s;
+}
+
+
+void PPPData::setSpeed(const QString &n) {
+ writeConfig(cmodemgroup, SPEED_KEY, n);
+}
+
+
+#if 0
+void PPPData::setUseCDLine(const int n) {
+ writeConfig(cmodemgroup,USECDLINE_KEY,n);
+}
+
+
+int PPPData::UseCDLine() {
+ return readNumConfig(cmodemgroup,USECDLINE_KEY,0);
+}
+#endif
+
+const QString PPPData::modemEscapeStr() {
+ return readConfig(cmodemgroup,ESCAPESTR_KEY,"+++");
+}
+
+
+void PPPData::setModemEscapeStr(const QString &n) {
+ writeConfig(cmodemgroup,ESCAPESTR_KEY,n);
+}
+
+
+const QString PPPData::modemEscapeResp() {
+ return readConfig(cmodemgroup,ESCAPERESP_KEY,"OK");
+}
+
+
+void PPPData::setModemEscapeResp(const QString &n) {
+ writeConfig(cmodemgroup,ESCAPERESP_KEY,n);
+}
+
+
+int PPPData::modemEscapeGuardTime() {
+ return readNumConfig(cmodemgroup,ESCAPEGUARDTIME_KEY,50);
+}
+
+
+void PPPData::setModemEscapeGuardTime(int n) {
+ writeConfig(cmodemgroup,ESCAPEGUARDTIME_KEY,n);
+}
+
+
+bool PPPData::modemLockFile() {
+ return readNumConfig(cmodemgroup, LOCKFILE_KEY, 1);
+}
+
+
+void PPPData::setModemLockFile(bool set) {
+ writeConfig(cmodemgroup, LOCKFILE_KEY, set);
+}
+
+
+int PPPData::modemTimeout() {
+ return readNumConfig(cmodemgroup, TIMEOUT_KEY, MODEM_TIMEOUT);
+}
+
+
+void PPPData::setModemTimeout(int n) {
+ writeConfig(cmodemgroup, TIMEOUT_KEY, n);
+}
+
+
+int PPPData::modemToneDuration() {
+ return readNumConfig(cmodemgroup, TONEDURATION_KEY,MODEM_TONEDURATION);
+}
+
+
+void PPPData::setModemToneDuration(int n) {
+ writeConfig(cmodemgroup, TONEDURATION_KEY, n);
+}
+
+
+int PPPData::busyWait() {
+ return readNumConfig(cmodemgroup, BUSYWAIT_KEY, BUSY_WAIT);
+}
+
+
+void PPPData::setbusyWait(int n) {
+ writeConfig(cmodemgroup, BUSYWAIT_KEY, n);
+}
+
+
+//
+//Advanced "Modem" dialog
+//
+// defaults: InitString=ATZ, InitString1="" etc.
+const QString PPPData::modemInitStr(int i) {
+ assert(i >= 0 && i < NumInitStrings);
+ if(i == 0)
+ return readConfig(cmodemgroup, INITSTR_KEY, "ATZ");
+ else
+ return readConfig(cmodemgroup, INITSTR_KEY + QString::number(i), "");
+}
+
+
+void PPPData::setModemInitStr(int i, const QString &n) {
+ assert(i >= 0 && i < NumInitStrings);
+ QString k = INITSTR_KEY + (i > 0 ? QString::number(i) : "");
+ writeConfig(cmodemgroup, k, n);
+}
+
+
+const QString PPPData::modemInitResp() {
+ return readConfig(cmodemgroup, INITRESP_KEY, "OK");
+}
+
+
+void PPPData::setModemInitResp(const QString &n) {
+ writeConfig(cmodemgroup, INITRESP_KEY, n);
+}
+
+
+int PPPData::modemPreInitDelay() {
+ return readNumConfig(cmodemgroup, PREINITDELAY_KEY, 50);
+}
+
+
+void PPPData::setModemPreInitDelay(int n) {
+ writeConfig(cmodemgroup, PREINITDELAY_KEY, n);
+}
+
+
+int PPPData::modemInitDelay() {
+ return readNumConfig(cmodemgroup, INITDELAY_KEY, 50);
+}
+
+
+void PPPData::setModemInitDelay(int n) {
+ writeConfig(cmodemgroup, INITDELAY_KEY, n);
+}
+
+QString PPPData::modemNoDialToneDetectionStr() {
+ return readConfig(cmodemgroup, NODTDETECT_KEY, "ATX3");
+}
+
+void PPPData::setModemNoDialToneDetectionStr(const QString &n) {
+ writeConfig(cmodemgroup, NODTDETECT_KEY, n);
+}
+
+const QString PPPData::modemDialStr() {
+ return readConfig(cmodemgroup, DIALSTR_KEY, "ATDT");
+}
+
+
+void PPPData::setModemDialStr(const QString &n) {
+ writeConfig(cmodemgroup, DIALSTR_KEY, n);
+}
+
+
+const QString PPPData::modemConnectResp() {
+ return readConfig(cmodemgroup, CONNECTRESP_KEY, "CONNECT");
+}
+
+
+void PPPData::setModemConnectResp(const QString &n) {
+ writeConfig(cmodemgroup, CONNECTRESP_KEY, n);
+}
+
+
+const QString PPPData::modemBusyResp() {
+ return readConfig(cmodemgroup, BUSYRESP_KEY, "BUSY");
+}
+
+
+void PPPData::setModemBusyResp(const QString &n) {
+ writeConfig(cmodemgroup, BUSYRESP_KEY, n);
+}
+
+
+const QString PPPData::modemNoCarrierResp() {
+ return readConfig(cmodemgroup, NOCARRIERRESP_KEY, "NO CARRIER");
+}
+
+
+void PPPData::setModemNoCarrierResp(const QString &n) {
+ writeConfig(cmodemgroup, NOCARRIERRESP_KEY, n);
+}
+
+
+const QString PPPData::modemNoDialtoneResp() {
+ return readConfig(cmodemgroup, NODIALTONERESP_KEY, "NO DIALTONE");
+}
+
+
+void PPPData::setModemNoDialtoneResp(const QString &n) {
+ writeConfig(cmodemgroup, NODIALTONERESP_KEY, n);
+}
+
+
+const QString PPPData::modemHangupStr() {
+ return readConfig(cmodemgroup, HANGUPSTR_KEY, "+++ATH");
+}
+
+void PPPData::setModemHangupStr(const QString &n) {
+ writeConfig(cmodemgroup, HANGUPSTR_KEY, n);
+}
+
+
+const QString PPPData::modemHangupResp() {
+ return readConfig(cmodemgroup, HANGUPRESP_KEY, "OK");
+}
+
+void PPPData::setModemHangupResp(const QString &n) {
+ writeConfig(cmodemgroup, HANGUPRESP_KEY, n);
+}
+
+
+QString PPPData::modemDLPResp() {
+ return readConfig(cmodemgroup, DLPRESP_KEY, "DIGITAL LINE DETECTED");
+}
+
+void PPPData::setModemDLPResp(const QString &n) {
+ writeConfig(cmodemgroup, DLPRESP_KEY, n);
+}
+
+
+
+
+const QString PPPData::modemAnswerStr() {
+ return readConfig(cmodemgroup, ANSWERSTR_KEY, "ATA");
+}
+
+
+QString PPPData::volumeOff() {
+ return readConfig(cmodemgroup, VOLUME_OFF, "M0L0");
+}
+
+
+void PPPData::setVolumeOff(const QString &s) {
+ writeConfig(cmodemgroup, VOLUME_OFF, s);
+}
+
+
+QString PPPData::volumeMedium() {
+ return readConfig(cmodemgroup, VOLUME_MEDIUM, "M1L1");
+}
+
+
+void PPPData::setVolumeMedium(const QString &s) {
+ writeConfig(cmodemgroup, VOLUME_MEDIUM, s);
+}
+
+
+QString PPPData::volumeHigh() {
+ QString tmp = readConfig(cmodemgroup, VOLUME_HIGH, "M1L3");
+ if(tmp == "M1L4")
+ tmp = "M1L3";
+ return tmp;
+}
+
+
+void PPPData::setVolumeHigh(const QString &s) {
+ writeConfig(cmodemgroup, VOLUME_HIGH, s);
+}
+
+
+QString PPPData::volumeInitString() {
+ QString s;
+
+ switch(volume()) {
+ case 0:
+ s = volumeOff();
+ break;
+ case 1:
+ s = volumeMedium();
+ break;
+ case 2:
+ s = volumeHigh();
+ break;
+ default:
+ s = volumeMedium();
+ }
+
+ return s;
+}
+
+
+int PPPData::volume() {
+ return readNumConfig(cmodemgroup, VOLUME_KEY, 1);
+}
+
+
+void PPPData::setVolume(int i) {
+ writeConfig(cmodemgroup, VOLUME_KEY, i);
+}
+
+int PPPData::waitForDialTone() {
+ return readNumConfig(cmodemgroup, DIALTONEWAIT_KEY, 1);
+}
+
+void PPPData::setWaitForDialTone(int i) {
+ writeConfig(cmodemgroup, DIALTONEWAIT_KEY, i);
+}
+
+void PPPData::setModemAnswerStr(const QString &n) {
+ writeConfig(cmodemgroup, ANSWERSTR_KEY, n);
+}
+
+
+const QString PPPData::modemRingResp() {
+ return readConfig(cmodemgroup, RINGRESP_KEY, "RING");
+}
+
+
+void PPPData::setModemRingResp(const QString &n) {
+ writeConfig(cmodemgroup, RINGRESP_KEY, n);
+}
+
+
+const QString PPPData::modemAnswerResp() {
+ return readConfig(cmodemgroup, ANSWERRESP_KEY, "CONNECT");
+}
+
+
+void PPPData::setModemAnswerResp(const QString &n) {
+ writeConfig(cmodemgroup, ANSWERRESP_KEY, n);
+}
+
+
+const QString PPPData::enter() {
+ return readConfig(cmodemgroup, ENTER_KEY, "CR");
+}
+
+
+void PPPData::setEnter(const QString &n) {
+ writeConfig(cmodemgroup, ENTER_KEY, n);
+}
+
+
+//
+// functions to set/return account information
+//
+
+//returns number of accounts
+int PPPData::accountCount() const {
+ return accounthighcount + 1;
+}
+
+
+bool PPPData::setAccount(const QString &aname) {
+ for(int i = 0; i <= accounthighcount; i++) {
+ setAccountByIndex(i);
+ if(accname() == aname) {
+ caccount = i;
+ return true;
+ }
+ }
+ return false;
+}
+
+
+bool PPPData::setAccountByIndex(int i) {
+ if(i >= 0 && i <= accounthighcount) {
+ caccount = i;
+ caccountgroup.sprintf("%s%i", ACCOUNT_GRP, i);
+ return true;
+ }
+ return false;
+}
+
+
+bool PPPData::isUniqueAccname(const QString &n) {
+ if(n.contains(':'))
+ return false;
+ int current = caccount;
+ for(int i=0; i <= accounthighcount; i++) {
+ setAccountByIndex(i);
+ if(accname() == n && i != current) {
+ setAccountByIndex(current);
+ return false;
+ }
+ }
+ setAccountByIndex(current);
+ return true;
+}
+
+
+bool PPPData::deleteAccount() {
+ if(caccount < 0)
+ return false;
+
+ QMap <QString, QString> map;
+ QMap <QString, QString>::Iterator it;
+
+ // set all entries of the current account to ""
+ map = config->entryMap(caccountgroup);
+ it = map.begin();
+ while (it != map.end()) {
+ config->writeEntry(it.key(), "");
+ it++;
+ }
+
+ // shift the succeeding accounts
+ for(int i = caccount+1; i <= accounthighcount; i++) {
+ setAccountByIndex(i);
+ map = config->entryMap(caccountgroup);
+ it = map.begin();
+ setAccountByIndex(i-1);
+ config->setGroup(caccountgroup);
+ while (it != map.end()) {
+ config->writeEntry(it.key(), *it);
+ it++;
+ }
+ }
+
+ // make sure the top account is cleared
+ setAccountByIndex(accounthighcount);
+ map = config->entryMap(caccountgroup);
+ it = map.begin();
+ config->setGroup(caccountgroup);
+ while (!it.key().isNull()) {
+ config->writeEntry(it.key(), "");
+ it++;
+ }
+
+ accounthighcount--;
+ if(caccount > accounthighcount)
+ caccount = accounthighcount;
+
+ setAccountByIndex(caccount);
+
+ return true;
+}
+
+bool PPPData::deleteAccount(const QString &aname) {
+ if(!setAccount(aname))
+ return false;
+
+ deleteAccount();
+
+ return true;
+}
+
+
+int PPPData::newaccount() {
+
+ if(!config || accounthighcount >= MAX_ACCOUNTS)
+ return -1;
+
+ accounthighcount++;
+ setAccountByIndex(accounthighcount);
+
+ setpppdArgumentDefaults();
+
+ return caccount;
+}
+
+int PPPData::copyaccount(int i) {
+
+ config->setGroup(caccountgroup);
+
+ if(accounthighcount >= MAX_ACCOUNTS)
+ return -1;
+
+ setAccountByIndex(i);
+
+ QMap <QString, QString> map = config->entryMap(caccountgroup);
+ QMap <QString, QString>::ConstIterator it = map.begin();
+
+ QString newname = i18n("%1_copy").arg(accname());
+
+ newaccount();
+
+ while (it != map.end()) {
+ config->setGroup(caccountgroup);
+ config->writeEntry(it.key(), *it);
+ it++;
+ }
+
+ setAccname(newname);
+
+ return caccount;
+}
+
+
+const QString PPPData::accname() {
+ return readConfig(caccountgroup, ACC_NAME_KEY);
+}
+
+void PPPData::setAccname(const QString &n) {
+ if(!caccountgroup.isNull()) {
+ // are we manipulating the default account's name ? then change it, too.
+ bool def = accname() == defaultAccount();
+ writeConfig(caccountgroup, ACC_NAME_KEY, n);
+ if (def)
+ setDefaultAccount(n);
+ }
+}
+
+
+#define SEPARATOR_CHAR ':'
+QStringList &PPPData::phonenumbers() {
+
+ readListConfig(caccountgroup, PHONENUMBER_KEY, phonelist, SEPARATOR_CHAR);
+ return phonelist;
+
+}
+
+
+const QString PPPData::phonenumber() {
+ return readConfig(caccountgroup, PHONENUMBER_KEY);
+}
+
+
+void PPPData::setPhonenumber(const QString &n) {
+ writeConfig(caccountgroup, PHONENUMBER_KEY, n);
+}
+
+
+const QString PPPData::dialPrefix() {
+ return readConfig(caccountgroup, DIAL_PREFIX_KEY, "");
+}
+
+
+void PPPData::setDialPrefix(const QString &s) {
+ writeConfig(caccountgroup, DIAL_PREFIX_KEY, s);
+}
+
+
+int PPPData::authMethod() {
+ return readNumConfig(caccountgroup, AUTH_KEY, 0);
+}
+
+
+void PPPData::setAuthMethod(int value) {
+ writeConfig(caccountgroup, AUTH_KEY, value);
+}
+
+
+const QString PPPData::storedUsername() {
+ return readConfig(caccountgroup, STORED_USERNAME_KEY, "");
+}
+
+
+void PPPData::setStoredUsername(const QString &b) {
+ writeConfig(caccountgroup, STORED_USERNAME_KEY, b);
+}
+
+
+const QString PPPData::storedPassword() {
+ return readConfig(caccountgroup, STORED_PASSWORD_KEY, "");
+}
+
+
+void PPPData::setStoredPassword(const QString &b) {
+ writeConfig(caccountgroup, STORED_PASSWORD_KEY, b);
+}
+
+
+bool PPPData::storePassword() {
+ return (bool)readNumConfig(caccountgroup, STORE_PASSWORD_KEY, 1);
+}
+
+int PPPData::callbackType() {
+ return readNumConfig(caccountgroup, CALLBACK_TYPE_KEY, 0);
+}
+
+void PPPData::setCallbackType(int value) {
+ writeConfig(caccountgroup, CALLBACK_TYPE_KEY, value);
+}
+
+QString PPPData::callbackPhone() {
+ return readConfig(caccountgroup, CALLBACK_PHONE_KEY, "");
+}
+
+void PPPData::setCallbackPhone(const QString &b) {
+ writeConfig(caccountgroup, CALLBACK_PHONE_KEY, b);
+}
+
+bool PPPData::waitCallback() {
+ return waitcallback;
+}
+
+void PPPData::setWaitCallback(bool value) {
+ waitcallback = value;
+}
+
+const QString PPPData::command_before_connect() {
+ return readConfig(caccountgroup, BEFORE_CONNECT_KEY);
+}
+
+
+void PPPData::setCommand_before_connect(const QString &n) {
+ writeConfig(caccountgroup, BEFORE_CONNECT_KEY, n);
+}
+
+
+void PPPData::setStorePassword(bool b) {
+ writeConfig(caccountgroup, STORE_PASSWORD_KEY, (int)b);
+}
+
+
+const QString PPPData::command_on_connect() {
+ return readConfig(caccountgroup, COMMAND_KEY);
+}
+
+
+void PPPData::setCommand_on_connect(const QString &n) {
+ writeConfig(caccountgroup, COMMAND_KEY, n);
+}
+
+
+const QString PPPData::command_on_disconnect() {
+ return readConfig(caccountgroup, DISCONNECT_COMMAND_KEY);
+}
+
+
+void PPPData::setCommand_on_disconnect(const QString &n) {
+ writeConfig(caccountgroup, DISCONNECT_COMMAND_KEY, n);
+}
+
+
+const QString PPPData::command_before_disconnect() {
+ return readConfig(caccountgroup, BEFORE_DISCONNECT_KEY);
+}
+
+
+void PPPData::setCommand_before_disconnect(const QString &n) {
+ writeConfig(caccountgroup, BEFORE_DISCONNECT_KEY, n);
+}
+
+
+const QString PPPData::ipaddr() {
+ return readConfig(caccountgroup, IPADDR_KEY);
+}
+
+
+void PPPData::setIpaddr(const QString &n) {
+ writeConfig(caccountgroup, IPADDR_KEY, n);
+}
+
+
+const QString PPPData::subnetmask() {
+ return readConfig(caccountgroup, SUBNETMASK_KEY);
+}
+
+
+void PPPData::setSubnetmask(const QString &n) {
+ writeConfig(caccountgroup, SUBNETMASK_KEY, n);
+}
+
+
+bool PPPData::autoname() {
+ return (bool) readNumConfig(caccountgroup, AUTONAME_KEY, false);
+}
+
+
+void PPPData::setAutoname(bool set) {
+ writeConfig(caccountgroup, AUTONAME_KEY, (int) set);
+}
+
+
+bool PPPData::AcctEnabled() {
+ return (bool) readNumConfig(caccountgroup, ACCTENABLED_KEY, false);
+}
+
+
+void PPPData::setAcctEnabled(bool set) {
+ writeConfig(caccountgroup, ACCTENABLED_KEY, (int) set);
+}
+
+
+int PPPData::VolAcctEnabled() {
+ return readNumConfig(caccountgroup, VOLACCTENABLED_KEY, 0);
+}
+
+
+void PPPData::setVolAcctEnabled(int set) {
+ writeConfig(caccountgroup, VOLACCTENABLED_KEY, set);
+}
+
+
+const QString PPPData::gateway() {
+ return readConfig(caccountgroup, GATEWAY_KEY);
+}
+
+
+void PPPData::setGateway(const QString &n ) {
+ writeConfig(caccountgroup, GATEWAY_KEY, n);
+}
+
+
+bool PPPData::defaultroute() {
+ // default route is by default 'on'.
+ return (bool) readNumConfig(caccountgroup, DEFAULTROUTE_KEY, true);
+}
+
+
+void PPPData::setDefaultroute(bool set) {
+ writeConfig(caccountgroup, DEFAULTROUTE_KEY, (int) set);
+}
+
+
+bool PPPData::autoDNS() {
+ bool set = (bool) readNumConfig(caccountgroup, AUTODNS_KEY, true);
+ return (set && gpppdata.pppdVersionMin(2, 3, 7));
+}
+
+
+void PPPData::setAutoDNS(bool set) {
+ writeConfig(caccountgroup, AUTODNS_KEY, (int) set);
+}
+
+
+void PPPData::setExDNSDisabled(bool set) {
+ writeConfig(caccountgroup, EXDNSDISABLED_KEY, (int) set);
+}
+
+
+bool PPPData::exDNSDisabled() {
+ return (bool) readNumConfig(caccountgroup, EXDNSDISABLED_KEY,0);
+}
+
+
+QStringList &PPPData::dns() {
+ static QStringList dnslist;
+
+ readListConfig(caccountgroup, DNS_KEY, dnslist);
+ while(dnslist.count() > MAX_DNS_ENTRIES)
+ dnslist.remove(dnslist.last());
+
+ return dnslist;
+}
+
+
+void PPPData::setDns(QStringList &list) {
+ writeListConfig(caccountgroup, DNS_KEY, list);
+}
+
+
+const QString PPPData::domain() {
+ return readConfig(caccountgroup, DOMAIN_KEY);
+}
+
+
+void PPPData::setDomain(const QString &n ) {
+ writeConfig(caccountgroup, DOMAIN_KEY, n);
+}
+
+
+QStringList &PPPData::scriptType() {
+ static QStringList typelist;
+
+ readListConfig(caccountgroup, SCRIPTCOM_KEY, typelist);
+ while(typelist.count() > MAX_SCRIPT_ENTRIES)
+ typelist.remove(typelist.last());
+
+ return typelist;
+}
+
+
+void PPPData::setScriptType(QStringList &list) {
+ writeListConfig(caccountgroup, SCRIPTCOM_KEY, list);
+}
+
+
+QStringList &PPPData::script() {
+ static QStringList scriptlist;
+
+ readListConfig(caccountgroup, SCRIPTARG_KEY, scriptlist);
+ while(scriptlist.count() > MAX_SCRIPT_ENTRIES)
+ scriptlist.remove(scriptlist.last());
+
+ return scriptlist;
+}
+
+
+void PPPData::setScript(QStringList &list) {
+ writeListConfig(caccountgroup, SCRIPTARG_KEY, list);
+}
+
+
+const QString PPPData::accountingFile() {
+ return readConfig(caccountgroup, ACCTFILE_KEY);
+}
+
+
+void PPPData::setAccountingFile(const QString &n) {
+ writeConfig(caccountgroup, ACCTFILE_KEY, n);
+}
+
+
+const QString PPPData::totalCosts() {
+ return readConfig(caccountgroup, TOTALCOSTS_KEY);
+}
+
+
+void PPPData::setTotalCosts(const QString &n) {
+ writeConfig(caccountgroup, TOTALCOSTS_KEY, n);
+}
+
+
+int PPPData::totalBytes() {
+ return readNumConfig(caccountgroup, TOTALBYTES_KEY, 0);
+}
+
+void PPPData::setTotalBytes(int n) {
+ writeConfig(caccountgroup, TOTALBYTES_KEY, n);
+}
+
+
+QStringList &PPPData::pppdArgument() {
+ static QStringList arglist;
+
+ while(arglist.count() > MAX_PPPD_ARGUMENTS)
+ arglist.remove(arglist.last());
+ readListConfig(caccountgroup, PPPDARG_KEY, arglist);
+
+ return arglist;
+}
+
+
+void PPPData::setpppdArgument(QStringList &args) {
+ writeListConfig(caccountgroup, PPPDARG_KEY, args);
+}
+
+
+void PPPData::setpppdArgumentDefaults() {
+ QStringList arg;
+ setpppdArgument(arg);
+}
+
+
+// graphing widget
+void PPPData::setGraphingOptions(bool enable,
+ QColor bg,
+ QColor text,
+ QColor in,
+ QColor out)
+{
+ if(config) {
+ config->setGroup(GRAPH_GRP);
+ config->writeEntry(GENABLED, enable);
+ config->writeEntry(GCOLOR_BG, bg);
+ config->writeEntry(GCOLOR_TEXT, text);
+ config->writeEntry(GCOLOR_IN, in);
+ config->writeEntry(GCOLOR_OUT, out);
+ }
+}
+
+void PPPData::graphingOptions(bool &enable,
+ QColor &bg,
+ QColor &text,
+ QColor &in,
+ QColor &out)
+{
+ QColor c;
+
+ if(config) {
+ config->setGroup(GRAPH_GRP);
+ enable = config->readBoolEntry(GENABLED, true);
+ c = Qt::white;
+ bg = config->readColorEntry(GCOLOR_BG, &c);
+ c = Qt::black;
+ text = config->readColorEntry(GCOLOR_TEXT, &c);
+ c = Qt::blue;
+ in = config->readColorEntry(GCOLOR_IN, &c);
+ c = Qt::red;
+ out = config->readColorEntry(GCOLOR_OUT, &c);
+ }
+}
+
+
+bool PPPData::graphingEnabled() {
+ if(config) {
+ config->setGroup(GRAPH_GRP);
+ return config->readBoolEntry(GENABLED, true);
+ }
+ else return true;
+}
+
+
+
+//
+//functions to change/set the child pppd process info
+//
+bool PPPData::pppdRunning() const {
+ return pppdisrunning;
+}
+
+void PPPData::setpppdRunning(bool set) {
+ pppdisrunning = set;
+}
+
+int PPPData::pppdError() const {
+ return pppderror;
+}
+
+void PPPData::setpppdError(int err) {
+ pppderror = err;
+}
+
+
+//
+// window position
+//
+void PPPData::winPosConWin(int& p_x, int& p_y) {
+ QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ p_x = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_X, desk.center().x()-160);
+ p_y = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_Y, desk.center().y()-55);
+}
+
+void PPPData::setWinPosConWin(int p_x, int p_y) {
+ writeConfig(WINPOS_GRP, WINPOS_CONWIN_X, p_x);
+ writeConfig(WINPOS_GRP, WINPOS_CONWIN_Y, p_y);
+}
+
+void PPPData::winPosStatWin(int& p_x, int& p_y) {
+ QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ p_x = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_X, desk.center().x()-160);
+ p_y = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_Y, desk.center().y()-55);
+}
+
+void PPPData::setWinPosStatWin(int p_x, int p_y) {
+ writeConfig(WINPOS_GRP, WINPOS_STATWIN_X, p_x);
+ writeConfig(WINPOS_GRP, WINPOS_STATWIN_Y, p_y);
+}
diff --git a/kppp/pppdata.h b/kppp/pppdata.h
new file mode 100644
index 00000000..d9a77ae7
--- /dev/null
+++ b/kppp/pppdata.h
@@ -0,0 +1,513 @@
+/* -*- C++ -*-
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _PPPDATA_H_
+#define _PPPDATA_H_
+
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qcolor.h>
+
+#include "kpppconfig.h"
+
+class KConfig;
+
+// string lengths
+
+#define PATH_SIZE 120
+#define MODEMSTR_SIZE 80
+#define ACCNAME_SIZE 50
+#define PHONENUMBER_SIZE 60
+#define COMMAND_SIZE 255
+#define IPADDR_SIZE 15
+#define DOMAIN_SIZE 50
+#define TIMEOUT_SIZE 60
+
+//
+// keys for config file
+//
+
+// groups
+#define GENERAL_GRP "General"
+#define MODEM_GRP "Modem"
+#define ACCOUNT_GRP "Account"
+#define GRAPH_GRP "Graph"
+#define WINPOS_GRP "WindowPosition"
+
+// general
+#define DEFAULTACCOUNT_KEY "DefaultAccount"
+#define DEFAULTMODEM_KEY "DefaultModem"
+#define PPPDVERSION_KEY "pppdVersion"
+#define PPPDTIMEOUT_KEY "pppdTimeout"
+#define SHOWCLOCK_KEY "ShowClock"
+#define SHOWLOGWIN_KEY "ShowLogWindow"
+#define AUTOREDIAL_KEY "AutomaticRedial"
+#define DISCONNECT_KEY "DisconnectOnXServerExit"
+#define QUITONDISCONNECT_KEY "QuitOnDisconnect"
+#define NUMACCOUNTS_KEY "NumberOfAccounts"
+#define NUMMODEMS_KEY "NumberOfModems"
+#define REDIALONNOCARR_KEY "RedialOnNoCarrier"
+#define ID_KEY "ID"
+
+// modem
+#define MOD_NAME_KEY "Name"
+#define MODEMDEV_KEY "Device"
+#define LOCKFILE_KEY "UseLockFile"
+#define FLOWCONTROL_KEY "FlowControl"
+#define SPEED_KEY "Speed"
+#define TIMEOUT_KEY "Timeout"
+#define TONEDURATION_KEY "ToneDuration"
+#define BUSYWAIT_KEY "BusyWait"
+#define INITSTR_KEY "InitString"
+#define INITRESP_KEY "InitResponse"
+#define PREINITDELAY_KEY "PreInitDelay"
+#define INITDELAY_KEY "InitDelay"
+#define NODTDETECT_KEY "NoDialToneDetection"
+#define DIALTONEWAIT_KEY "WaitForDialTone"
+#define DIALSTR_KEY "DialString"
+#define CONNECTRESP_KEY "ConnectResponse"
+#define BUSYRESP_KEY "BusyResponse"
+#define NOCARRIERRESP_KEY "NoCarrierResponse"
+#define NODIALTONERESP_KEY "NoDialToneResp"
+#define HANGUPSTR_KEY "HangupString"
+#define HANGUPRESP_KEY "HangUpResponse"
+#define DLPRESP_KEY "DLPResponse"
+#define ANSWERSTR_KEY "AnswerString"
+#define RINGRESP_KEY "RingResponse"
+#define ANSWERRESP_KEY "AnswerResponse"
+#define ENTER_KEY "Enter"
+#define ESCAPESTR_KEY "EscapeString"
+#define ESCAPERESP_KEY "EscapeResponse"
+#define ESCAPEGUARDTIME_KEY "EscapeGuardTime"
+#define USECDLINE_KEY "UseCDLine"
+#define VOLUME_HIGH "VolumeHigh"
+#define VOLUME_MEDIUM "VolumeMedium"
+#define VOLUME_OFF "VolumeOff"
+#define VOLUME_KEY "Volume"
+
+// account
+#define ACC_NAME_KEY "Name"
+#define PHONENUMBER_KEY "Phonenumber"
+#define DIAL_PREFIX_KEY "DialPrefix"
+#define AUTH_KEY "Authentication"
+#define STORED_PASSWORD_KEY "Password"
+#define STORED_USERNAME_KEY "Username"
+#define STORE_PASSWORD_KEY "StorePassword"
+#define CALLBACK_TYPE_KEY "CallbackType"
+#define CALLBACK_PHONE_KEY "CallbackPhone"
+#define BEFORE_CONNECT_KEY "BeforeConnect"
+#define COMMAND_KEY "Command"
+#define DISCONNECT_COMMAND_KEY "DisconnectCommand"
+#define BEFORE_DISCONNECT_KEY "BeforeDisconnect"
+#define IPADDR_KEY "IPAddr"
+#define SUBNETMASK_KEY "SubnetMask"
+#define ACCTENABLED_KEY "AccountingEnabled"
+#define VOLACCTENABLED_KEY "VolumeAccountingEnabled"
+#define ACCTFILE_KEY "AccountingFile"
+#define AUTONAME_KEY "AutoName"
+#define GATEWAY_KEY "Gateway"
+#define DEFAULTROUTE_KEY "DefaultRoute"
+#define DOMAIN_KEY "Domain"
+#define DNS_KEY "DNS"
+#define AUTODNS_KEY "AutoDNS"
+#define EXDNSDISABLED_KEY "ExDNSDisabled"
+#define SCRIPTCOM_KEY "ScriptCommands"
+#define SCRIPTARG_KEY "ScriptArguments"
+#define PPPDARG_KEY "pppdArguments"
+#define PPP_DEBUG_OPTION "PPPDebug"
+#define ICONIFY_ON_CONNECT_KEY "iconifyOnConnect"
+#define DOCKING_KEY "DockIntoPanel"
+#define TOTALCOSTS_KEY "TotalCosts"
+#define TOTALBYTES_KEY "TotalBytes"
+
+// graph colors
+#define GENABLED "Enabled"
+#define GCOLOR_BG "Background"
+#define GCOLOR_TEXT "Text"
+#define GCOLOR_IN "InBytes"
+#define GCOLOR_OUT "OutBytes"
+
+// pppd errors
+#define E_IF_TIMEOUT 1
+#define E_PPPD_DIED 2
+#define E_CBCP_WAIT 14
+
+// window position
+#define WINPOS_CONWIN_X "WindowPositionConWinX"
+#define WINPOS_CONWIN_Y "WindowPositionConWinY"
+#define WINPOS_STATWIN_X "WindowPositionStatWinX"
+#define WINPOS_STATWIN_Y "WindowPositionStatWinY"
+
+class PPPData {
+public:
+ PPPData();
+ ~PPPData() {};
+
+ enum { NumInitStrings = 2 };
+
+ // general functions
+ bool open();
+ void save();
+ void cancel();
+ int access() const; // read/write access
+
+ // function to read/write date to configuration file
+ QString readConfig(const QString &, const QString &, const QString &);
+ int readNumConfig(const QString &, const QString &, int);
+ bool readListConfig(const QString &, const QString &,
+ QStringList &, char sep = ',');
+ void writeConfig(const QString &, const QString &, const QString &);
+ void writeConfig(const QString &, const QString &, int);
+ void writeListConfig(const QString &, const QString &,
+ QStringList &, char sep = ',');
+
+ // return the current account group
+ QString currentAccountGroup() { return caccountgroup; }
+ // return the current modem group
+ QString currentModemGroup() { return cmodemgroup; }
+
+ // functions to set/get general kppp info
+ QString password() const;
+ void setPassword(const QString &);
+
+ const QString defaultAccount();
+ void setDefaultAccount(const QString &);
+
+ const QString defaultModem();
+ void setDefaultModem(const QString &);
+
+ void set_xserver_exit_disconnect(bool set);
+ bool get_xserver_exit_disconnect();
+
+ void set_redial_on_nocarrier(bool set);
+ bool get_redial_on_nocarrier();
+
+ void setPPPDebug(bool set);
+ bool getPPPDebug();
+
+ void set_quit_on_disconnect(bool);
+ bool quit_on_disconnect();
+
+ void set_show_clock_on_caption(bool set);
+ bool get_show_clock_on_caption();
+
+ void set_show_log_window(bool set);
+ bool get_show_log_window();
+
+ void set_automatic_redial(bool set);
+ bool automatic_redial();
+
+ void set_iconify_on_connect(bool set);
+ bool get_iconify_on_connect();
+
+ void set_dock_into_panel(bool set);
+ bool get_dock_into_panel();
+
+ const QString enter();
+ void setEnter(const QString &);
+
+ QString pppdVersion();
+ bool pppdVersionMin(int ver, int mod, int patch);
+
+ int pppdTimeout();
+ void setpppdTimeout(int);
+
+ // functions to set/get account information
+ int modemCount() const;
+ bool setModem(const QString &);
+ bool setModemByIndex(int);
+
+ bool isUniqueModname(const QString &);
+
+ bool deleteModem();
+ bool deleteModem(const QString &);
+ int newmodem();
+ int copymodem(int i);
+
+ const QString modname();
+ void setModname(const QString &);
+
+
+ int busyWait();
+ void setbusyWait(int);
+
+ bool modemLockFile();
+ void setModemLockFile(bool set);
+
+ int modemEscapeGuardTime();
+ void setModemEscapeGuardTime(int i);
+
+ void setModemEscapeStr(const QString &);
+ const QString modemEscapeStr();
+
+ void setModemEscapeResp(const QString &);
+ const QString modemEscapeResp();
+
+ const QString modemDevice();
+ void setModemDevice(const QString &);
+
+ QString flowcontrol();
+ void setFlowcontrol(const QString &);
+
+ int modemTimeout();
+ void setModemTimeout(int);
+
+ int modemToneDuration();
+ void setModemToneDuration(int);
+
+ QString volumeInitString();
+ int volume();
+ void setVolume(int);
+
+ int waitForDialTone();
+ void setWaitForDialTone(int i);
+
+ // modem command strings/responses
+ const QString modemInitStr(int i);
+ void setModemInitStr(int i, const QString &);
+
+ const QString modemInitResp();
+ void setModemInitResp(const QString &);
+
+ int modemPreInitDelay();
+ void setModemPreInitDelay(int);
+
+ int modemInitDelay();
+ void setModemInitDelay(int);
+
+ QString modemNoDialToneDetectionStr();
+ void setModemNoDialToneDetectionStr(const QString &);
+
+ const QString modemDialStr();
+ void setModemDialStr(const QString &);
+
+ const QString modemConnectResp();
+ void setModemConnectResp(const QString &);
+
+ const QString modemBusyResp();
+ void setModemBusyResp(const QString &);
+
+ const QString modemNoCarrierResp();
+ void setModemNoCarrierResp(const QString &);
+
+ const QString modemNoDialtoneResp();
+ void setModemNoDialtoneResp(const QString &);
+
+ const QString modemHangupStr();
+ void setModemHangupStr(const QString &);
+
+ const QString modemHangupResp();
+ void setModemHangupResp(const QString &);
+
+ QString modemDLPResp();
+ void setModemDLPResp(const QString &);
+
+ const QString modemAnswerStr();
+ void setModemAnswerStr(const QString &);
+
+ const QString modemRingResp();
+ void setModemRingResp(const QString &);
+
+ const QString modemAnswerResp();
+ void setModemAnswerResp(const QString &);
+
+ QString volumeOff();
+ void setVolumeOff(const QString &);
+
+ QString volumeMedium();
+ void setVolumeMedium(const QString &);
+
+ QString volumeHigh();
+ void setVolumeHigh(const QString &);
+
+#if 0
+ void setUseCDLine(const int n);
+ int UseCDLine();
+#endif
+
+ // functions to set/get account information
+ int accountCount() const;
+ bool setAccount(const QString &);
+ bool setAccountByIndex(int);
+
+ bool isUniqueAccname(const QString &);
+
+ bool deleteAccount();
+ bool deleteAccount(const QString &);
+ int newaccount();
+ int copyaccount(int i);
+
+ const QString accname();
+ void setAccname(const QString &);
+
+ QStringList &phonenumbers();
+ const QString phonenumber();
+ void setPhonenumber(const QString &);
+
+ const QString dialPrefix();
+ void setDialPrefix(const QString &);
+
+ int authMethod();
+ void setAuthMethod(int);
+
+ const QString storedUsername();
+ void setStoredUsername(const QString &);
+
+ const QString storedPassword();
+ void setStoredPassword(const QString &);
+
+ bool storePassword();
+ void setStorePassword(bool);
+
+ int callbackType();
+ void setCallbackType(int);
+
+ QString callbackPhone();
+ void setCallbackPhone(const QString &);
+
+ bool waitCallback();
+ void setWaitCallback(bool);
+
+ const QString speed();
+ void setSpeed(const QString &);
+
+ const QString command_before_connect();
+ void setCommand_before_connect(const QString &);
+
+ const QString command_on_connect();
+ void setCommand_on_connect(const QString &);
+
+ const QString command_on_disconnect();
+ void setCommand_on_disconnect(const QString &);
+
+ const QString command_before_disconnect();
+ void setCommand_before_disconnect(const QString &);
+
+ const QString ipaddr();
+ void setIpaddr(const QString &);
+
+ const QString subnetmask();
+ void setSubnetmask(const QString &);
+
+ bool AcctEnabled();
+ void setAcctEnabled(bool set);
+
+ int VolAcctEnabled();
+ void setVolAcctEnabled(int set);
+
+ bool autoDNS();
+ void setAutoDNS(bool set);
+
+ bool exDNSDisabled();
+ void setExDNSDisabled(bool set);
+
+ bool autoname();
+ void setAutoname(bool set);
+
+ const QString gateway();
+ void setGateway(const QString &);
+
+ bool defaultroute();
+ void setDefaultroute(bool set);
+
+ QStringList &dns();
+ void setDns(QStringList &);
+
+ const QString domain();
+ void setDomain(const QString &);
+
+ QStringList &scriptType();
+ void setScriptType(QStringList &);
+
+ QStringList &script();
+ void setScript(QStringList &);
+
+ QStringList &pppdArgument();
+ void setpppdArgumentDefaults();
+ void setpppdArgument(QStringList &);
+
+ //functions to change/set the child pppd process info
+ bool pppdRunning() const;
+ void setpppdRunning(bool set);
+
+ int pppdError() const;
+ void setpppdError(int err);
+
+ // functions to set/query the accounting info
+ const QString accountingFile();
+ void setAccountingFile(const QString &);
+
+ const QString totalCosts();
+ void setTotalCosts(const QString &);
+
+ int totalBytes();
+ void setTotalBytes(int);
+
+ // graphing widget
+ void setGraphingOptions(bool enabled,
+ QColor bg,
+ QColor text,
+ QColor in,
+ QColor out);
+ void graphingOptions(bool &enabled,
+ QColor &bg,
+ QColor &text,
+ QColor &in,
+ QColor &out);
+ bool graphingEnabled();
+
+ // window positions
+ void winPosConWin(int &, int &);
+ void setWinPosConWin(int, int);
+ void winPosStatWin(int &, int &);
+ void setWinPosStatWin(int, int);
+
+private:
+ QString passwd;
+ KConfig* config; // configuration object
+ int accounthighcount; // index of highest account
+ int caccount; // index of the current account
+ int modemhighcount; // index of highest modem
+ int cmodem; // index of the current modem
+ QString cmodemgroup; // name of current modem group
+ QString caccountgroup; // name of current account group
+ pid_t suidprocessid; // process ID of setuid child
+ bool pppdisrunning; // pppd process
+ // daemon
+ int pppderror; // error encounterd running pppd
+ int pppdVer, pppdMod, pppdPatch; // pppd version
+ bool waitcallback; // callback waiting flag
+
+ QStringList phonelist;
+};
+
+extern PPPData gpppdata;
+
+#endif
diff --git a/kppp/ppplog.cpp b/kppp/ppplog.cpp
new file mode 100644
index 00000000..76b0903b
--- /dev/null
+++ b/kppp/ppplog.cpp
@@ -0,0 +1,285 @@
+/*
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * (c) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <qlabel.h>
+#include <qdir.h>
+#include <qpushbutton.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+#include <qdialog.h>
+#include <qregexp.h>
+#include <qmultilineedit.h>
+#include <qlayout.h>
+
+#include <kbuttonbox.h>
+#include <kmessagebox.h>
+
+#include "pppdata.h"
+#include "requester.h"
+#include <klocale.h>
+
+
+int PPPL_MakeLog(QStringList &list) {
+ int pid = -1, newpid;
+ char buffer[1024], *p;
+ const char *pidp;
+ int fd;
+
+ fd = Requester::rq->openSysLog();
+ if(fd < 0) {
+ list.append(i18n("Cannot open any of the following logfiles:"));
+ const char * const * logFile = &kppp_syslog[0];
+ while(*logFile) {
+ list.append(*logFile);
+ logFile++;
+ }
+ return 1;
+ }
+
+ FILE *f = fdopen(fd, "r");
+ while(fgets(buffer, sizeof(buffer), f) != 0) {
+ // pppd line ?
+ p = (char *)strstr(buffer, "pppd[");
+ if(p == 0)
+ continue;
+ pidp = p += strlen("pppd[");
+ while(*p && isdigit(*p))
+ p++;
+ if(*p != ']')
+ continue;
+
+ /* find out pid of pppd */
+ sscanf(pidp, "%d", &newpid);
+ if(newpid != pid) {
+ pid = newpid;
+ list.clear();
+ }
+ if(buffer[strlen(buffer)-1] == '\n')
+ buffer[strlen(buffer)-1] = '\0';
+ list.append(buffer);
+ }
+ close(fd);
+
+ if(list.isEmpty())
+ return 2;
+
+ /* clear security related info */
+
+ const char *keyword[] = {"name = \"",
+ "user=\"",
+ "password=\"",
+ 0};
+
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ {
+ QCString tmp = (*it).local8Bit();
+ for(int j = 0; keyword[j] != 0; j++) {
+ char *p;
+
+ if( (p = (char *)strstr(tmp.data(), keyword[j])) != 0) {
+ p += strlen(keyword[j]);
+ while(*p && *p != '"')
+ *p++ = 'X';
+ }
+ }
+
+ }
+
+ return 0;
+}
+
+
+void PPPL_AnalyseLog(QStringList &list, QStringList &result) {
+ QString msg;
+ const char *rmsg = "Remote message: ";
+
+ result.clear();
+
+ // setup the analysis database
+ struct {
+ const char *regexp;
+ const char *answer;
+ } hints[] = {
+ {"Receive serial link is not 8-bit clean",
+ I18N_NOOP("You have launched pppd before the remote server " \
+ "was ready to establish a PPP connection.\n"
+ "Please use the terminal-based login to verify") },
+
+ {"Serial line is looped back",
+ I18N_NOOP("You haven't started the PPP software on the peer system.") },
+
+ {"AP authentication failed",
+ I18N_NOOP("Check that you supplied the correct username and password.")} ,
+
+ {"is locked by pid",
+ I18N_NOOP("You shouldn't pass 'lock' as an argument to pppd. "
+ "Check /etc/ppp/options and ~/.ppprc") },
+
+ {"CP: timeout sending",
+ I18N_NOOP("The remote system does not seem to answer to\n"
+ "configuration request. Contact your provider.") },
+
+ {"unrecognized option",
+ I18N_NOOP("You have passed an invalid option to pppd. See 'man pppd' "
+ "for a complete list of valid arguments.") },
+
+ // terminator
+ {0,0}
+ };
+
+
+ // scan the log for keywords and try to offer any help
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ {
+ // look for remote message
+ int pos = (*it).find(rmsg);
+ if (pos != -1)
+ {
+ QString str = (*it);
+ str.remove(0, pos + strlen(rmsg));
+ if(!str.isEmpty()) {
+ msg = i18n("Notice that the remote system has sent the following"
+ " message:\n\"%1\"\nThis may give you a hint why the"
+ " the connection has failed.").arg(str);
+ result.append(msg);
+ }
+ }
+
+ // check in the hint database
+ for(uint k = 0; hints[k].regexp != 0; k++) {
+ QRegExp rx(hints[k].regexp);
+ QString l(*it);
+ if(l.contains(rx)) {
+ result.append(i18n(hints[k].answer));
+ break;
+ }
+ }
+ }
+
+ if (result.isEmpty())
+ result.append(i18n("Unable to provide help."));
+}
+
+
+void PPPL_ShowLog() {
+ QStringList sl, result;
+
+ PPPL_MakeLog(sl);
+
+ bool foundConnect = false;
+ bool foundLCP = gpppdata.getPPPDebug();
+ QString lcp = QString::fromLatin1("[LCP");
+ QString conn = QString::fromLatin1("Connect:");
+ QStringList::ConstIterator it = sl.begin();
+ for( ; it != sl.end(); it++) {
+ if((*it).find(lcp) >= 0) {
+ foundLCP = true;
+ break;
+ }
+ if((*it).find(conn) >= 0)
+ foundConnect = true;
+ }
+ if(foundConnect && !foundLCP) {
+ int result = KMessageBox::warningYesNo(0,
+ i18n("KPPP could not prepare a PPP log. It's very likely "
+ "that pppd was started without the \"debug\" option.\n"
+ "Without this option it's difficult to find out PPP "
+ "problems, so you should turn on the debug option.\n"
+ "Shall I turn it on now?"), QString::null, i18n("Restart pppd"), i18n("Do Not Restart"));
+
+ if(result == KMessageBox::Yes) {
+ gpppdata.setPPPDebug(TRUE);
+ KMessageBox::information(0,
+ i18n("The \"debug\" option has been added. You "
+ "should now try to reconnect. If that fails "
+ "again, you will get a PPP log that may help "
+ "you to track down the connection problem."));
+ // return;
+ }
+
+ // return;
+ }
+
+ PPPL_AnalyseLog(sl, result);
+
+ QDialog *dlg = new QDialog(0, "", TRUE);
+
+ dlg->setCaption(i18n("PPP Log"));
+ QVBoxLayout *tl = new QVBoxLayout(dlg, 10, 10);
+ QMultiLineEdit *edit = new QMultiLineEdit(dlg);
+ edit->setReadOnly(TRUE);
+ QLabel *label = new QLabel(i18n("kppp's diagnosis (just guessing):"), dlg);
+ QMultiLineEdit *diagnosis = new QMultiLineEdit(dlg);
+ diagnosis->setReadOnly(TRUE);
+ KButtonBox *bbox = new KButtonBox(dlg);
+ bbox->addStretch(1);
+ QPushButton *write = bbox->addButton(i18n("Write to File"));
+ QPushButton *close = bbox->addButton(KStdGuiItem::close());
+ bbox->layout();
+ edit->setMinimumSize(600, 250);
+ label->setMinimumSize(600, 15);
+ diagnosis->setMinimumSize(600, 60);
+
+ tl->addWidget(edit, 1);
+ tl->addWidget(label);
+ tl->addWidget(diagnosis, 1);
+ tl->addWidget(bbox);
+ dlg->setFixedSize(dlg->sizeHint());
+
+ for(uint i = 0; i < sl.count(); i++)
+ edit->append(*sl.at(i));
+ for(uint i = 0; i < result.count(); i++)
+ diagnosis->append(*result.at(i));
+
+ dlg->connect(close, SIGNAL(clicked()),
+ dlg, SLOT(reject()));
+ dlg->connect(write, SIGNAL(clicked()),
+ dlg, SLOT(accept()));
+
+ if(dlg->exec()) {
+ QDir d = QDir::home();
+ QString s = d.absPath() + "/PPP-logfile";
+ int old_umask = umask(0077);
+
+ FILE *f = fopen(QFile::encodeName(s), "w");
+ for(uint i = 0; i < sl.count(); i++)
+ fprintf(f, "%s\n", (*sl.at(i)).local8Bit().data());
+ fclose(f);
+ umask(old_umask);
+
+ QString msg = i18n("The PPP log has been saved\nas \"%1\"!\n\nIf you want to send a bug report, or have\nproblems connecting to the Internet, please\nattach this file. It will help the maintainers\nto find the bug and to improve KPPP").arg(s);
+ KMessageBox::information(0, msg);
+ }
+ delete dlg;
+}
diff --git a/kppp/ppplog.h b/kppp/ppplog.h
new file mode 100644
index 00000000..5de9484b
--- /dev/null
+++ b/kppp/ppplog.h
@@ -0,0 +1,40 @@
+/*
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * (c) 1998 Mario Weilguni <mweilguni@kde.org>
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PPPL__H__
+#define __PPPL__H__
+
+class QStringList;
+
+int PPPL_MakeLog(QStringList &list);
+void PPPL_AnalyseLog(QStringList &list, QStringList &result);
+void PPPL_ShowLog();
+
+#endif
+
diff --git a/kppp/pppstatdlg.cpp b/kppp/pppstatdlg.cpp
new file mode 100644
index 00000000..d466f305
--- /dev/null
+++ b/kppp/pppstatdlg.cpp
@@ -0,0 +1,428 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#include <qlayout.h>
+#include <qpainter.h>
+#include <kwin.h>
+#include <kiconloader.h>
+#include <kapplication.h>
+#include <klocale.h>
+#include <qlabel.h>
+#include <qframe.h>
+#include <qgroupbox.h>
+#include <qlineedit.h>
+#include <qtimer.h>
+#include <kpushbutton.h>
+#include <kstdguiitem.h>
+
+#include "pppdata.h"
+#include "pppstatdlg.h"
+#include "iplined.h"
+#include "pppstats.h"
+
+extern PPPData gpppdata;
+
+PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *,
+ PPPStats *st)
+ : QWidget(parent, name, 0),
+ stats(st)
+{
+ int i;
+ max = 1024;
+
+ setCaption(i18n("kppp Statistics"));
+ KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
+
+ QVBoxLayout *tl = new QVBoxLayout(this, 10);
+ QGridLayout *l1 = new QGridLayout(4, 4);
+ tl->addLayout(l1, 1);
+ box = new QGroupBox(i18n("Statistics"), this);
+ l1->addMultiCellWidget(box, 0, 3, 0, 3);
+ l1->addRowSpacing(0, fontMetrics().lineSpacing() - 10);
+ l1->setRowStretch(1, 1);
+ l1->setColStretch(1, 1);
+
+ // inner part of the grid
+ QVBoxLayout *l11 = new QVBoxLayout;
+ l1->addLayout(l11, 1, 1);
+
+ // modem pixmap and IP labels
+ QHBoxLayout *l111 = new QHBoxLayout;
+ l11->addLayout(l111);
+
+ big_modem_both_pixmap = UserIcon("modemboth");
+ big_modem_left_pixmap = UserIcon("modemleft");
+ big_modem_right_pixmap = UserIcon("modemright");
+ big_modem_none_pixmap = UserIcon("modemnone");
+
+ pixmap_l = new QLabel(this);
+ pixmap_l->setMinimumSize(big_modem_both_pixmap.size());
+ l111->addWidget(pixmap_l, 1);
+ pixmap_l->setAlignment(AlignVCenter|AlignLeft);
+
+ QGridLayout *l1112 = new QGridLayout(3, 2);
+ l111->addLayout(l1112);
+
+ ip_address_label1 = new QLabel(this);
+ ip_address_label1->setText(i18n("Local Addr:"));
+
+ ip_address_label2 = new IPLineEdit(this);
+ ip_address_label2->setFocusPolicy(QWidget::NoFocus);
+
+ ip_address_label3 = new QLabel(this);
+ ip_address_label3->setText(i18n("Remote Addr:"));
+
+ ip_address_label4 = new IPLineEdit(this);
+ ip_address_label4->setFocusPolicy(QWidget::NoFocus);
+
+ l1112->addWidget(ip_address_label1, 0, 0);
+ l1112->addWidget(ip_address_label2, 0, 1);
+ l1112->addWidget(ip_address_label3, 1, 0);
+ l1112->addWidget(ip_address_label4, 1, 1);
+
+ // consumes space on bottom
+ l1112->setRowStretch(2, 1);
+
+ QGridLayout *l112 = new QGridLayout(5, 4);
+ l11->addLayout(l112);
+ for(i =0 ; i < 5; i++) {
+ labela1[i] = new QLabel(this);
+
+ labela2[i] = new QLabel(this);
+ labela2[i]->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+
+ labelb1[i] = new QLabel(this);
+
+ labelb2[i] = new QLabel(this);
+ labelb2[i]->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ }
+
+ labela1[0]->setText(i18n("bytes in"));
+ labelb1[0]->setText(i18n("bytes out"));
+
+ labela1[1]->setText(i18n("packets in"));
+ labelb1[1]->setText(i18n("packets out"));
+
+ labela1[2]->setText(i18n("vjcomp in"));
+ labelb1[2]->setText(i18n("vjcomp out"));
+
+ labela1[3]->setText(i18n("vjunc in"));
+ labelb1[3]->setText(i18n("vjunc out"));
+
+ labela1[4]->setText(i18n("vjerr"));
+ labelb1[4]->setText(i18n("non-vj"));
+
+ for(i = 0; i < 5; i++) {
+ labela2[i]->setText("888888888"); // TODO: resize automatically
+ labelb2[i]->setText("888888888");
+ labela2[i]->setAlignment(Qt::AlignRight);
+ labelb2[i]->setAlignment(Qt::AlignRight);
+ labela2[i]->setFixedSize(labela2[i]->sizeHint());
+ labelb2[i]->setFixedSize(labelb2[i]->sizeHint());
+ labela2[i]->setText("");
+ labelb2[i]->setText("");
+
+ // add to layout
+ l112->addWidget(labela1[i], i, 0);
+ l112->addWidget(labela2[i], i, 1);
+ l112->addWidget(labelb1[i], i, 2);
+ l112->addWidget(labelb2[i], i, 3);
+ }
+
+ l112->setColStretch(1, 1);
+ l112->setColStretch(3, 1);
+
+ tl->addSpacing(5);
+ QHBoxLayout *l12 = new QHBoxLayout;
+ tl->addLayout(l12);
+ l12->addStretch(1);
+
+ if(gpppdata.graphingEnabled()) {
+ bool dummy;
+
+ gpppdata.graphingOptions(dummy, bg, text, in, out);
+
+ graph = new QFrame(this);
+ graph->setFrameStyle(QFrame::Box | QFrame::Sunken);
+ l1->addMultiCellWidget(graph, 2, 2, 1, 2);
+ graph->setMinimumWidth(300);
+ graph->setFixedHeight(76+4);
+ graph->setBackgroundColor(bg);
+ }
+
+ cancelbutton = new KPushButton(KStdGuiItem::close(),this, "cancelbutton");
+ cancelbutton->setFocus();
+ connect(cancelbutton, SIGNAL(clicked()), this,SLOT(cancel()));
+ cancelbutton->setFixedHeight(cancelbutton->sizeHint().height());
+ cancelbutton->setMinimumWidth(QMAX(cancelbutton->sizeHint().width(), 70));
+ l12->addWidget(cancelbutton);
+
+ if(gpppdata.graphingEnabled()) {
+ graphTimer = new QTimer(this);
+ connect(graphTimer, SIGNAL(timeout()), SLOT(updateGraph()));
+ }
+
+ setFixedSize(sizeHint());
+
+ connect(stats, SIGNAL(statsChanged(int)), SLOT(paintIcon(int)));
+
+ // read window position from config file
+ int p_x, p_y;
+ gpppdata.winPosStatWin(p_x, p_y);
+ move(p_x, p_y);
+}
+
+
+PPPStatsDlg::~PPPStatsDlg() {
+}
+
+
+// save window position when window was closed
+bool PPPStatsDlg::event(QEvent *e) {
+ if (e->type() == QEvent::Hide)
+ {
+ gpppdata.setWinPosStatWin(x(), y());
+ return true;
+ }
+ else
+ return QWidget::event(e);
+}
+
+void PPPStatsDlg::cancel() {
+ hide();
+}
+
+
+void PPPStatsDlg::take_stats() {
+ stats->initStats();
+ bin_last = stats->ibytes;
+ bout_last = stats->obytes;
+ ringIdx = 0;
+ for(int i = 0; i < MAX_GRAPH_WIDTH; i++) {
+ bin[i] = -1;
+ bout[i] = -1;
+ }
+
+ update_data();
+
+ stats->start();
+ if(gpppdata.graphingEnabled())
+ graphTimer->start(GRAPH_UPDATE_TIME);
+}
+
+
+void PPPStatsDlg::stop_stats() {
+ stats->stop();
+ if(gpppdata.graphingEnabled())
+ graphTimer->stop();
+}
+
+void PPPStatsDlg::paintGraph() {
+ // why draw that stuff if not visible?
+ if(!isVisible())
+ return;
+
+ QPixmap pm(graph->width() - 4, graph->height() - 4);
+ QPainter p;
+ pm.fill(graph->backgroundColor());
+ p.begin(&pm);
+
+ int x;
+ int idx = ringIdx - pm.width() + 1;
+ if(idx < 0)
+ idx += MAX_GRAPH_WIDTH;
+
+ // find good scaling factor
+ int last_h_in =
+ pm.height() - (int)((float)bin[idx]/max * (pm.height() - 8))-1;
+ int last_h_out =
+ pm.height() - (int)((float)bout[idx]/max * (pm.height() - 8))-1;
+
+ // plot data
+ int last_idx = 0;
+ for(x = 1; x < pm.width(); x++) {
+ int h_in, h_out;
+
+ h_in = pm.height() - (int)((float)bin[idx]/max * (pm.height() - 8))-1;
+ h_out = pm.height() - (int)((float)bout[idx]/max * (pm.height() - 8))-1;
+
+ p.setPen(out);
+ if(bout[idx]!=-1)
+ p.drawLine(x-1, last_h_out, x, h_out);
+ p.setPen(in);
+ if(bin[idx]!=-1)
+ p.drawLine(x-1, last_h_in, x, h_in);
+ last_h_in = h_in;
+ last_h_out = h_out;
+
+ last_idx = idx;
+ idx = (idx + 1) % MAX_GRAPH_WIDTH;
+ }
+
+ // take last value
+ int last_max = bin[last_idx]>bout[last_idx] ? bin[last_idx] : bout[last_idx];
+
+ // plot scale line
+ p.setPen(text);
+ p.setFont(QFont(KGlobalSettings::fixedFont().family(), 8));
+
+ QRect r;
+ QString s = i18n("%1 (max. %2) kb/sec")
+ .arg(KGlobal::locale()->formatNumber((float)last_max / 1024.0, 1))
+ .arg(KGlobal::locale()->formatNumber((float)max / 1024.0, 1));
+ p.drawText(0, 0, pm.width(), 2*8, AlignRight|AlignVCenter, s, -1, &r);
+ p.drawLine(0, 8, r.left() - 8, 8);
+
+ p.end();
+ bitBlt(graph, 2, 2, &pm, 0, 0, pm.width(), pm.height(), CopyROP);
+}
+
+void PPPStatsDlg::updateGraph() {
+ bin[ringIdx] = stats->ibytes - bin_last;
+ bout[ringIdx] = stats->obytes - bout_last;
+ if(bin[ringIdx] > max)
+ max = ((bin[ringIdx] / 1024) + 1) * 1024;
+
+ if(bout[ringIdx] > max)
+ max = ((bout[ringIdx] / 1024) + 1) * 1024;
+
+ bin_last = stats->ibytes;
+ bout_last = stats->obytes;
+ ringIdx = (ringIdx + 1) % MAX_GRAPH_WIDTH;
+ paintGraph();
+}
+
+
+void PPPStatsDlg::paintEvent (QPaintEvent *) {
+ paintIcon(PPPStats::BytesNone); // correct ?
+ if(gpppdata.graphingEnabled())
+ paintGraph();
+}
+
+
+void PPPStatsDlg::paintIcon(int status) {
+
+ const QPixmap *pixmap;
+
+ switch(status)
+ {
+ case PPPStats::BytesIn:
+ pixmap = &big_modem_left_pixmap;
+ break;
+ case PPPStats::BytesOut:
+ pixmap = &big_modem_right_pixmap;
+ break;
+ case PPPStats::BytesBoth:
+ pixmap = &big_modem_both_pixmap;
+ break;
+ case PPPStats::BytesNone:
+ default:
+ pixmap = &big_modem_none_pixmap;
+ break;
+ }
+
+ bitBlt(pixmap_l, 0, 0, pixmap);
+
+ update_data();
+}
+
+
+void PPPStatsDlg::timeclick() {
+ // volume accounting
+ switch(gpppdata.VolAcctEnabled()) {
+ case 0: // no accounting
+ break;
+
+ case 1: // bytes in
+ stats->totalbytes = gpppdata.totalBytes() + stats->ibytes;
+ break;
+
+ case 2:
+ stats->totalbytes = gpppdata.totalBytes() + stats->obytes;
+ break;
+
+ case 3:
+ stats->totalbytes = gpppdata.totalBytes() + stats->ibytes + stats->obytes;
+ break;
+ }
+}
+
+
+void PPPStatsDlg::closeEvent(QCloseEvent *) {
+ emit cancel();
+}
+
+
+void PPPStatsDlg::update_data() {
+ timeclick();
+
+ ibytes_string = KGlobal::locale()->formatNumber(stats->ibytes, 0);
+ ipackets_string.setNum(stats->ipackets);
+ compressedin_string.setNum(stats->compressedin);
+ uncompressedin_string.setNum(stats->uncompressedin);
+ errorin_string.setNum(stats->errorin);
+ obytes_string = KGlobal::locale()->formatNumber(stats->obytes, 0);
+ opackets_string.setNum(stats->opackets);
+ compressed_string.setNum(stats->compressed);
+ packetsunc_string.setNum(stats->packetsunc);
+ packetsoutunc_string.setNum(stats->packetsoutunc);
+
+ labela2[0]->setText(ibytes_string);
+ labela2[1]->setText(ipackets_string);
+ labela2[2]->setText(compressedin_string);
+ labela2[3]->setText(uncompressedin_string);
+ labela2[4]->setText(errorin_string);
+
+ labelb2[0]->setText(obytes_string);
+ labelb2[1]->setText(opackets_string);
+ labelb2[2]->setText(compressed_string);
+ labelb2[3]->setText(packetsunc_string);
+ labelb2[4]->setText(packetsoutunc_string);
+
+ // if I don't resort to this trick it is imposible to
+ // copy/paste the ip out of the lineedits due to
+ // reset of cursor position on setText()
+ QString local_addr = ( stats->local_ip_address.isEmpty() ?
+ i18n("unavailable") :
+ stats->local_ip_address );
+
+ if( ip_address_label2->text() != local_addr )
+ ip_address_label2->setText(local_addr);
+
+ QString remote_addr = ( stats->remote_ip_address.isEmpty() ?
+ i18n("unavailable") :
+ stats->remote_ip_address );
+
+ if( ip_address_label4->text() != remote_addr )
+ ip_address_label4->setText(remote_addr);
+}
+
+
+void PPPStatsDlg::toCurrentDesktop() {
+ KWin::setOnDesktop(winId(), KWin::currentDesktop());
+}
+
+#include "pppstatdlg.moc"
+
diff --git a/kppp/pppstatdlg.h b/kppp/pppstatdlg.h
new file mode 100644
index 00000000..cb80cc96
--- /dev/null
+++ b/kppp/pppstatdlg.h
@@ -0,0 +1,131 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _PPPSTATSDLG_H_
+#define _PPPSTATSDLG_H_
+
+
+#include <qdialog.h>
+#include <qevent.h>
+#include <qpixmap.h>
+
+class QLabel;
+class QFrame;
+class QGroupBox;
+class QLineEdit;
+class QTimer;
+class QPushButton;
+
+const int MAX_GRAPH_WIDTH = 600;
+const int GRAPH_UPDATE_TIME = 1000;
+
+class PPPStats;
+
+class PPPStatsDlg : public QWidget {
+
+ Q_OBJECT
+
+public:
+
+ PPPStatsDlg(QWidget *parent, const char *name,QWidget *main,
+ PPPStats *st);
+ ~PPPStatsDlg();
+
+protected:
+
+ void closeEvent( QCloseEvent *e );
+ void paintEvent (QPaintEvent *e) ;
+ bool event( QEvent *e );
+
+public slots:
+
+ void timeclick();
+ void cancel();
+ void take_stats();
+ void stop_stats();
+ void paintIcon(int);
+ void updateGraph();
+
+public:
+
+ void update_data();
+ void toCurrentDesktop();
+
+private:
+ void paintGraph();
+ PPPStats *stats;
+
+ QLabel *pixmap_l;
+ QWidget *main;
+ QPushButton *cancelbutton;
+
+ QLabel *labela1[5];
+ QLabel *labela2[5];
+ QLabel *labelb1[5];
+ QLabel *labelb2[5];
+
+ QLabel *ip_address_label1;
+ QLineEdit *ip_address_label2;
+ QLabel *ip_address_label3;
+ QLineEdit *ip_address_label4;
+
+ QLabel *modem_pic_label;
+ QPixmap modem_pixmap;
+ QPixmap modem_left_pixmap;
+ QPixmap modem_right_pixmap;
+ QPixmap modem_both_pixmap;
+ QPixmap big_modem_both_pixmap;
+ QPixmap big_modem_left_pixmap;
+ QPixmap big_modem_right_pixmap;
+ QPixmap big_modem_none_pixmap;
+
+ int ibytes_last;
+ int obytes_last;
+ bool need_to_paint;
+
+ QString ibytes_string;
+ QString ipackets_string;
+ QString compressedin_string;
+ QString uncompressedin_string;
+ QString errorin_string;
+ QString obytes_string;
+ QString opackets_string;
+ QString compressed_string;
+ QString packetsunc_string;
+ QString packetsoutunc_string;
+ QGroupBox *box;
+
+ // graph widget
+ QFrame *graph;
+ int bin[MAX_GRAPH_WIDTH];
+ int bout[MAX_GRAPH_WIDTH];
+ int bin_last;
+ int bout_last;
+ int ringIdx;
+ int max;
+ QTimer *graphTimer;
+ QColor bg, text, in, out;
+};
+
+#endif
diff --git a/kppp/pppstats.cpp b/kppp/pppstats.cpp
new file mode 100644
index 00000000..b5199e60
--- /dev/null
+++ b/kppp/pppstats.cpp
@@ -0,0 +1,343 @@
+/*
+ *
+ * $Id$
+ *
+ * History:
+ *
+ * Bernd Wuebben, wuebben@math.cornell.edu:
+ *
+ * Much of this is taken from the pppd sources in particular
+ * /pppstat/pppstat.c, and modified to suit the needs of kppp.
+ *
+ *
+ * Here the original history of pppstat.c:
+ *
+ * perkins@cps.msu.edu: Added compression statistics and alternate
+ * display. 11/94
+ *
+ * Brad Parker (brad@cayman.com) 6/92
+ *
+ * from the original "slstats" by Van Jaconson
+ *
+ * Copyright (c) 1989 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
+ * - Initial distribution.
+ */
+
+
+#include <config.h>
+
+#include <ctype.h>
+#include <errno.h>
+
+#include <stdio.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <string.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#ifdef __DragonFly__
+#include <net/ppp_layer/ppp_defs.h>
+#else
+#include <net/ppp_defs.h>
+#endif
+
+#include "config.h"
+#include "pppstats.h"
+
+#ifndef STREAMS
+ #if defined(__linux__) && defined(__powerpc__) \
+ && (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)
+ /* kludge alert! */
+ #undef __GLIBC__
+ #endif
+ #include <sys/socket.h> /* *BSD, Linux, NeXT, Ultrix etc. */
+ #ifndef HAVE_NET_IF_PPP_H
+ #ifdef HAVE_LINUX_IF_PPP_H
+ #include <linux/if.h>
+ #include <linux/if_ppp.h>
+ #elif defined(__DragonFly__)
+ #include <net/if.h>
+ #include <net/ppp/if_ppp.h>
+ #endif
+ #else
+ #include <net/if.h>
+ #include <net/if_ppp.h>
+ #endif
+
+#else /* STREAMS */
+ #include <sys/socket.h>
+ #include <sys/stropts.h> /* SVR4, Solaris 2, SunOS 4, OSF/1, etc. */
+ #include <net/ppp_defs.h>
+ #include <net/pppio.h>
+ #include <net/if.h>
+ #include <sys/sockio.h>
+
+#endif /* STREAMS */
+
+#include <qtimer.h>
+#include <kdebug.h>
+
+PPPStats::PPPStats()
+{
+ clear();
+ timer = new QTimer;
+ connect(timer, SIGNAL(timeout()), SLOT(timerClick()));
+}
+
+
+PPPStats::~PPPStats() {
+ stop();
+ delete timer;
+}
+
+
+void PPPStats::clear()
+{
+ ibytes = 0;
+ ipackets = 0;
+ ibytes_last = 0;
+ obytes_last = 0;
+ compressedin = 0;
+ uncompressedin = 0;
+ errorin = 0;
+ obytes = 0;
+ opackets = 0;
+ compressed = 0;
+ packetsunc = 0;
+ packetsoutunc = 0;
+ ioStatus = BytesNone;
+}
+
+void PPPStats::timerClick() {
+ enum IOStatus newStatus;
+
+ doStats();
+
+ if((ibytes != ibytes_last) && (obytes != obytes_last))
+ newStatus = BytesBoth;
+ else if(ibytes != ibytes_last)
+ newStatus = BytesIn;
+ else if(obytes != obytes_last)
+ newStatus = BytesOut;
+ else
+ newStatus = BytesNone;
+
+ if(newStatus != ioStatus)
+ emit statsChanged(ioStatus = newStatus);
+
+ ibytes_last = ibytes;
+ obytes_last = obytes;
+}
+
+void PPPStats::setUnit(int u) {
+ unit = u;
+ sprintf(unitName, "ppp%d", unit);
+}
+
+
+void PPPStats::start() {
+ timer->start(PPP_STATS_INTERVAL);
+}
+
+
+void PPPStats::stop() {
+ emit statsChanged(BytesNone);
+ timer->stop();
+}
+
+
+bool PPPStats::ifIsUp() {
+ bool is_up;
+ struct ifreq ifr;
+
+#if defined(__svr4__ )
+ usleep(1000000); // Needed for Solaris ?!
+#endif
+
+#ifdef STREAMS
+ if ((t = open("/dev/ppp", O_RDONLY)) < 0) {
+ perror("pppstats: Couldn't open /dev/ppp: ");
+ return false;
+ }
+ if (!strioctl(t, PPPIO_ATTACH, (char*)&unit, sizeof(int), 0)) {
+ fprintf(stderr, "pppstats: ppp%d is not available\n", unit);
+ ::close(t);
+ return false;
+ }
+ // TODO: close t somewhere again
+#endif
+ if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+ perror("Couldn't create IP socket");
+ return false;
+ }
+
+ strlcpy(ifr.ifr_name, unitName, sizeof(ifr.ifr_name));
+
+ if(ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) {
+ if (errno)
+ fprintf(stderr, "Couldn't find interface %s: %s\n",
+ unitName, strerror(errno));
+ ::close(s);
+ s = 0;
+ return 0;
+ }
+
+ if ((ifr.ifr_flags & IFF_UP) && (ifr.ifr_flags & IFF_RUNNING)) {
+ is_up = true;
+ kdDebug(5002) << "Interface is up" << endl;
+ }
+ else{
+ is_up = false;
+ ::close(s);
+ s = 0;
+ kdDebug(5002) << "Interface is down" << endl;
+ }
+
+ return is_up;
+}
+
+
+bool PPPStats::initStats() {
+
+ struct sockaddr_in *sinp;
+ struct ifreq ifr;
+
+ clear();
+
+ strlcpy(ifr.ifr_name, unitName, sizeof(ifr.ifr_name));
+
+ if (ioctl(s, SIOCGIFADDR, &ifr) < 0) {
+ }
+
+ sinp = (struct sockaddr_in*)&ifr.ifr_addr;
+
+ if(sinp->sin_addr.s_addr)
+ local_ip_address = inet_ntoa(sinp->sin_addr);
+ else
+ local_ip_address = "";
+ kdDebug(5002) << "Local IP: " << local_ip_address << endl;
+
+ (void) ioctl(s, SIOCGIFDSTADDR, &ifr);
+
+ sinp = (struct sockaddr_in*)&ifr.ifr_dstaddr;
+
+ if(sinp->sin_addr.s_addr)
+ remote_ip_address = inet_ntoa(sinp->sin_addr);
+ else
+ remote_ip_address = "";
+ kdDebug(5002) << "Remote IP: " << remote_ip_address << endl;
+
+ return true;
+
+}
+
+
+bool PPPStats::doStats() {
+ struct ppp_stats cur;
+
+ if(! get_ppp_stats(&cur)){
+ return false;
+ }
+
+ // "in" "pack" "comp" "uncomp" "err"
+ // IN PACK VJCOMP VJUNC VJERR
+
+ ibytes = cur.p.ppp_ibytes; // bytes received
+ ipackets = cur.p.ppp_ipackets; // packets recieved
+ compressedin = cur.vj.vjs_compressedin; // inbound compressed packets
+ uncompressedin = cur.vj.vjs_uncompressedin; // inbound uncompressed packets
+ errorin = cur.vj.vjs_errorin; //receive errors
+
+ // "out" "pack" "comp" "uncomp" "ip"
+ // OUT PACK JCOMP VJUNC NON-VJ
+
+ obytes = cur.p.ppp_obytes; // raw bytes sent
+ opackets = cur.p.ppp_opackets; // packets sent
+ compressed = cur.vj.vjs_compressed; //outbound compressed packets
+
+ // outbound packets - outbound compressed packets
+ packetsunc = cur.vj.vjs_packets - cur.vj.vjs_compressed;
+
+ // packets sent - oubount compressed
+ packetsoutunc = cur.p.ppp_opackets - cur.vj.vjs_packets;
+
+ return true;
+}
+
+
+#ifndef STREAMS
+bool PPPStats::get_ppp_stats(struct ppp_stats *curp){
+
+ struct ifpppstatsreq req;
+
+ if(s==0)
+ return false;
+
+#ifdef __linux__
+ req.stats_ptr = (caddr_t) &req.stats;
+ sprintf(req.ifr__name, "ppp%d", unit);
+#else
+ sprintf(req.ifr_name, "ppp%d", unit);
+#endif
+ if (ioctl(s, SIOCGPPPSTATS, &req) < 0) {
+ if (errno == ENOTTY)
+ fprintf(stderr, "pppstats: kernel support missing\n");
+ else
+ perror("ioctl(SIOCGPPPSTATS)");
+ return false;
+ }
+ *curp = req.stats;
+ return true;
+}
+
+#else /* STREAMS */
+bool PPPStats::get_ppp_stats( struct ppp_stats *curp){
+
+ if (!strioctl(t, PPPIO_GETSTAT, (char*)curp, 0, sizeof(*curp))) {
+ if (errno == EINVAL)
+ fprintf(stderr, "pppstats: kernel support missing\n");
+ else
+ perror("pppstats: Couldn't get statistics");
+ return false;
+ }
+ return true;
+}
+
+bool PPPStats::strioctl(int fd, int cmd, char* ptr, int ilen, int olen){
+
+ struct strioctl str;
+
+ str.ic_cmd = cmd;
+ str.ic_timout = 0;
+ str.ic_len = ilen;
+ str.ic_dp = ptr;
+ if (ioctl(fd, I_STR, &str) == -1)
+ return false;
+ if (str.ic_len != olen)
+ fprintf(stderr, "strioctl: expected %d bytes, got %d for cmd %x\n",
+ olen, str.ic_len, cmd);
+ return true;
+}
+#endif /* STREAMS */
+
+#include "pppstats.moc"
+
diff --git a/kppp/pppstats.h b/kppp/pppstats.h
new file mode 100644
index 00000000..2757bca5
--- /dev/null
+++ b/kppp/pppstats.h
@@ -0,0 +1,84 @@
+/*
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+ * (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+ * (c) 1998-1999 Harri Porten <porten@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _PPPSTATS_H_
+#define _PPPSTATS_H_
+
+
+#include "kpppconfig.h"
+#include <qobject.h>
+
+class QTimer;
+
+class PPPStats : public QObject {
+ Q_OBJECT
+public:
+ PPPStats();
+ ~PPPStats();
+ void clear();
+ bool initStats();
+ bool doStats();
+ bool ifIsUp();
+ void setUnit(int u);
+ void start();
+ void stop();
+
+signals:
+ void statsChanged(int);
+
+private slots:
+ void timerClick();
+
+public:
+ int ibytes, obytes;
+ int totalbytes;
+ int ipackets, opackets;
+ int compressedin;
+ int uncompressedin;
+ int compressed;
+ int errorin;
+ int packetsunc, packetsoutunc;
+
+ QString local_ip_address;
+ QString remote_ip_address;
+
+ enum IOStatus { BytesNone = 0, BytesIn, BytesOut, BytesBoth };
+
+private:
+ bool get_ppp_stats(struct ppp_stats *curp);
+ bool strioctl(int fd, int cmd, char* ptr,int ilen, int olen);
+
+ int ibytes_last, obytes_last;
+ int s; // socket file descriptor
+#ifdef STREAMS
+ int t;
+#endif
+ int unit;
+ char unitName[5];
+ enum IOStatus ioStatus;
+ QTimer *timer;
+};
+
+#endif
diff --git a/kppp/providerdb.cpp b/kppp/providerdb.cpp
new file mode 100644
index 00000000..e6885e44
--- /dev/null
+++ b/kppp/providerdb.cpp
@@ -0,0 +1,473 @@
+//---------------------------------------------------------------------------
+//
+// kPPP: A pppd front end for the KDE project
+//
+//---------------------------------------------------------------------------
+//
+// (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+// (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+// (c) 1998-1999 Harri Porten <porten@kde.org>
+//
+// derived from Jay Painters "ezppp"
+//
+//---------------------------------------------------------------------------
+//
+// This program is free software; you can redistribute it and-or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//---------------------------------------------------------------------------
+
+
+#include <qdir.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qregexp.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <kdebug.h>
+#include "providerdb.h"
+#include "newwidget.h"
+#include "pppdata.h"
+#include <qlistbox.h>
+#include <qlineedit.h>
+#include <ksimpleconfig.h>
+
+
+#define UNENCODED_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"
+
+QWizard* ProviderDB::wiz = 0L;
+
+ProviderDB::ProviderDB(QWidget *parent) :
+ KWizard(parent, "", true),
+ cfg(0)
+{
+ setCaption(i18n("Create New Account"));
+
+ wiz = this;
+
+ page1 = new PDB_Intro(this);
+ addPage(page1, "");
+ setHelpEnabled(page1, false);
+ // TODO p1->w->setFocusPolicy(StrongFocus);
+
+ page2 = new PDB_Country(this);
+ addPage(page2, "");
+ setHelpEnabled(page2, false);
+
+ page3 = new PDB_Provider(this);
+ addPage(page3, "");
+ setHelpEnabled(page3, false);
+
+ page4 = new PDB_UserInfo(this);
+ addPage(page4, "");
+ setHelpEnabled(page4, false);
+
+ page5 = new PDB_DialPrefix(this);
+ addPage(page5, "");
+ setHelpEnabled(page5, false);
+
+ page9 = new PDB_Finished(this);
+ addPage(page9, "");
+ setHelpEnabled(page9, false);
+ setFinish(page9, true);
+ setFinishEnabled(page9, true);
+
+ connect((const QObject *)nextButton(), SIGNAL(clicked()),
+ this, SLOT(pageSelected()));
+ connect((const QObject *)backButton(), SIGNAL(clicked()),
+ this, SLOT(pageSelected()));
+
+ // resize(minimumSize());
+ adjustSize();
+}
+
+
+ProviderDB::~ProviderDB() {
+ delete cfg;
+}
+
+
+void ProviderDB::pageSelected() {
+ bool prev = true;
+ bool next = true;
+
+ QWidget *page = currentPage();
+ if(page == page2) {
+ next = page2->lb->currentItem() != -1;
+ } else if(page == page3) {
+ page3->setDir(*page2->list->at(page2->lb->currentItem()));
+ next = page3->lb->currentItem() != -1;
+ } else if(page == page4) {
+ loadProviderInfo();
+ next = !page4->username().isEmpty() &&
+ !page4->password().isEmpty();
+ }
+
+ setBackEnabled(page, prev);
+ setNextEnabled(page, next);
+}
+
+
+void ProviderDB::loadProviderInfo() {
+ delete cfg;
+
+ QString loc = *page2->list->at(page2->lb->currentItem());
+ QString provider = page3->lb->text(page3->lb->currentItem());
+ urlEncode(provider);
+ QString prov = "Provider/" + loc;
+ prov += "/" + provider;
+ QString fname = locate("appdata", prov);
+ kdDebug(5002) << "Providerfile=" << fname << endl;
+
+ cfg = new KSimpleConfig(fname, true);
+}
+
+
+void ProviderDB::accept() {
+ QRegExp re_username("%USERNAME%");
+ QRegExp re_password("%PASSWORD%");
+
+ QMap <QString, QString> map(cfg->entryMap("<default>"));
+ QMap <QString, QString>::Iterator it(map.begin());
+ while(it != map.end()) {
+ QString key = it.key();
+ QString value = *it;
+ if(value.contains(re_username))
+ value.replace(re_username, page4->username());
+
+ if(value.contains(re_password))
+ value.replace(re_password, page4->password());
+
+ gpppdata.writeConfig(gpppdata.currentAccountGroup(), key, value);
+
+ if(key == "Name")
+ gpppdata.setAccname(value);
+ ++it;
+ }
+
+ gpppdata.writeConfig(gpppdata.currentAccountGroup(), "DialPrefix", page5->prefix());
+ done(Accepted);
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+/////////////////////////////////////////////////////////////////////////////
+PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) {
+ QLabel *l = new QLabel(i18n("You will be asked a few questions on information\n"
+ "which is needed to establish an Internet connection\n"
+ "with your Internet Service Provider (ISP).\n\n"
+ "Make sure you have the registration form from your\n"
+ "ISP handy. If you have any problems, try the online\n"
+ "help first. If any information is missing, contact\n"
+ "your ISP."),
+ this);
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ tl->addWidget(l);
+ tl->activate();
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+/////////////////////////////////////////////////////////////////////////////
+PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) {
+ QLabel *l = new QLabel(i18n("Select the location where you plan to use this\n"
+ "account from the list below. If your country or\n"
+ "location is not listed, you have to create the\n"
+ "account with the normal, dialog based setup.\n\n"
+ "If you click \"Cancel\", the dialog based setup\n"
+ "will start."),
+ this);
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ tl->addWidget(l);
+
+ QHBoxLayout *l1 = new QHBoxLayout;
+ tl->addLayout(l1);
+ l1->addStretch(1);
+
+ lb = new QListBox(this);
+ connect(lb, SIGNAL(highlighted(int)),
+ this, SLOT(selectionChanged(int)));
+ lb->setMinimumSize(220, 100);
+ l1->addWidget(lb, 2);
+ l1->addStretch(1);
+
+ list = new QStringList;
+
+ // fill the listbox
+ // set up filter
+ QDir d(KGlobal::dirs()->findDirs("appdata", "Provider").first());
+ d.setFilter(QDir::Dirs);
+ d.setSorting(QDir::Name);
+
+ // read the list of files
+ const QFileInfoList *flist = d.entryInfoList();
+ if(flist) {
+ QFileInfoListIterator it( *flist );
+ QFileInfo *fi;
+ // traverse the flist and insert into a map for sorting
+ QMap<QString, QString> countries;
+ for(; (fi = it.current()) != 0; ++it) {
+ if(fi->fileName() != "." && fi->fileName() != "..") {
+ QString dirFile(fi->absFilePath()+"/.directory");
+ QString entryName;
+ if(QFile::exists(dirFile)){
+ KSimpleConfig config(dirFile);
+ config.setDesktopGroup();
+ entryName = config.readEntry("Name");
+ }
+ if (entryName.isNull()) entryName = fi->fileName();
+ countries.insert(entryName, fi->fileName());
+ }
+ }
+ // insert sorted entries into list box and string list
+ QMap<QString, QString>::const_iterator mit = countries.begin();
+ QMap<QString, QString>::const_iterator mend = countries.end();
+ while(mit != mend) {
+ lb->insertItem(mit.key());
+ list->append(*mit);
+ ++mit;
+ }
+ }
+
+ tl->activate();
+}
+
+PDB_Country::~PDB_Country()
+{
+ delete list;
+}
+
+void PDB_Country::selectionChanged(int idx) {
+ // QWizard *wizard = (QWizard *)parent(); Why doesn't this work ?
+ ProviderDB::wiz->setNextEnabled(this, (idx != -1));
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+/////////////////////////////////////////////////////////////////////////////
+PDB_Provider::PDB_Provider(QWidget *parent) : QWidget(parent) {
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ QLabel *l = new QLabel(i18n("Select your Internet Service Provider (ISP) from\n"
+ "the list below. If the ISP is not in this list,\n"
+ "you have to click on \"Cancel\" and create this\n"
+ "account using the normal, dialog-based setup.\n\n"
+ "Click on \"Next\" when you have finished your\n"
+ "selection."), this);
+ tl->addWidget(l);
+
+ QHBoxLayout *l1 = new QHBoxLayout;
+ tl->addLayout(l1);
+ l1->addStretch(1);
+
+ lb = new QListBox(this);
+ connect(lb, SIGNAL(highlighted(int)),
+ this, SLOT(selectionChanged(int)));
+ lb->setMinimumSize(220, 100);
+ l1->addWidget(lb, 2);
+ l1->addStretch(1);
+}
+
+void PDB_Provider::selectionChanged(int idx) {
+ ProviderDB::wiz->setNextEnabled(this, idx != -1);
+}
+
+
+void PDB_Provider::setDir(const QString &_dir) {
+ if(dir != _dir) {
+ lb->clear();
+
+ // fill the listbox
+ // set up filter
+ dir = _dir;
+
+ QString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
+ QRegExp re1(" ");
+ dir = dir.replace(re1, "_");
+ dir1 += dir;
+
+ QDir d(dir1);
+ d.setFilter(QDir::Files);
+ d.setSorting(QDir::Name);
+
+ // read the list of files
+ const QFileInfoList *list = d.entryInfoList();
+ QFileInfoListIterator it( *list );
+ QFileInfo *fi;
+
+ // traverse the list and insert into the widget
+ QRegExp re("_");
+ while((fi = it.current()) != NULL) {
+ QString fname = fi->fileName();
+ if(fname.length() && fname[0] != '.') {
+ urlDecode(fname);
+ lb->insertItem(fname);
+ }
+ ++it;
+ }
+
+ // TODO: Qt 1.x needs this if list is empty
+ lb->update();
+ }
+}
+
+
+QString PDB_Provider::getDir() {
+ return dir;
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+/////////////////////////////////////////////////////////////////////////////
+PDB_UserInfo::PDB_UserInfo(QWidget *parent) : QWidget(parent) {
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ QLabel *l = new QLabel(i18n("To log on to your ISP, kppp needs the username\n"
+ "and the password you got from your ISP. Type\n"
+ "in this information in the fields below.\n\n"
+ "Word case is important here."),
+ this);
+ tl->addWidget(l);
+
+ QGridLayout *l1 = new QGridLayout(2, 2);
+ tl->addLayout(l1);
+ l = new QLabel(i18n("Username:"), this);
+ l1->addWidget(l, 0, 0);
+ l = new QLabel(i18n("Password:"), this);
+ l1->addWidget(l, 1, 0);
+ _username = newLineEdit(24, this);
+ connect(_username, SIGNAL(textChanged(const QString &)),
+ this, SLOT(textChanged(const QString &)));
+ l1->addWidget(_username, 0, 1);
+ _password = newLineEdit(24, this);
+ _password->setEchoMode(QLineEdit::Password);
+ connect(_password, SIGNAL(textChanged(const QString &)),
+ this, SLOT(textChanged(const QString &)));
+ l1->addWidget(_password, 1, 1);
+ tl->activate();
+}
+
+
+void PDB_UserInfo::textChanged(const QString &) {
+ ProviderDB::wiz->setNextEnabled(this, !_password->text().isEmpty() &&
+ !_username->text().isEmpty());
+}
+
+
+QString PDB_UserInfo::username() {
+ QString s = _username->text();
+ return s;
+}
+
+
+QString PDB_UserInfo::password() {
+ QString s = _password->text();
+ return s;
+}
+
+
+void PDB_UserInfo::activate() {
+ _username->setFocus();
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+/////////////////////////////////////////////////////////////////////////////
+PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) {
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ QLabel *l = new QLabel(i18n("If you need a special dial prefix (e.g. if you\n"
+ "are using a telephone switch) you can specify\n"
+ "it here. This prefix is dialed just before the\n"
+ "phone number.\n\n"
+ "If you have a telephone switch, you probably need\n"
+ "to write \"0\" or \"0,\" here."),
+ this);
+ tl->addWidget(l);
+
+ QGridLayout *l1 = new QGridLayout(1, 2);
+ tl->addLayout(l1);
+ l = new QLabel(i18n("Dial prefix:"), this);
+ l1->addWidget(l, 0, 0);
+ _prefix = newLineEdit(24, this);
+ l1->addWidget(_prefix, 0, 1);
+ tl->activate();
+}
+
+
+QString PDB_DialPrefix::prefix() {
+ QString s = _prefix->text();
+
+ return s;
+}
+
+
+void PDB_DialPrefix::activate() {
+ _prefix->setFocus();
+}
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+/////////////////////////////////////////////////////////////////////////////
+PDB_Finished::PDB_Finished(QWidget *parent) : QWidget(parent) {
+ QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
+ QLabel *l = new QLabel(i18n("Finished!\n\n"
+ "A new account has been created. Click \"Finish\" to\n"
+ "go back to the setup dialog. If you want to\n"
+ "check the settings of the newly created account,\n"
+ "you can use \"Edit\" in the setup dialog."),
+ this);
+ tl->addWidget(l);
+ tl->addStretch(1);
+}
+
+
+void urlDecode(QString &s) {
+ QString s1;
+
+ for(uint i = 0; i < s.length(); i++) {
+ if(s[i] == '%') {
+ s1 += 100*s[i+1].digitValue() + 10*s[i+2].digitValue()
+ + s[i+3].digitValue();
+ i += 3;
+ } else {
+ s1 += s[i];
+ }
+ }
+
+ s = s1;
+}
+
+
+void urlEncode(QString &s) {
+ QString s1, tmp;
+
+ for(uint i = 0; i < s.length(); i++) {
+ if(QString(UNENCODED_CHARS).find(s[i]) >= 0)
+ s1 += s[i];
+ else {
+ tmp.sprintf("%%%03i", s[i].unicode());
+ s1 += tmp;
+ }
+ }
+ s = s1;
+}
+
+
+#include "providerdb.moc"
+
diff --git a/kppp/providerdb.h b/kppp/providerdb.h
new file mode 100644
index 00000000..56a5e506
--- /dev/null
+++ b/kppp/providerdb.h
@@ -0,0 +1,152 @@
+//---------------------------------------------------------------------------
+//
+// kPPP: A pppd front end for the KDE project
+//
+//---------------------------------------------------------------------------
+//
+// (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+// (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+// (c) 1998-1999 Harri Porten <porten@kde.org>
+//
+// derived from Jay Painters "ezppp"
+//
+//---------------------------------------------------------------------------
+//
+// $Id$
+//
+//---------------------------------------------------------------------------
+//
+// This program is free software; you can redistribute it and-or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//---------------------------------------------------------------------------
+
+#ifndef PROVIDER_DB
+#define PROVIDER_DB
+
+#include <kwizard.h>
+#include <qwidget.h>
+
+class QLineEdit;
+class QListBox;
+class KSimpleConfig;
+
+class PDB_Intro : public QWidget {
+ Q_OBJECT
+public:
+ PDB_Intro(QWidget *parent);
+};
+
+
+class PDB_Country : public QWidget {
+ Q_OBJECT
+public:
+ PDB_Country(QWidget *parent);
+ ~PDB_Country();
+ QListBox *lb;
+ QStringList *list;
+
+public slots:
+ void selectionChanged(int);
+};
+
+
+class PDB_Provider : public QWidget {
+ Q_OBJECT
+public:
+ PDB_Provider(QWidget *parent);
+
+ void setDir(const QString &d);
+ QString getDir();
+
+ QListBox *lb;
+
+public slots:
+ void selectionChanged(int);
+
+private:
+ QString dir;
+};
+
+
+class PDB_UserInfo : public QWidget {
+ Q_OBJECT
+public:
+ PDB_UserInfo(QWidget *parent);
+ QString username();
+ QString password();
+ void activate();
+
+public slots:
+ void textChanged(const QString &);
+
+private:
+ QLineEdit *_username;
+ QLineEdit *_password;
+};
+
+
+class PDB_DialPrefix : public QWidget {
+ Q_OBJECT
+public:
+ PDB_DialPrefix(QWidget *parent);
+ QString prefix();
+ void activate();
+
+private:
+ QLineEdit *_prefix;
+};
+
+
+class PDB_Finished : public QWidget {
+ Q_OBJECT
+public:
+ PDB_Finished(QWidget *parent);
+};
+
+
+class ProviderDB : public KWizard {
+ Q_OBJECT
+public:
+ ProviderDB(QWidget *parent);
+ ~ProviderDB();
+ static QWizard *wiz;
+
+public slots:
+ void pageSelected();
+ void accept();
+
+private:
+ void loadProviderInfo();
+ KSimpleConfig *cfg;
+
+ PDB_Intro *page1;
+ PDB_Country *page2;
+ PDB_Provider *page3;
+ PDB_UserInfo *page4;
+ PDB_DialPrefix *page5;
+ PDB_Finished *page9;
+};
+
+
+// Decodes a (some sort of)URL-encoded filename to a human-readable name.
+// This is used for the provider database
+void urlDecode(QString &);
+
+// Encodes a (some sort of)URL-encoded filename from a human-readable name.
+// This is used for the provider database
+void urlEncode(QString &);
+
+
+#endif
diff --git a/kppp/pwentry.cpp b/kppp/pwentry.cpp
new file mode 100644
index 00000000..21704fcb
--- /dev/null
+++ b/kppp/pwentry.cpp
@@ -0,0 +1,115 @@
+/*
+ *
+ * Kppp: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+
+#include <stdio.h>
+#include <qapplication.h>
+#include <kglobalsettings.h>
+#include "pwentry.h"
+
+PWEntry::PWEntry( QWidget *parent, const char *name )
+ : QWidget(NULL, name) {
+
+ if(parent){
+
+ QPoint point = mapToGlobal (QPoint (0,0));
+ QRect pos = geometry();
+
+ setGeometry(point.x() + pos.width()/2 - 300/2,
+ point.y() + pos.height()/2 - 90/2,
+ 300,
+ 90);
+ } else {
+ QRect desk = KGlobalSettings::desktopGeometry(parent);
+ setGeometry( desk.center().x() - 150, desk.center().y() - 50, 300, 90 );
+ }
+
+ frame = new QGroupBox(name, this );
+
+ setFocusPolicy( QWidget::StrongFocus );
+
+ pw = new QLineEdit( this, "le" );
+ pw->setEchoMode( QLineEdit::Password );
+ connect( pw, SIGNAL(returnPressed()), this, SLOT(hide()) );
+
+ isconsumed = TRUE;
+}
+
+QString PWEntry::text() { return (pw->text()); }
+
+void PWEntry::focusInEvent( QFocusEvent *){
+
+ pw->setFocus();
+
+}
+
+void PWEntry::setEchoModeNormal() {
+
+ pw->setEchoMode(QLineEdit::Normal);
+
+}
+
+void PWEntry::setEchoModePassword() {
+
+ pw->setEchoMode(QLineEdit::Password);
+
+}
+
+void PWEntry::setPrompt(const QString &p) {
+
+ frame->setTitle(p);
+
+}
+
+void PWEntry::resizeEvent(QResizeEvent* ){
+
+ pw->setGeometry( 15,35, width() - 30, 25 );
+ frame->setGeometry(5,5, width() - 10, height() - 10 );
+
+}
+
+
+void PWEntry::show() {
+
+ pw->setText("");
+ isconsumed = FALSE;
+ QWidget::show();
+}
+
+bool PWEntry::Consumed() {
+ return(isconsumed);
+}
+
+void PWEntry::setConsumed() {
+ isconsumed = TRUE;
+}
+
+void PWEntry::hide() {
+ QWidget::hide();
+ return;
+}
+
+#include "pwentry.moc"
diff --git a/kppp/pwentry.h b/kppp/pwentry.h
new file mode 100644
index 00000000..5d9a398c
--- /dev/null
+++ b/kppp/pwentry.h
@@ -0,0 +1,72 @@
+/*
+ *
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#ifndef PWENTRY_H
+#define PWENTRY_H
+
+#include <qwidget.h>
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qgroupbox.h>
+
+class PWEntry : public QWidget {
+
+ Q_OBJECT
+
+public:
+
+ PWEntry( QWidget *parent=0, const char *name=0 );
+ bool Consumed();
+ void setConsumed();
+ QString text();
+ void setPrompt(const QString &);
+
+public slots:
+
+ void setEchoModeNormal();
+ void setEchoModePassword();
+ void hide();
+ void show();
+
+signals:
+
+ void returnPressed();
+
+protected:
+
+ void resizeEvent(QResizeEvent* qre);
+ void focusInEvent( QFocusEvent *);
+
+private:
+
+ QGroupBox *frame;
+ QLineEdit *pw;
+ QLabel *pl;
+ bool isconsumed;
+
+};
+
+#endif
diff --git a/kppp/requester.cpp b/kppp/requester.cpp
new file mode 100644
index 00000000..bca7f63a
--- /dev/null
+++ b/kppp/requester.cpp
@@ -0,0 +1,365 @@
+/*
+ * kPPP: A pppd Front End for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997,98 Bernd Johannes Wuebben,
+ * Mario Weilguni,
+ * Harri Porten
+ *
+ *
+ * This file was contributed by Harri Porten <porten@tu-harburg.de>
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef __osf__
+#define _XOPEN_SOURCE_EXTENDED 1
+#endif
+
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include <sys/uio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <errno.h>
+#include <string.h>
+
+#ifdef __osf__
+#undef accept
+extern "C" unsigned int alarm(unsigned int);
+#endif
+
+#ifdef _XPG4_2
+extern "C" {
+ ssize_t sendmsg(int, const struct msghdr *, int);
+ ssize_t recvmsg(int, struct msghdr *, int);
+}
+#endif
+
+#include <kdebug.h>
+#include <qfile.h>
+
+#include "auth.h"
+#include "pppdata.h"
+#include "opener.h"
+#include "requester.h"
+#include "devices.h"
+
+Requester *Requester::rq = 0L;
+
+Requester::Requester(int s) : socket(s) {
+ assert(rq==0L);
+ rq = this;
+ lastStatus = -1;
+}
+
+Requester::~Requester() {
+}
+
+//
+// Receive file name and file descriptors from envoy
+//
+int Requester::recvFD() {
+ struct { struct cmsghdr cmsg; int fd; } control;
+ struct msghdr msg;
+ struct ResponseHeader response;
+
+ struct iovec iov;
+ int flags = 0, fd, len;
+ size_t cmsglen;
+
+ msg.msg_name = 0L;
+ msg.msg_namelen = 0;
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ iov.iov_base = IOV_BASE_CAST &response;
+ iov.iov_len = sizeof(struct ResponseHeader);
+#ifdef CMSG_LEN
+ cmsglen = CMSG_LEN(sizeof(int));
+#else
+ cmsglen = sizeof(struct cmsghdr) + sizeof(int);
+#endif
+ control.cmsg.cmsg_len = cmsglen;
+ control.cmsg.cmsg_level = SOL_SOCKET;
+ control.cmsg.cmsg_type = MY_SCM_RIGHTS;
+
+ msg.msg_control = (char *) &control;
+ msg.msg_controllen = control.cmsg.cmsg_len;
+
+ fd = -1;
+
+ // set alarm in case recvmsg() hangs
+ signal(SIGALRM, recv_timeout);
+ alarm(2);
+
+ len = recvmsg(socket, &msg, flags);
+
+ alarm(0);
+ signal(SIGALRM, SIG_DFL);
+
+ if(len <= 0) {
+ kdError(5002) << "recvmsg failed " << strerror(errno) << endl;
+ return -1;
+ } else if (msg.msg_controllen < cmsglen) {
+ kdError(5002) << "recvmsg: truncated message " << strerror(errno) << endl;
+ exit(1);
+ } else {
+#ifdef CMSG_DATA
+ fd = *((int *)CMSG_DATA(&control.cmsg));
+#else
+ fd = *((int *) control.cmsg.cmsg_data);
+#endif
+ kdDebug(5002) << "response.status: " << response.status << endl;
+ assert(response.status <= 0);
+ if(response.status < 0)
+ return response.status;
+ }
+
+ return fd;
+}
+
+bool Requester::recvResponse() {
+
+ struct msghdr msg;
+ struct iovec iov;
+ struct ResponseHeader response;
+ int flags = 0, len;
+
+ msg.msg_name = 0L;
+ msg.msg_namelen = 0;
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+ msg.msg_control = 0L;
+ msg.msg_controllen = 0;
+
+ iov.iov_base = IOV_BASE_CAST &response;
+ iov.iov_len = sizeof(struct ResponseHeader);
+ kdDebug(5002) << "recvResponse(): waiting for message" << endl;
+ len = recvmsg(socket, &msg, flags);
+ kdDebug(5002) << "recvResponse(): received message" << endl;
+ if (len <= 0) {
+ if (errno == EINTR)
+ kdDebug(5002) << "Interrupted system call. Continuing." << endl;
+ else
+ perror("recvmsg failed");
+ } else {
+ kdDebug(5002) << "response.status: " << response.status << endl;
+ }
+
+ lastStatus = response.status;
+ return (response.status == 0);
+}
+
+int Requester::openModem(const QString & dev) {
+
+ struct OpenModemRequest req;
+ req.header.type = Opener::OpenDevice;
+ if((req.deviceNum = indexDevice(dev)) < 0)
+ return -1;
+
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvFD();
+}
+
+
+int Requester::openLockfile(const QString &dev, int flags) {
+
+ struct OpenLockRequest req;
+
+ req.header.type = Opener::OpenLock;
+ if((req.deviceNum = indexDevice(dev)) < 0)
+ return -1;
+ req.flags = flags;
+
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvFD();
+}
+
+
+bool Requester::removeLockfile() {
+
+ struct RemoveLockRequest req;
+
+ req.header.type = Opener::RemoveLock;
+
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvResponse();
+}
+
+
+int Requester::openResolv(int flags) {
+
+ struct OpenResolvRequest req;
+
+ req.header.type = Opener::OpenResolv;
+ req.flags = flags;
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvFD();
+}
+
+
+int Requester::openSysLog() {
+
+ struct OpenLogRequest req;
+
+ req.header.type = Opener::OpenSysLog;
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvFD();
+}
+
+
+bool Requester::setSecret(int method, const QString &name, const QString &password) {
+ assert(name!=0);
+ assert(password!=0);
+
+ if(method == AUTH_PAPCHAP)
+ return setSecret(AUTH_PAP, name, password) &&
+ setSecret(AUTH_CHAP, name, password);
+
+ struct SetSecretRequest req;
+ req.header.type = Opener::SetSecret;
+ switch(method) {
+ case AUTH_PAP:
+ req.method = Opener::PAP;
+ break;
+ case AUTH_CHAP:
+ req.method = Opener::CHAP;
+ break;
+ default:
+ return false;
+ }
+ strncpy(req.username, QFile::encodeName(name), Opener::MaxStrLen);
+ req.username[Opener::MaxStrLen] = '\0';
+ strncpy(req.password, QFile::encodeName(password), Opener::MaxStrLen);
+ req.password[Opener::MaxStrLen] = '\0';
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvResponse();
+}
+
+bool Requester::removeSecret(int authMethod) {
+ struct RemoveSecretRequest req;
+ req.header.type = Opener::RemoveSecret;
+ if(authMethod == AUTH_PAP)
+ req.method = Opener::PAP;
+ else
+ if(authMethod == AUTH_CHAP)
+ req.method = Opener::CHAP;
+ else
+ return false;
+
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvResponse();
+}
+
+bool Requester::setHostname(const QString &name) {
+ if (name.isEmpty())
+ return false;
+ struct SetHostnameRequest req;
+ req.header.type = Opener::SetHostname;
+ strncpy(req.name, QFile::encodeName(name), Opener::MaxStrLen);
+ req.name[Opener::MaxStrLen] = '\0';
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvResponse();
+}
+
+
+bool Requester::execPPPDaemon(const QString &arguments) {
+ struct ExecDaemonRequest req;
+ req.header.type = Opener::ExecPPPDaemon;
+ strncpy(req.arguments, QFile::encodeName(arguments), MAX_CMDLEN);
+ req.arguments[MAX_CMDLEN] = '\0';
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ if(recvResponse()==0) {
+ gpppdata.setpppdRunning(true);
+ return true;
+ } else
+ return false;
+}
+
+
+bool Requester::killPPPDaemon() {
+ struct KillDaemonRequest req;
+ gpppdata.setpppdRunning(false);
+ req.header.type = Opener::KillPPPDaemon;
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvResponse();
+}
+
+int Requester::pppdExitStatus()
+{
+ struct PPPDExitStatusRequest req;
+ req.header.type = Opener::PPPDExitStatus;
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+ return recvResponse();
+}
+
+bool Requester::stop() {
+
+ struct StopRequest req;
+ req.header.type = Opener::Stop;
+ sendRequest((struct RequestHeader *) &req, sizeof(req));
+
+ // return recvResponse();
+ return true;
+}
+
+
+bool Requester::sendRequest(struct RequestHeader *request, int len) {
+
+ request->len = len - sizeof(struct RequestHeader);
+
+ struct msghdr msg;
+ struct iovec iov;
+
+ iov.iov_base = IOV_BASE_CAST request;
+ iov.iov_len = len;
+
+ msg.msg_name = 0L;
+ msg.msg_namelen = 0;
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+ msg.msg_control = 0L;
+ msg.msg_controllen = 0;
+ kdDebug(5002) << "sendRequest: trying to send msg type " << request->type << endl;
+ sendmsg(socket, &msg, 0);
+ kdDebug(5002) << "sendRequest: sent message" << endl;
+
+ return true;
+}
+
+
+int Requester::indexDevice(const QString &dev) {
+
+ int index = -1;
+
+ for(int i = 0; devices[i]; i++)
+ if (dev == devices[i])
+ index = i;
+ return index;
+}
+
+
+void recv_timeout(int) {
+ kdDebug(5002) << "timeout()" << endl;
+}
diff --git a/kppp/requester.h b/kppp/requester.h
new file mode 100644
index 00000000..cb2d0e04
--- /dev/null
+++ b/kppp/requester.h
@@ -0,0 +1,38 @@
+#ifndef _REQUESTER_H_
+#define _REQUESTER_H_
+
+class Requester {
+
+public:
+ Requester(int);
+ ~Requester();
+
+ int openModem(const QString & dev);
+ int openLockfile(const QString & dev, int flags = 0);
+ bool removeLockfile();
+ int openResolv(int flags);
+ int openSysLog();
+ bool setSecret(int method, const QString & name, const QString & password);
+ bool removeSecret(int authMethode);
+ bool setHostname(const QString & name);
+ bool execPPPDaemon(const QString & arguments);
+ bool killPPPDaemon();
+ int pppdExitStatus();
+ bool stop();
+
+public:
+ static Requester *rq;
+ int lastStatus;
+
+private:
+ bool sendRequest(struct RequestHeader *request, int len);
+ bool recvResponse();
+ int recvFD();
+ int indexDevice(const QString & dev);
+ int socket;
+ bool expect_alarm;
+};
+
+void recv_timeout(int);
+
+#endif
diff --git a/kppp/ruleset.cpp b/kppp/ruleset.cpp
new file mode 100644
index 00000000..1775b5c2
--- /dev/null
+++ b/kppp/ruleset.cpp
@@ -0,0 +1,581 @@
+/* -*- C++ -*-
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was contributed by Mario Weilguni <mweilguni@sime.com>
+ * Thanks Mario !
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include "ruleset.h"
+
+#include <qregexp.h>
+#include <qfile.h>
+
+#include <klocale.h>
+#include <kglobal.h>
+#include <kdebug.h>
+
+RuleSet::RuleSet() {
+ default_costs = -1;
+ default_len = -1;
+ _currency_symbol = "$";
+ _currency_digits = 2;
+ _minimum_costs = 0;
+ flat_init_costs = 0.0;
+ flat_init_duration = 0;
+ have_flat_init_costs = false;
+
+ pcf = 0.0;
+}
+
+// this function is shamelessly stolen from pppcosts 0.5 :-)
+/* calculates the easter sunday in day_of_year style */
+QDate RuleSet::get_easter(int year) {
+ /* not optimized, I took the original names */
+ signed int a,b,m,q,w,p,n,tt,mm;
+
+ /* calculating easter is really funny */
+ /* this is O'Beirne's algorithm, only valid 1900-2099 */
+ n = year - 1900;
+ a = n % 19;
+ b = (int)((7*a+1)/19);
+ m = (11*a+4-b) % 29;
+ q = (int)(n/4);
+ w = (n+q+31-m) % 7;
+ p = 25-m-w;
+ if (p>0)
+ {tt=p;
+ mm=4;}
+ else
+ {tt=p+31;
+ mm=3;}
+
+ return QDate(year, mm, tt);
+}
+
+int RuleSet::dayNameToInt(const char *s) {
+ const char *const name[] = {"monday", "tuesday", "wednesday",
+ "thursday", "friday", "saturday",
+ "sunday", NULL};
+
+ for(int i = 0; name[i] != NULL; i++)
+ if(qstricmp(name[i], s) == 0)
+ return i;
+
+ return -1;
+}
+
+int RuleSet::load(const QString &filename) {
+
+ flat_init_costs = 0.0;
+ flat_init_duration = 0;
+ have_flat_init_costs = false;
+
+ QFile f(filename);
+
+ // delete old rules
+ rules.resize(0);
+ _name = "";
+
+ // ignore "No Accounting"
+ if(filename.isEmpty())
+ return 0;
+
+ if(!f.exists())
+ return -1;
+
+ if(!f.open(IO_ReadOnly))
+ return -1;
+
+ char buffer[2048]; // safe
+ int lineno=0;
+
+ while(!f.atEnd()) {
+ // read continued lines
+ QString line;
+ bool backslashed;
+ do {
+ int br = f.readLine(buffer, sizeof(buffer));
+ if((br > 0) && (buffer[br-1] == '\n'))
+ buffer[br-1] = 0;
+ else
+ buffer[br] = 0;
+ lineno++;
+ line.append(QString::fromUtf8(buffer));
+ backslashed = (line.right(1) == "\\");
+ } while(!f.atEnd() && backslashed);
+
+ // strip whitespace
+ line = line.replace(QRegExp("[ \t\r]"), "");
+ // skip comment lines
+ if((line.left(1) == "#") || line.isEmpty())
+ continue;
+
+ // parse line
+ if(!parseLine(line)) {
+ f.close();
+ kdError(5002) << "ERROR IN LINE " << lineno << endl;
+ return lineno;
+ }
+ }
+
+ f.close();
+
+ if(_name.length() > 0)
+ return 0;
+ else {
+ kdError(5002) << "NO NAME DEFINED" << endl;
+ return -1;
+ }
+}
+
+void RuleSet::addRule(RULE r) {
+ // check for a default rule
+ if((r.type == 2) &&
+ (r.weekday.from == 0) && (r.weekday.until == 6) &&
+ (r.from == midnight()) &&
+ (r.until == beforeMidnight()))
+ {
+ default_costs = r.costs;
+ default_len = r.len;
+ return;
+ }
+
+ // if from < until (i.e on (monday..friday)
+ // from (21:00..05:00) use (0.2,16)
+ // split it into two rules
+ // ... between (21:00..23:59) use ...
+ // ... between (00:00..05:00) use ...
+ if(r.from > r.until) {
+ RULE r1, r2;
+ r1 = r;
+ r2 = r;
+ r1.until = beforeMidnight();
+ r2.from = midnight();
+ rules.resize(rules.size()+2);
+ rules[rules.size()-2] = r1;
+ rules[rules.size()-1] = r2;
+ } else {
+ rules.resize(rules.size()+1);
+ rules[rules.size()-1] = r;
+ }
+}
+
+bool RuleSet::parseEntry(RULE &ret, QString s, int year) {
+ if(s.contains(QRegExp("^[0-9]+/[0-9]+$"))) {
+ int d, m;
+ sscanf(s.ascii(), "%d/%d", &m, &d);
+ ret.type = 1;
+ ret.date.from = QDate(year, m, d);
+ ret.date.until = QDate(year, m, d);
+ return TRUE;
+ }
+
+ if(s.contains(QRegExp("^[0-9]+\\.[0-9]+$"))) {
+ int d, m;
+ sscanf(s.ascii(), "%d.%d", &d, &m);
+ ret.type = 1;
+ ret.date.from = QDate(year, m, d);
+ ret.date.until = QDate(year, m, d);
+ return TRUE;
+ }
+
+ if(s.right(3) == "day") {
+ int d = dayNameToInt(s.ascii());
+ if(d != -1) {
+ ret.type = 2;
+ ret.weekday.from = d;
+ ret.weekday.until = d;
+ return TRUE;
+ }
+ }
+
+ if(s.left(6) == "easter") {
+ QDate d = get_easter(year);
+ int off;
+ bool ok = TRUE;
+ QString val = s.mid(6, 1000);
+ if(val.isEmpty())
+ off = 0;
+ else
+ off = val.toInt(&ok);
+
+ if(ok) {
+ d = d.addDays(off);
+ ret.type = 1;
+ ret.date.from = d;
+ ret.date.until = d;
+ return TRUE;
+ }
+ }
+
+ ret.type = 0;
+ return FALSE;
+}
+
+
+
+bool RuleSet::parseEntries(QString s, int year,
+ QTime t1, QTime t2,
+ double costs, double len, double after)
+{
+ // special rule: on() is the same as on(monday..sunday)
+ if(s.isEmpty())
+ s = "monday..sunday";
+
+ while(s.length()) {
+ int pos = s.find(',');
+ QString token;
+ if(pos == -1) {
+ token = s;
+ s = "";
+ } else {
+ token = s.left(pos);
+ s = s.right(s.length()-pos-1);
+ }
+
+ // we've a token, now check if it defines a
+ // range
+ RULE r;
+ if(token.contains("..")) {
+ QString left, right;
+ left = token.left(token.find(".."));
+ right = token.right(token.length()-2-left.length());
+ RULE lr, rr;
+ if(parseEntry(lr, left, year) && parseEntry(rr, right, year)) {
+ if(lr.type == rr.type) {
+ r.type = lr.type;
+ switch(lr.type) {
+ case 1:
+ r.date.from = lr.date.from;
+ r.date.until = rr.date.from;
+ break;
+ case 2:
+ r.weekday.from = lr.weekday.from;
+ r.weekday.until = rr.weekday.from;
+ }
+ } else
+ return FALSE;
+ }
+ } else
+ if(!parseEntry(r, token, year))
+ return FALSE;
+
+ r.costs = costs;
+ r.len = len;
+ r.after = after;
+ r.from = t1;
+ r.until = t2;
+ addRule(r);
+ }
+
+ return TRUE;
+}
+
+bool RuleSet::parseTime(QTime &t1, QTime &t2, QString s) {
+ if(s.isEmpty()) {
+ t1 = midnight();
+ t2 = beforeMidnight();
+ return TRUE;
+ } else {
+ int t1m, t1h, t2m, t2h;
+ if(sscanf(s.ascii(), "%d:%d..%d:%d", &t1h, &t1m, &t2h, &t2m) == 4) {
+ t1.setHMS(t1h, t1m, 0);
+ t2.setHMS(t2h, t2m, 0);
+ return TRUE;
+ } else
+ return FALSE;
+ }
+}
+
+bool RuleSet::parseRate(double &costs, double &len, double &after, QString s) {
+ after = 0;
+ int fields = sscanf(s.ascii(), "%lf,%lf,%lf", &costs, &len, &after);
+ return (fields == 2) || (fields == 3);
+}
+
+bool RuleSet::parseLine(const QString &s) {
+
+ // ### use QRegExp::cap() instead of mid() and find()
+
+ // for our french friends -- Bernd
+ if(s.contains(QRegExp("flat_init_costs=\\(.*"))) {
+ // parse the time fields
+ QString token = s.mid(s.find("flat_init_costs=(") + 17,
+ s.find(")")-s.find("flat_init_costs=(") - 17);
+ // printf("TOKEN=%s\n",token.ascii());
+
+ double after;
+ if(!parseRate(flat_init_costs, flat_init_duration, after, token))
+ return FALSE;
+
+ //printf("COST %f DURATION %f\n",flat_init_costs,flat_init_duration);
+
+ if(! (flat_init_costs >= 0.0) )
+ return FALSE;
+ if(! (flat_init_duration >= 0.0))
+ return FALSE;
+
+ have_flat_init_costs = true;
+ return TRUE;
+ }
+
+
+ if(s.contains(QRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
+ // parse the time fields
+ QString token = s.mid(s.find("between(") + 8,
+ s.find(")use")-s.find("between(") - 8);
+ QTime t1, t2;
+ if(!parseTime(t1, t2, token))
+ return FALSE;
+
+ // parse the rate fields
+ token = s.mid(s.find("use(") + 4,
+ s.findRev(")")-s.find("use(") - 4);
+ double costs;
+ double len;
+ double after;
+ if(!parseRate(costs, len, after, token))
+ return FALSE;
+
+ // parse the days
+ token = s.mid(s.find("on(") + 3,
+ s.find(")betw")-s.find("on(") - 3);
+ if(!parseEntries(token, QDate::currentDate().year(),
+ t1, t2, costs, len, after))
+ return FALSE;
+
+ return TRUE;
+ }
+
+ // check for the name
+ if(s.contains(QRegExp("name=.*"))) {
+ _name = s.right(s.length()-5);
+ return !_name.isEmpty();
+ }
+
+
+ // check default entry
+ if(s.contains(QRegExp("default=\\(.*\\)"))) {
+ QString token = s.mid(9, s.length() - 10);
+ double after;
+ if(parseRate(default_costs, default_len, after, token))
+ return TRUE;
+ }
+
+ // check for "minimum costs"
+ if(s.contains(QRegExp("minimum_costs=.*"))) {
+ QString token = s.right(s.length() - strlen("minimum_costs="));
+ bool ok;
+ _minimum_costs = token.toDouble(&ok);
+ return ok;
+ }
+
+ // check currency settings
+ if(s.startsWith("currency_symbol=")) {
+ _currency_symbol = s.mid(16);
+ return TRUE;
+ }
+
+ if(s.contains(QRegExp("currency_digits=.*"))) {
+ QString token = s.mid(16, s.length() - 16);
+ bool ok;
+ _currency_digits = token.toInt(&ok);
+ return ok && (_currency_digits >= 0);
+ }
+
+ // "currency_position" is deprecated so we'll simply ignore it
+ if(s.contains(QRegExp("currency_position=.*")))
+ return TRUE;
+
+ // check per connection fee
+ if(s.contains(QRegExp("per_connection="))) {
+ QString token = s.mid(15, s.length()-15);
+ bool ok;
+ pcf = token.toDouble(&ok);
+ return ok;
+ }
+
+ return FALSE;
+}
+
+void RuleSet::setStartTime(QDateTime dt){
+
+ starttime = dt;
+
+}
+
+void RuleSet::getActiveRule(QDateTime dt, double connect_time, double &costs, double &len) {
+ // use default costs first
+ costs = default_costs;
+ len = default_len;
+
+ //printf("In getActiveRule\n");
+ if(have_flat_init_costs){
+
+ costs = flat_init_costs;
+ len = flat_init_duration;
+ have_flat_init_costs = false;
+ //printf("getActiveRule FLATINITCOSTS\n");
+ return;
+ }
+
+ // check every rule
+ for(int i = 0; i < (int)rules.size(); i++) {
+ RULE r = rules[i];
+
+ switch(r.type) {
+ case 1: // a date
+ {
+ // since rules do not have a year's entry, use the one
+ // from dt
+ QDate from = r.date.from;
+ QDate until = r.date.until;
+ from.setYMD(dt.date().year(), from.month(), from.day());
+ until.setYMD(dt.date().year(), until.month(), until.day());
+ if((from <= dt.date()) && (dt.date() <= until)) {
+ // check time
+ if((r.from <= dt.time()) && (dt.time() <= r.until) && (connect_time >= r.after)) {
+ costs = r.costs;
+ len = r.len;
+ }
+ }
+ }
+ break;
+
+ case 2: // one or more weekdays
+ // check if the range overlaps sunday.
+ // (i.e. "on(saturday..monday)")
+ if(r.weekday.from <= r.weekday.until) {
+ if((r.weekday.from <= dt.date().dayOfWeek() - 1) &&
+ (r.weekday.until >= dt.date().dayOfWeek() - 1))
+ {
+ // check time
+ if((r.from <= dt.time()) && (dt.time() <= r.until) && (connect_time >= r.after)) {
+ costs = r.costs;
+ len = r.len;
+ }
+ }
+ } else { // yes, they overlap sunday
+ if((r.weekday.from >= dt.date().dayOfWeek() - 1) &&
+ (dt.date().dayOfWeek() - 1 <= r.weekday.until))
+ {
+ // check time
+ if((r.from <= dt.time()) && (dt.time() <= r.until) && (connect_time >= r.after)) {
+ costs = r.costs;
+ len = r.len;
+ }
+ }
+ }
+ }
+ }
+}
+
+
+#if 0
+static double round(double d, int digits) {
+ d *= pow(10, digits);
+ d = rint(d);
+ d /= pow(10, digits);
+ return d;
+}
+#endif
+
+QString RuleSet::currencySymbol() const {
+ return _currency_symbol.copy();
+}
+
+QString RuleSet::currencyString(double f) const {
+ return KGlobal::locale()->formatMoney(f, _currency_symbol, _currency_digits);
+}
+
+
+double RuleSet::perConnectionCosts() const {
+ return pcf;
+}
+
+
+QString RuleSet::name() const {
+ return _name;
+}
+
+
+double RuleSet::minimumCosts() const {
+ return _minimum_costs;
+}
+
+QTime RuleSet::midnight() const {
+ return QTime(0, 0, 0, 0);
+}
+
+QTime RuleSet::beforeMidnight() const {
+ return QTime(23,59,59,999);
+}
+
+int RuleSet::checkRuleFile(const QString &rulefile) {
+ if(rulefile == NULL) {
+ fputs(i18n("kppp: no rulefile specified\n").local8Bit(), stderr);
+ return 1;
+ }
+
+ QFile fl(rulefile);
+ if(!fl.exists()) {
+ fprintf(stderr, i18n("kppp: rulefile \"%s\" not found\n").local8Bit(), rulefile.local8Bit().data());
+ return 1;
+ }
+
+ if(rulefile.right(4) != ".rst") {
+ fputs(i18n("kppp: rulefiles must have the extension \".rst\"\n").local8Bit(), stderr);
+ return 1;
+ }
+
+ RuleSet r;
+ int err = r.load(rulefile);
+ fl.close();
+
+ if(err == -1) {
+ fputs(i18n("kppp: error parsing the ruleset\n").local8Bit(), stderr);
+ return 1;
+ }
+
+ if(err > 0) {
+ fprintf(stderr, i18n("kppp: parse error in line %d\n").local8Bit(), err);
+ return 1;
+ }
+
+ // check for the existance of a default rule
+ if((r.default_costs < 0) || (r.default_len < 0)) {
+ fputs(i18n("kppp: rulefile does not contain a default rule\n").local8Bit(), stderr);
+ return 1;
+ }
+
+ if(r.name().length() == 0) {
+ fputs(i18n("kppp: rulefile does not contain a \"name=...\" line\n").local8Bit(), stderr);
+ return 1;
+ }
+
+ fputs(i18n("kppp: rulefile is ok\n").local8Bit(), stderr);
+ return 0;
+}
+
diff --git a/kppp/ruleset.h b/kppp/ruleset.h
new file mode 100644
index 00000000..a6881ef2
--- /dev/null
+++ b/kppp/ruleset.h
@@ -0,0 +1,146 @@
+/* -*- C++ -*-
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was contributed by Mario Weilguni <mweilguni@sime.com>
+ * Thanks Mario !
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __RULESET__H__
+#define __RULESET__H__
+
+#include <qmemarray.h>
+#include <qdatetime.h>
+#include <qstring.h>
+
+// this structure is used to save
+// accounting rules
+typedef struct RULE {
+ int type;
+ double costs;
+ double len;
+ double after;
+ QTime from, until;
+ struct {
+ QDate from, until;
+ } date;
+ struct {
+ int from, until;
+ } weekday;
+};
+
+// this class is used for loading and parsing of rules
+class RuleSet {
+public:
+ /// create an empty rule
+ RuleSet();
+
+ /// gcc needs a destructor (otherwise compiler error)
+ ~RuleSet() {};
+
+ /// returns the name of the ruleset
+ QString name() const;
+
+ /** Load a ruleset from a file. If an error occurs,
+ * returns the linenumber the error was in,
+ * otherwise 0. If the file could not be opened,
+ * returns -1
+ */
+ int load(const QString &filename);
+
+ /// returns the currency symbol
+ QString currencySymbol() const;
+
+ /** returns a string representation of the
+ * of a doubleingpoint number using the
+ * currency-settings
+ */
+ QString currencyString(double val) const;
+
+ /// sets the start time -- must be called when the connection has bee established
+ void setStartTime(QDateTime dt);
+
+ /// returns the "per-connection" costs
+ double perConnectionCosts() const;
+
+ /** returns the minimum number of costs (some
+ * phony companies have this
+ */
+ double minimumCosts() const;
+
+ /// returns the currently valid rule settings
+ void getActiveRule(QDateTime dt, double connect_time, double &costs, double &len);
+
+ /// checks if a rulefile is ok (no parse errors...)
+ static int checkRuleFile(const QString &);
+
+protected:
+ /** converts an english name of a day to integer,
+ * beginning with monday=0 .. sunday=6
+ */
+ int dayNameToInt(const char *s);
+
+ /// returns the date of easter-sunday for a year
+ static QDate get_easter(int year);
+
+ /// add a rule to this ruleset
+ void addRule(RULE r);
+
+ /// parses on entry of the "on(...)" fields
+ bool parseEntry(RULE &ret, QString s, int year);
+
+ /// parses the "on(...)" fields
+ bool parseEntries(QString s, int year,
+ QTime t1, QTime t2,
+ double costs, double len, double after);
+
+ /// parses the "between(...)" time fields
+ bool parseTime(QTime &t1, QTime &t2, QString s);
+
+ /// parses the "use(...)" fields
+ bool parseRate(double &costs, double &len, double &after, QString s);
+
+ /// parses a whole line
+ bool parseLine(const QString &line);
+
+ /// returns midnight time (00:00:00.000)
+ QTime midnight() const;
+
+ /// returns the last valid time BEFORE midnight
+ QTime beforeMidnight() const;
+
+protected:
+ QString _name;
+ QString _currency_symbol;
+ QDateTime starttime;
+ int _currency_digits;
+ double default_costs;
+ double _minimum_costs;
+ double default_len;
+ double pcf;
+ bool have_flat_init_costs;
+ double flat_init_duration;
+ double flat_init_costs;
+
+ QMemArray<RULE> rules;
+};
+
+#endif
diff --git a/kppp/runtests.cpp b/kppp/runtests.cpp
new file mode 100644
index 00000000..63fa0794
--- /dev/null
+++ b/kppp/runtests.cpp
@@ -0,0 +1,278 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was contributed by Mario Weilguni <mweilguni@sime.com>
+ * Thanks Mario !
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <qdir.h>
+#include "runtests.h"
+#include <ctype.h>
+#include <unistd.h>
+#include <kmessagebox.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <netinet/in.h>
+
+#ifdef HAVE_RESOLV_H
+#include <arpa/nameser.h>
+#include <resolv.h>
+#endif
+
+#ifndef _PATH_RESCONF
+#define _PATH_RESCONF "/etc/resolv.conf"
+#endif
+
+#include <klocale.h>
+#include "pppdata.h"
+
+// initial effective uid (main.cpp)
+extern uid_t euid;
+
+// secure pppd location (opener.cpp)
+extern const char* pppdPath();
+
+// shamelessly stolen from pppd-2.3.5
+/********************************************************************
+ *
+ * Internal routine to decode the version.modification.patch level
+ */
+
+static void decode_version (const char *_buf, int *version,
+ int *modification, int *patch)
+ {
+ char *buffer = qstrdup(_buf);
+ char *buf = buffer;
+ *version = (int) strtoul (buf, &buf, 10);
+ *modification = 0;
+ *patch = 0;
+
+ if (*buf == '.')
+ {
+ ++buf;
+ *modification = (int) strtoul (buf, &buf, 10);
+ if (*buf == '.')
+ {
+ ++buf;
+ *patch = (int) strtoul (buf, &buf, 10);
+ }
+ }
+
+ if (*buf != '\0')
+ {
+ *version =
+ *modification =
+ *patch = 0;
+ }
+
+ delete [] buffer;
+ }
+
+
+void pppdVersion(int *version, int *modification, int *patch) {
+ char buffer[30];
+ const char *pppd;
+ char *query;
+
+ *version = *modification = *patch = 0;
+
+ // locate pppd
+ if(!(pppd = pppdPath()))
+ return;
+
+ // call pppd with --version option
+ if(!(query = new char[strlen(pppd)+25]))
+ return;
+ strcpy(query, pppd);
+ // had to add a dummy device to prevent a "no device specified
+ // and stdin is not a tty" error from newer pppd versions.
+ strcat(query, " --version /dev/tty 2>&1");
+ fflush(0L);
+ FILE *output = popen(query, "r");
+ delete [] query;
+ if(!output)
+ return;
+
+ // read output
+ int size = fread(buffer, sizeof(char), 29, output);
+
+ if(ferror(output)) {
+ pclose(output);
+ return;
+ }
+ pclose(output);
+ buffer[size] = '\0';
+
+ // find position of version number x.y.z
+ char *p = buffer;
+ while(*p && !isdigit(*p))
+ p++;
+ if (*p == 0)
+ return;
+ char *p2 = p;
+ while(*p2 == '.' || isdigit(*p2))
+ p2++;
+ *p2 = '\0';
+
+ decode_version(p, version, modification, patch);
+}
+
+
+int uidFromName(const char *uname) {
+ struct passwd *pw;
+
+ setpwent();
+ while((pw = getpwent()) != NULL) {
+ if(strcmp(uname, pw->pw_name) == 0) {
+ int uid = pw->pw_uid;
+ endpwent();
+ return uid;
+ }
+ }
+
+ endpwent();
+ return -1;
+}
+
+
+const char *homedirFromUid(uid_t uid) {
+ struct passwd *pw;
+ char *d = 0;
+
+ setpwent();
+ while((pw = getpwent()) != NULL) {
+ if(pw->pw_uid == uid) {
+ d = strdup(pw->pw_dir);
+ endpwent();
+ return d;
+ }
+ }
+
+ endpwent();
+ return d;
+}
+
+
+const char* getHomeDir() {
+ static const char *hd = 0;
+ static bool ranTest = false;
+ if(!ranTest) {
+ hd = homedirFromUid(getuid());
+ ranTest = true;
+ }
+
+ return hd;
+}
+
+
+int runTests() {
+ int warning = 0;
+
+ // Test pre-1: check if the user is allowed to dial-out
+ if(access("/etc/kppp.allow", R_OK) == 0 && getuid() != 0) {
+ bool access = FALSE;
+ FILE *f;
+ if((f = fopen("/etc/kppp.allow", "r")) != NULL) {
+ char buf[2048]; // safe
+ while(f != NULL && !feof(f)) {
+ if(fgets(buf, sizeof(buf), f) != NULL) {
+ QString s(buf);
+
+ s = s.stripWhiteSpace();
+ if(s[0] == '#' || s.length() == 0)
+ continue;
+
+ if((uid_t)uidFromName(QFile::encodeName(s)) == getuid()) {
+ access = TRUE;
+ fclose(f);
+ f = NULL;
+ }
+ }
+ }
+ if(f)
+ fclose(f);
+ }
+
+ if(!access) {
+ KMessageBox::error(0,
+ i18n("You're not allowed to dial out with "
+ "kppp.\nContact your system administrator."));
+ return TEST_CRITICAL;
+ }
+ }
+
+ // Test 1: search the pppd binary
+ const char *f = pppdPath();
+
+ if(!f) {
+ KMessageBox::error(0,
+ i18n("Cannot find the PPP daemon!\n"
+ "Make sure that pppd is installed."));
+ warning++;
+ }
+
+ // Test 2: check access to the pppd binary
+ if(f) {
+#if 0
+ if(access(f, X_OK) != 0 /* && geteuid() != 0 */) {
+ KMessageBox::error(0,
+ i18n("You do not have the permission "
+ "to start pppd!\n"
+ "Contact your system administrator "
+ "and ask to get access to pppd."));
+ return TEST_CRITICAL;
+ }
+#endif
+
+ if(euid != 0) {
+ struct stat st;
+ stat(f, &st);
+ if(st.st_uid != 0 || (st.st_mode & S_ISUID) == 0) {
+ KMessageBox::error(0,
+ i18n("You don't have sufficient permission to run\n"
+ "%1\n"
+ "Please make sure that kppp is owned by root "
+ "and has the SUID bit set.").arg(f));
+ warning++;
+ }
+ }
+ }
+
+ // Test 5: check for existence of /etc/resolv.conf
+ if (access(_PATH_RESCONF, R_OK) != 0) {
+ QString file = _PATH_RESCONF" ";
+ QString msgstr = i18n("%1 is missing or can't be read!\n"
+ "Ask your system administrator to create "
+ "this file (can be empty) with appropriate "
+ "read and write permissions.").arg(file);
+ KMessageBox::error(0, msgstr);
+ warning ++;
+ }
+
+ if(warning == 0)
+ return TEST_OK;
+ else
+ return TEST_WARNING;
+}
+
diff --git a/kppp/runtests.h b/kppp/runtests.h
new file mode 100644
index 00000000..1b8fc65a
--- /dev/null
+++ b/kppp/runtests.h
@@ -0,0 +1,47 @@
+/*
+ * kPPP: A pppd front end for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * This file was contributed by Mario Weilguni <mweilguni@sime.com>
+ * Thanks Mario !
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __RUNTESTS__H__
+#define __RUNTESTS__H__
+
+#define SYSOPTIONS "/etc/ppp/options"
+
+const int TEST_OK = 0;
+const int TEST_WARNING = 1;
+const int TEST_NOCONNECT = 2;
+const int TEST_CRITICAL = 3;
+
+// Various tests to be run at starttime
+int runTests();
+const char* getHomeDir();
+void pppdVersion(int *version, int *modification, int *patch);
+
+#ifdef __linux__
+bool ppp_available(void);
+#endif
+
+#endif
+
diff --git a/kppp/scriptedit.cpp b/kppp/scriptedit.cpp
new file mode 100644
index 00000000..56487ce1
--- /dev/null
+++ b/kppp/scriptedit.cpp
@@ -0,0 +1,174 @@
+
+/*
+ * kPPP: A front end for pppd for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "scriptedit.h"
+#include <qlayout.h>
+#include <qcombobox.h>
+#include <qlineedit.h>
+
+ScriptEdit::ScriptEdit( QWidget *parent, const char *name )
+ : QWidget(parent, name)
+{
+ QHBoxLayout *tl = new QHBoxLayout(this, 0, 10);
+
+ st = new QComboBox(this, "st");
+ st->insertItem("Expect");
+ st->insertItem("Send");
+ st->insertItem("Pause (sec)");
+ st->insertItem("Hangup");
+ st->insertItem("Answer");
+ st->insertItem("Timeout (sec)");
+ st->insertItem("Password");
+ st->insertItem("ID");
+ st->insertItem("Prompt");
+ st->insertItem("PWPrompt");
+ st->insertItem("LoopStart");
+ st->insertItem("LoopEnd");
+ st->insertItem("Scan");
+ st->insertItem("Save");
+ st->insertItem("SendNoEcho");
+ connect(st, SIGNAL(activated(int)), SLOT(setType(int)));
+
+ se = new QLineEdit(this, "se");
+ se->setGeometry(120, 5, 140, 25);
+ se->setMaxLength(50);
+ connect(se, SIGNAL(returnPressed()), SLOT(seReturnPressed()));
+
+ tl->addWidget(st, 3);
+ tl->addWidget(se, 7);
+
+ setType(0);
+
+ tl->activate();
+}
+
+
+void ScriptEdit::setEnabled(bool b) {
+ se->setEnabled(b);
+ st->setEnabled(b);
+}
+
+void ScriptEdit::seReturnPressed() {
+ emit returnPressed();
+}
+
+
+QString ScriptEdit::text()const {
+ return se->text();
+}
+
+void ScriptEdit::setText(const QString &t) {
+ se->setText(t);
+}
+
+
+int ScriptEdit::type()const {
+ return st->currentItem();
+}
+
+void ScriptEdit::setType(int i) {
+ switch(i) {
+ case Expect:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case Send:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case Pause:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case Hangup:
+ se->setText("");
+ se->setEnabled(FALSE);
+ break;
+
+ case Answer:
+ se->setText("");
+ se->setEnabled(FALSE);
+ break;
+
+ case Timeout:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case Password:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case ID:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case Prompt:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case PWPrompt:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case LoopStart:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case LoopEnd:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case Scan:
+ se->setText("");
+ se->setEnabled(TRUE);
+ break;
+
+ case Save:
+ se->setText("password");
+ se->setEnabled(FALSE);
+ break;
+
+ default: break;
+ }
+}
+
+#include "scriptedit.moc"
+
+
+
+
+
diff --git a/kppp/scriptedit.h b/kppp/scriptedit.h
new file mode 100644
index 00000000..3f2a4535
--- /dev/null
+++ b/kppp/scriptedit.h
@@ -0,0 +1,79 @@
+
+/*
+ * kPPP: A front end for pppd for the KDE project
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997 Bernd Johannes Wuebben
+ * wuebben@math.cornell.edu
+ *
+ * based on EzPPP:
+ * Copyright (C) 1997 Jay Painter
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _SCRIPTEDIT_H_
+#define _SCRIPTEDIT_H_
+
+#include <qwidget.h>
+
+class QComboBox;
+class QLineEdit;
+
+class ScriptEdit : public QWidget {
+Q_OBJECT
+public:
+ ScriptEdit( QWidget *parent=0, const char *name=0 );
+ ~ScriptEdit() {}
+
+ QString text()const;
+ void setText(const QString &);
+ int type()const;
+
+ virtual void setEnabled(bool);
+
+signals:
+ void returnPressed();
+
+private slots:
+ void setType(int);
+ void seReturnPressed();
+
+private:
+ QComboBox *st;
+ QLineEdit *se;
+
+public:
+ enum setypes { Expect = 0,
+ Send = 1,
+ Pause = 2,
+ Hangup = 3,
+ Answer = 4,
+ Timeout = 5,
+ Password = 6,
+ ID = 7,
+ Prompt = 8,
+ PWPrompt = 9,
+ LoopStart = 10,
+ LoopEnd = 11,
+ Scan = 12,
+ Save = 13,
+ SendNoEcho = 14
+ };
+};
+
+#endif
+
diff --git a/kppp/utils.cpp b/kppp/utils.cpp
new file mode 100644
index 00000000..17fe62ea
--- /dev/null
+++ b/kppp/utils.cpp
@@ -0,0 +1,66 @@
+//---------------------------------------------------------------------------
+//
+// kPPP: A pppd front end for the KDE project
+//
+//---------------------------------------------------------------------------
+//
+// (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+// (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+// (c) 1998-1999 Harri Porten <porten@kde.org>
+//
+// derived from Jay Painters "ezppp"
+//
+//---------------------------------------------------------------------------
+//
+// $Id$
+//
+//---------------------------------------------------------------------------
+//
+// This program is free software; you can redistribute it and-or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//---------------------------------------------------------------------------
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#include <unistd.h>
+#include <stdio.h>
+#include <limits.h>
+
+#include "utils.h"
+#include "kpppconfig.h"
+
+// in case of error, we simply return "0" and hope it's ok :-)
+int pppInterfaceNumber() {
+ char ifname[PATH_MAX];
+
+ for(int i = 0; i < 8; i++) {
+ snprintf(ifname, sizeof(ifname), "%s/ppp%d.pid", PPP_PID_DIR, i);
+ if(access(ifname, F_OK) == -1)
+ return i;
+ }
+
+ // panic
+ fprintf(stderr, "pppInterfaceNumber: cannot detect ppp interface number!\n");
+ return 0;
+}
+
diff --git a/kppp/utils.h b/kppp/utils.h
new file mode 100644
index 00000000..1186eb5e
--- /dev/null
+++ b/kppp/utils.h
@@ -0,0 +1,44 @@
+//---------------------------------------------------------------------------
+//
+// kPPP: A pppd front end for the KDE project
+//
+//---------------------------------------------------------------------------
+//
+// (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
+// (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
+// (c) 1998-1999 Harri Porten <porten@kde.org>
+//
+// derived from Jay Painters "ezppp"
+//
+//---------------------------------------------------------------------------
+//
+// $Id$
+//
+//---------------------------------------------------------------------------
+//
+// This program is free software; you can redistribute it and-or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this program; if not, write to the Free
+// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//---------------------------------------------------------------------------
+
+#ifndef __UTILS__H__
+#define __UTILS__H__
+
+// return the number the PPP interface will get (HACK: of course this
+// may fail, if another interface comes up between the result of this
+// function and the desired ppp interface to come up. If used rightly,
+// itīs very unlikely that this fails)
+int pppInterfaceNumber();
+
+#endif
diff --git a/kppp/version.h b/kppp/version.h
new file mode 100644
index 00000000..57566fc7
--- /dev/null
+++ b/kppp/version.h
@@ -0,0 +1,3 @@
+#ifndef KPPPVERSION
+#define KPPPVERSION "2.3.2"
+#endif