- New interface to get adsl parameters for Fritz!Card DSL.
This commit is contained in:
parent
d6fdcd3f06
commit
08ce73d2b0
|
@ -12,6 +12,7 @@ export TOPDIR=$(shell pwd)
|
||||||
export CAPIINC=$(TOPDIR)/../capi20
|
export CAPIINC=$(TOPDIR)/../capi20
|
||||||
export CAPILIB=$(TOPDIR)/../capi20
|
export CAPILIB=$(TOPDIR)/../capi20
|
||||||
export INSTALL=$(TOPDIR)/install-sh -c
|
export INSTALL=$(TOPDIR)/install-sh -c
|
||||||
|
export INSTALLDATA=$(TOPDIR)/install-sh -c -m 644
|
||||||
export MKDIR=$(TOPDIR)/mkinstalldirs
|
export MKDIR=$(TOPDIR)/mkinstalldirs
|
||||||
|
|
||||||
PPPSRCDIRS=/src/isdn/pppd
|
PPPSRCDIRS=/src/isdn/pppd
|
||||||
|
@ -21,7 +22,9 @@ PPPVERSIONS = 2.3.11 2.4.0 2.4.1 2.4.1b1 2.4.1b2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PEERDIR=${DESTDIR}/etc/ppp/peers/isdn
|
PEERDIR=${DESTDIR}/etc/ppp/peers/isdn
|
||||||
|
DRDSLDIR=${DESTDIR}/etc/drdsl
|
||||||
PEERS= arcor otelo talkline avm avm-ml leased
|
PEERS= arcor otelo talkline avm avm-ml leased
|
||||||
|
DRDSLFILES = adsl.conf
|
||||||
|
|
||||||
ALL = capiplugin.so userpass.so
|
ALL = capiplugin.so userpass.so
|
||||||
|
|
||||||
|
@ -47,11 +50,22 @@ install-peers:
|
||||||
$(INSTALL) peers/$$i $(PEERDIR); \
|
$(INSTALL) peers/$$i $(PEERDIR); \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
install-drdsl:
|
||||||
|
$(MKDIR) $(DRDSLDIR)
|
||||||
|
@for i in $(DRDSLFILES); do \
|
||||||
|
if [ -f $(DRDSLDIR)/$$i ] ; then \
|
||||||
|
echo $(DRDSLDIR)/$$i already exists ; \
|
||||||
|
else \
|
||||||
|
echo $(INSTALLDATA) examples/$$i $(DRDSLDIR); \
|
||||||
|
$(INSTALLDATA) examples/$$i $(DRDSLDIR); \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
|
||||||
install-man:
|
install-man:
|
||||||
for i in ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man; do \
|
for i in ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man; do \
|
||||||
if [ -d $$i/man8 ] ; then \
|
if [ -d $$i/man8 ] ; then \
|
||||||
echo $(INSTALL) capiplugin.8 $$i/man8; \
|
echo $(INSTALLDATA) capiplugin.8 $$i/man8; \
|
||||||
$(INSTALL) capiplugin.8 $$i/man8; \
|
$(INSTALLDATA) capiplugin.8 $$i/man8; \
|
||||||
fi ; \
|
fi ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -61,6 +75,7 @@ install: pversion
|
||||||
$(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
|
$(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
|
||||||
done
|
done
|
||||||
$(MAKE) install-peers
|
$(MAKE) install-peers
|
||||||
|
$(MAKE) install-drdsl
|
||||||
$(MAKE) install-man
|
$(MAKE) install-man
|
||||||
|
|
||||||
srcsetup:
|
srcsetup:
|
||||||
|
|
|
@ -227,6 +227,13 @@ Other possible options:
|
||||||
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B avmadsl
|
||||||
|
make an DSL connection with the Fritz!Card DSL controller.
|
||||||
|
The parameters for the DSL connection will be loaded from
|
||||||
|
file /etc/drdsl/adsl.conf. This file can be edited or will
|
||||||
|
be created by the program drdsl.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B cbdelay \fI<seconds>
|
.B cbdelay \fI<seconds>
|
||||||
Number of seconds to wait before callback, when acting as
|
Number of seconds to wait before callback, when acting as
|
||||||
|
@ -320,14 +327,12 @@ See option \fIdialmax\fR.
|
||||||
phone number to dial to access an outside line. For example, \fInumberprefix 0\fR.
|
phone number to dial to access an outside line. For example, \fInumberprefix 0\fR.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B protocol \fIhdlc\fR | \fIx75\fR | \fIv42bis\fR | \fImodem\fR | \fIadslpppoe\fR | \fIv110async\fR | \fIv120async\fR
|
.B protocol \fIhdlc\fR | \fIx75\fR | \fIv42bis\fR | \fImodem\fR | \fIv110async\fR | \fIv120async\fR
|
||||||
ISDN protocol to use. With \fIhdlc\fR and \fIadskpppoe\fR,
|
ISDN protocol to use. With \fIhdlc\fR and \fIadskpppoe\fR,
|
||||||
the \fIsync\fR option must be added to the pppd.
|
the \fIsync\fR option must be added to the pppd.
|
||||||
With \fIx75\fR, \fIv42bis\fR, \fImodem\fR, \fIv110async\fR and \fIv120async\fR
|
With \fIx75\fR, \fIv42bis\fR, \fImodem\fR, \fIv110async\fR and \fIv120async\fR
|
||||||
the \fIsync\fR option MUST NOT be enabled. Default value is \fIhdlc\fR.
|
the \fIsync\fR option MUST NOT be enabled. Default value is \fIhdlc\fR.
|
||||||
Not all controllers support \fIv42bis\fR, \fImodem\fR and \fIv120async\fR.
|
Not all controllers support \fIv42bis\fR, \fImodem\fR and \fIv120async\fR.
|
||||||
\fIadslpppoe\fR is currently only supported by the second
|
|
||||||
controller of the FRITZ!Card DSL.
|
|
||||||
Use capiinfo(8) to view which features your controller supports.
|
Use capiinfo(8) to view which features your controller supports.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -30,6 +30,10 @@ static char *revision = "$Revision$";
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#define AVMADSLPARAMFILE "/etc/drdsl/adsl.conf"
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "patchlevel.h"
|
#include "patchlevel.h"
|
||||||
#ifdef VERSION
|
#ifdef VERSION
|
||||||
char pppd_version[] = VERSION;
|
char pppd_version[] = VERSION;
|
||||||
|
@ -90,7 +94,7 @@ static capi_contrinfo cinfo = { 0 , 0, 0 };
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
static char *opt_controller = "1";
|
static char *opt_controller;
|
||||||
/*
|
/*
|
||||||
* numbers
|
* numbers
|
||||||
*/
|
*/
|
||||||
|
@ -118,6 +122,7 @@ static STRINGLIST *inmsns;
|
||||||
#define PROTO_ADSLPPPOALLC 8
|
#define PROTO_ADSLPPPOALLC 8
|
||||||
static char *opt_proto = "hdlc";
|
static char *opt_proto = "hdlc";
|
||||||
static int proto = PROTO_HDLC;
|
static int proto = PROTO_HDLC;
|
||||||
|
static int opt_avmadsl = 0;
|
||||||
static int opt_vpi = -1; /* T-DSL: 1 */
|
static int opt_vpi = -1; /* T-DSL: 1 */
|
||||||
static int opt_vci = -1; /* T-DSL: 32 */
|
static int opt_vci = -1; /* T-DSL: 32 */
|
||||||
/*
|
/*
|
||||||
|
@ -161,6 +166,7 @@ static int opt_voicecallwakeup = 0;
|
||||||
static int optcb(void) { return opt_cbflag = 1; }
|
static int optcb(void) { return opt_cbflag = 1; }
|
||||||
static int optacceptdelay(void) { return opt_acceptdelayflag = 1; }
|
static int optacceptdelay(void) { return opt_acceptdelayflag = 1; }
|
||||||
static int optvoicecallwakeup(void) { return opt_voicecallwakeup = 1; }
|
static int optvoicecallwakeup(void) { return opt_voicecallwakeup = 1; }
|
||||||
|
static int optavmadsl(void) { return opt_avmadsl = 1; }
|
||||||
|
|
||||||
static option_t my_options[] = {
|
static option_t my_options[] = {
|
||||||
{
|
{
|
||||||
|
@ -248,6 +254,10 @@ static option_t my_options[] = {
|
||||||
"vci", o_int, &opt_vci,
|
"vci", o_int, &opt_vci,
|
||||||
"VCI for Fritz!Card DSL"
|
"VCI for Fritz!Card DSL"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"avmadsl", o_special_noarg, &optavmadsl,
|
||||||
|
"read DSL parameters from /etc/drdsl/adsl.conf"
|
||||||
|
},
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -359,6 +369,18 @@ static void plugin_check_options(void)
|
||||||
return;
|
return;
|
||||||
init = 1;
|
init = 1;
|
||||||
|
|
||||||
|
if (opt_avmadsl) {
|
||||||
|
if (access(AVMADSLPARAMFILE, R_OK) == 0) {
|
||||||
|
dbglog("loading adsl parameters from %s ...", AVMADSLPARAMFILE);
|
||||||
|
if (options_from_file (AVMADSLPARAMFILE, 0, 0, 0) == 0)
|
||||||
|
die(1);
|
||||||
|
} else {
|
||||||
|
dbglog("using default adsl parameters");
|
||||||
|
if (!opt_controller) opt_controller = "2";
|
||||||
|
opt_proto = "adslpppoe";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* protocol
|
* protocol
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
controller 2
|
||||||
|
protocol adslpppoe
|
||||||
|
vpi 1
|
||||||
|
vci 32
|
|
@ -27,7 +27,6 @@ password 00000000
|
||||||
linkname t-dsl
|
linkname t-dsl
|
||||||
ipparam internet
|
ipparam internet
|
||||||
plugin capiplugin.so
|
plugin capiplugin.so
|
||||||
controller 2
|
avmadsl
|
||||||
protocol adslpppoe
|
|
||||||
:
|
:
|
||||||
/dev/null
|
/dev/null
|
||||||
|
|
Loading…
Reference in New Issue