New CVS tree

This commit is contained in:
fritz 1997-02-17 00:08:36 +00:00
commit d4b424274c
47 changed files with 13790 additions and 0 deletions

340
COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

55
Makefile Normal file
View File

@ -0,0 +1,55 @@
# $Id: Makefile,v 1.1 1997/02/17 00:08:37 fritz Exp $
#
# Toplevel Makefile for isdn4k-utils
#
I4LVERSION=2.1
SUBDIRS=`find . -type d -maxdepth 1`
all:
@set -e; allow_null_glob_expansion=1; \
NOMAKE=true; \
for i in */Makefile ; do \
$(MAKE) -C `dirname $$i` all; \
NOMAKE=false; \
done; \
if $$NOMAKE ; then \
echo 'Please configure the package with "make config" first!'; \
fi
install:
@set -e; allow_null_glob_expansion=1; \
for i in */Makefile ; do \
$(MAKE) -C `dirname $$i` install ;\
done
uninstall:
@set -e; allow_null_glob_expansion=1; \
for i in */Makefile ; do \
$(MAKE) -C `dirname $$i` uninstall ;\
done
clean:
@set -e; allow_null_glob_expansion=1; \
for i in */Makefile ; do \
$(MAKE) -C `dirname $$i` clean ;\
done
distclean:
@set -e; allow_null_glob_expansion=1; \
for i in */Makefile ; do \
$(MAKE) -C `dirname $$i` distclean ;\
done
config:
@set -e; allow_null_glob_expansion=1; \
for i in */Makefile.in ; do \
$(MAKE) -C `dirname $$i` -f Makefile.in config ;\
done
mrproper: distclean
archive: distclean
(cd .. ;\
mv isdn4k-utils isdn4k-utils-$(I4LVERSION) ;\
tar cvzf distisdn/isdn4k-utils-$(I4LVERSION).tar.gz isdn4k-utils-$(I4LVERSION) ;\
mv isdn4k-utils-$(I4LVERSION) isdn4k-utils )

70
README Normal file
View File

@ -0,0 +1,70 @@
#
# $Id: README,v 1.1 1997/02/17 00:08:37 fritz Exp $
#
This is the README file for the "isdn4k-utils" package from "The i4l-crew".
This package contains the following utilities:
isdnctrl, general linklevel setup utility.
icnctrl, setup utility for the icn driver.
telesctrl, setup utility for the teles and HiSax driver.
pcbitctrl, setup utility for the pcbit driver.
imon, a tty based utility for monitoring ISDN-activities.
isdnlog, a set of utilities for connection logging.
isdnmon, a TclTk based utility for monitoring ISDN-activities.
System prerequisites:
To use this package, you need a kernel with an ISDN-subsystem configured.
To get a such a kernel, take a clean standard-kernel (> Version 2.0.29 or
> 2.1.26 resp.) enable the isdn-related features you want and build the
kernel as usual. If applicable some patches may be needed
isdn-patches are available at
ftp.franken.de:/pub/isdn4linux
For using modularized parts of the ISDN-subsystem, newest modutils
are strongly recommended.
3. Configuration, Compilation.
Run "make config"
This will run various configuration-scripts for each sub-package.
Run "make"
This builds all utilities except the TclTk-script "isdnmon"
4. Installation
For the following steps, root permissions are necessary
a) Create the device-inodes:
make devices
b) Install the utilities, the manpages and config-files:
make install
The config files usually are installed in /etc/isdn/
5. Application
The directory ./etc contains an example startup-script which gets
not installed automatically, because it MUST BE CONFIGURED IN ANY
CASE! Please don't try to connect to the Internet without setting
your own IP-addresses. This script is intended to be used with
the modularized version of the ISDN-subsystem. Refer to the
Documentation/isdn subdirectory of your kernel-sourcetree for
more information on configuring Lowlevel drivers.
For the utilities "isdnctrl", "icnctrl" "telesctrl" and "imon" refer to
the manpages. For the other contributed utilities, look into their
subdirectories for Documentation.
For tips, troubleshooting etc. look into the FAQ subdirectory
-Fritz

36
doc/Makefile.in Normal file
View File

@ -0,0 +1,36 @@
# $Id: Makefile.in,v 1.1 1997/02/17 00:08:41 fritz Exp $
#
# Makefile for ISDN manpages
# (C) 1997 Fritz Elfert
#
#
SHELL = /bin/sh
MANPAGES = ttyI.4
INSTALL_MAN = @INSTALL@ -o 0 -g 0 -m 0644
prefix = @prefix@
mandir = @mandir@
all: $(MANPAGES)
config:
@./configure
install:
@for i in $(MANPAGES) ; do \
MANSECT=`echo $$i | cut -d. -f2` ;\
MANDIR=$(mandir)/man$$MANSECT ;\
mkdir -p $$MANDIR ;\
$(INSTALL_MAN) $$i $$MANDIR/$$i ;\
done
uninstall:
@for i in $(MANPAGES) ; do ;\
MANSECT=`echo $i | cut -d. -f2` ;\
MANDIR=$(mandir)man$$MANSECT ;\
rm -f $$MANDIR/$$i ;\
done
clean:
distclean:
rm -f config.status config.cache config.log Makefile

798
doc/configure vendored Executable file
View File

@ -0,0 +1,798 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.10
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_default_prefix=/usr
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case "$ac_option" in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir="$ac_optarg" ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$ac_optarg" ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file="$ac_optarg" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix="$ac_optarg" ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he)
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
-host | --host | --hos | --ho)
ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir="$ac_optarg" ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir="$ac_optarg" ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir="$ac_optarg" ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir="$ac_optarg" ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir="$ac_optarg" ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir="$ac_optarg" ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix="$ac_optarg" ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix="$ac_optarg" ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix="$ac_optarg" ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name="$ac_optarg" ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir="$ac_optarg" ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir="$ac_optarg" ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.10"
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
eval "with_${ac_package}=no" ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes="$ac_optarg" ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries="$ac_optarg" ;;
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
if test "x$nonopt" != xNONE; then
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
fi
nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>./config.log
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
# NLS nuisances.
# Only set LANG and LC_ALL to C if already set.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
else
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
echo "loading site script $ac_site_file"
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
for ac_prog in ginstall installbsd scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
# OSF/1 installbsd also uses dspmsg, but is usable.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
done
;;
esac
done
IFS="$ac_save_ifs"
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL="$ac_install_sh"
fi
fi
echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
>> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.10"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
*) echo "\$ac_cs_usage"; exit 1 ;;
esac
done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@INSTALL@%$INSTALL%g
CEOF
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
# Adjust relative srcdir, etc. for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dir_suffix= ac_dots=
fi
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
case "$ac_given_INSTALL" in
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
fi; done
rm -f conftest.subs
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

9
doc/configure.in Normal file
View File

@ -0,0 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT()
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_INSTALL
AC_SUBST(INSTALL)
AC_OUTPUT(Makefile)

2
doc/install-sh Executable file
View File

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

364
doc/ttyI.4 Normal file
View File

@ -0,0 +1,364 @@
.TH TTYI 4 "2 April 1996"
.UC 4
.SH NAME
ttyI, cui \- ISDN character devices
.br
.SH DESCRIPTION
.I ttyIx and cuix
are the character devices of the isdn4linux ISND driver package.
They can be used in the same way as the traditional serial
devices
.I ttySx
and
.I cuax.
The official major device numbers are
.I 43
for ttyI
and
.I 44
for cui. The minor device numbers start with
.I 0
and end with
.I 63.
The ISDN devices provide a modem emulation with a set of
traditional and some special AT commands. This provides easy use
together with almost all communication software that uses modem
commands:
.I minicom\c
(1),
.I seyon\c
(1),
.I XCept\c
(1),
.I uucico\c
(8) (Taylor UUCP),
.I mgetty\c
(8),
.I dip\c
(8),
.I pppd\c
(8) and more.
The line disciplines are handled by the kernel so that SLIP,
CSLIP and asynchronous PPP are possible.
The port speed of the
.I ttyIx
and
.I cuix
devices is always 64000 bps.
.SH AT COMMAND SET
The following
.I AT commands
are supported by
.I ttyIx
and
.I cuix.
.TP 8
.B ATA
Answer an incoming call.
.TP 8
.B ATD <num>
Dial number <num>. Allowed are digits [0-9] and the characters
",", "#", ".", "*", "W", "P", "T", "S", "-". The characters are
ignored except of "S" which indicates a SPV if it preceedes the
number (\c
.B only
German 1TR6 ISDN).
.TP 8
.B ATE0
Echo off.
.TP 8
.B ATE1
Echo on (default).
.TP 8
.B ATH
Hang up.
.TP 8
.B ATH0
Hang up.
.TP 8
.B ATH1
Off hook (ignored).
.TP 8
.B ATI
Return device Information ("ISDN for Linux...").
.TP 8
.B ATI0
Return device Information ("ISDN for Linux...").
.TP 8
.B ATI1
Return device Information ("ISDN for Linux...").
.TP 8
.B ATO
Return from command mode to online mode (data mode).
.TP 8
.B ATQ0
Enable result codes (default).
.TP 8
.B ATQ1
Disable result codes.
.TP 8
.B ATSx=y
Set register x to value y.
.TP 8
.B ATSx?
Show content of register x.
.TP 8
.B ATV0
Print result code as number.
.TP 8
.B ATV1
Print result code as text (default).
.TP 8
.B ATZ
Reset all registers and load profile values.
.TP 8
.B AT&Bx
Set packet size of outgoing packets to value x (maximum 4000).
The actual packet size depends on the hardware driver and may be
smaller than the given value x (e.g. with the teles driver).
There will be
.B no
error message if the value is bigger than the hardware driver
can process. However the size of the outgoing packets will be
set correctly.
.TP 8
.B AT&D2
DTR falling edge: hang up and return to command mode (default).
.TP 8
.B AT&D3
DTR falling edge: hang up, return to command mode and reset all
registers.
.TP 8
.B AT&Ex
Set MSN (Euro-ISDN, E-DSS1) or EAZ (German 1TR6) to value x. For
MSNs set x to the whole MSN, for EAZ's x should be only the last
digit of the Number.
.TP 8
.B AT&F
Set all registers and profile to "factory-defaults".
.TP 8
.B AT&V
Show all settings.
.TP 8
.B AT&W0
Write registers and EAZ/MSN to profile. (You need to run
.I iprofd\c
(8) for making changes permanent.)
.TP 8
.B AT&Xx
Enable (x=1) or disable (x=0) BTX-Mode.
.LP
.SH ESCAPE SEQUENCE
During a connection the driver can be set to command mode while
typing in
.B<delay>+++<delay>.
The escape character (default "+") may be set via register 2.
The delay must be at least 1.5 seconds, between each escape
character the pause must not exceed 0.5 seconds.
.LP
.I
ATO
brings the modem emulation back to data mode.
.LP
.SH REGISTERS
.TP 4
.B 0
Number of rings on which the "modem" will answer. (S0=0 will
disable auto answering). (Default 0).
.TP 4
.B 1
Counts and stores the number of rings from an incoming call.
.TP 4
.B 2
ASCII code of the escape character. (Default 43 = "+").
.TP 4
.B 3
ASCII code of Carriage Return (Default 13 = CR).
.TP 4
.B 4
ASCII code of Line Feed (Default 10 = LF).
.TP 4
.B 5
ASCII code of Backspace (Default 8 = BS).
.TP 4
.B 6
Duration, in number of seconds, modem waits before dialing.
(Default 3).
.TP 4
.B 7
Wait time for carrier in seconds (ignored, default 60).
.TP 4
.B 8
Pause time for comma (,) in dial command in seconds (ignored,
default 2).
.TP 4
.B 9
Carrier detect time in tenths of seconds (ignored, default 6).
.TP 4
.B 10
Wait time until hangup after carrier loss in tenths of seconds
(ignored, default 7).
.TP 4
.B 11
Duration and delay in milliseconds for touch tone dialing
(ignored, default 70).
.TP 4
.B 12
Bit-mapped register (default 69)
.br
.in +.5i
.ti -.5i
Bit
.sp -1
Description
.ti -.5i
0
.sp -1
0 = Suppress response messages.
.br
1 = Show response messages.
.ti -.5i
1
.sp -1
0 = Response messages as text.
.br
1 = Numeric response messages.
.ti -.5i
2
.sp -1
0 = Echo off.
.br
1 = Echo on.
.ti -.5i
3
.sp -1
0 = DCD always on.
.br
1 = DCD follows carrier.
.ti -.5i
4
.sp -1
0 = CTS follows RTS.
.br
1 = Ignore RTS, CTS always on.
.ti -.5i
5
.sp -1
0 = Low-edge on DTR: Hangup and return to command mode.
.br
1 = Same as 0 but also resets all registers.
.ti -.5i
6
.sp -1
0 = DSR always on.
.br
1 = DSR on only if channel is available.
.ti -.5i
7
.sp -1
0 = Cisco-PPP-flag-hack off (default).
.br
1 = Cisco-PPP-flag-hack on.
.TP 4
.B 13
Bit-mapped register (default 0)
.br
.in +.5i
.ti -.5i
Bit
.sp -1
Description
.ti -.5i
0
.sp -1
0 = Use delayed sending of data.
.br
1 = Immediately send data.
.ti -.5i
1
.sp -1
0 = T.70 protocol off.
.br
1 = T.70 protocol on.
.TP 4
.B 14
Layer-2 protocol
.br
0 = X75/LAPB with I-frames (default)
.br
1 = X75/LAPB with UI-frames
.br
2 = X75/LAPB with BUI-frames
.br
3 = HDLC
.TP 4
.B 15
Layer-3 protocol
0 = transparent (default)
.TP 4
.B 16
Outgoing packet size / 16 (default 250).
.TP 4
.B 17
reserved.
.TP 4
.B 18
Service-Octet-1 to accept or to be used on dialout.
Bit-mapped register (default 4)
.br
.in +.5i
.ti -.5i
Bit
.sp -1
Description
.ti -.5i
0
.sp -1
Service 1 (audio) when set.
.br
.ti -.5i
1
.sp -1
Service 5 (BTX) when set.
.br
.ti -.5i
2
.sp -1
Service 7 (data) when set.
.br
.ti -.5i
Note:
.sp -1
It is possible to set more than one bit. In this case, on incoming calls
the selected services are accepted, and if the service is "audio", the
Layer-2-protocol is automatically changed to 4 regardless of the setting
of register 14. On outgoing calls, the most significant 1-bit is chosen to
select the outgoing service octet.
.br
.TP 4
.B 19
Service-Octet-2.
.TP 4
.B 20
Service-Octet-1 of last incoming call (readonly). Bit-mapped register.
Mapping is the same like register 18.
.LP
.SH BUGS
This man page is not complete.
.LP
.SH AUTHOR
Volker Goetz <volker@oops.franken.de>
.LP
.SH SEE ALSO
.I icnctrl\c
\&(8),
.I telesctrl\c
\&(8),
.I isdninfo\c
\&(4),
.I isdnctrl\c
\&(8).

57
icn/Makefile.in Normal file
View File

@ -0,0 +1,57 @@
# $Id: Makefile.in,v 1.1 1997/02/17 00:08:49 fritz Exp $
#
# Makefile for icnctrl
# (C) 1997 Fritz Elfert
#
#
SHELL = /bin/sh
CFLAGS = -Wall -O2 -I. @DEBUGVAR@ -I@KERNELDIR@drivers/isdn/icn
LDFLAGS = -L../lib @LIBS@
PROGRAM = icnctrl
MODULES = icnctrl.o
MANPAGE = icnctrl.8
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
SBINDIR = /sbin
mandir = @mandir@
MAN8DIR = $(mandir)/man8
CC = @CC@
.SUFFIXES:
.SUFFIXES: .c .o
all: $(PROGRAM)
config:
@./configure
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
$(PROGRAM): $(MODULES)
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
install-man: $(PROGRAM).man
mkdir -p $(MAN8DIR)
$(INSTALL_MAN) $< $(MAN8DIR)/$(MANPAGE)
install: $(PROGRAM) install-man
$(INSTALL_PROGRAM) $(PROGRAM) $(SBINDIR)/$(PROGRAM)
install-strip: $(PROGRAM)
$(INSTALL_PROGRAM) -s $(PROGRAM) $(SBINDIR)/$(PROGRAM)
uninstall:
rm -f $(SBINDIR)/$(PROGRAM) $(MAN8DIR)/$(MANPAGE)
clean:
rm -f *.o *~ $(PROGRAM)
distclean: clean
rm -f config.status config.cache config.log Makefile

22
icn/config.h.in Normal file
View File

@ -0,0 +1,22 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the valloc function. */
#undef HAVE_VALLOC
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

1394
icn/configure vendored Executable file

File diff suppressed because it is too large Load Diff

37
icn/configure.in Normal file
View File

@ -0,0 +1,37 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(icnctrl.c)
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
dnl Find current kernel source
dnl done by dereferencing the symbolic link /usr/include/linux
dnl and then stripping off include/linux from the result.
AC_CHECK_HEADERS(linux/isdn.h,\
KERNELDIR="/usr/include/`find /usr/include/linux -maxdepth 0 -printf '%l\n' | sed -e s@include/linux@@`", \
AC_MSG_ERROR("Missing linux/isdn.h. Kernel source installed?"))
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MMAP
dnl Check, if user wants dump option for debugging
AC_ARG_ENABLE(dump,--enable-dump Enable dump feature for debugging,\
DEBUGVAR=-D__DEBUGVAR__)
AC_SUBST(INSTALL)
AC_SUBST(KERNELDIR)
AC_SUBST(DEBUGVAR)
AC_OUTPUT(Makefile)

381
icn/icnctrl.c Normal file
View File

@ -0,0 +1,381 @@
/* $Id: icnctrl.c,v 1.1 1997/02/17 00:08:53 fritz Exp $
* ICN-ISDN driver for Linux. (Control-Utility)
*
* Copyright 1994,95 by Fritz Elfert (fritz@wuemaus.franken.de)
* Copyright 1995 Thinking Objects Software GmbH Wuerzburg
*
* This file is part of Isdn4Linux.
*
* Isdn4Linux is distributed with NO WARRANTY OF ANY KIND. No author
* or distributor accepts any responsibility for the consequences of using it,
* or for whether it serves any particular purpose or works at all, unless he
* or she says so in writing. Refer to the Isdn4Linux Free Public
* License (the "License") for full details.
*
* Every copy of Isdn4Linux must include a copy of the License,
* normally in a plain ASCII text file named LICENSE. The License grants you
* the right to copy, modify and redistribute Isdn4Linux, but only
* under certain conditions described in the License. Among other things, the
* License requires that the copyright notice and this notice be preserved on
* all copies.
*
* $Log: icnctrl.c,v $
* Revision 1.1 1997/02/17 00:08:53 fritz
* New CVS tree
*
* Revision 1.2 1996/11/22 15:04:25 fritz
* Minor cosmetix fix.
*
* Revision 1.1.1.1 1996/10/08 10:03:12 fritz
* First Import.
*
* Revision 1.6 1995/12/18 18:25:24 fritz
* Support for ICN-4B Cards.
*
* Revision 1.5 1995/10/29 21:44:02 fritz
* Changed to support DriverId's.
* Added support for leased lines.
*
* Revision 1.4 1995/04/23 13:43:02 fritz
* Changed Copyright.
*
* Revision 1.3 1995/02/01 11:03:26 fritz
* Added Messages, when loading bootcode and protocol.
*
* Revision 1.2 1995/01/09 07:41:59 fritz
* Added GPL-Notice
*
*
*/
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <linux/isdn.h>
#ifdef __DEBUGVAR__
#define __KERNEL__
#endif
#include <icn.h>
#ifdef __DEBUGVAR__
typedef struct dbgstruct {
ulong card;
ulong dev;
} dbgstruct;
dbgstruct dbg;
#endif
int mem_fd;
char *cmd;
char *ctrldev;
int arg_ofs;
#if 0
/* #ifdef _POSIX_MAPPED_FILES */
#define DO_VIA_MMAP
#else
#include <malloc.h>
#endif
void
usage()
{
fprintf(stderr, "usage: %s [-d driverId] io [mmio port] (get/set hw-io)\n", cmd);
#ifdef __DEBUGVAR__
fprintf(stderr, " or: %s [-d driverId] dump (dump driver data)\n", cmd);
#endif
fprintf(stderr, " or: %s [-d driverId] add <portbase> [id1 [id2]] (Add a new card\n", cmd);
fprintf(stderr, " or: %s [-d driverId] load <bootcode> <protocol> (load firmware)\n", cmd);
fprintf(stderr, " or: %s [-d driverId] leased <on|off> (Switch interface,\n",cmd);
fprintf(stderr, " Channel n\n");
fprintf(stderr, " into Leased-Line-Mode)\n");
exit(-1);
}
#ifdef __DEBUGVAR__
u_char *
mapmem(ulong where, long size)
{
u_char *addr;
#ifdef DO_VIA_MMAP
ulong realw;
long ofs;
#endif
if ((mem_fd = open("/dev/mem", O_RDWR)) < 0) {
perror("open /dev/mem");
exit(1);
}
#ifdef DO_VIA_MMAP
size = ((size / PAGE_SIZE) + 2) * PAGE_SIZE;
realw = PAGE_ALIGN(where) - PAGE_SIZE;
ofs = where - realw;
printf("%08lx - %08lx = %08x\n", where, realw, ofs);
addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED,
mem_fd, realw);
if ((int) addr < 0) {
perror("mmap");
exit(1);
}
return (addr + ofs);
#else
addr = malloc(size);
lseek(mem_fd, where, SEEK_SET);
read(mem_fd, addr, size);
return addr;
#endif
}
void
dump_dev(icn_dev * p)
{
printf("dev struct at: %p\n", p);
printf("phys. dev struct at: 0x%08lx\n", dbg.dev);
printf("shmem: %p\n", p->shmem);
printf("mvalid: %d\n", p->mvalid);
printf("channel: %d\n", p->channel);
printf("mcard: %p\n", p->mcard);
printf("chanlock: %d\n", p->chanlock);
printf("firstload: %d\n", p->firstload);
}
void
qdump(ulong queue)
{
struct sk_buff_head *p;
p = (struct sk_buff_head *) mapmem(queue, sizeof(struct sk_buff_head));
printf(" len: %d\n", p->qlen);
}
void
dump_card(icn_card * p)
{
printf("card struct at: %p\n", p);
printf("phys. card struct at: 0x%08lx\n", dbg.card);
printf("next: %p\n", p->next);
printf("other: %p\n", p->other);
printf("port: 0x%04x\n", p->port);
printf("myid: %d\n", p->myid);
printf("rvalid: %d\n", p->rvalid);
printf("leased: %d\n", p->leased);
printf("flags: 0x%04x\n", p->flags);
printf("doubleS0: %d\n", p->doubleS0);
printf("secondhalf: %d\n", p->secondhalf);
printf("fw_rev: %d\n", p->fw_rev);
printf("ptype: %d\n", p->ptype);
printf("st_timer\n");
printf("rb_timer\n");
printf("rcvbuf\n");
printf("rcvidx[0]: %d\n", p->rcvidx[0]);
printf("rcvidx[1]: %d\n", p->rcvidx[1]);
printf("l2_proto[0] %d\n", p->l2_proto[0]);
printf("l2_proto[1] %d\n", p->l2_proto[1]);
printf("interface:\n");
printf("iptr: %d\n", p->iptr);
printf("imsg: %s\n", p->imsg);
printf("msg_buf: %p\n", p->msg_buf);
printf("msg_buf_write: %p\n", p->msg_buf_write);
printf("msg_buf_read: %p\n", p->msg_buf_read);
printf("msg_buf_end: %p\n", p->msg_buf_end);
printf("sndcount[0]: %d\n", p->sndcount[0]);
printf("sndcount[1]: %d\n", p->sndcount[1]);
printf("spqueue[0]: %p\n", &p->spqueue[0]);
qdump((ulong) & p->spqueue[0]);
printf("spqueue[1]: %p\n", &p->spqueue[1]);
qdump((ulong) & p->spqueue[1]);
printf("regname: %s\n", p->regname);
printf("xmit_lock[0]: %d\n", p->xmit_lock[0]);
printf("xmit_lock[1]: %d\n", p->xmit_lock[1]);
}
#endif
int
main(int argc, char **argv)
{
int fd;
FILE *code;
int mmio,
port;
int ac;
int a;
u_char buf[0x20000];
isdn_ioctl_struct ioctl_s;
icn_cdef newcard;
cmd = strrchr(argv[0], '/');
cmd = (cmd == NULL) ? argv[0] : ++cmd;
if (argc > 1) {
if (!strcmp(argv[1], "-d")) {
strcpy(ioctl_s.drvid, argv[2]);
arg_ofs = 3;
} else {
ioctl_s.drvid[0] = '\0';
arg_ofs = 1;
}
} else
usage();
ac = argc - (arg_ofs - 1);
fd = open("/dev/isdnctrl", O_RDWR);
if (fd < 0) {
perror(ctrldev);
exit(-1);
}
#ifdef __DEBUGVAR__
if (!strcmp(argv[arg_ofs], "dump")) {
char *p;
ioctl_s.arg = (ulong) & dbg;
if ((ioctl(fd, ICN_IOCTL_DEBUGVAR + IIOCDRVCTL, &ioctl_s)) < 0) {
perror("ioctl DEBUGVAR");
exit(-1);
}
close(fd);
p = mapmem(dbg.dev, sizeof(icn_dev));
dump_dev((icn_dev *) p);
p = mapmem(dbg.card, sizeof(icn_card));
dump_card((icn_card *) p);
return 0;
}
#endif
if (!strcmp(argv[arg_ofs], "leased")) {
if (ac == 3) {
ioctl_s.arg = 0;
if ((!strcmp(argv[arg_ofs + 1], "on")) ||
(!strcmp(argv[arg_ofs + 1], "yes")))
ioctl_s.arg = 1;
if ((ioctl(fd, ICN_IOCTL_LEASEDCFG + IIOCDRVCTL, &ioctl_s)) < 0) {
perror("ioctl LEASEDCFG");
exit(-1);
}
close(fd);
return 0;
}
}
if (!strcmp(argv[arg_ofs], "add")) {
if (ac >= 3) {
sscanf(argv[arg_ofs + 1], "%i", &a);
if (a == 0x300 || a == 0x310 || a == 0x320 || a == 0x330
|| a == 0x340 || a == 0x350 || a == 0x360 ||
a == 0x308 || a == 0x318 || a == 0x328 || a == 0x338
|| a == 0x348 || a == 0x358 || a == 0x368) {
ioctl_s.arg = (unsigned long) &newcard;
newcard.port = a;
newcard.id1[0] = 0;
newcard.id2[0] = 0;
if (ac >= 4)
strncpy(newcard.id1, argv[arg_ofs + 2], sizeof(newcard.id1) - 1);
if (ac == 5)
strncpy(newcard.id2, argv[arg_ofs + 3], sizeof(newcard.id2) - 1);
if ((ioctl(fd, ICN_IOCTL_ADDCARD + IIOCDRVCTL, &ioctl_s)) < 0) {
perror("ioctl ADDCARD");
exit(-1);
}
close(fd);
return 0;
}
}
}
if (!strcmp(argv[arg_ofs], "io")) {
if (ac == 4) {
if (sscanf(argv[arg_ofs + 1], "%i", &mmio) != 1)
usage();
if (sscanf(argv[arg_ofs + 2], "%i", &port) != 1)
usage();
ioctl_s.arg = mmio;
if ((mmio = ioctl(fd, ICN_IOCTL_SETMMIO + IIOCDRVCTL, &ioctl_s)) < 0) {
perror("ioctl SETMMIO");
exit(-1);
}
ioctl_s.arg = port;
if ((port = ioctl(fd, ICN_IOCTL_SETPORT + IIOCDRVCTL, &ioctl_s)) < 0) {
perror("ioctl SETPORT");
exit(-1);
}
}
if ((mmio = ioctl(fd, ICN_IOCTL_GETMMIO + IIOCDRVCTL, &ioctl_s)) < 0) {
perror("ioctl GETMMIO");
exit(-1);
}
if ((port = ioctl(fd, ICN_IOCTL_GETPORT + IIOCDRVCTL, &ioctl_s)) < 0) {
perror("ioctl GETPORT");
exit(-1);
}
printf("Memory-mapped io at 0x%08lx, port 0x%03x\n",
(unsigned long) mmio, (unsigned short) port);
close(fd);
return 0;
}
if (!strcmp(argv[arg_ofs], "load")) {
int needed;
switch (ioctl(fd, ICN_IOCTL_GETDOUBLE + IIOCDRVCTL, &ioctl_s)) {
case 0:
needed = 4;
break;
case 1:
needed = 5;
break;
default:
perror("ioctl GETDOUBLE");
exit(-1);
}
if (ac == needed) {
if (!(code = fopen(argv[arg_ofs + 1], "r"))) {
perror(argv[arg_ofs + 1]);
exit(-1);
}
if (fread(buf, 4096, 1, code) < 1) {
fprintf(stderr, "Read error on %s\n", argv[arg_ofs + 1]);
exit(-1);
}
printf("Loading Bootcode %s ... ", argv[arg_ofs + 1]);
fflush(stdout);
ioctl_s.arg = (ulong) buf;
if (ioctl(fd, ICN_IOCTL_LOADBOOT + IIOCDRVCTL, &ioctl_s) < 0) {
perror("\nioctl LOADBOOT");
exit(-1);
}
fclose(code);
printf("done\n");
if (!(code = fopen(argv[arg_ofs + 2], "r"))) {
perror(argv[arg_ofs + 2]);
exit(-1);
}
if (fread(buf, 65536, 1, code) < 1) {
fprintf(stderr, "Read error on %s\n", argv[arg_ofs + 2]);
exit(-1);
}
fclose(code);
if (needed == 5) {
if (!(code = fopen(argv[arg_ofs + 3], "r"))) {
perror(argv[arg_ofs + 3]);
exit(-1);
}
if (fread(buf + 65536, 65536, 1, code) < 1) {
fprintf(stderr, "Read error on %s\n", argv[arg_ofs + 3]);
exit(-1);
}
fclose(code);
printf("Loading Protocols %s\n", argv[arg_ofs + 2]);
printf(" and %s ... ", argv[arg_ofs + 3]);
} else
printf("Loading Protocol %s ... ", argv[arg_ofs + 2]);
fflush(stdout);
ioctl_s.arg = (ulong) buf;
if (ioctl(fd, ICN_IOCTL_LOADPROTO + IIOCDRVCTL, &ioctl_s) < 0) {
perror("\nioctl LOADPROTO");
exit(-1);
}
printf("done\n");
close(fd);
return 0;
}
usage();
}
usage();
return 0;
}

84
icn/icnctrl.man Normal file
View File

@ -0,0 +1,84 @@
.TH ICNCTRL 8 "3. September 1995"
.UC 4
.SH NAME
icnctrl \- configure ICN-ISDN-adaptor
.SH SYNOPSIS
icnctrl [-d DriverId] action options ...
.br
.SH DESCRIPTION
.I icnctrl
is used to setup the ICN-ISDN devicedriver and for downloading the
firmware into the ISDN-card.
.LP
The use of
.I icnctrl
makes sense, if you are using an ICN-card only.
.LP
.SH OPTIONS
.TP 5
.B -d DriverId
is used to identify the driver when using more than one ICN-card. For every
card, a icn-moudule has to be loaded into the kernel-space. While loading
the module with
.I insmod,
the driverId is set by appending
.I id=MyId
to the normal insmod-commandline. For this feature insmod from the package
.I modules-1.2.8
or newer should be used as it supports string-initializations.
.LP
The following
.I actions
may be given to
.I icnctrl.
.TP 5
.B add port [id1 [id2]]
Enables support for an additional card in the driver. If id1 and id2
are missing, adds an ICN-2B with an id given by the system. with id2
missing, adds an ICN-2B with an id given by the user. With both ids
given, adds an ICN-4B with both ids given by the user. There is
no checking against port-conflicts. Ports are checked at first activation
while downloading the firmware and can be changed at runtime. Ids are
checked against conflicts, and if a conflict happens, replaced by the
system in the same manner as if no id was given.
.TP 5
.B io [baseadress port]
Sets the adress of the Memory-mapped IO-region and the port-base.
After loading the icn-module into kernel-space, this command
should be used as the very first setup, if the hardware settings are
different from the default settings below.
If both parameters are omitted, prints out current settings. The
default memory-adress is 0xD0000, the default port-base is 0x320.
The ICN-Card uses 4 port-adresses.
.TP 5
.B leased <on|off>
Switches between normal (dialup) and leased-line mode. Leased-line-mode
is intended for usage with S64K-lines. These lines do not have a D-Channel.
.TP 5
.B load <bootcode> <firmware>
Downloads the firmware into the card and starts operation. Using this
command, after loading the icn-module into kernel-space the first real
access to the hardware is done. Therefore the
.I io
-command above, should be used before, if the hardware settings are different
from the default settings.
Usually the bootcode is called
.I loadpg.bin.
The firmware depends on the type of ISDN-line. For german 1TR6-lines, the
firmware is called
.I pc_1t_ca.bin.
For Euro-ISDN-lines, it is called
.I pc_eu_ca.bin.
.LP
.SH AUTHOR
Fritz Elfert <fritz@wuemaus.franken.de>
.LP
.SH SEE ALSO
.I ttyI\c
\&(4),
.I isdnctrl\c
\&(8),
.I telesctrl\c
\&(8),
.I isdninfo\c
\&(4).

2
icn/install-sh Executable file
View File

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

59
imon/Makefile.in Normal file
View File

@ -0,0 +1,59 @@
# $Id: Makefile.in,v 1.1 1997/02/17 00:08:58 fritz Exp $
#
# Makefile for iMON
#
# (C) Michael Knigge, 1995
# (C) 1996 Fritz Elfert
#
#
SHELL = /bin/sh
CFLAGS = -Wall -O2 -I. $(ISDN_INCLUDE)
LDFLAGS = -L../lib @LIBS@
PROGRAM = imon
MODULES = imon.o
MANPAGE = imon.8
HEADERS = config.h
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
SBINDIR = /sbin
mandir = @mandir@
MAN8DIR = $(mandir)/man8
CC = @CC@
.SUFFIXES:
.SUFFIXES: .c .o
all: $(PROGRAM)
config:
@./configure
config.h: config.h.in
@./configure
$(MODULES): $(HEADERS)
$(PROGRAM): $(MODULES)
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
install-man: imon.man
mkdir -p $(MAN8DIR)
$(INSTALL_MAN) $< $(MAN8DIR)/$(MANPAGE)
install: $(PROGRAM) install-man
$(INSTALL_PROGRAM) $(PROGRAM) $(SBINDIR)/$(PROGRAM)
install-strip: $(PROGRAM)
$(INSTALL_PROGRAM) -s $(PROGRAM) $(SBINDIR)/$(PROGRAM)
uninstall:
rm -f $(SBINDIR)/$(PROGRAM) $(MAN8DIR)/$(MANPAGE)
clean:
rm -f *.o *~ $(PROGRAM)
distclean: clean
rm -f config.h config.status config.cache config.log Makefile

12
imon/config.h.in Normal file
View File

@ -0,0 +1,12 @@
/* $Id: config.h.in,v 1.1 1997/02/17 00:08:59 fritz Exp $ */
/* Define if you have the <curses.h> header file. */
#undef HAVE_CURSES_H
/* Define if you have the <curses/ncurses.h> header file. */
#undef HAVE_CURSES_NCURSES_H
/* Define if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H
/* Define if you have the <ncurses/curses.h> header file. */
#undef HAVE_NCURSES_CURSES_H

1664
imon/configure vendored Executable file

File diff suppressed because it is too large Load Diff

36
imon/configure.in Normal file
View File

@ -0,0 +1,36 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(imon.c)
AC_CONFIG_HEADER(config.h)
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for libraries.
AC_CHECK_LIB(ncurses, newpad,,
AC_CHECK_LIB(curses, newpad,,
AC_MSG_ERROR("Missing ncurses library")))
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/time.h unistd.h)
AC_CHECK_HEADERS(ncurses.h,,
AC_CHECK_HEADERS(ncurses/curses.h,,
AC_CHECK_HEADERS(curses/ncurses.h,,
AC_CHECK_HEADERS(curses.h,,
AC_MSG_ERROR("Missing \(n\)curses.h")))))
dnl Check for linux/isdn.h, give up if not found.
AC_CHECK_HEADER(linux/isdn.h,,AC_MSG_ERROR("Missing linux/isdn.h. Kernel source installed?"))
dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_TIME
AC_STRUCT_TM
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(select)
AC_SUBST(INSTALL)
AC_OUTPUT(Makefile)

573
imon/imon.c Normal file
View File

@ -0,0 +1,573 @@
/* $Id: imon.c,v 1.1 1997/02/17 00:09:03 fritz Exp $
*
* iMON , extended version.
* original iMON source (c) Michael Knigge
* heavily modified and extended by Fritz Elfert
*
* $Log: imon.c,v $
* Revision 1.1 1997/02/17 00:09:03 fritz
* New CVS tree
*
*/
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#ifdef HAVE_NCURSES_H
# include <ncurses.h>
#endif
#ifdef HAVE_CURSES_H
# include <curses.h>
#endif
#ifdef HAVE_CURSES_NCURSES_H
# include <curses/ncurses.h>
#endif
#ifdef HAVE_NCURSES_CURSES_H
# include <ncurses/curses.h>
#endif
#include <linux/isdn.h>
#define KEY_Q 81
#define KEY_q 113
#define CURSOR_INVISIBLE 0
#define CURSOR_NORMAL 1
#define CURSOR_BOLD 2
#define WHITE_ON_BLUE 1
#define YELLOW_ON_BLUE 2
#define RED_ON_BLUE 3
#define GREEN_ON_BLUE 4
#define WHITE_ON_BLACK 5
struct phone_entry {
struct phone_entry *next;
char phone[30];
char name[30];
};
static int enable_quit = 1;
static int show_names = 0;
static int stat_x;
static int stat_y;
static FILE *isdninfo;
static int color;
static char *phonebook;
static struct phone_entry *phones;
static char idmap_line[4096];
static char chmap_line[4096];
static char drmap_line[4096];
static char usage_line[4096];
static char flags_line[4096];
static char phone_line[4096];
WINDOW *statwin;
WINDOW *stathdr;
time_t current_time;
static int Star(char *, char *);
/*
* Wildmat routines
*/
static int wildmat(char *s, char *p) {
register int last;
register int matched;
register int reverse;
for ( ; *p; s++, p++)
switch (*p) {
case '\\':
/* Literal match with following character; fall through. */
p++;
default:
if (*s != *p)
return(0);
continue;
case '?':
/* Match anything. */
if (*s == '\0')
return(0);
continue;
case '*':
/* Trailing star matches everything. */
return(*++p ? Star(s, p) : 1);
case '[':
/* [^....] means inverse character class. */
if ((reverse = (p[1] == '^')))
p++;
for (last = 0, matched = 0; *++p && (*p != ']'); last = *p)
/* This next line requires a good C compiler. */
if (*p == '-' ? *s <= *++p && *s >= last : *s == *p)
matched = 1;
if (matched == reverse)
return(0);
continue;
}
return(*s == '\0');
}
static int Star(char *s, char *p) {
while (wildmat(s, p) == 0)
if (*++s == '\0')
return(0);
return(1);
}
/*
* Read phonebook file and create a linked
* list of phone entries.
*/
static void readphonebook() {
FILE *f;
struct phone_entry *p;
struct phone_entry *q;
char line[255];
char *s;
if (!(f = fopen(phonebook, "r"))) {
fprintf(stderr, "Can't open %s\n",phonebook);
}
p = phones;
while (p) {
q = p->next;
free(p);
p = q;
}
phones = NULL;
while (fgets(line,sizeof(line),f)) {
if ((s = strchr(line,'\n')))
*s = '\0';
if (line[0]=='#')
continue;
s = strchr(line,'\t');
*s++ = '\0';
if (strlen(line) && strlen(s)) {
q = malloc(sizeof(struct phone_entry));
q->next = phones;
strcpy(q->phone,line);
strcpy(q->name,s);
phones = q;
}
}
fclose(f);
if (!phones)
show_names = 0;
}
/*
* Find a phone number in list of phone entries.
* If found, return corresponding name, else
* return number string.
*/
char *find_name(char *num) {
struct phone_entry *p = phones;
static char tmp[100];
sprintf(tmp, "%-28s", num);
if (!show_names)
return(tmp);
while (p) {
if (wildmat(num, p->phone)) {
sprintf(tmp, "%-28s", p->name);
break;
}
p = p->next;
}
return tmp;
}
void cleanup(int dummy) {
/*
* okay, all done. clear the screen and quit ncurses
*/
fclose(isdninfo);
clear();
if (color == TRUE) {
attron(COLOR_PAIR(WHITE_ON_BLACK));
attroff(A_BOLD);
}
endwin();
exit(0);
}
void usage(void) {
fprintf(stderr,"usage: imon [-q][-p PhoneBookFile]\n");
exit(-1);
}
/*
* init ncurses and check if colors can be used.
*/
int imon_init_ncurses(int *color) {
initscr();
noecho();
nonl();
refresh();
cbreak();
nodelay(stdscr,TRUE);
keypad(stdscr,TRUE);
curs_set(CURSOR_INVISIBLE);
statwin = newpad(ISDN_MAX_CHANNELS, 100);
stathdr = newpad(3, 100);
if ((*color = has_colors()) == TRUE) {
start_color();
init_pair(WHITE_ON_BLUE, COLOR_WHITE, COLOR_BLUE);
init_pair(YELLOW_ON_BLUE, COLOR_YELLOW, COLOR_BLUE);
init_pair(RED_ON_BLUE, COLOR_RED, COLOR_BLUE);
init_pair(GREEN_ON_BLUE, COLOR_GREEN, COLOR_BLUE);
init_pair(WHITE_ON_BLACK, COLOR_WHITE, COLOR_BLACK);
}
return(TRUE);
}
/*
* Draw the static part of the screen.
*/
int imon_draw_mask(int color) {
int line;
int col;
if (color == TRUE) {
attron(A_BOLD);
wattron(statwin,A_BOLD);
wattron(stathdr,A_BOLD);
attron(COLOR_PAIR(WHITE_ON_BLUE));
}
move(0, 0);
addch(ACS_ULCORNER);
for(col=2; col<COLS; col++)
addch(ACS_HLINE);
addch(ACS_URCORNER);
for (line=1; line<LINES-4; line++) {
move(line, 0);
addch(ACS_VLINE);
for(col=2; col<COLS; col++)
addch(32);
addch(ACS_VLINE);
}
move(LINES-4, 0);
addch(ACS_LLCORNER);
for(col=2; col<COLS; col++)
addch(ACS_HLINE);
addch(ACS_LRCORNER);
if (color == TRUE) {
attroff(COLOR_PAIR(WHITE_ON_BLUE));
attron(COLOR_PAIR(WHITE_ON_BLACK));
}
if (enable_quit) {
move(LINES-2, 1);
addstr("Press Q to quit");
}
if (phonebook) {
move(LINES-2, 17);
addstr("Press R - read Phonebook, S - Show ");
addstr((show_names)?"phonenumbers":"names");
}
if(color == TRUE) {
attroff(COLOR_PAIR(WHITE_ON_BLACK));
attron(COLOR_PAIR(YELLOW_ON_BLUE));
wattroff(stathdr, COLOR_PAIR(WHITE_ON_BLACK));
wattron(stathdr, COLOR_PAIR(YELLOW_ON_BLUE));
}
mvaddstr(1, 2, "iMON 2.0");
mvaddstr(1, COLS-23 , "Last Update: ");
mvwaddstr(stathdr, 0, 0, "Nr. LineID Status Phone Number Usage Type ");
wmove(stathdr, 1, 0);
for(col=1; col<100; col++)
waddch(stathdr, ACS_HLINE);
if(color == TRUE) {
attroff(COLOR_PAIR(YELLOW_ON_BLUE));
wattroff(stathdr, COLOR_PAIR(YELLOW_ON_BLUE));
}
return(TRUE);
}
static void imon_read_status() {
/*
* read the 6 important lines
*/
fgets(idmap_line, 4095, isdninfo);
fgets(chmap_line, 4095, isdninfo);
fgets(drmap_line, 4095, isdninfo);
fgets(usage_line, 4095, isdninfo);
fgets(flags_line, 4095, isdninfo);
fgets(phone_line, 4095, isdninfo);
#ifdef TEST_IMON
sprintf(idmap_line, "idmap: TA250034 - - - - - - - - - - - - - - -");
sprintf(chmap_line, "chmap: 0 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1");
sprintf(drmap_line, "drmap: 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1");
sprintf(usage_line, "usage: 1 2 0 3 4 0 5 0 129 0 130 131 132 0 0 133");
sprintf(flags_line, "flags: 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?");
sprintf(phone_line, "phone: 05114711 0815 ??? 5555 666666666 ??? 4711 ??? 875257 ??? 77848 7890 2345467 ??? ??? 88888");
#endif
}
/*
* Update the status window.
*/
int imon_draw_status(int color, time_t *current_time) {
struct tm *now;
char *ptr_idmap;
char *ptr_chmap;
char *ptr_usage;
char *ptr_flags;
char *ptr_phone;
char *s_phone;
char drvid[15];
char s_drvid[15];
char status[15];
char phone[30];
char s_usage[15];
char inout[10];
char temp[30];
int usage;
int chanum;
int flags;
int line;
int len;
ptr_idmap = idmap_line + 7;
ptr_chmap = chmap_line + 7;
ptr_usage = usage_line + 7;
ptr_flags = flags_line + 7;
ptr_phone = phone_line + 7;
/*
* now print info for every line
*/
for(line=0; line<ISDN_MAX_CHANNELS; line++) {
sscanf(ptr_idmap, "%s %n", drvid, &len);
sprintf(s_drvid,"%-13s",drvid);
ptr_idmap += len;
sscanf(ptr_usage, "%d %n", &usage, &len);
ptr_usage += len;
sscanf(ptr_phone, "%s %n", phone, &len);
ptr_phone += len;
sscanf(ptr_chmap, "%d %n", &chanum, &len);
ptr_chmap += len;
if (chanum == 0) {
sscanf(ptr_flags, "%d %n", &flags, &len);
ptr_flags += len;
}
/* A channel-number of -1 indicates an nonexistent channel */
if (chanum==-1) {
sprintf(temp,"%2d ", line);
if (color) {
wattroff(statwin, A_BOLD);
wattron(statwin, COLOR_PAIR(WHITE_ON_BLUE));
}
mvwaddstr(statwin, line, 0, temp);
continue;
}
/*
* if usage&7 is zero, there is no connection
*/
if (usage&64)
wattron(statwin, A_BOLD);
else
wattroff(statwin, A_BOLD);
if (!(usage & 7)) {
if (color)
wattron(statwin, COLOR_PAIR(GREEN_ON_BLUE));
sprintf(status, "%s",(usage&64)?"Exclusive ":"Offline ");
sprintf(phone, " ");
s_phone = phone;
sprintf(s_usage, " ");
sprintf(inout, " ");
} else {
int online = (flags & (1<<chanum));
if (color) {
if (online)
wattron(statwin, COLOR_PAIR(RED_ON_BLUE));
else {
wattron(statwin, A_BOLD);
wattron(statwin, COLOR_PAIR(YELLOW_ON_BLUE));
}
}
sprintf(status, online?"Online ":"Calling ");
sprintf(inout, (usage&ISDN_USAGE_OUTGOING)?"Outgoing ":"Incoming ");
switch (usage & 7) {
case ISDN_USAGE_RAW:
sprintf(s_usage, "Raw ");
break;
case ISDN_USAGE_MODEM:
sprintf(s_usage, "Modem ");
break;
case ISDN_USAGE_NET:
sprintf(s_usage, "Net ");
break;
case ISDN_USAGE_VOICE:
sprintf(s_usage, "Voice ");
break;
case ISDN_USAGE_FAX:
sprintf(s_usage, "Fax ");
break;
default:
sprintf(s_usage, "----- ");
break;
}
s_phone = find_name(phone);
}
sprintf(temp,"%2d ", line);
mvwaddstr(statwin, line, 0, temp);
mvwaddstr(statwin, line, 4, s_drvid);
mvwaddstr(statwin, line, 17, status);
mvwaddstr(statwin, line, 27, s_phone);
mvwaddstr(statwin, line, 55, s_usage);
mvwaddstr(statwin, line, 67, inout);
}
now = localtime(current_time);
sprintf(temp, "%02d:%02d:%02d", now->tm_hour,now->tm_min,now->tm_sec);
if (color == TRUE)
attron(COLOR_PAIR(YELLOW_ON_BLUE));
mvaddstr(1, COLS-10, temp);
prefresh(stathdr, 0, stat_x, 3, 2, 5, COLS-3);
prefresh(statwin, stat_y, stat_x, 5, 2, LINES-5, COLS-3);
return(TRUE);
}
void do_resize(int dummy) {
endwin();
imon_init_ncurses(&color);
imon_draw_mask(color);
imon_draw_status(color, &current_time);
refresh();
signal(SIGWINCH, do_resize);
}
int main(int argc, char **argv) {
int quit , i;
fd_set fdset;
struct timeval timeout;
/*
* check parameters
*/
phonebook = NULL;
phones = NULL;
for (i=1;i<argc;i++) {
if (argv[i][0] == '-')
switch (argv[i][1]) {
case 'q':
enable_quit = 0;
break;
case 'p':
if (i<argc) {
phonebook = argv[++i];
show_names = 1;
} else usage();
break;
default:
usage();
} else
usage();
}
if (phonebook)
readphonebook();
if (!(isdninfo = fopen("/dev/isdninfo", "r"))) {
fprintf(stderr, "Can't open /dev/isdninfo\n");
return(-1);
}
/*
* initialize ncurses and draw the main screen
*/
imon_init_ncurses(&color);
imon_draw_mask(color);
stat_x = 0;
stat_y = 0;
refresh();
quit = 0;
/*
* Install Signal-Handlers
*/
signal(SIGTERM,cleanup);
signal(SIGWINCH,do_resize);
if (enable_quit) {
signal(SIGHUP,cleanup);
signal(SIGINT,cleanup);
} else {
sigblock(SIGHUP);
sigblock(SIGINT);
}
/*
* loop until the user pressed "Q"
*/
do {
FD_ZERO(&fdset);
FD_SET(0,&fdset);
FD_SET(fileno(isdninfo),&fdset);
timeout.tv_sec = 10;
timeout.tv_usec = 0;
switch (select(32,&fdset,(fd_set *)0,(fd_set *)0,NULL)) {
case 0:
fprintf(stderr,"timeout\n");
break;
case 1:
case 2:
if (FD_ISSET(0,&fdset)) {
switch (getch()) {
case KEY_Q:
case KEY_q:
quit = enable_quit;
break;
case 'R':
case 'r':
if (phonebook)
readphonebook();
break;
case 'S':
case 's':
if (phones)
show_names = (show_names)?0:1;
break;
case KEY_LEFT:
if (stat_x > 0)
stat_x--;
break;
case KEY_RIGHT:
if (stat_x < (100-COLS-4))
stat_x++;
break;
case KEY_UP:
if (stat_y > 0)
stat_y--;
break;
case KEY_DOWN:
if (stat_y < ((ISDN_MAX_CHANNELS + 3) - (LINES-6)))
stat_y++;
break;
}
}
if (FD_ISSET(fileno(isdninfo),&fdset)) {
time(&current_time);
imon_read_status();
}
break;
case -1:
if (errno != EINTR) {
perror("select");
sleep(5);
exit(-1);
break;
}
}
imon_draw_status(color, &current_time);
refresh();
} while (!quit);
cleanup(0);
return 0;
}

40
imon/imon.man Normal file
View File

@ -0,0 +1,40 @@
.TH IMON 8 "15 January 1997"
.UC 4
.SH NAME
imon \- watch ISDN activities
.SH SYNOPSIS
imon [-q] [-p phonebook]
.br
.SH DESCRIPTION
.I imon
is tty based utility for watching ISDN activity.
.LP
.SH OPTIONS
.TP 5
.B -q
If this option is given, the facility of terminatig the program by
pressing 'Q' is disabled and the signals SIGHUP and SIGINT are caught.
This option is intended for starting imon from within an rc script
at boot time.
.LP
.TP 5
.B -p phonebook
is used to supply imon with a phonebook file. A phonebook file is very
simple. Every line has two elements separated by a TAB. The first element
is a phone number which can contain wildcards. The second element is a
descriptive string. For each active connection, this string is shown
instead the phone number. Pressing 'S' toggles between display of strings
and phone numbers. Pressing 'R' rereads the phonebook.
.LP
.SH AUTHOR
Fritz Elfert <fritz@wuemaus.franken.de>
.LP
.SH SEE ALSO
.I ttyI\c
\&(4),
.I isdnctrl\c
\&(8),
.I telesctrl\c
\&(8),
.I isdninfo\c
\&(4).

2
imon/install-sh Executable file
View File

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

51
iprofd/Makefile.in Normal file
View File

@ -0,0 +1,51 @@
# $Id: Makefile.in,v 1.1 1997/02/17 00:09:08 fritz Exp $
#
# Makefile for iprofd
# (C) 1997 Fritz Elfert
#
#
SHELL = /bin/sh
CFLAGS = -Wall -O2 -I. $(ISDN_INCLUDE)
LDFLAGS = -L../lib @LIBS@
PROGRAM = iprofd
MODULES = iprofd.o
MANPAGE = iprofd.8
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
SBINDIR = /sbin
mandir = @mandir@
MAN8DIR = $(mandir)/man8
CC = @CC@
.SUFFIXES:
.SUFFIXES: .c .o
all: $(PROGRAM)
config:
@./configure
$(PROGRAM): $(MODULES)
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
install-man: iprofd.man
mkdir -p $(MAN8DIR)
$(INSTALL_MAN) $< $(MAN8DIR)/$(MANPAGE)
install: $(PROGRAM) install-man
$(INSTALL_PROGRAM) $(PROGRAM) $(SBINDIR)/$(PROGRAM)
install-strip: $(PROGRAM)
$(INSTALL_PROGRAM) -s $(PROGRAM) $(SBINDIR)/$(PROGRAM)
uninstall:
rm -f $(SBINDIR)/$(PROGRAM) $(MAN8DIR)/$(MANPAGE)
clean:
rm -f *.o *~ $(PROGRAM)
distclean: clean
rm -f config.status config.cache config.log Makefile

1214
iprofd/configure vendored Executable file

File diff suppressed because it is too large Load Diff

22
iprofd/configure.in Normal file
View File

@ -0,0 +1,22 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(iprofd.c)
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/ioctl.h unistd.h)
AC_CHECK_HEADER(linux/isdn.h,,AC_MSG_ERROR("\nMissing linux/isdn.h. Kernel source installed?"))
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_SUBST(INSTALL)
AC_OUTPUT(Makefile)

2
iprofd/install-sh Executable file
View File

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

163
iprofd/iprofd.c Normal file
View File

@ -0,0 +1,163 @@
/* $Id: iprofd.c,v 1.1 1997/02/17 00:09:12 fritz Exp $
*
* Daemon for saving ttyIx-profiles to a file.
*
* Copyright 1994,95 by Fritz Elfert (fritz@wuemaus.franken.de)
* Copyright 1995 Thinking Objects Software GmbH Wuerzburg
*
* This file is part of Isdn4Linux.
*
* 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, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: iprofd.c,v $
* Revision 1.1 1997/02/17 00:09:12 fritz
* New CVS tree
*
*/
#define SIGNATURE "iprofd%02x"
#define SIGLEN 9
#include <sys/types.h>
#include <sys/fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <signal.h>
#include <linux/isdn.h>
typedef unsigned char uchar;
int isdnctrl_fd;
char *modemsettings;
#define BUFSZ ((ISDN_MODEM_ANZREG+ISDN_MSNLEN)*ISDN_MAX_CHANNELS)
void
dumpModem(int dummy) {
int fd;
int len;
char buffer[BUFSZ];
char signature[SIGLEN];
if ((len = ioctl(isdnctrl_fd,IIOCGETPRF,&buffer))<0) {
perror("ioctl IIOCGETPRF");
exit(-1);
}
fd = open(modemsettings,O_WRONLY|O_CREAT|O_TRUNC,0644);
if (fd<0) {
perror(modemsettings);
exit(-1);
}
sprintf(signature,SIGNATURE,TTY_DV);
write(fd,signature,sizeof(signature));
write(fd,buffer,len);
close(fd);
signal(SIGIO,dumpModem);
}
void
readModem(void) {
int len;
int fd;
char buffer[BUFSZ];
char signature[SIGLEN];
sprintf(signature,SIGNATURE,TTY_DV);
fd = open(modemsettings,O_RDONLY);
if (fd<0)
return;
len = read(fd,buffer,sizeof(signature));
if (len<0) {
perror(modemsettings);
exit(-1);
}
if (strcmp(buffer,signature)) {
fprintf(stderr,"Version of iprofd (%d) does NOT match\n",TTY_DV);
fprintf(stderr,"signature of saved data!\n");
fprintf(stderr,"Profiles NOT restored, use AT&W0 to update data.\n");
close(fd);
return;
}
len = read(fd,buffer,BUFSZ);
if (len<0) {
perror(modemsettings);
exit(-1);
}
close(fd);
if (ioctl(isdnctrl_fd,IIOCSETPRF,&buffer)<0) {
perror("ioctl IIOCSETPRF");
exit(-1);
}
}
void
usage(void) {
fprintf(stderr,"usage: iprofd <IsdnModemProfile>\n");
exit(-1);
}
void
main(int argc, char **argv) {
int data_version;
if (argc != 2)
usage();
modemsettings = argv[1];
isdnctrl_fd = open("/dev/isdninfo",O_RDWR);
if (isdnctrl_fd<0) {
perror("/dev/isdninfo");
exit(-1);
}
data_version = ioctl(isdnctrl_fd,IIOCGETDVR,0);
if (data_version<0) {
fprintf(stderr,"Could not get version of kernel modem-profile!\n");
fprintf(stderr,"Make sure, you are using the correct version.\n");
exit(-1);
}
close(isdnctrl_fd);
data_version &= 0xff;
if (data_version != TTY_DV) {
fprintf(stderr,"Version of kernel modem-profile (%d) does NOT match\n",
data_version);
fprintf(stderr,"version of iprofd (%d)!\n",TTY_DV);
fprintf(stderr,"Make sure, you are using the correct version.\n");
exit(-1);
}
isdnctrl_fd = open("/dev/isdnctrl",O_RDONLY);
if (isdnctrl_fd<0) {
perror("/dev/isdninfo");
exit(-1);
}
readModem();
switch (fork()) {
case -1:
perror("fork");
exit(-1);
break;
case 0:
dumpModem(0);
if (ioctl(isdnctrl_fd,IIOCSIGPRF,0)) {
perror("ioctl IIOCSIGPRF");
exit(-1);
}
while (1) sleep(1000);
break;
default:
break;
}
}

30
iprofd/iprofd.man Normal file
View File

@ -0,0 +1,30 @@
.TH IPROFD 8 "2. April 1996"
.UC 4
.SH NAME
iprofd \- Modem-register daemon
.SH SYNOPSIS
iprofd <registerfile>
.br
.SH DESCRIPTION
.I iprofd
is used to make the modem-register settings of the isdn-ttys AT-emulator
permanent and restore them during boot-time. It is usually started from within
a rc-script and puts itself into background. If the file given as parameter
already exists, all registers are restored from it's contents. After that,
it waits until getting a signal from the isdn-subsystem. Every time, a 'AT&W0'
command is given at a isdn-tty, it reads the current register-settings and
stores them into the registerfile.
.LP
.SH AUTHOR
Fritz Elfert <fritz@wuemaus.franken.de>
.LP
.SH SEE ALSO
.I ttyI\c
\&(4),
.I isdnctrl\c
\&(8),
.I telesctrl\c
\&(8),
.I isdninfo\c
\&(4).

51
isdnctrl/Makefile.in Normal file
View File

@ -0,0 +1,51 @@
# $Id: Makefile.in,v 1.1 1997/02/17 00:09:17 fritz Exp $
#
# Makefile for iprofd
# (C) 1997 Fritz Elfert
#
#
SHELL = /bin/sh
CFLAGS = -Wall -O2 -I. $(ISDN_INCLUDE)
LDFLAGS = -L../lib @LIBS@
PROGRAM = isdnctrl
MODULES = isdnctrl.o
MANPAGE = isdnctrl.8
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
SBINDIR = /sbin
mandir = @mandir@
MAN8DIR = $(mandir)/man8
CC = @CC@
.SUFFIXES:
.SUFFIXES: .c .o
all: $(PROGRAM)
config:
@./configure
$(PROGRAM): $(MODULES)
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
install-man: isdnctrl.man
mkdir -p $(MAN8DIR)
$(INSTALL_MAN) $< $(MAN8DIR)/$(MANPAGE)
install: $(PROGRAM) install-man
$(INSTALL_PROGRAM) $(PROGRAM) $(SBINDIR)/$(PROGRAM)
install-strip: $(PROGRAM)
$(INSTALL_PROGRAM) -s $(PROGRAM) $(SBINDIR)/$(PROGRAM)
uninstall:
rm -f $(SBINDIR)/$(PROGRAM) $(MAN8DIR)/$(MANPAGE)
clean:
rm -f *.o *~ $(PROGRAM)
distclean: clean
rm -f config.status config.cache config.log Makefile

1245
isdnctrl/configure vendored Executable file

File diff suppressed because it is too large Load Diff

23
isdnctrl/configure.in Normal file
View File

@ -0,0 +1,23 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(isdnctrl.c)
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/ioctl.h unistd.h)
AC_CHECK_HEADER(linux/isdn.h,,AC_MSG_ERROR("\nMissing linux/isdn.h. Kernel source installed?"))
AC_CHECK_HEADER(linux/isdnif.h,,AC_MSG_ERROR("\nMissing linux/isdnif.h. Kernel source installed?"))
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_SUBST(INSTALL)
AC_OUTPUT(Makefile)

2
isdnctrl/install-sh Executable file
View File

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

1030
isdnctrl/isdnctrl.c Normal file

File diff suppressed because it is too large Load Diff

268
isdnctrl/isdnctrl.man Normal file
View File

@ -0,0 +1,268 @@
.TH ISDNCTRL 8 "02. April 1996"
.UC 4
.SH NAME
isdnctrl \- get/set ISDN device information
.SH SYNOPSIS
isdnctrl action device ...
.br
.SH DESCRIPTION
.I isdnctrl
is used to create and delete network interfaces for ISDN, set up
the various parameters and phone numbers for dial in and dial
out. It is also used to list the current paramteters of an
already configured interface.
.LP
The use of
.I isdnctrl
is independent of the hardware driver.
.LP
.SH OPTIONS
The following
.I actions
may be given to
.I isdnctrl.
.TP 5
.B addif [name]
Adds a new ISDN IP-interface "name" to the kernel. If "name" is
omitted, the kernel will use "ethX", while X is an increasing
number starting from 0.
.TP 5
.B delif name
Removes the ISDN IP-interface "name" from the kernel.
.TP 5
.B addphone name out num
Set the phone number(s) of the remote site for the IP-interface
"name". More than one number can be set by calling
.I isdnctrl addphone
repeatedly. If more than one number is set these will be tried
one after another. When using an german SPV-type connection,
with a ICN-card, the number has to be preceeded by a capital S.
.TP 5
.B addphone name in num
Set the phone number(s) that the IP-interface "name" is supposed
to accept for incoming calls. If no number is given incoming
calls are disabled. More than one number can be set by calling
.I isdnctrl addphone
repeatedly. Also wildcards can be used (see below).
.TP 5
.B delphone name in|out num
Remove phone number "num" from the incoming or outgoing phone list.
.TP 5
.B eaz name [num]
Set the EAZ (German 1TR6 protocol) or MSN (Euro-ISDN E-DSS1) for
interface "name" to "num". For an EAZ this is only one digit, for
a MSN "num" is the whole MSN. If "num" is omitted
.I isdnctrl eaz name
prints the current setting for interface "name".
.TP 5
.B huptimeout name [seconds]
Set the hangup timeout for interface "name" to "seconds". If
there is inactivity (i.e. no traffic on the interface) for the
given time the driver automatically shuts down the connection.
If "seconds" is omitted
.I isdnctrl huptimeout name
prints the current setting for interface "name".
.TP 5
.B cbdelay name [seconds]
Set the callback delay for interface "name" to "seconds". If
callback mode for this interface is
.I in
, dialing is delayed the given time. If the callback mode is
.I out
, after dialing out and waiting the given time, a hangup is
issued to free the line for the incoming callback from the remote
machine. This hangup-after-dial is disabled by setting cbdelay to
0.
If "seconds" is omitted
.I isdnctrl cbdelay name
prints the current setting for interface "name".
.TP 5
.B dialmax name [num]
Set the number of dial atempts for interface "name" to "num". If
dialing, each phonenumber is tried this many times before giving up.
If "num" is omitted
.I isdnctrl dialmax name
prints the current setting for interface "name".
.TP 5
.B ihup name [on|off]
Turn on or off the hangup timeout for incoming calls on
interface "name". If none of on or off is given the current
setting is printed.
.TP 5
.B chargehup name [on|off]
Turn on or off hangup before next charge info for interface
name. This can only be used if the ISDN provider transmits
charge info during and after the connection. If set to on, the
driver will close the connection just before the next charge
info will be received if the interface is inactive. If none of
on or off is given the current setting is printed.
.TP 5
.B chargeint name [seconds]
When "seconds" are given, the charge interval for the given
interface is set. This may be of use on ISDN lines with no
chargeinfo or no online chargeinfo. The connection will only
be closed 2 seconds before the end of the next charge interval
and only, if
.I huptimeout
seconds of inactivity have been reached. If
.I ihup
is on, also incomming connections are closed by this mechanism.
On lines with online charge info you also might ask by
.I chargeint name
for the current charge interval as delivered from the
telecom on a given interface.
.TP 5
.B secure name [on|off]
Turns on or off the security feature for interface "name". If
set to on, incoming calls will only be accepted if the calling
number has been added to the access list with
.I isdnctrl addphone name in.
If none of on or off is given the current setting is printed.
.TP 5
.B callback name [on|off|in|out]
Selects callback mode for interface "name". If callback mode is
.I in
, then after getting an incoming call, a callback is triggered. If
callback mode is
.I out
, then this system does the initial call, then waiting for callback of
the remote machine. The option
.I on
is available only for compatibility with older versions. Its meaning is
the same like
.I in.
.TP 5
.B cbhup name [on|off]
Turns on or off Hangup (Reject) for interface "name" before starting Callback.
If none of on or off is given the current
setting is printed.
.TP 5
.B encap name [encapname]
Set the encapsulation mode for interface "name". Possible modes
for encapname are:
.B rawip
raw ip encapsulation (default)
.B ip
ip + typefield encapsulation
.B cisco_h
Special mode for communicating with a Cisco in HDLC-mode.
.B ethernet
ethernet over ISDN
.B syncppp
Synchronous PPP over ISDN
.B uihdlc
raw ip with additional ui-header
If encapname is omitted the current setting is printed.
.TP 5
.B l2_prot name [protocol]
Set the layer-2 protocol for interface "name". Possible values
for "protocol" are
.B x75i, x75ui, x75bui
and
.B hdlc
If protocol is omitted the current setting is printed.
.TP 5
.B l3_prot name [protocol]
Set the layer-3 protocol for interface "name". At the moment only
.B trans
is supported.
If protocol is omitted the current setting is printed.
.TP 5
.B list name
List all parameters and the charge info for interface "name".
.TP 5
.B verbose <num>
Set verbosity level to <num>.
.TP 5
.B hangup name
The connection of interface "name" is cloes immediately.
.TP 5
.B bind name driverId channel [exclusive]
Binds an interface "name" to specific physical channel.
The driverId identifies the desired driver. The channels of a card start
counting with zero. If "exclusive" is given, other
interfaces cannot use that interface anymore.
.TP 5
.B unbind name
Unbinds a the previously bound interface "name".
.TP 5
.B busreject driverId [on|off]
If switched on, isdn4linux replies a REJECT to incoming calls, it
cannot match to any configured interface. If switched off, nothing
happens in this case.
.I You normally should NOT enable this feature, if the ISDN-adaptor is not the only device, connected to the S0-bus. Otherwise it could happen, that isdn4linux rejects an incoming call, which belongs to another device on the bus.
.TP 5
.B addslave name slavename
Adds a slave interface to interface "name" for channel-bundling. For bundling
of more than two channels, any number of slaves can be added to an interface.
"name"must refer to an existing "real" interface (not a slave). Slaves are
not visible to the kernel, however all usual ISDN-settings can be configured.
.B It is important
that slave interfaces are added
.B before
the corresponding master is started by
.B ifconfig.
If the master is already up, it has to be shutdown with
.B ifconfig down ...
otherwise the addslave command will be rejected.
.TP 5
.B sdelay name <num>
Set delay for slave-dialing.
An interface has to have a load of more than 7000 cps for at least this time
(in seconds), before it's slave is started.
.TP 5
.B dial name
Force dialing of interface "name".
.TP 5
.B mapping driverId MSN0[,MSN1[,MSN2]] ... [,MSN9]
Installs a mapping-table for MSN<->EAZ-mapping. See README for details.
.SH WILDCARDS
For matching incoming calls phone numbers can be be set by
.I isdnctrl addphone name in num
using pattern matching like the regular expressions in shells.
The following wildcards are supported:
.TP 7
.I ?
one arbitrary digit
.TP 7
.I *
zero or arbitrary many digits
.TP 7
.I [123]
one of the digits in the list
.TP 7
.I [1-5]
one digit between '1' and '5'
.TP 7
.I ^
as the first character in a list inverts the
list
.LP
.SH BUGS
This man page is not complete.
.LP
.SH AUTHOR
Volker Goetz <volker@oops.franken.de>
.LP
.SH SEE ALSO
.I ttyI\c
\&(4),
.I icnctrl\c
\&(8),
.I telesctrl\c
\&(8),
.I isdninfo\c
\&(4).

58
pcbit/Makefile.in Normal file
View File

@ -0,0 +1,58 @@
# $Id: Makefile.in,v 1.1 1997/02/17 00:09:27 fritz Exp $
#
# Makefile for pcbitctl
# (C) 1997 Fritz Elfert
#
#
SHELL = /bin/sh
CFLAGS = -Wall -Wstrict-prototypes -O2 -g -I. -DDEBUG -I@KERNELDIR@drivers/isdn/pcbit
LDFLAGS = -L../lib @LIBS@
PROGRAM = pcbitctl
MODULES = pcbitctl.o convhexbin.o
MANPAGE = pcbitctl.8
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
SBINDIR = /sbin
mandir = @mandir@
MAN8DIR = $(mandir)/man8
CC = @CC@
.SUFFIXES:
.SUFFIXES: .c .o
all: $(PROGRAM)
config:
@./configure
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
$(PROGRAM): $(MODULES)
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
#install-man: $(PROGRAM).man
# mkdir -p $(MAN8DIR)
# $(INSTALL_MAN) $< $(MAN8DIR)/$(MANPAGE)
install: $(PROGRAM) #install-man
$(INSTALL_PROGRAM) $(PROGRAM) $(SBINDIR)/$(PROGRAM)
install-strip: $(PROGRAM)
$(INSTALL_PROGRAM) -s $(PROGRAM) $(SBINDIR)/$(PROGRAM)
uninstall:
rm -f $(SBINDIR)/$(PROGRAM) #$(MAN8DIR)/$(MANPAGE)
clean:
rm -f *.o *~ $(PROGRAM)
distclean: clean
rm -f config.status config.cache config.log Makefile

106
pcbit/README.pt Normal file
View File

@ -0,0 +1,106 @@
------------------------------------------------------------------------------
README file for the PCBIT-D Device Driver.
------------------------------------------------------------------------------
This README file is in portuguese since the board is manufactured and
used, to my knowledge, only in Portugal.
In case you are interessed in a translation just mail me.
------------------------------------------------------------------------------
O driver para a PCBIT implementa as funções de comunicação com a
placa e uma maquina de estados que controla o establecimento de
ligacoes. Destina-se a ser utilizado em conjunto com o modulo
"isdn4linux" (ftp://ftp.franken.de/pub/isdn4linux) que se espera que
integre futuramente a distribuição do kernel. Este modulo realiza o
interface entre o ISDN e os interfaces normais de um sistema Unix
(ttys e devices de rede).
O driver destina-se a ser instalado em "run-time" no kernel através
do comando "insmod".
exemplo: root_shell# insmod pcbit [irq=X mem=0x?????]
A PCBIT utiliza por defeito o endereço de memoria 0xD0000 e o irq 5.
Caso os parametros de irq e memória base não sejam fornecidos o
driver tentará utilizar os valores por defeito.
A PCBIT necessita, na sua versão mais comum, que seja feito o load do
firmware. O comando pcbitctl permite, apos a instalacao do driver,
carregar o firmware da placa. O firmware não é distribuido com o
driver podendo encontrar-se nas disquetes que vêm com a placa ou em
ftp://puma.inesc.pt/.
São necessários os ficheiros:
- stpd.1
- stpd.2
- bitd.hex
Aviso: Estes ficheiros são distribuidos em modo de ficheiro de texto
de DOS. O comando pcbitctl necessita desses ficheiros em modo binario
(i.e. um ficheiro normal sem os LF e Ctrl-Z).
Para os utilizadores da RCU:
A RCU utiliza routers cisco como pontos de entrada, configurados para
utilizar PPP sincrono (i.e. encapsulação PPP sobre tramas HDLC no
canal B). Como tal é necessário utilizar devices de rede isdn com
encapsulação "syncPPP".
um exemplo de um script de para iniciar um interface:
#!/bin/bash
PATH=$PATH:<PATH_TO_ISDN_STUFF>
isdnctrl addif ippp0
isdnctrl l2_prot ippp0 hdlc
isdnctrl l3_prot ippp0 trans
isdnctrl encap ippp0 syncppp
isdnctrl addphone ippp0 out <num_isdn_da_rcu>
ifconfig ippp0 <ip-atribuido-ao-utilizador> pointopoint <ip-do-router>
route add default ippp0
isdnctrl huptimeout ippp0 180
ipppd /dev/ippp0 /dev/ippp1 useifip \
-detach debug \
mru 1524 -ac -vj \
+ua /etc/ppp/isdn-auth
nota:
o ficheiro /etc/ppp/isdn-auth é um ficheiro da forma:
username
passwd
o interface de rede é activado (e a conexão isdn establecida) quando
o utilizador der algum comando que implique acesso á rede.
ex: ping -c 1 <hostname>.
[normalmente existe um delay de 3-4 segundos no establecimento da ligação]
BUGS:
- o driver não permite um reload do firmware após o firmware ter sido
carregado.
- existem erros de comunicação driver/placa que se exibem em
situações de tráfego intenso. (alguns deste problemas podem mesmo ser
provocados por bugs no firmware da placa)
Mailing lists:
isdn4linux - isdn4linux@hub-wue.franken.de (majordomo)
enviar:
- informação sobre bugs, comentários, sujestões e patchs ao código p/
roque@di.fc.ul.pt.
- flames p/
/dev/null
Pedro.

1286
pcbit/configure vendored Executable file

File diff suppressed because it is too large Load Diff

31
pcbit/configure.in Normal file
View File

@ -0,0 +1,31 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(convhexbin.c)
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
dnl Find current kernel source
dnl done by dereferencing the symbolic link /usr/include/linux
dnl and then stripping off include/linux from the result.
AC_CHECK_HEADERS(linux/isdn.h,\
KERNELDIR="/usr/include/`find /usr/include/linux -maxdepth 0 -printf '%l\n' | sed -e s@include/linux@@`", \
AC_MSG_ERROR("Missing linux/isdn.h. Kernel source installed?"))
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS(strerror)
AC_SUBST(INSTALL)
AC_SUBST(KERNELDIR)
AC_OUTPUT(Makefile)

135
pcbit/convhexbin.c Normal file
View File

@ -0,0 +1,135 @@
#include <stdio.h>
#include <sys/types.h>
/*
* Copyright (c) 1993, 1994, 1995, INESC. All Rights Reserved.
* Licensed Material-Property of INESC
*
*/
int hexbin(FILE *, unsigned char *, int, int);
int
convhexbin (char *filename, unsigned char *buf, int size)
{
FILE *fpr;
int retval;
register int lastmem;
char str[100];
/* Abre ficheiro de entrada */
if ((fpr=fopen (filename,"rb")) == NULL)
return (-1);
/* le primeira linha do ficheiro stpd */
fgets(str, 80, fpr);
/* Poe buf a 0x00 */
for (lastmem=0 ; lastmem < size ; lastmem++)
buf[lastmem]=0x00;
/* Converte para binario */
retval = hexbin(fpr, buf, 0x100000-1024, 0xfffff);
fclose (fpr);
return retval;
}
int
hexbin(FILE *fpr, unsigned char *ar256k, int firstend, int lastend)
{
unsigned char str [80], i, cc;
u_int linha, nn, xx, nnn, pp;
int lastmem, ind, end, ss;
ind = 0;
linha=0; lastmem=0; ss=0;
while (fgets((char *)str, 80, fpr) != NULL) {
linha++;
if (str[0] == 26)
break;
if (str[0] != ':' || str[7] != '0') {
printf("Error in file input format\n");
printf("%c - unknown format in line %u\n", str[0], linha);
fclose(fpr);
exit(2);
}
sscanf((char *)&str[1], "%2x", &nn);
cc=nn;
switch (str[8]) {
case '0' :
nnn=(nn<<1)+9;
sscanf((char *)&str[3], "%4x", &pp);
cc+=pp+(pp>>8);
end=ss+pp;
for (i=9 ; i<nnn; i+= 2) {
sscanf((char *)&str[i], "%2x", &xx);
if ((end >= firstend) && (end <= lastend)) {
ind=end-firstend;
if (ind > lastmem)
lastmem=ind;
ar256k[ind]=xx;
}
ind++;
end++;
cc+=xx;
}
sscanf((char *)&str[i], "%2x", &xx);
cc+=xx;
if (cc) {
printf("CHECK SUM Error in line %u\n", linha);
fclose(fpr);
exit(2);
}
break;
case '1' :
for (i=3 ; i<11 ; i+=2) {
sscanf((char *)&str[i],"%2x",&xx);
cc+=xx;
}
if (cc) {
printf("CHECK SUM Error in line %u\n", linha);
fclose(fpr);
exit(2);
}
break;
case '2' :
ss=0;
sscanf((char *)&str[9], "%4X", &ss);
ss<<=4;
for (i=3; i<15; i+= 2) {
sscanf((char *)&str[i], "%2x", &xx);
cc+=xx;
}
if (cc) {
printf("CHECK SUM Error in line %u\n",linha);
fclose(fpr);
exit(2);
}
break;
case '3' :
break;
default :
printf("Error in file input format\n");
printf("Type %c - unknown type in line %u\n", str[8], linha);
fclose(fpr);
exit(2);
}
}
return 0;
}

2
pcbit/install-sh Executable file
View File

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

605
pcbit/pcbitctl.c Normal file
View File

@ -0,0 +1,605 @@
/*
* Copyright (C) 1996 Universidade de Lisboa
*
* Writen by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
* the GNU Public License, incorporated herein by reference.
*/
/*
* PCBIT-D firmware loader
*/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <getopt.h>
#include <linux/isdn.h>
#include <pcbit.h>
#define MAXLINEHEX 80
#define NUM_LIN 32
#define MAXSUPERLINE 3000
static void usage(char *);
static int loadfw(int, char *, int);
static int writefw(int, char*);
static int bitd_read(unsigned char* buf, int *len, int nlines, FILE* fp);
static int issue_ioctl(int board, int cmd);
extern int convhexbin (char *filename, unsigned char *buf, int size);
int main(int argc, char *argv[])
{
int option_index = 0;
char fwfile[FILENAME_MAX];
int force = 0;
int board = 0;
char c, choice = 0; /* {ping,stop,load} */
static struct option long_options[] =
{
{"ping", 0, 0, 'p'},
{"stop", 0, 0, 's'},
{"force", 0, 0, 'f'},
{"load", 1, 0, 'l'},
{"board", 1, 0, 'b'},
{0, 0, 0, 0}
};
while (1) {
c = getopt_long(argc, argv, "psfl:b:", long_options,
&option_index);
if ( c == -1 )
break;
switch(c) {
case 'p':
case 's':
choice = c;
break;
case 'l':
choice = c;
strcpy(fwfile, optarg);
break;
case 'b':
board = atoi(optarg);
break;
case 'f':
force = 1;
break;
default:
fprintf(stderr, "unkown option %c\n", c);
break;
}
if (choice)
break;
}
switch (choice) {
case 's':
issue_ioctl(board, PCBIT_STOP);
break;
case 'p':
issue_ioctl(board, PCBIT_PING188);
break;
case 'l':
return loadfw(board, fwfile, force);
break;
default:
usage(argv[0]);
return 1;
}
return 0;
}
static void usage(char *name){
fprintf(stderr, "usage:"
"\t%s ping\n"
"\t%s stop\n"
"\t%s load [-f] <firmware>\n",
name, name, name);
}
static int getrdp_byte(int fd, int board, ushort addr, unsigned short * value)
{
isdn_ioctl_struct io_cmd;
struct pcbit_ioctl * pcbit_cmd;
strcpy(io_cmd.drvid, "pcbitX");
io_cmd.drvid[5] = '0' + board;
pcbit_cmd = (struct pcbit_ioctl *) &io_cmd.arg;
pcbit_cmd->info.rdp_byte.addr = addr;
pcbit_cmd->info.rdp_byte.value = 0x0000;
if (ioctl(fd, PCBIT_GETBYTE, &io_cmd) == -1)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
*value = pcbit_cmd->info.rdp_byte.value;
return 0;
}
static int setrdp_byte(int fd, int board, ushort addr, unsigned char value)
{
isdn_ioctl_struct io_cmd;
struct pcbit_ioctl * pcbit_cmd;
strcpy(io_cmd.drvid, "pcbitX");
io_cmd.drvid[5] = '0' + board;
pcbit_cmd = (struct pcbit_ioctl *) &io_cmd.arg;
pcbit_cmd->info.rdp_byte.addr = addr;
pcbit_cmd->info.rdp_byte.value = value;
if (ioctl(fd, PCBIT_SETBYTE, &io_cmd) == -1)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
return 0;
}
static int testrdp(int fd, int board)
{
int retv;
unsigned short value;
retv = setrdp_byte(fd, board, 0x0000, 0x55);
if (!retv)
return retv;
value = 0x00;
retv = getrdp_byte(fd, board, 0x0000, &value);
if (!retv)
return retv;
if (value != 0x55)
{
fprintf(stderr, "test_board: values don't match\n");
return -1;
}
retv = setrdp_byte(fd, board, 0x0000, 0xaa);
if (!retv)
return retv;
value = 0x00;
retv = getrdp_byte(fd, board, 0x0000, &value);
if (!retv)
return retv;
if (value != 0xaa)
{
fprintf(stderr, "test_board: values don't match\n");
return -1;
}
return 0;
}
int issue_ioctl(int board, int cmd)
{
int fd;
isdn_ioctl_struct io_cmd;
struct pcbit_ioctl * pcbit_cmd;
if ( (fd = open("/dev/isdnctrl", O_RDWR)) == -1) {
fprintf(stderr, "error opening /dev/isdnctl: %s\n",
strerror(errno));
return errno;
}
strcpy(io_cmd.drvid, "pcbitX");
io_cmd.drvid[5] = '0' + board;
pcbit_cmd = (struct pcbit_ioctl *) &io_cmd.arg;
if (ioctl(fd, cmd, &io_cmd) < 0) {
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
return 0;
}
static int loadfw(int board, char *fname, int force)
{
int fd;
int attempt, retv, i, j;
unsigned short value;
isdn_ioctl_struct io_cmd;
struct pcbit_ioctl * pcbit_cmd;
unsigned char stpd1[1024], stpd2[1024], zerobuf[1024];
unsigned char execstr[7] = {
0x01,
0x04,
0x00,
0x00,
0x00,
0x00,
0x12
};
/*
* 1. get_status
* 2. load stpd.1
* 3. load stpd.2
* 4. test
* 5. firmware load
* 6. execute
* 7. set_protocol_running
*/
strcpy(io_cmd.drvid, "pcbitX");
io_cmd.drvid[5] = '0' + board;
pcbit_cmd = (struct pcbit_ioctl *) &io_cmd.arg;
if ( (fd = open("/dev/isdnctrl", O_RDWR)) == -1) {
fprintf(stderr, "error opening /dev/isdnctl: %s\n",
strerror(errno));
return errno;
}
if (ioctl(fd, PCBIT_GETSTAT, &io_cmd) < 0) {
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
if (pcbit_cmd->info.l2_status == L2_RUNNING) {
if (force) {
if (ioctl(fd, PCBIT_STOP, &io_cmd) < 0) {
fprintf(stderr, "ioctl failed: %s\n",
strerror(errno));
return errno;
}
}
else {
fprintf(stderr, "PCBIT-D driver is up and running. no action nedded\n");
return 0;
}
}
#ifdef DEBUG
fprintf(stderr, "1. Status check OK\n");
#endif
/*
* load stpd.{1,2}
*/
memset(stpd1, 0, 1024);
memset(stpd2, 0, 1024);
if ( convhexbin("stpd.1", stpd1, 1024) < 0 )
{
fprintf(stderr, "error reading stpd.1\n");
return -1;
}
if ( convhexbin("stpd.2", stpd2, 1024) < 0 )
{
fprintf(stderr, "error reading stpd.2\n");
return -1;
}
#ifdef DEBUG
fprintf(stderr, "2. stpd.{1,2} loaded \n");
#endif
if (ioctl(fd, PCBIT_STRLOAD, &io_cmd) < 0)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
if (ioctl(fd, PCBIT_WATCH188, &io_cmd) < 0) {
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
if (ioctl(fd, PCBIT_LWMODE, &io_cmd) < 0)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
memset(zerobuf, 0, 1024);
testrdp(fd, board);
#ifdef DEBUG
fprintf(stderr, "3.a linear write mode\n");
#endif
write(fd, zerobuf, 1024);
sleep(1);
if (testrdp(fd, board))
{
fprintf(stderr, "error: testrdp\n");
return -1;
}
write(fd, stpd1, 1024);
sleep(1);
for (j=0; j<2; j++) {
for (i=0; i<60; i++)
{
getrdp_byte(fd, board, 0x03fd, &value);
if (value == 0x55)
break;
if (write(fd, stpd1, 1021) < 0)
{
printf("error in write\n");
return -1;
}
usleep(200000);
/*
setrdp_byte(fd, board, 0x03fd, 0x00);
setrdp_byte(fd, board, 0x03ff, 0x00);
*/
}
if (i == 60)
{
printf("error in stpd.1 load\n");
return -1;
}
for (i=0; i<180; i++)
{
getrdp_byte(fd, board, 0x03ff, &value);
if (value == 0x55)
break;
usleep(20000);
}
if (i == 180)
{
printf("error in stpd.1 load - 2 val \n");
return -1;
}
getrdp_byte(fd, board, 0x03fe, &value);
if (value == 0x1f)
{
printf("1f\n");
break;
}
setrdp_byte(fd, board, 0x03fe, 0x00);
setrdp_byte(fd, board, 0x03ff, 0x00);
}
#ifdef DEBUG
fprintf(stderr, "3.c stpd.1 writen\n");
#endif
memcpy(stpd2 + 0x3e0, stpd1 + 0x3e0, 0x10);
if (write(fd, stpd2, 1023) < 0)
{
fprintf(stderr, "write failed: %s\n", strerror(errno));
return errno;
}
value = 0x00;
attempt = 0;
while(1)
{
if ((retv = getrdp_byte(fd, board, 0x03ff, &value)))
{
fprintf(stderr, "read_byte: error\n");
return retv;
}
if (value == 0x55)
break;
setrdp_byte(fd, board, 0x03ff, 0x00);
if (attempt==120)
{
fprintf(stderr, "Communication error\n");
return -1;
}
else
attempt++;
usleep(50);
}
#ifdef DEBUG
fprintf(stderr, "3.d stpd.2 writen\n");
#endif
if (ioctl(fd, PCBIT_FWMODE, &io_cmd) == -1)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
#ifdef DEBUG
fprintf(stderr, "4.a load mode\n");
#endif
if (writefw(fd, fname))
return -1;
/* execute */
if (write(fd, execstr, 7) < 0)
{
fprintf(stderr, "write failed: %s\n", strerror(errno));
return errno;
}
#ifdef DEBUG
fprintf(stderr, "4.b execute\n");
#endif
/*
sleep(10);
if (ioctl(fd, PCBIT_STRLOAD, &io_cmd) == -1)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
if (ioctl(fd, PCBIT_APION, &io_cmd) == -1)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
if (ioctl(fd, PCBIT_PING188, &io_cmd) == -1)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
sleep(5);
*/
if (ioctl(fd, PCBIT_ENDLOAD, &io_cmd) == -1)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
#ifdef DEBUG
fprintf(stderr, "4.c load ok\n");
#endif
sleep(2);
if (ioctl(fd, PCBIT_RUNNING, &io_cmd) == -1)
{
fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
return errno;
}
#ifdef DEBUG
fprintf(stderr, "5. running\n");
#endif
return 0;
}
static int writefw(int fd, char* fname)
{
FILE *fp;
char shdr[80];
char buf[MAXSUPERLINE];
int i, len;
if ((fp=fopen(fname, "rb")) == NULL)
{
fprintf(stderr, "error in fopen %s:%s\n", fname, strerror(errno));
return -1;
}
fgets (shdr, 80, fp);
fprintf(stderr, "Loading %s \n", shdr);
len = MAXSUPERLINE;
while((i=bitd_read (buf + 3, &len, 80, fp))) {
buf[0]=0;
*((short *)&buf[1])=(short)(len);
if (write(fd, buf, len + 3) < 0)
{
fprintf(stderr, "load firmware - error in write:%s\n",strerror(errno));
return errno;
}
fprintf(stderr, ".");
fflush(stderr);
}
fprintf(stderr, "\n load complete\n");
fclose(fp);
fprintf(stderr, "Firmware loaded\n");
return 0;
}
/*
* Discard 1st char (':') and convert the rest to bin
*/
static int bitd_read(unsigned char* buf, int *len, int nlines, FILE* fp)
{
char line[80];
int i, j;
unsigned int val;
int aux = 0;
*len = 1;
for (i = 0; i < nlines; i++) {
if (fgets(line, 80, fp) == NULL)
break;
aux += strlen(line) - 1;
line[strlen(line) - 1] = 0;
for (j=1; line[j]; j+=2) {
sscanf(line + j, "%02x", &val);
buf[(*len)++] = val;
}
}
buf[0] = i;
return aux;
}

51
teles/Makefile.in Normal file
View File

@ -0,0 +1,51 @@
# $Id: Makefile.in,v 1.1 1997/02/17 00:09:36 fritz Exp $
#
# Makefile for telesctrl
# (C) 1997 Fritz Elfert
#
#
SHELL = /bin/sh
CFLAGS = -Wall -O2 -I.
LDFLAGS = -L../lib @LIBS@
PROGRAM = telesctrl
MODULES = telesctrl.o
MANPAGE = telesctrl.8
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
SBINDIR = /sbin
mandir = @mandir@
MAN8DIR = $(mandir)/man8
CC = @CC@
.SUFFIXES:
.SUFFIXES: .c .o
all: $(PROGRAM)
config:
@./configure
$(PROGRAM): $(MODULES)
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
install-man: $(PROGRAM).man
mkdir -p $(MAN8DIR)
$(INSTALL_MAN) $< $(MAN8DIR)/$(MANPAGE)
install: $(PROGRAM) install-man
$(INSTALL_PROGRAM) $(PROGRAM) $(SBINDIR)/$(PROGRAM)
install-strip: $(PROGRAM)
$(INSTALL_PROGRAM) -s $(PROGRAM) $(SBINDIR)/$(PROGRAM)
uninstall:
rm -f $(SBINDIR)/$(PROGRAM) $(MAN8DIR)/$(MANPAGE)
clean:
rm -f *.o *~ $(PROGRAM)
distclean: clean
rm -f config.status config.cache config.log Makefile

1242
teles/configure vendored Executable file

File diff suppressed because it is too large Load Diff

22
teles/configure.in Normal file
View File

@ -0,0 +1,22 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(telesctrl.c)
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS(strtol)
AC_SUBST(INSTALL)
AC_OUTPUT(Makefile)

2
teles/install-sh Executable file
View File

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

51
teles/telesctrl.c Normal file
View File

@ -0,0 +1,51 @@
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <linux/isdn.h>
char *progname;
void
usage()
{
fprintf(stderr, "usage: %s <DriverId> <IoctlCmd> <IoctlArg>\n", progname);
exit(-1);
}
int
main(int argc, char *argv[])
{
int fd;
int cmd;
isdn_ioctl_struct ioctl_s;
if ((progname = strrchr(argv[0], '/')))
progname++;
else
progname = argv[0];
if (strcmp(progname, "report")) {
if (argc != 4)
usage();
strcpy(ioctl_s.drvid, argv[1]);
ioctl_s.arg = strtol(argv[3], NULL, 0);
cmd = strtol(argv[2], NULL, 0);
} else {
ioctl_s.drvid[0] = '\0';
ioctl_s.arg = 0;
cmd = 0;
}
fd = open("/dev/isdnctrl", O_RDWR);
if (fd < 0) {
perror("/dev/isdnctrl");
exit(-1);
}
if (ioctl(fd, IIOCDRVCTL + cmd, &ioctl_s) < 0)
perror(argv[1]);
close(fd);
return 0;
}

61
teles/telesctrl.man Normal file
View File

@ -0,0 +1,61 @@
.TH TELESCTRL 8 "3. December 1995"
.UC 4
.SH NAME
telesctrl \- configure Teles-Module-logging
.SH SYNOPSIS
telesctrl [-d DriverId] 1 <LogFlags>
.br
.SH DESCRIPTION
.I telesctrl
is used to setup the logging-level of the Teles-ISDN devicedriver. All
logging-output is sent to the device /dev/isdnctrl. So you can show it
by executing "cat /dev/isdnctrl".
.LP
The use of
.I telesctrl
makes sense, if you are using an Teles-card only.
.LP
.SH OPTIONS
.TP 5
.B -d DriverId
is used to identify the driver when using more than one Teles-card. While
loading the module with
.I insmod,
the driverId is set by appending
.I id=MyId
to the normal insmod-commandline. For this feature insmod from the package
.I modules-1.2.8
or newer should be used as it supports string-initializations.
.LP
The
.I LogFlags
are given as a bit-coded integer with the following values:
.TP 5
.B 1 Link-level <--> Hardware-level communication.
If this bit is set all communication between the isdn-module and the
teles-module is logged.
.TP 5
.B 2 Top statemachine
If this bit is set, all state-changes of the top statemachine are logged.
.TP 5
.B 4 D-channel Q.931
If this bit is set, all Q.931-messages (call-control) are logged.
.TP 5
.B 8 D-channel Q.921
If this bit is set, all Q.921-messages are logged.
.TP 5
.B 16 B-channel X.75
If this bit is set, all B-channel X.75 events are logged.
.LP
.SH AUTHOR
Fritz Elfert <fritz@wuemaus.franken.de>
.LP
.SH SEE ALSO
.I ttyI\c
\&(4),
.I isdnctrl\c
\&(8),
.I telesctrl\c
\&(8),
.I isdninfo\c
\&(4).