Added the trigger function to the config file.

This commit is contained in:
luethje 1997-06-26 21:25:14 +00:00
parent a7e8bbb594
commit 3aaf68f6c8
3 changed files with 40 additions and 11 deletions

View File

@ -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;

View File

@ -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"

View File

@ -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.