From 3aaf68f6c830bcd8f1f84f147a55c175a57eb1b2 Mon Sep 17 00:00:00 2001 From: luethje Date: Thu, 26 Jun 1997 21:25:14 +0000 Subject: [PATCH] Added the trigger function to the config file. --- isdnctrl/ctrlconf.c | 18 +++++++++++++++++- isdnctrl/ctrlconf.h | 6 +++++- isdnctrl/isdnctrl.man.in | 27 ++++++++++++++++++--------- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/isdnctrl/ctrlconf.c b/isdnctrl/ctrlconf.c index dda93a28..2d2ec2af 100644 --- a/isdnctrl/ctrlconf.c +++ b/isdnctrl/ctrlconf.c @@ -1,4 +1,4 @@ -/* $Id: ctrlconf.c,v 1.1 1997/06/24 23:35:25 luethje Exp $ +/* $Id: ctrlconf.c,v 1.2 1997/06/26 21:25:14 luethje Exp $ * * ISDN accounting for isdn4linux. (Utilities) * @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: ctrlconf.c,v $ + * Revision 1.2 1997/06/26 21:25:14 luethje + * Added the trigger function to the config file. + * * Revision 1.1 1997/06/24 23:35:25 luethje * isdnctrl can use a config file * @@ -221,6 +224,10 @@ static char* readoptions(int fd, char *name, int is_master, section *CSec, secti if (Set_Entry(SubSec,interface,CONF_ENT_SDELAY, string, C_OVERWRITE | C_WARN) == NULL) return NULL; + sprintf(string,"%d",cfg.triggercps); + if (Set_Entry(SubSec,interface,CONF_ENT_TRIGGERCPS, string, C_OVERWRITE | C_WARN) == NULL) + return NULL; + RetCode = cfg.slave; } @@ -480,6 +487,15 @@ int readconfig(int fd, char *file) exec_args(fd,3,argv); } else + if (!strcmp(Entry->name,CONF_ENT_TRIGGERCPS)) + { + argv[0] = cmds[TRIGGER].cmd; + argv[1] = name; + argv[2] = Entry->value; + argv[3] = NULL; + exec_args(fd,3,argv); + } + else { fprintf(stderr,"Unknown entry `%s' in interface section `%s'!\n",Entry->name,name); return -1; diff --git a/isdnctrl/ctrlconf.h b/isdnctrl/ctrlconf.h index d2fe6c43..5450a9cf 100644 --- a/isdnctrl/ctrlconf.h +++ b/isdnctrl/ctrlconf.h @@ -1,4 +1,4 @@ -/* $Id: ctrlconf.h,v 1.1 1997/06/24 23:35:26 luethje Exp $ +/* $Id: ctrlconf.h,v 1.2 1997/06/26 21:25:15 luethje Exp $ * * ISDN accounting for isdn4linux. (Utilities) * @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: ctrlconf.h,v $ + * Revision 1.2 1997/06/26 21:25:15 luethje + * Added the trigger function to the config file. + * * Revision 1.1 1997/06/24 23:35:26 luethje * isdnctrl can use a config file * @@ -51,6 +54,7 @@ #define CONF_ENT_ENCAP "ENCAP" #define CONF_ENT_SDELAY "SDELAY" #define CONF_ENT_ADDSLAVE "ADDSLAVE" +#define CONF_ENT_TRIGGERCPS "TRIGGER" #define CONF_ENT_BIND "BIND" #define CONF_ENT_PPPBIND "PPPBIND" diff --git a/isdnctrl/isdnctrl.man.in b/isdnctrl/isdnctrl.man.in index 04cd2871..421d4f5d 100755 --- a/isdnctrl/isdnctrl.man.in +++ b/isdnctrl/isdnctrl.man.in @@ -1,11 +1,14 @@ #!/bin/sh -# $Id: isdnctrl.man.in,v 1.2 1997/06/26 21:01:25 luethje Exp $ +# $Id: isdnctrl.man.in,v 1.3 1997/06/26 21:25:16 luethje Exp $ # -# Makefile for isdnctrl manpage generation -# (C) 1997 Fritz Elfert +# Generator for isdnctrl manpage +# (C) 1997 Stefan Luethje # # # $Log: isdnctrl.man.in,v $ +# Revision 1.3 1997/06/26 21:25:16 luethje +# Added the trigger function to the config file. +# # Revision 1.2 1997/06/26 21:01:25 luethje # bugfix # @@ -418,18 +421,24 @@ Allowed values are "rawip", "ip", "cisco_h", "ethernet", "syncppp" and "uihdlc". .B Example: ENCAP = rawip .TP 5 -.B SDELAY -Set the delay in seconds for the slave-dialing. - -.B Example: -SDELAY = 0 -.TP 5 .B ADDSLAVE Adds a slave interface for channel-bundling. .B Example: ADDSLAVE = s-ippp0 .TP 5 +.B SDELAY +Set the delay in seconds for the slave-dialing. + +.B Example: +SDELAY = 10 +.TP 5 +.B TRIGGER +Set trigger level for slave-dialing. + +.B Example: +TRIGGER = 5 +.TP 5 .B BIND Binds the current interface to a specific physical channel. Before and after the comma may not be a blank.