2
* Worldvisions Weaver Software:
3
* Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5
* Definition of the WvDialer smart-dialer class.
18
#include "wvpapchap.h"
19
#include "wvdialbrain.h"
21
#include "wvstreamclone.h"
22
#include "wvdialmon.h"
24
#define INBUF_SIZE 1024
25
#define DEFAULT_BAUD 57600U
27
extern const char wvdial_help_text[];
28
extern const char wvdial_version_text[];
34
WvString * str_member;
42
class WvDialer : public WvStreamClone
43
/***********************************/
46
WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode = false );
55
bool check_attempts_exceeded(int connect_attempts);
57
void pppd_watch( int w );
78
virtual bool pre_select(SelectInfo &si);
79
virtual bool isok() const;
83
char *connect_status() const;
88
friend class WvDialBrain;
107
WvString dial_prefix;
111
WvString login_prompt;
113
WvString pass_prompt;
115
WvString pppd_option;
118
WvString default_reply;
123
WvString dialmessage1;
124
WvString dialmessage2;
125
WvString dnstest1, dnstest2;
131
int abort_on_no_dialtone;
145
WvDialMon pppd_mon; // class to analyse messages of pppd
151
WvStringList *sect_list;
157
time_t auto_reconnect_delay;
158
time_t auto_reconnect_at;
173
WvString prompt_response;
178
void async_waitprompt();
182
// The following members are for the wait_for_modem() function.
183
int wait_for_modem( char *strs[], int timeout, bool neednewline,
184
bool verbose = true);
185
int async_wait_for_modem( char * strs[], bool neednewline,
186
bool verbose = true);
187
char buffer[ INBUF_SIZE + 1 ];
191
// Called from WvDialBrain::guess_menu()
192
bool is_pending() { return( modem->select( 1000 ) ); }
194
// These are used to read the messages of pppd
195
int pppd_msgfd[2]; // two fd of the pipe
196
WvStream *pppd_log; // to read messages of pppd
198
// These are used to pipe the password to pppd
199
int pppd_passwdfd[2]; // two fd of the pipe