- New interface to get adsl parameters for Fritz!Card DSL.
This commit is contained in:
parent
91904c11da
commit
2772cfde2b
|
@ -12,6 +12,7 @@ export TOPDIR=$(shell pwd)
|
|||
export CAPIINC=$(TOPDIR)/../capi20
|
||||
export CAPILIB=$(TOPDIR)/../capi20
|
||||
export INSTALL=$(TOPDIR)/install-sh -c
|
||||
export INSTALLDATA=$(TOPDIR)/install-sh -c -m 644
|
||||
export MKDIR=$(TOPDIR)/mkinstalldirs
|
||||
|
||||
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
|
||||
|
||||
PEERDIR=${DESTDIR}/etc/ppp/peers/isdn
|
||||
DRDSLDIR=${DESTDIR}/etc/drdsl
|
||||
PEERS= arcor otelo talkline avm avm-ml leased
|
||||
DRDSLFILES = adsl.conf
|
||||
|
||||
ALL = capiplugin.so userpass.so
|
||||
|
||||
|
@ -47,11 +50,22 @@ install-peers:
|
|||
$(INSTALL) peers/$$i $(PEERDIR); \
|
||||
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:
|
||||
for i in ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man; do \
|
||||
if [ -d $$i/man8 ] ; then \
|
||||
echo $(INSTALL) capiplugin.8 $$i/man8; \
|
||||
$(INSTALL) capiplugin.8 $$i/man8; \
|
||||
echo $(INSTALLDATA) capiplugin.8 $$i/man8; \
|
||||
$(INSTALLDATA) capiplugin.8 $$i/man8; \
|
||||
fi ; \
|
||||
done
|
||||
|
||||
|
@ -61,6 +75,7 @@ install: pversion
|
|||
$(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
|
||||
done
|
||||
$(MAKE) install-peers
|
||||
$(MAKE) install-drdsl
|
||||
$(MAKE) install-man
|
||||
|
||||
srcsetup:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.\" manual page [] for capiplugin 2.3
|
||||
.\" $Id: capiplugin.8,v 1.8 2002/03/26 10:45:50 calle Exp $
|
||||
.\" $Id: capiplugin.8,v 1.9 2002/04/10 15:09:42 calle Exp $
|
||||
.\" SH section heading
|
||||
.\" SS subsection heading
|
||||
.\" LP paragraph
|
||||
|
@ -227,6 +227,13 @@ Other possible 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
|
||||
.B cbdelay \fI<seconds>
|
||||
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.
|
||||
|
||||
.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,
|
||||
the \fIsync\fR option must be added to the pppd.
|
||||
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.
|
||||
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.
|
||||
|
||||
.TP
|
||||
|
|
|
@ -26,7 +26,11 @@
|
|||
#include <linux/if.h>
|
||||
#include <linux/in.h>
|
||||
|
||||
static char *revision = "$Revision: 1.23 $";
|
||||
static char *revision = "$Revision: 1.24 $";
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
#define AVMADSLPARAMFILE "/etc/drdsl/adsl.conf"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
|
@ -90,7 +94,7 @@ static capi_contrinfo cinfo = { 0 , 0, 0 };
|
|||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
static char *opt_controller = "1";
|
||||
static char *opt_controller;
|
||||
/*
|
||||
* numbers
|
||||
*/
|
||||
|
@ -118,6 +122,7 @@ static STRINGLIST *inmsns;
|
|||
#define PROTO_ADSLPPPOALLC 8
|
||||
static char *opt_proto = "hdlc";
|
||||
static int proto = PROTO_HDLC;
|
||||
static int opt_avmadsl = 0;
|
||||
static int opt_vpi = -1; /* T-DSL: 1 */
|
||||
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 optacceptdelay(void) { return opt_acceptdelayflag = 1; }
|
||||
static int optvoicecallwakeup(void) { return opt_voicecallwakeup = 1; }
|
||||
static int optavmadsl(void) { return opt_avmadsl = 1; }
|
||||
|
||||
static option_t my_options[] = {
|
||||
{
|
||||
|
@ -248,6 +254,10 @@ static option_t my_options[] = {
|
|||
"vci", o_int, &opt_vci,
|
||||
"VCI for Fritz!Card DSL"
|
||||
},
|
||||
{
|
||||
"avmadsl", o_special_noarg, &optavmadsl,
|
||||
"read DSL parameters from /etc/drdsl/adsl.conf"
|
||||
},
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -359,6 +369,18 @@ static void plugin_check_options(void)
|
|||
return;
|
||||
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
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
controller 2
|
||||
protocol adslpppoe
|
||||
vpi 1
|
||||
vci 32
|
|
@ -27,7 +27,6 @@ password 00000000
|
|||
linkname t-dsl
|
||||
ipparam internet
|
||||
plugin capiplugin.so
|
||||
controller 2
|
||||
protocol adslpppoe
|
||||
avmadsl
|
||||
:
|
||||
/dev/null
|
||||
|
|
Loading…
Reference in New Issue