1998-12-27 21:47:14 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1997 Joerg Wunsch. All rights reserved.
|
|
|
|
*
|
2002-03-26 15:13:54 +00:00
|
|
|
* Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved.
|
1998-12-27 21:47:14 +00:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
*---------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* i4b daemon - runtime configuration parser
|
|
|
|
* -----------------------------------------
|
|
|
|
*
|
1999-12-14 21:14:28 +00:00
|
|
|
* $FreeBSD$
|
|
|
|
*
|
2002-08-11 15:47:26 +00:00
|
|
|
* last edit-date: [Sun Aug 11 12:27:28 2002]
|
1998-12-27 21:47:14 +00:00
|
|
|
*
|
|
|
|
*---------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
%{
|
|
|
|
|
|
|
|
/* #define YYDEBUG 1 */
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
|
|
|
|
#include "monitor.h" /* monitor access rights bit definitions */
|
|
|
|
#include "isdnd.h"
|
|
|
|
|
|
|
|
#ifndef FALSE
|
|
|
|
# define FALSE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TRUE
|
|
|
|
# define TRUE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern void cfg_setval(int keyword);
|
1999-12-14 21:14:28 +00:00
|
|
|
extern void cfg_set_controller_default();
|
1998-12-27 21:47:14 +00:00
|
|
|
extern void reset_scanner(FILE *infile);
|
|
|
|
extern void yyerror(const char *msg);
|
|
|
|
extern int yylex();
|
|
|
|
|
|
|
|
extern int lineno;
|
|
|
|
extern char *yytext;
|
|
|
|
extern int nentries;
|
|
|
|
|
|
|
|
int saw_system = 0;
|
|
|
|
int entrycount = -1;
|
1999-12-14 21:14:28 +00:00
|
|
|
int controllercount = -1;
|
1998-12-27 21:47:14 +00:00
|
|
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
%token ACCTALL
|
|
|
|
%token ACCTFILE
|
2002-08-12 07:53:55 +00:00
|
|
|
%token ADDPREFIX
|
1998-12-27 21:47:14 +00:00
|
|
|
%token ALERT
|
|
|
|
%token ALIASFNAME
|
1999-08-06 14:05:10 +00:00
|
|
|
%token ALIASING
|
1998-12-27 21:47:14 +00:00
|
|
|
%token ANSWERPROG
|
|
|
|
%token B1PROTOCOL
|
1999-03-07 16:12:47 +00:00
|
|
|
%token BEEPCONNECT
|
2002-08-11 15:47:26 +00:00
|
|
|
%token BCAP
|
2000-10-09 14:22:51 +00:00
|
|
|
%token BUDGETCALLOUTPERIOD
|
|
|
|
%token BUDGETCALLOUTNCALLS
|
|
|
|
%token BUDGETCALLOUTSFILE
|
|
|
|
%token BUDGETCALLOUTSFILEROTATE
|
|
|
|
%token BUDGETCALLBACKPERIOD
|
|
|
|
%token BUDGETCALLBACKNCALLS
|
|
|
|
%token BUDGETCALLBACKSFILE
|
|
|
|
%token BUDGETCALLBACKSFILEROTATE
|
1998-12-27 21:47:14 +00:00
|
|
|
%token CALLBACKWAIT
|
|
|
|
%token CALLEDBACKWAIT
|
1999-08-06 14:05:10 +00:00
|
|
|
%token CALLIN
|
|
|
|
%token CALLOUT
|
|
|
|
%token CHANNELSTATE
|
2001-05-25 08:43:30 +00:00
|
|
|
%token CLONE
|
1998-12-27 21:47:14 +00:00
|
|
|
%token CONNECTPROG
|
1999-12-14 21:14:28 +00:00
|
|
|
%token CONTROLLER
|
1998-12-27 21:47:14 +00:00
|
|
|
%token DIALOUTTYPE
|
1999-08-06 14:05:10 +00:00
|
|
|
%token DIALRANDINCR
|
|
|
|
%token DIALRETRIES
|
1998-12-27 21:47:14 +00:00
|
|
|
%token DIRECTION
|
|
|
|
%token DISCONNECTPROG
|
|
|
|
%token DOWNTIME
|
1999-08-06 14:05:10 +00:00
|
|
|
%token DOWNTRIES
|
1998-12-27 21:47:14 +00:00
|
|
|
%token EARLYHANGUP
|
|
|
|
%token ENTRY
|
2000-10-09 14:22:51 +00:00
|
|
|
%token EXTCALLATTR
|
2001-05-25 08:43:30 +00:00
|
|
|
%token FIRMWARE
|
1999-08-06 14:05:10 +00:00
|
|
|
%token FULLCMD
|
2000-10-09 14:22:51 +00:00
|
|
|
%token HOLIDAYFILE
|
1998-12-27 21:47:14 +00:00
|
|
|
%token IDLETIME_IN
|
|
|
|
%token IDLETIME_OUT
|
1999-03-07 16:12:47 +00:00
|
|
|
%token IDLE_ALG_OUT
|
1998-12-27 21:47:14 +00:00
|
|
|
%token ISDNCHANNEL
|
1999-08-06 14:05:10 +00:00
|
|
|
%token ISDNCONTROLLER
|
1998-12-27 21:47:14 +00:00
|
|
|
%token ISDNTIME
|
|
|
|
%token ISDNTXDELIN
|
|
|
|
%token ISDNTXDELOUT
|
|
|
|
%token LOCAL_PHONE_DIALOUT
|
2002-03-26 15:13:54 +00:00
|
|
|
%token LOCAL_SUBADDR_DIALOUT
|
1998-12-27 21:47:14 +00:00
|
|
|
%token LOCAL_PHONE_INCOMING
|
2002-03-26 15:13:54 +00:00
|
|
|
%token LOCAL_SUBADDR_INCOMING
|
1999-08-06 14:05:10 +00:00
|
|
|
%token LOGEVENTS
|
1999-12-14 21:14:28 +00:00
|
|
|
%token MAILER
|
|
|
|
%token MAILTO
|
2001-07-21 11:29:40 +00:00
|
|
|
%token MAXCONNECTTIME
|
1998-12-27 21:47:14 +00:00
|
|
|
%token MONITOR
|
|
|
|
%token MONITORACCESS
|
1999-08-06 14:05:10 +00:00
|
|
|
%token MONITORPORT
|
|
|
|
%token MONITORSW
|
1998-12-27 21:47:14 +00:00
|
|
|
%token NAME
|
|
|
|
%token NO
|
|
|
|
%token OFF
|
|
|
|
%token ON
|
2000-10-09 14:22:51 +00:00
|
|
|
%token PPP_AUTH_RECHALLENGE
|
|
|
|
%token PPP_AUTH_PARANOID
|
|
|
|
%token PPP_EXPECT_AUTH
|
|
|
|
%token PPP_EXPECT_NAME
|
|
|
|
%token PPP_EXPECT_PASSWORD
|
|
|
|
%token PPP_SEND_AUTH
|
|
|
|
%token PPP_SEND_NAME
|
|
|
|
%token PPP_SEND_PASSWORD
|
2002-08-12 07:53:55 +00:00
|
|
|
%token PREFIXNATIONAL
|
|
|
|
%token PREFIXINTERNATIONAL
|
1999-12-14 21:14:28 +00:00
|
|
|
%token PROTOCOL
|
1998-12-27 21:47:14 +00:00
|
|
|
%token RATESFILE
|
1999-08-06 14:05:10 +00:00
|
|
|
%token RATETYPE
|
1998-12-27 21:47:14 +00:00
|
|
|
%token REACTION
|
|
|
|
%token RECOVERYTIME
|
|
|
|
%token REGEXPR
|
|
|
|
%token REGPROG
|
1999-08-06 14:05:10 +00:00
|
|
|
%token REMOTE_NUMBERS_HANDLING
|
|
|
|
%token REMOTE_PHONE_DIALOUT
|
2002-03-26 15:13:54 +00:00
|
|
|
%token REMOTE_SUBADDR_DIALOUT
|
1999-08-06 14:05:10 +00:00
|
|
|
%token REMOTE_PHONE_INCOMING
|
2002-03-26 15:13:54 +00:00
|
|
|
%token REMOTE_SUBADDR_INCOMING
|
1999-08-06 14:05:10 +00:00
|
|
|
%token RESTRICTEDCMD
|
|
|
|
%token ROTATESUFFIX
|
1998-12-27 21:47:14 +00:00
|
|
|
%token RTPRIO
|
|
|
|
%token SYSTEM
|
1999-05-20 10:14:57 +00:00
|
|
|
%token TINAINITPROG
|
1998-12-27 21:47:14 +00:00
|
|
|
%token UNITLENGTH
|
|
|
|
%token UNITLENGTHSRC
|
|
|
|
%token USEACCTFILE
|
2002-03-26 15:13:54 +00:00
|
|
|
%token USESUBADDR
|
1999-08-06 14:05:10 +00:00
|
|
|
%token USEDOWN
|
1998-12-27 21:47:14 +00:00
|
|
|
%token USRDEVICENAME
|
|
|
|
%token USRDEVICEUNIT
|
2000-10-09 14:22:51 +00:00
|
|
|
%token VALID
|
1998-12-27 21:47:14 +00:00
|
|
|
%token YES
|
|
|
|
|
1999-08-06 14:05:10 +00:00
|
|
|
|
1998-12-27 21:47:14 +00:00
|
|
|
%token <str> NUMBERSTR
|
|
|
|
|
|
|
|
%token <str> STRING
|
|
|
|
|
|
|
|
%type <booln> boolean
|
|
|
|
|
|
|
|
%type <num> sysfilekeyword sysnumkeyword sysstrkeyword sysboolkeyword
|
2000-10-09 14:22:51 +00:00
|
|
|
%type <num> filekeyword numkeyword strkeyword boolkeyword monrights monright
|
2001-05-25 08:43:30 +00:00
|
|
|
%type <num> cstrkeyword cfilekeyword
|
1998-12-27 21:47:14 +00:00
|
|
|
%type <str> filename
|
|
|
|
|
|
|
|
%union {
|
|
|
|
int booln;
|
|
|
|
int num;
|
|
|
|
char *str;
|
|
|
|
}
|
|
|
|
|
|
|
|
%%
|
|
|
|
|
|
|
|
config: sections
|
|
|
|
;
|
|
|
|
|
|
|
|
sections: possible_nullentries
|
|
|
|
syssect
|
1999-12-14 21:14:28 +00:00
|
|
|
optcontrollersects
|
1998-12-27 21:47:14 +00:00
|
|
|
entrysects
|
|
|
|
;
|
|
|
|
|
|
|
|
possible_nullentries:
|
|
|
|
/* lambda */
|
|
|
|
| possible_nullentries error '\n'
|
|
|
|
| possible_nullentries nullentry
|
|
|
|
;
|
|
|
|
|
|
|
|
nullentry: '\n'
|
|
|
|
;
|
|
|
|
|
|
|
|
entrysects: entrysect
|
|
|
|
| entrysects entrysect
|
|
|
|
;
|
|
|
|
|
1999-12-14 21:14:28 +00:00
|
|
|
optcontrollersects:
|
|
|
|
controllersects
|
|
|
|
|
|
|
|
|
{
|
|
|
|
cfg_set_controller_default();
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
controllersects: controllersect
|
|
|
|
| controllersects controllersect
|
|
|
|
;
|
|
|
|
|
|
|
|
/* ============== */
|
|
|
|
/* system section */
|
|
|
|
/* ============== */
|
|
|
|
|
1998-12-27 21:47:14 +00:00
|
|
|
syssect: SYSTEM sysentries
|
|
|
|
;
|
|
|
|
|
|
|
|
sysentries: sysentry
|
|
|
|
{
|
|
|
|
saw_system = 1;
|
|
|
|
monitor_clear_rights();
|
|
|
|
}
|
|
|
|
| sysentries sysentry
|
|
|
|
;
|
|
|
|
|
|
|
|
sysentry: sysfileentry
|
|
|
|
| sysboolentry
|
|
|
|
| sysnumentry
|
|
|
|
| sysstrentry
|
|
|
|
| sysmonitorstart
|
|
|
|
| sysmonitorrights
|
|
|
|
| nullentry
|
|
|
|
| error '\n'
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
sysmonitorstart:
|
|
|
|
MONITOR '=' STRING '\n'
|
|
|
|
{
|
|
|
|
char *err = NULL;
|
|
|
|
switch (monitor_start_rights($3)) {
|
|
|
|
case I4BMAR_OK:
|
|
|
|
break;
|
|
|
|
case I4BMAR_LENGTH:
|
|
|
|
err = "local socket name too long: %s";
|
|
|
|
break;
|
|
|
|
case I4BMAR_DUP:
|
|
|
|
err = "duplicate entry: %s";
|
|
|
|
break;
|
|
|
|
case I4BMAR_CIDR:
|
|
|
|
err = "invalid CIDR specification: %s";
|
|
|
|
break;
|
|
|
|
case I4BMAR_NOIP:
|
|
|
|
err = "could not resolve host or net specification: %s";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (err) {
|
|
|
|
char msg[1024];
|
|
|
|
snprintf(msg, sizeof msg, err, $3);
|
|
|
|
yyerror(msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
sysmonitorrights:
|
|
|
|
MONITORACCESS '=' monrights '\n'
|
|
|
|
{ monitor_add_rights($3); }
|
|
|
|
;
|
|
|
|
|
|
|
|
monrights: monrights ',' monright { $$ = $1 | $3; }
|
|
|
|
| monright { $$ = $1; }
|
|
|
|
;
|
|
|
|
|
|
|
|
monright: FULLCMD { $$ = I4B_CA_COMMAND_FULL; }
|
|
|
|
| RESTRICTEDCMD { $$ = I4B_CA_COMMAND_RESTRICTED; }
|
|
|
|
| CHANNELSTATE { $$ = I4B_CA_EVNT_CHANSTATE; }
|
|
|
|
| CALLIN { $$ = I4B_CA_EVNT_CALLIN; }
|
|
|
|
| CALLOUT { $$ = I4B_CA_EVNT_CALLOUT; }
|
|
|
|
| LOGEVENTS { $$ = I4B_CA_EVNT_I4B; }
|
|
|
|
;
|
|
|
|
|
|
|
|
sysfileentry: sysfilekeyword '=' filename '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
sysboolentry: sysboolkeyword '=' boolean '\n'
|
|
|
|
{
|
|
|
|
yylval.booln = $3;
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
sysnumentry: sysnumkeyword '=' NUMBERSTR '\n'
|
|
|
|
{
|
|
|
|
yylval.num = atoi($3);
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
sysstrentry: sysstrkeyword '=' STRING '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
| sysstrkeyword '=' NUMBERSTR '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
filename: STRING {
|
|
|
|
if ($1[0] != '/')
|
|
|
|
{
|
|
|
|
yyerror("filename doesn't start with a slash");
|
|
|
|
YYERROR;
|
|
|
|
}
|
|
|
|
$$ = $1;
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
boolean: NO { $$ = FALSE; }
|
|
|
|
| OFF { $$ = FALSE; }
|
|
|
|
| ON { $$ = TRUE; }
|
|
|
|
| YES { $$ = TRUE; }
|
|
|
|
;
|
|
|
|
|
|
|
|
sysfilekeyword: RATESFILE { $$ = RATESFILE; }
|
|
|
|
| ACCTFILE { $$ = ACCTFILE; }
|
|
|
|
| ALIASFNAME { $$ = ALIASFNAME; }
|
2000-10-09 14:22:51 +00:00
|
|
|
| HOLIDAYFILE { $$ = HOLIDAYFILE; }
|
1999-05-20 10:14:57 +00:00
|
|
|
| TINAINITPROG { $$ = TINAINITPROG; }
|
1998-12-27 21:47:14 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
sysboolkeyword: USEACCTFILE { $$ = USEACCTFILE; }
|
|
|
|
| ALIASING { $$ = ALIASING; }
|
|
|
|
| ACCTALL { $$ = ACCTALL; }
|
2002-08-12 07:53:55 +00:00
|
|
|
| ADDPREFIX { $$ = ADDPREFIX; }
|
1999-03-07 16:12:47 +00:00
|
|
|
| BEEPCONNECT { $$ = BEEPCONNECT; }
|
2000-10-09 14:22:51 +00:00
|
|
|
| EXTCALLATTR { $$ = EXTCALLATTR; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| ISDNTIME { $$ = ISDNTIME; }
|
|
|
|
| MONITORSW { $$ = MONITORSW; }
|
|
|
|
;
|
|
|
|
|
|
|
|
sysnumkeyword: MONITORPORT { $$ = MONITORPORT; }
|
|
|
|
| RTPRIO { $$ = RTPRIO; }
|
|
|
|
;
|
|
|
|
|
1999-12-14 21:14:28 +00:00
|
|
|
sysstrkeyword: MAILER { $$ = MAILER; }
|
|
|
|
| MAILTO { $$ = MAILTO; }
|
2002-08-12 07:53:55 +00:00
|
|
|
| PREFIXNATIONAL { $$ = PREFIXNATIONAL; }
|
|
|
|
| PREFIXINTERNATIONAL { $$ = PREFIXINTERNATIONAL; }
|
1999-12-14 21:14:28 +00:00
|
|
|
| ROTATESUFFIX { $$ = ROTATESUFFIX; }
|
1999-08-06 14:05:10 +00:00
|
|
|
| REGEXPR { $$ = REGEXPR; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| REGPROG { $$ = REGPROG; }
|
|
|
|
;
|
|
|
|
|
1999-12-14 21:14:28 +00:00
|
|
|
/* ============= */
|
|
|
|
/* entry section */
|
|
|
|
/* ============= */
|
|
|
|
|
1998-12-27 21:47:14 +00:00
|
|
|
entrysect: ENTRY
|
|
|
|
{
|
|
|
|
entrycount++;
|
|
|
|
nentries++;
|
|
|
|
}
|
|
|
|
entries
|
|
|
|
;
|
|
|
|
|
|
|
|
entries: entry
|
|
|
|
| entries entry
|
|
|
|
;
|
|
|
|
|
2000-10-09 14:22:51 +00:00
|
|
|
entry: fileentry
|
|
|
|
| strentry
|
1998-12-27 21:47:14 +00:00
|
|
|
| numentry
|
|
|
|
| boolentry
|
|
|
|
| nullentry
|
|
|
|
| error '\n'
|
|
|
|
;
|
|
|
|
|
2000-10-09 14:22:51 +00:00
|
|
|
fileentry: filekeyword '=' filename '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
|
1998-12-27 21:47:14 +00:00
|
|
|
strentry: strkeyword '=' STRING '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
| strkeyword '=' NUMBERSTR '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
boolentry: boolkeyword '=' boolean '\n'
|
|
|
|
{
|
|
|
|
yylval.booln = $3;
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
|
|
|
numentry: numkeyword '=' NUMBERSTR '\n'
|
|
|
|
{
|
|
|
|
yylval.num = atoi($3);
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
|
2000-10-09 14:22:51 +00:00
|
|
|
filekeyword: BUDGETCALLBACKSFILE { $$ = BUDGETCALLBACKSFILE; }
|
|
|
|
| BUDGETCALLOUTSFILE { $$ = BUDGETCALLOUTSFILE; }
|
|
|
|
;
|
|
|
|
|
1998-12-27 21:47:14 +00:00
|
|
|
strkeyword: ANSWERPROG { $$ = ANSWERPROG; }
|
|
|
|
| B1PROTOCOL { $$ = B1PROTOCOL; }
|
2002-08-11 15:47:26 +00:00
|
|
|
| BCAP { $$ = BCAP; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| CONNECTPROG { $$ = CONNECTPROG; }
|
|
|
|
| DIALOUTTYPE { $$ = DIALOUTTYPE; }
|
|
|
|
| DIRECTION { $$ = DIRECTION; }
|
|
|
|
| DISCONNECTPROG { $$ = DISCONNECTPROG; }
|
1999-03-07 16:12:47 +00:00
|
|
|
| IDLE_ALG_OUT { $$ = IDLE_ALG_OUT; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| LOCAL_PHONE_INCOMING { $$ = LOCAL_PHONE_INCOMING; }
|
2002-03-26 15:13:54 +00:00
|
|
|
| LOCAL_SUBADDR_INCOMING { $$ = LOCAL_SUBADDR_INCOMING; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| LOCAL_PHONE_DIALOUT { $$ = LOCAL_PHONE_DIALOUT; }
|
2002-03-26 15:13:54 +00:00
|
|
|
| LOCAL_SUBADDR_DIALOUT { $$ = LOCAL_SUBADDR_DIALOUT; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| NAME { $$ = NAME; }
|
2000-10-09 14:22:51 +00:00
|
|
|
| PPP_EXPECT_AUTH { $$ = PPP_EXPECT_AUTH; }
|
|
|
|
| PPP_EXPECT_NAME { $$ = PPP_EXPECT_NAME; }
|
|
|
|
| PPP_EXPECT_PASSWORD { $$ = PPP_EXPECT_PASSWORD; }
|
|
|
|
| PPP_SEND_AUTH { $$ = PPP_SEND_AUTH; }
|
|
|
|
| PPP_SEND_NAME { $$ = PPP_SEND_NAME; }
|
|
|
|
| PPP_SEND_PASSWORD { $$ = PPP_SEND_PASSWORD; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| REACTION { $$ = REACTION; }
|
|
|
|
| REMOTE_NUMBERS_HANDLING { $$ = REMOTE_NUMBERS_HANDLING; }
|
|
|
|
| REMOTE_PHONE_INCOMING { $$ = REMOTE_PHONE_INCOMING; }
|
2002-03-26 15:13:54 +00:00
|
|
|
| REMOTE_SUBADDR_INCOMING { $$ = REMOTE_SUBADDR_INCOMING; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| REMOTE_PHONE_DIALOUT { $$ = REMOTE_PHONE_DIALOUT; }
|
2002-03-26 15:13:54 +00:00
|
|
|
| REMOTE_SUBADDR_DIALOUT { $$ = REMOTE_SUBADDR_DIALOUT; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| UNITLENGTHSRC { $$ = UNITLENGTHSRC; }
|
|
|
|
| USRDEVICENAME { $$ = USRDEVICENAME; }
|
2000-10-09 14:22:51 +00:00
|
|
|
| VALID { $$ = VALID; }
|
2001-05-25 08:43:30 +00:00
|
|
|
| CLONE { $$ = CLONE; }
|
1998-12-27 21:47:14 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
numkeyword: ALERT { $$ = ALERT; }
|
2000-10-09 14:22:51 +00:00
|
|
|
| BUDGETCALLBACKPERIOD { $$ = BUDGETCALLBACKPERIOD; }
|
|
|
|
| BUDGETCALLBACKNCALLS { $$ = BUDGETCALLBACKNCALLS; }
|
|
|
|
| BUDGETCALLOUTPERIOD { $$ = BUDGETCALLOUTPERIOD; }
|
|
|
|
| BUDGETCALLOUTNCALLS { $$ = BUDGETCALLOUTNCALLS; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| CALLBACKWAIT { $$ = CALLBACKWAIT; }
|
|
|
|
| CALLEDBACKWAIT { $$ = CALLEDBACKWAIT; }
|
|
|
|
| DIALRETRIES { $$ = DIALRETRIES; }
|
|
|
|
| EARLYHANGUP { $$ = EARLYHANGUP; }
|
|
|
|
| IDLETIME_IN { $$ = IDLETIME_IN; }
|
|
|
|
| IDLETIME_OUT { $$ = IDLETIME_OUT; }
|
|
|
|
| ISDNCONTROLLER { $$ = ISDNCONTROLLER; }
|
|
|
|
| ISDNCHANNEL { $$ = ISDNCHANNEL; }
|
|
|
|
| ISDNTXDELIN { $$ = ISDNTXDELIN; }
|
|
|
|
| ISDNTXDELOUT { $$ = ISDNTXDELOUT; }
|
|
|
|
| RATETYPE { $$ = RATETYPE; }
|
|
|
|
| RECOVERYTIME { $$ = RECOVERYTIME; }
|
|
|
|
| UNITLENGTH { $$ = UNITLENGTH; }
|
|
|
|
| USRDEVICEUNIT { $$ = USRDEVICEUNIT; }
|
|
|
|
| DOWNTIME { $$ = DOWNTIME; }
|
|
|
|
| DOWNTRIES { $$ = DOWNTRIES; }
|
2001-07-21 11:29:40 +00:00
|
|
|
| MAXCONNECTTIME { $$ = MAXCONNECTTIME; }
|
1998-12-27 21:47:14 +00:00
|
|
|
;
|
|
|
|
|
2000-10-09 14:22:51 +00:00
|
|
|
boolkeyword: BUDGETCALLBACKSFILEROTATE { $$ = BUDGETCALLBACKSFILEROTATE; }
|
|
|
|
| BUDGETCALLOUTSFILEROTATE { $$ = BUDGETCALLOUTSFILEROTATE; }
|
|
|
|
| DIALRANDINCR { $$ = DIALRANDINCR; }
|
|
|
|
| PPP_AUTH_RECHALLENGE { $$ = PPP_AUTH_RECHALLENGE; }
|
|
|
|
| PPP_AUTH_PARANOID { $$ = PPP_AUTH_PARANOID; }
|
1998-12-27 21:47:14 +00:00
|
|
|
| USEDOWN { $$ = USEDOWN; }
|
2002-03-26 15:13:54 +00:00
|
|
|
| USESUBADDR { $$ = USESUBADDR; }
|
1998-12-27 21:47:14 +00:00
|
|
|
;
|
|
|
|
|
1999-12-14 21:14:28 +00:00
|
|
|
/* ================== */
|
|
|
|
/* controller section */
|
|
|
|
/* ================== */
|
|
|
|
|
|
|
|
controllersect: CONTROLLER
|
|
|
|
{
|
|
|
|
controllercount++;
|
|
|
|
}
|
|
|
|
controllers
|
|
|
|
;
|
|
|
|
|
|
|
|
controllers: controller
|
|
|
|
| controllers controller
|
|
|
|
;
|
|
|
|
|
|
|
|
controller: strcontroller
|
|
|
|
| nullentry
|
|
|
|
| error '\n'
|
|
|
|
;
|
|
|
|
|
|
|
|
strcontroller: cstrkeyword '=' STRING '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
|
|
|
| cstrkeyword '=' NUMBERSTR '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
2001-05-25 08:43:30 +00:00
|
|
|
| cfilekeyword '=' filename '\n'
|
|
|
|
{
|
|
|
|
cfg_setval($1);
|
|
|
|
}
|
1999-12-14 21:14:28 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
cstrkeyword: PROTOCOL { $$ = PROTOCOL; }
|
|
|
|
;
|
|
|
|
|
2001-05-25 08:43:30 +00:00
|
|
|
cfilekeyword: FIRMWARE { $$ = FIRMWARE; }
|
|
|
|
;
|
|
|
|
|
1999-12-14 21:14:28 +00:00
|
|
|
|
1998-12-27 21:47:14 +00:00
|
|
|
%%
|