summaryrefslogtreecommitdiffstats
path: root/interface.c
diff options
context:
space:
mode:
authorAndreas Eversberg2008-09-21 08:57:51 +0200
committerAndreas Eversberg2008-09-21 08:57:51 +0200
commit26c7e0d22ead805ce333ea4248c7311c1eda5de0 (patch)
treee69331f6a522c3d5a8522a21d07932024d974cce /interface.c
parentfixed some layer 2 link issues (diff)
downloadlcr-26c7e0d22ead805ce333ea4248c7311c1eda5de0.tar.gz
lcr-26c7e0d22ead805ce333ea4248c7311c1eda5de0.tar.xz
lcr-26c7e0d22ead805ce333ea4248c7311c1eda5de0.zip
Finished autoconf.
-> Commments are welcome. deleted: Makefile modified: Makefile.am new file: Makefile.in modified: README new file: aclocal.m4 modified: action_vbox.cpp modified: alawulaw.h modified: autogen.sh new file: config.h.in new file: configure modified: configure.ac modified: default/interface.conf modified: default/options.conf modified: dss1.cpp modified: dss1.h modified: extension.c modified: genext.c modified: interface.c modified: interface.h modified: mISDN.cpp modified: mISDN.h modified: main.h new file: mkinstalldirs modified: options.c modified: options.h modified: port.cpp modified: route.c modified: todo.txt modified: tones.c modified: vbox.cpp deleted: watch.c
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/interface.c b/interface.c
index 2c92985..5549654 100644
--- a/interface.c
+++ b/interface.c
@@ -208,6 +208,29 @@ static int inter_nt(struct interface *interface, char *filename, int line, char
ifport->nt = 1;
return(0);
}
+static int inter_tespecial(struct interface *interface, char *filename, int line, char *parameter, char *value)
+{
+ struct interface_port *ifport;
+
+ /* port in chain ? */
+ if (!interface->ifport)
+ {
+ SPRINT(interface_error, "Error in %s (line %d): parameter '%s' expects previous 'port' definition.\n", filename, line, parameter);
+ return(-1);
+ }
+ /* goto end of chain */
+ ifport = interface->ifport;
+ while(ifport->next)
+ ifport = ifport->next;
+ /* add value */
+ if (value[0])
+ {
+ SPRINT(interface_error, "Error in %s (line %d): parameter '%s' expects no value.\n", filename, line, parameter);
+ return(-1);
+ }
+ ifport->tespecial = 1;
+ return(0);
+}
static int inter_tones(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
if (!strcasecmp(value, "yes"))
@@ -920,6 +943,14 @@ struct interface_param interface_param[] = {
"This is required on interfaces that support both NT-mode and TE-mode.\n"
"This parameter must follow a 'port' parameter."},
+ {"te-special", &inter_tespecial, "",
+ "The given port uses a modified TE-mode.\n"
+ "All information elements that are allowed Network->User will then be\n"
+ "transmitted User->Network also. This is usefull to pass all informations\n"
+ "between two interconnected LCRs, like 'redirected number' or 'display'.\n"
+ "Note that this is not compliant with ISDN protocol.\n"
+ "This parameter must follow a 'port' parameter."},
+
{"layer2hold", &inter_l2hold, "yes | no",
"The given port will continuously try to establish layer 2 link and hold it.\n"
"It is required for PTP links in most cases, therefore it is default.\n"
@@ -1002,7 +1033,7 @@ struct interface *read_interfaces(void)
if (interface_newlist != NULL)
FATAL("list is not empty.\n");
interface_error[0] = '\0';
- SPRINT(filename, "%s/interface.conf", INSTALL_DATA);
+ SPRINT(filename, "%s/interface.conf", CONFIG_DATA);
if (!(fp = fopen(filename,"r")))
{
@@ -1325,7 +1356,7 @@ void load_port(struct interface_port *ifport)
struct mISDNport *mISDNport;
/* open new port */
- mISDNport = mISDNport_open(ifport->portnum, ifport->portname, ifport->ptp, ifport->nt, ifport->l2hold, ifport->interface);
+ mISDNport = mISDNport_open(ifport->portnum, ifport->portname, ifport->ptp, ifport->nt, ifport->tespecial, ifport->l2hold, ifport->interface);
if (mISDNport)
{
/* link port */