wanpipe-3.5.23.tgz

This commit is contained in:
Harald Welte 2021-12-29 18:48:22 +01:00
parent 8689e4db5a
commit d50d536a62
199 changed files with 31742 additions and 98150 deletions

1
.pbxdir Normal file
View File

@ -0,0 +1 @@
/usr/src/dahdi

View File

@ -1 +1 @@
wanpipe-3.5.22
wanpipe-3.5.23

View File

@ -1,5 +1,5 @@
URL: http://192.168.1.168/svn/wanpipe/wanpipe_common/branches/unified_release
Revision: 9240
Last Changed Author: yannick
Last Changed Rev: 9238
Last Changed Date: 2011-08-22 13:12:43 -0400 (Mon, 22 Aug 2011)
Revision: 9296
Last Changed Author: dyatsin
Last Changed Rev: 9296
Last Changed Date: 2011-09-08 18:16:34 -0400 (Thu, 08 Sep 2011)

View File

@ -1,5 +1,5 @@
URL: http://192.168.1.168/svn/wanpipe/wanpipe_linux/branches/unified_release
Revision: 9240
Revision: 9296
Last Changed Author: ncorbic
Last Changed Rev: 9227
Last Changed Date: 2011-08-19 15:23:23 -0400 (Fri, 19 Aug 2011)
Last Changed Rev: 9268
Last Changed Date: 2011-08-29 12:32:20 -0400 (Mon, 29 Aug 2011)

View File

@ -8,6 +8,13 @@ Copyright (c) 1995-2011 Sangoma Technologies Inc.
For more info visit: http://wiki.sangoma.com
------------------------------------------------------------------------------
* Wed Sep 07 2011 Nenad Corbic <ncorbic@sangoma.com> - 3.5.23
==================================================================
- Bug fixes in Setup
- Bug fixes in compiling and configufing old deprecated SMG/BRI
- Fixed rpmbuild using Setup
* Wed Aug 24 2011 Nenad Corbic <ncorbic@sangoma.com> - 3.5.22
==================================================================

View File

@ -386,6 +386,7 @@ clean_util:
.PHONY: install_util
install_util:
$(MAKE) -C util install SYSINC=$(PWD)/$(WINCLUDE) CC=$(CC) PREFIX=$(INSTALLPREFIX)
$(MAKE) -C util install_wancfg SYSINC=$(PWD)/$(WINCLUDE) CC=$(CC) PREFIX=$(INSTALLPREFIX)
.PHONY: install_smgbri
install_smgbri:

18
Setup
View File

@ -171,7 +171,7 @@ pause()
fi
[ $# -ne 0 ] && echo -e $* >&2
echo -e "Press [Enter] to continue...\c" >&2
echo -e "Press [Enter] to continue...\c " >&2
read tmp
return 0
}
@ -1965,6 +1965,7 @@ WARNING: The Linux source in $SOURCEDIR has not been configured.
MAKEINC=$MAKEINC" ENABLE_WANPIPEMON_ZAP=YES "
fi
echo "make CC=$CC SYSINC=$DRIVER_INC_DIR WAN_VIRTUAL=$ROOT WANINCDIR=$WANPIPE_INCLUDE_DIR $MAKEINC" >> $CMP_LOG 2>> $CMP_LOG
eval "make CC=$CC SYSINC=$DRIVER_INC_DIR WAN_VIRTUAL=$ROOT WANINCDIR=$WANPIPE_INCLUDE_DIR $MAKEINC >> $CMP_LOG 2>> $CMP_LOG"
if [ $? -eq 0 ]
@ -4920,6 +4921,8 @@ function install_all ()
cd $PROD_HOME/util
make install WAN_VIRTUAL=$ROOT > /dev/null 2> /dev/null
make install_wancfg WAN_VIRTUAL=$ROOT > /dev/null 2> /dev/null
if [ "$PKG_NAME" = "wanpipe-lite" ]; then
cd $PROD_HOME
@ -4962,8 +4965,10 @@ function install_all ()
\cp -rf samples $ROOT/etc/wanpipe
echo "Installing AFT Firmware update utility in $ROOT$WAN_CONF_DIR/util"
\cp -rf util/wanec_apilib/ $ROOT$WAN_CONF_DIR/util
\cp -rf util/wan_aftup/ $ROOT$WAN_CONF_DIR/util
if [ ! -d $ROOT$WAN_CONF_DIR/util ]; then
\mkdir -p $ROOT$WAN_CONF_DIR/util
fi
\cp -rf util/wan_aftup $ROOT$WAN_CONF_DIR/util/
cd firmware
if [ -e wan_aftup ]; then
@ -7068,9 +7073,10 @@ function detect_rpm_build_utility()
function compile_aft_firmware_util()
{
lhome=`pwd`
\cp -rf $PROD_HOME/util/wan_aftup $PROD_HOME/rpmbuild/etc/wanpipe/firmware/
cd $PROD_HOME/rpmbuild/etc/wanpipe/firmware/wan_aftup
\cp -rf $PROD_HOME/util/wan_aftup $PROD_HOME/rpmbuild/etc/wanpipe/util/
cd $PROD_HOME/rpmbuild/etc/wanpipe/util/wan_aftup
echo "Compiling firmware update utilities..."
eval "make wan_aftup" >/dev/null 2>/dev/null
if [ ! $? -eq 0 ]; then
@ -7271,7 +7277,7 @@ KERNEL_UNAME=`uname -r`
PKG_NAME=wanpipe
DISTR_NAME="WANPIPE"
PROD=wanrouter
PROD_VER=3.5.22
PROD_VER=3.5.23
PROD_HOME=`pwd`
META_CONF=$PROD_HOME/$PROD.rc
WAN_INTR_DIR=$PROD_HOME/interfaces

View File

@ -1,791 +0,0 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@LIBPRI_TRUE@am__append_1 = sangoma_pri.c sangoma_pri.h
@LIBPRI_TRUE@am__append_2 = sangoma_pri.h
@LIBPRI_TRUE@am__append_3 = -I@LIBPRI_PATH@
@LIBPRI_TRUE@am__append_4 = -I$(libpripath)
@LIBPRI_TRUE@am__append_5 = -L$(libpripath) -lpri
DIST_COMMON = README $(am__configure_deps) \
$(am__library_include_HEADERS_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
compile config.guess config.sub depcomp install-sh ltmain.sh \
missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(library_includedir)"
libLIBRARIES_INSTALL = $(INSTALL_DATA)
LIBRARIES = $(lib_LIBRARIES)
ARFLAGS = cru
libsangoma_a_AR = $(AR) $(ARFLAGS)
libsangoma_a_LIBADD =
am_libsangoma_a_OBJECTS =
libsangoma_a_OBJECTS = $(am_libsangoma_a_OBJECTS)
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libsangoma_la_LIBADD =
am__libsangoma_la_SOURCES_DIST = libsangoma.c libsangoma_utils.c \
libsangoma_config.c libsangoma_hwec.c libsangoma.h \
libhpsangoma.c libhpsangoma.h libhpsangoma_priv.c \
libhpsangoma_priv.h wanec/wanec_api.c wanec/wanec_api_lib.c \
wanec/wanec_api.h sangoma_pri.c sangoma_pri.h
@LIBPRI_TRUE@am__objects_1 = libsangoma_la-sangoma_pri.lo
am__objects_2 = libsangoma_la-libsangoma.lo \
libsangoma_la-libsangoma_utils.lo \
libsangoma_la-libsangoma_config.lo \
libsangoma_la-libsangoma_hwec.lo libsangoma_la-libhpsangoma.lo \
libsangoma_la-libhpsangoma_priv.lo libsangoma_la-wanec_api.lo \
libsangoma_la-wanec_api_lib.lo $(am__objects_1)
am_libsangoma_la_OBJECTS = $(am__objects_2)
libsangoma_la_OBJECTS = $(am_libsangoma_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libsangoma_a_SOURCES) $(libsangoma_la_SOURCES)
DIST_SOURCES = $(libsangoma_a_SOURCES) \
$(am__libsangoma_la_SOURCES_DIST)
am__library_include_HEADERS_DIST = libsangoma.h libhpsangoma.h \
wanec/wanec_api.h sangoma_pri.h
library_includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(library_include_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBPRI_FALSE = @LIBPRI_FALSE@
LIBPRI_PATH = @LIBPRI_PATH@
LIBPRI_TRUE = @LIBPRI_TRUE@
LIBS = @LIBS@
LIBSANGOMA_LT_AGE = @LIBSANGOMA_LT_AGE@
LIBSANGOMA_LT_CURRENT = @LIBSANGOMA_LT_CURRENT@
LIBSANGOMA_LT_REVISION = @LIBSANGOMA_LT_REVISION@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
WLINC = ../../patches/kdrivers/include
WEC = ../../patches/kdrivers/wanec
WECOCT = ../../patches/kdrivers/wanec/oct6100_api/include
REPODIR = ../../include
REPODIR1 = ../../../code/include
REPOEC = ../../wanec
REPOECOCT = $(REPOEC)/oct6100_api/include
WINC = /usr/include/wanpipe
# pedantic flags that will help us to keep clean code
# I feel sorry for the coders who like messy-warnings-all-over-the-place code
AM_CFLAGS = -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -g \
-I./wanec -I$(WLINC) -I$(WEC) -I$(WECOCT) -I$(WINC) \
-I$(WINC)/oct6100_api -I. -I$(REPODIR1) -I$(REPOECOCT) \
-I$(REPODIR)/aft_core -I$(REPOEC) -I$(REPODIR) -D__LINUX__ \
-D_REENTRANT -D_GNU_SOURCE -O2 -D_DEBUG_=2 -D_GNUC_ -I../lib \
-D__COMPILING_LIBSANGOMA__ -Wall -Wwrite-strings \
-Wunused-variable -Wstrict-prototypes -Wmissing-prototypes \
$(am__append_3)
#ACLOCAL_AMFLAGS = -I m4
LIB_SOURCES = libsangoma.c libsangoma_utils.c libsangoma_config.c \
libsangoma_hwec.c libsangoma.h libhpsangoma.c libhpsangoma.h \
libhpsangoma_priv.c libhpsangoma_priv.h wanec/wanec_api.c \
wanec/wanec_api_lib.c wanec/wanec_api.h $(am__append_1)
library_includedir = $(includedir)
library_include_HEADERS = libsangoma.h libhpsangoma.h \
wanec/wanec_api.h $(am__append_2)
lib_LTLIBRARIES = libsangoma.la
libsangoma_la_CFLAGS = $(AM_CFLAGS) $(am__append_4)
libsangoma_la_LDFLAGS = -version-info \
@LIBSANGOMA_LT_CURRENT@:@LIBSANGOMA_LT_REVISION@:@LIBSANGOMA_LT_AGE@ \
$(am__append_5)
libsangoma_la_SOURCES = $(LIB_SOURCES)
lib_LIBRARIES = libsangoma.a
libsangoma_a_CFLAGS = $(AM_CFLAGS)
libsangoma_a_SOURCES = $(LIB_SOUCES)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
install-libLIBRARIES: $(lib_LIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
@$(POST_INSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
p=$(am__strip_dir) \
echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
$(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
else :; fi; \
done
uninstall-libLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLIBRARIES:
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
libsangoma.a: $(libsangoma_a_OBJECTS) $(libsangoma_a_DEPENDENCIES)
-rm -f libsangoma.a
$(libsangoma_a_AR) libsangoma.a $(libsangoma_a_OBJECTS) $(libsangoma_a_LIBADD)
$(RANLIB) libsangoma.a
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libsangoma.la: $(libsangoma_la_OBJECTS) $(libsangoma_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libsangoma_la_LDFLAGS) $(libsangoma_la_OBJECTS) $(libsangoma_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-libhpsangoma.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-libhpsangoma_priv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-libsangoma.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-libsangoma_config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-libsangoma_hwec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-libsangoma_utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-sangoma_pri.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-wanec_api.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsangoma_la-wanec_api_lib.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libsangoma_la-libsangoma.lo: libsangoma.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-libsangoma.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-libsangoma.Tpo" -c -o libsangoma_la-libsangoma.lo `test -f 'libsangoma.c' || echo '$(srcdir)/'`libsangoma.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-libsangoma.Tpo" "$(DEPDIR)/libsangoma_la-libsangoma.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-libsangoma.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libsangoma.c' object='libsangoma_la-libsangoma.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-libsangoma.lo `test -f 'libsangoma.c' || echo '$(srcdir)/'`libsangoma.c
libsangoma_la-libsangoma_utils.lo: libsangoma_utils.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-libsangoma_utils.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-libsangoma_utils.Tpo" -c -o libsangoma_la-libsangoma_utils.lo `test -f 'libsangoma_utils.c' || echo '$(srcdir)/'`libsangoma_utils.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-libsangoma_utils.Tpo" "$(DEPDIR)/libsangoma_la-libsangoma_utils.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-libsangoma_utils.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libsangoma_utils.c' object='libsangoma_la-libsangoma_utils.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-libsangoma_utils.lo `test -f 'libsangoma_utils.c' || echo '$(srcdir)/'`libsangoma_utils.c
libsangoma_la-libsangoma_config.lo: libsangoma_config.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-libsangoma_config.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-libsangoma_config.Tpo" -c -o libsangoma_la-libsangoma_config.lo `test -f 'libsangoma_config.c' || echo '$(srcdir)/'`libsangoma_config.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-libsangoma_config.Tpo" "$(DEPDIR)/libsangoma_la-libsangoma_config.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-libsangoma_config.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libsangoma_config.c' object='libsangoma_la-libsangoma_config.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-libsangoma_config.lo `test -f 'libsangoma_config.c' || echo '$(srcdir)/'`libsangoma_config.c
libsangoma_la-libsangoma_hwec.lo: libsangoma_hwec.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-libsangoma_hwec.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-libsangoma_hwec.Tpo" -c -o libsangoma_la-libsangoma_hwec.lo `test -f 'libsangoma_hwec.c' || echo '$(srcdir)/'`libsangoma_hwec.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-libsangoma_hwec.Tpo" "$(DEPDIR)/libsangoma_la-libsangoma_hwec.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-libsangoma_hwec.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libsangoma_hwec.c' object='libsangoma_la-libsangoma_hwec.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-libsangoma_hwec.lo `test -f 'libsangoma_hwec.c' || echo '$(srcdir)/'`libsangoma_hwec.c
libsangoma_la-libhpsangoma.lo: libhpsangoma.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-libhpsangoma.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-libhpsangoma.Tpo" -c -o libsangoma_la-libhpsangoma.lo `test -f 'libhpsangoma.c' || echo '$(srcdir)/'`libhpsangoma.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-libhpsangoma.Tpo" "$(DEPDIR)/libsangoma_la-libhpsangoma.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-libhpsangoma.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhpsangoma.c' object='libsangoma_la-libhpsangoma.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-libhpsangoma.lo `test -f 'libhpsangoma.c' || echo '$(srcdir)/'`libhpsangoma.c
libsangoma_la-libhpsangoma_priv.lo: libhpsangoma_priv.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-libhpsangoma_priv.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-libhpsangoma_priv.Tpo" -c -o libsangoma_la-libhpsangoma_priv.lo `test -f 'libhpsangoma_priv.c' || echo '$(srcdir)/'`libhpsangoma_priv.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-libhpsangoma_priv.Tpo" "$(DEPDIR)/libsangoma_la-libhpsangoma_priv.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-libhpsangoma_priv.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhpsangoma_priv.c' object='libsangoma_la-libhpsangoma_priv.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-libhpsangoma_priv.lo `test -f 'libhpsangoma_priv.c' || echo '$(srcdir)/'`libhpsangoma_priv.c
libsangoma_la-wanec_api.lo: wanec/wanec_api.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-wanec_api.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-wanec_api.Tpo" -c -o libsangoma_la-wanec_api.lo `test -f 'wanec/wanec_api.c' || echo '$(srcdir)/'`wanec/wanec_api.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-wanec_api.Tpo" "$(DEPDIR)/libsangoma_la-wanec_api.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-wanec_api.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wanec/wanec_api.c' object='libsangoma_la-wanec_api.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-wanec_api.lo `test -f 'wanec/wanec_api.c' || echo '$(srcdir)/'`wanec/wanec_api.c
libsangoma_la-wanec_api_lib.lo: wanec/wanec_api_lib.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-wanec_api_lib.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-wanec_api_lib.Tpo" -c -o libsangoma_la-wanec_api_lib.lo `test -f 'wanec/wanec_api_lib.c' || echo '$(srcdir)/'`wanec/wanec_api_lib.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-wanec_api_lib.Tpo" "$(DEPDIR)/libsangoma_la-wanec_api_lib.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-wanec_api_lib.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wanec/wanec_api_lib.c' object='libsangoma_la-wanec_api_lib.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-wanec_api_lib.lo `test -f 'wanec/wanec_api_lib.c' || echo '$(srcdir)/'`wanec/wanec_api_lib.c
libsangoma_la-sangoma_pri.lo: sangoma_pri.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -MT libsangoma_la-sangoma_pri.lo -MD -MP -MF "$(DEPDIR)/libsangoma_la-sangoma_pri.Tpo" -c -o libsangoma_la-sangoma_pri.lo `test -f 'sangoma_pri.c' || echo '$(srcdir)/'`sangoma_pri.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsangoma_la-sangoma_pri.Tpo" "$(DEPDIR)/libsangoma_la-sangoma_pri.Plo"; else rm -f "$(DEPDIR)/libsangoma_la-sangoma_pri.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sangoma_pri.c' object='libsangoma_la-sangoma_pri.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsangoma_la_CFLAGS) $(CFLAGS) -c -o libsangoma_la-sangoma_pri.lo `test -f 'sangoma_pri.c' || echo '$(srcdir)/'`sangoma_pri.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-library_includeHEADERS: $(library_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(library_includedir)" || $(mkdir_p) "$(DESTDIR)$(library_includedir)"
@list='$(library_include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(library_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(library_includedir)/$$f'"; \
$(library_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(library_includedir)/$$f"; \
done
uninstall-library_includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(library_include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(library_includedir)/$$f'"; \
rm -f "$(DESTDIR)$(library_includedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/wanec
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -755 -exec chmod a+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) config.h
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \
clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-library_includeHEADERS
install-exec-am: install-libLIBRARIES install-libLTLIBRARIES
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-libLIBRARIES \
uninstall-libLTLIBRARIES uninstall-library_includeHEADERS
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \
clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am \
install-libLIBRARIES install-libLTLIBRARIES \
install-library_includeHEADERS install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
uninstall-libLIBRARIES uninstall-libLTLIBRARIES \
uninstall-library_includeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,458 +0,0 @@
# This file was generated.
# It contains the lists of macros which have been traced.
# It can be safely removed.
@request = (
bless( [
'0',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'configure.in'
],
{
'm4_pattern_forbid' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_C_VOLATILE' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_WAIT3' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_STRUCT_TM' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRNLEN' => 1,
'm4_sinclude' => 1,
'AC_PROG_CXX' => 1,
'AC_PATH_X' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_PROG_AWK' => 1,
'_m4_warn' => 1,
'AC_HEADER_STDC' => 1,
'AC_HEADER_MAJOR' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_LIBSOURCE' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_TYPE_UID_T' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_PROG_MAKE_SET' => 1,
'sinclude' => 1,
'm4_pattern_allow' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_PROG_CC' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_FORK' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_PROG_YACC' => 1,
'AC_INIT' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_SUBST' => 1,
'AC_FUNC_ALLOCA' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_PROG_RANLIB' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_MMAP' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_CHECK_TYPES' => 1,
'AC_CHECK_MEMBERS' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_HEADER_STAT' => 1,
'AC_C_INLINE' => 1,
'AC_PROG_CPP' => 1,
'AC_TYPE_PID_T' => 1,
'AC_C_CONST' => 1,
'AC_PROG_LEX' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_PROG_INSTALL' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_FSEEKO' => 1,
'AM_PROG_CC_C_O' => 1,
'AM_CONDITIONAL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_LN_S' => 1,
'm4_include' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CHECK_FUNCS' => 1
}
], 'Autom4te::Request' ),
bless( [
'1',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'/usr/share/aclocal/libtool.m4',
'/usr/share/aclocal-1.9/amversion.m4',
'/usr/share/aclocal-1.9/auxdir.m4',
'/usr/share/aclocal-1.9/cond.m4',
'/usr/share/aclocal-1.9/depend.m4',
'/usr/share/aclocal-1.9/depout.m4',
'/usr/share/aclocal-1.9/init.m4',
'/usr/share/aclocal-1.9/install-sh.m4',
'/usr/share/aclocal-1.9/lead-dot.m4',
'/usr/share/aclocal-1.9/make.m4',
'/usr/share/aclocal-1.9/missing.m4',
'/usr/share/aclocal-1.9/mkdirp.m4',
'/usr/share/aclocal-1.9/options.m4',
'/usr/share/aclocal-1.9/runlog.m4',
'/usr/share/aclocal-1.9/sanity.m4',
'/usr/share/aclocal-1.9/strip.m4',
'/usr/share/aclocal-1.9/tar.m4',
'configure.in'
],
{
'AM_ENABLE_STATIC' => 1,
'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
'AC_C_VOLATILE' => 1,
'AC_TYPE_OFF_T' => 1,
'_LT_AC_SHELL_INIT' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_DEFUN' => 1,
'AC_PROG_LIBTOOL' => 1,
'_LT_AC_LANG_CXX_CONFIG' => 1,
'AM_PROG_MKDIR_P' => 1,
'AC_FUNC_STAT' => 1,
'AC_FUNC_WAIT3' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_STRUCT_TM' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRTOD' => 1,
'AM_MISSING_PROG' => 1,
'AC_FUNC_STRNLEN' => 1,
'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
'AC_PROG_CXX' => 1,
'_LT_AC_LANG_C_CONFIG' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'AC_PROG_AWK' => 1,
'_m4_warn' => 1,
'AC_LIBTOOL_OBJDIR' => 1,
'AC_HEADER_MAJOR' => 1,
'AM_SANITY_CHECK' => 1,
'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
'_AM_PROG_TAR' => 1,
'AC_LIBTOOL_GCJ' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_LIBSOURCE' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'_LT_AC_LANG_F77' => 1,
'AC_LIBTOOL_CONFIG' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
'AM_DISABLE_SHARED' => 1,
'_LT_AC_LANG_CXX' => 1,
'AM_PROG_LIBTOOL' => 1,
'_LT_AC_FILE_LTDLL_C' => 1,
'AM_PROG_LD' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_FORK' => 1,
'AU_DEFUN' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_PROG_NM' => 1,
'AC_LIBTOOL_DLOPEN' => 1,
'AC_PROG_LD' => 1,
'AC_PROG_LD_GNU' => 1,
'AC_ENABLE_FAST_INSTALL' => 1,
'AC_INIT' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_SUBST' => 1,
'AC_FUNC_ALLOCA' => 1,
'_AM_SET_OPTION' => 1,
'AC_CANONICAL_HOST' => 1,
'_LT_LINKER_BOILERPLATE' => 1,
'AC_LIBTOOL_PROG_CC_C_O' => 1,
'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
'AC_PROG_RANLIB' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_MMAP' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_CHECK_TYPES' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AC_CHECK_MEMBERS' => 1,
'AC_DEFUN_ONCE' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'_LT_AC_LANG_GCJ' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_HEADER_STAT' => 1,
'AC_C_INLINE' => 1,
'AC_LIBTOOL_RC' => 1,
'_LT_AC_PROG_ECHO_BACKSLASH' => 1,
'AC_DISABLE_FAST_INSTALL' => 1,
'AC_CONFIG_FILES' => 1,
'_LT_AC_TRY_DLOPEN_SELF' => 1,
'_LT_AC_SYS_LIBPATH_AIX' => 1,
'include' => 1,
'LT_AC_PROG_SED' => 1,
'AM_ENABLE_SHARED' => 1,
'AM_GNU_GETTEXT' => 1,
'_LT_AC_LANG_GCJ_CONFIG' => 1,
'AC_ENABLE_SHARED' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
'AC_ENABLE_STATIC' => 1,
'AC_FUNC_FSEEKO' => 1,
'_LT_AC_TAGVAR' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
'AM_CONDITIONAL' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_LN_S' => 1,
'AM_PROG_INSTALL_SH' => 1,
'm4_include' => 1,
'AC_PROG_EGREP' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_PATH_MAGIC' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'AM_MAKE_INCLUDE' => 1,
'_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_LIBTOOL_COMPILER_OPTION' => 1,
'AC_DISABLE_SHARED' => 1,
'_LT_COMPILER_BOILERPLATE' => 1,
'AC_LIBTOOL_SETUP' => 1,
'AC_LIBTOOL_WIN32_DLL' => 1,
'AC_PROG_LD_RELOAD_FLAG' => 1,
'AC_HEADER_TIME' => 1,
'AM_MISSING_HAS_RUN' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_LIBTOOL_DLOPEN_SELF' => 1,
'm4_sinclude' => 1,
'AC_PATH_X' => 1,
'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
'AC_HEADER_STDC' => 1,
'AC_LIBTOOL_LINKER_OPTION' => 1,
'LT_AC_PROG_RC' => 1,
'AC_LIBTOOL_CXX' => 1,
'LT_AC_PROG_GCJ' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AM_DISABLE_STATIC' => 1,
'_LT_AC_PROG_CXXCPP' => 1,
'AM_DEP_TRACK' => 1,
'_AC_PROG_LIBTOOL' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_TYPE_SIGNAL' => 1,
'_AM_IF_OPTION' => 1,
'AC_TYPE_UID_T' => 1,
'AC_PATH_TOOL_PREFIX' => 1,
'm4_pattern_allow' => 1,
'AC_LIBTOOL_F77' => 1,
'AM_SET_LEADING_DOT' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'_AM_DEPENDENCIES' => 1,
'AC_LIBTOOL_LANG_C_CONFIG' => 1,
'_LT_AC_SYS_COMPILER' => 1,
'AC_PROG_CC' => 1,
'AM_PROG_NM' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_PROG_YACC' => 1,
'AC_LIBLTDL_CONVENIENCE' => 1,
'AC_DEPLIBS_CHECK_METHOD' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_LIBLTDL_INSTALLABLE' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
'AC_FUNC_GETPGRP' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_DISABLE_STATIC' => 1,
'AC_CONFIG_LINKS' => 1,
'AM_MAINTAINER_MODE' => 1,
'_LT_AC_LOCK' => 1,
'_LT_AC_LANG_RC_CONFIG' => 1,
'AC_PROG_CPP' => 1,
'AC_C_CONST' => 1,
'AC_PROG_LEX' => 1,
'AC_TYPE_PID_T' => 1,
'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'AC_PROG_INSTALL' => 1,
'_LT_AC_LANG_F77_CONFIG' => 1,
'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
'_AM_SET_OPTIONS' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AM_RUN_LOG' => 1,
'AC_LIBTOOL_PICMODE' => 1,
'AH_OUTPUT' => 1,
'AC_CHECK_LIBM' => 1,
'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
'_AM_MANGLE_OPTION' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
'AC_CONFIG_HEADERS' => 1,
'AM_SET_DEPDIR' => 1,
'_LT_CC_BASENAME' => 1,
'AC_CHECK_FUNCS' => 1
}
], 'Autom4te::Request' ),
bless( [
'2',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.in'
],
{
'_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_C_VOLATILE' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_STRUCT_TM' => 1,
'AC_FUNC_LSTAT' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRNLEN' => 1,
'm4_sinclude' => 1,
'AC_PROG_CXX' => 1,
'AC_PATH_X' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_PROG_AWK' => 1,
'_m4_warn' => 1,
'AC_HEADER_STDC' => 1,
'AC_HEADER_MAJOR' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_LIBSOURCE' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_TYPE_UID_T' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
'm4_pattern_allow' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_PROG_CC' => 1,
'AC_FUNC_FORK' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_PROG_YACC' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_INIT' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_SUBST' => 1,
'AC_FUNC_ALLOCA' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_PROG_RANLIB' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_MMAP' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_CHECK_TYPES' => 1,
'LT_SUPPORTED_TAG' => 1,
'AC_CHECK_MEMBERS' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_HEADER_STAT' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_PROG_CPP' => 1,
'AC_C_INLINE' => 1,
'AC_TYPE_PID_T' => 1,
'AC_PROG_LEX' => 1,
'AC_C_CONST' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_PROG_INSTALL' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_FSEEKO' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_CONDITIONAL' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_MEMCMP' => 1,
'm4_include' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CHECK_FUNCS' => 1
}
], 'Autom4te::Request' )
);

View File

@ -1,152 +0,0 @@
m4trace:configure.in:18: -1- AC_INIT([libsangoma], [3.5.0], [ncorbic@sangoma.com])
m4trace:configure.in:18: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.in:18: -1- m4_pattern_forbid([_AC_])
m4trace:configure.in:18: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.in:18: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.in:18: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.in:18: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.in:18: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.in:18: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
m4trace:configure.in:18: -1- AC_SUBST([PATH_SEPARATOR])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
m4trace:configure.in:18: -1- AC_SUBST([exec_prefix], [NONE])
m4trace:configure.in:18: -1- AC_SUBST([prefix], [NONE])
m4trace:configure.in:18: -1- AC_SUBST([program_transform_name], [s,x,x,])
m4trace:configure.in:18: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
m4trace:configure.in:18: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
m4trace:configure.in:18: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
m4trace:configure.in:18: -1- AC_SUBST([datadir], ['${prefix}/share'])
m4trace:configure.in:18: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
m4trace:configure.in:18: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
m4trace:configure.in:18: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
m4trace:configure.in:18: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
m4trace:configure.in:18: -1- AC_SUBST([includedir], ['${prefix}/include'])
m4trace:configure.in:18: -1- AC_SUBST([oldincludedir], ['/usr/include'])
m4trace:configure.in:18: -1- AC_SUBST([infodir], ['${prefix}/info'])
m4trace:configure.in:18: -1- AC_SUBST([mandir], ['${prefix}/man'])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
#undef PACKAGE_NAME])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
#undef PACKAGE_VERSION])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
#undef PACKAGE_STRING])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT])
m4trace:configure.in:18: -1- AC_SUBST([build_alias])
m4trace:configure.in:18: -1- AC_SUBST([host_alias])
m4trace:configure.in:18: -1- AC_SUBST([target_alias])
m4trace:configure.in:18: -1- AC_SUBST([DEFS])
m4trace:configure.in:18: -1- AC_SUBST([ECHO_C])
m4trace:configure.in:18: -1- AC_SUBST([ECHO_N])
m4trace:configure.in:18: -1- AC_SUBST([ECHO_T])
m4trace:configure.in:18: -1- AC_SUBST([LIBS])
m4trace:configure.in:19: -1- AC_CONFIG_HEADERS([config.h])
m4trace:configure.in:28: -1- AC_SUBST([LIBSANGOMA_LT_CURRENT])
m4trace:configure.in:29: -1- AC_SUBST([LIBSANGOMA_LT_REVISION])
m4trace:configure.in:30: -1- AC_SUBST([LIBSANGOMA_LT_AGE])
m4trace:configure.in:33: -1- AC_PROG_CC
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([CFLAGS])
m4trace:configure.in:33: -1- AC_SUBST([LDFLAGS])
m4trace:configure.in:33: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.in:33: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
m4trace:configure.in:33: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
m4trace:configure.in:35: -1- AC_SUBST([AR])
m4trace:configure.in:39: -1- AC_CHECK_HEADERS([fcntl.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h math.h])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_MATH_H], [/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H])
m4trace:configure.in:39: -1- AC_HEADER_STDC
m4trace:configure.in:39: -1- AC_PROG_CPP
m4trace:configure.in:39: -1- AC_SUBST([CPP])
m4trace:configure.in:39: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:39: -1- AC_SUBST([CPP])
m4trace:configure.in:39: -1- AC_SUBST([EGREP])
m4trace:configure.in:39: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
m4trace:configure.in:39: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS])
m4trace:configure.in:39: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
m4trace:configure.in:45: -1- AC_SUBST([LIBPRI_PATH])
m4trace:configure.in:48: -1- AC_HEADER_TIME
m4trace:configure.in:48: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
m4trace:configure.in:48: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME])
m4trace:configure.in:51: -1- AC_FUNC_SELECT_ARGTYPES
m4trace:configure.in:51: -1- AC_CHECK_HEADERS([sys/select.h sys/socket.h])
m4trace:configure.in:51: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H])
m4trace:configure.in:51: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H])
m4trace:configure.in:51: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG1])
m4trace:configure.in:51: -1- AH_OUTPUT([SELECT_TYPE_ARG1], [/* Define to the type of arg 1 for `select\'. */
#undef SELECT_TYPE_ARG1])
m4trace:configure.in:51: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG234])
m4trace:configure.in:51: -1- AH_OUTPUT([SELECT_TYPE_ARG234], [/* Define to the type of args 2, 3 and 4 for `select\'. */
#undef SELECT_TYPE_ARG234])
m4trace:configure.in:51: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG5])
m4trace:configure.in:51: -1- AH_OUTPUT([SELECT_TYPE_ARG5], [/* Define to the type of arg 5 for `select\'. */
#undef SELECT_TYPE_ARG5])
m4trace:configure.in:52: -1- AC_CHECK_FUNCS([gettimeofday memset select socket])
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */
#undef HAVE_GETTIMEOFDAY])
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */
#undef HAVE_MEMSET])
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_SELECT], [/* Define to 1 if you have the `select\' function. */
#undef HAVE_SELECT])
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */
#undef HAVE_SOCKET])
m4trace:configure.in:53: -1- AC_CONFIG_FILES([Makefile])
m4trace:configure.in:54: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.in:54: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])

File diff suppressed because it is too large Load Diff

View File

@ -1,443 +0,0 @@
m4trace:configure.in:18: -1- AC_INIT([libsangoma], [3.5.0], [ncorbic@sangoma.com])
m4trace:configure.in:18: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.in:18: -1- m4_pattern_forbid([_AC_])
m4trace:configure.in:18: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.in:18: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.in:18: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.in:18: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.in:18: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.in:18: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
m4trace:configure.in:18: -1- AC_SUBST([PATH_SEPARATOR])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
m4trace:configure.in:18: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
m4trace:configure.in:18: -1- AC_SUBST([exec_prefix], [NONE])
m4trace:configure.in:18: -1- AC_SUBST([prefix], [NONE])
m4trace:configure.in:18: -1- AC_SUBST([program_transform_name], [s,x,x,])
m4trace:configure.in:18: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
m4trace:configure.in:18: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
m4trace:configure.in:18: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
m4trace:configure.in:18: -1- AC_SUBST([datadir], ['${prefix}/share'])
m4trace:configure.in:18: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
m4trace:configure.in:18: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
m4trace:configure.in:18: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
m4trace:configure.in:18: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
m4trace:configure.in:18: -1- AC_SUBST([includedir], ['${prefix}/include'])
m4trace:configure.in:18: -1- AC_SUBST([oldincludedir], ['/usr/include'])
m4trace:configure.in:18: -1- AC_SUBST([infodir], ['${prefix}/info'])
m4trace:configure.in:18: -1- AC_SUBST([mandir], ['${prefix}/man'])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
#undef PACKAGE_NAME])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
#undef PACKAGE_VERSION])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
#undef PACKAGE_STRING])
m4trace:configure.in:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
m4trace:configure.in:18: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT])
m4trace:configure.in:18: -1- AC_SUBST([build_alias])
m4trace:configure.in:18: -1- AC_SUBST([host_alias])
m4trace:configure.in:18: -1- AC_SUBST([target_alias])
m4trace:configure.in:18: -1- AC_SUBST([DEFS])
m4trace:configure.in:18: -1- AC_SUBST([ECHO_C])
m4trace:configure.in:18: -1- AC_SUBST([ECHO_N])
m4trace:configure.in:18: -1- AC_SUBST([ECHO_T])
m4trace:configure.in:18: -1- AC_SUBST([LIBS])
m4trace:configure.in:19: -1- AC_CONFIG_HEADERS([config.h])
m4trace:configure.in:20: -1- AM_INIT_AUTOMAKE
m4trace:configure.in:20: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
m4trace:configure.in:20: -1- AM_AUTOMAKE_VERSION([1.9.6])
m4trace:configure.in:20: -1- AC_PROG_INSTALL
m4trace:configure.in:20: -1- AC_SUBST([INSTALL_PROGRAM])
m4trace:configure.in:20: -1- AC_SUBST([INSTALL_SCRIPT])
m4trace:configure.in:20: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.in:20: -1- AC_SUBST([CYGPATH_W])
m4trace:configure.in:20: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
m4trace:configure.in:20: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
m4trace:configure.in:20: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
m4trace:configure.in:20: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
#undef PACKAGE])
m4trace:configure.in:20: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
m4trace:configure.in:20: -1- AH_OUTPUT([VERSION], [/* Version number of package */
#undef VERSION])
m4trace:configure.in:20: -1- AC_SUBST([ACLOCAL])
m4trace:configure.in:20: -1- AC_SUBST([AUTOCONF])
m4trace:configure.in:20: -1- AC_SUBST([AUTOMAKE])
m4trace:configure.in:20: -1- AC_SUBST([AUTOHEADER])
m4trace:configure.in:20: -1- AC_SUBST([MAKEINFO])
m4trace:configure.in:20: -1- AC_SUBST([install_sh])
m4trace:configure.in:20: -1- AC_SUBST([STRIP])
m4trace:configure.in:20: -1- AC_SUBST([ac_ct_STRIP])
m4trace:configure.in:20: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
m4trace:configure.in:20: -1- AC_SUBST([mkdir_p])
m4trace:configure.in:20: -1- AC_PROG_AWK
m4trace:configure.in:20: -1- AC_SUBST([AWK])
m4trace:configure.in:20: -1- AC_PROG_MAKE_SET
m4trace:configure.in:20: -1- AC_SUBST([SET_MAKE])
m4trace:configure.in:20: -1- AC_SUBST([am__leading_dot])
m4trace:configure.in:20: -1- AC_SUBST([AMTAR])
m4trace:configure.in:20: -1- AC_SUBST([am__tar])
m4trace:configure.in:20: -1- AC_SUBST([am__untar])
m4trace:configure.in:28: -1- AC_SUBST([LIBSANGOMA_LT_CURRENT])
m4trace:configure.in:29: -1- AC_SUBST([LIBSANGOMA_LT_REVISION])
m4trace:configure.in:30: -1- AC_SUBST([LIBSANGOMA_LT_AGE])
m4trace:configure.in:33: -1- AC_PROG_CC
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([CFLAGS])
m4trace:configure.in:33: -1- AC_SUBST([LDFLAGS])
m4trace:configure.in:33: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([CC])
m4trace:configure.in:33: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.in:33: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
m4trace:configure.in:33: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
m4trace:configure.in:33: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
m4trace:configure.in:33: -1- AC_SUBST([am__include])
m4trace:configure.in:33: -1- AC_SUBST([am__quote])
m4trace:configure.in:33: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
m4trace:configure.in:33: -1- AC_SUBST([AMDEP_TRUE])
m4trace:configure.in:33: -1- AC_SUBST([AMDEP_FALSE])
m4trace:configure.in:33: -1- AC_SUBST([AMDEPBACKSLASH])
m4trace:configure.in:33: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
m4trace:configure.in:33: -1- AM_CONDITIONAL([am__fastdepCC], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
m4trace:configure.in:33: -1- AC_SUBST([am__fastdepCC_TRUE])
m4trace:configure.in:33: -1- AC_SUBST([am__fastdepCC_FALSE])
m4trace:configure.in:34: -1- AC_PROG_LIBTOOL
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
aclocal.m4:1955: AC_ENABLE_SHARED is expanded from...
configure.in:34: AC_ENABLE_SHARED is required by...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
aclocal.m4:1994: AC_ENABLE_STATIC is expanded from...
configure.in:34: AC_ENABLE_STATIC is required by...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
aclocal.m4:2033: AC_ENABLE_FAST_INSTALL is expanded from...
configure.in:34: AC_ENABLE_FAST_INSTALL is required by...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- AC_CANONICAL_HOST
m4trace:configure.in:34: -1- AC_CANONICAL_BUILD
m4trace:configure.in:34: -1- AC_SUBST([build], [$ac_cv_build])
m4trace:configure.in:34: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
m4trace:configure.in:34: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
m4trace:configure.in:34: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
m4trace:configure.in:34: -1- AC_SUBST([host], [$ac_cv_host])
m4trace:configure.in:34: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
m4trace:configure.in:34: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
m4trace:configure.in:34: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
aclocal.m4:2230: AC_PROG_LD is expanded from...
configure.in:34: AC_PROG_LD is required by...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- AC_SUBST([SED])
m4trace:configure.in:34: -1- AC_SUBST([EGREP])
m4trace:configure.in:34: -1- AC_PROG_LN_S
m4trace:configure.in:34: -1- AC_SUBST([LN_S], [$as_ln_s])
m4trace:configure.in:34: -1- AC_SUBST([ECHO])
m4trace:configure.in:34: -1- AC_SUBST([AR])
m4trace:configure.in:34: -1- AC_SUBST([ac_ct_AR])
m4trace:configure.in:34: -1- AC_SUBST([RANLIB])
m4trace:configure.in:34: -1- AC_SUBST([ac_ct_RANLIB])
m4trace:configure.in:34: -1- AC_SUBST([STRIP])
m4trace:configure.in:34: -1- AC_SUBST([ac_ct_STRIP])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
aclocal.m4:614: _LT_AC_LOCK is expanded from...
configure.in:34: _LT_AC_LOCK is required by...
aclocal.m4:1100: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:2742: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:2673: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- AC_CHECK_HEADERS([dlfcn.h])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H])
m4trace:configure.in:34: -1- AC_HEADER_STDC
m4trace:configure.in:34: -1- AC_PROG_CPP
m4trace:configure.in:34: -1- AC_SUBST([CPP])
m4trace:configure.in:34: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:34: -1- AC_SUBST([CPP])
m4trace:configure.in:34: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
m4trace:configure.in:34: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS])
m4trace:configure.in:34: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H])
m4trace:configure.in:34: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
m4trace:configure.in:34: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [
lt_cv_dlopen="dyld"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
])
m4trace:configure.in:34: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
[AC_CHECK_LIB([svld], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
])
])
])
m4trace:configure.in:34: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
])
m4trace:configure.in:34: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link],
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
m4trace:configure.in:34: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
m4trace:configure.in:34: -1- _LT_AC_TAGCONFIG
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists], [aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists], [aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- AC_PROG_CXX
m4trace:configure.in:34: -1- AC_SUBST([CXX])
m4trace:configure.in:34: -1- AC_SUBST([CXXFLAGS])
m4trace:configure.in:34: -1- AC_SUBST([LDFLAGS])
m4trace:configure.in:34: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:34: -1- AC_SUBST([CXX])
m4trace:configure.in:34: -1- AC_SUBST([ac_ct_CXX])
m4trace:configure.in:34: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type])
m4trace:configure.in:34: -1- AM_CONDITIONAL([am__fastdepCXX], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3])
m4trace:configure.in:34: -1- AC_SUBST([am__fastdepCXX_TRUE])
m4trace:configure.in:34: -1- AC_SUBST([am__fastdepCXX_FALSE])
m4trace:configure.in:34: -1- AC_SUBST([CXXCPP])
m4trace:configure.in:34: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.in:34: -1- AC_SUBST([CXXCPP])
m4trace:configure.in:34: -1- AC_SUBST([F77])
m4trace:configure.in:34: -1- AC_SUBST([FFLAGS])
m4trace:configure.in:34: -1- AC_SUBST([LDFLAGS])
m4trace:configure.in:34: -1- AC_SUBST([F77])
m4trace:configure.in:34: -1- AC_SUBST([ac_ct_F77])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete.
You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from...
aclocal.m4:4063: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4015: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE',
and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from...
aclocal.m4:4063: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4015: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete.
You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from...
aclocal.m4:4063: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4015: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete.
You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from...
aclocal.m4:4107: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4071: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE',
and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from...
aclocal.m4:4107: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4071: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete.
You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from...
aclocal.m4:4107: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4071: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
aclocal.m4:1909: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.in:34: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.in:34: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
configure.in:34: the top level])
m4trace:configure.in:34: -1- AC_SUBST([LIBTOOL])
m4trace:configure.in:35: -1- AC_SUBST([AR])
m4trace:configure.in:39: -1- AC_CHECK_HEADERS([fcntl.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h math.h])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
m4trace:configure.in:39: -1- AH_OUTPUT([HAVE_MATH_H], [/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H])
m4trace:configure.in:44: -1- AM_CONDITIONAL([LIBPRI], [test -d "$LIBPRI_PATH" ])
m4trace:configure.in:44: -1- AC_SUBST([LIBPRI_TRUE])
m4trace:configure.in:44: -1- AC_SUBST([LIBPRI_FALSE])
m4trace:configure.in:45: -1- AC_SUBST([LIBPRI_PATH])
m4trace:configure.in:48: -1- AC_HEADER_TIME
m4trace:configure.in:48: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
m4trace:configure.in:48: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME])
m4trace:configure.in:51: -1- AC_FUNC_SELECT_ARGTYPES
m4trace:configure.in:51: -1- AC_CHECK_HEADERS([sys/select.h sys/socket.h])
m4trace:configure.in:51: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H])
m4trace:configure.in:51: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H])
m4trace:configure.in:51: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG1])
m4trace:configure.in:51: -1- AH_OUTPUT([SELECT_TYPE_ARG1], [/* Define to the type of arg 1 for `select\'. */
#undef SELECT_TYPE_ARG1])
m4trace:configure.in:51: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG234])
m4trace:configure.in:51: -1- AH_OUTPUT([SELECT_TYPE_ARG234], [/* Define to the type of args 2, 3 and 4 for `select\'. */
#undef SELECT_TYPE_ARG234])
m4trace:configure.in:51: -1- AC_DEFINE_TRACE_LITERAL([SELECT_TYPE_ARG5])
m4trace:configure.in:51: -1- AH_OUTPUT([SELECT_TYPE_ARG5], [/* Define to the type of arg 5 for `select\'. */
#undef SELECT_TYPE_ARG5])
m4trace:configure.in:52: -1- AC_CHECK_FUNCS([gettimeofday memset select socket])
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */
#undef HAVE_GETTIMEOFDAY])
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */
#undef HAVE_MEMSET])
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_SELECT], [/* Define to 1 if you have the `select\' function. */
#undef HAVE_SELECT])
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */
#undef HAVE_SOCKET])
m4trace:configure.in:53: -1- AC_CONFIG_FILES([Makefile])
m4trace:configure.in:54: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.in:54: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])

View File

@ -1 +0,0 @@
/usr/share/libtool/config.guess

View File

@ -1,100 +0,0 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to the type of arg 1 for `select'. */
#undef SELECT_TYPE_ARG1
/* Define to the type of args 2, 3 and 4 for `select'. */
#undef SELECT_TYPE_ARG234
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION

View File

@ -1 +0,0 @@
/usr/share/libtool/config.sub

20701
api/libsangoma/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1004,7 +1004,7 @@ int main (int argc, char* argv[])
slot->hdlc_eng->decoder.stats.frame_overflow,
slot->stats.errors,
slot->stats.rx_fifo_errors,
status?"failed":"status");
status?"failed":"passed");
if (slot->stats.errors) {
print_stats(slot);

View File

@ -1 +0,0 @@
/usr/share/libtool/ltmain.sh

View File

@ -1 +0,0 @@
Makefile.Linux

View File

@ -1,29 +0,0 @@
CC=gcc
WANINC=$(WAN_VIRTUAL)/usr/include/wanpipe
WLINC=../../../patches/kdrivers/include
WEC=../../../patches/kdrivers/wanec
WECOCT=../../../patches/kdrivers/wanec/oct6100_api/include
INCLUDES=-I../ -I/usr/include -I/usr/src/libpri -I$(WLINC) -I$(WEC) -I$(WECOCT) -I$(WANINC) -I$(WANINC)/oct6100_api -I$(WANINC)/oct6100_api/oct6100api -I. -Ihdlc -I/usr/local/include
CFLAGS=-D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -O2 -DWANPIPE_TDM_API
CCFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes -g
all: sample_c
everything: sample_c hdlc_test.c
lib_api.o: lib_api.c
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o lib_api.o lib_api.c
sample.o: sample.c
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o sample.o sample.c
sample_c: sample.o lib_api.o
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -o sample_c sample.o lib_api.o -L. -lsangoma -lm
clean:
rm -fr sample_c *.o *.so *~ *core* *.so* *.a
distclean: clean
@echo OK

View File

@ -1,26 +0,0 @@
@echo off
set CURRENT_DIR=%cd%
set SANG_WP_DEVEL=d:\development
set SANG_WARNING_LEVEL=-W3 -WX
copy Makefile.Windows makefile
if %errorlevel% NEQ 0 goto failure
build -c -w
if %errorlevel% NEQ 0 goto failure
:ok
echo ********************
echo build was successful
echo ********************
goto end
:failure
echo !!!!!!!!!!!!!!!!!!!!!!!
echo build was UN-successful
echo !!!!!!!!!!!!!!!!!!!!!!!
:end
echo End

View File

@ -1,514 +0,0 @@
/*****************************************************************************
* lib_api.c Sangoma Command Line Arguments parsing library
*
* Author(s): Nenad Corbic <ncorbic@sangoma.com>
* David Rokhvarg <davidr@sangoma.com>
*
* Copyright: (c) 2003 Sangoma Technologies Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
* ============================================================================
*/
#include "libsangoma.h"
#include "lib_api.h"
#define SINGLE_CHANNEL 0x2
#define RANGE_CHANNEL 0x1
char read_enable=0;
char write_enable=0;
char primary_enable=0;
int tx_cnt=0;
int rx_cnt=0;
int tx_size=10;
int tx_delay=0;
int tx_data=-1;
int buffer_multiplier=0;
int fe_read_cmd=0;
uint32_t fe_read_reg=0;
int fe_write_cmd=0;
uint32_t fe_write_reg=0;
uint32_t fe_write_data=0;
float rx_gain=0;
float tx_gain=0;
int rx_gain_cmd=0;
int tx_gain_cmd=0;
unsigned char tx_file[WAN_IFNAME_SZ];
unsigned char rx_file[WAN_IFNAME_SZ];
unsigned char daddr[TX_ADDR_STR_SZ];
unsigned char saddr[TX_ADDR_STR_SZ];
unsigned char udata[TX_ADDR_STR_SZ];
int files_used=0;
int verbose=0;
int tx_connections;
int ds_prot=0;
int ds_prot_opt=0;
int ds_max_mult_cnt=0;
unsigned int ds_active_ch=0;
int ds_7bit_hdlc=0;
int direction=-1;
int tx_channels=1;
int cause=0;
int diagn=0;
int wanpipe_port_no=0;
int wanpipe_if_no=0;
int dtmf_enable_octasic = 0;
int dtmf_enable_remora = 0;
int remora_hook = 0;
int usr_period = 0;
int set_codec_slinear = 0;
int set_codec_none = 0;
int rbs_events = 0;
int rx2tx = 0;
int flush_period=0;
int stats_period=0;
int stats_test=0;
int flush_stats_test=0;
int hdlc_repeat=0;
int ss7_cfg_status=0;
int fe_read_test=0;
int hw_pci_rescan=0;
int force_open=0;
unsigned long parse_active_channel(char* val);
int init_args(int argc, char *argv[])
{
int i;
int c_cnt=0;
sprintf((char*)daddr,"111");
sprintf((char*)saddr,"222");
sprintf((char*)udata,"C9");
for (i = 0; i < argc; i++){
if (!strcmp(argv[i],"-i") || !strcmp(argv[i],"-chan")){
if (i+1 > argc-1){
printf("ERROR: Number of Interfaces was NOT specified!\n");
return WAN_FALSE;
}
wanpipe_if_no = atoi(argv[i+1]);
}else if (!strcmp(argv[i],"-p") || !strcmp(argv[i],"-span")){
if (i+1 > argc-1){
printf("ERROR: Number of Ports was NOT specified!\n");
return WAN_FALSE;
}
wanpipe_port_no = atoi(argv[i+1]);
}else if (!strcmp(argv[i],"-r")){
read_enable=1;
c_cnt=1;
}else if (!strcmp(argv[i],"-w")){
write_enable=1;
c_cnt=1;
}else if (!strcmp(argv[i],"-hdlc_repeat")){
hdlc_repeat=1;
}else if (!strcmp(argv[i],"-stats_test")){
stats_test=1;
force_open=1;
c_cnt=1;
}else if (!strcmp(argv[i],"-flush_stats_test")){
flush_stats_test=1;
force_open=1;
c_cnt=1;
}else if (!strcmp(argv[i],"-ss7_cfg_status")){
ss7_cfg_status=1;
}else if (!strcmp(argv[i],"-fe_read_test")){
fe_read_test=1;
}else if (!strcmp(argv[i],"-hw_pci_rescan")){
hw_pci_rescan=1;
wanpipe_port_no=1;
wanpipe_if_no=1;
c_cnt=1;
}else if (!strcmp(argv[i],"-force_open")){
force_open=1;
}else if (!strcmp(argv[i],"-pri")){
primary_enable=1;
}else if (!strcmp(argv[i],"-txcnt")){
if (i+1 > argc-1){
printf("ERROR: Invalid tx cnt!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
tx_cnt = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid tx cnt!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-rxcnt")){
if (i+1 > argc-1){
printf("ERROR: Invalid rx cnt!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
rx_cnt = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid rx cnt!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-txsize")){
if (i+1 > argc-1){
printf("ERROR: Invalid tx size!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
tx_size = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid tx size, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-txdelay")){
if (i+1 > argc-1){
printf("ERROR: Invalid tx delay!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
tx_delay = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid tx delay, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-txdata")){
if (i+1 > argc-1){
printf("ERROR: Invalid tx data!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
tx_data = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid tx data, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-txfile")){
if (i+1 > argc-1){
printf("ERROR: Invalid Tx File Name!\n");
return WAN_FALSE;
}
strncpy((char*)tx_file, argv[i+1],WAN_IFNAME_SZ);
files_used |= TX_FILE_USED;
}else if (!strcmp(argv[i],"-rxfile")){
if (i+1 > argc-1){
printf("ERROR: Invalid Rx File Name!\n");
return WAN_FALSE;
}
strncpy((char*)rx_file, argv[i+1],WAN_IFNAME_SZ);
files_used |= RX_FILE_USED;
}else if (!strcmp(argv[i],"-daddr")){
if (i+1 > argc-1){
printf("ERROR: Invalid daddr str!\n");
return WAN_FALSE;
}
strncpy((char*)daddr, argv[i+1],TX_ADDR_STR_SZ);
}else if (!strcmp(argv[i],"-saddr")){
if (i+1 > argc-1){
printf("ERROR: Invalid saddr str!\n");
return WAN_FALSE;
}
strncpy((char*)saddr, argv[i+1],TX_ADDR_STR_SZ);
}else if (!strcmp(argv[i],"-udata")){
if (i+1 > argc-1){
printf("ERROR: Invalid udata str!\n");
return WAN_FALSE;
}
strncpy((char*)udata, argv[i+1],TX_ADDR_STR_SZ);
}else if (!strcmp(argv[i],"-verbose")){
verbose=1;
}else if (!strcmp(argv[i],"-buffer_multiplier")) {
if (i+1 > argc-1){
printf("ERROR: Invalid prot!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
buffer_multiplier = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid prot, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-prot")){
if (i+1 > argc-1){
printf("ERROR: Invalid prot!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
ds_prot = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid prot, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-prot_opt")){
if (i+1 > argc-1){
printf("ERROR: Invalid prot_opt!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
ds_prot_opt = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid prot_opt, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-max_mult_cnt")){
if (i+1 > argc-1){
printf("ERROR: Invalid max_mult_cnt!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
ds_max_mult_cnt = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid max_mult_cnt, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-txchan")){
if (i+1 > argc-1){
printf("ERROR: Invalid channels!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
tx_channels = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid channels, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-diagn")){
if (i+1 > argc-1){
printf("ERROR: Invalid diagn!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
diagn = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid diagn, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-cause")){
if (i+1 > argc-1){
printf("ERROR: Invalid cause!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
cause = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid cause, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-7bit_hdlc")){
if (i+1 > argc-1){
printf("ERROR: Invalid 7bit hdlc value!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
ds_7bit_hdlc = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid 7bit hdlc, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-dir")){
if (i+1 > argc-1){
printf("ERROR: Invalid direction value!\n");
return WAN_FALSE;
}
if(isdigit(argv[i+1][0])){
direction = atoi(argv[i+1]);
}else{
printf("ERROR: Invalid direction, must be a digit!\n");
return WAN_FALSE;
}
}else if (!strcmp(argv[i],"-dtmf_octasic")){
dtmf_enable_octasic = 1;
}else if (!strcmp(argv[i],"-dtmf_remora")){
dtmf_enable_remora = 1;
}else if(!strcmp(argv[i],"-usr_period")){
if (i+1 > argc-1){
printf("ERROR: Invalid 'usr_period' value!\n");
}else{
usr_period = atoi(argv[i+1]);
}
}else if(!strcmp(argv[i],"-flush_period")){
if (i+1 > argc-1){
printf("ERROR: Invalid 'flush_period' value!\n");
}else{
flush_period = atoi(argv[i+1]);
}
}else if(!strcmp(argv[i],"-stats_period")){
if (i+1 > argc-1){
printf("ERROR: Invalid 'stats_period' value!\n");
}else{
stats_period = atoi(argv[i+1]);
}
}else if(!strcmp(argv[i],"-rbs_events")){
rbs_events = 1;
}else if(!strcmp(argv[i],"-rx2tx")){
rx2tx = 1;
}else if(!strcmp(argv[i],"-fe_reg_read")) {
if (i+1 > argc-1){
printf("ERROR: Invalid 'flush_period' value!\n");
}else{
fe_read_cmd=1;
sscanf(argv[i+1],"%x",(uint32_t*)&fe_read_reg);
}
}else if(!strcmp(argv[i],"-fe_reg_write")) {
if (i+2 > argc-1){
printf("ERROR: Invalid 'flush_period' value!\n");
}else{
fe_write_cmd=1;
sscanf(argv[i+1],"%x",(uint32_t*)&fe_write_reg);
sscanf(argv[i+2],"%x",(uint32_t*)&fe_write_data);
}
}else if (!strcmp(argv[i],"-rx_gain")) {
if (i+1 > argc-1){
printf("ERROR: Invalid 'rx_gain' value!\n");
}else{
rx_gain_cmd=1;
sscanf(argv[i+1],"%f",&rx_gain);
}
}else if (!strcmp(argv[i],"-tx_gain")) {
if (i+1 > argc-1){
printf("ERROR: Invalid 'tx_gain' value!\n");
}else{
tx_gain_cmd=1;
sscanf(argv[i+1],"%f",&tx_gain);
}
}
}
if (!wanpipe_port_no || !wanpipe_if_no){
printf("ERROR: No Port Number AND No Interface Number! Both of them needed!\n");
return WAN_FALSE;
}
if (!c_cnt){
printf("Warning: No Read or Write Command\n");
}
return WAN_TRUE;
}
static char api_usage[]="\n"
"\n"
"<options>:\n"
" -span <port/span number> #port/span number\n"
" -chan <if/chan number> #if/chan number\n"
" -r #read enable\n"
" -w #write eable\n"
"\n"
" example 1: sangoma_c -span 1 -chan 1 -r -verbose\n"
" in this example Wanpipe span 1, Interface chan 1 will be used for reading data\n"
"\n"
"<extra options>\n"
" -txcnt <digit> #number of tx packets (Dflt: 1)\n"
" -txsize <digit> #tx packet size (Dflt: 10)\n"
" -txdelay <digit> #delay in sec after each tx packet (Dflt: 0)\n"
" -txdata <digit> #data to tx <1-255>\n"
" -rx2tx #transmit all received data\n"
"\n"
" -dtmf_octasic #Enable DTMF detection on Octasic chip\n"
" -dtmf_remora #Enable DTMF detection on A200 (SLIC) chip\n"
" -remora_hook #Enable On/Off hook events on A200\n"
" -set_codec_slinear #Enable SLINEAR codec\n"
" -set_codec_none #Disable codec\n"
" -rbs_events #Enable RBS change detection\n"
"\n"
" -rxcnt <digit> #number of rx packets before exit\n"
" #this number overwrites the txcnt\n"
" #Thus, app will only exit after it\n"
" #receives the rxcnt number of packets.\n"
" -hdlc_repeat #enable hdlc repeat on tx hdlc write.\n"
"\n"
" -verbose #Enable verbose mode\n"
"\n";
void usage(char *api_name)
{
printf ("\n\nAPI %s USAGE:\n\n%s <options> <extra options>\n\n%s\n",
api_name,api_name,api_usage);
}
/*============================================================================
* TE1
*/
#if 0
unsigned long get_active_channels(int channel_flag, int start_channel, int stop_channel)
{
int i = 0;
unsigned long tmp = 0, mask = 0;
if ((channel_flag & (SINGLE_CHANNEL | RANGE_CHANNEL)) == 0)
return tmp;
if (channel_flag & RANGE_CHANNEL) { /* Range of channels */
for(i = start_channel; i <= stop_channel; i++) {
mask = 1 << (i - 1);
tmp |=mask;
}
} else { /* Single channel */
mask = 1 << (stop_channel - 1);
tmp |= mask;
}
return tmp;
}
#endif

View File

@ -1,89 +0,0 @@
/*****************************************************************************
* lib_api.h Sangoma Command Line Arguments parsing library
*
* Author(s): Nenad Corbic <ncorbic@sangoma.com>
* David Rokhvarg <davidr@sangoma.com>
*
* Copyright: (c) 2003 Sangoma Technologies Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
* ============================================================================
*/
#include "libsangoma.h"
extern char read_enable;
extern char write_enable;
extern char primary_enable;
extern int tx_cnt;
extern int rx_cnt;
extern int tx_size;
extern int tx_delay;
extern int tx_data;
extern int files_used;
extern int verbose;
extern int ds_prot;
extern int ds_prot_opt;
extern int ds_max_mult_cnt;
extern unsigned int ds_active_ch;
extern int ds_7bit_hdlc;
extern int direction;
extern int tx_channels;
extern int diagn;
extern int cause;
extern int wanpipe_port_no;
extern int wanpipe_if_no;
extern int dtmf_enable_octasic;
extern int dtmf_enable_remora;
extern int remora_hook;
extern int usr_period;
extern int set_codec_slinear;
extern int set_codec_none;
extern int rbs_events;
extern int rx2tx;
extern int flush_period;
extern int stats_period;
extern int hdlc_repeat;
extern int ss7_cfg_status;
extern int buffer_multiplier;
extern int fe_read_test;
extern int hw_pci_rescan;
extern int force_open;
extern int fe_read_cmd;
extern uint32_t fe_read_reg;
extern int fe_write_cmd;
extern uint32_t fe_write_reg;
extern uint32_t fe_write_data;
extern int stats_test;
extern int flush_stats_test;
extern float rx_gain;
extern float tx_gain;
extern int rx_gain_cmd;
extern int tx_gain_cmd;
extern unsigned char tx_file[WAN_IFNAME_SZ];
extern unsigned char rx_file[WAN_IFNAME_SZ];
#define TX_ADDR_STR_SZ 100
extern unsigned char daddr[TX_ADDR_STR_SZ];
extern unsigned char saddr[TX_ADDR_STR_SZ];
extern unsigned char udata[TX_ADDR_STR_SZ];
#define TX_FILE_USED 1
#define RX_FILE_USED 2
extern int init_args(int argc, char *argv[]);
extern void usage(char *api_name);
extern void u_delay(int usec);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,41 +0,0 @@
TARGETNAME=sample_c
TARGETPATH=obj
TARGETTYPE=PROGRAM
UMTYPE=console
UMENTRY=main
UMBASE=0x400000
USE_LIBCMT=1
#MSC_WARNING_LEVEL=$(SANG_WARNING_LEVEL)
MSC_WARNING_LEVEL=-W3
############################################################################################
C_DEFINES=$(C_DEFINES) /D__WINDOWS__
############################################################################################
INCLUDES=$(DDK_INC_PATH);\
$(SANG_WP_DEVEL)\wanpipe_common\include;\
$(SANG_WP_DEVEL)\wanpipe_common\include\aft_core;\
$(SANG_WP_DEVEL)\wanpipe_windows\include;\
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libsangoma;\
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libsangoma\wanec;\
$(SANG_WP_DEVEL)\wanpipe_common\wantools\wanec_apilib;\
$(SANG_WP_DEVEL)\wanpipe_common\wanec;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\include;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\include\oct6100api;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\octdeviceapi\oct6100api;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\apilib\llman;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\include\apilib;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\include\octrpc;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\apilib\bt
TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libsangoma\$(O)\libsangoma.lib
SOURCES=sample.c lib_api.c

View File

@ -1 +0,0 @@
Makefile.Linux

View File

@ -1,40 +0,0 @@
# ============================================================================
# Makefile Make script for building Linux WAN router utilities.
# ----------------------------------------------------------------------------
# Copyright (c) 1995-1998 Sangoma Technologies Inc. All Rights Reserved.
# ============================================================================
####### MACROS ###############################################################
# Build options.
OS_TYPE = __LINUX__
DEBUG = 2
LINK_ARGS= -lcurses -lpthread
WLINC=../../../patches/kdrivers/include
WEC=../../../patches/kdrivers/wanec
WECOCT=../../../patches/kdrivers/wanec/oct6100_api/include
# Tools options.
CFLAGS = -Wall -O2 -D$(OS_TYPE) -D_DEBUG_=$(DEBUG) -D_GNUC_
CFLAGS += -I$(WLINC) -I$(WEC) -I$(WECOCT)
CFLAGS += -I$(WAN_VIRTUAL)/usr/include/wanpipe -I$(WAN_VIRTUAL)/usr/include/wanpipe/oct6100_api -I$(WAN_VIRTUAL)/usr/include/wanpipe/oct6100_api -I/usr/include
CFLAGS += $(EXTRA_FLAGS) -D__LINUX__
CFLAGS += -D_REENTRANT -DUSE_STELEPHONY_API -D_GNU_SOURCE -DWANPIPE_TDM_API
CXX=g++
TARGETS=sample_cpp
LIBS= sangoma_port.cpp sangoma_port_configurator.cpp sangoma_cthread.cpp sangoma_interface.cpp
####### RULES ################################################################
all: $(TARGETS)
@echo "Ok."
sample_cpp: sample.cpp $(LIBS) $(LIBS_STEL) $(LIBS_TONE)
$(CXX) $(CFLAGS) -o $@ $^ $(LINK_ARGS) -lsangoma -lstelephony -lm
clean:
rm -f $(TARGETS)

View File

@ -1,26 +0,0 @@
@echo off
set CURRENT_DIR=%cd%
set SANG_WP_DEVEL=d:\development_trunk
set SANG_WARNING_LEVEL=-W3 -WX
copy Makefile.Windows makefile
if %errorlevel% NEQ 0 goto failure
build -c -w
if %errorlevel% NEQ 0 goto failure
:ok
echo ********************
echo build was successful
echo ********************
goto end
:failure
echo !!!!!!!!!!!!!!!!!!!!!!!
echo build was UN-successful
echo !!!!!!!!!!!!!!!!!!!!!!!
:end
echo End

File diff suppressed because it is too large Load Diff

View File

@ -1,309 +0,0 @@
/*
sample.h - common definitions used in this application.
*/
#ifndef _SAMPLE_H
#define _SAMPLE_H
#include <libsangoma.h>
#if USE_STELEPHONY_API
#include <libstelephony.h>
#endif
#define USE_WP_LOGGER 1
#define SAMPLE_CPP_MAX_PATH 1024
#define USE_BUFFER_MULTIPLIER 0
typedef struct{
unsigned int wanpipe_number;
unsigned int interface_number;
unsigned char silent;
uint16_t txlength;
unsigned char Rx_to_Tx_loopback;
unsigned char decode_fsk_cid;
unsigned char encode_fsk_cid;
unsigned char sw_dtmf;
unsigned char encode_sw_dtmf;
unsigned char voice_codec_alaw;
unsigned char decode_q931;
char szTxFileName[SAMPLE_CPP_MAX_PATH];
unsigned int txcount;
unsigned char driver_config;
unsigned char use_ctrl_dev;
unsigned char use_logger_dev;
int txgain;
int rxgain;
unsigned char use_hardware_echo_canceller;
unsigned char real_time;
unsigned char hwec_channel;
#if USE_BUFFER_MULTIPLIER
unsigned int buffer_multiplier;
#endif
}wp_program_settings_t;
#define DEV_NAME_LEN 100
extern void cli_out(unsigned int dbg_flag, void *pszFormat, ...);
extern unsigned int verbosity_level;
typedef struct{
//Recieved data
int (*got_rx_data)(void *sang_if_ptr, void *rxhdr, void *rx_data);
//TDM events
void (*got_tdm_api_event)(void *sang_if_ptr, void *event_data);
#if USE_STELEPHONY_API
//FSK Caller ID detected
void (*FSKCallerIDEvent)(void *sang_if_ptr, char * Name, char * CallerNumber, char * CalledNumber, char * DateTime);
//DTMF detected in SOFTWARE
void (*DTMFEvent)(void *sang_if_ptr, long Key);
//Q931 decoder events
void (*Q931Event)(void *callback_context, stelephony_q931_event *pQ931Event);
//FSK Caller ID buffer ready for transmission events
void (*FSKCallerIDTransmit)(void *callback_context, void* buffer);
//DTMF buffer ready for transmission events
void (*SwDtmfTransmit)(void *callback_context, void* buffer);
#endif
#if USE_WP_LOGGER
void (*got_logger_event)(void *sang_if_ptr, wp_logger_event_t *logger_event);
#endif
}callback_functions_t;
#if USE_BUFFER_MULTIPLIER
# define SAMPLE_CPP_MAX_DATA_LEN (MAX_BUFFER_MULTIPLIER_FACTOR*MAX_NO_DATA_BYTES_IN_FRAME)
#else
# define SAMPLE_CPP_MAX_DATA_LEN MAX_NO_DATA_BYTES_IN_FRAME
#endif
static void wp_print_rbs_cas_bits(unsigned int abcd)
{
printf("A:%1d B:%1d C:%1d D:%1d\n",
(abcd & WAN_RBS_SIG_A) ? 1 : 0,
(abcd & WAN_RBS_SIG_B) ? 1 : 0,
(abcd & WAN_RBS_SIG_C) ? 1 : 0,
(abcd & WAN_RBS_SIG_D) ? 1 : 0);
}
#if defined (__WINDOWS__)
static void DecodeLastError(LPSTR lpszFunction)
{
LPVOID lpMsgBuf;
DWORD dwLastErr = GetLastError();
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
dwLastErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
// Display the string.
printf("Last Error: %s (GetLastError() returned: %d)\n", (char*)lpMsgBuf, dwLastErr);
// Free the buffer.
LocalFree( lpMsgBuf );
}
#endif
//This Program interfaces directly to hardware, it should be real time.
static void sng_set_process_priority_to_real_time()
{
#if defined (__WINDOWS__)
if (!SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS)) {
printf("Failed to set program priority!\n");
}
#else
//TODO: implement for Linux
#endif
}
//This Execution Thread interfaces directly to hardware, it should be real time.
static void sng_set_thread_priority_to_real_time()
{
#if defined (__WINDOWS__)
if (!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL)) {
printf("Failed to set thread priority!\n");
}
#else
//TODO: implement for Linux
#endif
}
/* This flag controls debugging of time difference between
* data receive indications. Disabled by default. */
#define DBG_TIMING 0
#if DBG_TIMING
#define DEBUG_HI_RES_PERF if(0)printf
typedef struct _wan_debug{
LARGE_INTEGER LastHiResolutionCounter;
int high_resolution_timediff_value;
unsigned int allowed_deviation_of_timediff_value;
unsigned int timediff_deviation_counter;
int highest_timediff;
int lowest_timediff;
int latest_timediff;
char *debug_name;//optional
}wan_debug_t;
/* Print contents of wan_debug_t structure:
1. TimeDiff info
2. More info will be added in future
*/
static
void
debug_print_dbg_struct(
wan_debug_t *wan_debug_ptr,
const char *caller_name
)
{
printf("timediff_deviation_counter: %d\n\tTimeDiff (ms) between '%s()':\n\tHighest:%d Lowest:%d Expected: %d Latest: %d allowed deviation:%d\n",
wan_debug_ptr->timediff_deviation_counter,
caller_name,
wan_debug_ptr->highest_timediff,
wan_debug_ptr->lowest_timediff,
wan_debug_ptr->high_resolution_timediff_value,
wan_debug_ptr->latest_timediff,
wan_debug_ptr->allowed_deviation_of_timediff_value);
}
/* Call this function to mesure TimeDiff between some function call. */
static
void
debug_update_timediff(
wan_debug_t *wan_debug_ptr,
const char *caller_name
)
{
LARGE_INTEGER CurrentHiResolutionCounter;
LARGE_INTEGER PerformanceFrequency;
unsigned int number_of_HiResCounterTicks_BETWEEN_function_calls;
int timediff_between_function_calls;
if(!wan_debug_ptr->high_resolution_timediff_value){
//TimeDiff debugging is disabled.
return;
}
QueryPerformanceFrequency(&PerformanceFrequency);
QueryPerformanceCounter(&CurrentHiResolutionCounter);
if( wan_debug_ptr->LastHiResolutionCounter.QuadPart == 0 ){
//It is the 1st time this function is running after TimeDiff debugging was enabled.
//Initialize wan_debug_ptr->LastHiResolutionCounter!
QueryPerformanceCounter(&wan_debug_ptr->LastHiResolutionCounter);
return;
}
#if 0
DEBUG_HI_RES_PERF("Frequency: %I64u\n", PerformanceFrequency);
DEBUG_HI_RES_PERF("hi res cnt difference: %I64u\n",
CurrentHiResolutionCounter.QuadPart - wan_debug_ptr->LastHiResolutionCounter.QuadPart);
#endif
////////////////////////////////////////////////////////////////
//Frequency: 1600000000
//hi res cnt difference: 32038864
//1600000000 / 32038864 = 49.939348661051153374227001306913
////////////////////////////////////////////////////////////////
if((CurrentHiResolutionCounter.QuadPart - wan_debug_ptr->LastHiResolutionCounter.QuadPart)){//check for division by zero
number_of_HiResCounterTicks_BETWEEN_function_calls = (unsigned int)
(PerformanceFrequency.QuadPart / (CurrentHiResolutionCounter.QuadPart - wan_debug_ptr->LastHiResolutionCounter.QuadPart));
}
//note that floating point calculations are not allowed in kernel!
if(number_of_HiResCounterTicks_BETWEEN_function_calls){//check for division by zero
timediff_between_function_calls = 1000 / number_of_HiResCounterTicks_BETWEEN_function_calls;
}
#if 0
if(number_of_HiResCounterTicks_BETWEEN_function_calls < 49 || number_of_HiResCounterTicks_BETWEEN_function_calls > 51){
printf("Warning: Invalid Number of SetEvent() calls per second %d!\n", number_of_HiResCounterTicks_BETWEEN_function_calls);
}
#endif
//if(timediff_between_function_calls < 19 || timediff_between_function_calls > 21){
if( timediff_between_function_calls <
(int)(wan_debug_ptr->high_resolution_timediff_value - wan_debug_ptr->allowed_deviation_of_timediff_value) ||
timediff_between_function_calls >
(int)(wan_debug_ptr->high_resolution_timediff_value + wan_debug_ptr->allowed_deviation_of_timediff_value)){
wan_debug_ptr->timediff_deviation_counter++;
// DEBUG_HI_RES_PERF("diff: %d, hi: %d, low: %d\n", timediff_between_function_calls,
// wan_debug_ptr->highest_timediff, wan_debug_ptr->lowest_timediff);
if(timediff_between_function_calls > 0){//because the FIRST timediff is always negative!
int current_time_diff_delta =
timediff_between_function_calls - wan_debug_ptr->high_resolution_timediff_value;
//negative (example: 10 - 20 = -10)
int lowest_time_diff_delta =
wan_debug_ptr->lowest_timediff - wan_debug_ptr->high_resolution_timediff_value;
//positive (example: 30 - 20 = +10)
int highest_time_diff_delta =
wan_debug_ptr->highest_timediff - wan_debug_ptr->high_resolution_timediff_value;
DEBUG_HI_RES_PERF("curr delta: %d, hi delta: %d, low delta: %d\n",
current_time_diff_delta, highest_time_diff_delta, lowest_time_diff_delta);
if(current_time_diff_delta < 0){
//TimeDiff is BELLOW expected
if( current_time_diff_delta < lowest_time_diff_delta ||
wan_debug_ptr->lowest_timediff == 0){
wan_debug_ptr->lowest_timediff = timediff_between_function_calls;
}
}
if(current_time_diff_delta > 0){
//TimeDiff is ABOVE expected
if(current_time_diff_delta > highest_time_diff_delta ||
wan_debug_ptr->highest_timediff == 0){
wan_debug_ptr->highest_timediff = timediff_between_function_calls;
}
}
}//if(timediff_between_function_calls > 0)
if(!(wan_debug_ptr->timediff_deviation_counter % 10)){
debug_print_dbg_struct(wan_debug_ptr, caller_name);
}
}//if( timediff_between_function_calls ...)
wan_debug_ptr->latest_timediff = timediff_between_function_calls;
//prepare for the NEXT call by storing CURRENT counter
QueryPerformanceCounter(&wan_debug_ptr->LastHiResolutionCounter);
}
/* Set (initialize) the TimeDiff part of wan_debug_t structure. */
static
void
debug_set_timing_info(
wan_debug_t *wan_debug_ptr,
int usr_period,
int allowed_deviation_of_timediff_value
)
{
wan_debug_ptr->high_resolution_timediff_value = usr_period;//in milliseconds. 0 - disable TimeDiff debugging.
if(wan_debug_ptr->high_resolution_timediff_value == 0){
wan_debug_ptr->LastHiResolutionCounter.QuadPart = 0;
}
wan_debug_ptr->highest_timediff = wan_debug_ptr->lowest_timediff = 0;
wan_debug_ptr->allowed_deviation_of_timediff_value = allowed_deviation_of_timediff_value;//milliseconds.
//for example: if 2 and high_resolution_timediff_value is 20,
//will result 18 < 20 < 22
}
/////////////////////////////////////////////////////////////////////////////////////
#endif//DBG_TIMING
#endif//_SAMPLE_H

View File

@ -1,32 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_cpp", "sample.vcproj", "{20071FBB-88EE-41D9-A728-68A883BFC68B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Win64|Win32 = Win64|Win32
Win64|x64 = Win64|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Debug|Win32.ActiveCfg = Debug|Win32
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Debug|Win32.Build.0 = Debug|Win32
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Debug|x64.ActiveCfg = Debug|x64
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Debug|x64.Build.0 = Debug|x64
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Release|Win32.ActiveCfg = Release|Win32
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Release|Win32.Build.0 = Release|Win32
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Release|x64.ActiveCfg = Release|x64
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Release|x64.Build.0 = Release|x64
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Win64|Win32.ActiveCfg = Win64|Win32
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Win64|Win32.Build.0 = Win64|Win32
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Win64|x64.ActiveCfg = Win64|x64
{20071FBB-88EE-41D9-A728-68A883BFC68B}.Win64|x64.Build.0 = Win64|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,873 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="sample_cpp"
ProjectGUID="{20071FBB-88EE-41D9-A728-68A883BFC68B}"
RootNamespace="sample_cpp"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\objchk_wxp_x86\i386"
IntermediateDirectory=".\objchk_wxp_x86\i386"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Debug/sample.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SANG_WP_DEVEL)\wanpipe_windows\releases\wanpipe_6_0_42_3\include&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\releases\wanpipe_6_0_42_3\api\miscellaneous\include_octasic&quot;"
PreprocessorDefinitions="_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;__WINDOWS__;_WIN32_WINNT=0x0500;NOMINMAX;USE_SANGOMA_ERRNO"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/sample.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CallingConvention="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Setupapi.lib $(SANG_WP_DEVEL)\stelephony\objchk_wxp_x86\i386\stelephony.lib $(SANG_WP_DEVEL)\libsangoma\objchk_wxp_x86\i386\libsangoma.lib"
OutputFile=".\objchk_wxp_x86\i386/sample_cpp.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/sample_cpp.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/sample.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName=".\Debug/sample.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SANG_WP_DEVEL)\libsangoma&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\include&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\include\aft_core&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\include&quot;;&quot;$(SANG_WP_DEVEL)\stelephony&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\HighResolutionTimer\include&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\wantools\wanec_apilib&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\wanec&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\releases\wanpipe_6_0_40_0\api\miscellaneous\include_octasic&quot;"
PreprocessorDefinitions="_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;__WINDOWS__;_WIN32_WINNT=0x0500;NOMINMAX;USE_SANGOMA_ERRNO"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/sample.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CallingConvention="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Setupapi.lib $(SANG_WP_DEVEL)\stelephony\objchk_wnet_amd64\amd64\stelephony.lib $(SANG_WP_DEVEL)\libsangoma\objchk_wnet_amd64\amd64\libsangoma.lib"
OutputFile=".\objchk_wxp_x86\i386/sample_cpp.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/sample_cpp.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/sample.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Release/sample.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/sample.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\Release/sample.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/sample.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/sample.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName=".\Release/sample.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/sample.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\Release/sample.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/sample.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/sample.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Win64|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Debug/sample.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SANG_WP_DEVEL)\libsangoma&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\include&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\include\aft_core&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\include&quot;;&quot;$(SANG_WP_DEVEL)\stelephony&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\HighResolutionTimer\include&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\wantools\wanec_apilib&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\wanec&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\releases\wanpipe_6_0_40_0\api\miscellaneous\include_octasic&quot;"
PreprocessorDefinitions="_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;__WINDOWS__;_WIN32_WINNT=0x0500;NOMINMAX;USE_SANGOMA_ERRNO"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/sample.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CallingConvention="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Setupapi.lib $(SANG_WP_DEVEL)\stelephony\objchk_wxp_x86\i386\stelephony.lib $(SANG_WP_DEVEL)\libsangoma\objchk_wxp_x86\i386\libsangoma.lib"
OutputFile=".\objchk_wxp_x86\i386/sample_cpp.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/sample_cpp.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/sample.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Win64|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
CommandLine=""
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName=".\Debug/sample.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SANG_WP_DEVEL)\libsangoma&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\include&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\include\aft_core&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\include&quot;;&quot;$(SANG_WP_DEVEL)\stelephony&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\HighResolutionTimer\include&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\wantools\wanec_apilib&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_common\wanec&quot;;&quot;$(SANG_WP_DEVEL)\wanpipe_windows\releases\wanpipe_6_0_40_0\api\miscellaneous\include_octasic&quot;"
PreprocessorDefinitions="_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;__WINDOWS__;_WIN32_WINNT=0x0500;NOMINMAX;USE_SANGOMA_ERRNO"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/sample.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CallingConvention="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Setupapi.lib $(SANG_WP_DEVEL)\stelephony\objchk_wxp_x86\i386\stelephony.lib $(SANG_WP_DEVEL)\libsangoma\objchk_wxp_x86\i386\libsangoma.lib"
OutputFile=".\objchk_wxp_x86\i386/sample_cpp.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/sample_cpp.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/sample.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="source"
Filter="*.cpp;*.c"
>
<File
RelativePath="sample.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="sangoma_cthread.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="sangoma_interface.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="sangoma_port.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="sangoma_port_configurator.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Win64|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="headers"
Filter="*.h"
>
<File
RelativePath="sample.h"
>
</File>
<File
RelativePath="sangoma_cthread.h"
>
</File>
<File
RelativePath="sangoma_interface.h"
>
</File>
<File
RelativePath="sangoma_port.h"
>
</File>
<File
RelativePath="sangoma_port_configurator.h"
>
</File>
</Filter>
<File
RelativePath=".\sources"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,62 +0,0 @@
#ifndef __LINUX_COMPAT_H__
#define __LINUX_COMPAT_H__
#include <sys/time.h>
#include <pthread.h>
#define SYSTEMTIME struct tm
#define wMonth tm_mon
#define wDay tm_mday
#define wYear tm_year
#define wHour tm_hour
#define wMinute tm_min
#define wSecond tm_sec
#define LPCTSTR char *
#define STELAPI_CALL
#ifndef BOOL
#define BOOL bool
#endif
#ifndef CHAR
#define CHAR char
#endif
#define IN
#define OUT
#ifndef FALSE
#define FALSE 0
#ifndef TRUE
#define TRUE (!FALSE)
#endif
#endif
static __inline int GetLocalTime(SYSTEMTIME *tv)
{
time_t now = time(NULL);
*tv = *localtime(&now);
return 0;
}
#define CRITICAL_SECTION pthread_mutex_t
#define EnterCriticalSection(arg) pthread_mutex_lock(arg)
#define LeaveCriticalSection(arg) pthread_mutex_unlock(arg)
#define InitializeCriticalSection(arg) pthread_mutex_init(arg, NULL);
typedef struct _variant
{
int vt;
int intVal;
}variant_t;
#define VARIANT variant_t
#define VT_UI4 0
#define WFI_CCITT_ALaw_8kHzMono 1
#define WFI_CCITT_uLaw_8kHzMono 2
#endif /* __LINUX_COMPAT_H__ */

View File

@ -1,105 +0,0 @@
//////////////////////////////////////////////////////////////////////
// sangoma_cthread.cpp: generic C++ Execution Thread.
//
// Author : David Rokhvarg
//////////////////////////////////////////////////////////////////////
#if defined(__WINDOWS__)
# include <windows.h>
#else
# include <string.h>
# include <stdarg.h>
# include <stdlib.h>
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <netdb.h>
# include <stdio.h>
# include <unistd.h>
# include <fcntl.h>
# include <sys/time.h>
# include <poll.h>
# include <signal.h>
# include <pthread.h>
# define CTHREAD_STACK_SIZE 1024 * 240
#endif
# include "sangoma_cthread.h"
sangoma_cthread::sangoma_cthread ()
{
}
sangoma_cthread::~sangoma_cthread ()
{
}
bool sangoma_cthread::CreateThread (int iParam)
{
#if defined (__WINDOWS__)
ThreadParam *pParam = new ThreadParam;
pParam->pThread = this;
pParam->iParam = iParam;
hThread = ::CreateThread (NULL, 0, (unsigned long (__stdcall *)(void *))runThread, (void *)(pParam), 0, &dwThreadId);
if(hThread){
return true;
}else{
return false;
}
#else
pthread_t dwThreadId;
pthread_attr_t attr;
int result = -1;
ThreadParam *pParam = new ThreadParam;
pParam->pThread = this;
pParam->iParam = iParam;
result = pthread_attr_init(&attr);
//pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
//pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
pthread_attr_setstacksize(&attr, CTHREAD_STACK_SIZE);
result = pthread_create(&dwThreadId, &attr, runThread, pParam);
pthread_attr_destroy(&attr);
if (result) {
return false;
}
return true;
#endif
}
#if defined(__WINDOWS__)
int sangoma_cthread::runThread (void* Param)
#else
void *sangoma_cthread::runThread (void* Param)
#endif
{
sangoma_cthread *thread;
int tmp;
ThreadParam *pParam = (ThreadParam*)Param;
ThreadParam tmpParam;
thread = (sangoma_cthread*)pParam->pThread;
tmp = pParam->iParam;
memcpy(&tmpParam, Param, sizeof(ThreadParam));
delete ((ThreadParam*)Param);
#if defined(__WINDOWS__)
return thread->threadFunction(tmpParam);
#else
thread->threadFunction(tmpParam);
pthread_exit(NULL);
#endif
}

View File

@ -1,40 +0,0 @@
//////////////////////////////////////////////////////////////////////
// sangoma_cthread.h: generic C++ Execution Thread.
//
// Author : David Rokhvarg
//////////////////////////////////////////////////////////////////////
#ifndef _SANGOMA_CTHREAD_H
#define _SANGOMA_CTHREAD_H
struct ThreadParam;
class sangoma_cthread {
public:
sangoma_cthread();
virtual ~sangoma_cthread();
bool CreateThread (int iParam);
protected:
virtual unsigned long threadFunction(struct ThreadParam& thParam) = 0;
#if defined (__WINDOWS__)
DWORD dwThreadId;
HANDLE hThread;
#endif
private:
#if defined(__WINDOWS__)
static int runThread (void *p);
#else
static void *runThread (void *p);
#endif
};
struct ThreadParam {
sangoma_cthread* pThread;
int iParam;
};
#endif//_SANGOMA_CTHREAD_H

File diff suppressed because it is too large Load Diff

View File

@ -1,412 +0,0 @@
/*******************************************************************************//**
* \file sangoma_interface.h
* \brief Used with Sample.cpp Code
* \brief Provides a C++ class that deals with channel IO (read/write/events)
*
* Author(s): David Rokhvarg
* Nenad Corbic
*
*
* Copyright: (c) 2005-2009 Sangoma Technologies
*
* * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of the Sangoma Technologies nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY Sangoma Technologies ``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 Sangoma Technologies 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
* ===============================================================================
*/
#ifndef SANGOMA_INTERFACE_H
#define SANGOMA_INTERFACE_H
#include <stdio.h>
#include <stddef.h> //for offsetof()
#include <stdlib.h>
#if defined(__WINDOWS__)
# include <windows.h>
# include <winioctl.h>
# include <conio.h>
# include "bit_win.h"
# include "wanpipe_time.h" //for wp_usleep()
#elif defined(__LINUX__)
/* Include headers */
# include <stddef.h>
# include <errno.h>
# include <fcntl.h>
# include <string.h>
# include <ctype.h>
# include <sys/stat.h>
# include <sys/ioctl.h>
# include <sys/types.h>
# include <dirent.h>
# include <unistd.h>
# include <sys/socket.h>
# include <netdb.h>
# include <sys/un.h>
# include <sys/wait.h>
# include <unistd.h>
# include <signal.h>
# include <time.h>
#else
# error "sangoma_interface.h: undefined OS type"
#endif
/*
* FSK CallerID and DTMF detection note:
* Stelephony.dll expects input BitStream (aLaw or uLaw audio) from a SINGLE timeslot.
* It is always the case for Analog cards, but not for the Digital cards, where
* API may provide input from a SINGLE or from MULTIPLE timeslots.
*/
#define USE_STELEPHONY_API 1 /* set to zero if don't need to compile
function calls to libstelephony.dll */
#include "wanpipe_api.h"
#include "sangoma_cthread.h"
#include "sample.h"
#include "libsangoma.h"
#if USE_STELEPHONY_API
# include "libstelephony.h"
#endif
/* sangoma_waitfor_many() can wait on an array of sangoma wait objects.
* In this example there is a single object in the array. */
#define SANGOMA_INTERFACE_NUMBER_OF_WAIT_OBJECTS 1
#define SANGOMA_TX_WAIT_OBJECT 0
#define SANGOMA_RX_AND_EVENT_WAIT_OBJECT 0
/*!
\class sangoma_interface
\brief Sangoma Interface Class that deals with span/chan IO (read/write/events)
*/
class sangoma_interface : public sangoma_cthread
{
protected:
/*! Sangoma IO device descriptor */
sng_fd_t sangoma_dev;
/*! wait object for an IO device */
sangoma_wait_obj_t *sng_wait_obj[SANGOMA_INTERFACE_NUMBER_OF_WAIT_OBJECTS];
//////////////////////////////////////////////////////////////////
//receive stuff
/*!< rx count statistic */
ULONG rx_frames_count;
/*! rx byte statistic */
ULONG rx_bytes_count;
//for counting frames with CRC/Abort errors
/*! corrupted frame count statistic */
ULONG bad_rx_frames_count;
/*! Rx thread id used for launching threads that handle rx path */
DWORD dwRxThreadId;
//////////////////////////////////////////////////////////////////
//transmit stuff
/*! tx byte statistic */
ULONG tx_bytes_count;
/*! tx frame statistic */
ULONG tx_frames_count;
/*! tx test byte sent statistic */
UCHAR tx_test_byte;
//////////////////////////////////////////////////////////////////
//IOCTL management structures and variables
/*! deprecated: ioctl management structure, used to execute management commands - one should use libsangoma directly */
wan_udp_hdr_t wan_udp;
/*! deprecated: Helper function to get data byte out of wan_udp structure */
unsigned char get_wan_udphdr_data_byte(unsigned char off);
/*! deprecated: Helper function to get data pointer out of wan_udp structure */
unsigned char *get_wan_udphdr_data_ptr(unsigned char off);
/*! deprecated: Helper function to set data pointer out of wan_udp structure */
unsigned char set_wan_udphdr_data_byte(unsigned char off, unsigned char data);
/*! deprecated: protocol command structure size */
int protocol_cb_size;
/*! device low level protocol (T1/E1...) currently running */
int wan_protocol;
/*! device adapter type */
unsigned char adapter_type;
/*! deprecated: API command structure used to execute API commands */
wanpipe_api_cmd_t tdm_api_cmd;
/*! API command structure used to execute API commands. This command structure is used with libsangoma library */
wanpipe_api_t wp_api;
/*! Rx Thread function */
void RxThreadFunc();
/*! Tx Thread function */
void TxThreadFunc();
/*! Rx Data handler function */
int read_data();
/*! Rx Event handler function */
virtual int read_event();
int write_data(wp_api_hdr_t *hdr, void *tx_buffer);
/*! Shutdown function to cleanup the class */
void cleanup();
/*! Get device span configuration */
int get_wan_config();
/*! Get interface chan configuration */
int get_interface_configuration(if_cfg_t *wanif_conf_ptr);
/*! Get front end type (T1/E1...) */
int get_fe_type(unsigned char* adapter_type);
/*! deprecated: Execute API command IOCTL - one should use libsangoma directly */
int wanpipe_api_ioctl(wan_cmd_api_t *api_cmd);
/*! Bert test pattern */
unsigned char wp_brt[256];
/*! deprecated: Generate bit reversal table - not used with new sangoma cards */
void generate_bit_rev_table();
/*! Flag indicating that rbs is enabled */
char is_rbs_monitoring_enabled;
#if USE_STELEPHONY_API
/*! Stelephony provides Analog CallierID and DTMF encoding/decoding */
stelephony_callback_functions_t scf;
void *stelObj;
void *DtmfBuffer;
void *FskCidBuffer;
void TxStelEncoderBuffer(void *pStelEncoderBuffer);
CRITICAL_SECTION StelTxCriticalSection;
#endif
//////////////////////////////////////////////////////////////////
//data
char terminate_tx_rx_threads;
/*! API header for rx data */
wp_api_hdr_t rxhdr;
/*! Data buffer to copy rx data into */
unsigned char rx_data[SAMPLE_CPP_MAX_DATA_LEN];
/*! API header for tx data */
wp_api_hdr_t txhdr;
/*! Data buffer to copy tx data into */
unsigned char tx_data[SAMPLE_CPP_MAX_DATA_LEN];
/*! Wanpipe Interface configuration structure to be populated on read configuration */
if_cfg_t wanif_conf_struct;
/*! Wanpipe Device number based on hardware probe device enumeration (SPAN) */
int WanpipeNumber;
/*! Wanpipe Interface number based on a channel in a SPAN */
int InterfaceNumber;
#if DBG_TIMING
wan_debug_t wan_debug_rx_timing;
#endif
/*! Callback functions used to call the application on IO events */
callback_functions_t callback_functions;
virtual unsigned long threadFunction(struct ThreadParam& thParam);
public:
char device_name[DEV_NAME_LEN];
char is_logger_dev;
//////////////////////////////////////////////////////////////////
//methods
sangoma_interface(int wanpipe_number, int interface_number);
virtual ~sangoma_interface();
int DoManagementCommand(sng_fd_t drv, wan_udp_hdr_t* packet);
virtual int init(callback_functions_t *callback_functions_ptr);
int run();
int stop();
/*! Write data to device */
int transmit(wp_api_hdr_t *hdr, void *data);
/*! Read data from device */
int receive (wp_api_hdr_t *hdr, void *data);
void bit_swap_a_buffer(unsigned char *data, int len);
void get_te1_56k_stat(void);
void set_lb_modes(unsigned char type, unsigned char mode);
int loopback_command(u_int8_t type, u_int8_t mode, u_int32_t chan_map);
int get_operational_stats(wanpipe_chan_stats_t *stats);
virtual int flush_operational_stats (void);
int CreateSwDtmfTxThread(void *buffer);
int CreateFskCidTxThread(void *buffer);
int enable_rbs_monitoring();
char get_rbs(rbs_management_t *rbs_management_ptr);
char set_rbs(rbs_management_t *rbs_management_ptr);
int tdm_enable_rbs_events(int polls_per_second);
int tdm_disable_rbs_events();
int set_tx_idle_flag(unsigned char new_idle_flag);
int get_open_handles_counter();
//remove all data from API driver's transmit queue
int flush_tx_buffers (void);
unsigned char get_adapter_type();
unsigned int get_sub_media();
void set_fe_debug_mode(sdla_fe_debug_t *fe_debug);
void get_api_driver_version(PDRIVER_VERSION version);
void get_card_customer_id(u_int8_t *customer_id);
#if USE_STELEPHONY_API
int resetFSKCID(void);
int sendCallerID(char *name, char *number);
int sendSwDTMF(char dtmf_char);
#endif
//////////////////////////////////////////////////////////////////
//TDM API calls
int tdm_enable_rxhook_events();
int tdm_disable_rxhook_events();
/* DTMF Detection on A200 Analog card (SLIC) chip */
int tdm_enable_rm_dtmf_events();
int tdm_disable_rm_dtmf_events();
/* DTMF Detection on Octasic chip */
int tdm_enable_dtmf_events(uint8_t channel);
int tdm_disable_dtmf_events(uint8_t channel);
int tdm_enable_ring_detect_events();
int tdm_disable_ring_detect_events();
int tdm_enable_ring_trip_detect_events();
int tdm_disable_ring_trip_detect_events();
int tdm_enable_ring_events();
int tdm_disable_ring_events();
int tdm_txsig_onhook();
int tdm_txsig_offhook();
int tdm_txsig_kewl();
/*To transmit data while FXS is on-hook */
/* Example: To transmit FSK Message Wait Indication (MWI)
to phone connected with FXS */
int tdm_txsig_onhooktransfer();
int tdm_enable_tone_events(uint16_t tone_id);
int tdm_disable_tone_events();
int tdm_front_end_activate();
int tdm_front_end_deactivate();
int tdm_control_flash_events(int rxflashtime);
/* To set tx/rx gain for analog FXS/FXO modules
Gain in dB = gainvalue / 10
For FXS: txgain/rxgain value could be -35 or 35
FXO: txgain/rxgain value ranges from -150 to 120
FXO/FXS: Set txgain/rxgain value 0 for default setting*/
int tdm_control_rm_txgain(int txgain);
int tdm_control_rm_rxgain(int rxgain);
/* Only valid for FXS module to Set Polarity on the line
polarity 0: Forward Polarity
1: Reverse Polarity */
int tdm_set_rm_polarity(int polarity);
/* get current state of the line - is it Connected or Disconnected */
int tdm_get_front_end_status(unsigned char *status);
int tdm_set_user_period(unsigned int usr_period);
//////////////////////////////////////////////////////////////////
int tdmv_api_ioctl(wanpipe_api_cmd_t *api_cmd);
int reset_interface_state();
int start_ring_tone();
int stop_ring_tone();
int start_congestion_tone();
int stop_congestion_tone();
int start_busy_tone();
int stop_busy_tone();
int stop_all_tones();
int start_dial_tone();
int stop_dial_tone();
int start_ringing_phone();
int stop_ringing_phone();
int fxo_go_off_hook();
int fxo_go_on_hook();
int fxs_txsig_offhook();
//BRI only:
int tdm_enable_bri_bchan_loopback(u_int8_t channel);
int tdm_disable_bri_bchan_loopback(u_int8_t channel);
};
class sangoma_api_ctrl_dev : public sangoma_interface
{
public:
sangoma_api_ctrl_dev(void);
~sangoma_api_ctrl_dev(void);
virtual int init(callback_functions_t *callback_functions_ptr);
};
class sangoma_api_logger_dev : public sangoma_interface
{
wp_logger_cmd_t logger_cmd;
public:
sangoma_api_logger_dev(void);
~sangoma_api_logger_dev(void);
virtual int init(callback_functions_t *callback_functions_ptr);
/*! Logger Event handler function */
virtual int read_event();
virtual int flush_operational_stats (void);
int get_logger_dev_operational_stats(wp_logger_stats_t *stats);
};
#endif//SANGOMA_INTERFACE_H

View File

@ -1,191 +0,0 @@
//////////////////////////////////////////////////////////////////////
// sangoma_port.cpp: implementation of the sangoma_port class.
//
// Author : David Rokhvarg
//////////////////////////////////////////////////////////////////////
#include "sangoma_port.h"
#define DBG_CFG if(0)printf("PORT:");if(1)printf
#define _DBG_CFG if(0)printf
#define INFO_CFG if(0)printf("PORT:");if(1)printf
#define _INFO_CFG if(0)printf
#define ERR_CFG if(1)printf("PORT:");if(1)printf
#define _ERR_CFG if(1)printf
//////////////////////////////////////////////////////////////////////
//common functions
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
sangoma_port::sangoma_port()
{
DBG_CFG("%s()\n", __FUNCTION__);
wp_handle = INVALID_HANDLE_VALUE;
}
sangoma_port::~sangoma_port()
{
DBG_CFG("%s()\n", __FUNCTION__);
cleanup();
}
int sangoma_port::init(uint16_t wanpipe_number)
{
DBG_CFG("%s()\n", __FUNCTION__);
wp_number = wanpipe_number;
wp_handle = sangoma_open_driver_ctrl(wanpipe_number);
if(wp_handle == INVALID_HANDLE_VALUE){
ERR_CFG("Error: failed to open wanpipe%d!!\n", wp_number);
return 1;
}
return 0;
}
void sangoma_port::cleanup()
{
DBG_CFG("%s()\n", __FUNCTION__);
if(wp_handle != INVALID_HANDLE_VALUE){
sangoma_close(&wp_handle);
wp_handle = INVALID_HANDLE_VALUE;
}
}
int sangoma_port::get_hardware_info(hardware_info_t *hardware_info)
{
port_management_struct_t port_management;
int err=sangoma_driver_get_hw_info(wp_handle,&port_management, wp_number);
if (err) {
ERR_CFG("Error: failed to get hw info for wanpipe%d!\n", wp_number);
err=1;
return err;
}
memcpy(hardware_info,port_management.data,sizeof(hardware_info_t));
return 0;
}
int sangoma_port::start_port()
{
port_management_struct_t port_mgmnt;
int err;
err=sangoma_driver_port_start(wp_handle,&port_mgmnt,wp_number);
INFO_CFG("%s(): return code: (%d)\n", __FUNCTION__, err);
return err;
}
int sangoma_port::stop_port()
{
port_management_struct_t port_mgmnt;
int err;
err = sangoma_driver_port_stop(wp_handle,&port_mgmnt,wp_number);
INFO_CFG("%s(): return code: (%d)\n", __FUNCTION__, err);
return err;
}
int sangoma_port::push_a_card_into_wanpipe_info_array(
wanpipe_instance_info_t *wanpipe_info_array,
hardware_info_t *new_hw_info)
{
unsigned int card_ind;
hardware_info_t *tmp_hw_info;
//check this card is not in the array already
for(card_ind = 0; card_ind < MAX_CARDS; card_ind++){
tmp_hw_info = &wanpipe_info_array[card_ind].hardware_info;
if( (new_hw_info->pci_bus_number == tmp_hw_info->pci_bus_number) &&
(new_hw_info->pci_slot_number == tmp_hw_info->pci_slot_number)){
//already in array. not an error.
DBG_CFG("already in array.\n");
return 1;
}
}
//find an empty slot in the array and place the new card there
for(card_ind = 0; card_ind < MAX_CARDS; card_ind++){
tmp_hw_info = &wanpipe_info_array[card_ind].hardware_info;
if(tmp_hw_info->card_model == -1){
//found an empty slot in array
memcpy(tmp_hw_info, new_hw_info, sizeof(hardware_info_t));
return 0;
}
}
//too many cards in the computer.
INFO_CFG("Warning: number of cards in the computer is greater than the maximum of %d.\n",
MAX_CARDS);
return 2;
}
//
//Scan all running wanpipes, check which ones are on the same card,
//figure out how many physical cards installed.
//
//Returns: -1 - if error.
// number of cards, starting from zero.
int sangoma_port::scan_for_sangoma_cards(wanpipe_instance_info_t *wanpipe_info_array, int card_model)
{
uint16_t card_counter = 0, wp_ind;
hardware_info_t hardware_info;
//initialize hardware information array.
memset(wanpipe_info_array, -1, sizeof(wanpipe_instance_info_t)*MAX_CARDS);
DBG_CFG("%s(): wanpipe_info_array: 0x%p\n", __FUNCTION__, wanpipe_info_array);
for(wp_ind = 0; wp_ind < (MAX_CARDS * MAX_PORTS_PER_CARD); wp_ind++){
if(init(wp_ind)){
continue;
}
if(get_hardware_info(&hardware_info)){
card_counter = -1;
break;
}
DBG_CFG("card_model : %s (0x%08X)\n",
SDLA_ADPTR_NAME(hardware_info.card_model), hardware_info.card_model);
DBG_CFG("firmware_version\t: 0x%02X\n", hardware_info.firmware_version);
DBG_CFG("pci_bus_number\t\t: %d\n", hardware_info.pci_bus_number);
DBG_CFG("pci_slot_number\t\t: %d\n", hardware_info.pci_slot_number);
DBG_CFG("port_number\t\t: %d\n", hardware_info.port_number);
DBG_CFG("max_hw_ec_chans\t\t: %d\n", hardware_info.max_hw_ec_chans);
if(card_model == hardware_info.card_model){
if(push_a_card_into_wanpipe_info_array(wanpipe_info_array, &hardware_info) == 0){
//At this point we know: 1. WANPIPE number, for example WANPIPE1.
// 2. Card type, for example A104.
//It allows to figure out Device Name of each port on the card.
//For example: for A104 it will be WANPIPE1, WANPIPE2, WANPIPE3, WANPIPE4
wanpipe_info_array[card_counter].wanpipe_number = wp_ind;
DBG_CFG("%s(): wp_ind: %u\n", __FUNCTION__, wp_ind);
card_counter++;
}
}else{
DBG_CFG("Found a Card but Card Model is different from what was searched for.\n");
}
//For each init() there MUST be cleanup(). Otherwise Open Handles will remain to the Port.
cleanup();
}//for()
return card_counter;
}

View File

@ -1,93 +0,0 @@
//////////////////////////////////////////////////////////////////////
// sangoma_port.h: interface for the sangoma_port class.
//
// Author : David Rokhvarg
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DRIVER_CONFIGURATOR_H__115A6EC1_518C_45E9_AA55_148A8D999B61__INCLUDED_)
#define AFX_DRIVER_CONFIGURATOR_H__115A6EC1_518C_45E9_AA55_148A8D999B61__INCLUDED_
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#if defined(__WINDOWS__)
# include <windows.h>
# include <winioctl.h>
# include <conio.h>
# include "bit_win.h"
#elif defined(__LINUX__)
# include <errno.h>
# include <fcntl.h>
# include <string.h>
# include <ctype.h>
# include <sys/stat.h>
# include <sys/ioctl.h>
# include <sys/types.h>
# include <dirent.h>
# include <unistd.h>
# include <sys/socket.h>
# include <netdb.h>
# include <sys/un.h>
# include <sys/wait.h>
# include <unistd.h>
# include <signal.h>
# include <time.h>
# include <curses.h>
#else
# error "sangoma_port.h: undefined OS type"
#endif
#include "libsangoma.h"
#include "wanpipe_api.h"
#define MAX_CARDS 32
#define MAX_PORTS_PER_CARD 48
#if defined (__LINUX__)
static inline void CloseHandle(HANDLE handle)
{
if (handle >= 0) {
close(handle);
}
return;
}
#endif
/*!
\brief
*
*/
class sangoma_port
{
public:
int get_hardware_info(hardware_info_t *hardware_info);
int stop_port();
int start_port();
int init(uint16_t wanpipe_number);
void cleanup();
sangoma_port();
virtual ~sangoma_port();
int scan_for_sangoma_cards(wanpipe_instance_info_t *wanpipe_info_array, int card_model);
protected:
uint16_t wp_number;
sng_fd_t wp_handle;
int push_a_card_into_wanpipe_info_array(wanpipe_instance_info_t *wanpipe_info_array,
hardware_info_t *new_hw_info);
};
#endif // !defined(AFX_DRIVER_CONFIGURATOR_H__115A6EC1_518C_45E9_AA55_148A8D999B61__INCLUDED_)

View File

@ -1,793 +0,0 @@
//////////////////////////////////////////////////////////////////////
// sangoma_port_configurator.cpp: implementation of the sangoma_port_configurator class.
//
// Author : David Rokhvarg
//////////////////////////////////////////////////////////////////////
#include "sangoma_port_configurator.h"
#define DBG_CFG if(1)printf("PORTCFG:");if(1)printf
#define _DBG_CFG if(1)printf
#define INFO_CFG if(1)printf("PORTCFG:");if(1)printf
#define _INFO_CFG if(1)printf
#define ERR_CFG if(1)printf("%s():line:%d Error: ", __FUNCTION__, __LINE__);if(1)printf
#define _ERR_CFG if(1)printf
//////////////////////////////////////////////////////////////////////
//these are recommendations only:
#define MIN_RECOMMENDED_BITSTREAM_MTU 256
#define MIN_RECOMMENDED_HDLC_MTU 2048
/*!
\brief Brief description
*
*/
static int get_number_of_channels(unsigned int chan_bit_map)
{
int chan_counter = 0, i;
for(i = 0; i < (int)(sizeof(unsigned int)*8); i++){
if(chan_bit_map & (1 << i)){
chan_counter++;
}
}
return chan_counter;
}
/*!
\brief Brief description
*
*/
static int get_recommended_bitstream_mtu(int num_of_channels)
{
int recommended_mtu = num_of_channels * 32;//<--- will work well in most cases
//
//Smaller mtu will cause more interrupts.
//Recommend at least MIN_RECOMMENDED_BITSTREAM_MTU, user will set to smaller, if timing is important.
//
while(recommended_mtu < MIN_RECOMMENDED_BITSTREAM_MTU){
recommended_mtu = recommended_mtu * 2;
}
return recommended_mtu;
}
/*!
\brief Brief description
*
*/
static int check_mtu(int mtu, int hdlc_streaming, unsigned int channel_bitmap)
{
DBG_CFG("%s(): channel_bitmap: 0x%X\n", __FUNCTION__, channel_bitmap);
if(mtu % 4){
ERR_CFG("Invalid MTU (%d). Must be divizible by 4.\n", mtu);
return 1;
}
//if BitStream, check MTU is also divisible by the number of channels (timeslots) in the group
if(hdlc_streaming == WANOPT_NO){
int num_of_channels = get_number_of_channels(channel_bitmap);
DBG_CFG("num_of_channels in bitmap: %d\n", num_of_channels);
if(mtu % num_of_channels){
ERR_CFG("Invalid MTU. For 'BitStream' Must be divisible by 4 AND by the number of\n\
\tchannels in the group (%d). Recommended MTU: %d.\n",
num_of_channels, get_recommended_bitstream_mtu(num_of_channels));
return 2;
}
}//if()
return 0;
}
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
/*!
\brief Brief description
*
*/
sangoma_port_configurator::sangoma_port_configurator()
{
#if defined(__WINDOWS__)
hPortRegistryKey = (struct HKEY__ *)INVALID_HANDLE_VALUE;
#endif
}
/*!
\brief Brief description
*
*/
sangoma_port_configurator::~sangoma_port_configurator()
{
#if defined(__WINDOWS__)
if(hPortRegistryKey != (struct HKEY__ *)INVALID_HANDLE_VALUE){
RegCloseKey(hPortRegistryKey);
}
#endif
}
/*!
\brief SET new configuration of the API driver.
*
*/
int sangoma_port_configurator::SetPortVolatileConfigurationCommand(port_cfg_t *port_cfg)
{
int err = sangoma_driver_port_set_config(wp_handle, port_cfg, wp_number);
if (err) {
err = 1;
}
return err;
}
/*!
\brief Brief description
*
*/
int sangoma_port_configurator::get_configration(port_cfg_t *port_cfg)
{
int err = sangoma_driver_port_get_config(wp_handle, port_cfg, wp_number);
if (err) {
err = 1;
}
return err;
}
/*!
\brief Function to check correctness of 'port_cfg_t' structure.
*
*/
int sangoma_port_configurator::check_port_cfg_structure(port_cfg_t *port_cfg)
{
unsigned int i, rc = 0;
unsigned long tmp_active_ch = 0;
unsigned long cumulutive_active_ch = 0;
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
wanif_conf_t *wanif_conf;
DBG_CFG("%s()\n", __FUNCTION__);
INFO_CFG("Running Driver Configration structure check...\n");
if(port_cfg->num_of_ifs < 1 || port_cfg->num_of_ifs > NUM_OF_E1_TIMESLOTS){
_INFO_CFG("Invalid number of Timeslot Groups - %d! Should be between %d and %d (including).\n",
port_cfg->num_of_ifs, 1, NUM_OF_E1_TIMESLOTS);
return 1;
}
for(i = 0; i < port_cfg->num_of_ifs; i++){
//check all logic channels were configured
wanif_conf = &port_cfg->if_cfg[i];
if(wanif_conf->active_ch == 0){
_INFO_CFG("Group %d - no T1/E1 channels specified! Expecting a bitmap of channels.\n", i + 1);
rc = 1; break;
}
//check the channels are valid for media type.
if(sdla_fe_cfg->media == WAN_MEDIA_T1){
unsigned int t1_invalid_channels = ~T1_ALL_CHANNELS_BITMAP;
if(wanif_conf->active_ch & (t1_invalid_channels)){
_INFO_CFG("Group %d - Invalid channels in Channel BitMap (0x%08X)!\n", i + 1,
wanif_conf->active_ch & (t1_invalid_channels));
rc = 2; break;
}
}
//check channels are NOT in use already by another Group
if(wanif_conf->active_ch & cumulutive_active_ch){
_INFO_CFG("Group %d - one or more \"T1/E1 channels\" already used by another group!\n", i + 1);
rc = 3; break;
}
//update cumulative channels for the next iteration
cumulutive_active_ch |= wanif_conf->active_ch;
tmp_active_ch = wanif_conf->active_ch;
if(sdla_fe_cfg->media == WAN_MEDIA_E1 && sdla_fe_cfg->frame != WAN_FR_UNFRAMED){
//do not count the bit for channel 0! (valid only for Unframed E1)
tmp_active_ch &= (~0x1);
}
if(check_mtu(wanif_conf->mtu, wanif_conf->hdlc_streaming, tmp_active_ch)){
rc = 4; break;
}
}//for()
INFO_CFG("Driver Configration structure check - %s.\n", (rc == 0 ? "OK":"FAILED"));
return rc;
}
/*!
\brief Brief description
*
*/
int sangoma_port_configurator::print_port_cfg_structure(port_cfg_t *port_cfg)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
wanif_conf_t *wanif_conf = &port_cfg->if_cfg[0];
unsigned int i;
DBG_CFG("%s()\n", __FUNCTION__);
_INFO_CFG("\n================================================\n");
INFO_CFG("Card Type\t: %s(%d)\n", SDLA_DECODE_CARDTYPE(wandev_conf->card_type),
wandev_conf->card_type);/* Sangoma Card type - S514, S518 or AFT.*/
INFO_CFG("Number of TimeSlot Groups: %d\n", port_cfg->num_of_ifs);
INFO_CFG("MTU\t\t: %d\n", wandev_conf->mtu);
print_sdla_fe_cfg_t_structure(sdla_fe_cfg);
for(i = 0; i < port_cfg->num_of_ifs; i++){
_INFO_CFG("\n************************************************\n");
_INFO_CFG("Configration of Group Number %d:\n", i);
print_wanif_conf_t_structure(&wanif_conf[i]);
}
return 0;
}
/*!
\brief Brief description
*
*/
int sangoma_port_configurator::print_sdla_fe_cfg_t_structure(sdla_fe_cfg_t *sdla_fe_cfg)
{
_INFO_CFG("\n################################################\n");
INFO_CFG("MEDIA\t\t: %s\n", MEDIA_DECODE(sdla_fe_cfg));
if(FE_MEDIA(sdla_fe_cfg) == WAN_MEDIA_T1 || FE_MEDIA(sdla_fe_cfg) == WAN_MEDIA_E1){
INFO_CFG("Line CODE\t: %s\n", LCODE_DECODE(sdla_fe_cfg));
INFO_CFG("Framing\t\t: %s\n", FRAME_DECODE(sdla_fe_cfg));
INFO_CFG("Clock Mode\t: %s\n", TECLK_DECODE(sdla_fe_cfg));
INFO_CFG("Clock Reference port: %d (0 - not used)\n", FE_REFCLK(sdla_fe_cfg));
INFO_CFG("Signalling Insertion Mode: %s\n", TE1SIG_DECODE(sdla_fe_cfg));
INFO_CFG("High Impedance Mode: %s\n",
(FE_HIMPEDANCE_MODE(sdla_fe_cfg) == WANOPT_YES ? "Yes":"No"));
INFO_CFG("FE_RX_SLEVEL: %d\n", FE_RX_SLEVEL(sdla_fe_cfg));
}//if()
INFO_CFG("TDMV LAW\t: %s\n", (FE_TDMV_LAW(sdla_fe_cfg) == WAN_TDMV_MULAW ?"MuLaw":"ALaw"));
INFO_CFG("TDMV SYNC\t: %d\n", FE_NETWORK_SYNC(sdla_fe_cfg));
switch(FE_MEDIA(sdla_fe_cfg))
{
case WAN_MEDIA_T1:
INFO_CFG("LBO\t\t: %s\n", LBO_DECODE(sdla_fe_cfg));
break;
case WAN_MEDIA_E1:
break;
default:
break;
}
return 0;
}
/*!
\brief Brief port description
*
*/
int sangoma_port_configurator::print_wanif_conf_t_structure(wanif_conf_t *wanif_conf)
{
INFO_CFG("Operation Mode\t: %s\n", wanif_conf->usedby);
INFO_CFG("Timeslot BitMap\t: 0x%08X\n", wanif_conf->active_ch);
INFO_CFG("Line Mode\t: %s\n",
(wanif_conf->hdlc_streaming == WANOPT_YES ? "HDLC":"BitStream"));
INFO_CFG("MTU\\MRU\t\t: %d\n", wanif_conf->mtu);
return 0;
}
/*!
\brief Brief port description
*
*/
int sangoma_port_configurator::set_default_configuration(port_cfg_t *port_cfg)
{
return set_volatile_configration(port_cfg);
}
/*!
\brief Brief port description
*
*/
int sangoma_port_configurator::set_volatile_configration(port_cfg_t *port_cfg)
{
int rc;
DBG_CFG("%s()\n", __FUNCTION__);
//////////////////////////////////////////////////////////////////////////////////////////////////
#if 0
if(check_port_cfg_structure(port_cfg)){
ERR_CFG("Error(s) found in 'port_cfg_t' structure!\n");
return 1;
}
#endif
rc = SetPortVolatileConfigurationCommand(port_cfg);
if(rc){
//configration failed
INFO_CFG("%s(): Line: %d: return code: %s (%d)\n", __FUNCTION__, __LINE__, SDLA_DECODE_SANG_STATUS(rc), rc);
return 2;
}
INFO_CFG("%s(): return code: %s (%d)\n", __FUNCTION__,
SDLA_DECODE_SANG_STATUS(port_cfg->operation_status), port_cfg->operation_status);
switch(port_cfg->operation_status)
{
case SANG_STATUS_DEVICE_BUSY:
INFO_CFG("Error: open handles exist for 'wanpipe%d_if\?\?' interfaces!\n", wp_number);
return port_cfg->operation_status;
case SANG_STATUS_SUCCESS:
//OK
break;
default:
//error
return 5;
}
return 0;
}
/* optional optimization - single interrupt for both Rx and Tx audio streams */
#define SPAN_TX_ONLY_IRQ 0
/*!
\brief Example initialization for T1
*
*/
int sangoma_port_configurator::initialize_t1_tdm_span_voice_api_configration_structure(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
//sdla_te_cfg_t *te_cfg = &sdla_fe_cfg->cfg.te_cfg;
wan_tdmv_conf_t *tdmv_cfg = &wandev_conf->tdmv_conf;
wanif_conf_t *wanif_cfg = &port_cfg->if_cfg[0];
wan_xilinx_conf_t *aft_cfg = &wandev_conf->u.aft;
// T1 parameters
FE_MEDIA(sdla_fe_cfg) = WAN_MEDIA_T1;
FE_LCODE(sdla_fe_cfg) = WAN_LCODE_B8ZS;
FE_FRAME(sdla_fe_cfg) = WAN_FR_ESF;
FE_LINENO(sdla_fe_cfg) = hardware_info->port_number;
FE_TDMV_LAW(sdla_fe_cfg) = WAN_TDMV_MULAW;
FE_NETWORK_SYNC(sdla_fe_cfg) = 0;
FE_LBO(sdla_fe_cfg) = WAN_T1_0_110;
FE_REFCLK(sdla_fe_cfg) = 0;
FE_HIMPEDANCE_MODE(sdla_fe_cfg) = 0;
FE_SIG_MODE(sdla_fe_cfg) = WAN_TE1_SIG_CCS;
FE_RX_SLEVEL(sdla_fe_cfg) = WAN_TE1_RX_SLEVEL_12_DB;
#if 1
FE_CLK(sdla_fe_cfg) = WAN_NORMAL_CLK;
#else
/* Use Master clock with a loopback cable or as Telco simulator. */
FE_CLK(sdla_fe_cfg) = WAN_MASTER_CLK;
#endif
// API parameters
port_cfg->num_of_ifs = 1;
wandev_conf->config_id = WANCONFIG_AFT_TE1;
wandev_conf->magic = ROUTER_MAGIC;
wandev_conf->mtu = 2048;
wandev_conf->PCI_slot_no = hardware_info->pci_slot_number;
wandev_conf->pci_bus_no = hardware_info->pci_bus_number;
wandev_conf->card_type = WANOPT_AFT; //m_DeviceInfoData.card_model;
#if SPAN_TX_ONLY_IRQ
aft_cfg->span_tx_only_irq = 1;
#else
aft_cfg->span_tx_only_irq = 0;
#endif
wanif_cfg->magic = ROUTER_MAGIC;
wanif_cfg->active_ch = 0x00FFFFFF;//channels 1-24 (starting from bit zero)
sprintf(wanif_cfg->usedby,"TDM_SPAN_VOICE_API");
wanif_cfg->u.aft.idle_flag=0xFF;
wanif_cfg->mtu = 160;
wanif_cfg->u.aft.mtu = 160;
wanif_cfg->u.aft.mru = 160;
sprintf(wanif_cfg->name,"w%dg1",span);
if (hardware_info->max_hw_ec_chans) {
/* wan_hwec_conf_t - HWEC configuration for Port */
/*wandev_conf->hwec_conf.dtmf = 1;*/
/* wan_hwec_if_conf_t - HWEC configuration for Interface */
wanif_cfg->hwec.enable = 1;
}
tdmv_cfg->span_no = (unsigned char)span;
/* DCHAN Configuration */
switch(FE_MEDIA(sdla_fe_cfg))
{
case WAN_MEDIA_T1:
tdmv_cfg->dchan = (1<<23);/* Channel 24. This is a bitmap, not a channel number. */
break;
default:
printf("%s(): Error: invalid media type!\n", __FUNCTION__);
return 1;
}
printf("T1: tdmv_cfg->dchan bitmap: 0x%X\n", tdmv_cfg->dchan);
return 0;
}
#define BUILD_FOR_PRI 1
int sangoma_port_configurator::initialize_e1_tdm_span_voice_api_configration_structure(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
wan_tdmv_conf_t *tdmv_cfg = &wandev_conf->tdmv_conf;
wanif_conf_t *wanif_cfg = &port_cfg->if_cfg[0];
wan_xilinx_conf_t *aft_cfg = &wandev_conf->u.aft;
// E1 parameters
FE_MEDIA(sdla_fe_cfg) = WAN_MEDIA_E1;
FE_LCODE(sdla_fe_cfg) = WAN_LCODE_HDB3;
FE_FRAME(sdla_fe_cfg) = WAN_FR_CRC4;
FE_LINENO(sdla_fe_cfg) = hardware_info->port_number;
FE_TDMV_LAW(sdla_fe_cfg) = WAN_TDMV_ALAW;
FE_NETWORK_SYNC(sdla_fe_cfg) = 0;
FE_LBO(sdla_fe_cfg) = WAN_E1_120;
FE_REFCLK(sdla_fe_cfg) = 0;
FE_HIMPEDANCE_MODE(sdla_fe_cfg) = 0;
FE_SIG_MODE(sdla_fe_cfg) = WAN_TE1_SIG_CCS;
FE_RX_SLEVEL(sdla_fe_cfg) = WAN_TE1_RX_SLEVEL_12_DB;
#if 1
FE_CLK(sdla_fe_cfg) = WAN_NORMAL_CLK;
#else
/* Use Master clock with a loopback cable or as Telco simulator. */
FE_CLK(sdla_fe_cfg) = WAN_MASTER_CLK;
#endif
// API parameters
port_cfg->num_of_ifs = 1;
wandev_conf->config_id = WANCONFIG_AFT_TE1;
wandev_conf->magic = ROUTER_MAGIC;
wandev_conf->mtu = 2048;
wandev_conf->PCI_slot_no = hardware_info->pci_slot_number;
wandev_conf->pci_bus_no = hardware_info->pci_bus_number;
wandev_conf->card_type = WANOPT_AFT; //m_DeviceInfoData.card_model;
#if SPAN_TX_ONLY_IRQ
aft_cfg->span_tx_only_irq = 1;
#else
aft_cfg->span_tx_only_irq = 0;
#endif
wanif_cfg->magic = ROUTER_MAGIC;
#if BUILD_FOR_PRI
//PRI Signaling on chan 16
wanif_cfg->active_ch = 0x7FFFFFFF;// channels 1-31 (starting from bit zero)
#else
//CAS
wanif_cfg->active_ch = 0xFFFF7FFF;// channels 1-15.17-31 -> Active Ch Map :0xFFFEFFFE (in message log)
#endif
sprintf(wanif_cfg->usedby,"TDM_SPAN_VOICE_API");
wanif_cfg->u.aft.idle_flag=0xFF;
wanif_cfg->mtu = 160;
wanif_cfg->u.aft.mtu = 160;
wanif_cfg->u.aft.mru = 160;
sprintf(wanif_cfg->name,"w%dg1",span);
if (hardware_info->max_hw_ec_chans) {
/* wan_hwec_conf_t - HWEC configuration for Port */
/*wandev_conf->hwec_conf.dtmf = 1;*/
/* wan_hwec_if_conf_t - HWEC configuration for Interface */
wanif_cfg->hwec.enable = 1;
}
tdmv_cfg->span_no = (unsigned char)span;
#if BUILD_FOR_PRI
/* DCHAN Configuration */
switch(FE_MEDIA(sdla_fe_cfg))
{
case WAN_MEDIA_E1:
tdmv_cfg->dchan = (1<<15);/* Channel 16. This is a bitmap, not a channel number. */
break;
default:
printf("%s(): Error: invalid media type!\n", __FUNCTION__);
return 1;
}
#endif
printf("E1: tdmv_cfg->dchan bitmap: 0x%X\n", tdmv_cfg->dchan);
return 0;
}
int sangoma_port_configurator::initialize_bri_tdm_span_voice_api_configration_structure(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
wan_tdmv_conf_t *tdmv_cfg = &wandev_conf->tdmv_conf;
wanif_conf_t *wanif_cfg = &port_cfg->if_cfg[0];
// BRI parameters
FE_MEDIA(sdla_fe_cfg) = WAN_MEDIA_BRI;
FE_LINENO(sdla_fe_cfg) = hardware_info->port_number;
FE_TDMV_LAW(sdla_fe_cfg) = WAN_TDMV_ALAW;
FE_NETWORK_SYNC(sdla_fe_cfg) = 0;
FE_REFCLK(sdla_fe_cfg) = 0;
#if 0
/*
* TE Module: WAN_NORMAL_CLK is the default.
* Clock recovered from the line will be used by this module and
* will be routed to ALL other BRI modules on the card which
* become "connected" after this module. That means at any
* time there is a single BRI line where the clock is recovered from
* and this clock is used for all other BRI lines.
*
* NT Module: always runs on internal oscillator clock.
*/
BRI_FE_CLK((*sdla_fe_cfg)) = WAN_NORMAL_CLK;
#else
/*
* TE Module: if WAN_MASTER_CLK, clock recovered from
* the line will be NOT be used by this module and
* will NOT be routed to ALL other BRI modules on the card.
* Instead, the module will use clock from internal oscillator.
*
* NT Module: WAN_MASTER_CLK will be ignored because NT should not
* recover clock from the line, it always runs on clock from
* internal oscillator.
*/
BRI_FE_CLK((*sdla_fe_cfg)) = WAN_MASTER_CLK;
#endif
/* Notes on BRI FE clock option:
The clock option is checked by the driver only
when TE becomes "Connected"/"Disconnected".
No check is done on Port start-up, it is always Master during start-up.
If TE becomes "Connected" and it's clock mode is Master,
in the wanpipelog the following message will appear from TE:
BRI Module: 3 connected!
If TE becomes "Connected" and it's clock mode is Normal,
in the wanpipelog the following messages will appear from TE:
BRI Module: 3 connected!
Setting Master Clock!
TE Clock line recovery Module=3 Port=1: Enabled
Module=3 Port=1: using 512khz from PLL
*/
port_cfg->num_of_ifs = 1;
wandev_conf->config_id = WANCONFIG_AFT_ISDN_BRI;
wandev_conf->magic = ROUTER_MAGIC;
wandev_conf->mtu = 2048;
wandev_conf->PCI_slot_no = hardware_info->pci_slot_number;
wandev_conf->pci_bus_no = hardware_info->pci_bus_number;
wandev_conf->card_type = WANOPT_AFT; //m_DeviceInfoData.card_model;
wanif_cfg->magic = ROUTER_MAGIC;
wanif_cfg->active_ch = 0xFFFFFFFF;
sprintf(wanif_cfg->usedby,"TDM_SPAN_VOICE_API");
wanif_cfg->u.aft.idle_flag=0xFF;
wanif_cfg->mtu = 160;
wanif_cfg->u.aft.mtu = 160;
wanif_cfg->u.aft.mru = 160;
sprintf(wanif_cfg->name,"w%dg1",span);
if (hardware_info->max_hw_ec_chans) {
/* wan_hwec_conf_t - HWEC configuration for Port */
/*wandev_conf->hwec_conf.dtmf = 1;*/
/* wan_hwec_if_conf_t - HWEC configuration for Interface */
wanif_cfg->hwec.enable = 1;
}
tdmv_cfg->span_no = (unsigned char)span;
/* There is no DCHAN Configuration on BRI because it is
* configured automatically by the driver. */
return 0;
}
int sangoma_port_configurator::initialize_serial_api_configration_structure(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
wan_tdmv_conf_t *tdmv_cfg = &wandev_conf->tdmv_conf;
wanif_conf_t *wanif_cfg = &port_cfg->if_cfg[0];
// Serial parameters
FE_MEDIA(sdla_fe_cfg) = WAN_MEDIA_SERIAL;
FE_LINENO(sdla_fe_cfg) = hardware_info->port_number;
wandev_conf->line_coding = WANOPT_NRZ;
/* WANOPT_V35/WANOPT_X21 are valid for card models:
* AFT_ADPTR_2SERIAL_V35X21 and AFT_ADPTR_4SERIAL_V35X21.
* WANOPT_RS232 valid for card models:
* AFT_ADPTR_2SERIAL_RS232 and AFT_ADPTR_4SERIAL_RS232.
*/
wandev_conf->electrical_interface = WANOPT_V35;
#if 1
wandev_conf->clocking = WANOPT_EXTERNAL;
wandev_conf->bps = 0;
#else
wandev_conf->clocking = WANOPT_INTERNAL;
wandev_conf->bps = 56000;
#endif
wandev_conf->connection = WANOPT_PERMANENT;//or WANOPT_SWITCHED
wandev_conf->line_idle = WANOPT_IDLE_FLAG;
// API parameters
port_cfg->num_of_ifs = 1;
wandev_conf->config_id = WANCONFIG_AFT_SERIAL;
wandev_conf->magic = ROUTER_MAGIC;
wandev_conf->mtu = 2048;
wandev_conf->PCI_slot_no = hardware_info->pci_slot_number;
wandev_conf->pci_bus_no = hardware_info->pci_bus_number;
wandev_conf->card_type = WANOPT_AFT; //m_DeviceInfoData.card_model;
wanif_cfg->magic = ROUTER_MAGIC;
wanif_cfg->active_ch = 0xFFFFFFFF;
sprintf(wanif_cfg->usedby,"API");
wanif_cfg->u.aft.idle_flag=0xFF;
wanif_cfg->mtu = 1600;
wanif_cfg->u.aft.mtu = 1600;
wanif_cfg->u.aft.mru = 1600;
sprintf(wanif_cfg->name,"w%dg1",span);
wanif_cfg->hdlc_streaming = WANOPT_YES;
return 0;
}
int sangoma_port_configurator::write_configration_on_persistent_storage(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span)
{
//all the work is done by libsangoma
return sangoma_write_port_config_on_persistent_storage(hardware_info, port_cfg, (unsigned short)span);
}
int sangoma_port_configurator::control_analog_rm_lcm(port_cfg_t *port_cfg, int control_val)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
if (wandev_conf->card_type == WANOPT_AFT_ANALOG) { //Only valid for Analog cards
if (control_val == 1) {
INFO_CFG("%s(): enabling FXO Loop Current Monitoring.\n", __FUNCTION__);
sdla_fe_cfg->cfg.remora.rm_lcm = 1;
} else if(control_val == 0) {
INFO_CFG("%s(): disabling FXO Loop Current Monitoring.\n", __FUNCTION__);
sdla_fe_cfg->cfg.remora.rm_lcm = 0;
} else {
ERR_CFG("invalid parameter!\n");
return -EINVAL;
}
} else {
ERR_CFG("invalid card type: %d!\n", wandev_conf->card_type);
return -EINVAL;
}
return 0;
}
/**************************************************************/
/*********** Analog Global Gain Setting Functions**************/
/**************************************************************/
//Note: following gain settings are global. It requires drivers to
//restart the card.
//It is recommended to use dynamic analog txgain/rxgain functions
//from libsangoma library:sangoma_set_rm_tx_gain and sangoma_set_rm_rx_gain
int sangoma_port_configurator::set_analog_rm_fxo_txgain(port_cfg_t *port_cfg, int txgain)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
if(wandev_conf->card_type == WANOPT_AFT_ANALOG){//Only valid for Analog cards
sdla_fe_cfg->cfg.remora.fxo_txgain = txgain;
} else{
return -EINVAL;
}
return 0;
}
int sangoma_port_configurator::set_analog_rm_fxo_rxgain(port_cfg_t *port_cfg, int rxgain)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
if(wandev_conf->card_type == WANOPT_AFT_ANALOG){//Only valid for Analog cards
sdla_fe_cfg->cfg.remora.fxo_rxgain = rxgain;
} else{
return -EINVAL;
}
return 0;
}
int sangoma_port_configurator::set_analog_rm_fxs_txgain(port_cfg_t *port_cfg, int txgain)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
if(wandev_conf->card_type == WANOPT_AFT_ANALOG){//Only valid for Analog cards
sdla_fe_cfg->cfg.remora.fxs_txgain = txgain;
} else{
return -EINVAL;
}
return 0;
}
int sangoma_port_configurator::set_analog_rm_fxs_rxgain(port_cfg_t *port_cfg, int rxgain)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
if(wandev_conf->card_type == WANOPT_AFT_ANALOG){//Only valid for Analog cards
sdla_fe_cfg->cfg.remora.fxs_rxgain = rxgain;
} else{
return -EINVAL;
}
return 0;
}
/**************************************************************/
/*********** End of Analog Global Gain Setting Functions ******/
/**************************************************************/
int sangoma_port_configurator::set_analog_opermode(port_cfg_t *port_cfg, char *opermode)
{
wandev_conf_t *wandev_conf = &port_cfg->wandev_conf;
sdla_fe_cfg_t *sdla_fe_cfg = &wandev_conf->fe_cfg;
if(wandev_conf->card_type == WANOPT_AFT_ANALOG){ //Only valid for Analog cards
if(sizeof(sdla_fe_cfg->cfg.remora.opermode_name) < strlen(opermode))
return -EINVAL;
strcpy(sdla_fe_cfg->cfg.remora.opermode_name,opermode);
} else{
return -EINVAL;
}
return 0;
}
void sangoma_port_configurator::initialize_interface_mtu_mru(port_cfg_t *port_cfg, unsigned int mtu, unsigned int mru)
{
wanif_conf_t *wanif_cfg = &port_cfg->if_cfg[0];
INFO_CFG("%s(): new MTU: %d, new MRU: %d.\n", __FUNCTION__, mtu, mru);
wanif_cfg->mtu = mtu;
wanif_cfg->u.aft.mtu = mtu;
wanif_cfg->u.aft.mru = mru;
}

View File

@ -1,115 +0,0 @@
//////////////////////////////////////////////////////////////////////
// sangoma_port_configurator.h: interface for the sangoma_port_configurator class.
//
// Author : David Rokhvarg
//////////////////////////////////////////////////////////////////////
#if !defined(_SANGOMA_PORT_CONFIGURATOR_H)
#define _SANGOMA_PORT_CONFIGURATOR_H
#include "sangoma_port.h"
#define MAX_COMP_INSTID 2096
#define MAX_COMP_DESC 2096
#define MAX_FRIENDLY 2096
#define TMP_BUFFER_LEN 200
#define T1_ALL_CHANNELS_BITMAP 0xFFFFFF /* channels 1-24 */
/*!
\brief
*
*/
class sangoma_port_configurator : public sangoma_port
{
TCHAR name[MAX_FRIENDLY];
char szCompInstanceId[MAX_COMP_INSTID];
TCHAR szCompDescription[MAX_COMP_DESC];
TCHAR szFriendlyName[MAX_FRIENDLY];
DWORD dwRegType;
#ifdef __WINDOWS__
HKEY hPortRegistryKey;
#endif
port_cfg_t port_cfg;
//SET new configuration of the API driver
int SetPortVolatileConfigurationCommand(port_cfg_t *port_cfg);
public:
sangoma_port_configurator();
virtual ~sangoma_port_configurator();
int get_configration(port_cfg_t *port_cfg);
int set_default_configuration(port_cfg_t *port_cfg);
//Function to set Loop Current Measure (LCM) for analog FXO
//control_val 1: enable,0: disable
int control_analog_rm_lcm(port_cfg_t *port_cfg, int control_val);
//Function to set Operation mode for analog FXO
//opermode valid country name supported by Analog FXO
int set_analog_opermode(port_cfg_t *port_cfg, char *opermode);
/**************************************************************/
/*********** Analog Global Gain Setting Functions**************/
/**************************************************************/
//Note: following gain settings are global. It requires drivers to
//restart the card.
//It is recommended to use dynamic analog txgain/rxgain functions
//from libsangoma library:sangoma_set_rm_tx_gain and sangoma_set_rm_rx_gain
//Function to set FXO txgain
//FXO - txgain value ranges from -150 to 120
int set_analog_rm_fxo_txgain(port_cfg_t *port_cfg, int txgain);
//Function to set FXO rxgain
//FXO - rxgain value ranges from -150 to 120
int set_analog_rm_fxo_rxgain(port_cfg_t *port_cfg, int rxgain);
//Function to set FXS txgain
//FXO - txgain value can be -35 or 35
int set_analog_rm_fxs_txgain(port_cfg_t *port_cfg, int txgain);
//Function to set FXS rxgain
//FXO - rxgain value can be -35 or 35
int set_analog_rm_fxs_rxgain(port_cfg_t *port_cfg, int rxgain);
/**************************************************************/
/*********** End of Analog Global Gain Setting Functions ******/
/**************************************************************/
//Function to check correctness of 'port_cfg_t' structure.
int check_port_cfg_structure(port_cfg_t *port_cfg);
//Function to print contents of 'port_cfg_t' structure.
int print_port_cfg_structure(port_cfg_t *port_cfg);
//Function to print contents of 'sdla_fe_cfg_t' structure.
int print_sdla_fe_cfg_t_structure(sdla_fe_cfg_t *sdla_fe_cfg);
//Function to print contents of 'wanif_conf_t' structure.
int print_wanif_conf_t_structure(wanif_conf_t *wanif_conf);
int set_volatile_configration(port_cfg_t *port_cfg);
int initialize_t1_tdm_span_voice_api_configration_structure(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span);
int initialize_e1_tdm_span_voice_api_configration_structure(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span);
int initialize_bri_tdm_span_voice_api_configration_structure(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span);
int initialize_serial_api_configration_structure(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span);
int write_configration_on_persistent_storage(port_cfg_t *port_cfg, hardware_info_t *hardware_info, int span);
void initialize_interface_mtu_mru(port_cfg_t *port_cfg, unsigned int mtu, unsigned int mru);
};
#endif // !defined(_SANGOMA_PORT_CONFIGURATOR_H)

View File

@ -1,56 +0,0 @@
TARGETNAME=sample_cpp
TARGETTYPE=PROGRAM
UMTYPE=console
UMENTRY=main
UMBASE=0x400000
TARGETPATH=obj
USE_LIBCMT=1
USE_STL=1
#MSC_WARNING_LEVEL=$(SANG_WARNING_LEVEL)
MSC_WARNING_LEVEL=-W3
############################################################################################
C_DEFINES=$(C_DEFINES) /D__WINDOWS__ /DUSE_SANGOMA_ERRNO
############################################################################################
INCLUDES=$(DDK_INC_PATH);\
$(SANG_WP_DEVEL)\wanpipe_common\include;\
$(SANG_WP_DEVEL)\wanpipe_common\include\aft_core;\
$(SANG_WP_DEVEL)\wanpipe_windows\include;\
$(SANG_WP_DEVEL)\wanpipe_common\wantools\wanec_apilib;\
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libsangoma;\
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libsangoma\wanec;\
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libstelephony;\
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libstelephony\stel_tone;\
$(SANG_WP_DEVEL)\wanpipe_common\wanec;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\include;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\include\oct6100api;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\octdeviceapi\oct6100api;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\apilib\llman;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\include\apilib;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\include\octrpc;\
$(SANG_WP_DEVEL)\$(OCTASIC_INCLUDE)\apilib\bt
TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\gdi32.lib \
$(SDK_LIB_PATH)\winspool.lib \
$(SDK_LIB_PATH)\comdlg32.lib \
$(SDK_LIB_PATH)\advapi32.lib \
$(SDK_LIB_PATH)\shell32.lib \
$(SDK_LIB_PATH)\ole32.lib \
$(SDK_LIB_PATH)\oleaut32.lib \
$(SDK_LIB_PATH)\uuid.lib \
$(SDK_LIB_PATH)\comctl32.lib \
$(SDK_LIB_PATH)\Setupapi.lib \
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libsangoma\$(O)\libsangoma.lib \
$(SANG_WP_DEVEL)\wanpipe_common\wantools\libstelephony\$(O)\stelephony.lib
SOURCES=sample.cpp \
sangoma_cthread.cpp \
sangoma_interface.cpp \
sangoma_port.cpp \
sangoma_port_configurator.cpp

View File

@ -0,0 +1,237 @@
#!/bin/sh
function adsl_get_std_item () {
local menu_options
local rc
local choice
menu_instr="Please specify ADSL Standard Item \
"
menu_options="'ADSL_T1_413' 'T1.413' \
'ADSL_G_LITE' 'G.lite (G992.2)' \
'ADSL_G_DMT' 'G.dmt (G992.1)' \
'ADSL_ALCATEL_1_4' 'Alcatel 1.4' \
'ADSL_ALCATEL' 'Alcatel' \
'ADSL_ADI' 'ADI' \
'ADSL_MULTIMODE' 'Multimode (default)' \
'ADSL_T1_413_AUTO' 'T1.413 Auto' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} ADSL STANDARD ITEM " "$menu_options" 7 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) ADSL_Standard=$choice #Choice is a command
return 0
;;
2) device_setup_help "adsl_get_standard_item"
adsl_get_standard_item
;;
*) return 1
;;
esac
}
function adsl_get_trellis () {
local menu_options
local rc
local choice
menu_instr="Please specify ADSL Trellis \
"
menu_options="'ADSL_TRELLIS_ENABLE' 'Enable (default)' \
'ADSL_TRELLIS_DISABLE' 'Disable' \
'ADSL_TRELLIS_LITE_ONLY_DISABLE' 'Lite only disable' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} ADSL TRELLIS " "$menu_options" 3 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) ADSL_Trellis=$choice #Choice is a command
return 0
;;
2) device_setup_help "adsl_get_trellis"
adsl_get_trellis
;;
*) return 1
;;
esac
}
function adsl_get_codinggain () {
local menu_options
local rc
local choice
menu_instr="Please specify ADSL Coding Gain \
"
menu_options="'ADSL_0DB_CODING_GAIN' '0dB' \
'ADSL_1DB_CODING_GAIN' '1dB' \
'ADSL_2DB_CODING_GAIN' '2dB' \
'ADSL_3DB_CODING_GAIN' '3dB' \
'ADSL_4DB_CODING_GAIN' '4dB' \
'ADSL_5DB_CODING_GAIN' '5dB' \
'ADSL_6DB_CODING_GAIN' '6dB' \
'ADSL_7DB_CODING_GAIN' '7dB' \
'ADSL_AUTO_CODING_GAIN' 'Auto Coding Gain (default)' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} ADSL CODING GAIN " "$menu_options" 9 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) ADSL_CodingGain=$choice #Choice is a command
return 0
;;
2) device_setup_help "adsl_get_codinggain"
adsl_get_codinggain
;;
*) return 1
;;
esac
}
function adsl_get_rxbinadjust () {
local menu_options
local rc
local choice
menu_instr="Please specify ADSL Rx BIN Adjust \
"
menu_options="'ADSL_RX_BIN_DISABLE' 'Disable (default)' \
'ADSL_RX_BIN_ENABLE' 'Enable' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} ADSL RX BIN ADJUST " "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) ADSL_RxBinAdjust=$choice #Choice is a command
return 0
;;
2) device_setup_help "adsl_get_rxbinadjust"
adsl_get_rxbinadjust
;;
*) return 1
;;
esac
}
function adsl_get_framingtype () {
local menu_options
local rc
local choice
menu_instr="Please specify ADSL Framing Structure Type \
"
menu_options="'ADSL_FRAMING_TYPE_0' 'Type 0' \
'ADSL_FRAMING_TYPE_1' 'Type 1' \
'ADSL_FRAMING_TYPE_2' 'Type 2' \
'ADSL_FRAMING_TYPE_3' 'Type 3 (default)' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} ADSL FRAMING STRUCTURE TYPE " "$menu_options" 4 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) ADSL_FramingStruct=$choice #Choice is a command
return 0
;;
2) device_setup_help "adsl_get_framingtype"
adsl_get_framingtype
;;
*) return 1
;;
esac
}
function adsl_get_expandedexchange () {
local menu_options
local rc
local choice
menu_instr="Please specify ADSL Expanded Exchange \
"
menu_options="'ADSL_EXPANDED_EXCHANGE' 'Expanded (default)' \
'ADSL_SHORT_EXCHANGE' 'Short' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} ADSL Expanded Exchange " "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) ADSL_ExpandedExchange=$choice #Choice is a command
return 0
;;
2) device_setup_help "adsl_get_expandedexchange"
adsl_get_expandedexchange
;;
*) return 1
;;
esac
}
function adsl_get_clocktype () {
local menu_options
local rc
local choice
menu_instr="Please specify ADSL Clock Type \
"
menu_options="'ADSL_CLOCK_CRYSTAL' 'Crystal (default)' \
'ADSL_CLOCK_OSCILLATOR' 'Oscillator' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} ADSL CLOCK TYPE " "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) ADSL_ClockType=$choice #Choice is a command
return 0
;;
2) device_setup_help "adsl_get_clocktype"
adsl_get_clocktype
;;
*) return 1
;;
esac
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,102 @@
function atm_interface_init()
{
local num="$1"
atm_oam_loopback[$num]=${atm_oam_loopback[$num]:-NO}
atm_oam_loopback_int[$num]=${atm_oam_loopback_int[$num]:-5}
atm_oam_cc_check[$num]=${atm_oam_cc_check[$num]:-NO}
atm_oam_cc_check_int[$num]=${atm_oam_cc_check_int[$num]:-2}
atm_arp[$num]=${atm_arp[$num]:-NO}
atm_arp_int[$num]=${atm_arp_int[$num]:-15}
}
function atm_interface_setup()
{
local rc
local num="$1"
local choice
local menu_options
atm_interface_init $num
menu_options="'atm_oam_loopback' 'OAM Loopback -----------> ${atm_oam_loopback[$num]}' \
'atm_oam_loopback_int' 'OAM Loopback Interval --> ${atm_oam_loopback_int[$num]}' \
'atm_oam_cc_check' 'OAM Continuity Check ---> ${atm_oam_cc_check[$num]}' \
'atm_oam_cc_check_int' 'OAM Continuity Interval-> ${atm_oam_cc_check_int[$num]}' \
'again' ' ' \
'atm_arp' 'ATM ARP ----------------> ${atm_arp[$num]}' \
'atm_arp_int' 'ATMARP_INT -------------> ${atm_arp_int[$num]}' 2> $MENU_TMP"
menu_instr="Please specify the ${IF_NAME[$num]}: ATM protocol parameters below \
"
menu_name "ATM ${IF_NAME[$num]} PROTOCOL SETUP" "$menu_options" 12 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) case $choice in
atm_oam_loopback)
warning "atm_oam_loopback"
if [ $? -eq 0 ]; then
atm_oam_loopback[$num]=YES
else
atm_oam_loopback[$num]=NO
fi
;;
atm_oam_loopback_int)
get_string "Please specify ATM OAM Loopback interval" "${atm_oam_loopback_int[$num]}"
atm_oam_loopback_int[$num]=$($GET_RC)
;;
atm_oam_cc_check)
warning "atm_oam_cc_check"
if [ $? -eq 0 ]; then
atm_oam_cc_check[$num]=YES
else
atm_oam_cc_check[$num]=NO
fi
;;
atm_oam_cc_check_int)
get_string "Please specify ATM Continuity Interval" "${atm_oam_cc_check_int[$num]}"
atm_oam_cc_check_int[$num]=$($GET_RC)
;;
atm_arp)
warning "atm_arp"
if [ $? -eq 0 ]; then
atm_arp[$num]=YES
else
atm_arp[$num]=NO
fi
;;
atm_arp_int)
get_string "Please specify ATM ARP Interval" "${atm_arp_int[$num]}"
atm_arp_int[$num]=$($GET_RC)
;;
*)
$choice #Choice is a command
;;
esac
return 0
;;
2) choice=${choice%\"*\"}
choice=${choice// /}
interface_setup_help $choice
return 0
;;
*)
return 1
;;
esac
}

View File

@ -0,0 +1,463 @@
#!/bin/sh
function chdlc_interface_init () {
local num=$1
if [ -z "${MULTICAST[$num]}" ]; then
MULTICAST[$num]=NO
fi
if [ -z "${DCD[$num]}" ]; then
DCD[$num]=NO
fi
if [ -z "${CTS[$num]}" ]; then
CTS[$num]=NO
fi
if [ -z "${KEEP[$num]}" ]; then
KEEP[$num]=NO
fi
if [ -z "${STREAM[$num]}" ]; then
STREAM[$num]=NO
fi
if [ -z "${TXTIME[$num]}" ]; then
TXTIME[$num]=10000
fi
if [ -z "${RXTIME[$num]}" ]; then
RXTIME[$num]=11000
fi
if [ -z "${ERR[$num]}" ]; then
ERR[$num]=5
fi
if [ -z "${SLARP[$num]}" ]; then
SLARP[$num]=0
fi
if [ -z "${TRUE_ENCODING[$num]}" ]; then
TRUE_ENCODING[$num]=NO
fi
if [ $PROTOCOL = WAN_MULTPPP ] || [ $PROTOCOL = WAN_MULTPROT ]; then
STREAM[$num]=YES
DCD[$num]=NO
CTS[$num]=NO
KEEP[$num]=YES
SLARP[$num]=0
fi
}
function chdlc_interface_setup () {
local rc
local num="$1"
local choice
local menu_options
chdlc_interface_init $num
if [ -z "${CHDLC_IPMODE[$num]}" ]; then
CHDLC_IPMODE[$num]=NO;
SLARP[$num]=0;
fi
if [ $PROTOCOL = WAN_CHDLC ]; then
menu_options="'get_slarp' 'Dynamic IP Addressing ----> ${CHDLC_IPMODE[$num]}' \
'get_multicast' 'Multicast ---------------> ${MULTICAST[$num]}' \
'get_ig_dcd' 'Ignore DCD --------------> ${DCD[$num]}' \
'get_ig_cts' 'Ignore CTS --------------> ${CTS[$num]}' \
'get_ig_keep' 'Ignore Keepalive ---------> ${KEEP[$num]}' \
'get_stream' 'HDLC Streaming -----------> ${STREAM[$num]}' \
'get_tx_time' 'Keep Alive Tx Timer ------> ${TXTIME[$num]}' \
'get_rx_time' 'Keep Alive Rx Timer ------> ${RXTIME[$num]}' \
'get_err_mar' 'Keep Alive Error Margin --> ${ERR[$num]}' \
'get_encoding' 'True_Encoding_Type -------> ${TRUE_ENCODING[$num]}' 2> $MENU_TMP"
else
menu_options="'no_opt' 'NO OPTIONS' 2> $MENU_TMP"
fi
menu_instr="Please specify the ${IF_NAME[$num]}: CHDLC protocol parameters below\
"
menu_name "CHDLC ${IF_NAME[$num]} PROTOCOL SETUP" "$menu_options" 9 "$menu_instr" "$BACK" 20
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) case $choice in
get_tx_time)
get_integer "Please specify the Keepalive Tx Timer" "10000" "0" "60000" "interface_setup_help get_tx_time"
TXTIME[$num]=$($GET_RC)
;;
get_rx_time)
get_integer "Please specify the Keepalive Rx Timer" "11000" "10" "60000" "interface_setup_help get_rx_time"
RXTIME[$num]=$($GET_RC)
;;
get_err_mar)
get_integer "Please specify the Keepalive Error Margin" "5" "1" "20" "interface_setup_help get_err_mar"
ERR[$num]=$($GET_RC)
;;
get_slarp)
warning get_slarp
if [ $? -eq 0 ]; then
CHDLC_IPMODE[$num]=YES
SLARP[$num]=1000
else
CHDLC_IPMODE[$num]=NO
SLARP[$num]=0
fi
;;
*)
$choice "$num" #Choice is a command
;;
esac
return 0
;;
2) choice=${choice%\"*\"}
choice=${choice// /}
interface_setup_help $choice
return 0
;;
*)
return 1
;;
esac
}
function get_commport () {
local menu_options
local rc
local choice
if [ $PROTOCOL = WAN_TTYPPP -a $TTY_MODE = ASYNC ]; then
menu_options="'SEC' 'Secondary' 2> $MENU_TMP"
else
menu_options="'PRI' 'Primary (default)' \
'SEC' 'Secondary' 2> $MENU_TMP"
fi
menu_instr="Please select the CHDLC Communication Port \
"
menu_name "${IF_NAME[$num]} COMM PORT CONFIGURATION" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) COMMPORT=$choice #Choice is a command
return 0
;;
2) device_setup_help "get_commport"
get_commport
;;
*) return 1
;;
esac
}
function get_connection ()
{
local menu_options
local rc
local choice
menu_instr="Please select the CHDLC Connection Type \
"
menu_options="'Permanent' 'Permanent (default)' \
'Switched' 'Switched' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} CONNECTION TYPE " "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) CONNECTION=$choice #Choice is a command
return 0
;;
2) device_setup_help "get_connection"
get_connection
;;
*) return 1
;;
esac
}
function get_linecode () {
local menu_options
local rc
local choice
menu_instr="Please select the CHDLC Line Coding Type \
"
menu_options="'NRZ' 'NRZ (default)' \
'NRZI' 'NRZI' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} LINE CODING TYPE " "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) LINECODING=$choice #Choice is a command
return 0
;;
2) device_setup_help "get_linecode"
get_linecode
;;
*) return 1
;;
esac
}
function get_lineidle () {
local menu_options
local rc
local choice
menu_instr="Please select the CHDLC Line Idle Type \
"
menu_options="'FLAG' 'Idle Flag (default)' \
'MARK' 'Idle Mark' 2> $MENU_TMP"
menu_name "${IF_NAME[$num]} LINE IDLE CONFIG " "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) LINEIDLE=$choice #Choice is a command
return 0
;;
2) device_setup_help "get_lineidle"
get_lineidle
;;
*) return 1
;;
esac
}
function get_rec_only () {
local menu_options
local rc
local choice
menu_options="'NO' 'Disable Receive Only Comm. (default)' \
'YES' 'Enable Receive Only Comm.' 2> $MENU_TMP"
menu_instr="Enable or Disable Receive Only Communications \
"
menu_name "${IF_NAME[$num]} RECEIVE ONLY CONFIGURATION" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) REC_ONLY=$choice #Choice is a command
return 0
;;
2) device_setup_help "get_rec_only"
get_commport
;;
*) return 1
;;
esac
}
function get_ig_dcd () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'NO' 'Monitor Modem DCD (Default)' \
'YES' 'Ignore Modem DCD' 2> $MENU_TMP"
menu_instr="Enable or Disable DCD Monitoring \
"
menu_name "${IF_NAME[$num]}: DCD MONITORING SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) DCD[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_ig_dcd"
get_ig_dcd "$1"
;;
*) return 1
;;
esac
}
function get_ig_cts () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'NO' 'Monitor Modem CTS (Default)' \
'YES' 'Ignore Modem CTS' 2> $MENU_TMP"
menu_instr="Enable or Disable CTS Monitoring \
"
menu_name "${IF_NAME[$num]} CTS MONITORING SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) CTS[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_ig_cts"
get_ig_cts "$1"
;;
*) return 1
;;
esac
}
function get_modem_ignore () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'YES' 'Ignore Modem Status (Default)' \
'NO' 'Reset Protocol on Modem change' 2> $MENU_TMP"
menu_instr="Enable or Disable Modem Monitoring \
"
menu_name "${IF_NAME[$num]}: MODEM MONITORING SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) MPPP_MODEM_IGNORE[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_modem_ignore"
get_modem_ignore "$1"
;;
*) return 1
;;
esac
}
function get_ig_keep () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'NO' 'Activate Keep Alive (Default)' \
'YES' 'Ignore Keep Alive' 2> $MENU_TMP"
menu_instr="Enable or Disable Keep Alive Monitoring \
"
menu_name "${IF_NAME[$num]} KEEP ALIVE SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) KEEP[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_ig_keep"
get_ig_keep "$1"
;;
*) return 1
;;
esac
}
function get_stream () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'NO' 'Disable HDLC Streaming (Default)' \
'YES' 'Enable HDLC Streaming' 2> $MENU_TMP"
menu_instr="Enable or Disable HDLC Streaming \
"
menu_name "${IF_NAME[$num]}: HDLC STREAMING CONFIGURATION" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) STREAM[$num]=$choice #Choice is a command
if [ $choice = YES ]; then
DCD[$num]=YES
CTS[$num]=YES
KEEP[$num]=YES
else
DCD[$num]=NO
CTS[$num]=NO
KEEP[$num]=NO
fi
return 0
;;
2) interface_setup_help "get_stream"
get_stream "$1"
;;
*) return 1
;;
esac
}

View File

@ -0,0 +1,370 @@
# TE1 Select media connection for T1/E1 board.
function get_media_type () {
local choice
local rc
menu_options="'T1' 'T1 connection' \
'E1' 'E1 connection' 2> $MENU_TMP"
menu_instr="Please specify connection type. Refer to User Manual \
"
menu_name "CONNECTION TYPE" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) if [ $MEDIA != $choice ]; then
MEDIA=$choice #Choice is a command
if [ $MEDIA = T1 ]; then
LCODE="B8ZS"
FRAME="ESF"
else
LCODE="HDB3"
FRAME="NCRC4"
fi
fi
;;
2) device_setup_help "get_media_type"
get_media_type
;;
*) return 1
;;
esac
}
# TE1 Select line decoding for T1/E1 board.
function get_lcode_type () {
local choice
local rc
if [ $MEDIA = T1 ]; then
menu_options="'AMI' 'AMI line decoding' \
'B8ZS' 'B8ZS line decoding' 2> $MENU_TMP"
else
menu_options="'AMI' 'AMI line decoding' \
'HDB3' 'HDB3 line decoding' 2> $MENU_TMP"
fi
menu_instr="Please specify line decoding. Refer to User Manual \
"
menu_name "LINE DECODING" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) LCODE=$choice #Choice is a command
;;
2) device_setup_help "get_lcode_type"
get_lcode_type
;;
*) return 1
;;
esac
}
# TE1 Select frame type for T1/E1 board.
function get_frame_type () {
local choice
local rc
if [ $MEDIA = T1 ]; then
menu_options="'D4' 'D4 framing format' \
'ESF' 'ESF framing format' \
'UNFRAMED' 'Unframed format' 2> $MENU_TMP"
else
menu_options="'NCRC4' 'non-CRC4 framing format' \
'CRC4' 'CRC4 framing format' \
'UNFRAMED' 'Unframed format' 2> $MENU_TMP"
fi
menu_instr="Please specify frame mode. Refer to User Manual \
"
menu_name "FRAMING FORMAT" "$menu_options" 3 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) FRAME=$choice #Choice is a command
if [ $FRAME = "UNFRAMED" ]; then
if [ $PROTOCOL = WAN_BITSTRM ]; then
init_bstrm_opt
fi
fi
;;
2) device_setup_help "get_frame_type"
get_frame_type
;;
*) return 1
;;
esac
}
# TE1 Select clock mode for T1/E1 mode.
function get_te_clock () {
local choice
local rc
menu_options="'NORMAL' 'Normal (default)' \
'MASTER' 'Master' 2> $MENU_TMP"
menu_instr="Please specify T1/E1 clock mode. Refer to User Manual \
"
menu_name "T1/E1 CLOCK MODE" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) TE_CLOCK=$choice #Choice is a command
;;
2) device_setup_help "get_te_clock"
get_te_clock
;;
*) return 1
;;
esac
}
# TE1 Select LBO type for T1/E1 board (only T1 connection).
function get_lbo_type () {
local choice
local rc
menu_options="'0dB' 'CSU: 0dB' \
'7.5dB' 'CSU: 7.5dB' \
'15dB' 'CSU: 15dB' \
'22.5dB' 'CSU: 22.5dB' \
'0-110ft' 'DSX: 0-110ft' \
'110-220ft' 'DSX: 110-220ft' \
'220-330ft' 'DSX: 220-330ft' \
'330-440ft' 'DSX: 330-440ft' \
'440-550ft' 'DSX: 440-550ft' \
'550-660ft' 'DSX: 550-660ft' 2> $MENU_TMP"
menu_instr="Please specify line build out type. Refer to User Manual \
"
menu_name "LINE BUILD OUT" "$menu_options" 10 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) LBO=$choice #Choice is a command
;;
2) device_setup_help "get_lbo_type"
get_lbo_type
;;
*) return 1
;;
esac
}
function get_highimpedance_type () {
local choice
local rc
menu_options="'NO' 'Disable High-Impedance mode (default)' \
'YES' 'Enable High-Impedance mode' 2> $MENU_TMP"
menu_instr="Enable or Disable High-Impedance Mode \
"
menu_name "HIGH-IMPEDANCE MODE" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) HIGHIMPEDANCE=$choice #Choice is a command
;;
2) device_setup_help "get_highimpedance_type"
get_highimpedance_type
;;
*) return 1
;;
esac
}
function get_encoding () {
local choice
local rc
local num=$1
menu_options="'NO' 'RAW-Pure IP interface type' \
'YES' 'True interface encoding typy' 2> $MENU_TMP"
menu_instr="Please specify the WANPIPE interface type setting \
"
menu_name "WANPIPE INTERFACE TYPE OPTION" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) TRUE_ENCODING[$num]=$choice #Choice is a command
;;
2) interface_setup_help "get_encoding"
get_encoding $num
;;
*) return 1
;;
esac
}
#------ TE3 ---------------------
# TE1 Select media connection for T1/E1 board.
function get_media_te3_type () {
local choice
local rc
menu_options="'DS3' 'DS3/T3 connection' \
'E3' 'E3 connection' 2> $MENU_TMP"
menu_instr="Please specify connection type. Refer to User Manual \
"
menu_name "CONNECTION TYPE" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) if [ $MEDIA != $choice ]; then
MEDIA=$choice #Choice is a command
if [ $MEDIA = DS3 ]; then
LCODE="B3ZS"
FRAME="C-BIT"
else
LCODE="HDB3"
FRAME="G.751"
fi
fi
;;
2) device_setup_help "get_media_te3_type"
get_media_te3_type
;;
*) return 1
;;
esac
}
# TE1 Select line decoding for T1/E1 board.
function get_lcode_te3_type () {
local choice
local rc
if [ $MEDIA = DS3 ]; then
menu_options="'B3ZS' 'B3ZS line decoding' \
'AMI' 'AMI line decoding' 2> $MENU_TMP"
else
menu_options="'HDB3' 'HDB3 line decoding' \
'AMI' 'AMI line decoding' 2> $MENU_TMP"
fi
menu_instr="Please specify line decoding. Refer to User Manual \
"
menu_name "LINE DECODING" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) LCODE=$choice #Choice is a command
;;
2) device_setup_help "get_lcode_te3_type"
get_lcode_te3_type
;;
*) return 1
;;
esac
}
# TE1 Select frame type for T1/E1 board.
function get_frame_te3_type () {
local choice
local rc
if [ $MEDIA = DS3 ]; then
menu_options="'C-BIT' 'C-BIT framing format' \
'M13' 'M13 framing format' 2> $MENU_TMP"
else
menu_options="'G.751' 'G.751 framing format' \
'G.832' 'G.832 framing format' 2> $MENU_TMP"
fi
menu_instr="Please specify frame mode. Refer to User Manual \
"
menu_name "FRAMING FORMAT" "$menu_options" 3 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) FRAME=$choice #Choice is a command
;;
2) device_setup_help "get_frame_te3_type"
get_frame_te3_type
;;
*) return 1
;;
esac
}
# TE1 Select media connection for T1/E1 board.
function get_TE3_FCS () {
local choice
local rc
menu_options="'16' 'CRC 16' \
'32' 'CRC 32' 2> $MENU_TMP"
menu_instr="Please specify CRC type. Refer to User Manual \
"
menu_name "CRC/FCS TYPE" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) TE3_FCS=$choice
;;
2) device_setup_help "get_TE3_FCS"
get_TE3_FCS
;;
*) return 1
;;
esac
}

View File

@ -0,0 +1,448 @@
#!/bin/sh
function fr_interface_setup () {
local rc
local num="$1"
local choice
local menu_options
if [ -z "${CIR[$num]}" ]; then
CIR[$num]=NO
fi
if [ -z "${BC[$num]}" ]; then
BC[$num]=NO
fi
if [ -z "${BE[$num]}" ]; then
BE[$num]=NO
fi
if [ -z "${MULTICAST[$num]}" ]; then
MULTICAST[$num]=NO
fi
if [ -z "${INARP[$num]}" ]; then
INARP[$num]=NO
fi
if [ -z "${INARP_INT[$num]}" ]; then
INARP_INT[$num]=0
fi
if [ -z "${TRUE_ENCODING[$num]}" ]; then
TRUE_ENCODING[$num]=NO
fi
INARP_RX[$num]=${INARP_RX[$num]:-NO}
IPX[$num]=${IPX[$num]:-NO}
NETWORK[$num]=${NETWORK[$num]:-0xDEADBEEF}
if [ ${CIR[$num]} = NO ]; then
menu_options="'get_cir' 'CIR -----------> ${CIR[$num]}' \
'get_multicast' 'MULTICAST -----------> ${MULTICAST[$num]}' \
'get_inarp' 'TX INARP -----------> ${INARP[$num]}' \
'get_inarp_int' 'INARP_INT ----------> ${INARP_INT[$num]}' \
'get_inarp_rx' 'RX INARP ------------> ${INARP_RX[$num]}' \
'get_ipx' 'IPX Support ---------> ${IPX[$num]}' \
'get_network' 'IPX Network Addr ----> ${NETWORK[$num]}' \
'get_encoding' 'True_Encoding_Type --> ${TRUE_ENCODING[$num]}' 2> $MENU_TMP"
menu_size=8
else
menu_options="'get_cir' 'CIR ----------> ${CIR[$num]}' \
'get_bc' 'BC ----------> ${BC[$num]}' \
'get_be' 'BE ----------> ${BE[$num]}' \
'get_multicast' 'MULTICAST ----------> ${MULTICAST[$num]}' \
'get_inarp' 'TX INARP ----------> ${INARP[$num]}' \
'get_inarp_int' 'INARP_INT ----------> ${INARP_INT[$num]}' \
'get_inarp_rx' 'RX INARP ------------> ${INARP_RX[$num]}' \
'get_ipx' 'IPX Support ---------> ${IPX[$num]}' \
'get_network' 'IPX Network Addr ----> ${NETWORK[$num]}' \
'get_encoding' 'True_Encoding_Type --> ${TRUE_ENCODING[$num]}' 2> $MENU_TMP"
menu_size=10
fi
menu_instr="Please configure ${IF_NAME[$num]}: Frame Relay parameters below
"
menu_name "${IF_NAME[$num]}: FRAME RELAY PROTOCOL SETUP" "$menu_options" "$menu_size" "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0)
case $choice in
get_network*)
get_string "Please specify you IPX Network Number" "0xABCDEFAB"
NETWORK[$num]=$($GET_RC)
;;
get_inarp_int*)
if [ ${INARP[$num]} = YES ]; then
arp_dflt=10
else
arp_dflt=0
fi
get_integer "Please specify InARP interval" "$arp_dflt" "0" "100" "interface_setup_help get_inarp_int"
INARP_INT[$num]=$($GET_RC)
;;
*)
$choice "$num" #Choice is a command
;;
esac
return 0
;;
2) choice=${choice%\"*\"}
choice=${choice// /}
interface_setup_help $choice
return 0
;;
*) if [ ${CIR[$num]} != NO ]; then
if [ ${BC[$num]} = NO ]; then
error "CIR_BC" $num
return 0
fi
if [ ${BE[$num]} = NO ]; then
error "CIR_BE" $num
return 0
fi
fi
return 1
;;
esac
}
function get_fs_issue () {
local menu_options
local rc
local choice
local num="$1"
menu_options="'YES' 'Issue Full Status on startup (default)' \
'NO' 'Disable Full Status on startup' 2> $MENU_TMP"
menu_instr="Please Enable or Disable: Frame Relay full status issue on startup \
"
menu_name "${IF_NAME[$num]}: FULL STATUS ON STARTUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) FR_ISSUE_FS=$choice #Choice is a command
return 0
;;
2) device_setup_help "get_fs_issue"
get_fs_issue "$1"
;;
*) return 1
;;
esac
}
function get_inarp () {
local menu_options
local rc
local choice
local num="$1"
menu_options="'NO' 'Disable Inverse Arp (default)' \
'YES' 'Enable Inverse Arp' 2> $MENU_TMP"
menu_instr="Please Enable or Disable Inverse ARP Option \
"
menu_name "${IF_NAME[$num]}: INVERSE ARP SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) INARP[$num]=$choice #Choice is a command
if [ "$choice" = YES ]; then
INARP_RX[$num]=YES
INARP_INT[$num]=10
else
INARP_RX[$num]=NO
fi
return 0
;;
2) interface_setup_help "get_inarp"
get_inarp "$1"
;;
*) return 1
;;
esac
}
function get_inarp_rx () {
local menu_options
local rc
local choice
local num="$1"
menu_options="'NO' 'Ignore Incoming Inverse Arps (default)' \
'YES' 'Handle Incoming Inverse Arps' 2> $MENU_TMP"
menu_instr="Please Enable or Disable Incoming Inverse ARP Support \
"
menu_name "${IF_NAME[$num]}: INVERSE ARP RECEPTION SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) if [ ${INARP[$num]} != YES ]; then
INARP_RX[$num]=$choice #Choice is a command
else
INARP_RX[$num]=YES
fi
return 0
;;
2) interface_setup_help "get_inarp_rx"
get_inarp "$1"
;;
*) return 1
;;
esac
}
function get_be () {
local menu_options
local rc
local choice
local num="$1"
menu_options="'NO' 'Disable BE (Default)' \
'custom' 'Custom Config' 2> $MENU_TMP"
menu_instr="Please Enable or Disable BE Option\
"
menu_name "${IF_NAME[$num]}: BE CONFIGURATION" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) case $choice in
custom)
get_integer "Please specify BE in Kpbs" "0" "0" "512" "interface_setup_help get_be"
choice=$($GET_RC)
;;
esac
BE[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_be"
get_be "$1"
;;
*) return 1
;;
esac
}
function get_bc () {
local menu_options
local rc
local choice
local num="$1"
menu_options="'NO' 'Disable BC (Default)' \
'custom' 'Custom Config' 2> $MENU_TMP"
menu_instr="Please Enable or Disable BC Option \
"
menu_name "${IF_NAME[$num]}: BC CONFIGURATION" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0)
case $choice in
custom)
get_integer "Please specify BC in Kpbs" "64" "16" "512" "interface_setup_help get_bc"
choice=$($GET_RC)
;;
esac
BC[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_bc"
get_bc "$1"
;;
*) return 1
;;
esac
}
function get_cir () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'NO' 'Disable CIR (Default)' \
'custom' 'Custom Configure' 2> $MENU_TMP"
menu_instr="Please Enable or Disable CIR Option \
"
menu_name "${IF_NAME[$num]}: CIR CONFIGURATION" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) case $choice in
custom)
get_integer "Please specify CIR in Kpbs" "64" "16" "512" "interface_setup_help get_cir"
choice=$($GET_RC)
;;
esac
CIR[$num]=$choice #Choice is a command
if [ $choice = NO ]; then
BC[$num]=$choice;
BE[$num]=$choice;
fi
return 0
;;
2) interface_setup_help "get_cir"
get_cir "$1"
;;
*) return 1
;;
esac
}
function get_station () {
local menu_options
local rc
local choice
local num=$1
menu_options="'CPE' 'CPE' \
'NODE' 'Node (switch emulation)' 2> $MENU_TMP"
menu_instr="Please specify the Frame Relay Station Type \
"
menu_name "FRAME RELAY STATION SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) if [ -z $num ]; then
STATION=$choice #Choice is a command
else
STATION_IF[$num]=$choice
fi
return 0
;;
2)
device_setup_help "get_station"
get_station
;;
*) return 1
;;
esac
}
function get_signal () {
local menu_options
local rc
local choice
local num=$1
local node=NO
if [ -z $num ]; then
if [ $STATION = NODE ]; then
node=YES
fi
else
if [ ${STATION_IF[$num]} = NODE ]; then
node=YES
fi
fi
if [ $node = YES ]; then
menu_options="'ANSI' 'ANSI' \
'LMI' 'LMI' \
'Q933' 'Q933' \
'NO' 'No signalling' 2> $MENU_TMP"
else
if [ -z $num ]; then
menu_options="'ANSI' 'ANSI' \
'LMI' 'LMI' \
'Q933' 'Q933' 2> $MENU_TMP"
else
menu_options="'AUTO' 'Auto Detect' \
'ANSI' 'ANSI' \
'LMI' 'LMI' \
'Q933' 'Q933' 2> $MENU_TMP"
fi
fi
menu_instr="Please specify Frame Relay Signalling \
"
menu_name "FRAME RELAY SIGNALLING CONFIGURATION" "$menu_options" 4 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) if [ -z $num ]; then
SIGNAL=$choice #Choice is a command
else
SIGNAL_IF[$num]=$choice
fi
return 0
;;
2)
device_setup_help "get_signal"
get_signal
;;
*) return 1
;;
esac
}

File diff suppressed because it is too large Load Diff

5570
build/etc/wanpipe/lib/lib.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,569 @@
#!/bin/sh
#################################################################
######## L I N U X #########
#################################################################
init_pppd_scripts ()
{
if [ $OS_SYSTEM != "Linux" ]; then
return 1;
fi
if [ $PROTOCOL = WAN_ADSL ]; then
get_string "Please specify PAP/CHAP User Name" ""
PAPCHAP_UNAME=$($GET_RC)
get_string "Please specify PAP/CHAP Password" ""
PAPCHAP_PASSWD=$($GET_RC)
warning "PAPCHAP_SECRETS_UPDATE"
if [ $? -eq 0 ]; then
if [ ! -d /etc/ppp/ ]; then
warning "PPP_DIR_NOT_FOUND"
if [ $? -eq 0 ]; then
\mkdir -p /etc/ppp
else
return 1;
fi
fi
if [ -e /etc/ppp/pap-secrets ]; then
mv /etc/ppp/pap-secrets /etc/ppp/pap-secrets.orig
fi
if [ -e /etc/ppp/chap-secrets ]; then
mv /etc/ppp/chap-secrets /etc/ppp/chap-secrets.orig
fi
echo -e "\"$PAPCHAP_UNAME\"\t*\t$PAPCHAP_PASSWD\t*" > /etc/ppp/pap-secrets
chmod 600 /etc/ppp/pap-secrets
echo -e "\"$PAPCHAP_UNAME\"\t*\t$PAPCHAP_PASSWD\t*" > /etc/ppp/chap-secrets
chmod 600 /etc/ppp/chap-secrets
fi
PPPD_OPTION="
# ---------------------------------------------
# PPPD Daemon SYNC configuration file
# ---------------------------------------------
# options.ttyWP$TTY_MINOR
#
# - PPPD daemon must bind to device /dev/ttyWP$TTY_MINOR
# - The /dev/ttyWP$TTY_MINOR is binded to wanpipe$DEVICE_NUM
#
# Created automatically by /usr/sbin/wancfg
# Date: `date`
#
name \"$PAPCHAP_UNAME\"
debug
-detach
noipdefault
defaultroute
ipcp-accept-remote
ipcp-accept-local
nobsdcomp
nodeflate
nopcomp
novj
novjccomp
noaccomp -am
"
PPPD_CALL="
#------------------------------------------------
# PPPD Call SYNC Script
#------------------------------------------------
# This call script will call /etc/ppp/options.ttyWP$TTY_MINOR
# to setup the PPPD dameon.
#
# It will start PPPD SYNC protocol.
#
# Created automatically by /usr/local/wanrouter/wancfg
# Date: `date`
#
ttyWP$TTY_MINOR #Bind to WANPIPE device wanpipe3
sync #Connect in sync mode
lcp-echo-failure 0 #No link verification messages
"
return 0;
fi
MULTILINK=NO
MULTILINK_MODE=SLAVE
warning "MULTILINK_OPT"
if [ $? -eq 0 ]; then
MULTILINK=YES
warning "MULTILINK_MASTER"
if [ $? -eq 0 ]; then
MULTILINK_MODE=MASTER
fi
fi
if [ $TTY_MODE = Sync ]; then
PPPD_OPTION="
# ---------------------------------------------
# PPPD Daemon SYNC configuration file
# ---------------------------------------------
# options.ttyWP$TTY_MINOR
#
# - PPPD daemon must bind to device /dev/ttyWP$TTY_MINOR
# - The /dev/ttyWP$TTY_MINOR is binded to wanpipe$DEVICE_NUM
#
# Created automatically by /usr/sbin/wancfg
# Date: `date`
#
asyncmap 0
debug #PPPD will output connection information
nodetach #Do not detach into background
defaultroute #This interface will be a default gateway.
nodeflate #Do not use compression
nobsdcomp #Do not use bsd compression
noccp #Disable CCP (Compression Control Protocol)
noaccomp #Disable Address/Control compression
nopcomp #Disable protocol field compres.
novj #Disable Van Jacobson TCP/IP header compres.
novjccomp #Disable the connection-ID compression
nopredictor1 #Do not accept or agree to Predictor-1 compres.
# Read pppd(8) for more information.
# Read /usr/local/wanrouter/PPP-HOWTO for more info.
"
PPPD_CALL="
#------------------------------------------------
# PPPD Call SYNC Script
#------------------------------------------------
# This call script will call /etc/ppp/options.ttyWP$TTY_MINOR
# to setup the PPPD dameon.
#
# It will start PPPD SYNC protocol.
#
# Created automatically by /usr/local/wanrouter/wancfg
# Date: `date`
#
ttyWP$TTY_MINOR #Bind to WANPIPE device wanpipe$DEVICE_NUM
sync #Connect in sync mode
lcp-echo-failure 0 #No link verification messages
"
if [ $MULTILINK = YES ]; then
PPPD_CALL=$PPPD_CALL"
multilink #Enable Multilink Protocol
"
if [ $MULTILINK_MODE = SLAVE ]; then
PPPD_CALL=$PPPD_CALL"
noip #No IP addresses for a slave
"
fi
fi
if [ $MULTILINK = NO ] || [ $MULTILINK_MODE = MASTER ]; then
get_string "Please specify the Local IP Address" "" "IP_ADDR"
L_IP=$($GET_RC)
get_string "Please specify the Point-to-Point IP Address" "" "IP_ADDR"
R_IP=$($GET_RC)
PPPD_CALL=$PPPD_CALL"
$L_IP:$R_IP #Local and remote IP addresses
#STATIC IP mode.
"
fi
else
PPPD_OPTION="
# ---------------------------------------------
# PPPD Daemon ASYNC configuration file
# ---------------------------------------------
# options.ttyWP$TTY_MINOR
#
# - PPPD daemon must bind to device /dev/ttyWP$TTY_MINOR
# - The /dev/ttyWP$TTY_MINOR is binded to wanpipe$DEVICE_NUM
#
# Created automatically by /usr/local/wanrouter/wancfg
# Date: `date`
#
asyncmap 0
modem #Interface to a modem
debug #PPPD will output connection information
crtscts #Enable hardware flow control
noipdefault #Enable dynamice IP addressing
#Obtaint Local and Remote IP addresses from
#peer.
-detach #Do not detach into background
defaultroute #This interface will be a default gateway.
#nodeflate #Do not use compression
#nobsdcomp #Do not use bsd compression
#noccp #Disable CCP (Compression Control Protocol)
#noaccomp #Disable Address/Control compression
#nopcomp #Disable protocol field compres.
#novj #Disable Van Jacobson TCP/IP header compres.
#novjccomp #Disable the connection-ID compression
#nopredictor1 #Do not accept or agree to Predictor-1 compres.
persist #If the link goes down, keep retrying to connect
# Read pppd(8) for more information.
# Read /usr/local/wanrouter/PPP-HOWTO for more info.
"
get_integer "Please specify the Baud Rate in bps" "38400" "64" "4096000" "device_setup_help get_baudrate"
BAUDRATE=$($GET_RC)
PPPD_CALL="
#------------------------------------------------
# PPPD Call ASYNC Script
#------------------------------------------------
# This call script will call /etc/ppp/options.ttyWP$TTY_MINOR
# to setup the PPPD dameon.
#
# It will start PPPD ASYNC protocol.
#
# Created automatically by /usr/local/wanrouter/wancfg
# Date: `date`
#
ttyWP$TTY_MINOR #Bind to WANPIPE device wanpipe$DEVICE_NUM
$BAUDRATE #Baud rate of the PPP link
connect '/etc/ppp/redialer'
"
if [ $MULTILINK = YES ]; then
PPPD_CALL=$PPPD_CALL"
multilink #Enable Multilink Protocol
"
if [ $MULTILINK_MODE = SLAVE ]; then
PPPD_CALL=$PPPD_CALL"
noip #No IP addresses for a slave
"
fi
fi
fi
return 0;
}
function create_multilink_ppp_linux_cfg() {
if [ ! -e "/dev/ttyWP$TTY_MINOR" ]; then
warning "CREATE_TTYDEV"
if [ $? -eq 0 ]; then
eval "mknod -m 666 /dev/ttyWP$TTY_MINOR c 240 $TTY_MINOR 2> /dev/null"
if [ $? -eq 0 ]; then
error "CREATE_TTYOK"
else
error "CREATE_TTYFAIL"
fi
fi
fi
warning "CREATE_PPPDOPT"
if [ $? -eq 0 ]; then
if [ -f "/etc/ppp/options.ttyWP$TTY_MINOR" ]; then
mv /etc/ppp/options.ttyWP$TTY_MINOR /etc/ppp/options.ttyWP$TTY_MINOR.old
fi
if [ "$TTY_MODE" = Sync ] || [ $PROTOCOL = WAN_ADSL ]; then
init_pppd_scripts
if [ $? -eq 0 ]; then
echo "$PPPD_OPTION" > /etc/ppp/options.ttyWP$TTY_MINOR
echo "$PPPD_CALL" > /etc/ppp/peers/isp_wanpipe$DEVICE_NUM
fi
else
eval "$PPPCONFIG --ttyport /dev/ttyWP$TTY_MINOR --provider isp_wanpipe$DEVICE_NUM"
fi
error "CREATE_PPPDOK"
fi
}
#################################################################
######## F R E E B S D / O P E N B S D #########
#################################################################
MPD_CONF_DIR="/usr/local/etc/mpd"
MPD_CONF="mpd.conf"
MPD_LINKS="mpd.links"
MPD_SECRET="mpd.secret"
MPD_SCRIPT="mpd.script"
# Function: parse_mpd_conf_file
# $1 - bundle name
# $2 - link name
# $3 - auto bundle loading (YES|NO)
function parse_mpd_conf_file() {
local bundle_config=$1_config
local bundle_configured=0
local bundle_configuring=0
local new_cmd_bundle=0
local set_iface_addr_cmd=0
local lip
local rip
if [ ! -f $MPD_CONF_DIR/$MPD_CONF ]; then
cat << EOM >> $MPD_CONF_DIR/$MPD_CONF
#################################################################
#
# MPD configuration file
#
# This file defines the configuration for mpd: what the
# bundles are, what the links are in those bundles, how
# the interface should be configured, various PPP parameters,
# etc. It contains commands just as you would type them
# in at the console. A blank line ends an entry. Lines
# starting with a "#" are comments and get completely
# ignored.
#
# $Id: mlinkppp_lib.sh,v 1.2 2004-01-28 17:14:48 sangoma Exp $
#
#################################################################
EOM
fi
while read line
do
if [ $bundle_configuring -eq 0 ]; then
if [ "$line" = "$bundle_config:" ]; then
# Bundle already configured
bundle_configured=1
bundle_configuring=1
echo "$line" >> tmp.$$
else
cmd=`echo $line | cut -d' ' -f1`
case $cmd in
[#]*)
echo "$line" >> tmp.$$
;;
[a-zA-Z0-9]*:)
echo "$line" >> tmp.$$
;;
*)
echo " $line" >> tmp.$$
;;
esac
fi
else
cmd=`echo $line | cut -d' ' -f1`
case $cmd in
[#]*)
echo "$line" >> tmp.$$
;;
[a-zA-Z0-9]*:)
# End of bundle configuration
bundle_configuring=0
echo " $line" >> tmp.$$
;;
new*)
new_cmd_bundle=1
line1=${line/$2/""}
if [ "$line1" = "$line" ]; then
echo " $line $2" >> tmp.$$
else
echo " $line" >> tmp.$$
fi
;;
*)
echo " $line" >> tmp.$$
;;
esac
fi
done < $MPD_CONF_DIR/$MPD_CONF
if [ $bundle_configured -eq 0 ]; then
get_string "Please specify the Local IP Address for the Bundle $1" "" "IP_ADDR"
lip=$($GET_RC)
get_string "Please specify the Point-to-Point IP Address for the Bundle $1" "" "IP_ADDR"
rip=$($GET_RC)
cat << EOM >> tmp.$$
$bundle_config:
new $1 $2
set iface addrs $lip $rip
open iface
EOM
fi
mv tmp.$$ $MPD_CONF_DIR/$MPD_CONF
}
# Function: parse_mpd_links_file
# $1 - link name
# $2 - device number
function parse_mpd_links_file() {
local nodename=wanpipe$2
local link_configured=0
local link_configuring=0
if [ ! -f $MPD_CONF_DIR/$MPD_LINKS ]; then
cat << EOM > $MPD_CONF_DIR/$MPD_LINKS
#################################################################
#
# MPD links file
#
# In this file you define the various "links" that comprise
# a bundle. Each link corresponds to a single serial device.
# These are commands that could be typed into the console directly.
#
# This file should only contain configuration for a link if
# that configuration is specific to that particular link. That
# is, things like device name and bandwidth. Other generic link
# options like LCP parameters belong in "mpd.conf".
#
# The first command for each link should be "set link type ..."
#
# $Id: mlinkppp_lib.sh,v 1.2 2004-01-28 17:14:48 sangoma Exp $
#
#################################################################
EOM
fi
while read line
do
if [ $link_configuring -eq 0 ]; then
if [ "$line" = "$1:" ]; then
# Bundle already configured
link_configured=1
link_configuring=1
echo "$line" >> tmp.$$
else
cmd=`echo $line | cut -d' ' -f1`
case $cmd in
[#]*)
echo "$line" >> tmp.$$
;;
[a-zA-Z0-9]*:)
echo "$line" >> tmp.$$
;;
*)
echo " $line" >> tmp.$$
;;
esac
fi
else
cmd=`echo $line | cut -d' ' -f1`
case $cmd in
[#]*)
echo "$line" >> tmp.$$
;;
[a-zA-Z0-9]*:)
# End of links configuration
link_configuring=0
echo "$line" >> tmp.$$
;;
*)
line1=${line#set[ ]*ng[ ]*node[ ]*}
if [ "$line1" != "$line" ]; then
line2=${line1/$nodename:/""}
if [ "$line1" = "$line2" ]; then
echo " set ng node $nodename:" >> tmp.$$
else
echo " $line" >> tmp.$$
fi
else
echo " $line" >> tmp.$$
fi
esac
fi
done < $MPD_CONF_DIR/$MPD_LINKS
if [ $link_configured -eq 0 ]; then
cat << EOM >> tmp.$$
$1:
set link type ng
set ng node $nodename:
set ng hook rawdata
EOM
fi
mv tmp.$$ $MPD_CONF_DIR/$MPD_LINKS
}
# Function: create_multilink_ppp_bsd_cfg
# $1 - device number
function create_multilink_ppp_bsd_cfg() {
local auto_bundle_load
local bundle_name
local link_name
local lip
local rip
get_string "Please specify the MPD configuration directory" "$MPD_CONF_DIR"
MPD_CONF_DIR=$($GET_RC)
# Make current bundle default
#warning mlinkppp_bundle
#if [ $? -eq 0 ]; then
# auto_bundle_load=YES
#else
# auto_bundle_load=NO
#fi
get_string "Please specify Bundle Name" ""
bundle_name=$($GET_RC)
get_string "Please specify Link Name" ""
link_name=$($GET_RC)
parse_mpd_conf_file $bundle_name $link_name $auto_bundle_load
parse_mpd_links_file $link_name $1
# Create security file
return 0
}
function create_multilink_ppp_cfg() {
local err
if [ $OS_SYSTEM = "Linux" ]; then
create_multilink_ppp_linux_cfg $1
elif [ $OS_SYSTEM = "FreeBSD" ]; then
create_multilink_ppp_bsd_cfg $1
fi
return 0
}

View File

@ -0,0 +1,271 @@
#!/bin/sh
function ppp_interface_setup () {
local rc
local num="$1"
local choice
local menu_options
local menu_size
if [ -z "${MULTICAST[$num]}" ]; then
MULTICAST[$num]=NO
fi
if [ -z "${IPX[$num]}" ]; then
IPX[$num]=NO
fi
if [ -z "${PAP[$num]}" ]; then
PAP[$num]=NO
fi
if [ -z "${CHAP[$num]}" ]; then
CHAP[$num]=NO
fi
echo "'get_multicast' 'MULTICAST---> ${MULTICAST[$num]}' \\" > ppp_opt_temp.$$
echo "'get_pap' 'PAP --------> ${PAP[$num]}' \\" >> ppp_opt_temp.$$
echo "'get_chap' 'CHAP--------> ${CHAP[$num]}' \\" >> ppp_opt_temp.$$
echo "'get_ipx' 'IPX -------> ${IPX[$num]}' \\" >> ppp_opt_temp.$$
menu_size=4
if [ ${IPX[$num]} = YES ]; then
echo "'get_network' 'NETWORK ----> ${NETWORK[$num]}' \\" >> ppp_opt_temp.$$
menu_size=$((menu_size+1))
fi
if [ ${PAP[$num]} = YES -o ${CHAP[$num]} = YES ]; then
echo "'get_userid' 'USERID -----> ${USERID[$num]}' \\" >> ppp_opt_temp.$$
echo "'get_passwd' 'PASSWD -----> ${PASSWD[$num]}' \\" >> ppp_opt_temp.$$
echo "'get_sysname' 'SYSNAME ----> ${SYSNAME[$num]}'\\" >> ppp_opt_temp.$$
menu_size=$((menu_size+3))
fi
echo " 2> $MENU_TMP" >> ppp_opt_temp.$$
menu_options=`cat ppp_opt_temp.$$`
rm -f ppp_opt_temp.$$
menu_instr="Please configure ${IF_NAME[$num]} Interface \
"
menu_name "PPP ${IF_NAME[$num]} Setup" "$menu_options" "$menu_size" "$menu_instr" "$BACK" 20
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) case $choice in
get_network)
get_string "Please specify you IPX Network Number" "0xABCDEFAB"
NETWORK[$num]=$($GET_RC)
;;
get_userid)
get_string "Please specify you User Id"
USERID[$num]=$($GET_RC)
;;
get_passwd)
get_string "Please specify you Password"
PASSWD[$num]=$($GET_RC)
;;
get_sysname)
get_string "Please specify you System Name"
SYSNAME[$num]=$($GET_RC)
;;
*)
$choice "$num" #Choice is a command
;;
esac
return 0
;;
2) choice=${choice%\"*\"}
choice=${choice// /}
interface_setup_help $choice
return 0
;;
*) return 1
;;
esac
}
function get_ipmode () {
local menu_options
local rc
local choice
menu_options="'STATIC' 'Static IP addressing, STATIC(default)' \
'HOST' 'Host IP addressing, HOST' \
'PEER' 'Dynamic IP addressing, PEER' 2> $MENU_TMP"
menu_instr="Please select PPP IP Addressing Mode \
"
menu_name "${IF_NAME[$num]} IP Mode Configuration" "$menu_options" 3 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) IPMODE=$choice #Choice is a command
return 0
;;
2) device_setup_help "get_ipmode"
get_ipmode
;;
*) return 1
;;
esac
}
function get_ipx () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'NO' 'Disable IPX (Default)' \
'YES' 'Enable IPX' 2> $MENU_TMP"
menu_instr="Please Enable or Disable IPX Routing \
"
menu_name "${IF_NAME[$num]} IPX Configuration" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) IPX[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_ipx"
get_ipx "$1"
;;
*) return 1
;;
esac
}
function get_pap () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'NO' 'Disable PAP (Default)' \
'YES' 'Enable PAP' 2> $MENU_TMP"
menu_instr="Please Enable or Disable PAP Auth. Protocol \
"
menu_name "PAP Configuration" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0)
PAP[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_pap"
get_pap $num
;;
*) return 1
;;
esac
}
function get_chap () {
local menu_options
local rc
local choice
local num=$1;
menu_options="'NO' 'Disable CHAP (Default)' \
'YES' 'Enable CHAP' 2> $MENU_TMP"
menu_instr="Please Enable or Disable CHAP Auth. Protocol \
"
menu_name "CHAP Configuration" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0)
CHAP[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_chap"
get_chap $num
;;
*) return 1
;;
esac
}
function get_ppp_chdlc_mode ()
{
local menu_options
local rc
local choice
local num=$1;
local menu_size=2
if [ $PROTOCOL = WAN_AFT ]; then
if [ $OS_SYSTEM = "Linux" ]; then
menu_options="'MP_FR' 'Frame Relay Protocol (Default)' \
'MP_PPP' 'PPP Protocol' \
'MP_CHDLC' 'Cisco HDLC Protocol' \
'HDLC' 'RAW HDLC Protocol' 2> $MENU_TMP"
menu_size=4
else
menu_options="'MP_CHDLC' 'Cisco HDLC Protocol (Default)' \
'MP_PPP' 'PPP Protocol' 2> $MENU_TMP"
menu_size=2
fi
elif [ $PROTOCOL = WAN_BITSTRM ]; then
menu_options="'HDLC' 'RAW HDLC Protocol (Default)' \
'MP_PPP' 'PPP Protocol' \
'MP_CHDLC' 'Cisco HDLC Protocol' 2> $MENU_TMP"
menu_size=3
else
menu_options="'MP_PPP' 'PPP Protocol (Default)' \
'MP_CHDLC' 'Cisco HDLC Protocol' 2> $MENU_TMP"
fi
menu_instr="Please Select MultiPort Protocol \
"
menu_name "${IF_NAME[$num]} MultiPort Protocol Configuration" "$menu_options" $menu_size "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) MPPP_PROT[$num]=$choice #Choice is a command
return 0
;;
2) interface_setup_help "get_ppp_chdlc_mode"
get_ppp_chdlc_mode "$1"
;;
*) return 1
;;
esac
}

View File

@ -0,0 +1,258 @@
function ss7_interface_init () {
LINE_CONFIG_OPTIONS=${LINE_CONFIG_OPTIONS:-0x0001}
MODEM_CONFIG_OPTIONS=${MODEM_CONFIG_OPTIONS:-0x0000}
MODEM_STATUS_TIMER=${MODEM_STATUS_TIMER:-500}
API_OPTIONS=${API_OPTIONS:-0x0000}
PROTOCOL_OPTIONS=${PROTOCOL_OPTIONS:-0x0000}
PROTOCOL_SPECIFICATION=${PROTOCOL_SPECIFICATION:-ANSI}
STATS_HISTORY_OPTIONS=${STATS_HISTORY_OPTIONS:-0x001F}
MAX_LENGTH_MSU_SIF=${MAX_LENGTH_MSU_SIF:-272}
MAX_UNACKED_TX_MSUS=${MAX_UNACKED_TX_MSUS:-10}
LINK_INACTIVITY_TIMER=${LINK_INACTIVITY_TIMER:-5}
T1_TIMER=${T1_TIMER:-1300}
T2_TIMER=${T2_TIMER:-1150}
T3_TIMER=${T3_TIMER:-1150}
T4_TIMER_EMERGENCY=${T4_TIMER_EMERGENCY:-60}
T4_TIMER_NORMAL=${T4_TIMER_NORMAL:-230}
T5_TIMER=${T5_TIMER:-10}
T6_TIMER=${T6_TIMER:-400}
T7_TIMER=${T7_TIMER:-100}
T8_TIMER=${T8_TIMER:-100}
N1=${N1:-1}
N2=${N2:-2}
TIN=${TIN:-10}
TIE=${TIE:-11}
SUERM_ERROR_THRESHOLD=${SUERM_ERROR_THRESHOLD:-20}
SUERM_NUMBER_OCTETS=${SUERM_NUMBER_OCTETS:-21}
SUERM_NUMBER_SUS=${SUERM_NUMBER_SUS:-1024}
SIE_INTERVAL_TIMER=${SIE_INTERVAL_TIMER:-30}
SIO_INTERVAL_TIMER=${SIO_INTERVAL_TIMER:-31}
SIOS_INTERVAL_TIMER=${SIOS_INTERVAL_TIMER:-32}
FISU_INTERVAL_TIMER=${FISU_INTERVAL_TIMER:-33}
}
function ss7_interface_setup () {
local rc
local num="$1"
local choice
local menu_options
ss7_interface_init $num
menu_options="'get_LINE_CONFIG_OPTIONS' 'Line Config --------> $LINE_CONFIG_OPTIONS' \
'get_MODEM_CONFIG_OPTION' 'Modem Config -------> $MODEM_CONFIG_OPTIONS' \
'get_MODEM_STATUS_TIMER' 'Modem Status Timer -> $MODEM_STATUS_TIMER' \
'get_API_OPTIONS' 'Api Options --------> $API_OPTIONS' \
'get_PROTOCOL_OPTIONS' 'Protocol Options ---> $PROTOCOL_OPTIONS' \
'get_ss7_signal' 'Protocol Spec. -----> $PROTOCOL_SPECIFICATION' \
'get_STATS_HISTORY' 'Status History -----> $STATS_HISTORY_OPTIONS' \
'get_MAX_LENGTH_MSU_SIF' 'Max MSU SIF Length -> $MAX_LENGTH_MSU_SIF' \
'get_MAX_UNACKED_TX_MSUS' 'Max Unacked Tx MSU -> $MAX_UNACKED_TX_MSUS' \
'get_LINK_INACT_TIMER' 'Link Inact. Timer --> $LINK_INACTIVITY_TIMER' \
'get_T1_TIMER' 'T1 Timer -----------> $T1_TIMER' \
'get_T2_TIMER' 'T2 Timer -----------> $T2_TIMER' \
'get_T3_TIMER' 'T3 Timer -----------> $T3_TIMER' \
'get_T4_TIMER_EMERG' 'T4 Timer Emergency -> $T4_TIMER_EMERGENCY' \
'get_T4_TIMER_NORMAL' 'T4 Timer Normal ----> $T4_TIMER_NORMAL' \
'get_T5_TIMER' 'T5 Timer -----------> $T5_TIMER' \
'get_T6_TIMER' 'T6 Timer -----------> $T6_TIMER' \
'get_T7_TIMER' 'T7 Timer -----------> $T7_TIMER' \
'get_T8_TIMER' 'T8 Timer -----------> $T8_TIMER' \
'get_N1' 'N1 -----------------> $N1' \
'get_N2' 'N2 -----------------> $N2' \
'get_TIN' 'TIN ----------------> $TIN' \
'get_TIE' 'TIE ----------------> $TIE' \
'get_SUERM_ERROR_THR' 'Suerm Err Thresh. --> $SUERM_ERROR_THRESHOLD' \
'get_SUERM_NUMBER_OCTETS' 'Suerm Num Octects --> $SUERM_NUMBER_OCTETS' \
'get_SUERM_NUMBER_SUS' 'Suerm Num Sus ------> $SUERM_NUMBER_SUS' \
'get_SIE_INTERVAL_TIMER' 'Sie Interval Timer -> $SIE_INTERVAL_TIMER' \
'get_SIO_INTERVAL_TIMER' 'Sio Interval Timer -> $SIO_INTERVAL_TIMER' \
'get_SIOS_INTERVAL_TIMER' 'Sios Interv. Timer -> $SIOS_INTERVAL_TIMER' \
'get_FISU_INTERVAL_TIMER' 'Fisu Interv. Timer -> $FISU_INTERVAL_TIMER' 2> $MENU_TMP"
menu_instr="Please specify the ${IF_NAME[$num]}: SS7 protocol parameters below\
"
menu_name "SS7 ${IF_NAME[$num]} PROTOCOL SETUP" "$menu_options" 12 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) case $choice in
get_LINE_CONFIG_OPTIONS)
get_string "Please specify Line Config Options" "$LINE_CONFIG_OPTIONS"
LINE_CONFIG_OPTIONS=$($GET_RC)
;;
get_MODEM_CONFIG_OPTION)
get_string "Please specify MODEM_CONFIG_OPTIONS" "$MODEM_CONFIG_OPTIONS"
MODEM_CONFIG_OPTIONS=$($GET_RC)
;;
get_MODEM_STATUS_TIMER)
get_string "Please specify MODEM_STATUS_TIMER" "$MODEM_STATUS_TIMER"
MODEM_STATUS_TIMER=$($GET_RC)
;;
get_API_OPTIONS)
get_string "Please specify API_OPTIONS" "$API_OPTIONS"
API_OPTIONS=$($GET_RC)
;;
get_PROTOCOL_OPTIONS)
get_string "Please specify PROTOCOL_OPTIONS" "$PROTOCOL_OPTIONS"
PROTOCOL_OPTIONS=$($GET_RC)
;;
get_STATS_HISTORY)
get_string "Please specify STATS_HISTORY_OPTIONS" "$STATS_HISTORY_OPTIONS"
STATS_HISTORY_OPTIONS=$($GET_RC)
;;
get_MAX_LENGTH_MSU_SIF)
get_string "Please specify MAX_LENGTH_MSU_SIF" "$MAX_LENGTH_MSU_SIF"
MAX_LENGTH_MSU_SIF=$($GET_RC)
;;
get_MAX_UNACKED_TX_MSUS)
get_string "Please specify MAX_UNACKED_TX_MSUS" "$MAX_UNACKED_TX_MSUS"
MAX_UNACKED_TX_MSUS=$($GET_RC)
;;
get_LINK_INACT_TIMER)
get_string "Please specify LINK_INACTIVITY_TIMER" "$LINK_INACTIVITY_TIMER"
LINK_INACTIVITY_TIMER=$($GET_RC)
;;
get_T1_TIMER)
get_string "Please specify T1_TIMER" "$T1_TIMER"
T1_TIMER=$($GET_RC)
;;
get_T2_TIMER)
get_string "Please specify T2_TIMER" "$T2_TIMER"
T2_TIMER=$($GET_RC)
;;
get_T3_TIMER)
get_string "Please specify T3_TIMER" "$T3_TIMER"
T3_TIMER=$($GET_RC)
;;
get_T4_TIMER_EMERG)
get_string "Please specify T4_TIMER_EMERGENCY" "$T4_TIMER_EMERGENCY"
T4_TIMER_EMERGENCY=$($GET_RC)
;;
get_T4_TIMER_NORMAL)
get_string "Please specify T4_TIMER_NORMAL" "$T4_TIMER_NORMAL"
T4_TIMER_NORMAL=$($GET_RC)
;;
get_T5_TIMER)
get_string "Please specify T5_TIMER" "$T5_TIMER"
T5_TIMER=$($GET_RC)
;;
get_T6_TIMER)
get_string "Please specify T6_TIMER" "$T6_TIMER"
T6_TIMER=$($GET_RC)
;;
get_T7_TIMER)
get_string "Please specify T7_TIMER" "$T7_TIMER"
T7_TIMER=$($GET_RC)
;;
get_T8_TIMER)
get_string "Please specify T8_TIMER" "$T8_TIMER"
T8_TIMER=$($GET_RC)
;;
get_N1)
get_string "Please specify N1" "$N1"
N1=$($GET_RC)
;;
get_N2)
get_string "Please specify N2" "$N2"
N2=$($GET_RC)
;;
get_TIN)
get_string "Please specify TIN" "$TIN"
TIN=$($GET_RC)
;;
get_TIE)
get_string "Please specify TIE" "$TIE"
TIE=$($GET_RC)
;;
get_SUERM_ERROR_THR)
get_string "Please specify SUERM_ERROR_THRESHOLD" "$SUERM_ERROR_THRESHOLD"
SUERM_ERROR_THRESHOLD=$($GET_RC)
;;
get_SUERM_NUMBER_OCTETS)
get_string "Please specify SUERM_NUMBER_OCTETS" "$SUERM_NUMBER_OCTETS"
SUERM_NUMBER_OCTETS=$($GET_RC)
;;
get_SUERM_NUMBER_SUS)
get_string "Please specify SUERM_NUMBER_SUS" "$SUERM_NUMBER_SUS"
SUERM_NUMBER_SUS=$($GET_RC)
;;
get_SIE_INTERVAL_TIMER)
get_string "Please specify SIE_INTERVAL_TIMER" "$SIE_INTERVAL_TIMER"
SIE_INTERVAL_TIMER=$($GET_RC)
;;
get_SIO_INTERVAL_TIMER)
get_string "Please specify SIO_INTERVAL_TIMER" "$SIO_INTERVAL_TIMER"
SIO_INTERVAL_TIMER=$($GET_RC)
;;
get_SIOS_INTERVAL_TIMER)
get_string "Please specify SIOS_INTERVAL_TIMER" "$SIOS_INTERVAL_TIMER"
SIOS_INTERVAL_TIMER=$($GET_RC)
;;
get_FISU_INTERVAL_TIMER)
get_string "Please specify FISU_INTERVAL_TIMER" "$FISU_INTERVAL_TIMER"
FISU_INTERVAL_TIMER=$($GET_RC)
;;
*)
$choice #Choice is a command
;;
esac
return 0
;;
2) choice=${choice%\"*\"}
choice=${choice// /}
interface_setup_help $choice
return 0
;;
*)
return 1
;;
esac
}
function get_ss7_signal () {
local menu_options
local rc
local choice
menu_options="'ANSI' 'ANSI' \
'ITU' 'ITU' \
'NTT' 'NTT' 2> $MENU_TMP"
menu_instr="Please specify SS7 Signalling \
"
menu_name "SS7 SIGNALLING CONFIGURATION" "$menu_options" 4 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) PROTOCOL_SPECIFICATION=$choice #Choice is a command
return 0
;;
2)
device_setup_help "get_ss7_signal"
get_ss7_signal
;;
*) return 1
;;
esac
}

View File

@ -0,0 +1,252 @@
#!/bin/sh
function x25_interface_setup () {
local rc
local num="$1"
local choice
local menu_options
IDLE_TIMEOUT[$num]=${IDLE_TIMEOUT[$num]:-90}
HOLD_TIMEOUT[$num]=${HOLD_TIMEOUT[$num]:-10}
SRC_ADDR[$num]=${SRC_ADDR[$num]}
menu_options="'get_idle_timeout' 'Idle Timeout -------> ${IDLE_TIMEOUT[$num]}' \
'get_hold_timeout' 'Hold Timeout -------> ${HOLD_TIMEOUT[$num]}' 2> $MENU_TMP"
menu_size=2
menu_instr="Please configure ${IF_NAME[$num]}: X25 parameters below"
menu_name "${IF_NAME[$num]}: X25 PROTOCOL SETUP" "$menu_options" "$menu_size" "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) if [ $choice = get_idle_timeout ]; then
get_integer "Please specify x25 idle timeout" "90" "1" "500"
IDLE_TIMEOUT[$num]=$($GET_RC)
fi
if [ $choice = get_hold_timeout ]; then
get_integer "Please specify x25 hold timeout" "10" "1" "500"
HOLD_TIMEOUT[$num]=$($GET_RC)
fi
return 0
;;
2) choice=${choice%\"*\"}
choice=${choice// /}
interface_setup_help $choice
return 0
;;
*)
return 1
;;
esac
}
function get_hdlc_station () {
local menu_options
local rc
local choice
menu_options="'DTE' 'DTE' \
'DCE' 'DCE' 2> $MENU_TMP"
menu_instr="Please specify the X25 Station Type \
"
menu_name "X25 STATION SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) STATION=$choice #Choice is a command
return 0
;;
2)
device_setup_help "get_hdlc_station"
get_hdlc_station
;;
*) return 1
;;
esac
}
function get_ccitt () {
local menu_options
local rc
local choice
menu_options="'1988' '1988 (Default)' \
'1984' '1984' \
'1980' '1980' 2> $MENU_TMP"
menu_instr="Please specify the X25 CCITT Compatibility \
"
menu_name "X25 CCITT SETUP" "$menu_options" 3 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) CCITT=$choice #Choice is a command
return 0
;;
2)
device_setup_help "get_ccitt"
get_ccitt
;;
*) return 1
;;
esac
}
function get_hdlc_only () {
local menu_options
local rc
local choice
menu_options="'NO' 'Full X25/HDLC Support (Default)' \
'YES' 'LAPB HDLC Support Only' 2> $MENU_TMP"
menu_instr="Please select the desired protocol level\
"
menu_name "X25 PROTOCOL SELECTION" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) LAPB_HDLC_ONLY=$choice #Choice is a command
return 0
;;
2)
device_setup_help "get_hdlc_only"
get_hdlc_only
;;
*) return 1
;;
esac
}
function get_logging () {
local menu_options
local rc
local choice
menu_options="'YES' 'Enable Channel Setup Logging (Default)' \
'NO' 'Disable Logging' 2> $MENU_TMP"
menu_instr="Please enable or disable channel setup logging \
"
menu_name "X25 CHANNEL SETUP LOGGING" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) CALL_LOGGING=$choice #Choice is a command
return 0
;;
2)
device_setup_help "get_logging"
get_logging
;;
*) return 1
;;
esac
}
function get_oob_modem () {
local menu_options
local rc
local choice
menu_options="'NO' 'Disable modem status OOB messages (Default)' \
'YES' 'Enable modem status OOB messages' 2> $MENU_TMP"
menu_instr="Please enable or disable modem status messaging \
"
menu_name "X25 OOB MODEM MSG SETUP" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) OOB_ON_MODEM=$choice #Choice is a command
return 0
;;
2)
device_setup_help "get_oob_modem"
get_oob_modem
;;
*) return 1
;;
esac
}
function get_channel_type () {
local num=$1
local menu_options
local rc
local choice
menu_options="'SVC' 'SVC Link (Default)' \
'PVC' 'PVC Link' 2> $MENU_TMP"
menu_instr="Please specify the channel type\
"
menu_name "X25 CHANNEL TYPE" "$menu_options" 2 "$menu_instr" "$BACK"
rc=$?
choice=`cat $MENU_TMP`
rm -f $MENU_TMP
case $rc in
0) CH_TYPE[$num]=$choice #Choice is a command
return 0
;;
2)
interface_menu_help "get_channel_type"
get_channel_type $num
;;
*) return 1
;;
esac
}

View File

@ -0,0 +1,50 @@
#!/bin/sh
OSYSTEM=`uname -s`
RELEASE=`uname -r`
if [ $OSYSTEM = "Linux" ]; then
MODULE_STAT=lsmod
WAN_DRIVERS="wan_aften"
MODULE_LOAD=modprobe
MODULE_UNLOAD="modprobe -r"
WAN_AFTEN_DRV="wan_aften"
elif [ $OSYSTEM = "FreeBSD" ]; then
major_ver=${RELEASE%%.*}
MODULE_STAT=kldstat
MODULE_LOAD=kldload
MODULE_UNLOAD=kldunload
if [ "$major_ver" = "5" ]; then
MODULE_DIR=/boot/modules
else
MODULE_DIR=/modules
fi
WAN_AFTEN_DRV="wan_aften"
elif [ $OSYSTEM = "OpenBSD" ]; then
MODULE_STAT=modstat
MODULE_LOAD=modload
MODULE_UNLOAD=modunload
MODULE_DIR=/usr/lkm
WAN_AFTEN_DRV="wan_aften"
elif [ $OSYSTEM = "NetBSD" ]; then
MODULE_STAT=modstat
MODULE_LOAD=modload
MODULE_UNLOAD=modunload
MODULE_DIR=/usr/lkm
WAN_AFTEN_DRV="wan_aften"
fi
if [ $OSYSTEM = "Linux" ]; then
echo "$MODULE_LOAD $WAN_AFTEN_DRV > /dev/null"
$MODULE_LOAD $WAN_AFTEN_DRV > /dev/null
err=$?
elif [ $OSYSTEM = "FreeBSD" ]; then
err=`$MODULE_LOAD ${WAN_AFTEN_DRV} >/dev/null`
elif [ $OSYSTEM = "OpenBSD" -o $OSYSTEM = "NetBSD" ]; then
err=`$MODULE_LOAD -o $MODULE_DIR/${WAN_AFTEN_DRV}1.out -e${WAN_AFTEN_DRV} $MODULE_DIR/${WAN_AFTEN_DRV}.o 1> /dev/null`
fi
echo "AFT card enabled"
#ifconfig whdlc0 up
exit $err

View File

@ -0,0 +1,49 @@
#!/bin/sh
CMD=$1
OSYSTEM=`uname -s`
RELEASE=`uname -r`
if [ $OSYSTEM = "Linux" ]; then
MODULE_STAT=lsmod
WAN_DRIVERS="wan_aften"
MODULE_LOAD=modprobe
MODULE_UNLOAD="modprobe -r"
WAN_AFTEN_DRV="wan_aften"
elif [ $OSYSTEM = "FreeBSD" ]; then
major_ver=${RELEASE%%.*}
MODULE_STAT=kldstat
MODULE_LOAD=kldload
MODULE_UNLOAD=kldunload
if [ "$major_ver" = "5" ]; then
MODULE_DIR=/boot/modules
else
MODULE_DIR=/modules
fi
WAN_AFTEN_DRV="wan_aften"
elif [ $OSYSTEM = "OpenBSD" ]; then
MODULE_STAT=modstat
MODULE_LOAD=modload
MODULE_UNLOAD=modunload
MODULE_DIR=/usr/lkm
WAN_AFTEN_DRV="wan_aften"
elif [ $OSYSTEM = "NetBSD" ]; then
MODULE_STAT=modstat
MODULE_LOAD=modload
MODULE_UNLOAD=modunload
MODULE_DIR=/usr/lkm
WAN_AFTEN_DRV="wan_aften"
fi
#ifconfig whdlc0 down
if [ $OSYSTEM = "OpenBSD" -o $OSYSTEM = "NetBSD" ]; then
\rm -rf $MODULE_DIR/${WAN_AFTEN_DRV}.out
err=`$MODULE_UNLOAD -n ${WAN_AFTEN_DRV} 2> /dev/null`
else
echo "$MODULE_UNLOAD ${WAN_AFTEN_DRV}"
err=`$MODULE_UNLOAD ${WAN_AFTEN_DRV} 2> /dev/null`
fi
echo "AFT card disabled"
exit $err

View File

@ -0,0 +1,35 @@
#!/bin/sh
cmd=$1;
if [ ! -e wan_aftup ]; then
eval "make clean > /dev/null"
eval "make > /dev/null"
fi
if [ -e /proc/net/wanrouter ]; then
echo
echo "Warning: Wanpipe modules loaded"
echo " Please remove wanpipe modules from the kernel"
echo
echo " eg: wanrouter stop"
echo
exit 1
fi
trap '' 2
eval "./scripts/load.sh"
if [ "$cmd" == "auto" ]; then
eval "./wan_aftup -auto"
else
eval "./wan_aftup "
fi
eval "./scripts/unload.sh"

Binary file not shown.

View File

@ -0,0 +1,675 @@
#class A10u
#for A101/2/u/c series cards
package A10u;
use Card;
use strict;
#constructor
sub new {
my ($class) = @_;
my $self = {
_is_tdm_api => undef,
_card => undef,
_fe_line => undef,
_fe_media => 'T1',
_fe_lcode => 'B8ZS',
_fe_frame => 'ESF',
_fe_clock => 'NORMAL',
_te_sig_mode => undef,
_te_ref_clock => '0',
_signalling => 'PRI_CPE',
_pri_switchtype => 'national',
_rx_slevel => '360',
_hw_dchan => '0',
_frac_chanfirst => '0',
_frac_chanlast => '0',
_ss7_sigchan => undef,
_ss7_option => undef,
_ss7_tdmchan => undef,
_ss7_subinterface => undef,
_ss7_tdminterface => undef,
_smg_sig_mode => '1',
_old_a10u => undef,
};
bless $self, $class;
return $self;
}
sub card {
my ( $self, $card ) = @_;
$self->{_card} = $card if defined($card);
return $self->{_card};
}
sub fe_line {
my ( $self, $fe_line ) = @_;
$self->{_fe_line} = $fe_line if defined($fe_line);
return $self->{_fe_line};
}
sub frac_chan_first {
my ( $self, $frac_chan_first ) = @_;
$self->{_frac_chan_first} = $frac_chan_first if defined($frac_chan_first);
return $self->{_frac_chan_first};
}
sub frac_chan_last {
my ( $self, $frac_chan_last ) = @_;
$self->{_frac_chan_last} = $frac_chan_last if defined($frac_chan_last);
return $self->{_frac_chan_last};
}
sub te_ref_clock {
my ( $self, $te_ref_clock ) = @_;
$self->{_te_ref_clock} = $te_ref_clock if defined($te_ref_clock);
return $self->{_te_ref_clock};
}
sub signalling {
my ( $self, $signalling ) = @_;
$self->{_signalling} = $signalling if defined($signalling);
return $self->{_signalling};
}
sub hw_dchan {
my ( $self, $hw_dchan ) = @_;
$self->{_hw_dchan} = $hw_dchan if defined($hw_dchan);
return $self->{_hw_dchan};
}
sub fe_media {
my ( $self, $fe_media ) = @_;
$self->{_fe_media} = $fe_media if defined($fe_media);
return $self->{_fe_media};
}
sub fe_lcode {
my ( $self, $fe_lcode) = @_;
$self->{_fe_lcode} = $fe_lcode if defined($fe_lcode);
return $self->{_fe_lcode};
}
sub te_sig_mode {
my ( $self, $te_sig_mode ) = @_;
$self->{_te_sig_mode} = $te_sig_mode if defined($te_sig_mode);
return $self->{_te_sig_mode};
}
sub fe_frame {
my ( $self, $fe_frame ) = @_;
$self->{_fe_frame} = $fe_frame if defined($fe_frame);
return $self->{_fe_frame};
}
sub fe_clock {
my ( $self, $fe_clock ) = @_;
$self->{_fe_clock} = $fe_clock if defined($fe_clock);
return $self->{_fe_clock};
}
sub pri_switchtype {
my ( $self, $pri_switchtype ) = @_;
$self->{_pri_switchtype} = $pri_switchtype if defined($pri_switchtype);
return $self->{_pri_switchtype};
}
sub ss7_option {
my ( $self, $ss7_option ) = @_;
$self->{_ss7_option} = $ss7_option if defined($ss7_option);
return $self->{_ss7_option};
}
sub ss7_sigchan {
my ( $self, $ss7_sigchan ) = @_;
$self->{_ss7_sigchan} = $ss7_sigchan if defined($ss7_sigchan);
return $self->{_ss7_sigchan};
}
sub ss7_tdmchan {
my ( $self, $ss7_tdmchan ) = @_;
$self->{_ss7_tdmchan} = $ss7_tdmchan if defined($ss7_tdmchan);
return $self->{_ss7_tdmchan};
}
sub ss7_subinterface {
my ( $self, $ss7_subinterface ) = @_;
$self->{_ss7_subinterface} = $ss7_subinterface if defined($ss7_subinterface);
return $self->{_ss7_subinterface};
}
sub ss7_tdminterface {
my ( $self, $ss7_tdminterface ) = @_;
$self->{_ss7_tdminterface} = $ss7_tdminterface if defined($ss7_tdminterface);
return $self->{_ss7_tdminterface};
}
sub is_tdm_api {
my ( $self, $is_tdm_api ) = @_;
$self->{_is_tdm_api} = $is_tdm_api if defined($is_tdm_api);
return $self->{_is_tdm_api};
}
sub smg_sig_mode {
my ( $self, $smg_sig_mode ) = @_;
$self->{_smg_sig_mode} = $smg_sig_mode if defined($smg_sig_mode);
return $self->{_smg_sig_mode};
}
sub rx_slevel {
my ( $self, $rx_slevel ) = @_;
$self->{_rx_slevel} = $rx_slevel if defined($rx_slevel);
return $self->{_rx_slevel};
}
sub prompt_user{
my($promptString, $defaultValue) = @_;
if ($defaultValue) {
print $promptString, "[", $defaultValue, "]: ";
} else {
print $promptString, ": ";
}
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ("$defaultValue") {
return $_ ? $_ : $defaultValue; # return $_ if it has a value
} else {
return $_;
}
}
sub prompt_user_list{
my @list = @_;
my $i;
my $valid = 0;
for $i (0..$#list) {
printf(" %s\. %s\n",$i+1, @list[$i]);
}
while ($valid == 0){
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ( $_ =~ /(\d+)/ ){
if ( $1 > $#list+1) {
print "Invalid option: Value out of range \n";
} else {
return $1-1 ;
}
} else {
print "Invalid option: Input an integer\n";
}
}
}
sub old_a10u {
my ( $self, $old_a10u ) = @_;
$self->{_old_a10u} = $old_a10u if defined($old_a10u);
return $self->{_old_a10u};
}
sub print {
my ($self) = @_;
$self->card->print();
printf (" fe_line: %s\n fe_media: %s\n fe_lcode: %s\n fe_frame: %s \n fe_clock:%s\n ", $self->fe_line, $self->fe_media, $self->fe_lcode, $self->fe_frame, $self->fe_clock);
}
sub get_alpha_from_num {
my ($num) = @_;
my $alpha_str="";
my $alpha_char="";
my $i;
my @chars = split(//, $num);
for $i (0..$#chars) {
if ( $i == 0 ) {
$alpha_char=chr(ord(@chars[$i])+48);
} else {
$alpha_char=chr(ord(@chars[$i])+49);
}
$alpha_str=$alpha_str."".$alpha_char;
}
return $alpha_str;
}
sub gen_wanpipe_ss7_subinterfaces{
my ($self) = @_;
my $wanpipe_ss7_conf_file = $self->card->current_dir."/".$self->card->cfg_dir."/wanpipe".$self->card->device_no.".conf";
my $ss7_sigchan = $self->ss7_sigchan;
my $tdmv_span_no = $self->card->tdmv_span_no;
my $device_no = $self->card->device_no;
my $ss7_subinterface = $self->ss7_subinterface;
my $ss7_tdmchan = $self->ss7_tdmchan;
my $hwec_mode = $self->card->hwec_mode;
my $ss7_tdminterface = $self->ss7_tdminterface;
my $rx_slevel= $self->rx_slevel;
my $wanpipe_ss7_interfaces_template = $self->card->current_dir."/templates/ss7_a10u/wanpipe.ss7.$ss7_subinterface";
open(FH, $wanpipe_ss7_interfaces_template) or die "Can't open $wanpipe_ss7_interfaces_template";
my $wp_file='';
while (<FH>) {
if (!(($ss7_tdminterface == ' ') && (($wanpipe_ss7_interfaces_template =~ m/2/) || ($wanpipe_ss7_interfaces_template =~ m/5/)))){
$wp_file .= $_;
}
}
close (FH);
open(FH, ">>$wanpipe_ss7_conf_file") or die "Cant open $wanpipe_ss7_conf_file";
$wp_file =~ s/DEVNUM/$device_no/g;
$wp_file =~ s/SS7SIGCHAN/$ss7_sigchan/g;
$wp_file =~ s/TDMVOICECHAN/$ss7_tdmchan/g;
$wp_file =~ s/VOICEINTERFACE/$ss7_tdminterface/g;
$wp_file =~ s/RXSLEVEL/$rx_slevel/g;
$wp_file =~ s/TDMVSPANNO/$tdmv_span_no/g;
print FH $wp_file;
close (FH);
}
sub gen_wanpipe_conf{
my ($self, $is_freebsd) = @_;
my $wanpipe_conf_template = $self->card->current_dir."/templates/wanpipe.tdm.a10u";
my $wanpipe_conf_file = $self->card->current_dir."/".$self->card->cfg_dir."/wanpipe".$self->card->device_no.".conf";
my $tdmv_span_no = $self->card->tdmv_span_no;
my $device_no = $self->card->device_no;
my $pci_slot = $self->card->pci_slot;
my $pci_bus = $self->card->pci_bus;
my $fe_media = $self->fe_media;
my $fe_lcode = $self->fe_lcode;
my $fe_frame = $self->fe_frame;
my $fe_line = $self->fe_line;
my $te_sig_mode = $self->te_sig_mode;
my $fe_clock = $self->fe_clock;
my $ss7_option = $self->ss7_option;
my $dchan = 0;
my $fe_lbo;
my $fe_cpu;
my $tdm_voice_op_mode = "TDM_VOICE";
my $rx_slevel= $self->rx_slevel;
my $device_alpha = &get_alpha_from_num($device_no);
my $te_sig_mode_line='';
if ($ss7_option == 1){
$wanpipe_conf_template = $self->card->current_dir."/templates/ss7_a10u/wanpipe.ss7.4";
} elsif ($ss7_option == 2){
$wanpipe_conf_template = $self->card->current_dir."/templates/ss7_a10u/wanpipe.tdmvoiceapi.a10u";
}
if ($self->fe_line eq '1'){
$fe_cpu='A';
}elsif($self->fe_line eq '2'){
$fe_cpu='B';
}else{
print "Error: Invalid port on A101-2u\n";
exit 1;
}
$dchan = 0;
if(!$is_freebsd){
if ($self->signalling =~ m/PRI/ | $self->signalling =~ m/SS7/ ){
if(($self->fe_media eq 'T1')){
$dchan=24;
}else{
$dchan=16;
}
}
}
if($self->fe_media eq 'T1'){
$te_sig_mode_line='';
$fe_lbo='0DB';
}else{
$fe_lbo='120OH';
$te_sig_mode_line= 'TE_SIG_MODE = '.$te_sig_mode;
}
if($self->signalling eq 'TDM API'){
$tdm_voice_op_mode = "TDM_VOICE_API";
#for tdm_api hw_dchan is set by user
$dchan = $self->hw_dchan;
}
open(FH, $wanpipe_conf_template ) or die "Cannot open $wanpipe_conf_template";
my $wp_file='';
while (<FH>) {
$wp_file .= $_;
}
close (FH);
open(FH, ">>$wanpipe_conf_file") or die "Cant open $wanpipe_conf_file";
$wp_file =~ s/DEVNUM/$device_no/g;
if ( $is_freebsd ) {
$wp_file =~ s/IFNUM/$device_alpha/g;
} else {
$wp_file =~ s/IFNUM/$device_no/g;
}
$wp_file =~ s/TDM_VOICE_OP_MODE/$tdm_voice_op_mode/g;
$wp_file =~ s/SLOTNUM/$pci_slot/g;
$wp_file =~ s/BUSNUM/$pci_bus/g;
$wp_file =~ s/FEMEDIA/$fe_media/g;
$wp_file =~ s/FELCODE/$fe_lcode/g;
$wp_file =~ s/TESIGMODE/$te_sig_mode_line/g;
$wp_file =~ s/FEFRAME/$fe_frame/g;
$wp_file =~ s/FECPU/$fe_cpu/g;
$wp_file =~ s/FECLOCK/$fe_clock/g;
$wp_file =~ s/FELBO/$fe_lbo/g;
$wp_file =~ s/RXSLEVEL/$rx_slevel/g;
$wp_file =~ s/TDMVDCHAN/$dchan/g;
$wp_file =~ s/TDMVSPANNO/$tdmv_span_no/g;
print FH $wp_file;
close (FH);
# print "\n created $fname for A$card_model $devnum SLOT $slot BUS $bus HWEC $hwec_mode\n";
}
sub gen_zaptel_conf{
my ($self, $dchan_str) = @_;
my $zap_lcode;
my $zap_frame;
my $zap_crc4;
my $dahdi_conf = $self->card->dahdi_conf;
my $hwec_mode = $self->card->hwec_mode;
my $dahdi_echo = $self->card->dahdi_echo;
if ( $self->fe_lcode eq 'B8ZS' ){
$zap_lcode='b8zs';
} elsif ( $self->fe_lcode eq 'AMI' ){
$zap_lcode='ami';
} elsif ( $self->fe_lcode eq 'HDB3' ){
$zap_lcode='hdb3';
} else {
printf("Error: invalid line coding %s\n", $self->fe_lcode);
exit;
}
if ( $self->fe_frame eq 'ESF' ){
$zap_frame='esf';
} elsif ( $self->fe_frame eq 'D4' ){
$zap_frame='d4';
} elsif ( $self->fe_frame eq 'CRC4' ){
$zap_frame='ccs';
$zap_crc4=',crc4';
} elsif ( $self->fe_frame eq 'NCRC4' ){
$zap_frame='ccs';
} else {
printf("Error: invalid line framing %s\n", $self->fe_frame);
exit;
}
my $zp_file='';
$zp_file.="\n\#Sangoma A".$self->card->card_model." port ".$self->fe_line." [slot:".$self->card->pci_slot." bus:".$self->card->pci_bus." span:".$self->card->tdmv_span_no."] <wanpipe".$self->card->device_no.">\n";
$zp_file.="span=".$self->card->tdmv_span_no.",".$self->card->tdmv_span_no.",0,".$zap_frame.",".$zap_lcode.$zap_crc4."\n";
if ( $self->signalling =~ m/PRI/ ){
if ( $self->fe_media eq 'T1' ){
if($self->frac_chan_first() != 0){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
if($self->frac_chan_last == 24){
$self->frac_chan_last(23);
}
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="bchan=".$first_ch."-".$last_ch."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=" .$dahdi_echo.",".$first_ch."-".$last_ch."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+23)."\n";
} else {
$zp_file.="bchan=".$self->card->first_chan."-".($self->card->first_chan+22)."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=" .$dahdi_echo.",".$self->card->first_chan."-".($self->card->first_chan+22)."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+23)."\n";
}
} else {
if($self->frac_chan_first() != 0){
if($self->frac_chan_last() == 16){
$self->frac_chan_last(15);
}
if($self->frac_chan_first() == 16){
$self->frac_chan_first(17);
}
if($self->frac_chan_last() > 15){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
my $mid_ch1=$self->card->first_chan + 14;
my $mid_ch2=$self->card->first_chan + 16;
$zp_file.="bchan=".$first_ch."-".$mid_ch1.",".$mid_ch2."-".$last_ch."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=" .$dahdi_echo.",".$first_ch."-".$mid_ch1.",".$mid_ch2."-".$last_ch."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+15)."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="bchan=".$first_ch."-".$last_ch."\n";
if($dahdi_conf eq 'YES') {
if($hwec_mode eq 'NO' ) {
$zp_file.="echocanceller=" .$dahdi_echo.",".$first_ch."-".$last_ch."\n";
}
}
$zp_file.=$dchan_str."=".($self->card->first_chan+15)."\n";
}
} else {
$zp_file.="bchan=".$self->card->first_chan."-".($self->card->first_chan+14).",".($self->card->first_chan+16)."-".($self->card->first_chan+30)."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=" .$dahdi_echo.",".$self->card->first_chan."-".($self->card->first_chan+14).",".($self->card->first_chan+16)."-".($self->card->first_chan+30)."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+15)."\n";
}
}
} else {
my $zap_signal;
if ( $self->signalling eq 'Zaptel/Dahdi - E & M' | $self->signalling eq 'Zaptel/Dahdi - E & M Wink' ){
$zap_signal='e&m';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Loop Start' ){
$zap_signal='fxsls';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Ground Start' ){
$zap_signal='fxsgs';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Kewl Start' ){
$zap_signal='fxsks';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Loop Start' ){
$zap_signal='fxols';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Ground Start' ){
$zap_signal='fxogs';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Kewl Start' ){
$zap_signal='fxoks';
} else {
printf("Error: invalid signalling %s\n", $self->card->signalling);
}
if ( $self->fe_media eq 'T1' ){
if($self->frac_chan_first() != 0){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.=$zap_signal."=".$first_ch."-".$last_ch."\n";
if($dahdi_conf eq 'YES') {
if($hwec_mode eq 'NO' ) {
$zp_file.="echocanceller=" .$dahdi_echo.",".$first_ch."-".$last_ch."\n";
}
}
} else {
$zp_file.=$zap_signal."=".$self->card->first_chan."-".($self->card->first_chan+23)."\n";
if($dahdi_conf eq 'YES') {
if($hwec_mode eq 'NO' ) {
$zp_file.="echocanceller=".$dahdi_echo.",".$self->card->first_chan."-".($self->card->first_chan+23)."\n";
}
}
}
} else {
if($self->frac_chan_first() != 0){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.=$zap_signal."=".$first_ch."-".$last_ch."\n";
if($dahdi_conf eq 'YES') {
if($hwec_mode eq 'NO' ) {
$zp_file.="echocanceller=".$dahdi_echo.",".$first_ch."-".$last_ch."\n";
}
}
} else {
$zp_file.=$zap_signal."=".$self->card->first_chan."-".($self->card->first_chan+30)."\n";
if($dahdi_conf eq 'YES') {
if($hwec_mode eq 'NO' ) {
$zp_file.="echocanceller=".$dahdi_echo.",".$self->card->first_chan."-".($self->card->first_chan+30)."\n";
}
}
}
}
}
return $zp_file;
}
sub gen_zapata_conf{
my ($self) = @_;
my $zp_file='';
my $dahdi_conf = $self->card->dahdi_conf;
my $hwec_mode = $self->card->hwec_mode;
$zp_file.="\n\;Sangoma A".$self->card->card_model." port ".$self->fe_line." [slot:".$self->card->pci_slot." bus:".$self->card->pci_bus." span:".$self->card->tdmv_span_no."] <wanpipe".$self->card->device_no.">\n";
# $zp_file.="\n\;Sangoma A".$self->card->card_model." port ".$self->fe_line." [slot:".$self->card->pci_slot." bus:".$self->card->pci_bus." span: ".$self->card->span_no."]\n";
if ( $self->signalling =~ m/PRI/ ){
$zp_file.="switchtype=".$self->pri_switchtype."\n";
}
$zp_file.="context=".$self->card->zap_context."\n";
$zp_file.="group=".$self->card->zap_group."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocancel=yes\n";
}
if ( $self->signalling eq 'Zaptel/Dahdi - PRI NET' ){
$zp_file.="signalling=pri_net\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - PRI CPE' ){
$zp_file.="signalling=pri_cpe\n";
} elsif ( $self->signalling eq 'E & M' ){
$zp_file.="signalling=em\n";
} elsif ($self->signalling eq 'E & M Wink' ){
$zp_file.="signalling=em_w\n";
} elsif ( $self->signalling eq 'FXS - Loop Start' ){
$zp_file.="signalling=fxs_ls\n";
} elsif ( $self->signalling eq 'FXS - Ground Start' ){
$zp_file.="signalling=fxs_gs\n";
} elsif ( $self->signalling eq 'FXS - Kewl Start' ){
$zp_file.="signalling=fxs_ks\n";
} elsif ( $self->signalling eq 'FX0 - Loop Start' ){
$zp_file.="signalling=fxo_ls\n";
} elsif ( $self->signalling eq 'FX0 - Ground Start' ){
$zp_file.="signalling=fxo_gs\n";
} elsif ( $self->signalling eq 'FX0 - Kewl Start' ){
$zp_file.="signalling=fxo_ks\n";
} else {
printf("Error: invalid signalling %s\n", $self->signalling);
}
if ( $self->signalling eq 'PRI NET' | $self->signalling eq 'PRI CPE' ){
if ( $self->fe_media eq 'T1' ){
if($self->frac_chan_first() != 0){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
if($self->frac_chan_last == 24){
$self->frac_chan_last(23);
}
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="channel =>".$first_ch."-".$last_ch."\n";
} else {
$zp_file.="channel =>".$self->card->first_chan."-".($self->card->first_chan+22)."\n";
}
}else{
if($self->frac_chan_first() != 0){
if($self->frac_chan_last() == 16){
$self->frac_chan_last(15);
}
if($self->frac_chan_first() == 16){
$self->frac_chan_first(17);
}
if($self->frac_chan_last() > 15){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
my $mid_ch1=$self->card->first_chan + 14;
my $mid_ch2=$self->card->first_chan + 16;
$zp_file.="channel =>".$first_ch."-".$mid_ch1.",".$mid_ch2."-".$last_ch."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="channel =>".$first_ch."-".$last_ch."\n";
}
} else {
$zp_file.="channel =>".$self->card->first_chan."-".($self->card->first_chan+14).",".($self->card->first_chan+16)."-".($self->card->first_chan+30)."\n";
}
}
} else {
if ( $self->fe_media eq 'T1' ){
if($self->frac_chan_first() != 0){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="channel =>".$first_ch."-".$last_ch."\n";
} else {
$zp_file.="channel => ".$self->card->first_chan."-".($self->card->first_chan+23)."\n";
}
} else {
if($self->frac_chan_first() != 0){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="channel =>".$first_ch."-".$last_ch."\n";
} else {
$zp_file.="channel => ".$self->card->first_chan."-".($self->card->first_chan+30)."\n";
}
}
}
return $zp_file;
}
sub gen_pri_conf{
my ($self ,$span_no,$span_type, $group_no, $switch_type,$trunk_type,$sig_mode) = @_;
my $pri_file='';
$pri_file.="\n";
#$pri_file.="link=$trunk_type\n";
if ($sig_mode =~ m/CPE/ ){
$pri_file.="signalling=pri_cpe\n";
} elsif ( $sig_mode =~ m/NET/ ){
$pri_file.="signalling=pri_net\n";
}
$pri_file.="switchtype=$switch_type\n";
$pri_file.="group=$group_no\n";
$pri_file.="spans=$span_no\n";
#$pri_file.="operator=$operator\n";
return $pri_file;
}
sub gen_woomera_conf{
my ($self, $group, $context) = @_;
my $woomera_file='';
$woomera_file.="\n";
$woomera_file.="context=$context\n";
$woomera_file.="group=$group\n";
return $woomera_file;
}
1;

View File

@ -0,0 +1,811 @@
#class A10x
#for A10x-sh series cards
package A10x;
use Card;
use strict;
#constructor
sub new {
my ($class) = @_;
my $self = {
_is_tdm_api => undef,
_current_dir => undef,
_card => undef,
_fe_line => undef,
_fe_media => 'T1',
_fe_lcode => 'B8ZS',
_fe_frame => 'ESF',
_fe_clock => 'NORMAL',
_te_sig_mode => undef,
_te_ref_clock => '0',
_signalling => 'PRI_CPE',
_pri_switchtype => 'national',
_rx_slevel => '360',
_hw_dchan => '0',
_frac_chanfirst => '0',
_frac_chanlast => '0',
_ss7_sigchan => undef,
_ss7_option => undef,
_ss7_tdmchan => undef,
_ss7_subinterface => undef,
_ss7_tdminterface => undef,
_hp_option => undef,
_mtu_mru => undef,
_old_a10u => undef,
_smg_sig_mode => '1',
};
bless $self, $class;
return $self;
}
sub card {
my ( $self, $card ) = @_;
$self->{_card} = $card if defined($card);
return $self->{_card};
}
sub fe_line {
my ( $self, $fe_line ) = @_;
$self->{_fe_line} = $fe_line if defined($fe_line);
return $self->{_fe_line};
}
sub frac_chan_first {
my ( $self, $frac_chan_first ) = @_;
$self->{_frac_chan_first} = $frac_chan_first if defined($frac_chan_first);
return $self->{_frac_chan_first};
}
sub frac_chan_last {
my ( $self, $frac_chan_last ) = @_;
$self->{_frac_chan_last} = $frac_chan_last if defined($frac_chan_last);
return $self->{_frac_chan_last};
}
sub te_ref_clock {
my ( $self, $te_ref_clock ) = @_;
$self->{_te_ref_clock} = $te_ref_clock if defined($te_ref_clock);
return $self->{_te_ref_clock};
}
sub signalling {
my ( $self, $signalling ) = @_;
$self->{_signalling} = $signalling if defined($signalling);
return $self->{_signalling};
}
sub fe_media {
my ( $self, $fe_media ) = @_;
$self->{_fe_media} = $fe_media if defined($fe_media);
return $self->{_fe_media};
}
sub fe_lcode {
my ( $self, $fe_lcode) = @_;
$self->{_fe_lcode} = $fe_lcode if defined($fe_lcode);
return $self->{_fe_lcode};
}
sub fe_frame {
my ( $self, $fe_frame ) = @_;
$self->{_fe_frame} = $fe_frame if defined($fe_frame);
return $self->{_fe_frame};
}
sub hw_dchan {
my ( $self, $hw_dchan ) = @_;
$self->{_hw_dchan} = $hw_dchan if defined($hw_dchan);
return $self->{_hw_dchan};
}
sub fe_clock {
my ( $self, $fe_clock ) = @_;
$self->{_fe_clock} = $fe_clock if defined($fe_clock);
return $self->{_fe_clock};
}
sub te_sig_mode {
my ( $self, $te_sig_mode ) = @_;
$self->{_te_sig_mode} = $te_sig_mode if defined($te_sig_mode);
return $self->{_te_sig_mode};
}
sub pri_switchtype {
my ( $self, $pri_switchtype ) = @_;
$self->{_pri_switchtype} = $pri_switchtype if defined($pri_switchtype);
return $self->{_pri_switchtype};
}
sub current_dir {
my ( $self, $current_dir ) = @_;
$self->{_current_dir} = $current_dir if defined($current_dir);
return $self->{_current_dir};
}
sub ss7_option {
my ( $self, $ss7_option ) = @_;
$self->{_ss7_option} = $ss7_option if defined($ss7_option);
return $self->{_ss7_option};
}
sub hp_option {
my ( $self, $hp_option ) = @_;
$self->{_hp_option} = $hp_option if defined($hp_option);
return $self->{_hp_option};
}
sub ss7_sigchan {
my ( $self, $ss7_sigchan ) = @_;
$self->{_ss7_sigchan} = $ss7_sigchan if defined($ss7_sigchan);
return $self->{_ss7_sigchan};
}
sub ss7_tdmchan {
my ( $self, $ss7_tdmchan ) = @_;
$self->{_ss7_tdmchan} = $ss7_tdmchan if defined($ss7_tdmchan);
return $self->{_ss7_tdmchan};
}
sub ss7_subinterface {
my ( $self, $ss7_subinterface ) = @_;
$self->{_ss7_subinterface} = $ss7_subinterface if defined($ss7_subinterface);
return $self->{_ss7_subinterface};
}
sub ss7_tdminterface {
my ( $self, $ss7_tdminterface ) = @_;
$self->{_ss7_tdminterface} = $ss7_tdminterface if defined($ss7_tdminterface);
return $self->{_ss7_tdminterface};
}
sub mtu_mru {
my ( $self, $mtu_mru ) = @_;
$self->{_mtu_mru} = $mtu_mru if defined($mtu_mru);
return $self->{_mtu_mru};
}
sub is_tdm_api {
my ( $self, $is_tdm_api ) = @_;
$self->{_is_tdm_api} = $is_tdm_api if defined($is_tdm_api);
return $self->{_is_tdm_api};
}
sub old_a10u {
my ( $self, $old_a10u ) = @_;
$self->{_old_a10u} = $old_a10u if defined($old_a10u);
return $self->{_old_a10u};
}
sub rx_slevel {
my ( $self, $rx_slevel ) = @_;
$self->{_rx_slevel} = $rx_slevel if defined($rx_slevel);
return $self->{_rx_slevel};
}
sub prompt_user{
my($promptString, $defaultValue) = @_;
if ($defaultValue) {
print $promptString, "[", $defaultValue, "]: ";
} else {
print $promptString, ": ";
}
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ("$defaultValue") {
return $_ ? $_ : $defaultValue; # return $_ if it has a value
} else {
return $_;
}
}
sub smg_sig_mode {
my ( $self, $smg_sig_mode ) = @_;
$self->{_smg_sig_mode} = $smg_sig_mode if defined($smg_sig_mode);
return $self->{_smg_sig_mode};
}
sub prompt_user_list{
my @list = @_;
my $i;
my $valid = 0;
for $i (0..$#list) {
printf(" %s\. %s\n",$i+1, @list[$i]);
}
while ($valid == 0){
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ( $_ =~ /(\d+)/ ){
if ( $1 > $#list+1) {
print "Invalid option: Value out of range \n";
} else {
return $1-1 ;
}
} else {
print "Invalid option: Input an integer\n";
}
}
}
sub print {
my ($self) = @_;
$self->card->print();
printf (" fe_line: %s\n fe_media: %s\n fe_lcode: %s\n fe_frame: %s \n fe_clock:%s\n ", $self->fe_line, $self->fe_media, $self->fe_lcode, $self->fe_frame, $self->fe_clock);
}
sub get_alpha_from_num {
my ($num) = @_;
my $alpha_str="";
my $alpha_char="";
my $i;
my @chars = split(//, $num);
for $i (0..$#chars) {
if ( $i == 0 ) {
$alpha_char=chr(ord(@chars[$i])+48);
} else {
$alpha_char=chr(ord(@chars[$i])+49);
}
$alpha_str=$alpha_str."".$alpha_char;
}
return $alpha_str;
}
sub gen_wanpipe_ss7_subinterfaces{
my ($self) = @_;
my $wanpipe_ss7_conf_file = $self->card->current_dir."/".$self->card->cfg_dir."/wanpipe".$self->card->device_no.".conf";
my $ss7_sigchan = $self->ss7_sigchan;
my $tdmv_span_no = $self->card->tdmv_span_no;
my $device_no = $self->card->device_no;
my $ss7_subinterface = $self->ss7_subinterface;
my $ss7_tdmchan = $self->ss7_tdmchan;
my $mtu_mru = $self->mtu_mru;
my $hwec_mode = $self->card->hwec_mode;
my $ss7_tdminterface = $self->ss7_tdminterface;
my $hp_option = $self->hp_option;
my $card_type="WAN_AFT_TE1";
my $old_a10u = $self->old_a10u;
my $rx_slevel= $self->rx_slevel;
my $wanpipe_ss7_interfaces_template = $self->card->current_dir."/templates/ss7_a100/wanpipe.ss7.$ss7_subinterface";
if (!($hp_option == ' ')) {
#for hp tdmapi change templates
$wanpipe_ss7_interfaces_template = $self->card->current_dir."/templates/hp_a100/wanpipe.hp.$ss7_subinterface";
}
if(($old_a10u =~ m/YES/)){
$card_type="WAN_AFT";
}
my $hw_dtmf = $self->card->hw_dtmf;
my $hw_fax = $self->card->hw_fax;
open(FH, $wanpipe_ss7_interfaces_template) or die "Can't open $wanpipe_ss7_interfaces_template";
my $wp_file='';
while (<FH>) {
if (!(($ss7_tdminterface == ' ') && (($wanpipe_ss7_interfaces_template =~ m/2/) || ($wanpipe_ss7_interfaces_template =~ m/5/)))){
$wp_file .= $_;
}
}
close (FH);
open(FH, ">>$wanpipe_ss7_conf_file") or die "Cant open $wanpipe_ss7_conf_file";
$wp_file =~ s/WAN_AFT_TYPE/$card_type/g;
$wp_file =~ s/DEVNUM/$device_no/g;
$wp_file =~ s/SS7SIGCHAN/$ss7_sigchan/g;
$wp_file =~ s/TDMVOICECHAN/$ss7_tdmchan/g;
$wp_file =~ s/HWECMODE/$hwec_mode/g;
$wp_file =~ s/RXSLEVEL/$rx_slevel/g;
$wp_file =~ s/CHUNKTIME/$mtu_mru/g;
$wp_file =~ s/VOICEINTERFACE/$ss7_tdminterface/g;
$wp_file =~ s/TDMVSPANNO/$tdmv_span_no/g;
$wp_file =~ s/HWDTMF/$hw_dtmf/g;
$wp_file =~ s/HWFAX/$hw_fax/g;
print FH $wp_file;
close (FH);
}
sub gen_wanpipe_conf{
my ($self, $is_freebsd) = @_;
my $wanpipe_conf_template = $self->card->current_dir."/templates/wanpipe.tdm.a100";
my $wanpipe_conf_file = $self->card->current_dir."/".$self->card->cfg_dir."/wanpipe".$self->card->device_no.".conf";
my $device_no = $self->card->device_no;
my $tdmv_span_no = $self->card->tdmv_span_no;
my $pci_slot = $self->card->pci_slot;
my $pci_bus = $self->card->pci_bus;
my $fe_media = $self->fe_media;
my $fe_lcode = $self->fe_lcode;
my $fe_frame = $self->fe_frame;
my $fe_line = $self->fe_line;
my $fe_clock = $self->fe_clock;
my $te_ref_clock = $self->te_ref_clock;
my $te_sig_mode = $self->te_sig_mode;
my $hwec_mode = $self->card->hwec_mode;
my $hw_dtmf = $self->card->hw_dtmf;
my $hw_fax = $self->card->hw_fax;
my $ss7_option = $self->ss7_option;
my $hp_option = $self->hp_option;
my $dchan = $self->hw_dchan;
my $fe_lbo;
my $old_a10u = $self->old_a10u;
my $fe_cpu = "A";
my $card_type="WAN_AFT_TE1";
my $tdm_voice_op_mode = "TDM_VOICE";
my $mtu_size='8';
my $device_alpha = &get_alpha_from_num($device_no);
my $te_sig_mode_line='';
my $card_model = $self->card->card_model;
my $rx_slevel= $self->rx_slevel;
if ($ss7_option == 1){
$wanpipe_conf_template = $self->card->current_dir."/templates/ss7_a100/wanpipe.ss7.4";
} elsif ($ss7_option == 2){
$wanpipe_conf_template = $self->card->current_dir."/templates/ss7_a100/wanpipe.tdmvoiceapi.a100";
} elsif ($hp_option == 1){
$wanpipe_conf_template = $self->card->current_dir."/templates/hp_a100/wanpipe.hp.4";
}
if(($old_a10u =~ m/YES/)){
#Set card type and CPU for old card in for hpdmapi
$card_type="WAN_AFT";
if ($self->fe_line eq '1'){
$fe_cpu='A';
}elsif($self->fe_line eq '2'){
$fe_cpu='B';
}else{
print "Error: Invalid port on A101-2u\n";
exit 1;
}
}
if($is_freebsd){
$dchan = 0;
}
if(!$is_freebsd){
if ($self->signalling =~ m/PRI/ | $self->signalling =~ m/SS7/ ){
if(($self->fe_media eq 'T1')){
$dchan=24;
}else{
$dchan=16;
}
}
}
if($card_model eq '601'){
#601 doesn't have hardware HDLC support
$dchan = '0';
}
if($self->fe_media eq 'T1'){
$te_sig_mode_line='';
$fe_lbo='0DB';
}else{
$fe_lbo='120OH';
$te_sig_mode_line= 'TE_SIG_MODE = '.$te_sig_mode;
}
if($self->is_tdm_api eq '0') {
$tdm_voice_op_mode = "TDM_VOICE_API";
#for tdm_api hw_dchan is set by user
$dchan = $self->hw_dchan;
$mtu_size='80';
}
open(FH, $wanpipe_conf_template) or die "Can't open $wanpipe_conf_template";
my $wp_file='';
while (<FH>) {
$wp_file .= $_;
}
close (FH);
open(FH, ">>$wanpipe_conf_file") or die "Cant open $wanpipe_conf_file";
$wp_file =~ s/DEVNUM/$device_no/g;
if ( $is_freebsd ) {
$wp_file =~ s/IFNUM/$device_alpha/g;
} else {
$wp_file =~ s/IFNUM/$device_no/g;
}
$wp_file =~ s/TDM_VOICE_OP_MODE/$tdm_voice_op_mode/g;
$wp_file =~ s/FECPU/$fe_cpu/g;
$wp_file =~ s/WAN_AFT_TYPE/$card_type/g;
$wp_file =~ s/SLOTNUM/$pci_slot/g;
$wp_file =~ s/BUSNUM/$pci_bus/g;
$wp_file =~ s/FEMEDIA/$fe_media/g;
$wp_file =~ s/FELCODE/$fe_lcode/g;
$wp_file =~ s/FEFRAME/$fe_frame/g;
$wp_file =~ s/FELINE/$fe_line/g;
$wp_file =~ s/TESIGMODE/$te_sig_mode_line/g;
$wp_file =~ s/FECLOCK/$fe_clock/g;
$wp_file =~ s/TEREFCLOCK/$te_ref_clock/g;
$wp_file =~ s/RXSLEVEL/$rx_slevel/g;
$wp_file =~ s/FELBO/$fe_lbo/g;
$wp_file =~ s/TDMVDCHAN/$dchan/g;
$wp_file =~ s/TDMVSPANNO/$tdmv_span_no/g;
$wp_file =~ s/HWECMODE/$hwec_mode/g;
$wp_file =~ s/HWDTMF/$hw_dtmf/g;
$wp_file =~ s/HWFAX/$hw_fax/g;
$wp_file =~ s/MTUSIZE/$mtu_size/g;
print FH $wp_file;
close (FH);
# print "\n created $fname for A$card_model $devnum SLOT $slot BUS $bus HWEC $hwec_mode\n";
}
sub gen_zaptel_conf{
my ($self, $dchan_str) = @_;
my $zap_lcode;
my $zap_frame;
my $zap_crc4;
my $zp_file="";
my $dahdi_conf = $self->card->dahdi_conf;
my $hwec_mode = $self->card->hwec_mode;
my $dahdi_echo = $self->card->dahdi_echo;
my $card_model = $self->card->card_model;
if($card_model eq '601'){
#601 doesn't have hardware HDLC support
$dchan_str = 'dchan';
}
if ( $self->fe_lcode eq 'B8ZS' ){
$zap_lcode='b8zs';
} elsif ( $self->fe_lcode eq 'AMI' ){
$zap_lcode='ami';
} elsif ( $self->fe_lcode eq 'HDB3' ){
$zap_lcode='hdb3';
} else {
printf("Error: invalid line coding %s\n", $self->fe_lcode);
exit;
}
if ( $self->fe_frame eq 'ESF' ){
$zap_frame='esf';
} elsif ( $self->fe_frame eq 'D4' ){
$zap_frame='d4';
} elsif ( $self->fe_frame eq 'CRC4' ){
$zap_frame='ccs';
$zap_crc4=',crc4';
} elsif ( $self->fe_frame eq 'NCRC4' ){
$zap_frame='ccs';
} else {
printf("Error: invalid line framing %s\n", $self->fe_frame);
exit;
}
$zp_file.="\n\#Sangoma A".$self->card->card_model." port ".$self->fe_line." [slot:".$self->card->pci_slot." bus:".$self->card->pci_bus." span:".$self->card->tdmv_span_no."] <wanpipe".$self->card->device_no.">\n";
$zp_file.="span=".$self->card->tdmv_span_no.",".$self->card->tdmv_span_no.",0,".$zap_frame.",".$zap_lcode.$zap_crc4."\n";
if ( $self->signalling =~ /PRI/ ){
if ( $self->fe_media eq 'T1' ){
if($self->frac_chan_first() != 0){
if ($self->frac_chan_first == $self->frac_chan_last) {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
$zp_file.="bchan=".$first_ch."\n";
if($dahdi_conf eq 'YES') {
if($hwec_mode eq 'NO' ) {
$zp_file.="echocanceller=" .$dahdi_echo.",".$first_ch."\n";
}
}
$zp_file.=$dchan_str."=".($self->card->first_chan+23)."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
if($self->frac_chan_last == 24){
$self->frac_chan_last(23);
}
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="bchan=".$first_ch."-".$last_ch."\n";
#$zp_file.="echocanceller=mg2".$first_ch."-".$last_ch."\n";
#dahdi software echo canellation conf
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=" .$dahdi_echo.",".$first_ch."-".$last_ch."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+23)."\n";
}
} else {
$zp_file.="bchan=".$self->card->first_chan."-".($self->card->first_chan+22)."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=".$dahdi_echo.",".$self->card->first_chan."-".($self->card->first_chan+22)."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+23)."\n";
}
} else {
if($self->frac_chan_first() != 0){
if ($self->frac_chan_first == $self->frac_chan_last) {
if ($self->frac_chan_first == 16) {
print "Warning: You will not have any b-channels configured for this port";
print "Would you like to continue?";
if (&prompt_user_list(("YES","EXIT","")) eq 'EXIT'){
exit(1);
}
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
$zp_file.="bchan=".$first_ch."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=".$dahdi_echo.",".$first_ch."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+15)."\n";
}
} else {
if($self->frac_chan_last() == 16){
$self->frac_chan_last(15);
}
if($self->frac_chan_first() == 16){
$self->frac_chan_first(17);
}
if($self->frac_chan_last() > 15){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
my $mid_ch1=$self->card->first_chan + 14;
my $mid_ch2=$self->card->first_chan + 16;
$zp_file.="bchan=".$first_ch."-".$mid_ch1.",".$mid_ch2."-".$last_ch."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=".$dahdi_echo.",".$first_ch."-".$mid_ch1.",".$mid_ch2."-".$last_ch."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+15)."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="bchan=".$first_ch."-".$last_ch."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=".$dahdi_echo.",".$first_ch."-".$last_ch."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+15)."\n";
}
}
} else {
$zp_file.="bchan=".$self->card->first_chan."-".($self->card->first_chan+14).",".($self->card->first_chan+16)."-".($self->card->first_chan+30)."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=".$dahdi_echo.",".$self->card->first_chan."-".($self->card->first_chan+14).",".($self->card->first_chan+16)."-".($self->card->first_chan+30)."\n";
}
$zp_file.=$dchan_str."=".($self->card->first_chan+15)."\n";
}
}
} else {
my $zap_signal;
if ( $self->signalling eq 'Zaptel/Dahdi - E & M' | $self->signalling eq 'Zaptel/Dahdi - E & M Wink' ){
$zap_signal='e&m';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Loop Start' ){
$zap_signal='fxsls';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Ground Start' ){
$zap_signal='fxsgs';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Kewl Start' ){
$zap_signal='fxsks';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Loop Start' ){
$zap_signal='fxols';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Ground Start' ){
$zap_signal='fxogs';
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Kewl Start' ){
$zap_signal='fxoks';
} else {
printf("Error: invalid signalling %s\n", $self->card->signalling);
}
if ( $self->fe_media eq 'T1' ){
if($self->frac_chan_first() != 0){
if ($self->frac_chan_first == $self->frac_chan_last) {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
$zp_file.=$zap_signal."=".$first_ch."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=".$dahdi_echo.",".$first_ch."\n";
}
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.=$zap_signal."=".$first_ch."-".$last_ch."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=".$dahdi_echo.",".$first_ch."-".$last_ch."\n";
}
}
} else {
$zp_file.=$zap_signal."=".$self->card->first_chan."-".($self->card->first_chan+23)."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=".$dahdi_echo.",".$self->card->first_chan."-".($self->card->first_chan+23)."\n";
}
}
} else {
if($self->frac_chan_first() != 0){
if ($self->frac_chan_first == $self->frac_chan_last) {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
$zp_file.=$zap_signal."=".$first_ch."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.=$zap_signal."=".$first_ch."-".$last_ch."\n";
}
} else {
$zp_file.=$zap_signal."=".$self->card->first_chan."-".($self->card->first_chan+30)."\n";
}
}
}
return $zp_file;
}
sub gen_zapata_conf{
my ($self) = @_;
my $zp_file='';
my $dahdi_conf = $self->card->dahdi_conf;
my $hwec_mode = $self->card->hwec_mode;
my $fax_detect = $self->card->hw_fax;
$zp_file.="\n\;Sangoma A".$self->card->card_model." port ".$self->fe_line." [slot:".$self->card->pci_slot." bus:".$self->card->pci_bus." span:".$self->card->tdmv_span_no."] <wanpipe".$self->card->device_no.">\n";
if ( $self->signalling =~ m/PRI/ ){
$zp_file.="switchtype=".$self->pri_switchtype."\n";
}
$zp_file.="context=".$self->card->zap_context."\n";
$zp_file.="group=".$self->card->zap_group."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocancel=yes\n";
}
if($fax_detect eq 'YES'){
$zp_file.="faxdetect=incoming\n";
}
if ( $self->signalling eq 'Zaptel/Dahdi - PRI NET' ){
$zp_file.="signalling=pri_net\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - PRI CPE' ){
$zp_file.="signalling=pri_cpe\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - E & M' ){
$zp_file.="signalling=em\n";
} elsif ($self->signalling eq 'Zaptel/Dahdi - E & M Wink' ){
$zp_file.="signalling=em_w\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Loop Start' ){
$zp_file.="signalling=fxs_ls\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Ground Start' ){
$zp_file.="signalling=fxs_gs\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FXS - Kewl Start' ){
$zp_file.="signalling=fxs_ks\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Loop Start' ){
$zp_file.="signalling=fxo_ls\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Ground Start' ){
$zp_file.="signalling=fxo_gs\n";
} elsif ( $self->signalling eq 'Zaptel/Dahdi - FX0 - Kewl Start' ){
$zp_file.="signalling=fxo_ks\n";
} else {
printf("Error: invalid signalling %s\n", $self->signalling);
}
if ( $self->signalling eq 'Zaptel/Dahdi - PRI NET' | $self->signalling eq 'Zaptel/Dahdi - PRI CPE' ){
if ( $self->fe_media eq 'T1' ){
if($self->frac_chan_first() != 0){
if ($self->frac_chan_first == $self->frac_chan_last) {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
$zp_file.="channel =>".$first_ch."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
if($self->frac_chan_last == 24){
$self->frac_chan_last(23);
}
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="channel =>".$first_ch."-".$last_ch."\n";
}
} else {
$zp_file.="channel =>".$self->card->first_chan."-".($self->card->first_chan+22)."\n";
}
}else{
if($self->frac_chan_first() != 0){
if ($self->frac_chan_first == $self->frac_chan_last) {
#already sent warning on gen_zaptel_conf
if ($self->frac_chan_first != 16) {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
$zp_file.="channel =>".$first_ch."\n";
}
} else {
if($self->frac_chan_last() == 16){
$self->frac_chan_last(15);
}
if($self->frac_chan_first() == 16){
$self->frac_chan_first(17);
}
if($self->frac_chan_last() > 15){
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
my $mid_ch1=$self->card->first_chan + 14;
my $mid_ch2=$self->card->first_chan + 16;
$zp_file.="channel =>".$first_ch."-".$mid_ch1.",".$mid_ch2."-".$last_ch."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="channel =>".$first_ch."-".$last_ch."\n";
}
}
} else {
$zp_file.="channel =>".$self->card->first_chan."-".($self->card->first_chan+14).",".($self->card->first_chan+16)."-".($self->card->first_chan+30)."\n";
}
}
} else {
if ( $self->fe_media eq 'T1' ){
if($self->frac_chan_first() != 0){
if ($self->frac_chan_first == $self->frac_chan_last) {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
$zp_file.="channel =>".$first_ch."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="channel =>".$first_ch."-".$last_ch."\n";
}
} else {
$zp_file.="channel => ".$self->card->first_chan."-".($self->card->first_chan+23)."\n";
}
} else {
if($self->frac_chan_first() != 0){
if ($self->frac_chan_first == $self->frac_chan_last) {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
$zp_file.="channel =>".$first_ch."\n";
} else {
my $first_ch=$self->card->first_chan + $self->frac_chan_first-1;
my $last_ch=$self->card->first_chan + $self->frac_chan_last-1;
$zp_file.="channel =>".$first_ch."-".$last_ch."\n";
}
} else {
$zp_file.="channel => ".$self->card->first_chan."-".($self->card->first_chan+30)."\n";
}
}
}
return $zp_file;
}
sub gen_pri_conf{
my ($self ,$span_no,$span_type, $group_no, $switch_type,$trunk_type,$sig_mode) = @_;
my $pri_file='';
$pri_file.="\n";
#$pri_file.="link=$trunk_type\n";
if ($sig_mode =~ m/CPE/ ){
$pri_file.="signalling=pri_cpe\n";
} elsif ( $sig_mode =~ m/NET/ ){
$pri_file.="signalling=pri_net\n";
}
$pri_file.="switchtype=$switch_type\n";
$pri_file.="group=$group_no\n";
$pri_file.="spans=$span_no\n";
#$pri_file.="operator=$operator\n";
return $pri_file;
}
sub gen_woomera_conf{
my ($self, $group, $context) = @_;
my $woomera_file='';
$woomera_file.="\n";
$woomera_file.="context=$context\n";
$woomera_file.="group=$group\n";
return $woomera_file;
}
1;

View File

@ -0,0 +1,227 @@
#class A20x
#for A200 series cards
package A20x;
use Card;
use strict;
#constructor
sub new {
my ($class) = @_;
my $self = {
_is_tdm_api => undef,
_card => undef,
_tdm_opermode => 'FCC',
_tdm_law => 'MULAW',
_rm_network_sync => 'NO',
_analog_modules => undef,
};
bless $self, $class;
return $self;
}
sub card {
my ( $self, $card ) = @_;
$self->{_card} = $card if defined($card);
return $self->{_card};
}
sub tdm_opermode {
my ( $self, $tdm_opermode ) = @_;
$self->{_tdm_opermode} = $tdm_opermode if defined($tdm_opermode);
return $self->{_tdm_opermode};
}
sub tdm_law {
my ( $self, $tdm_law ) = @_;
$self->{_tdm_law} = $tdm_law if defined($tdm_law);
return $self->{_tdm_law};
}
sub rm_network_sync {
my ( $self, $rm_network_sync ) = @_;
$self->{_rm_network_sync} = $rm_network_sync if defined($rm_network_sync);
return $self->{_rm_network_sync};
}
sub is_tdm_api {
my ( $self, $is_tdm_api ) = @_;
$self->{_is_tdm_api} = $is_tdm_api if defined($is_tdm_api);
return $self->{_is_tdm_api};
}
sub analog_modules {
my ( $self, $analog_modules ) = @_;
$self->{_analog_modules} = $analog_modules if defined($analog_modules);
return $self->{_analog_modules};
}
sub prompt_user{
my($promptString, $defaultValue) = @_;
if ($defaultValue) {
print $promptString, "[", $defaultValue, "]: ";
} else {
print $promptString, ": ";
}
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ("$defaultValue") {
return $_ ? $_ : $defaultValue; # return $_ if it has a value
} else {
return $_;
}
}
sub prompt_user_list{
my @list = @_;
my $i;
my $valid = 0;
for $i (0..$#list) {
printf(" %s\. %s\n",$i+1, @list[$i]);
}
while ($valid == 0){
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ( $_ =~ /(\d+)/ ){
if ( $1 > $#list+1) {
print "Invalid option: Value out of range \n";
} else {
return $1-1 ;
}
} else {
print "Invalid option: Input an integer\n";
}
}
}
sub print {
my ($self) = @_;
$self->card->print();
}
sub get_alpha_from_num {
my ($num) = @_;
my $alpha_str="";
my $alpha_char="";
my $i;
my @chars = split(//, $num);
for $i (0..$#chars) {
if ( $i == 0 ) {
$alpha_char=chr(ord(@chars[$i])+48);
} else {
$alpha_char=chr(ord(@chars[$i])+49);
}
$alpha_str=$alpha_str."".$alpha_char;
}
return $alpha_str;
}
sub gen_wanpipe_conf{
my ($self, $is_freebsd) = @_;
my $wanpipe_conf_template = $self->card->current_dir."/templates/wanpipe.tdm.a200";
my $wanpipe_conf_file = $self->card->current_dir."/".$self->card->cfg_dir."/wanpipe".$self->card->device_no.".conf";
my $device_no = $self->card->device_no;
my $tdmv_span_no = $self->card->tdmv_span_no;
my $pci_slot = $self->card->pci_slot;
my $pci_bus = $self->card->pci_bus;
my $tdm_law = $self->tdm_law;
my $tdm_opermode = $self->tdm_opermode;
my $rm_network_sync = $self->rm_network_sync;
my $hwec_mode = $self->card->hwec_mode;
my $hw_dtmf = $self->card->hw_dtmf;
my $hw_fax = $self->card->hw_fax;
my $is_tdm_api = $self->is_tdm_api;
my $tdm_voice_op_mode = "TDM_VOICE";
my $device_alpha = &get_alpha_from_num($device_no);
if($self->is_tdm_api eq '0') {
$tdm_voice_op_mode = "TDM_VOICE_API";
}
open(FH, $wanpipe_conf_template) or die "Can open $wanpipe_conf_template";
my $wp_file='';
while (<FH>) {
$wp_file .= $_;
}
close (FH);
open(FH, ">$wanpipe_conf_file") or die "Cant open $wanpipe_conf_file";
$wp_file =~ s/DEVNUM/$device_no/g;
if ( $is_freebsd ) {
$wp_file =~ s/IFNUM/$device_alpha/g;
} else {
$wp_file =~ s/IFNUM/$device_no/g;
}
$wp_file =~ s/TDM_VOICE_OP_MODE/$tdm_voice_op_mode/g;
$wp_file =~ s/SLOTNUM/$pci_slot/g;
$wp_file =~ s/BUSNUM/$pci_bus/g;
$wp_file =~ s/TDM_LAW/$tdm_law/g;
$wp_file =~ s/RMNETSYNC/$rm_network_sync/g;
$wp_file =~ s/TDM_OPERMODE/$tdm_opermode/g;
$wp_file =~ s/TDMVSPANNO/$tdmv_span_no/g;
$wp_file =~ s/HWECMODE/$hwec_mode/g;
$wp_file =~ s/HWDTMF/$hw_dtmf/g;
$wp_file =~ s/HWFAX/$hw_fax/g;
print FH $wp_file;
close (FH);
# print "\n created $fname for A$card_model $devnum SLOT $slot BUS $bus HWEC $hwec_mode\n";
}
sub gen_zaptel_conf{
my ($self, $channel, $type) = @_;
my $zp_file='';
my $dahdi_conf = $self->card->dahdi_conf;
my $hwec_mode = $self->card->hwec_mode;
my $dahdi_echo = $self->card->dahdi_echo;
if ( $type eq 'fxo'){
#this is an FXS module
$zp_file.="fxoks=$channel\n";
}else{
$zp_file.="fxsks=$channel\n";
}
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=" .$dahdi_echo.",".$channel."\n";
}
return $zp_file;
}
sub gen_zapata_conf{
my ($self, $channel, $type) = @_;
my $dahdi_conf = $self->card->dahdi_conf;
my $hwec_mode = $self->card->hwec_mode;
my $dahdi_echo = $self->card->dahdi_echo;
my $fax_detect = $self->card->hw_fax;
my $zp_file='';
$zp_file.="context=".$self->card->zap_context."\n";
$zp_file.="group=".$self->card->zap_group."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocancel=yes\n";
}
if($fax_detect eq 'YES'){
$zp_file.="faxdetect=incoming\n";
}
if ( $type eq 'fxo'){
#this is an FXS module
$zp_file.="signalling = fxo_ks\n";
}else{
$zp_file.="signalling = fxs_ks\n";
}
$zp_file.="channel => $channel\n\n";
return $zp_file;
}
1;

View File

@ -0,0 +1,261 @@
#class A50x
#for A50x-sh series cards
package A50x;
use Card;
use strict;
#constructor
sub new {
my ($class) = @_;
my $self = {
_current_dir => undef,
_card => undef,
_fe_line => undef,
_fe_media => 'BRI',
_bri_switchtype => 'etsi',
_bri_country => 'europe',
_signalling => 'NT',
};
bless $self, $class;
return $self;
}
sub card {
my ( $self, $card ) = @_;
$self->{_card} = $card if defined($card);
return $self->{_card};
}
sub fe_line {
my ( $self, $fe_line ) = @_;
$self->{_fe_line} = $fe_line if defined($fe_line);
return $self->{_fe_line};
}
sub fe_media {
my ( $self, $fe_media ) = @_;
$self->{_fe_media} = $fe_media if defined($fe_media);
return $self->{_fe_media};
}
sub bri_switchtype {
my ( $self, $bri_switchtype ) = @_;
$self->{_bri_switchtype} = $bri_switchtype if defined($bri_switchtype);
return $self->{_bri_switchtype};
}
sub current_dir {
my ( $self, $current_dir ) = @_;
$self->{_current_dir} = $current_dir if defined($current_dir);
return $self->{_current_dir};
}
sub prompt_user{
my($promptString, $defaultValue) = @_;
if ($defaultValue) {
print $promptString, "[", $defaultValue, "]: ";
} else {
print $promptString, ": ";
}
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ("$defaultValue") {
return $_ ? $_ : $defaultValue; # return $_ if it has a value
} else {
return $_;
}
}
sub prompt_user_list{
my @list = @_;
my $i;
my $valid = 0;
for $i (0..$#list) {
printf(" %s\. %s\n",$i+1, @list[$i]);
}
while ($valid == 0){
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ( $_ =~ /(\d+)/ ){
if ( $1 > $#list+1) {
print "Invalid option: Value out of range \n";
} else {
return $1-1 ;
}
} else {
print "Invalid option: Input an integer\n";
}
}
}
sub get_alpha_from_num {
my ($num) = @_;
my $alpha_str="";
my $alpha_char="";
my $i;
my @chars = split(//, $num);
for $i (0..$#chars) {
if ( $i == 0 ) {
$alpha_char=chr(ord(@chars[$i])+48);
} else {
$alpha_char=chr(ord(@chars[$i])+49);
}
$alpha_str=$alpha_str."".$alpha_char;
}
return $alpha_str;
}
sub gen_wanpipe_conf{
my ($self, $is_freebsd) = @_;
my $wanpipe_conf_template = $self->card->current_dir."/templates/wanpipe.tdm_api.a500";
my $wanpipe_conf_file = $self->card->current_dir."/".$self->card->cfg_dir."/wanpipe".$self->card->device_no.".conf";
if ($self->card->dahdi_conf eq 'YES') {
$wanpipe_conf_template = $self->card->current_dir."/templates/wanpipe.tdm.a500";
}
my $device_no = $self->card->device_no;
my $tdmv_span_no = $self->card->tdmv_span_no;
my $pci_slot = $self->card->pci_slot;
my $pci_bus = $self->card->pci_bus;
my $fe_media = $self->fe_media;
my $fe_line = $self->fe_line;
my $hwec_mode = $self->card->hwec_mode;
my $hw_dtmf = $self->card->hw_dtmf;
my $hw_fax = $self->card->hw_fax;
my $device_alpha = &get_alpha_from_num($device_no);
open(FH, $wanpipe_conf_template) or die "Can't open $wanpipe_conf_template";
my $wp_file='';
while (<FH>) {
$wp_file .= $_;
}
close (FH);
open(FH, ">>$wanpipe_conf_file") or die "Cant open $wanpipe_conf_file";
$wp_file =~ s/DEVNUM/$device_no/g;
if ( $is_freebsd ) {
$wp_file =~ s/IFNUM/$device_alpha/g;
} else {
$wp_file =~ s/IFNUM/$device_no/g;
}
$wp_file =~ s/SLOTNUM/$pci_slot/g;
$wp_file =~ s/BUSNUM/$pci_bus/g;
$wp_file =~ s/FEMEDIA/$fe_media/g;
$wp_file =~ s/FELINE/$fe_line/g;
$wp_file =~ s/TDMVSPANNO/$tdmv_span_no/g;
$wp_file =~ s/HWECMODE/$hwec_mode/g;
$wp_file =~ s/HWDTMF/$hw_dtmf/g;
$wp_file =~ s/HWFAX/$hw_fax/g;
print FH $wp_file;
close (FH);
}
sub gen_bri_conf{
my ($self, $span, $type, $group, $country, $operator, $conn_type, $default_tei) = @_;
my $bri_file='';
$bri_file.="\n";
$bri_file.="group=$group\n";
$bri_file.="country=$country\n";
$bri_file.="operator=$operator\n";
$bri_file.="connection_type=$conn_type\n";
if ( $type eq 'bri_nt') {
$bri_file.="signalling=bri_nt\n";
} else {
$bri_file.="signalling=bri_te\n";
}
if ( ! $default_tei eq ''){
$bri_file.="default_tei=$default_tei\n";
}
$bri_file.="spans=$span\n";
return $bri_file;
}
sub gen_woomera_conf{
my ($self, $group, $context) = @_;
my $woomera_file='';
$woomera_file.="\n";
$woomera_file.="context=$context\n";
$woomera_file.="group=$group\n";
return $woomera_file;
}
sub gen_zaptel_conf{
my ($self) = @_;
my $zp_file='';
my $tmpchan=1;
my $tmpstr='';
$zp_file.="\n\#Sangoma AFT-B".$self->card->card_model." port ".$self->fe_line." [slot:".$self->card->pci_slot." bus:".$self->card->pci_bus." span:".$self->card->tdmv_span_no."] <wanpipe".$self->card->device_no.">\n";
$zp_file.="span=".$self->card->tdmv_span_no.",0,0,ccs,ami\n";
$tmpchan = $self->card->first_chan+1;
$zp_file.="bchan=".$self->card->first_chan.",".$tmpchan."\n";
$tmpchan = $self->card->first_chan+1;
$tmpstr.="echocanceller=mg2,".$self->card->first_chan."-".$tmpchan."\n";
if ($self->card->dahdi_echo eq 'NO') {
$zp_file.="#";
}
$zp_file.=$tmpstr;
$tmpchan=$self->card->first_chan+2;
$zp_file.="hardhdlc=".$tmpchan."\n";
return $zp_file;
}
sub gen_zapata_conf{
my ($self) = @_;
my $zp_file='';
my $tmpchan=1;
$zp_file.="\n\;Sangoma AFT-B".$self->card->card_model." port ".$self->fe_line." [slot:".$self->card->pci_slot." bus:".$self->card->pci_bus." span:".$self->card->tdmv_span_no."] <wanpipe".$self->card->device_no.">\n";
# $zp_file.="switchtype=".$self->bri_switchtype."\n";
$zp_file.="context=".$self->card->zap_context."\n";
$zp_file.="group=".$self->card->zap_group."\n";
if ($self->card->dahdi_echo eq 'NO') {
$zp_file.="echocancel=no\n";
} else {
$zp_file.="echocancel=yes\n";
}
if ( $self->signalling eq 'NT' ){
$zp_file.="signalling=bri_net\n";
} elsif ( $self->signalling eq 'TEM' ){
$zp_file.="signalling=bri_cpe_ptmp\n";
} else {
$zp_file.="signalling=bri_cpe\n";
}
$tmpchan = $self->card->first_chan+1;
$zp_file.="channel =>".$self->card->first_chan."-".$tmpchan."\n";
return $zp_file;
}
sub signalling {
my ( $self, $signalling ) = @_;
$self->{_signalling} = $signalling if defined($signalling);
return $self->{_signalling};
}
1;

View File

@ -0,0 +1,138 @@
package Card;
use strict;
#constructor
sub new {
my ($class) = @_;
my $self = {
_current_dir => undef,
_cfg_dir => undef,
_device_no => undef,
_tdmv_span_no => undef,
_card_model => undef,
_pci_slot => undef,
_pci_bus => undef,
_fe_cpu => 'A',
_hwec_mode => 'NO',
_hw_dtmf => 'NO',
_hw_fax => 'NO',
_first_chan => '0',
_zap_context => undef,
_zap_group => undef,
_dahdi_conf => 'NO',
_dahdi_echo => 'mg2'
};
bless $self, $class;
return $self;
}
sub device_no {
my ( $self, $device_no ) = @_;
$self->{_device_no} = $device_no if defined($device_no);
return $self->{_device_no};
}
sub tdmv_span_no {
my ( $self, $tdmv_span_no ) = @_;
$self->{_tdmv_span_no} = $tdmv_span_no if defined($tdmv_span_no);
return $self->{_tdmv_span_no};
}
sub card_model {
my ( $self, $card_model ) = @_;
$self->{_card_model} = $card_model if defined($card_model);
return $self->{_card_model};
}
sub pci_slot {
my ( $self, $pci_slot ) = @_;
$self->{_pci_slot} = $pci_slot if defined($pci_slot);
return $self->{_pci_slot};
}
sub pci_bus {
my ( $self, $pci_bus ) = @_;
$self->{_pci_bus} = $pci_bus if defined($pci_bus);
return $self->{_pci_bus};
}
sub fe_cpu {
my ( $self, $fe_cpu ) = @_;
$self->{_fe_cpu } = $fe_cpu if defined($fe_cpu);
return $self->{_fe_cpu};
}
sub hwec_mode {
my ( $self, $hwec_mode ) = @_;
$self->{_hwec_mode} = $hwec_mode if defined($hwec_mode);
return $self->{_hwec_mode};
}
sub hw_dtmf {
my ( $self, $hw_dtmf ) = @_;
$self->{_hw_dtmf} = $hw_dtmf if defined($hw_dtmf);
return $self->{_hw_dtmf};
}
sub hw_fax {
my ( $self, $hw_fax ) = @_;
$self->{_hw_fax} = $hw_fax if defined($hw_fax);
return $self->{_hw_fax};
}
sub signalling {
my ( $self, $signalling ) = @_;
$self->{_signalling} = $signalling if defined($signalling);
return $self->{_signalling};
}
sub first_chan {
my ( $self, $first_chan ) = @_;
$self->{_first_chan} = $first_chan if defined($first_chan);
return $self->{_first_chan};
}
sub zap_context {
my ( $self, $zap_context ) = @_;
$self->{_zap_context} = $zap_context if defined($zap_context);
return $self->{_zap_context};
}
sub zap_group {
my ( $self, $zap_group ) = @_;
$self->{_zap_group} = $zap_group if defined($zap_group);
return $self->{_zap_group};
}
sub dahdi_conf {
my ( $self, $dahdi_conf ) = @_;
$self->{_dahdi_conf} = $dahdi_conf if defined($dahdi_conf);
return $self->{_dahdi_conf};
}
sub dahdi_echo {
my ( $self, $dahdi_echo ) = @_;
$self->{_dahdi_echo} = $dahdi_echo if defined($dahdi_echo);
return $self->{_dahdi_echo};
}
sub current_dir {
my ( $self, $current_dir ) = @_;
$self->{_current_dir} = $current_dir if defined($current_dir);
return $self->{_current_dir};
}
sub cfg_dir {
my ( $self, $cfg_dir ) = @_;
$self->{_cfg_dir} = $cfg_dir if defined($cfg_dir);
return $self->{_cfg_dir};
}
sub print {
my ($self) = @_;
printf (" span_no: %s\n card_model: %s\n pci_slot: %s\n pci_bus: %s\n hwec_mode: %s\n signalling %s\n first_chan: %s\n", $self->span_no, $self->card_model, $self->pci_slot, $self->pci_bus, $self->hwec_mode, $self->signalling, $self->first_chan);
}
1;

View File

@ -0,0 +1,25 @@
# ============================================================================
# Makefile Make script for building Linux WAN router utilities.
# ----------------------------------------------------------------------------
# Copyright (c) 1995-2000 Sangoma Technologies Inc. All Rights Reserved.
# ============================================================================
####### MACROS ###############################################################
# Build options.
WZDIR=/etc/wanpipe/wancfg_zaptel
WAN_VIRTUAL=
all:
install:
@echo "Installing Wanconfig Zaptel/SMG utilites in $(WAN_VIRTUAL)/$(WZDIR)"
$(shell ./install.sh $(WZDIR) $(WAN_VIRTUAL) )
uninstall:
@echo "Un-installing Wanpipe utilites from $(WAN_VIRTUAL)/$(WZDIR)"
$(shell ./uninstall.sh $(WZDIR) $(WAN_VIRTUAL) )
clean:
@echo "Removing temporary wancfg_zaptel files"
$(shell ./clean.sh)

View File

@ -0,0 +1,210 @@
#class A10x
#for U100 series cards
package U10x;
use Card;
use strict;
#constructor
sub new {
my ($class) = @_;
my $self = {
_is_tdm_api => undef,
_card => undef,
_tdm_opermode => 'FCC',
_tdm_law => 'MULAW',
_rm_network_sync => 'NO',
_analog_modules => undef,
};
bless $self, $class;
return $self;
}
sub card {
my ( $self, $card ) = @_;
$self->{_card} = $card if defined($card);
return $self->{_card};
}
sub tdm_opermode {
my ( $self, $tdm_opermode ) = @_;
$self->{_tdm_opermode} = $tdm_opermode if defined($tdm_opermode);
return $self->{_tdm_opermode};
}
sub tdm_law {
my ( $self, $tdm_law ) = @_;
$self->{_tdm_law} = $tdm_law if defined($tdm_law);
return $self->{_tdm_law};
}
sub rm_network_sync {
my ( $self, $rm_network_sync ) = @_;
$self->{_rm_network_sync} = $rm_network_sync if defined($rm_network_sync);
return $self->{_rm_network_sync};
}
sub is_tdm_api {
my ( $self, $is_tdm_api ) = @_;
$self->{_is_tdm_api} = $is_tdm_api if defined($is_tdm_api);
return $self->{_is_tdm_api};
}
sub analog_modules {
my ( $self, $analog_modules ) = @_;
$self->{_analog_modules} = $analog_modules if defined($analog_modules);
return $self->{_analog_modules};
}
sub prompt_user{
my($promptString, $defaultValue) = @_;
if ($defaultValue) {
print $promptString, "[", $defaultValue, "]: ";
} else {
print $promptString, ": ";
}
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ("$defaultValue") {
return $_ ? $_ : $defaultValue; # return $_ if it has a value
} else {
return $_;
}
}
sub prompt_user_list{
my @list = @_;
my $i;
my $valid = 0;
for $i (0..$#list) {
printf(" %s\. %s\n",$i+1, @list[$i]);
}
while ($valid == 0){
$| = 1; # force a flush after our print
$_ = <STDIN>; # get the input from STDIN (presumably the keyboard)
chomp;
if ( $_ =~ /(\d+)/ ){
if ( $1 > $#list+1) {
print "Invalid option: Value out of range \n";
} else {
return $1-1 ;
}
} else {
print "Invalid option: Input an integer\n";
}
}
}
sub print {
my ($self) = @_;
$self->card->print();
}
sub get_alpha_from_num {
my ($num) = @_;
my $alpha_str="";
my $alpha_char="";
my $i;
my @chars = split(//, $num);
for $i (0..$#chars) {
if ( $i == 0 ) {
$alpha_char=chr(ord(@chars[$i])+48);
} else {
$alpha_char=chr(ord(@chars[$i])+49);
}
$alpha_str=$alpha_str."".$alpha_char;
}
return $alpha_str;
}
sub gen_wanpipe_conf{
my ($self, $is_freebsd) = @_;
my $wanpipe_conf_template = $self->card->current_dir."/templates/wanpipe.tdm.u100";
my $wanpipe_conf_file = $self->card->current_dir."/".$self->card->cfg_dir."/wanpipe".$self->card->device_no.".conf";
my $device_no = $self->card->device_no;
my $tdmv_span_no = $self->card->tdmv_span_no;
my $pci_slot = $self->card->pci_slot;
my $pci_bus = $self->card->pci_bus;
my $tdm_law = $self->tdm_law;
my $tdm_opermode = $self->tdm_opermode;
my $rm_network_sync = $self->rm_network_sync;
my $hwec_mode = $self->card->hwec_mode;
my $hw_dtmf = $self->card->hw_dtmf;
my $is_tdm_api = $self->is_tdm_api;
my $tdm_voice_op_mode = "TDM_VOICE";
my $device_alpha = &get_alpha_from_num($device_no);
if($self->is_tdm_api eq '0') {
$tdm_voice_op_mode = "TDM_VOICE_API";
}
open(FH, $wanpipe_conf_template) or die "Can open $wanpipe_conf_template";
my $wp_file='';
while (<FH>) {
$wp_file .= $_;
}
close (FH);
open(FH, ">$wanpipe_conf_file") or die "Cant open $wanpipe_conf_file";
$wp_file =~ s/DEVNUM/$device_no/g;
if ( $is_freebsd ) {
$wp_file =~ s/IFNUM/$device_alpha/g;
} else {
$wp_file =~ s/IFNUM/$device_no/g;
}
$wp_file =~ s/TDM_VOICE_OP_MODE/$tdm_voice_op_mode/g;
$wp_file =~ s/SLOTNUM/$pci_slot/g;
$wp_file =~ s/BUSNUM/$pci_bus/g;
$wp_file =~ s/TDM_LAW/$tdm_law/g;
$wp_file =~ s/RMNETSYNC/$rm_network_sync/g;
$wp_file =~ s/TDM_OPERMODE/$tdm_opermode/g;
$wp_file =~ s/TDMVSPANNO/$tdmv_span_no/g;
$wp_file =~ s/HWECMODE/$hwec_mode/g;
$wp_file =~ s/HWDTMF/$hw_dtmf/g;
print FH $wp_file;
close (FH);
# print "\n created $fname for A$card_model $devnum SLOT $slot BUS $bus HWEC $hwec_mode\n";
}
sub gen_zaptel_conf{
my ($self, $channel, $type) = @_;
my $dahdi_conf = $self->card->dahdi_conf;
my $dahdi_echo = $self->card->dahdi_echo;
my $zp_file='';
#For USB device type is hardcoded to fxo
if ( 1 ){
$zp_file.="fxsks=$channel\n";
}
if($dahdi_conf eq 'YES') {
$zp_file.="echocanceller=" .$dahdi_echo.",".$channel."\n";
}
return $zp_file;
}
sub gen_zapata_conf{
my ($self, $channel, $type) = @_;
my $dahdi_conf = $self->card->dahdi_conf;
my $dahdi_echo = $self->card->dahdi_echo;
my $zp_file='';
$zp_file.="context=".$self->card->zap_context."\n";
$zp_file.="group=".$self->card->zap_group."\n";
if($dahdi_conf eq 'YES') {
$zp_file.="echocancel=yes\n";
}
if (1){
$zp_file.="signalling = fxs_ks\n";
}
$zp_file.="channel => $channel\n\n";
return $zp_file;
}
1;

View File

@ -0,0 +1,50 @@
#class fxsspan
#for freeswitch fxs module configuraton
package analogspan;
#use warnings;
#use diagnostics;
use strict;
#constructor
sub new {
my ($class) = @_;
my $self = {
_span_type => undef,
_span_name => 'OpenZap',
_span_no => undef,
_chan_no => undef,
};
bless $self, $class;
return $self;
}
sub span_type {
my ( $self, $span_type ) = @_;
$self->{_span_type} = $span_type if defined($span_type);
return $self->{_span_type};
}
sub span_no {
my ( $self, $span_no ) = @_;
$self->{_span_no} = $span_no if defined($span_no);
return $self->{_span_no};
}
sub span_name {
my ( $self, $span_name ) = @_;
$self->{_span_name} = $span_name if defined($span_name);
return $self->{_span_name};
}
sub chan_no {
my ( $self, $chan_no ) = @_;
$self->{_chan_no} = $chan_no if defined($chan_no);
return $self->{_chan_no};
}
sub print {
my ($self) = @_;
printf (" span_name: %s\n span_type: %s\n span_no: %s\n chan_no: %s\n", $self->span_name, $self->span_type, $self->span_no, $self->chan_no);
}
1;

View File

@ -0,0 +1,90 @@
#class boostbrispan
#for freeswitch isdn bri/pri boost span configuraton
package boostspan;
#use warnings;
#use diagnostics;
use strict;
#constructor
sub new {
my ($class) = @_;
my $self = {
#openzap conf
_span_type => undef,
_span_name => 'OpenZap',
_span_no => undef,
_chan_no => undef,
#signalling conf
_trunk_type => undef,
_group_no => undef,
_chan_set => undef,
_sig_mode => undef,
_context => undef,
};
bless $self, $class;
return $self;
}
sub span_type {
my ( $self, $span_type ) = @_;
$self->{_span_type} = $span_type if defined($span_type);
return $self->{_span_type};
}
sub span_no {
my ( $self, $span_no ) = @_;
$self->{_span_no} = $span_no if defined($span_no);
return $self->{_span_no};
}
sub span_name {
my ( $self, $span_name ) = @_;
$self->{_span_name} = $span_name if defined($span_name);
return $self->{_span_name};
}
sub chan_no {
my ( $self, $chan_no ) = @_;
$self->{_chan_no} = $chan_no if defined($chan_no);
return $self->{_chan_no};
}
sub trunk_type {
my ( $self, $trunk_type ) = @_;
$self->{_trunk_type} = $trunk_type if defined($trunk_type);
return $self->{_trunk_type};
}
sub group_no {
my ( $self, $group_no ) = @_;
$self->{_group_no} = $group_no if defined($group_no);
return $self->{_group_no};
}
sub switch_type {
my ( $self, $switch_type ) = @_;
$self->{_switch_type} = $switch_type if defined($switch_type);
return $self->{_switch_type};
}
sub chan_set {
my ( $self, $chan_set ) = @_;
$self->{_chan_set} = $chan_set if defined($chan_set);
return $self->{_chan_set};
}
sub sig_mode {
my ( $self, $sig_mode ) = @_;
$self->{_sig_mode} = $sig_mode if defined($sig_mode);
return $self->{_sig_mode};
}
sub context {
my ( $self, $context ) = @_;
$self->{_context} = $context if defined($context);
return $self->{_context};
}
sub print {
my ($self) = @_;
printf (" span_name: %s\n span_type: %s\n span_no: %s\n chan_no: %s \ntrunk type: %s \ngroup_no: %s\n switchtype: %s\n chan_set: %s\n sig_mode:%s\n context:%s\n", $self->span_name, $self->span_type, $self->span_no, $self->chan_no, $self->trunk_type,$self->group_no,$self->switch_type,$self->chan_set,$self->sig_mode,$self->context);
}
1;

View File

@ -0,0 +1,4 @@
#!/bin/sh
rm -f tmp_cfg/*

View File

@ -0,0 +1,193 @@
--- wancfg_zaptel.pl 2010-12-10 16:04:07.000000000 -0500
+++ /tmp/yannick_tmp/wancfg_zaptel.pl.tdmapi_a500_fix_final 2011-03-08 17:28:38.000000000 -0500
@@ -434,7 +434,9 @@
if($usb_device_support == $TRUE && $os_type_list =~ m/Linux/) {
config_usbfxo();
}
-config_tdmv_dummy();
+if( $is_tdm_api == $FALSE ) {
+ config_tdmv_dummy();
+}
update_module_load();
summary();
apply_changes();
@@ -447,10 +449,12 @@
}
if($is_trillium == $FALSE){
- config_ztcfg_start();
- config_smg_ctrl_start();
- if($os_type_list =~ m/Linux/){
- config_smg_ctrl_boot();
+ if ($is_tdm_api == $FALSE ){
+ config_ztcfg_start();
+ config_smg_ctrl_start();
+ if($os_type_list =~ m/Linux/){
+ config_smg_ctrl_boot();
+ }
}
}
@@ -927,14 +931,18 @@
}
}
- }elsif ($is_trillium == $FALSE) {
- print "\nAsterisk is not running...\n";
+ }elsif ($is_trillium == $FALSE){
+ if ($is_tdm_api == $FALSE) {
+ print "\nAsterisk is not running...\n";
+ }
}
}
- if ($is_trillium == $FALSE) {
- if(-f "/usr/sbin/smg_ctrl" ){
- exec_command("/usr/sbin/smg_ctrl stop");
+ if ($is_trillium == $FALSE){
+ if($is_tdm_api==$FALSE) {
+ if(-f "/usr/sbin/smg_ctrl" ){
+ exec_command("/usr/sbin/smg_ctrl stop");
+ }
}
}
@@ -942,9 +950,11 @@
exec_command("wanrouter stop all");
if ($zaptel_dahdi_installed==$TRUE){
- if($is_tdm_api==$FALSE || $is_hp_tdm_api==$FALSE){
- print "\nUnloading $zaptel_string modules...\n";
- unload_zap_modules();
+ if($is_tdm_api==$FALSE){
+ if ($is_hp_tdm_api==$FALSE){
+ print "\nUnloading $zaptel_string modules...\n";
+ unload_zap_modules();
+ }
}
}
@@ -954,18 +964,22 @@
gen_wanrouter_rc();
if($is_trillium == $FALSE){
- if( $num_bri_devices != 0 | $num_digital_smg != 0) {
- gen_smg_rc();
+ if ($is_tdm_api == $FALSE){
+ if( $num_bri_devices != 0 | $num_digital_smg != 0) {
+ gen_smg_rc();
+ }
}
}
print "\nCopying new Wanpipe configuration files...\n";
copy_config_files();
if($num_bri_devices != 0){
if($is_trillium == $FALSE){
- print "\nCopying new sangoma_brid configuration files ($bri_conf_file_t)...\n";
- exec_command("cp -f $bri_conf_file $bri_conf_file_t");
- if($config_woomera == $TRUE){
- exec_command("cp -f $woomera_conf_file $woomera_conf_file_t");
+ if($is_tdm_api == $FALSE){
+ print "\nCopying new sangoma_brid configuration files ($bri_conf_file_t)...\n";
+ exec_command("cp -f $bri_conf_file $bri_conf_file_t");
+ if($config_woomera == $TRUE){
+ exec_command("cp -f $woomera_conf_file $woomera_conf_file_t");
+ }
}
}
}
@@ -986,7 +1000,7 @@
}
if( $num_digital_smg != 0){
- if($is_trillium == $FALSE){
+ if(($is_trillium == $FALSE) || ($is_tdm_api == $FALSE)){
print "\nCopying new sangoma_prid configuration files ($pri_conf_file_t)...\n";
exec_command("cp -f $pri_conf_file $pri_conf_file_t");
if($config_woomera == $TRUE){
@@ -998,8 +1012,10 @@
if ($num_digital_smg !=0 || $num_bri_devices !=0){
if ($is_trillium == $FALSE){
- print "\nCopying new smg.rc configuration files ($smg_rc_file_t)...\n";
- exec_command("cp -f $smg_rc_file $smg_rc_file_t");
+ if($is_tdm_api == $FALSE){
+ print "\nCopying new smg.rc configuration files ($smg_rc_file_t)...\n";
+ exec_command("cp -f $smg_rc_file $smg_rc_file_t");
+ }
}
}
@@ -1543,8 +1559,10 @@
$file_list++;
if (($num_bri_devices != 0) && ($is_trillium == $FALSE)){
- print "\t$file_list. sangoma_brid config file $wanpipe_conf_dir/smg_bri\n";
- $file_list++;
+ if($is_tdm_api == $FALSE){
+ print "\t$file_list. sangoma_brid config file $wanpipe_conf_dir/smg_bri\n";
+ $file_list++;
+ }
}
if(($num_digital_smg != 0) && ($is_trillium == $FALSE)){
print "\t$file_list. sangoma_prid config file $wanpipe_conf_dir/smg_pri\n";
@@ -1576,8 +1594,10 @@
}
if (($num_digital_smg !=0 || $num_bri_devices !=0) && ($is_trillium == $FALSE)){
- print "\t$file_list. smg.rc config file $wanpipe_conf_dir/smg.rc\n";
- $file_list++
+ if($is_tdm_api == $FALSE){
+ print "\t$file_list. smg.rc config file $wanpipe_conf_dir/smg.rc\n";
+ $file_list++
+ }
}
@@ -2070,7 +2090,7 @@
sub config_bri{
- if($is_smg!=$TRUE && $is_trixbox==$FALSE && $is_fs==$FALSE){
+ if($is_smg!=$TRUE && $is_trixbox==$FALSE && $is_fs==$FALSE && $is_tdm_api==$FALSE){
return;
}
my $a50x;
@@ -2202,21 +2222,23 @@
}
}else {
- $group=get_woomera_group();
- #if a context has already been assigned to this group, do not prompt for options
- foreach my $f_group (@woomera_groups) {
- if($f_group eq $group){
- $context="WOOMERA_NO_CONFIG";
- }
- }
- if(!($context eq "WOOMERA_NO_CONFIG")){
- if ( $dev =~ /(\d+):NT/ ){
- $context=get_woomera_context($group, $a50x->card->card_model(),$a50x->fe_line(),'bri_nt');
- } else {
- $context=get_woomera_context($group, $a50x->card->card_model(),$a50x->fe_line(),'bri_te');
- }
- push(@woomera_groups, $group);
+ if ($is_tdm_api == $FALSE){
+ $group=get_woomera_group();
+ #if a context has already been assigned to this group, do not prompt for options
+ foreach my $f_group (@woomera_groups) {
+ if($f_group eq $group){
+ $context="WOOMERA_NO_CONFIG";
+ }
+ }
+ if(!($context eq "WOOMERA_NO_CONFIG")){
+ if ( $dev =~ /(\d+):NT/ ){
+ $context=get_woomera_context($group, $a50x->card->card_model(),$a50x->fe_line(),'bri_nt');
+ } else {
+ $context=get_woomera_context($group, $a50x->card->card_model(),$a50x->fe_line(),'bri_te');
+ }
+ push(@woomera_groups, $group);
+ }
}
}
if ($os_type_list =~ m/FreeBSD/){

View File

@ -0,0 +1,36 @@
#!/bin/sh
WAN_VIRTUAL=$2
WZDIR=${1:-usr/local/sbin/wancfg_zaptel}
if [ -e $WAN_VIRTUAL/$WZDIR ]; then
rm -rf $WAN_VIRTUAL/$WZDIR
fi
mkdir -p $WAN_VIRTUAL/$WZDIR
cp -rf . $WAN_VIRTUAL/$WZDIR
install -D -m 755 setup-sangoma $WAN_VIRTUAL/usr/local/sbin/setup-sangoma
install -D -m 755 wancfg_zaptel $WAN_VIRTUAL/usr/sbin/wancfg_zaptel
install -D -m 755 wancfg_dahdi $WAN_VIRTUAL/usr/sbin/wancfg_dahdi
install -D -m 755 wancfg_smg $WAN_VIRTUAL/usr/sbin/wancfg_smg
install -D -m 755 wancfg_tdmapi $WAN_VIRTUAL/usr/sbin/wancfg_tdmapi
install -D -m 755 wancfg_hp_tdmapi $WAN_VIRTUAL/usr/sbin/wancfg_hp_tdmapi
install -D -m 755 wancfg_fs $WAN_VIRTUAL/usr/sbin/wancfg_fs
install -D -m 755 wancfg_openzap $WAN_VIRTUAL/usr/sbin/wancfg_openzap
install -D -m 755 wancfg_ftdm $WAN_VIRTUAL/usr/sbin/wancfg_ftdm
install -D -m 755 wancfg_fs_legacy $WAN_VIRTUAL/usr/sbin/wancfg_fs_legacy
#cp -rf setup-sangoma $WAN_VIRTUAL/usr/local/sbin
#chmod 755 $WAN_VIRTUAL/usr/local/sbin/setup-sangoma
#cp -rf wancfg_zaptel $WAN_VIRTUAL/usr/sbin
#chmod 755 $WAN_VIRTUAL/usr/sbin/wancfg_zaptel
#cp -rf wancfg_smg $WAN_VIRTUAL/usr/sbin
#chmod 755 $WAN_VIRTUAL/usr/sbin/wancfg_smg
#cp -rf wancfg_tdmapi $WAN_VIRTUAL/usr/sbin
#chmod 755 $WAN_VIRTUAL/usr/sbin/wancfg_tdmapi

View File

@ -0,0 +1,17 @@
#!/bin/sh
home=`pwd`
cd /etc/wanpipe/wancfg_zaptel
if [ ! -z $1 ]; then
if [ $1 = 'smg' ]; then
wancfg_smg
else
echo "Invalid option $1 "
fi
else
#./wancfg_zaptel.pl --trixbox
wancfg_dahdi
fi
cd $home

View File

@ -0,0 +1,10 @@
; Autogenerated by /usr/sbin/setup-sangoma DATE
; If you edit this file and execute /usr/sbin/setup-sangoma again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

View File

@ -0,0 +1,31 @@
#!/bin/bash
#Make sure that udev/devfs Dahdi device
#has come up.
cnt=0
max_delay=30
i=0
echo -n "Waiting for Dahdi /dev/dahdi ..."
#for ((i=0;i<$max_delay;i++))
while [ $i != $max_delay ]
do
if [ -e /dev/dahdi/timer ]; then
break;
fi
echo -n "."
i=$((i+1));
sleep 1
done
echo " "
if [ ! -e /dev/dahdi ]; then
echo
echo "Error: Dahdi device failed to come up";
echo "Possible Cause: UDEV not installed!";
echo
exit 1
fi
sleep 1
dahdi_cfg -v

View File

@ -0,0 +1,29 @@
<configuration name="freetdm.conf" description="Freetdm Configuration">
<settings>
<param name="debug" value="0"/>
<!--<param name="hold-music" value="$${moh_uri}"/>-->
<!--<param name="enable-analog-option" value="call-swap"/>-->
<!--<param name="enable-analog-option" value="3-way"/>-->
</settings>
<!--CONFIG_PROFILE_HEADER-->
<!--CONFIG_PRI_PROFILE-->
<!--CONFIG_BRI_PROFILE-->
<!--CONFIG_PROFILE_FOOT-->
<!--BOOST_HEADER-->
<!--PRI_HEADER-->
<!--BOOSTPRI-->
<!--PRI_FOOT-->
<!--BRI_HEADER-->
<!--BOOSTBRI-->
<!--BRI_FOOT-->
<!--BOOST_FOOT-->
<analog_spans>
<!--SANGOMA_FXO-->
<!--SANGOMA_FXS-->
</analog_spans>
</configuration>

View File

@ -0,0 +1,20 @@
#================================================
# WANPIPE1 Configuration File
#================================================
#
# Date: Tue June 12 18:18:28 EST 2007
#
# Note: This file was generated automatically
# by /usr/sbin/wancfg_hq_tdmapi program.
#
# If you want to edit this file, it is
# recommended that you use wancfg program
# to do so.
#================================================
# Sangoma Technologies Inc.
#================================================
[devices]
wanpipeDEVNUM = WAN_AFT_TYPE, Comment
[interfaces]

View File

@ -0,0 +1 @@
wDEVNUMgVOICEINTERFACE = wanpipeDEVNUM, , TDM_SPAN_VOICE_API, Comment

View File

@ -0,0 +1 @@
wDEVNUMgSS7SIGCHAN = wanpipeDEVNUM, , API, Comment

View File

@ -0,0 +1,24 @@
[wanpipeDEVNUM]
CARD_TYPE = AFT
S514CPU = FECPU
CommPort = PRI
AUTO_PCISLOT = NO
PCISLOT = SLOTNUM
PCIBUS = BUSNUM
FE_MEDIA = FEMEDIA
FE_LCODE = FELCODE
FE_FRAME = FEFRAME
FE_LINE = FELINE
TE_CLOCK = FECLOCK
TE_REF_CLOCK = TEREFCLOCK
TESIGMODE
TE_HIGHIMPEDANCE = NO
TE_RX_SLEVEL = RXSLEVEL
LBO = FELBO
FE_TXTRISTATE = NO
MTU = 80
UDPPORT = 9000
TTL = 255
IGNORE_FRONT_END = NO
TDMV_HW_DTMF = HWDTMF

View File

@ -0,0 +1,7 @@
[wDEVNUMgVOICEINTERFACE]
ACTIVE_CH = TDMVOICECHAN
TDMV_ECHO_OFF = NO
TDMV_HWEC = HWECMODE
MTU = CHUNKTIME
MRU = CHUNKTIME

View File

@ -0,0 +1,4 @@
[wDEVNUMgSS7SIGCHAN]
HDLC_STREAMING = YES
ACTIVE_CH = SS7SIGCHAN

View File

@ -0,0 +1,18 @@
<configuration name="openzap.conf" description="OpenZAP Configuration">
<settings>
<param name="debug" value="0"/>
<!--<param name="hold-music" value="$${moh_uri}"/>-->
<!--<param name="enable-analog-option" value="call-swap"/>-->
<!--<param name="enable-analog-option" value="3-way"/>-->
</settings>
<boost_spans>
<!--BOOSTPRI-->
<!--BOOSTBRI-->
</boost_spans>
<analog_spans>
<!--SANGOMA_FXO-->
<!--SANGOMA_FXS-->
</analog_spans>
</configuration>

View File

@ -0,0 +1,4 @@
#Warning: This file was added by the wancfg_zaptel utility.
wanpipe_enable="NO"
wanrouter_rc_file="/usr/local/etc/wanpipe/wanrouter.rc"

View File

@ -0,0 +1,11 @@
#!/bin/sh
# smg.rc SMG_RC FILE
# Autogenrated by wancfg_zaptel.pl on MYDATE
# Note: This file is 'executed' by the shell script, so
# the usual shell syntax must be observed.
SANGOMA_PRID="YES_NO"
SANGOMA_BRID="YES_NO"
SANGOMA_SS7ISUP="YES_NO"
SANGOMA_SS7BOOST="YES_NO"
SANGOMA_MEDIA_GATEWAY="YES_NO"

View File

@ -0,0 +1,148 @@
;Country:
;possible values (default:europe):
;australia, austria, belgium, canada, chile, denmark, europe, finland, france,
;germany, hong_kong, india, irlande, israel, italy, japan, korea, luxembourg,
;netherlands, new_zealand, norway, portugal, singapore, south_africa, spain,
;sweden, switzerland, taiwan, uk, usa, ussr
;
;country=europe
;Verbose:
;Increase level to at least 5 when debugging protocol related issues
;possible values (default:1):
;1-10
;
;verbose=3
;Protocol capture:
;Enable/disable BRI protocol stack capture
;possible values (default:no):
;yes/no
;
;prot_capture=no
;D-channel log:
;Enable/disable d-channel log
;Log file stored in /var/log/bri_log_span_#
;possible values (default:no)
;yes/no
;
;dchan_log=no
;Dialplan:
;Some switches require the 'type of number' network specific facility IE to be set.
;This affects outgoing calls only.
;possible values (default:unknown):
;unknown
;national
;international
;network_specific
;subscriber
;abbreviated
;dialplan=unknown
;Numberingplan:
;Some switches require the 'number plan' network specific facility IE to be set.
;This affects outgoing calls only.
;possible values (default:unknown):
;unknown
;isdn ;ISDN/telephony numbering plan (CCITT E.164/E.163)
;telephone ;telephony - not in CEPT
;data ;data numbering plan (CCITT X.121)
;telex ;telex numbering plan (CCITT F.69)
;national ;national standard numbering plan
;private ;private numbering plan
;reserved
;
;numberingplan=unknown
;dialplan=unknown
;Servicetype:
;The requested service type
;This affects outgoing calls only.
;possible values (default:voice):
;
;voice ;voice service
;voice-gci ;voice service on GCI service
;audio-7 ;7Khz audio service
;data ;data service
;data-56k ;data at 56kbs service
;data-trans ;transparent data service
;modem ;modem data service
;fax ;G3 facsimile service
;fax-4 ;G4 facsimile service
;v110 ;V.110 service
;v120 ;V.120 service
;video ;video service
;
;servicetype=voice
;Prefix:
;Prepends digits for calling number on incoming calls based on
;"type of number" network specific facility IE.
;This affects incoming calls only.
;
;unknown_prefix=
;national_prefix=
;international_prefix=
;networkspf_prefix=
;subscriber_prefix=
;abbreviated_prefix=
;
;international_prefix=001
;Local Number (MSN):
;Used in point to multipoint configurations
;Protocol will only answer if called number = local number
;
;local_number=12356789
;Incoming calls behaviour
;See http://wiki.sangoma.com/BriAdvancedOptions for details
;in_calls_behaviour=VOICE_ALERT_RQ
;Outgoing calls behaviour
;See http://wiki.sangoma.com/BriAdvancedOptions for details
;out_calls_behaviour=USER_SENDING_COMPLETE
;General calls behaviour
;See http://wiki.sangoma.com/BriAdvancedOptions for details
;gen_calls_behaviour=CHAN_ALLOC_LOWEST
;Number of incoming digits
;Number of digits to route call if "Sending complete" bit is not set
;This only applies to incoming calls in overlap dial mode only
;possible values(default:8)
;1-31
;
;num_digits=8
;Signalling:
;Signalling method.
;possible values (default:bri_te)
;bri_te :Customer side
;bri_nt ;Network side (Telco)
;Connection:
;Connection type
;Most telcos use point_to_multipoint.
;set to point_to_point when connecting a NT port to ISDN BRI phone
;possible values (default:point_to_multipoint)
;point_to_point
;point_to_multipoint
;
;connection_type=point_to_multipoint
;Group:
;Group assigned for outgoing calls
;possible values (default:1)
;1-63
;
;group=1
;Spans
;Physical spans
;spans=1,2,3,4

View File

@ -0,0 +1,37 @@
#!/bin/bash
cmd=$1;
while [ ! -z "$2" ];
do
args=$args"$2 "
shift
done
function parse_args()
{
for arg in $args
do
case $arg in
nosyslog)
use_syslog=0;
;;
safe)
use_safe=1;
;;
esac
done
}
parse_args
if [ "$cmd" = "start" ]; then
smg_ctrl safe_start
elif [ "$cmd" = "stop" ]; then
smg_ctrl stop
elif [ "$cmd" = "restart" ]; then
smg_ctrl restart
else
echo "Invalid command";
fi

View File

@ -0,0 +1,93 @@
;comment
;See http://wiki.sangoma.com/SmgPriAdvancedOptions for more details
;Debug Logging
;possible values:(yes/no)
;default:no
;This can result to a lot of prints in the logs, do not enable this unless advised to do so by Sangoma Tech Support.
debug_log=no
;Boost Logging
;possible values:(yes/no)
;default:no
;This can result to a lot of prints in the logs, do not enable this unless advised to do so by Sangoma Tech Support.
boost_log=no
;Verbosity
;possible values:(1-10)
;default:0
;Recommended value for production is 3, for debugging 5
;verbose=3
;Trunkgroup
;possible values:(1-32)
;group=1
;D-Channel logging
;possible values:(yes/no/q931/q921)
;log file will be in /var/log/sangoma_pri/dchan_N.log, where N is the span Number.
;default:no
;example:dchan_log=yes
dchan_log=no
;Switchtype
;possible values:(national/dms100/5ess/euroisdn)
;default:national
;example:switchtype=national
;Prefixes
;These will prepend the calling number on incoming calls based on the Type of Number(TON) and Numbering Plan Identification(NPI).
;See http://wiki.sangoma.com/SmgPriAdvancedOptions for more details
;
;national_prefix
;international_prefix
;unknown_prefix
;private_prefix
;local_prefix
;
;examples:
;national_prefix=01
;international_prefix=011
;Dialplan
;These will set the Type of Number(TON) and Numbering Plan Identification(NPI) on outgoing calls.
;See http://wiki.sangoma.com/SmgPriAdvancedOptions for more details
;
;possible values:(unknown/national/international/local/private/auto)
;
;examples:
;callingparty_dialplan:national
;calledparty_dialplan=auto
;redirectingnumber_dialplan=international
;Spans
;possible values:(1-32)
;examples:
;spans=1
;spans=1-5
;spans=1-5,7
;Channels
;possible values:(s1c1-s1c23 for T1, s1c1-s1c15,s1c17-s1c31 for E1)
;This is used when fractional mode is required, or multiple trunkgroups per span are required.
;examples:
;chans=s1c1-s1c23,s2c1-s2c23
;
;Note:chans and spans cannot be used for the same span, i.e spans=1 will give the same result as chans=s1c1-s1c23 for a T1 span,
;So configs like:
;
; spans=1
; chans=s2c1-s2c24
;And
; chans=s1c1-s1c24
; spans=2
;
;Will give the exact same result
;
;Using a config like:
; spans=1
; chans=s1c1-s1c20
;Will result to an error, because the same channels are specified twice

View File

@ -0,0 +1,27 @@
#!/bin/sh
cnt=0
max_delay=30
i=0
#for ((i=0;i<$max_delay;i++))
while [ $i != $max_delay ]
do
if [ -e /dev/wanpipe ]; then
break;
fi
echo "Waiting for TDM iAPI device /dev/wanpipe ($i/$max_delay)..."
i=$((i+1));
sleep 2
done
if [ ! -e /dev/wanpipe ]; then
echo
echo "Error: Sangoma TDM API device failed to come up";
echo "Possible Cause: UDEV not installed!";
echo
exit 1
fi
sleep 1
smg_ctrl start

View File

@ -0,0 +1,24 @@
cnt=0
max_delay=30
for ((i=0;i<$max_delay;i++))
do
if [ -e /dev/wanpipe ]; then
break;
fi
echo "Waiting for TDM API device /dev/wanpipe ($i/$max_delay)..."
sleep 2
done
if [ ! -e /dev/wanpipe ]; then
echo
echo "Error: Sangoma TDM API device failed to come up";
echo "Possible Cause: UDEV not installed!";
echo
exit 1
fi
sleep 1
smg_ctrl start

View File

@ -0,0 +1,2 @@
#!/bin/sh
smg_ctrl stop

View File

@ -0,0 +1,20 @@
#================================================
# WANPIPE1 Configuration File
#================================================
#
# Date: Tue June 12 18:18:28 EST 2007
#
# Note: This file was generated automatically
# by /usr/sbin/wancfg program.
#
# If you want to edit this file, it is
# recommended that you use wancfg program
# to do so.
#================================================
# Sangoma Technologies Inc.
#================================================
[devices]
wanpipeDEVNUM = WAN_AFT_TE1, Comment
[interfaces]

View File

@ -0,0 +1,3 @@
wDEVNUMgVOICEINTERFACE = wanpipeDEVNUM, , TDM_VOICE_API, Comment

View File

@ -0,0 +1,2 @@
wDEVNUMgSS7SIGCHAN = wanpipeDEVNUM, , XMTP2_API, Comment

Some files were not shown because too many files have changed in this diff Show More