#include "pppd.h"
#include "pathnames.h"
+#include "fsm.h"
+#include "lcp.h"
extern int DEB_DISC,DEB_DISC2;
bool demand = 0; /* do dial-on-demand */
char *ipparam = NULL; /* Extra parameter for ip up/down scripts */
int idle_time_limit = 0; /* Disconnect if idle for this many seconds */
-int holdoff = 3; /* # seconds to pause before reconnecting */
+int holdoff = 10; /* # seconds to pause before reconnecting */
bool holdoff_specified; /* true if a holdoff value has been given */
int log_to_fd = 1; /* send log messages to this fd too */
bool log_default = 1; /* log_to_fd is default (stdout) */
-int maxfail = 0; /* max # of unsuccessful connection attempts */
-//int maxfail = 10; /* max # of unsuccessful connection attempts */
+int maxfail = 10; /* max # of unsuccessful connection attempts */
char linkname[MAXPATHLEN]; /* logical name for link */
bool tune_kernel; /* may alter kernel settings */
int connect_delay = 1000; /* wait this many ms after connect script */
char oldsession[MAXPATHLEN]=""; /* Mac address and session ID of the previous session */
int srvdisc=0;
char req_name[MAXPATHLEN] = ""; /* logical name for link */
-
-int pppMtu=PPP_MRU; /* Maximum size of transmit packets */
+static char ip_addr[MAXPATHLEN] = ""; /* IP address */
extern option_t auth_options[];
extern struct stat devstat;
+extern int setipaddr(char *arg, char **argv, int doit);
+extern int setdevname_pppoe(const char *cp);
+extern int setdevname_pppoatm(const char *cp);
#ifdef PPP_FILTER
struct bpf_program pass_filter;/* Filter program for packets to pass */
char **argv;
{
int opt;
- char interface_num[8]="";
int retval, num[3];
- while ((opt = getopt(argc, argv, "s:xda:i:ku:p:o:lc:m:f:t:r:R")) != -1) {
+ while ((opt = getopt(argc, argv, "s:xda:i:ku:p:o:lc:m:f:t:r:RA:")) != -1) {
switch (opt) {
case 's':
autoscan = 1;
srvdisc=1;
break;
case 't':
- pppMtu = atoi(optarg); // USR9108
+ lcp_allowoptions[0].mru = atoi(optarg);
+ break;
+ case 'A':
+ strncpy(ip_addr, optarg, MAXPATHLEN);
+ ip_addr[strlen(ip_addr)] = ':';
+ setipaddr (ip_addr, NULL, 1);
break;
default:
- fprintf(stderr, "usage: %s [-s] [-b] [-d] [-i interface] [-a vcc] [-u username] [-p passwd] [-o idle] [-m prevmac/prevsid]\n", argv[0]);
+ fprintf(stderr, "usage: %s [-s] [-b] [-d] [-i interface] [-a vcc] [-u username] [-p passwd] [-o idle] [-m prevmac/prevsid] [-A ipaddr]\n", argv[0]);
return 0;
}
}