This commit was manufactured by cvs2git to create tag 'T2-1-126/2-0-35'.
This commit is contained in:
parent
0568925a4d
commit
dc79af6c46
340
COPYING
340
COPYING
|
@ -1,340 +0,0 @@
|
|||
|
||||
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.
|
213
FAQ/Makefile.in
213
FAQ/Makefile.in
|
@ -1,213 +0,0 @@
|
|||
# Makefile for i4l-faq
|
||||
# (c) 1997 by Matthias Heßler (MatHes)
|
||||
#
|
||||
# Generate FAQ, support FAQ development
|
||||
|
||||
# Directories
|
||||
# All Perl scripts for generation of FAQ are in BIN
|
||||
BIN = ./bin
|
||||
# All output files are generated in GEN_DIR
|
||||
GEN_DIR = ./out
|
||||
# After generation, install files in TARGET_DIR (if different from GEN_DIR)
|
||||
TARGET_DIR = @TARGET_DIR@
|
||||
|
||||
# Program file names
|
||||
ZIP = @C_ZIP@
|
||||
GZIP = @C_GZIP@
|
||||
PERL = @C_PERL@
|
||||
INSTALL = @INSTALL@
|
||||
HTML = $(PERL) $(BIN)/html.pl
|
||||
7BIT = $(PERL) $(BIN)/7bit.pl
|
||||
OLD = $(PERL) $(BIN)/old.pl
|
||||
NEW = $(PERL) $(BIN)/new.pl
|
||||
|
||||
# Source file names
|
||||
SRC = de-i4l-faq
|
||||
OLD_SRC = $(SRC).old
|
||||
SRC_DIFF = $(SRC).diff
|
||||
|
||||
SRC_ENG = eng-i4l-faq
|
||||
OLD_SRC_ENG = $(SRC_ENG).old
|
||||
SRC_ENG_DIFF = $(SRC_ENG).diff
|
||||
|
||||
# Output file names
|
||||
OUT_7BIT = $(SRC).asc
|
||||
OUT_HTML = $(SRC).html
|
||||
|
||||
OUT_ENG_7BIT = $(SRC_ENG).asc
|
||||
OUT_ENG_HTML = $(SRC_ENG).html
|
||||
|
||||
|
||||
# *** Generate FAQ ***
|
||||
|
||||
# Generate all FAQ versions
|
||||
all: Makefile $(GEN_DIR) 7bit html e7bit ehtml
|
||||
|
||||
$(GEN_DIR):
|
||||
-mkdir -p $(GEN_DIR)
|
||||
|
||||
# Generate 7bit version of German FAQ
|
||||
7bit: $(GEN_DIR)/$(OUT_7BIT)
|
||||
|
||||
$(GEN_DIR)/$(OUT_7BIT): $(SRC)
|
||||
$(7BIT) $(SRC) $(GEN_DIR)/$(OUT_7BIT)
|
||||
|
||||
|
||||
# Generate html version of German FAQ
|
||||
html: $(GEN_DIR)/$(OUT_HTML)
|
||||
|
||||
$(GEN_DIR)/$(OUT_HTML): $(SRC)
|
||||
$(HTML) $(SRC) $(GEN_DIR)/$(OUT_HTML)
|
||||
|
||||
# Generate 7bit version of English FAQ
|
||||
e7bit: $(GEN_DIR)/$(OUT_ENG_7BIT)
|
||||
|
||||
$(GEN_DIR)/$(OUT_ENG_7BIT): $(SRC)
|
||||
$(7BIT) $(SRC_ENG) $(GEN_DIR)/$(OUT_ENG_7BIT)
|
||||
|
||||
|
||||
# Generate html version of English FAQ
|
||||
ehtml: $(GEN_DIR)/$(OUT_ENG_HTML)
|
||||
|
||||
$(GEN_DIR)/$(OUT_ENG_HTML): $(SRC)
|
||||
$(HTML) $(SRC_ENG) $(GEN_DIR)/$(OUT_ENG_HTML)
|
||||
|
||||
|
||||
# *** Develop FAQ ***
|
||||
|
||||
# Generate zip-compressed versions of FAQ
|
||||
zip: 7bit.zip html.zip e7bit.zip ehtml.zip
|
||||
|
||||
# Generate gz-compressed versions of FAQ
|
||||
gz: 7bit.gz html.gz e7bit.gz ehtml.gz
|
||||
|
||||
|
||||
# Compress 7bit version of German FAQ
|
||||
7bit.zip: $(GEN_DIR)/$(OUT_7BIT).zip
|
||||
7bit.gz: $(GEN_DIR)/$(OUT_7BIT).gz
|
||||
|
||||
$(GEN_DIR)/$(OUT_7BIT).zip: $(GEN_DIR)/$(OUT_7BIT)
|
||||
$(ZIP) -l $(GEN_DIR)/$(OUT_7BIT).zip $(GEN_DIR)/$(OUT_7BIT)
|
||||
$(GEN_DIR)/$(OUT_7BIT).gz: $(GEN_DIR)/$(OUT_7BIT)
|
||||
$(GZIP) -cf $(GEN_DIR)/$(OUT_7BIT) > $(GEN_DIR)/$(OUT_7BIT).gz
|
||||
|
||||
|
||||
# Compress html version of German FAQ
|
||||
html.zip: $(GEN_DIR)/$(OUT_HTML).zip
|
||||
html.gz: $(GEN_DIR)/$(OUT_HTML).gz
|
||||
|
||||
$(GEN_DIR)/$(OUT_HTML).zip: $(GEN_DIR)/$(OUT_HTML)
|
||||
$(ZIP) -l $(GEN_DIR)/$(OUT_HTML).zip $(GEN_DIR)/$(OUT_HTML)
|
||||
$(GEN_DIR)/$(OUT_HTML).gz: $(GEN_DIR)/$(OUT_HTML)
|
||||
$(GZIP) -cf $(GEN_DIR)/$(OUT_HTML) > $(GEN_DIR)/$(OUT_HTML).gz
|
||||
|
||||
|
||||
# Compress 7bit version of English FAQ
|
||||
e7bit.zip: $(GEN_DIR)/$(OUT_ENG_7BIT).zip
|
||||
e7bit.gz: $(GEN_DIR)/$(OUT_ENG_7BIT).gz
|
||||
|
||||
$(GEN_DIR)/$(OUT_ENG_7BIT).zip: $(GEN_DIR)/$(OUT_ENG_7BIT)
|
||||
$(ZIP) -l $(GEN_DIR)/$(OUT_ENG_7BIT).zip $(GEN_DIR)/$(OUT_ENG_7BIT)
|
||||
$(GEN_DIR)/$(OUT_ENG_7BIT).gz: $(GEN_DIR)/$(OUT_ENG_7BIT)
|
||||
$(GZIP) -cf $(GEN_DIR)/$(OUT_ENG_7BIT) > $(GEN_DIR)/$(OUT_ENG_7BIT).gz
|
||||
|
||||
|
||||
# Compress html version of English FAQ
|
||||
ehtml.zip: $(GEN_DIR)/$(OUT_ENG_HTML).zip
|
||||
ehtml.gz: $(GEN_DIR)/$(OUT_ENG_HTML).gz
|
||||
|
||||
$(GEN_DIR)/$(OUT_ENG_HTML).zip: $(GEN_DIR)/$(OUT_ENG_HTML)
|
||||
$(ZIP) -l $(GEN_DIR)/$(OUT_ENG_HTML).zip $(GEN_DIR)/$(OUT_ENG_HTML)
|
||||
$(GEN_DIR)/$(OUT_ENG_HTML).gz: $(GEN_DIR)/$(OUT_ENG_HTML)
|
||||
$(GZIP) -cf $(GEN_DIR)/$(OUT_ENG_HTML) > $(GEN_DIR)/$(OUT_ENG_HTML).gz
|
||||
|
||||
|
||||
|
||||
# create German diff of German FAQ
|
||||
dif:
|
||||
[ ! -e $(SRC_DIFF) ] # Only create diff if there is no diff already!
|
||||
diff -u $(OLD_SRC) $(SRC) > $(SRC_DIFF); echo -n
|
||||
|
||||
|
||||
# patch German FAQ with German diff
|
||||
pat:
|
||||
[ -e $(SRC_DIFF) ] # Only patch if there is a diff for it!
|
||||
patch $(SRC) < $(SRC_DIFF)
|
||||
if [ -e $(SRC).orig ]; then mv $(SRC).orig $(OLD_SRC); fi
|
||||
|
||||
# Declare all questions in German FAQ as OLD (and store as OLD version)
|
||||
old:
|
||||
$(OLD) $(SRC); \
|
||||
if [ -e $(OLD_SRC) ]; then rm $(OLD_SRC); fi; \
|
||||
mv $(SRC) $(OLD_SRC); \
|
||||
cp $(OLD_SRC) $(SRC)
|
||||
|
||||
# Declare all questions in German FAQ as NEW
|
||||
new:
|
||||
$(NEW) $(SRC)
|
||||
|
||||
|
||||
# Create English diff of English FAQ
|
||||
edif:
|
||||
[ ! -e $(SRC_ENG_DIFF) ] # Only create diff if there is no diff already!
|
||||
diff -u $(OLD_SRC_ENG) $(SRC_ENG) > $(SRC_ENG_DIFF); echo -n
|
||||
|
||||
# Patch English FAQ with English diff
|
||||
epat:
|
||||
[ -e $(SRC_ENG_DIFF) ] # Only patch if there is a diff for it!
|
||||
patch $(SRC_ENG) < $(SRC_ENG_DIFF)
|
||||
if [ -e $(SRC_ENG).orig ]; then mv $(SRC_ENG).orig $(OLD_SRC_ENG); fi
|
||||
|
||||
# Declare all questions in English FAQ as OLD (and store as OLD version)
|
||||
eold:
|
||||
$(OLD) $(SRC_ENG); \
|
||||
if [ -e $(OLD_SRC_ENG) ]; then rm $(OLD_SRC_ENG); fi; \
|
||||
mv $(SRC_ENG) $(OLD_SRC_ENG); \
|
||||
cp $(OLD_SRC_ENG) $(SRC_ENG)
|
||||
|
||||
# Declare all questions in English FAQ as NEW
|
||||
enew:
|
||||
$(NEW) $(SRC_ENG)
|
||||
|
||||
|
||||
# *** General Stuff ***
|
||||
|
||||
# Install output files
|
||||
install: all
|
||||
if [ $(TARGET_DIR) != $(GEN_DIR) ]; then \
|
||||
$(INSTALL) -m 0755 -d $(DESTDIR)$(TARGET_DIR); \
|
||||
$(INSTALL) -m 0644 `find $(GEN_DIR) -maxdepth 1 -type f` $(DESTDIR)$(TARGET_DIR); \
|
||||
fi
|
||||
|
||||
# Un-install output files
|
||||
uninstall:
|
||||
set -e; \
|
||||
if [ $(TARGET_DIR) != $(GEN_DIR) ]; then \
|
||||
cd $(DESTDIR)$(TARGET_DIR); \
|
||||
for i in $(OUT_7BIT) $(OUT_HTML) $(OUT_ENG_7BIT) $(OUT_ENG_HTML) ; do \
|
||||
rm -f $$i $$i.zip $$i.gz ; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
clean:
|
||||
if [ -e *~ ]; then rm *~; fi
|
||||
if [ -e \#* ]; then rm \#*; fi
|
||||
if [ -e *.orig ]; then rm *.orig; fi
|
||||
set -e; \
|
||||
cd $(GEN_DIR); \
|
||||
for i in $(OUT_7BIT) $(OUT_HTML) $(OUT_ENG_7BIT) $(OUT_ENG_HTML) ; do \
|
||||
rm -f $$i $$i.zip $$i.gz ; \
|
||||
done
|
||||
|
||||
config:
|
||||
./configure
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
config.status: configure
|
||||
./config.status --recheck
|
||||
|
||||
distclean: clean
|
||||
rm -f config.* Makefile
|
20
FAQ/README
20
FAQ/README
|
@ -1,20 +0,0 @@
|
|||
In this directory you find the FAQ for isdn4linux.
|
||||
It contains answers for those questions that are frequently asked in the
|
||||
mailing list/news group for isdn4linux (and some more).
|
||||
|
||||
The FAQ is available in a German and an English version (the German one being
|
||||
the most current), as well as in a 7bit and a html version.
|
||||
|
||||
"de-i4l-faq" and "eng-i4l-faq" are the source code for all versions of the FAQ.
|
||||
"bin" contains all perl scripts for generating the FAQ.
|
||||
In "out" you will find the generated versions of the FAQ.
|
||||
"doc" has some documentation about the syntax of the FAQ (only interesting if
|
||||
you want to help working on the FAQ).
|
||||
|
||||
"_example" and "_howto" contain postings from the mailing list/news group that
|
||||
appeared helpful/interesting to me. They may be helpful to you, but be careful:
|
||||
THEY MAY BE OUTDATED BY NOW!
|
||||
|
||||
See the FAQ for more information about the authors of the FAQ.
|
||||
|
||||
Matthias Hessler
|
|
@ -1,113 +0,0 @@
|
|||
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: Now i found something else to wonder about.. (was: Re: options files) To: isdn4linux@hub-wue.franken.de
|
||||
Date: Thu, 24 Oct 1996 22:47:17 +0200 (MET DST) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
|
||||
|
||||
Hello Emil & Mogens!
|
||||
|
||||
> Hello Mogens,
|
||||
>
|
||||
> You wrote:
|
||||
> > isdnctrl addif ippp0
|
||||
> > isdnctrl pppbind ippp0
|
||||
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11
|
||||
---
|
||||
> > route add -net 194.192.159.0 metric 1 netmask 255.255.255.224 ippp0
|
||||
> > ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 file
|
||||
> > /etc/ppp/options.ippp0
|
||||
>
|
||||
> > isdnctrl addif ippp1
|
||||
> > isdnctrl pppbind ippp1
|
||||
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.13
|
||||
--- why do you repeat the ifconfig?
|
||||
probably it should be "ippp1" here?
|
||||
> > route add -net 192.168.1.0 metric 1 netmask 255.255.255.0 ippp1
|
||||
> > ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 file
|
||||
> > /etc/ppp/options.ippp1
|
||||
>
|
||||
> Compare the two ifconfig commands, they are for the same interface.
|
||||
> And AFAIK the two interfaces need different ip-adresses.
|
||||
|
||||
With this I do not agree. It is simply possible to give two interfaces the same local ip address. You may even establish two routes on them. But only the first one found in the routing table will be used by the kernel. So the other route won't have any effect.
|
||||
|
||||
Configuring two interfaces with the same local IP address does make sense if you want to use as less IP adresses as possible (very honorable as long as IPv6 is not common practice).
|
||||
An interface IP-Adress is used by the kernel to give outgoing packets (not the forwarded packets) a sender IP address within the IP header.
|
||||
|
||||
To make the IP address 193.89.84.10 (as used in the above example) pingable I would suggest the following (changes ar marked at the right margin):
|
||||
|
||||
| ifconfig dummy0 193.89.84.10 # module has to be loaded before | route add -host 193.89.84.10 # only to have 193.89.84.10 reachable
|
||||
# all the time
|
||||
|
||||
isdnctrl addif ippp0
|
||||
| ifconfig ippp0 down # to make it exclusively bindable
|
||||
isdnctrl pppbind ippp0
|
||||
| ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11 up | route add -host 193.89.84.11 metric 1 ippp0 | route add -net 194.192.159.0 metric 1 \ | netmask 255.255.255.224 gw 193.89.84.11
|
||||
ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 \
|
||||
file /etc/ppp/options.ippp0
|
||||
|
||||
isdnctrl addif ippp1
|
||||
| ifconfig ippp1 down # to make it exclusively bindable
|
||||
isdnctrl pppbind ippp1
|
||||
| ifconfig ippp1 193.89.84.10 p-t-p 193.89.84.13 up | route add -host 193.89.84.13 metric 1 ippp0 | route add -net 192.168.1.0 metric 1 \ | netmask 255.255.255.0 gw 193.89.84.13
|
||||
ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 \
|
||||
file /etc/ppp/options.ippp1
|
||||
|
||||
|
||||
You may even try the following to "emulate" cisco's dialer rotary group where you may put several BRIs (basic rate interfaces = ISDN S0 [gr.]) into one netmask. Therefore the example would look like (changes aren't marked any more; completely different):
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# assuming, we are using a network of
|
||||
# 193.89.84.0/255.255.255.240
|
||||
# for a dial up server where
|
||||
# 193.89.84.1 is the IP for the server and
|
||||
# 193.89.84.2-14 are the addresses for remote interfaces.
|
||||
|
||||
ifconfig dummy0 193.89.84.1 # module has to be loaded before
|
||||
route add -host 193.89.84.1 # only to have 193.89.84.1 reachable
|
||||
# all the time
|
||||
|
||||
USER_ippp0="XXX1"
|
||||
RMTNET_ippp0=194.192.159.0
|
||||
RMTMSK_ippp0=255.255.255.224
|
||||
|
||||
USER_ippp1="XXX2"
|
||||
RMTNET_ippp1=192.168.1.0 # masquerading is great!
|
||||
RMTMSK_ippp1=255.255.255.0
|
||||
|
||||
USER_ippp2="XXX3"
|
||||
RMTNET_ippp2="" # you may leave 'em blank
|
||||
RMTNET_ippp2="" # if there is no remote net
|
||||
|
||||
[...] # fill out to your needs
|
||||
|
||||
for x in 2 3 4 5 6 7 8 9 10 11 12 13 14
|
||||
do
|
||||
IFNAME="ippp$[$x-2]"
|
||||
isdnctrl addif $IFNAME
|
||||
ifconfig $IFNAME down # to make it exclusively bindable
|
||||
isdnctrl pppbind $IFNAME
|
||||
ifconfig $IFNAME 193.89.84.1 netmask 255.255.255.240 up
|
||||
route add -host 193.89.84.$x metric 1 $IFNAME
|
||||
eval NET="\${RMTNET_${IFNAME}}"
|
||||
eval MSK="\${RMTNET_${IFNAME}}"
|
||||
if [ -n "$NET" -a -n "$MSK" ]
|
||||
then
|
||||
route add -net $NET metric 1 netmask $MSK gw 193.89.84.$x
|
||||
fi
|
||||
eval USER="\${USER_${IFNAME}}"
|
||||
ipppd user "$USER" /dev/$IFNAME 193.89.84.1:193.89.84.$x \
|
||||
file /etc/ppp/options.$IFNAME
|
||||
done
|
||||
|
||||
|
||||
No warranty, it's untested.
|
||||
But please yell at me (politely) if I'm wrong.
|
||||
|
||||
|
||||
Regards,
|
||||
|
||||
Torsten
|
||||
|
||||
|
||||
--
|
||||
/\ Delta Internet GmbH / \ DI Delta Internet GmbH von-Siemens-Str. 12 /____\ Netzwerkdienst & Vertrieb 59757 Arnsberg
|
||||
ALLES NUR AUS LINUX Tel. +49 2932 916 132 Fax 191 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
|
|
@ -1,71 +0,0 @@
|
|||
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: IPFWADM
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Date: Thu, 7 Nov 1996 11:03:15 +0100 (MET) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
|
||||
|
||||
Hallo!
|
||||
|
||||
Vielleicht kann ich helpfen ;-)
|
||||
Zuerstmal lass mich wiederholen, ob ich Deine Frage richtig verstanden habe. Mal angenommen Du hast auf den drei Netzwerk- Karten jeweils ein Class-C -Netz und hast die Dinger so etwa wie folgt konfiguriert:
|
||||
|
||||
ifconfig eth0 194.77.88.7 netmask 255.255.255.0 broadcast 194.77.88.255
|
||||
ifconfig eth1 194.77.89.4 netmask 255.255.255.0 broadcast 194.77.89.255
|
||||
ifconfig eth2 194.77.90.2 netmask 255.255.255.0 broadcast 194.77.90.255
|
||||
route add -net 194.77.88.0 eth0
|
||||
route add -net 194.77.89.0 eth1
|
||||
route add -net 194.77.90.0 eth2
|
||||
|
||||
In dieser Weise wuerde ja nun schlichtweg _alles_ von einem Interface zum anderen geroutet werden und Dein Rechner wie ein Gateway funktionieren.
|
||||
Du willst, so habe ich es verstanden, aber nur einen ganz bestimmten Rechner zwischen den Interfaces "durchlassen" waehrend Dein "Gateway" aber selber alle Rechner erreichen kann und alle Rechner Dein "Gateway" erreichen koennen.
|
||||
Nehmen wir mal an, der Rechner an eht0, der auf eth1 zugreifen koennen soll, habe die IP-Adresse 194.77.88.15.
|
||||
|
||||
Die professionelle Vorgehensweise ist dann:
|
||||
|
||||
- Ausschallten der FORWARDING-Funktion im Kernel
|
||||
durch Neukompilieren
|
||||
|
||||
- Aufsetzen der folgenden Befehle für die Firewall:
|
||||
|
||||
ipfwadm -F -p deny # Routing zwischen den Interfaces
|
||||
# erstmal generell verbieten
|
||||
|
||||
ipfwadm -I -p accept # Input auf allen Interfaces erlauben
|
||||
# betrifft Pakete, die Dein Rechner
|
||||
# auf seinen Interfaces empfaengt
|
||||
|
||||
ipfwadm -O -p accept # Output auf allen Interfaces erlauben
|
||||
# betrifft alle Pakete, die Dein Rechner
|
||||
# selber erzeugt hat und an jemanden
|
||||
# senden will
|
||||
|
||||
ipfwadm -F -a accept -S 194.77.88.15/32 -D 194.77.90.0/24
|
||||
# Zuletzt wird explizit das Forwarding
|
||||
# zwischen dem Rechner auf eth0 und
|
||||
# allen Rechnern auf eth2 erlaubt.
|
||||
|
||||
Wenn Du keinen neuen Kernel kompilieren willst, geht das auch mit eingeschaltetem Forwarding im Kernel. Das ist dann aber nicht so sicher, da man mit etwas Koepfchen die Firewall dann umgehen kann.
|
||||
|
||||
Keine Garantie. Das Zeugs habe ich nicht ausprobiert. Muesste aber so klappen. - Bitte korrigiert mich, wenn ich falsch liege.
|
||||
|
||||
Gruesse,
|
||||
|
||||
Torsten
|
||||
|
||||
> Ich habe ein rechner mit 3 netzkarten ( eth0..eth2 ). Jetzt will ich mit
|
||||
> ipfwadm einen specielen rechner vom eth0 nach eth1 routen ( wie ein gateway ).
|
||||
>
|
||||
> Kann jemand mich helpfen?
|
||||
>
|
||||
>
|
||||
> ---------------------------------------------------
|
||||
> To remove yourself from this mailing list send
|
||||
> email to majordomo@hub-wue.franken.de containing
|
||||
> "unsubscribe isdn4linux <your_email_address>" in
|
||||
> the message body [-vg]
|
||||
>
|
||||
|
||||
|
||||
--
|
||||
http://www.DInet.de/
|
||||
/\ von-Siemens-Str. 12
|
||||
/ \ Delta Internet GmbH 59757 Arnsberg
|
||||
/ \ Netzwerkdienst & Vertrieb Tel. +49 2932 91 61 32 /______\ Fax. +49 2932 91 61 91 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
|
|
@ -1,130 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA657358; Sun, 19 Jan 1997 20:25:57 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id UAA12262; Sun, 19 Jan 1997 20:26:59 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vm0iB-000oMsa; Sun, 19 Jan 97 18:07 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vm01Q-001ITHa; Sun, 19 Jan 97 17:23 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vm01B-001ITFE; Sun, 19 Jan 97 17:22 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vlzy1-000BikC; Sun, 19 Jan 97 17:19 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vm00S-001ITFE; Sun, 19 Jan 97 17:22 MET
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Xref: oops de.alt.comm.isdn4linux:856
|
||||
From: Rainer Birkenmaier <rainer@kirk.mop.uni-ulm.de>
|
||||
Newsgroups: de.alt.comm.isdn4linux
|
||||
Subject: Re: MPPP
|
||||
Date: 17 Jan 1997 01:11:27 GMT
|
||||
Organization: Die Wischmop-WG
|
||||
Lines: 90
|
||||
Message-Id: <5bmjjv$nt@kirk.mop.uni-ulm.de>
|
||||
References: <199701120958.LAA03553@santra.hut.fi>
|
||||
Reply-To: rbirkenm@hydra.informatik.uni-ulm.de
|
||||
Nntp-Posting-Host: freewayport27.extern.uni-ulm.de
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-Newsreader: TIN [UNIX 1.3 unoff BETA release 961115]
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
Hi !
|
||||
|
||||
Also bei mir funktioniert das "isdnctrl addlink ippp0" mit
|
||||
folgendem Skript prima:
|
||||
|
||||
---------- schnipp ----------
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# don't forget to edit the files
|
||||
# /etc/ppp/pap-secrets or
|
||||
# /etc/ppp/chap-secrets
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
||||
|
||||
LOCAL_NUMBER="123345"
|
||||
REMOTE_NUMBER="9876543"
|
||||
LOCAL_IP="134.60.7.70"
|
||||
REMOTE_IP="134.60.7.102"
|
||||
DEVICE="ippp0"
|
||||
TELES_ID="line0"
|
||||
USER="userName"
|
||||
|
||||
# additional for channel bundling:
|
||||
DEVICE1="ippp128"
|
||||
|
||||
VERSION=`cat /proc/version | awk '{ print $3 }' `
|
||||
|
||||
# when setting the environment variable MODPATH you
|
||||
# can omit the full path.
|
||||
SYSPATH="/sbin/"
|
||||
|
||||
telesctrl $TELES_ID 1 4 # enable verbose '4' mode
|
||||
|
||||
isdnctrl addif $DEVICE # Create new interface 'DEVICE'
|
||||
isdnctrl addphone $DEVICE out $REMOTE_NUMBER # Set outgoung phone-number
|
||||
isdnctrl eaz $DEVICE $LOCAL_NUMBER # Set local EAZ ..
|
||||
isdnctrl l2_prot $DEVICE hdlc # for sync PPP: set Level 2 to HDLC
|
||||
isdnctrl l3_prot $DEVICE trans # not really necessary, 'trans' is default
|
||||
isdnctrl encap $DEVICE syncppp # encap the IP Pakets in PPP frames
|
||||
isdnctrl huptimeout $DEVICE 300 # Hangup-Timeout is 300 sec. -> 5 min
|
||||
isdnctrl chargehup $DEVICE off # Hangup before next Charge-Info
|
||||
isdnctrl secure $DEVICE on # Accept only configured phone-number
|
||||
|
||||
# additional for channel bundling:
|
||||
isdnctrl addslave $DEVICE $DEVICE1 # Create new slave interface 'DEVICE1'
|
||||
isdnctrl addphone $DEVICE1 out $REMOTE_NUMBER # Set outgoung phone-number
|
||||
isdnctrl eaz $DEVICE1 $LOCAL_NUMBER # Set local EAZ ..
|
||||
isdnctrl l2_prot $DEVICE1 hdlc # for sync PPP: set Level 2 to HDLC
|
||||
isdnctrl l3_prot $DEVICE1 trans # not really necessary, 'trans' is default
|
||||
isdnctrl encap $DEVICE1 syncppp # encap the IP Pakets in PPP frames
|
||||
isdnctrl huptimeout $DEVICE1 300 # Hangup-Timeout is 300 sec. -> 5 min
|
||||
isdnctrl chargehup $DEVICE1 off # Hangup before next Charge-Info
|
||||
isdnctrl secure $DEVICE1 on # Accept only configured phone-number
|
||||
|
||||
|
||||
|
||||
|
||||
ifconfig $DEVICE -arp $LOCAL_IP pointopoint $REMOTE_IP metric 1
|
||||
route add default $DEVICE
|
||||
route add default gw 134.60.7.98
|
||||
|
||||
ipppd user $USER \
|
||||
/dev/ippp0 /dev/ippp1 /dev/ippp2
|
||||
|
||||
---------- schnapp ----------
|
||||
|
||||
Ich hab dabei noch folgendes in /etc/ppp/options stehen:
|
||||
|
||||
---------- schnipp ----------
|
||||
debug
|
||||
+mp
|
||||
noipdefault
|
||||
remotename highway
|
||||
mru 1524
|
||||
ipcp-accept-local ipcp-accept-remote
|
||||
lock
|
||||
defaultroute
|
||||
-bsdcomp
|
||||
-pc
|
||||
-ac
|
||||
---------- schnapp ----------
|
||||
|
||||
Ich hoffe ich konnte helfen!
|
||||
Bye ... Rainer!
|
||||
PS: ich hab hier uebrigens 'ne Teles/S0 16.3
|
||||
--
|
||||
<< e-mail: rbirkenm@hydra.informatik.uni-ulm.de >>
|
||||
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,156 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA76880; Sat, 30 Nov 1996 13:44:05 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id NAA01959; Sat, 30 Nov 1996 13:44:57 +0100
|
||||
Received: from hub-wue.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vTliY-000oIPa; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vTlho-000Boba; Sat, 30 Nov 96 10:27 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vTlil-001IYWa; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vTlii-001IYVE; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from giovanni.rhein-neckar.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vTlge-000BobC; Sat, 30 Nov 96 10:26 MET
|
||||
Message-Id: <m0vTlgM-000rArC@giovanni.rhein-neckar.de>
|
||||
From: girardi@giovanni.rhein-neckar.de (Norbert J. Girardi)
|
||||
Subject: Re: routes?
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Date: Sat, 30 Nov 1996 10:25:58 +0100 (MET)
|
||||
Cc: uwe.tetzlaff@t-online.de
|
||||
In-Reply-To: <m0vTby7-0000fJC@ermail02.btx.dtag.de> from "Uwe Tetzlaff" at Nov 29, 96 10:11:00 pm
|
||||
X-Mailer: ELM [version 2.4 PL24]
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=ISO-8859-1
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Reply-To: isdn4linux@hub-wue.franken.de
|
||||
Status:
|
||||
|
||||
>
|
||||
> Moins..
|
||||
>
|
||||
> Ich hab hier in der Firma 2 Rechner W95 192.168.254.2 Ne2000
|
||||
> LinuX 192.168.254.1 3Com 509
|
||||
|
||||
> Zu Hause habe ich einen Rechner LinuX 192.168.255.1 Teles S0-16.3
|
||||
>
|
||||
> Also zu meinem Problem : ich teste mit ping die Verbindung :
|
||||
>
|
||||
> von LinuX zu Hause <-> LinuX Firma via isdn0 = geht.
|
||||
> von W95 Firma <-> LinuX Firma via eth0 = geht.
|
||||
> von W95 Firma <-> LinuX zu Hause via eth0 -> isdn0 = geht nicht !
|
||||
> von LinuX zu Hause <-> W95 Firma via isdn0 -> eth0 = geht nicht !
|
||||
>
|
||||
>
|
||||
> Sicherlich voellig off topic denn ich tippe auf ein Problem bei meinen routes.
|
||||
>
|
||||
Es waere sicher hilfreich gewesen wenn Du die 'routes' mitgeschickt
|
||||
haettest ;-)
|
||||
|
||||
OK, versuchen wir's trotzdem mal.
|
||||
|
||||
Nennen wir Linux at home -> lihome = 192.168.255.1 ,
|
||||
Linux at work -> liwork = 192.168.254.1 ,
|
||||
W95 at work -> work95 = 192.168.254.2 .
|
||||
|
||||
Also, bei mir wuerde die '/etc/hosts' auf allen Rechnern _so_ aussehenen:
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
# hosts This file describes a number of hostname-to-address
|
||||
# mappings for the TCP/IP subsystem. It is mostly
|
||||
# used at boot time, when no name servers are running.
|
||||
# On small systems, this file can be used instead of a
|
||||
# "named" name server. Just add the names, addresses
|
||||
# and any aliases to this file...
|
||||
#
|
||||
|
||||
# For loopbacking.
|
||||
127.0.0.1 localhost
|
||||
|
||||
192.168.255.1 lihome
|
||||
|
||||
192.168.254.1 liwork
|
||||
192.168.254.2 work95
|
||||
|
||||
# End of hosts.
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Die '/etc/networks' auf allen Rechnern :
|
||||
========================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
#
|
||||
# networks This file describes a number of netname-to-address
|
||||
# mappings for the TCP/IP subsystem. It is mostly
|
||||
# used at boot time, when no name servers are running.
|
||||
#
|
||||
|
||||
loopback 127.0.0.0
|
||||
homenet 192.168.255.0
|
||||
worknet 192.168.254.0
|
||||
|
||||
# End of networks.
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Ich benutze fuer die statischen routes eine Datei in /etc/rc.d
|
||||
in die ich alle routes eintrage, und die aus /etc/rc.d/rc.inet1
|
||||
aufgerufen wird.
|
||||
|
||||
Die /etc/rc.d/rc.routes auf lihome:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig isdn0 lihome pointopoint liwork
|
||||
/sbin/route add liwork isdn0
|
||||
/sbin/route add default gw liwork isdn0
|
||||
# Alles was raus soll geht per default ueber isdn0
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
|
||||
Die /etc/rc.d/rc.routes auf liwork:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig eth0 liwork
|
||||
/sbin/route add -net worknet eth0
|
||||
# Alles was von worknet kommt und nach worknet soll
|
||||
# muss ueber eth0
|
||||
|
||||
/sbin/ifconfig isdn0 liwork pointopoint lihome
|
||||
/sbin/route add liwork
|
||||
/sbin/route add default gw liwork isdn0
|
||||
# Alle anderen gehen per default ueber isdn0
|
||||
# !!!! Klappt nur wenn auch der Kernel mit
|
||||
# IP FORWARDING/GATEWAYING kompiliert wurde !!!!
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Fuer W95 tue ich mal so als sei es ein Linux, d.h.
|
||||
die Uebersetzung in W95 Syntax bleibt dem Leser ueberlassen :-)
|
||||
|
||||
Die /etc/rc.d/rc.routes auf work95:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig eth0 work95
|
||||
/sbin/route add liwork
|
||||
/sbin/route add default gw liwork eth0
|
||||
# alles geht per default ueber eth0 nach liwork
|
||||
# der sorgt dann fuer die Verteilung
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
|
||||
|
||||
- Norbert
|
||||
|
||||
--
|
||||
Norbert J. Girardi < girardi@giovanni.rhein-neckar.de >
|
||||
Voice: +49 621 493417 (h) +49 621 381-3260 (w)
|
||||
Neckarstr. 17, D-68549 Ilvesheim, Germany
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,115 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA773032; Wed, 4 Dec 1996 19:25:55 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id TAA04351; Wed, 4 Dec 1996 19:27:00 +0100
|
||||
Received: from hub-wue.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vVFcT-000oJ0a; Wed, 4 Dec 96 12:36 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vVFZi-000Boma; Wed, 4 Dec 96 12:33 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vVFbR-001IV5a; Wed, 4 Dec 96 12:35 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vVFbO-001IV3E; Wed, 4 Dec 96 12:34 MET
|
||||
Received: from dino.nus.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vVFYU-000BomC; Wed, 4 Dec 96 12:31 MET
|
||||
Received: from localhost (nils@localhost [127.0.0.1]) by dino.nus.de (8.7.6/8.7.3) with ESMTP id MAA09043 for <isdn4linux@hub-wue.franken.de>; Wed, 4 Dec 1996 12:35:02 +0100
|
||||
Date: Wed, 4 Dec 1996 12:35:02 +0100 (MET)
|
||||
From: Nils Rennebarth <nils@nus.de>
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Subject: Re: ISDN-Problem
|
||||
In-Reply-To: <199612031939.UAA07539@mail.germanlloyd.de>
|
||||
Message-Id: <Pine.LNX.3.95.961204114817.1062I-100000@dino.nus.de>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Reply-To: isdn4linux@hub-wue.franken.de
|
||||
Status:
|
||||
|
||||
On Tue, 3 Dec 1996, Martin Bauer wrote:
|
||||
|
||||
>Moin moin,
|
||||
>
|
||||
>ich habe da ein kleines Problem:
|
||||
>
|
||||
[Emma und Gegenstelle unterhalten sich prima, aber von keinem Rechner im
|
||||
Netz der Gegenstelle geht es zu Emma]
|
||||
Emma:
|
||||
eth0 inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
|
||||
isdn0 inet addr:192.168.11.1 P-t-P:192.168.11.3
|
||||
>
|
||||
>Kernel IP routing table
|
||||
>Destination Gateway Genmask Flags Metric Ref Use =
|
||||
Iface
|
||||
>172.20.1.4 0.0.0.0 255.255.255.255 UH 0 0 11 =
|
||||
isdn0
|
||||
>192.168.11.3 0.0.0.0 255.255.255.255 UH 0 0 3 =
|
||||
isdn0
|
||||
>192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 =
|
||||
eth0
|
||||
|
||||
>0.0.0.0 192.168.11.3 0.0.0.0 UG 0 0 2 =
|
||||
isdn0
|
||||
>
|
||||
>
|
||||
>
|
||||
>Die Gegenstelle:
|
||||
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
|
||||
eth0 inet addr:172.20.1.4 Bcast:172.20.255.255 Mask:255.255.0.0
|
||||
isdn0 inet addr:192.168.11.3 P-t-P:192.168.11.1 Mask:255.255.255.0
|
||||
|
||||
>Kernel IP routing table
|
||||
>Destination Gateway Genmask Flags Metric Ref Use =
|
||||
Iface
|
||||
>192.168.11.1 0.0.0.0 255.255.255.255 UH 0 0 15 =
|
||||
isdn0
|
||||
>192.168.10.0 192.168.11.1 255.255.255.0 UG 0 0 3 =
|
||||
isdn0
|
||||
>172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 39 =
|
||||
eth0
|
||||
|
||||
>0.0.0.0 172.20.1.1 0.0.0.0 UG 0 0 3 =
|
||||
eth0
|
||||
Es ist kein ISDN Problem, es ist ein routing Problem.
|
||||
|
||||
"Gegenstelle" bekommt =FCber ISDN ein Paket mit 192.168.11.3 als Gateway,
|
||||
wei=DF aber routing-technisch nicht, das es das selber ist.
|
||||
!! Allein durch Einrichten eines Point-to-Point Interfaces
|
||||
!! wei=DF ein Rechner noch nicht, da=DF IP-Pakete an die auf seiner Seite
|
||||
!! konfigurierte Adresse auch an ihn sind.
|
||||
|
||||
Mit anderen Worten: es fehlt auf "Gegenstelle" der Befehl
|
||||
route add -host 192.168.11.3 dev isdn0
|
||||
|
||||
N.B.: Warum machst Du es nicht einfacher, wenn Du Point-to-Point routen
|
||||
verwendest:
|
||||
|
||||
auf Emma:
|
||||
ifconfig isdn0 192.168.10.1 pointopoint 172.20.1.4 -arp -broadcast
|
||||
route add -host 172.20.1.4
|
||||
route add default gw 172.20.1.4
|
||||
|
||||
auf Gegenstelle:
|
||||
ifconfig isdn0 172.20.1.4 pointopoint 192.168.10.1 -arp -broadcast
|
||||
route add -host 192.168.10.1
|
||||
route add -net 192.168.10.0 gw 192.168.10.1
|
||||
|
||||
Nils
|
||||
|
||||
--
|
||||
\ / | Nils Rennebarth
|
||||
--* WINDOWS 42 *-- | Schillerstr. 61=20
|
||||
/ \ | 37083 G=F6ttingen
|
||||
| ++49-551-71626
|
||||
Micro$oft's final answer | http://www.nus.de/~nils
|
||||
|
||||
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,149 +0,0 @@
|
|||
From: Philippe Le Foll <phillf@iu-vannes.fr> Subject: Re: Namesserver Config
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Date: Wed, 30 Oct 1996 19:09:10 +0100 (MET) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
|
||||
|
||||
I send to some people a small set of shell and example in order to set up a local name server on a Linux box.
|
||||
|
||||
I translate in aproximative english the README, which should in any case be easier to read that the french version.
|
||||
|
||||
Some people ask be for seting this in an ftp site unfortunately my university did not open yet an anonymous ftp.
|
||||
|
||||
phillf@iu-vannes.
|
||||
|
||||
|
||||
Author: Philippe Le Foll: 30-oct-96
|
||||
e-mail: phillf@iu-vannes.fr
|
||||
|
||||
All these shells are coming from Rennes Hight Brittany University they generate from /etc/hosts the DNS database, I modify them in order to run on my linux box.
|
||||
|
||||
(c) This is public program and you use them at your own risk
|
||||
they will probably not run without some adaptation to your site.
|
||||
|
||||
All this example refer to the following configuration ------------------------------------------------------------
|
||||
|
||||
---------------
|
||||
| to Internet |
|
||||
--------------
|
||||
|
|
||||
|
|
||||
dial-out/PPP
|
||||
(dynamic IP number)
|
||||
|
|
||||
|
|
||||
+------------------------+ +----------------------------+
|
||||
| | | |
|
||||
| DNS server | | DNS slave |
|
||||
| Linux 2.x | | Linux or NT |
|
||||
| name: bisig | | name fridu |
|
||||
| | | |
|
||||
| pppd [IP] | | |
|
||||
| leafnode [news] | | Netcape [html+news+mail] |
|
||||
| harvest [html cache]| | Eudora [mail] |
|
||||
| popd [mail] | | |
|
||||
| metahtml [local http]| | |
|
||||
+------------------------+ +----------------------------+
|
||||
200.200.200.1 200.200.200.1
|
||||
| | +----------------------------------------------|---------------------------+
|
||||
Unregistered 200.200.200" network, "domain sene.bzh"
|
||||
|
||||
Note:
|
||||
|
||||
1) This configuration give to all Slaves computer the impression
|
||||
to be officially onto Internet without really be registrated.
|
||||
|
||||
2) It allows to run a cache even when INTERNET dial-up connection
|
||||
is down.
|
||||
|
||||
3) It obviously read news during the night, but this is an other story.
|
||||
|
||||
|
||||
To Do in order to install DNS
|
||||
------------------------------
|
||||
|
||||
If you are running a DNS at home like me you probably have to choose for an unregistrated domain name as me.
|
||||
Running on an official Internet network does not change anything except that you don't have to worry about your name and your net number.
|
||||
|
||||
|
||||
- If you don't want to place your DNS data base in
|
||||
/var/etc/named/DNS you will have to hack the shell
|
||||
almost everything is hard coded
|
||||
|
||||
- create the destination directory /var/etc/named/DNS
|
||||
|
||||
- Copy all etc/*header* file in /var/etc/named/DNS then
|
||||
adapt them to your site [here: network is 200.200.200].
|
||||
|
||||
- Allow named to start at boot time, for this remove comment
|
||||
before named lines in /etc/rc.d/rc.inet2
|
||||
|
||||
- copy etc/named.boot file in /etc adapt it to your site
|
||||
primary & forwarders lines syntax is:
|
||||
|
||||
PRIMARY myDomainename [here sene.bzh] headerPathName [here:sene.bzh.header.db]
|
||||
FORWARDERS IP_NUMBER for your DNS parent [usually your provider].
|
||||
|
||||
example
|
||||
primary sene.bzh /var/etc/named/DNS/sene.bzh.header.db
|
||||
forwarders 194.51.217.1 194.51.3.49
|
||||
|
||||
- Normally /etc/resolv.conf is not mandatory, nevertheless
|
||||
I place my local domain name in with the following line.
|
||||
|
||||
domain sene.bzh
|
||||
|
||||
- .cache directive refer to a standard file that you should have no
|
||||
trouble with. Syntax is:
|
||||
|
||||
cache . /var/etc/named/DNS/named.root
|
||||
|
||||
NOTE: You can retrieve a more update named.root file true FTP
|
||||
FTP.RS.INTERNIC.NET. (But for this named should work !!!)
|
||||
|
||||
- Build/update your /etc/hosts file. WARNING: all your local hosts
|
||||
should have as main name host.YourDomainName INCLUDING localhost.YourDomainName
|
||||
[see example in etc/hosts]
|
||||
|
||||
- Generate your DNS data base, this is the only thing you should have to
|
||||
do at each /etc/hosts change. In fact this job is done automatically
|
||||
with the following shell, syntax
|
||||
|
||||
make_db YourDomainName [ex: make_db sene.bzh]
|
||||
make_in-addr.arpa Net_Value.._in-addr.arpa [ex: make_in-addr.arpa 200.200.200._in-addr.arpa]
|
||||
|
||||
nota: These two commands should generate you the two following files
|
||||
YourDomainName.db & Net_Value.in-addr.arpa.db
|
||||
in /var/etc/named/DNS. Both file are include from your
|
||||
header.db files.
|
||||
|
||||
- If you have secondary computers that use your local server,
|
||||
just write the two following line in there /etc/resolv.conf
|
||||
|
||||
domain sene.bzh [where sene.bzh is your domaineName]
|
||||
nameserver 200.200.200.1 [where 200.200.200.1 is your local DNS]
|
||||
|
||||
WARNING: NameServer should be an IP number and not a symbolic name
|
||||
and this even if it is declare in your /etc/hosts.
|
||||
|
||||
- It is now time to start your name server, by just typing in:
|
||||
|
||||
named
|
||||
|
||||
- Check your name server is effectively working
|
||||
|
||||
dnsquery -h your_host_name
|
||||
|
||||
WARNING: Even if your dialup line with INTERNET is broken your
|
||||
name server should answer you. The only time it should
|
||||
timeout is when you type in a wrong name, it with case it
|
||||
should try reaching a forwarder.
|
||||
|
||||
Good Luck
|
||||
|
||||
Kenavo
|
||||
|
||||
phillf@iu-vannes.fr
|
||||
|
||||
ps: Sorry for the English, if someone want to set it up in real english
|
||||
I will be please to replace my own README with a better one.
|
||||
|
||||
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
|
|
@ -1,199 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA39566; Wed, 5 Feb 1997 23:59:59 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id AAA19017; Thu, 6 Feb 1997 00:01:02 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vsDB9-000oJwa; Wed, 5 Feb 97 20:38 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vsD9H-001IXPa; Wed, 5 Feb 97 20:36 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vsD99-001IXFE; Wed, 5 Feb 97 20:36 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vsDA1-000BikC; Wed, 5 Feb 97 20:37 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vsD93-001IXFE; Wed, 5 Feb 97 20:36 MET
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Xref: oops de.alt.comm.isdn4linux:1392
|
||||
From: Jens Brambring <jens.brambring@p-net.de>
|
||||
Newsgroups: de.alt.comm.isdn4linux
|
||||
Subject: Re: IPX/SPX ueber isdn4linux und WIN95
|
||||
Date: Wed, 05 Feb 1997 21:30:18 +0100
|
||||
Organization: Customer of EUnet Germany; Info: info@Germany.EU.net
|
||||
Lines: 159
|
||||
Distribution: world
|
||||
Message-Id: <32F8EDDA.32EE@p-net.de>
|
||||
References: <32F53265.5E65@p-net.de>
|
||||
Nntp-Posting-Host: peu-11.d.eunet.de
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Mailer: Mozilla 3.01Gold [de] (Macintosh; I; 68K)
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
Hallo, es geht!!!!
|
||||
|
||||
Voraussetzungen unter Linux:
|
||||
isdn4linux
|
||||
mgetty oder aehnliches
|
||||
pppd mit ipx-Unterstuetzung
|
||||
dip/diplogin
|
||||
Kernel mit IPX-Protocol und Full ipx internal network auf yes gesetzt
|
||||
und PPP Unterstuetzung
|
||||
|
||||
Vorausetzungen unter WIN95:
|
||||
ISDN-Karte
|
||||
DFUE-Netzwerk
|
||||
Modememulator unter WIN95 der X75 oder HDLC verwenden kann
|
||||
(im Telspowerpack4 dabei, muesste aber auch mit CFOS oder
|
||||
aehnlichem gehen?!)
|
||||
|
||||
Beschreibung:
|
||||
Kernel erzeugen.
|
||||
Einen pppd compilieren und installieren,
|
||||
indem im Makefile die Zeile DEFINE IPX_CHANGE = 1 eingefuegt ist.
|
||||
|
||||
Von isdn4linux benoetigt man nur die ttyI ports also sollte die
|
||||
Einrichtung und das
|
||||
Starten unproblematisch sein!
|
||||
Danach muss man mgetty auf eines der ttyI-devices legen .
|
||||
Beispiel inittab-Eintragsergaenzung:
|
||||
I1:123:respawn:/usr/sbin/mgetty -x20 ttyI1
|
||||
|
||||
Dann muss die Konfiguration fuer das ttyI-device in mgetty.config
|
||||
ergaenzt
|
||||
werden:
|
||||
port ttyI1
|
||||
debug 3
|
||||
modem-type data
|
||||
speed 38400
|
||||
init-chat "" ATZ OK AT&EX OK ATS0=1 ATS14=0
|
||||
|
||||
Das X steht fuer die nummer, auf der der Anruf angenommen werden soll
|
||||
(bei euro die ganze Nummer ohne Vorwahl, bei 1tr6 die
|
||||
Endgeraetenummer)
|
||||
Die Null hinter ATS14= bedeutet, das wir die Emulation auf X75
|
||||
stellen
|
||||
|
||||
Dann richtet man eine Datei /etc/ppp/options und/oder
|
||||
/etc/ppp/options.ttyI1 ein
|
||||
Hier mein Beispiel:
|
||||
-detach
|
||||
192.9.215.80:192.9.215.70
|
||||
defaultroute
|
||||
mru 1524
|
||||
debug
|
||||
/dev/ttyI1
|
||||
ipx-routing 2
|
||||
ipxcp-max-failure 20
|
||||
ipx-node 4:5
|
||||
ipx-network 0x3000
|
||||
|
||||
Die Beschreibung der einzelnen Punkte findet sich in den man-pages
|
||||
zum pppd.
|
||||
ipx-network ist die Adresse des Netzwerkes in dem die jeweilige
|
||||
Netzwerkkarte
|
||||
zu finden ist und ipx-node gibt die Adressen der angeschlossenen
|
||||
Rechner in diesem
|
||||
Netzwerk an, diese Einstellungen scheinen Notwendig zu sein, die
|
||||
Werte sind sind
|
||||
ansich beliebig.
|
||||
|
||||
Danach richtet man sich einen Benutzer ein dessen startshell auf
|
||||
/usr/sbin/diplogin
|
||||
eingetragen ist (/etc/passwd).
|
||||
Jetzt muss noch die Datei /etc/diphosts editiert werden:
|
||||
|
||||
Benutzer::192.9.215.80:192.9.215.70:255.255.255.0::PPP,296
|
||||
|
||||
Der Benutzer ist der, den wir eben eingerichtet haben.
|
||||
|
||||
Der Linuxrechner sollte dann neu gestartet werden.
|
||||
|
||||
Danach richtet man auf dem Ethernetinterface das ipx-Protokoll ein:
|
||||
ipx_interface add -p eth0 802.2 33000
|
||||
Der letzte Wert stell wieder eine Netzwerknummer dar, die mit der
|
||||
auf dem Novell-Server
|
||||
uebereinstimmen muss, genauso wie das Protokoll (802.2).
|
||||
Diese Nummern kann man am Novell-Server feststellen wenn man sich
|
||||
die autoexec.ncf anschaut.
|
||||
Das Protokoll steht in der Zeile, wo der Netzwerkkartentreiber
|
||||
geladen wird und die
|
||||
Netzwerknummer steht an der Stelle, wo ipx an die Netzkarte gebunden
|
||||
wird.
|
||||
|
||||
Wenn man jetzt slist aufruft muesste ansich der Novell-Server
|
||||
angezeigt werden.
|
||||
|
||||
Danach wird ipxd (aus dem ipxripd) gestartet. das sollte es auf
|
||||
Linux-Seite gewesen sein.
|
||||
ipx_interface und ipxd sollten automatisch beim Starten des Rechners
|
||||
gestartet werden.
|
||||
|
||||
(Wenn der ipxd mit der option -d gestartet wird gibt er Meldungen
|
||||
auf dem Monitor aus,
|
||||
die man auswerten kann, ob alles laeuft)
|
||||
|
||||
WIN95:
|
||||
Ich gehe jetzt einfach davon aus, dass das DFUE-Netzwerk einsatzfaehig
|
||||
ist
|
||||
und ipx/spx an das DFUE-Netzwerk gebunden ist.
|
||||
|
||||
Man macht eine neue Verbindung, wobei das Modem der Modemimulation oder
|
||||
dem
|
||||
dem entsprechendne com-port fuer die Modemimulation zugewiesen wird.
|
||||
|
||||
Unter Eigenschaften waehlt man dann bei Typ des Servers PPP,Win95,NT
|
||||
internet
|
||||
(habe jetzt gerade nicht die genauen Beschreibung im Kopf, aber so
|
||||
aehnlich ist das,
|
||||
ist glaube ich auch die default Einstellung)
|
||||
Beim Protokoll waehlt man ipx/spx.
|
||||
Dann gibt es noch die Option Scripts:
|
||||
Hier gibt man den Namen des Scriptes ein, der die Verbindung aufbauen
|
||||
soll!
|
||||
Hier mein Beispiel-script:
|
||||
|
||||
proc main
|
||||
|
||||
; Set the port settings so we can wait for
|
||||
; non-gibberish text.
|
||||
|
||||
|
||||
waitfor "login:"
|
||||
transmit "Benutzer^M"
|
||||
|
||||
waitfor "Password:"
|
||||
transmit "Passwort"
|
||||
transmit "^M"
|
||||
|
||||
waitfor "PPP"
|
||||
|
||||
|
||||
|
||||
endproc
|
||||
|
||||
Benutzer ist wieder der Benutzer und Password das entsprechende
|
||||
Password.
|
||||
|
||||
Das sollte es gewesen sein?!
|
||||
|
||||
|
||||
Jetzt kann man eine Verbindung ueber das DFUE-Netzwerk herstellen, dann
|
||||
sollte man
|
||||
einen Moment warten (kann schon mal 10 Sekuden dauern), und der
|
||||
Novell-Server sollte in der Netzwerkumgebung erscheinen!
|
||||
|
||||
Auf Linux seite kann man noch mit cat /proc/net/ipx_interfaces
|
||||
feststellen ob ein ipx_interface aif ppp0 eingerichtet wurde (sollte
|
||||
automatisch passieren)
|
||||
Im Notfall das script auf WIN95 im Einzelschrittmodus ausfuehren lassen.
|
||||
|
||||
Ciao, Jens
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,71 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA57806; Sat, 8 Feb 1997 02:28:15 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id CAA05402; Sat, 8 Feb 1997 02:29:21 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vszst-000oHTa; Sat, 8 Feb 97 00:39 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vszrK-001IX0a; Sat, 8 Feb 97 00:37 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vszrD-001IWvE; Sat, 8 Feb 97 00:37 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vszrI-000BnoC; Sat, 8 Feb 97 00:37 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vszr5-001IWvE; Sat, 8 Feb 97 00:37 MET
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Xref: oops de.alt.comm.isdn4linux:1463
|
||||
From: Jens Brambring <jens.brambring@p-net.de>
|
||||
Newsgroups: de.alt.comm.isdn4linux
|
||||
Subject: Re: IPX/SPX ueber isdn4linux und WIN95
|
||||
Date: Sat, 08 Feb 1997 01:26:50 +0100
|
||||
Organization: Customer of EUnet Germany; Info: info@Germany.EU.net
|
||||
Lines: 31
|
||||
Distribution: world
|
||||
Message-Id: <32FBC837.340A@p-net.de>
|
||||
References: <32F53265.5E65@p-net.de>
|
||||
Nntp-Posting-Host: peu-18.d.eunet.de
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Mailer: Mozilla 3.01Gold [de] (Macintosh; I; 68K)
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
Hallo,
|
||||
|
||||
zu Eurer Information, mit dem ipppd 2.2.7 geht es jetzt auch:-)
|
||||
Ich musste aber noch in der Datei ipxcp die Zeile 354 aendern!
|
||||
|
||||
alt: wo->neg_router=1
|
||||
neu: wo->neg_router=6
|
||||
|
||||
Danach kommt eine saubere Verbindung zwischen dem
|
||||
WIN95-Rechner und dem Linux-Rechner zustande :-))
|
||||
Es sind auch keine scripts mehr auf der Win95-Seite notwendig!
|
||||
Ihr muesst aber nach geschlossener verbindung das ipx_interface, dass
|
||||
vom ipppd eingerichtet wird wieder loeschen, am besten in der Datei
|
||||
ipx-down,
|
||||
sonst kriegt Ihr nur einmal eine Verbindung hergestellt!!
|
||||
|
||||
Hier meine Datei /etc/ppp/ioptions:
|
||||
|
||||
-detach
|
||||
192.9.215.80:192.9.215.70
|
||||
defaultroute
|
||||
mru 1524
|
||||
debug
|
||||
/dev/ippp1
|
||||
+ipx
|
||||
ipx-routing 2
|
||||
ipxcp-max-failure 20
|
||||
ipx-node 4:5
|
||||
ipx-network 0x3000
|
||||
|
||||
Ciao, Jens!
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,107 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA96884; Sun, 9 Feb 1997 15:55:20 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id PAA01990; Sun, 9 Feb 1997 15:56:26 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vtYgt-000oPHa; Sun, 9 Feb 97 13:49 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vtIhQ-001IXqa; Sat, 8 Feb 97 20:44 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vtIhK-001IXoE; Sat, 8 Feb 97 20:44 MET
|
||||
Received: from frog.informatik.uni-stuttgart.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vtIgU-000Bo1C; Sat, 8 Feb 97 20:43 MET
|
||||
Received: from localhost (hgfelger@localhost)
|
||||
by frog.informatik.uni-stuttgart.de (8.8.5/8.8.4) with SMTP
|
||||
id UAA00991 for <isdn4linux@hub-wue.franken.de>; Sat, 8 Feb 1997 20:42:39 +0100
|
||||
X-Authentication-Warning: frog.informatik.uni-stuttgart.de: hgfelger owned process doing -bs
|
||||
Date: Sat, 8 Feb 1997 20:42:39 +0100 (CET)
|
||||
From: Hartwig Felger <hgfelger@trick.informatik.uni-stuttgart.de>
|
||||
X-Sender: hgfelger@frog.informatik.uni-stuttgart.de
|
||||
To: isdn4linux-Mialinglist <isdn4linux@hub-wue.franken.de>
|
||||
Subject: ipppd with IPX... Geht <freu!!!!>
|
||||
Message-Id: <Pine.LNX.3.95.970208202145.771B-100000@frog.informatik.uni-stuttgart.de>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
|
||||
Content-Transfer-Encoding: QUOTED-PRINTABLE
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
Salut,
|
||||
mit hilfe des Patch von Jens Brambring und, wenn man mehr als einmal
|
||||
einw=E4hlen m=F6chte, meines Workaround geht jetzt sowohl Dialin von Linux =
|
||||
als
|
||||
auch von Win95, jeweils mit Linux als Server.
|
||||
|
||||
Der Einzeilerpatch von Jens Brambring war:
|
||||
auf ipppd 2.2.7-debug anzuwenden!
|
||||
in ipxcp.c Ziele 354
|
||||
- wo->neg_router=3D1
|
||||
+ wo->neg_router=3D6
|
||||
Ohne diesen Patch passiert schlimmes mit eurem Logfile (ich sag nur
|
||||
Bl=E4hungen!)
|
||||
|
||||
Damit es =F6fer als einmal geht mu=DF im /etc/ppp/ipx_down eine Zeile
|
||||
eingef=FCgt werden (ich habe aber den Parameterkommentar noch dazu gelegt):
|
||||
# args are: interface-name tty-device speed network-number
|
||||
# local-IPX-node-address remote-IPX-node-address
|
||||
# local-IPX-routing-protocol remote-IPX-routing-pro=AD
|
||||
# tocol local-IPX-router-name remote-IPX-router-name
|
||||
# ipparam pppd-pid
|
||||
# example: ippp0 /dev/ippp0 38400 ...
|
||||
# interface=3D$1 line=3D$2 speed=3D$3 localaddr=3D$4 remoteaddr=3D$5
|
||||
logger -t ipx-down -p local2.info $*
|
||||
/usr/bin/ipx_interface del $1 EtherII
|
||||
|
||||
Wenn durch die letzte Zeile nicht das IPX-Interface gel=F6scht wird, steht
|
||||
es das n=E4chste mal im Weg!
|
||||
|
||||
Ich denke, da=DF das in den ipppd wandern mu=DF (Michael???). Nach einem Bl=
|
||||
ick
|
||||
in die message-Logs mu=DF ich sagen, da=DF der Jenssche-Patch zwar tut, abe=
|
||||
r
|
||||
wohl auch nur als Workaround anzusehen ist. Er f=FChr dazu, da=DF kein
|
||||
Routing-Protokoll vereinbart wird, was aber nicht st=F6rt. Ich konnte
|
||||
zumindest alles tun. Ob sich jetzt aber zwei LAN ohne Routing-Protokoll
|
||||
verbinden lassen wei=DF ich nicht (kann ich auch eben nicht pr=FCfen, da ic=
|
||||
h
|
||||
zu Hause kein LAN hab - das Finanzamt macht ja schon bei einem
|
||||
Rechner ...).
|
||||
|
||||
Damit Linux zu Linux tut, mu=DF ein zweites IPX-Interface aufgesetzt werden=
|
||||
=2E
|
||||
Notfalls das dummy0. Das meldet man dann als primary an (Option -p im
|
||||
ipx_interface-Befehl). Das sorgt eben f=FCr ein Prim=E4res und erm=F6glicht=
|
||||
,
|
||||
sobald die Leitung steht dem ipxd (aus ipxripd-0.7) zu starten (er braucht
|
||||
mindestens zwei IPX-Interfaces zum starten). Danach gehen slist und
|
||||
ncpmount!!!=20
|
||||
|
||||
Wenn die Leitung abgebaut und sp=E4ter wieder aufgebaut wird, mu=DF ipxd ni=
|
||||
cht
|
||||
neu gestartet werden. Nach ca 30 Sekunden hat der ipxd das neue
|
||||
IPX-Interface erkann.
|
||||
|
||||
Der ipxd startet nat=FCrlich nicht von selbst. Damit man das zweitemal nich=
|
||||
t
|
||||
so lange (30 Sec.) warten mu=DF kann man ein ipx-up schreiben, welches
|
||||
pr=FCft, ob ipxd l=E4uft und ihm ein HUP schicken, dann sieht er sofort das
|
||||
neue Interface, oder sonst startet.
|
||||
|
||||
Wenn die Leitung abgebaut und sp=E4ter wieder aufgebaut wird, mu=DF ipxd ni=
|
||||
cht
|
||||
neu gestartet werden. Nach ca 30 Sekunden hat der ipxd das neue
|
||||
IPX-Interface erkann.
|
||||
|
||||
Gru=DF Hartwig ;-)
|
||||
|
||||
768/CA2159D9 Hartwig Felger <hgfelger@trick.informatik.uni-stuttgart.de>
|
||||
Fingerprint: 18 49 5E 6E 4E 47 3D F5 28 3E 11 C9 05 26 F3 46
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,123 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA25458; Mon, 10 Feb 1997 02:33:01 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id CAA16866; Mon, 10 Feb 1997 02:34:07 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vtj9I-000oKia; Mon, 10 Feb 97 00:59 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vtj8I-001Ibia; Mon, 10 Feb 97 00:58 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vtj8D-001IbgE; Mon, 10 Feb 97 00:58 MET
|
||||
Received: from frog.informatik.uni-stuttgart.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vtj7p-000BikC; Mon, 10 Feb 97 00:57 MET
|
||||
Received: from localhost (hgfelger@localhost)
|
||||
by frog.informatik.uni-stuttgart.de (8.8.5/8.8.4) with SMTP
|
||||
id AAA00744 for <isdn4linux@hub-wue.franken.de>; Mon, 10 Feb 1997 00:57:17 +0100
|
||||
X-Authentication-Warning: frog.informatik.uni-stuttgart.de: hgfelger owned process doing -bs
|
||||
Date: Mon, 10 Feb 1997 00:57:16 +0100 (CET)
|
||||
From: Hartwig Felger <hgfelger@trick.informatik.uni-stuttgart.de>
|
||||
X-Sender: hgfelger@frog.informatik.uni-stuttgart.de
|
||||
Cc: isdn4linux-Mialinglist <isdn4linux@hub-wue.franken.de>
|
||||
Subject: Re: IPX / callback und anderes mit neuem ipppd
|
||||
In-Reply-To: <Pine.LNX.3.95.970208201737.771A-100000@frog.informatik.uni-stuttgart.de>
|
||||
Message-Id: <Pine.LNX.3.95.970210004715.538A-101000@frog.informatik.uni-stuttgart.de>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: MULTIPART/MIXED; BOUNDARY="8323584-669190516-855532636=:538"
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
This message is in MIME format. The first part should be readable text,
|
||||
while the remaining parts are likely unreadable without MIME-aware tools.
|
||||
Send mail to mime@docserver.cac.washington.edu for more info.
|
||||
|
||||
--8323584-669190516-855532636=:538
|
||||
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
|
||||
Content-Transfer-Encoding: QUOTED-PRINTABLE
|
||||
|
||||
Salut,
|
||||
On Sat, 8 Feb 1997, Hartwig Felger wrote:
|
||||
|
||||
> Sorry,
|
||||
> On Sat, 8 Feb 1997, Raphael Leiteritz wrote:
|
||||
>=20
|
||||
> > | Sorry beim Bauen ist mir eingefallen, da=DF f=FCr den USE_MS_DNS ein =
|
||||
kleiner
|
||||
> > | Patch n=F6tig ist:
|
||||
> > | -------------o<------------
|
||||
> > | pp4i4k-2.2.6g-alpha/ipppd.2.2.6g/ipcp.h
|
||||
> > | 58a59,60
|
||||
> > |> /*@@@ added by dy */
|
||||
> > |> u_int32_t winsaddr[2]; /* Primary and secondary MS WINS entrie=
|
||||
s */
|
||||
> > | -------------->o-----------
|
||||
> > Hattest Du denn ansonsten Erfolg? Bei mir hat es naemlich immer
|
||||
> > noch nicht geklappt (s. meine mail an die Liste).
|
||||
> das war wohl nur ein Patch um copilieren zu k=F6nnen. Irgendwo in meinem
|
||||
> Win95 mu=DF wohl noch ein Verweis auf den Firmen-DNS sein, denn ich kann =
|
||||
mit
|
||||
> Namen arbeiten. Wenn ich ins Log schaue, steht da aber =FCberall REJ. Ich
|
||||
> konnte aber weder in der Registry noch in irgendeiner .INI was finden. Di=
|
||||
e
|
||||
> Frage w=E4re nat=FCrlich, ob Win95 auch nicht einfach den Rechner nimmt, =
|
||||
wo
|
||||
> man sich gerade eingew=E4hlt hat. Da ist bei uns auch der DNS drauf. ????
|
||||
>=20
|
||||
> Gru=DF Hartwig :-(
|
||||
>=20
|
||||
> 768/CA2159D9 Hartwig Felger <hgfelger@trick.informatik.uni-stuttgart.de>
|
||||
> Fingerprint: 18 49 5E 6E 4E 47 3D F5 28 3E 11 C9 05 26 F3 46
|
||||
Ich habe heute 'mal die pppd-2.2.0f mit dem ipppd verglichen, bez=FCglich
|
||||
des MS-DNS und MS-WINS. Ich habe dann das ipppd angepa=DFt und siehe da die
|
||||
Logs sagen nicht mehr REJ. Ich mich dann per IPX eingew=E4hlt. Nachdem ich
|
||||
vorher alle =FCbrigen festen DNS-Eintragungen aus win95 entfernnt hatte,
|
||||
ging der Zugriff perfekt. Der restliche Patch ist angeh=E4ngt!
|
||||
|
||||
Achtung: damit IPX mit ipppd und win95 =FCberhaupt geht, m=FCssen die beide=
|
||||
n
|
||||
Workarounds eingebracht werden, die ich zusammen schon gemailt habe.
|
||||
|
||||
Viel Spa=DF ;-)
|
||||
|
||||
P.S.: Ich habe heute schon meine Killerapplikation per ipppd/IPX-Dialin
|
||||
laufen lassen: NWADMIN f=FCr einen NW4.10. Das Laden des Programms hat zwar
|
||||
fast 5 Minuten gedauert, aber dann kann man arbeiten. Ich werde mir das
|
||||
Programm eben lokal installieren.. Dieser Test impliziert, da=DF =FCber
|
||||
diese Verbindung auf NDS zugegriffen werden kann.
|
||||
|
||||
768/CA2159D9 Hartwig Felger <hgfelger@trick.informatik.uni-stuttgart.de>
|
||||
Fingerprint: 18 49 5E 6E 4E 47 3D F5 28 3E 11 C9 05 26 F3 46
|
||||
|
||||
|
||||
--8323584-669190516-855532636=:538
|
||||
Content-Type: APPLICATION/octet-stream; name="patch-ms-dns.gz"
|
||||
Content-Transfer-Encoding: BASE64
|
||||
Content-ID: <Pine.LNX.3.95.970210005716.538B@frog.informatik.uni-stuttgart.de>
|
||||
Content-Description: gziped patch f|r option.c
|
||||
|
||||
H4sICN1h/jIAA3BhdGNoLW1zLWRucwCdlG1r2zAQgD+3v+IIjNqu3cQJSZaG
|
||||
DMbGIFBKoIwNSgmurcQCxxKS0qyU/PedFPktTZu0+mL5dPfodG+e5wHjirJc
|
||||
XsVXTNDl2d06h1/kEWAE4fC627nuDiEcjYbnQRBUuvtqg+v+aKfmNZf+h25n
|
||||
5HfDr2AEmrMTjAD3wTmAVJGiMdBcgSSKch6JaAXz+cxxUObHaSTQ1nXHr3R5
|
||||
xGPxzFWpfEiJJhk5iZayLGGLxUm6SS6jJBEHdS/3dDf0HeUGWBATgH9cMMXe
|
||||
fdRaErqg/JjOggqpjqit3j/mm4wtGxqHctzrD/zeoF/luNcfomBY5Fivl5bN
|
||||
bcuH0K/leuufnbU9LQD0VcaCYkrNCVEEA9UuAUXCkdDx6xWACCTMvs/QTsoN
|
||||
E4kEkpsjktQJuhqq+/Fn60NjIcZUjKIrAhldUQWOJDHLE+nWQbZaSpb938cZ
|
||||
oH5ZUV2Ge5C4kgGWVQm0JVYDIunn7R1oKZESFkyASglwQsSFBEy3pl1WNF14
|
||||
Ja6owibvz/QosHAvZ1iZiNORbxRqQdTuURk9YvCms78/ZuBEeaK3jVcGlvJp
|
||||
TEmyPdDyO37VEc34IyuOsszkGg8d17xxOjNPlnW3qmapeFaASOToaBiBNl8I
|
||||
toJorVIUoZ8aKsiKKROwgzMw7PZx5vUGtSkYdocoGozqPYIL8w4T8Jz1HPut
|
||||
150r8NyUB9/SuXZ6bBW3VSToAhzKYz7Hl7KNHdL3RiIzph6ubCXddx5gMoGO
|
||||
Cy/VbScbar/GtroKu02Uq5PMrM9AMoziR28PP3f7vtkWv3YrML0iByc009oe
|
||||
tD196jUmdmBaV/eEFhWN4hDpGt32m7Nez0oonSoGfiSWT9ryxfpRpVjbFY5K
|
||||
JdaxHhhSEaR4KR9Xrhs/JngdUaYenB20sNW1sFOZQBC65U32yEk5Gi/1tJLq
|
||||
8TnHCWsBrra4/X1z07DRaxfiORGCCadF86coo0k5M6oxffFFXphOsJPHGrb8
|
||||
Jq6xms7bZbPTqYm31dYG4O3+eJXto/1RJK3eIM1SO8mykcQjRfq2YdkkH/Qg
|
||||
/KwHNcMi2OVoqTeKPfgPxzKysjUKAAA=
|
||||
--8323584-669190516-855532636=:538--
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,156 +0,0 @@
|
|||
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: ISDN - POOL
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Date: Sun, 10 Nov 1996 14:15:22 +0100 (MET) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
|
||||
|
||||
Hallo Georg!
|
||||
|
||||
> nachdem ich I4L nun seit 8 Monaten erfolgreich und voellig _ohne_ Probleme
|
||||
> betreibe (Hut ab vor den Entwicklern), ist noch eine einzige Geschichte,
|
||||
> die ich gerne geloest haette.
|
||||
|
||||
Jau, ueber die Arbeit der I4L-Entwickler auch meinen Dank. Das Zeug ist wunderbar.
|
||||
|
||||
> Ich betreibe I4L Router, die verschiedene Subnetze verbinden. Dies sind aber
|
||||
> alles feste routen, ich benutze _kein_ pppd oder ipppd. ISDN Device mit isdnctrl
|
||||
> definieren und mit ifconfig / route einrichten - fertig. Die Gegenstellen
|
||||
> waehlen sich auf eine feste Nummer rein, diese muss dann natuerlich frei sein.
|
||||
>
|
||||
> Dies laeuft alles ganz hervorragend, jetzt aber die Frage:
|
||||
>
|
||||
> Ich benutze einen "eigenen" NTBA nur fuer I4L, waere es moeglich, das dieser als
|
||||
> Pool fungiert ?
|
||||
> Ich meine, ich definiere 10 IP Verbindungen und gebe jeder (secure on) eine
|
||||
> Eingehende Nummer. Die Gegenstellen bekommen alle 3 Rufnummern und waehlen diese
|
||||
> der Reihe nach durch.
|
||||
|
||||
Genau sowas haben wir hier an zwei Standorten realisiert.
|
||||
Gerne beschreibe ich Dir Moeglichkeiten und Probleme.
|
||||
Auch wir haben das hier ohne ipppd gemacht, weil der leider noch so ein paar Tuecken hat.
|
||||
|
||||
Wenn ich recht verstehe hast Du momentan folgende Konstellation (habe neben S0 jeweils eine Beispiel-Telephonnummer geschrieben, drunter und drueber stehen beispielhafte Namen fuer die ISDN-Devices).
|
||||
|
||||
"draussen" "pool"
|
||||
|
||||
Router A 8989 S0 <------ISDN--\ raw0 \
|
||||
+---> SO 3434 |
|
||||
Router B 7676 S0 <------ISDN--/ raw1 | ein Master-Router
|
||||
|
|
||||
Router C 6565 S0 <------ISDN--\ raw2 | ein Master-Router
|
||||
+---> SO 6565 |
|
||||
Router D 2332 S0 <------ISDN--/ raw3 | ein Master-Router
|
||||
|
|
||||
Router E 6344 S0 <------ISDN--\ raw4 | ein Master-Router
|
||||
+---> SO 3454 |
|
||||
Router F 1023 SO <------ISDN--/ raw5 /
|
||||
|
||||
Die Router draussen waehlen sich also auf Deinem zentralen Router ein. Bisher hast Du dafuer die ISDN-Nummern bei den Routern draussen so verteilt, dass kein Konflikt durch "Besetzt" entstehen kann.
|
||||
|
||||
Bei den Beispiel-Routern sei vereinbart, dass sie alle Ihr ISDN-Device mit "raw0" benannt haben. Auch werde ich annehmen, dass alle in derselben Orstnetzkennzahl liegen.
|
||||
|
||||
Nun habe ich Dich so verstanden, dass Du auf Deinem Master-Router die Kosten fuer die einzelnen Basis-Anschluesse senken willst, indem Du auf jedem Basisanschluss mehr als zwei Rechner einwaehlen laesst.
|
||||
Am liebsten auf allen drei beispielhaften Anschluessen mit 6 Kanaelen gleich 10 externe Router auf einmal. Bei 10 Routern ist noch recht selten, dass alle 6 Kanaele des Master-Routers gleichzeitig besetzt sind, wenn man eine "gemaessigte" Benutzung voraussetzt.
|
||||
|
||||
> Am einfachsten waere dies zu realisieren, wenn die Slave Devices einen Anruf
|
||||
> annehmen, auch wenn der Master _NICHT_ aktiv ist. Die Master Rufnummer waere in
|
||||
> diesem Fall durch einen Anruf auf eben dieser Nummer von einer anderen
|
||||
> Gegenstelle blockiert.
|
||||
|
||||
Nee, mit slave-Devices solltes Du das nicht probieren. Dafuer sind die nicht gedacht.
|
||||
|
||||
> Oder ich kann einem Device mehrere MSN zuweisen, oder ich kann es so aufsetzen,
|
||||
> das es _immer_ rangeht, bzw wenn secure = true ist.
|
||||
|
||||
Ja, genau das ist mein Vorschlag.
|
||||
|
||||
Konkret haette ich dafuer den folgenden Vorschlag:
|
||||
|
||||
a) Bei allen externen Routern muessen alle Nummern der
|
||||
SO-Anschluesse des Master-Routers eingetragen werden.
|
||||
Jedesmal, wenn Du zentral einen S0-Anschluss aufnimmst,
|
||||
bedeutet das auf den externen Routern ein wenig arbeit.
|
||||
Also bei jedem Router draussen:
|
||||
vorwahl="2932" # ohne Null!
|
||||
for number in 3434 6565 3454
|
||||
do
|
||||
isdnctrl addphone raw0 in ${vorwahl}${number}
|
||||
isdnctrl addphone raw0 out ${number}
|
||||
done
|
||||
|
||||
b) Bei den ISDN-Netzinterfacen raw0 bis raw5 kannst Du nur eine
|
||||
MSN angeben. Auf jedem Euro-ISDN-Basisanschluss liegen
|
||||
aber mehrere MSNs und die sind auch noch alle verschieden.
|
||||
Bei 1TR6 war das anders und deshalb funktionierte das damals
|
||||
mit der Realisierung einer Einwaehlreihenfolge ganz problemlos.
|
||||
Die EAZs von 1TR6-Anschluessen waren naemlich alle einziffrig
|
||||
und wenn alle externen Router dieselben Durchwahlnummern verwendet
|
||||
haben (mit derselben angehaengten EAZ), dann hat automatisch
|
||||
jedes Netzinterface auf allen SO-Anschluessen reagiert.
|
||||
|
||||
Aus diesem Grunde scheint eine sehr nette und durchdachte
|
||||
Sache von Fritz Elfert in das ISDN-Basissystem von Linux
|
||||
eingefuegt worden zu sein: Das EAZ-MSN-Mapping.
|
||||
|
||||
Fuer die Treiber der einzelnen S0-Anschluesse auf dem
|
||||
zentralen Router hast Du ja mit dem insmod Namen vergeben.
|
||||
Ich nehme mal an, die Namen sind wie folgt vergeben:
|
||||
|
||||
MSN Treibername
|
||||
3434 bri0
|
||||
6565 bri1
|
||||
3454 bri2
|
||||
|
||||
BRI kommt von basic rate interface und ist die englische
|
||||
Bezeichnung fuer den Steckanschluss eines ISDN-Graetes.
|
||||
Für die Treiber setzt Du nun die folgenden Befehle ab:
|
||||
|
||||
isdnctrl mapping bri0 "-,3434,3435,3436"
|
||||
isdnctrl mapping bri1 "-,6565,6566,6567"
|
||||
isdnctrl mapping bri2 "-,3454,3455,3456"
|
||||
|
||||
Das bedeutet nun, dass ein auf der Nummer 3434 ankommender
|
||||
Ruf nun bei den Netzinterfaces und den ttyI-Interfaces
|
||||
die MSN 1 liefert und nicht mehr die MSN 3434. Ebenso
|
||||
klingelt ein Ruf auf 6565 nicht mehr auf MSN 656, sondern
|
||||
auf MSN 1 und der Ruf auf 3454 auch.
|
||||
|
||||
Nun stell auf allen Netzinterfaces Deines zentralen Routers
|
||||
diese "virtuelle" MSN ein:
|
||||
|
||||
isdnctrl eaz raw0 1
|
||||
isdnctrl eaz raw1 1
|
||||
isdnctrl eaz raw2 1
|
||||
isdnctrl eaz raw3 1
|
||||
isdnctrl eaz raw4 1
|
||||
isdnctrl eaz raw5 1
|
||||
|
||||
Bei dem "isdnctrl mapping" entscheidet die Position der "echten"
|
||||
MSN ueber die EAZ die sie liefert. Die Position "0" ist durch
|
||||
ein Minuszeichen unbelegt gelassen, da dies der "global call" ist.
|
||||
Bitte benutz den global call vorerst nicht, solange Du ihn nicht
|
||||
genauer kennst (alle nicht identifizierten Rufe auf unbekannter
|
||||
EAZ landen auf dem "global call" mit der Nummer "0"; der klingelte
|
||||
bei 1TR6 dann bei allen am selben Bus angeschlossenen Geraeten).
|
||||
|
||||
Nun siehst Du auch, dass ich beim Mapping noch mehr Nummern mit
|
||||
angegeben habe. Hier in Deutschland werden EURO-ISDN-Anschluesse
|
||||
meist mit 3 MSNs ausgeliefert. Diese drei MSNs kannst Du natuerlich
|
||||
auf verschiedene EAZs mappen. Dadurch ergibt sich folgender Spiel-
|
||||
raum: Draussen kannst Du router stehen haben, die verschiedene
|
||||
Protokolle haben und diese anhand der angerufenen Nummer unterscheiden
|
||||
(z.B. konfigurierst Du alle Netzinterfaces fuer rawip auf EAZ=1,
|
||||
alle fuer syncppp auf EAZ=2 und alle fuer X.75 auf EAZ=3).
|
||||
|
||||
Hoffentlich ist es das, was Du gesucht hast.
|
||||
Jedenfalls war ich von diesen Moeglichkeiten von I4L wahnsinnig begeistert. Cisco kann sowas (Multi-Protkoll auf einem dialer rotary group) nicht ansatzweise. ;-)
|
||||
|
||||
|
||||
Gruesse,
|
||||
|
||||
Torsten
|
||||
|
||||
|
||||
--
|
||||
http://www.DInet.de/
|
||||
/\ von-Siemens-Str. 12
|
||||
/ \ Delta Internet GmbH 59757 Arnsberg
|
||||
/ \ Netzwerkdienst & Vertrieb Tel. +49 2932 91 61 32 /______\ Fax. +49 2932 91 61 91 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
|
|
@ -1,156 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA76880; Sat, 30 Nov 1996 13:44:05 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id NAA01959; Sat, 30 Nov 1996 13:44:57 +0100
|
||||
Received: from hub-wue.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vTliY-000oIPa; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vTlho-000Boba; Sat, 30 Nov 96 10:27 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vTlil-001IYWa; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vTlii-001IYVE; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from giovanni.rhein-neckar.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vTlge-000BobC; Sat, 30 Nov 96 10:26 MET
|
||||
Message-Id: <m0vTlgM-000rArC@giovanni.rhein-neckar.de>
|
||||
From: girardi@giovanni.rhein-neckar.de (Norbert J. Girardi)
|
||||
Subject: Re: routes?
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Date: Sat, 30 Nov 1996 10:25:58 +0100 (MET)
|
||||
Cc: uwe.tetzlaff@t-online.de
|
||||
In-Reply-To: <m0vTby7-0000fJC@ermail02.btx.dtag.de> from "Uwe Tetzlaff" at Nov 29, 96 10:11:00 pm
|
||||
X-Mailer: ELM [version 2.4 PL24]
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=ISO-8859-1
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Reply-To: isdn4linux@hub-wue.franken.de
|
||||
Status:
|
||||
|
||||
>
|
||||
> Moins..
|
||||
>
|
||||
> Ich hab hier in der Firma 2 Rechner W95 192.168.254.2 Ne2000
|
||||
> LinuX 192.168.254.1 3Com 509
|
||||
|
||||
> Zu Hause habe ich einen Rechner LinuX 192.168.255.1 Teles S0-16.3
|
||||
>
|
||||
> Also zu meinem Problem : ich teste mit ping die Verbindung :
|
||||
>
|
||||
> von LinuX zu Hause <-> LinuX Firma via isdn0 = geht.
|
||||
> von W95 Firma <-> LinuX Firma via eth0 = geht.
|
||||
> von W95 Firma <-> LinuX zu Hause via eth0 -> isdn0 = geht nicht !
|
||||
> von LinuX zu Hause <-> W95 Firma via isdn0 -> eth0 = geht nicht !
|
||||
>
|
||||
>
|
||||
> Sicherlich voellig off topic denn ich tippe auf ein Problem bei meinen routes.
|
||||
>
|
||||
Es waere sicher hilfreich gewesen wenn Du die 'routes' mitgeschickt
|
||||
haettest ;-)
|
||||
|
||||
OK, versuchen wir's trotzdem mal.
|
||||
|
||||
Nennen wir Linux at home -> lihome = 192.168.255.1 ,
|
||||
Linux at work -> liwork = 192.168.254.1 ,
|
||||
W95 at work -> work95 = 192.168.254.2 .
|
||||
|
||||
Also, bei mir wuerde die '/etc/hosts' auf allen Rechnern _so_ aussehenen:
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
# hosts This file describes a number of hostname-to-address
|
||||
# mappings for the TCP/IP subsystem. It is mostly
|
||||
# used at boot time, when no name servers are running.
|
||||
# On small systems, this file can be used instead of a
|
||||
# "named" name server. Just add the names, addresses
|
||||
# and any aliases to this file...
|
||||
#
|
||||
|
||||
# For loopbacking.
|
||||
127.0.0.1 localhost
|
||||
|
||||
192.168.255.1 lihome
|
||||
|
||||
192.168.254.1 liwork
|
||||
192.168.254.2 work95
|
||||
|
||||
# End of hosts.
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Die '/etc/networks' auf allen Rechnern :
|
||||
========================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
#
|
||||
# networks This file describes a number of netname-to-address
|
||||
# mappings for the TCP/IP subsystem. It is mostly
|
||||
# used at boot time, when no name servers are running.
|
||||
#
|
||||
|
||||
loopback 127.0.0.0
|
||||
homenet 192.168.255.0
|
||||
worknet 192.168.254.0
|
||||
|
||||
# End of networks.
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Ich benutze fuer die statischen routes eine Datei in /etc/rc.d
|
||||
in die ich alle routes eintrage, und die aus /etc/rc.d/rc.inet1
|
||||
aufgerufen wird.
|
||||
|
||||
Die /etc/rc.d/rc.routes auf lihome:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig isdn0 lihome pointopoint liwork
|
||||
/sbin/route add liwork isdn0
|
||||
/sbin/route add default gw liwork isdn0
|
||||
# Alles was raus soll geht per default ueber isdn0
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
|
||||
Die /etc/rc.d/rc.routes auf liwork:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig eth0 liwork
|
||||
/sbin/route add -net worknet eth0
|
||||
# Alles was von worknet kommt und nach worknet soll
|
||||
# muss ueber eth0
|
||||
|
||||
/sbin/ifconfig isdn0 liwork pointopoint lihome
|
||||
/sbin/route add liwork
|
||||
/sbin/route add default gw liwork isdn0
|
||||
# Alle anderen gehen per default ueber isdn0
|
||||
# !!!! Klappt nur wenn auch der Kernel mit
|
||||
# IP FORWARDING/GATEWAYING kompiliert wurde !!!!
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Fuer W95 tue ich mal so als sei es ein Linux, d.h.
|
||||
die Uebersetzung in W95 Syntax bleibt dem Leser ueberlassen :-)
|
||||
|
||||
Die /etc/rc.d/rc.routes auf work95:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig eth0 work95
|
||||
/sbin/route add liwork
|
||||
/sbin/route add default gw liwork eth0
|
||||
# alles geht per default ueber eth0 nach liwork
|
||||
# der sorgt dann fuer die Verteilung
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
|
||||
|
||||
- Norbert
|
||||
|
||||
--
|
||||
Norbert J. Girardi < girardi@giovanni.rhein-neckar.de >
|
||||
Voice: +49 621 493417 (h) +49 621 381-3260 (w)
|
||||
Neckarstr. 17, D-68549 Ilvesheim, Germany
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,120 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA62050; Tue, 28 Jan 1997 01:28:05 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id BAA13753; Tue, 28 Jan 1997 01:29:02 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0voydq-000oJ3a; Mon, 27 Jan 97 22:31 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0voyhI-001Idqa; Mon, 27 Jan 97 22:34 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0voyhD-001IdoE; Mon, 27 Jan 97 22:34 MET
|
||||
Received: from mail.space.net by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0voyad-000BlxC; Mon, 27 Jan 97 22:27 MET
|
||||
Received: from euler.space.net ([194.59.182.7]) by mail.space.net with SMTP id <30273-3309>; Mon, 27 Jan 1997 22:28:57 +0100
|
||||
Received: by euler.space.net (Smail3.1.29.1 #4)
|
||||
id m0voyZy-000ZzNC; Mon, 27 Jan 97 22:27 MET
|
||||
Received: from lx01.temic (isdn4@lx01.temic [192.9.216.171]) by temic-ech.spacenet.de (8.6.12/1.02KKe) with ESMTP id WAA14625; Mon, 27 Jan 1997 22:22:33 +0100
|
||||
Received: (from isdn4@localhost) by lx01.temic (8.6.12/1.02KKe) id WAA24950; Mon, 27 Jan 1997 22:20:41 +0100
|
||||
Message-Id: <Mutt.19970127222041.isdn4@lx01.temic>
|
||||
Date: Mon, 27 Jan 1997 22:20:41 +0100
|
||||
From: isdn4@temic-ech.spacenet.de (Karsten Keil)
|
||||
To: chrk@netfire.aball.de (Christian Kleinfeld)
|
||||
Cc: isdn4linux@hub-wue.franken.de
|
||||
Subject: Re: Standleitung mit I4L ?
|
||||
References: <32ECE75C.7C9CE872@netfire.aball.de>
|
||||
X-Mailer: Mutt 0.58.1
|
||||
Mime-Version: 1.0
|
||||
In-Reply-To: <32ECE75C.7C9CE872@netfire.aball.de>; from Christian Kleinfeld on Jan 27, 1997 18:35:24 +0100
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
Christian Kleinfeld writes:
|
||||
> bestimmt steht das die Antwort in einer Doku oder FAQ, leider habe ich
|
||||
> in den Dokumenten keine richtigen Hinweise gefunden deshalb poste ich
|
||||
> einfach mal hier.
|
||||
Du hast recht es steht nicht drin, weil es das noch nicht offiziell gibt.
|
||||
|
||||
> Ich moechte mit meiner TelesS0 16.0 (LinuX 2.0.25, i4l mit oder ohne
|
||||
> HiSax ist egal da als Modul eingebunden <grin>) auf ueber D64S
|
||||
Egal nicht geht nur mit HiSax2.0.
|
||||
> Standleitung zum Provider gehen, naja Standleitung ist auch schon bis
|
||||
> ins Haus gelegt und kostet Geld ;(. Meine eigentlich Frage kommt jetzt.
|
||||
> Gibt es irgendwelche besonderheiten bei der Konfiguration auf eine
|
||||
> Standleitung wenn ja welche ?
|
||||
Also seit ca. 1 Woche laeuft HiSax mit Standleitung, unten kommt die
|
||||
Anleitung.
|
||||
>
|
||||
> Hat schon jemand erfahrung damit gehabt ?
|
||||
Es laeuft bei jemanden, der sich bestimmt auch noch bei Dir meldet mit
|
||||
einer Cisco als Gegenstelle. Wichtig KeepAlive bei Cisco ausschalten !!!
|
||||
Falls Du Prbleme hast, Mail an meine Adresse keil@temic-ech.spacenet.de,
|
||||
dann gibt es Telefonsupport.
|
||||
|
||||
Fuer den leased Mode ist eine vorab version aus dem CVS Entwickler tree
|
||||
notwendig, Anleitung war im November vom Fritz auf der Liste, Du bekommst
|
||||
eine Kopie per extra Mail.
|
||||
|
||||
Anleitung zur Installation des isdn trees.
|
||||
|
||||
1. Einen 2.0.X kernel mit HiSax 1.X (wichtig mit HiSAX !)
|
||||
|
||||
2. ins CVS isdn wechseln und
|
||||
./std2kern -d
|
||||
aufrufen
|
||||
4. Im kernel make (menu)config;make dep; make clean; make modules
|
||||
|
||||
Hier ein Beispielscript zum leased mod, module werden direkt aus dem
|
||||
kernel geladen (kein make module_install notwendig)
|
||||
Alle Telefonnummern sind erlaubt, sie spielen keine Rolle.
|
||||
|
||||
#!/bin/sh
|
||||
cd /usr/src/linux/modules
|
||||
/sbin/insmod -m isdn.o > /tmp/isdn/isdn.map
|
||||
/sbin/insmod -m hisax.o type=3 io=0x180 protocol=1 irq=10 id=HiSax \
|
||||
> /tmp/isdn/hisax.map
|
||||
/bin/cat /System.map /tmp/isdn/isdn.map /tmp/isdn/hisax.map | \
|
||||
sort > /tmp/isdn/System.map
|
||||
# Full debug nur fuer tests , muss wenns geht runtergesetzt werden
|
||||
/sbin/telesctrl HiSax 1 0xffff
|
||||
/sbin/telesctrl HiSax 11 0xff
|
||||
# normal debug
|
||||
#/sbin/telesctrl HiSax 1 0x31
|
||||
#/sbin/telesctrl HiSax 11 0x01
|
||||
|
||||
# Setzen in leased Mode
|
||||
/sbin/telesctrl HiSax 5 0
|
||||
# interface
|
||||
/sbin/isdnctrl addif isdn0
|
||||
# wichtig
|
||||
/sbin/isdnctrl huptimeout isdn0 0
|
||||
# binde Interface an 1. BChannel (,1 fuer 2.)
|
||||
/sbin/isdnctrl bind HiSax,0
|
||||
# dummy
|
||||
/sbin/isdnctrl eaz isdn0 1
|
||||
/sbin/isdnctrl l2_prot isdn0 hdlc
|
||||
# dummy
|
||||
/sbin/isdnctrl addphone isdn0 out 2
|
||||
/sbin/isdnctrl addphone isdn0 in 3
|
||||
/sbin/isdnctrl l3_prot isdn0 trans
|
||||
# nur bei cisco
|
||||
#/sbin/isdnctrl encap isdn0 cisco-h
|
||||
|
||||
# interface starten
|
||||
/sbin/ifconfig isdn0 192.1.1.1 up
|
||||
# route zur Gegenstelle
|
||||
/sbin/route add 192.1.1.2 isdn0
|
||||
mv /tmp/isdnctrl.log /tmp/isdnctrl.log.o
|
||||
cat /dev/isdnctrl >/tmp/isdnctrl.log &
|
||||
|
||||
--
|
||||
Dipl.Ing. Karsten Keil Microcontroller Developement
|
||||
email: keil@temic-ech.spacenet.de Temic Semiconducters GmbH
|
||||
Any opinions in this posting are my own and not those of my present
|
||||
or previous employers.
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,98 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA92926; Wed, 12 Feb 1997 18:49:14 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id SAA23322; Wed, 12 Feb 1997 18:50:16 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vudjc-000oIya; Wed, 12 Feb 97 13:24 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vudg4-001ITGa; Wed, 12 Feb 97 13:20 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vudfw-001ITEE; Wed, 12 Feb 97 13:20 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vudfL-000BlxC; Wed, 12 Feb 97 13:19 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vudft-001ITEE; Wed, 12 Feb 97 13:20 MET
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Xref: oops de.alt.comm.isdn4linux:1555
|
||||
Newsgroups: de.alt.comm.isdn4linux
|
||||
From: keil@temic-ech.spacenet.de (Karsten Keil)
|
||||
Subject: Re: Isdn4Linux an Standleitung?
|
||||
X-Newsreader: TIN [version 1.2 PL2]
|
||||
Organization: temic
|
||||
Message-Id: <E5HLEu.Kn@temic-ech.spacenet.de>
|
||||
References: <5ds4i9$9ut$1@News.CoLi.Uni-SB.DE>
|
||||
Date: Wed, 12 Feb 1997 11:04:06 GMT
|
||||
Lines: 63
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
Joerg Dorchain (dorchain@mpi-sb.mpg.de) wrote:
|
||||
: Ist es möglich mit, mit einer Teles- (oder auch sonstigen Karte),
|
||||
: Isdn4Linux an einer Standleitung zu betreiben? Genauer gesagt an einer
|
||||
: SoFMV-Verbindungen (Die Variante mit 1 B-Kanal).
|
||||
: Falls ja, kann mir jemand eine Kurzanleitung schicken?
|
||||
Ist mit dem HiSax aus dem CVS Tree moeglich.
|
||||
Wie Du an den CVS tree kommst ging ein paar mal ueber die Liste.
|
||||
(Das letzte Mal mit Subject: Re: Absturz des ISDN
|
||||
am 5 Feb 1997.)
|
||||
|
||||
Anleitung zur Installation des isdntrees.
|
||||
1. Einen 2.0.X kernel mit HiSax 1.X (wichtig mit HiSAX)
|
||||
|
||||
2. ins CVS isdn wechseln und
|
||||
./std2kern -d
|
||||
aufrufen
|
||||
4. Im kernel make (menu)config;make dep; make clean; make modules
|
||||
|
||||
Hier ein Beispielscript zum leased mod, module werden direkt aus dem
|
||||
kernel geladen (kein make module_install notwendig)
|
||||
Alle Telefonnummern sind erlaubt, sie spielen keine Rolle.
|
||||
|
||||
#!/bin/sh
|
||||
cd /usr/src/linux/modules
|
||||
/sbin/insmod -m isdn.o > /tmp/isdn/isdn.map
|
||||
/sbin/insmod -m hisax.o type=3 io=0x180 protocol=1 irq=10 id=HiSax \
|
||||
> /tmp/isdn/hisax.map
|
||||
/bin/cat /System.map /tmp/isdn/isdn.map /tmp/isdn/hisax.map | \
|
||||
sort > /tmp/isdn/System.map
|
||||
# Full debug nur fuer tests , muss wenns geht runtergesetzt werden
|
||||
/sbin/telesctrl HiSax 1 0xffff
|
||||
/sbin/telesctrl HiSax 11 0xff
|
||||
# normal debug
|
||||
#/sbin/telesctrl HiSax 1 0x31
|
||||
#/sbin/telesctrl HiSax 11 0x01
|
||||
|
||||
# Setzen in leased Mode
|
||||
/sbin/telesctrl HiSax 5 0
|
||||
# interface
|
||||
/sbin/isdnctrl addif isdn0
|
||||
# wichtig
|
||||
/sbin/isdnctrl huptimeout isdn0 0
|
||||
# binde Interface an 1. BChannel (,1 fuer 2.)
|
||||
/sbin/isdnctrl bind HiSax,0
|
||||
# dummy
|
||||
/sbin/isdnctrl eaz isdn0 1
|
||||
/sbin/isdnctrl l2_prot isdn0 hdlc
|
||||
# dummy
|
||||
/sbin/isdnctrl addphone isdn0 out 2
|
||||
/sbin/isdnctrl addphone isdn0 in 3
|
||||
# interface starten
|
||||
/sbin/ifconfig isdn0 192.1.1.1 up
|
||||
# route zur Gegenstelle
|
||||
/sbin/route add 192.1.1.2 isdn0
|
||||
mv /tmp/isdnctrl.log /tmp/isdnctrl.log.o
|
||||
cat /dev/isdnctrl >/tmp/isdnctrl.log &
|
||||
|
||||
|
||||
--
|
||||
Dipl.Ing. Karsten Keil Microcontroller Developement
|
||||
email: keil@temic-ech.spacenet.de Temic Semiconducters GmbH
|
||||
Any opinions in this posting are my own and not those of my present
|
||||
or previous employers.
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,292 +0,0 @@
|
|||
Date: Tue, 29 Oct 1996 03:57:50 +0000 (GMT) From: Rainer May <r_may@khavi.desaster.heide.de> X-Sender: r_may@kahvi.desaster.heide.de To: isdn4linux@hub-wue.franken.de
|
||||
Subject: i4l und Masquerading
|
||||
X-Flags: MN
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
|
||||
|
||||
Nachdem ich leichtsinnig genug irgendwo mal verkuendet hatte, dass ich hier ein LAN hinter einem Linux-Server mit i4l bei meinem Provider einspeise, platzte mein Postfach aus den Naehten. Bevor ich alles immer wieder aufs Neue abtippe, hab' ich das Procedere in einer Art FAQ aufgeschrieben.
|
||||
|
||||
Vielleicht interessiert sich ja wer dafuer. Wer den Text in irgendwelche Webpages aufnehmen, ausdrucken und aufs Klo haengen oder sonstwas damit machen will, meinen Segen hat er.
|
||||
|
||||
Rainer
|
||||
###########################
|
||||
|
||||
isdn4linux und IP-Masquerading im LAN
|
||||
-------------------------------------
|
||||
|
||||
Problem: "Ich habe ein lokales Netzwerk (LAN), in dem Rechner
|
||||
der verschiedensten Plattformen - Win95, Win311, NT,
|
||||
Amiga (AmiTCP) und MacIntosh (MacTCP) - ueber einen
|
||||
Linux-Router mit der Aussenwelt verbunden werden
|
||||
sollen. In der Linux-Maschine steckt eine ISDN-
|
||||
Karte. Von meinem Provider bekomme ich dynamisch
|
||||
eine IP-Adresse zugewiesen, wenn die Verbindung auf-
|
||||
gebaut wird. Nun moechte ich aber nicht nur vom
|
||||
Linux-Router direkt, sondern von jedem Rechner im
|
||||
LAN ins Internet kommen. Wie?"
|
||||
|
||||
Loesung: "Die meiste Arbeit ist auf Linux-Seite zu erledigen.
|
||||
Zunaechst einmal braucht man einen Kernel mit ein-
|
||||
gebautem IP-Forwarding und Masquerading. D.h., bei
|
||||
"make config" muessen folgende Fragen mit "Y" be-
|
||||
antwortet werden:
|
||||
|
||||
Prompt for development and/or incomplete code/drivers Y
|
||||
Enable loadable module support Y
|
||||
Networking support Y
|
||||
Network firewalls Y
|
||||
TCP/IP networking Y
|
||||
IP: forwarding/gatewaying Y
|
||||
IP: firewalling Y
|
||||
IP: masquerading Y
|
||||
PPP (point-to-point) support (wenn PPP zum Provider) Y
|
||||
SLIP (serial line) support Y
|
||||
Ethernet (10 or 100Mbit) (oder Arcnet oder ...) Y
|
||||
ISDN support [1] M
|
||||
Support synchronous PPP (wenn ipppd benutzt wird) Y
|
||||
HiSax SiemensChipSet driver support M
|
||||
(dann den HiSax fuer die ISDN Karte waehlen)
|
||||
|
||||
Anschliessend den Kernel wie ueblich mit "make dep",
|
||||
"make clean", "make zImage", "make modules" und
|
||||
"make modules_install" bauen.
|
||||
|
||||
Auf das Installieren von PPP und der ISDN-Treiber
|
||||
wird an anderer Stelle ausfuehrlich eingegangen.
|
||||
Hier geht es weiter, wenn folgende Voraussetzungen
|
||||
erfuellt sind:
|
||||
|
||||
* Das ISDN-Subsystem laeuft, d.h., von Linux aus
|
||||
kann eine Verbindung zum Provider hergestellt
|
||||
werden.
|
||||
* Das lokale Netzwerk (Ethernet usw.) laeuft auch,
|
||||
vorzugsweise unter Verwendung "freier" IP-
|
||||
Adressen (z.B. 192.168.xx.xx), und der Linux-Host
|
||||
kann von allen anderen Rechnern im LAN erreicht
|
||||
werden (z.B. per ping).
|
||||
|
||||
Nun gilt es, zweierlei zu erreichen:
|
||||
|
||||
* Zugriffe von einem beliebigen Rechner im LAN
|
||||
auf eine nicht-lokale IP-Adresse sollen den
|
||||
Linux-Router veranlassen, eine Verbindung zum
|
||||
Provider aufzubauen; und
|
||||
* Der Linux-Router soll zwar die Rechner im LAN
|
||||
mit dem Provider verbinden, diesem gegenueber
|
||||
aber verheimlichen, dass nicht der Router
|
||||
selbst Empfaenger/Absender der entsprechenden
|
||||
IP-Pakete ist.
|
||||
|
||||
Beginnen wir mit dem zweiten Punkt. Dieses "Ver-
|
||||
heimlichen" hat nichts damit zu tun, dass man
|
||||
seinen Provider hintergehen will (obwohl man auf
|
||||
diese Weise auch selbst Provider spielen und
|
||||
seine Kunden klammheimlich ueber _einen_ billigen
|
||||
"Privat-Zugang" ins Internet bringen kann), son-
|
||||
dern mit technischen Notwendigkeiten. Denn nur
|
||||
das Interface des Linux-Rechners, das die Verbin-
|
||||
dung zum Provider herstellt, bekommt von diesem
|
||||
eine IP-Adresse verpasst, die der Provider auch
|
||||
kennt. Traegt z.B. der Router im LAN die lokale
|
||||
IP-Adresse 192.168.1.1, und ein anderer Rechner
|
||||
die 192.168.1.2, dann kennt der Provider diese
|
||||
Adressen ja nicht. Er weist z.B. dem PPP-Inter-
|
||||
face des Routers die Adresse 123.234.345.99 zu -
|
||||
und nur bei Paketen aus dem Internet, die an
|
||||
diese Nummer adressiert sind, weiss er auch, an
|
||||
wen er die Pakete schicken soll. Daher muss der
|
||||
Router Pakete von anderen Rechnern im LAN "mas-
|
||||
kieren" - mit seiner eigenen, dynamisch zugewie-
|
||||
senen Adresse (und dabei natuerlich Buch darueber
|
||||
fuehren, was an wen von wem kam, um die Antwort-
|
||||
Pakete richtig zuzustellen).
|
||||
|
||||
Zum Glueck ist diese Funktion in den Linux-Kernel
|
||||
=>2.0.0 schon eingebaut (s.o.) - sie nennt sich
|
||||
"IP-Masquerading". Vereinfacht ausgedrueckt geht
|
||||
das so:
|
||||
Ein LAN-Rechner schickt ein Paket ab, das neben
|
||||
IP-Nummer und Ziel-Port des Empfaengers auch die
|
||||
"Absender-Adresse" in Form einer IP-Nummer und
|
||||
eines Antwort-Ports traegt. Der maskierende
|
||||
Router nun ersetzt die Absender-IP durch seine
|
||||
eigene und den Ruecksende-Port durch einen freien
|
||||
aus seinem Fundus. Unter dieser "freien" Port-
|
||||
nummer werden die originalen Absender-Daten ge-
|
||||
speichert. Kommt nun ein Antwort-Paket aus dem
|
||||
Internet an diesen Port, werden dessen Empfaenger-
|
||||
Adresse und -Port mit der gespeicherten Ruecksende-
|
||||
Adresse ueberschrieben und an den LAN-Rechner wei-
|
||||
tergeleitet. Paket fuer Paket.
|
||||
Leicht einsehbar ist uebrigens, dass dieses Verfahren
|
||||
nur mit Diensten funktioniert, bei denen auch eine
|
||||
Ruecksende-Adresse angegeben wird. Dazu gehoeren
|
||||
u.a. telnet, http, ftp, irc (eingeschraenkt), nicht
|
||||
aber Echo (ping).
|
||||
|
||||
Zurueck zur Praxis. Damit das Masquerading auch
|
||||
bei FTP und IRC funktioniert, werden zunaechst
|
||||
zwei Module geladen:
|
||||
|
||||
/sbin/modprobe ip_masq_ftp
|
||||
/sbin/modprobe ip_masq_irc
|
||||
|
||||
Dann werden die Forward-Rules des Kernel zum
|
||||
Masquerading gezwungen:
|
||||
|
||||
/sbin/ipfwadm -F -a m -P all -S 192.168.123.0/24 -D 0.0.0.0/0 -b [2]
|
||||
|
||||
In diesem Beispiel werden im LAN die IP-Adressen
|
||||
192.168.123.1 bis 192.168.123.254 benutzt. Legen
|
||||
wir zur Vereinfachung fest, der Linux-Router habe
|
||||
dabei die Adresse 192.168.123.1
|
||||
|
||||
Obige Zeile bewirkt, dass IP-Pakete, die von
|
||||
192.168.123.x ausgehen und an wenauchimmer gerichtet
|
||||
sind, maskiert werden. Das hat den Nachteil, dass
|
||||
auch innerhalb des LAN fleissig drauflosmaskiert
|
||||
wird, was man aber durch Einfuegen weiterer Rules
|
||||
vermeiden kann. "man ipfwadm" sei hier zur Lektuere
|
||||
empfohlen.
|
||||
|
||||
Das "Verstecken" des LAN vor dem Provider haben wir
|
||||
nun erreicht. Jetzt gilt es, bei Bedarf einen auto-
|
||||
matischen Verbindungsaufbau zu erzwingen.
|
||||
|
||||
Dafuer ist es zunaechst noetig, die anderen Rechner
|
||||
im LAN dazu zu bringen, alle fuer "Ausserhalb" be-
|
||||
stimmten IP-Pakete an den Linux-Router zu uebergeben
|
||||
und diesem die Weiterleitung zu ueberlassen.
|
||||
|
||||
Nichts leichter als das: Sowohl bei den verschiedenen
|
||||
Windows-Versionen, als auch beim AmiTCP und beim
|
||||
MacTCP gibt es in der Konfiguration den Stichwort
|
||||
"Default-Gateway" oder nur "Gateway". Hier ist die
|
||||
_lokale_ IP-Adresse des Routers einzutragen (denn
|
||||
die spaetere Adresse, die vom Provider kommt, ist
|
||||
ja erstens noch nicht bekannt und aendert sich zwei-
|
||||
tens bei jedem Anruf).
|
||||
|
||||
Letzter Schritt ist dann, das "dial-on-demand" ein-
|
||||
zurichten. In Verbindung mit isdn4linux gibt es dafuer
|
||||
zwei Moeglichkeiten:
|
||||
|
||||
* Man verwendet synchrones PPP fuer die Verbindung
|
||||
zum Provider, also den "ipppd". Dann ist nichts
|
||||
weiter zu tun als dafuer zu sorgen, dass immer
|
||||
die Default-Route des Routers auf das entsprechende
|
||||
ipppx-Interface weist. Vorsicht: Beim Verbindungs-
|
||||
abbau loescht der Kernel diese Route! Sie muss
|
||||
also z.B. in der Datei /etc/ppp/ip-down neu gesetzt
|
||||
werden.
|
||||
Das Risiko bei diesem Verfahren sind Programme auf
|
||||
den LAN-Rechnern, die mehr oder weniger regelmaessig
|
||||
Nameserver-Requests, Keepalive-Pakete oder ARP-
|
||||
Broadcastings erzeugen - dann stellt naemlich der
|
||||
Router jedesmal eine Verbindung zum Provider her.
|
||||
Die Telekom wird's danken.
|
||||
|
||||
Uebrigens kann es passieren, dass manche aus dem
|
||||
LAN initiierte Verbindungen recht lange auf Antwort
|
||||
warten. Ich weiss nicht, ob Kernel oder ipppd das
|
||||
"ausloesende" Paket verschlucken, oder die Antwort
|
||||
darauf unterschlagen; ich weiss aber, dass es
|
||||
hilft, z.B. bei Netscape wenige Sekunden nach
|
||||
Anforderung der ersten Seite auf den "roten Knopf"
|
||||
zu druecken und die Seite nochmals anzufordern.
|
||||
|
||||
Wie bereits erwaehnt: Die Konfiguration des ipppd
|
||||
wird an anderer Stelle ausfuehrlicher und kompeten-
|
||||
ter erklaert, als ich es koennte [3]
|
||||
|
||||
* Benutzt man asynchrones ppp oder gar SLIP/CSLIP
|
||||
fuer die Verbindung zum Provider, kann man das
|
||||
Programm "diald" [4] verwenden. Es bietet zudem
|
||||
den Vorteil, extrem stark konfigurierbar zu sein;
|
||||
so kann man z.B. festlegen, dass zwischen 0900
|
||||
und 1200 grundsaetzlich keine Verbindung aufgebaut
|
||||
wird, dass Nameserver-Anfragen eine Verbindung zwar
|
||||
nicht aufbauen, aber offenhalten koennen u.v.m.
|
||||
Wer sich mit diesen Konfigurationsmoeglichkeiten
|
||||
nicht herumschlagen mag, braucht das indes auch
|
||||
nicht - die Default-Konfiguration kann man ohne
|
||||
Gefahr fuer Leib und Geldboerse uebernehmen :-)
|
||||
|
||||
|
||||
So. Wenn jetzt das Masquerading eingerichtet wurde.
|
||||
Wenn der Linux-Router auf allen LAN-Rechnern als
|
||||
Gateway eingetragen wurde. Wenn ein "ping abc.edu",
|
||||
eingetippt auf der Console des Routers, eine Verbin-
|
||||
dung zum Provider aufbaut. _Dann_ sollte damit auch
|
||||
fuer alle Rechner im LAN der Weg ins Internet frei sein.
|
||||
|
||||
Troubleshooting:
|
||||
|
||||
Problem: "Alles schoen und gut. Aber wenn ich z.B. von der
|
||||
W95-Kiste aus mit Netscape eine Seite aufrufe,
|
||||
bekomme ich als Antwort nur "unknown host" Loesung: "Was ist denn auf der "Win95-Kiste" als Nameserver
|
||||
eingetragen? Sofern auf dem Router kein eigener
|
||||
NS laeuft, muss natuerlich auf allen LAN-Rechnern
|
||||
der NS des Providers eingetragen sein."
|
||||
|
||||
Problem: "Die Adressen werden jetzt aufgeloest, aber statt
|
||||
der gewuenschten Seite bekomme ich die Meldung
|
||||
"no route to host"!"
|
||||
Loesung: "Bitte pruefen:
|
||||
* Ist auf dem LAN-Rechner der Linux-Router als
|
||||
Gateway eingetragen (manche "Betriebssysteme"
|
||||
muss man komplett resetten, bevor Sie da eine
|
||||
Aenderung mitbekommen)?
|
||||
* Liegt auf dem Router die Default-Route auf dem
|
||||
"Bereitschafts-Interface" zum Provider (z.B.
|
||||
auf ippp0 bei synch. PPP, oder auf sl0 bei
|
||||
diald (auch wenn die "echte" Verbindung nachher
|
||||
per ppp0 geht - diald benutzt ein SLIP-Interface
|
||||
als "Tuerklingel") ?
|
||||
* Erzwingt der Provider die Verwendung von Proxies?
|
||||
Dann muessen die IP-Adressen der Provider-Proxies
|
||||
auch in den entsprechenden Programmen der LAN-
|
||||
Rechner eingetragen sein!
|
||||
|
||||
Problem: "Warum sind bei diesem FAQ keine ausfuehrlichen
|
||||
Beispielscripte fuer ipppd, diald usw.?" Loesung: "Weil dies eine FAQ ist und keine eierlegende
|
||||
Wollmilchsau. Ein Beispiel fuer diald haengt
|
||||
trotzdem hinten dran."
|
||||
|
||||
Problem: "Was muss ich fuer diese supertolle FAQ bezahlen?" Loesung: "Wenn es nach meiner Frau ginge, mindestens 250
|
||||
Mark - so hoch veranschlagt sie den Abend, den ich
|
||||
mit Schreiben verbrachte und der ihr daher entging.
|
||||
Da es aber nicht nach meiner Frau geht, sondern nach
|
||||
mir ;-), steht die FAQ unter GPL. Kost' also nix."
|
||||
|
||||
################################################################
|
||||
|
||||
|
||||
[1] Wer mag, kann die ISDN-Treiber natuerlich auch direkt in den
|
||||
Kernel einbauen, anstatt sie als Module zu verwenden.
|
||||
|
||||
[2] Das Programm ipfwadm gibt es per Anon-FTP als
|
||||
ftp://ftp.xos.nl/pub/linux/ipfwadm/ipfwadm-2.3.0.tar.gz
|
||||
|
||||
[3] Bernhard Hailer hat das Ganze auf seinen www-Seiten sehr
|
||||
ausfuehrlich und verstaendlich beschrieben. Die URL ist
|
||||
http://www.chemie.uni-muenchen.de/ac/boehm/beh.html
|
||||
|
||||
################################################################
|
||||
|
||||
Beispielscripte fuer die Verwendung von isdn4linux mit diald. Die verbindung zum provider wird per X75 aufgebaut, das Protokoll ist dann PPP, ohne PAPpy/CHAPpy usw. Ein einfacher Login. Und Telefonnummer, Name sowie Passwort sind natuerlich gefaelscht :-)
|
||||
|
||||
-------------------
|
||||
# zuerst wird - gleich beim Booten - diald "scharf gemacht" #
|
||||
# /etc/rc.d/rc.diald
|
||||
/usr/sbin/diald /dev/ttyI4 -m ppp local 192.168.90.9 remote 192.168.90.1 \
|
||||
defaultroute dynamic modem crtscts lock connect "chat -v -f \
|
||||
/etc/ppp/chat.provider"
|
||||
#
|
||||
-------------------
|
||||
#
|
||||
# /etc/ppp/chat.provider
|
||||
#
|
||||
TIMEOUT 240 "" AT&E1234 OK ATD047110815 ogin: Puser sword: topsecret #
|
||||
-------------------
|
||||
|
||||
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
|
|
@ -1,122 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA15640; Sun, 5 Jan 1997 18:04:15 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id SAA22736; Sun, 5 Jan 1997 18:05:24 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vgt53-000oLra; Sun, 5 Jan 97 14:57 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vgt3F-001IV9a; Sun, 5 Jan 97 14:55 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vgt3C-001IV8E; Sun, 5 Jan 97 14:55 MET
|
||||
Received: from wildsau.idv.uni-linz.ac.at by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vgt3I-000BmIC; Sun, 5 Jan 97 14:55 MET
|
||||
Received: (from herp@localhost) by wildsau.idv.uni-linz.ac.at (8.6.12/8.6.9) id OAA19933 for isdn4linux@hub-wue.franken.de; Sun, 5 Jan 1997 14:52:07 +0100
|
||||
From: Herbert Rosmanith <herp@wildsau.idv.uni-linz.ac.at>
|
||||
Message-Id: <199701051352.OAA19933@wildsau.idv.uni-linz.ac.at>
|
||||
Subject: ip-masq, sample setup
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Date: Sun, 5 Jan 1997 14:52:07 +0100 (MET)
|
||||
X-Mailer: ELM [version 2.4 PL25]
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
|
||||
since there have been question about ip-masquerading recently, here
|
||||
is a sample setup. note: this is no isdn-setup anymore (it was before),
|
||||
but the machine now has two ethernet cards (the customer bought a leased
|
||||
line). note also that there is a particular network which stupidly has
|
||||
been setup as internal network allthough the numbers have already been
|
||||
officially assigned elsewhere. thanks to "daten technik" for this
|
||||
very clever network design ... :-(
|
||||
|
||||
some words to the configuration: the maschine has two network cards,
|
||||
one for the internal network, one with a real IP address.
|
||||
|
||||
eth0: 10.0.0.0 internal
|
||||
eth0:1 192.34.0.0 "internal"
|
||||
eth1: x.x.x.x external, real address
|
||||
|
||||
you may find the setup for the masquerading part a bit strange.
|
||||
however, I chosed to configure that based on network cards, not on
|
||||
ip-numbers. this can be done using the "-W" option from ipfwadm.
|
||||
so, the last lines below read "accept all traffic from card
|
||||
1 unchanged, but masquerade it on card 2". this makes sense, since card 2
|
||||
is the only one with a real ip-addess.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
#!/bin/sh
|
||||
iw=/sbin/ipfwadm
|
||||
h=linux.xxxxxxx.co.at
|
||||
#
|
||||
# start with a clean configuration...
|
||||
#
|
||||
$iw -If
|
||||
#
|
||||
# default policy: paranoid...
|
||||
#
|
||||
$iw -Ip deny
|
||||
#
|
||||
# allow only ICMP ECHO REPLY from outside.
|
||||
# this allows us to ping other hosts, but disables
|
||||
# others to ping ourselves.
|
||||
#
|
||||
$iw -Ia accept -S 0/0 0 -D $h -P icmp -W eth1
|
||||
$iw -Ia deny -S 0/0 -D $h -P icmp -W eth1
|
||||
#
|
||||
# allow incoming smtp connections from outside (internet)
|
||||
# force local users to use mail-relay
|
||||
#
|
||||
$iw -Ia accept -S 0/0 -D xxx.xxx.xxx.xx smtp -P tcp -W eth1
|
||||
$iw -Ia accept -S 0/0 -D 192.34.70.254 smtp -P tcp -W eth0
|
||||
$iw -Ia accept -S 0/0 -D 10.0.0.1 smtp -P tcp -W eth0:1
|
||||
$iw -Ia accept -S 0/0 -D 127.0.0.1 smtp -P tcp -W lo
|
||||
$iw -Ia deny -S 0/0 -D 0/0 smtp -P tcp
|
||||
#
|
||||
# loopback, eth0 and eth0:1 is allowed to do (nearly) everything, of course ...
|
||||
#
|
||||
$iw -Ia accept -S 0/0 -D 0/0 -W lo
|
||||
$iw -Ia accept -S 0/0 -D 0/0 -W eth0
|
||||
$iw -Ia accept -S 0/0 -D 0/0 -W eth0:1
|
||||
#
|
||||
# domain may only speak with domain
|
||||
#
|
||||
$iw -Ia accept -S 0/0 domain -D $h domain -P tcp -W eth1
|
||||
$iw -Ia accept -S 0/0 domain -D $h domain -P udp -W eth1
|
||||
#
|
||||
# allow incoming traffic once the connection has been built.
|
||||
# - note: this is the same as the cisco-keyword "established"
|
||||
#
|
||||
# nota bene: since we already accept everything from lo, eth0 and eth0:1,
|
||||
# it is not (seems not to be) neccessary to check the SYN flag, too.
|
||||
#
|
||||
$iw -Ia accept -S 0/0 -D $h -k -W eth1
|
||||
#
|
||||
# allow yyyyyy to do some service
|
||||
#
|
||||
$iw -Ia accept -S yyyyyyy.yyyyyy.co.at -D $h -W eth1
|
||||
#
|
||||
# allow yyyyyy ftp
|
||||
#
|
||||
$iw -Ia accept -S ftp.yyyyyy.co.at -D $h -W eth1
|
||||
$iw -Ia accept -S ftp.yyyyyy.co.at -D $h -W eth1
|
||||
#
|
||||
$iw -Ia accept -S $h -D 0/0 -W eth1
|
||||
#
|
||||
# now for the masquerading part
|
||||
#
|
||||
$iw -Ff
|
||||
$iw -Fp deny
|
||||
$iw -Fa accept -S 0/0 -D 0/0 -W eth0
|
||||
$iw -Fa accept -S 0/0 -D 0/0 -W eth0:1
|
||||
$iw -Fa masquerade -S 0/0 -D 0/0 -W eth1
|
||||
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,142 +0,0 @@
|
|||
Sender: Okane@em.uni-frankfurt.de
|
||||
Date: Fri, 08 Nov 1996 20:31:01 +0100
|
||||
From: "Robert O'Kane" <okane@em.uni-frankfurt.de> Organization: OTHERSPACE
|
||||
To: Matthias Hessler <hessler@wi-inf.uni-essen.de> Subject: Re: Though put over multiple ISDN channels
|
||||
|
||||
Matthias Hessler wrote:
|
||||
>
|
||||
> Hi Robert,
|
||||
>
|
||||
> ich kann Dir bei den Durchsatzproblemen nicht helfen, allerdings wuerden wir
|
||||
> uns gerne freuen, wenn wir die FAQ um ein paar Hinweise zum Channel-Bundling
|
||||
> erweitern koennten (es kommt immer wieder zu Fragen in dieser Richtung).
|
||||
>
|
||||
> Koenntest Du uns Deine Konfigurationsskripte zukommen lassen? Oder gar
|
||||
> einige Frage/Anwort-Paare - um anderen beim Ueberwinden der schwierigsten
|
||||
> Huerden zu helfen?
|
||||
>
|
||||
> Vielen Dank.
|
||||
>
|
||||
> Matthias
|
||||
|
||||
Hello,
|
||||
|
||||
Attached is the script I use to setup multiple channels to be used as 1 network device. Mind you the throughput isn't really great. So it might not be worth the effort until we can get the network device to feed more data to the ISDN device.
|
||||
|
||||
Please feel free to add this to the FAQ if you like.
|
||||
|
||||
Bob.
|
||||
|
||||
--
|
||||
---------------------------------------------- Unfortunatly, I find language (like politics) necessary for humans.
|
||||
Leider finde Ich Sprache (wie Politik) fuer die Menschen notwendig.
|
||||
---------------------------------------------- Robert O'Kane
|
||||
OTHERSPACE
|
||||
Founding Member and Linker
|
||||
|
||||
URL : http://www.rz.uni-frankfurt.de/~okane email: okane@em.uni-frankfurt.de
|
||||
---------------------------------------------- Ok, here is a script used to set up multiple isdn "devices" to be used as one for a network.
|
||||
LOTS here were picked up from the Isdn$Linux Mail list ;-}
|
||||
|
||||
Maybe someone else can use things in here.
|
||||
Included:
|
||||
startisdn <- script to setup the ISDN and network devices
|
||||
|
||||
|
||||
NOTE: 1: Depending on your setup (modules, card_id's, etc..) you
|
||||
: may want to bind the devices to certain cards/channels
|
||||
: so things work the way you want.
|
||||
|
||||
2: I couldn't get any 'real' speed up. The maximum throughput
|
||||
: I got was arround 10K - 12K. YMMV (You mileage may vary)
|
||||
|
||||
##################################################################### #####################################################################
|
||||
|
||||
: /usr/local/isdn/startisdn
|
||||
|
||||
#! /bin/sh
|
||||
|
||||
#####################################
|
||||
## Startup script for ISDN network.
|
||||
##
|
||||
## On "other" machine, reverse REMOTE and LOCAL ##
|
||||
|
||||
REMOTE_IP="machine2"
|
||||
REMOTE_NUMBER0="xxxxxx35"
|
||||
REMOTE_NUMBER1="xxxxxx36"
|
||||
REMOTE_NUMBER2="xxxxxx38"
|
||||
REMOTE_NUMBER3="xxxxxx39"
|
||||
|
||||
LOCAL_IP="machine1"
|
||||
LOCAL_NUMBER0="xxxxxx46"
|
||||
LOCAL_NUMBER1="xxxxxx47"
|
||||
LOCAL_NUMBER2="xxxxxx49"
|
||||
LOCAL_NUMBER3="xxxxxx50"
|
||||
|
||||
CHANNELS="1 2 3"
|
||||
|
||||
SYSPATH="/sbin"
|
||||
ISDNCTRL="/sbin/isdnctrl"
|
||||
ENCAP="rawip"
|
||||
DEVICE="isdn0"
|
||||
SLAVE="isdnsl"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
### install modules if not there, ASSUME teles irq bug
|
||||
### found in the original teles driver.
|
||||
if [ ! "`lsmod | grep teles`" ]; then
|
||||
echo "teles module NOT found: INSTALLING"
|
||||
modprobe telesall
|
||||
sleep 1
|
||||
rmmod telesall
|
||||
sleep 1
|
||||
modprobe telesall
|
||||
fi
|
||||
|
||||
$ISDNCTRL addif $DEVICE
|
||||
$ISDNCTRL eaz $DEVICE $LOCAL_NUMBER0
|
||||
$ISDNCTRL addphone $DEVICE in "*$REMOTE_NUMBER0"
|
||||
$ISDNCTRL addphone $DEVICE out $REMOTE_NUMBER0
|
||||
$ISDNCTRL l2_prot $DEVICE x75i
|
||||
$ISDNCTRL l3_prot $DEVICE trans
|
||||
$ISDNCTRL encap $DEVICE $ENCAP
|
||||
$ISDNCTRL huptimeout $DEVICE 60
|
||||
$ISDNCTRL chargehup $DEVICE off
|
||||
$ISDNCTRL ihup $DEVICE off
|
||||
$ISDNCTRL secure $DEVICE on
|
||||
$ISDNCTRL sdelay $DEVICE 15
|
||||
|
||||
for i in $CHANNELS ; do
|
||||
$ISDNCTRL addslave $DEVICE $SLAVE$i
|
||||
$ISDNCTRL eaz $SLAVE$i $[LOCAL_NUMBER$i]
|
||||
$ISDNCTRL addphone $SLAVE$i in "*$[REMOTE_NUMBER$i]"
|
||||
$ISDNCTRL addphone $SLAVE$i out $[REMOTE_NUMBER$i]
|
||||
$ISDNCTRL l2_prot $SLAVE$i x75i
|
||||
$ISDNCTRL l3_prot $SLAVE$i trans
|
||||
$ISDNCTRL encap $SLAVE$i $ENCAP
|
||||
$ISDNCTRL huptimeout $SLAVE$i 30
|
||||
$ISDNCTRL chargehup $SLAVE$i off
|
||||
$ISDNCTRL ihup $SLAVE$i off
|
||||
$ISDNCTRL secure $SLAVE$i on
|
||||
$ISDNCTRL sdelay $SLAVE$i 15
|
||||
done
|
||||
|
||||
$SYSPATH/ifconfig $DEVICE inet $LOCAL_IP \
|
||||
pointopoint $REMOTE_IP metric 1
|
||||
$SYSPATH/route add -host $REMOTE_IP $DEVICE
|
||||
;;
|
||||
stop)
|
||||
$SYSPATH/ifconfig $DEVICE down
|
||||
$ISDNCTRL delif $DEVICE
|
||||
;;
|
||||
hangup)
|
||||
$ISDNCTRL hangup $DEVICE
|
||||
;;
|
||||
*)
|
||||
echo "$0 : <start|stop|hangup>"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#####################################################################
|
|
@ -1,133 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA65252; Wed, 12 Feb 1997 08:00:58 +0100
|
||||
Received: from anna-atm.rz.uni-frankfurt.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id IAA07066; Wed, 12 Feb 1997 08:02:04 +0100
|
||||
Received: from bob.renderserve.de (actually dialin055.rz.uni-frankfurt.de)
|
||||
by amalia-atm.rz.uni-frankfurt.de with Local SMTP (PP);
|
||||
Wed, 12 Feb 1997 05:02:14 +0000
|
||||
Sender: Okane@em.uni-frankfurt.de
|
||||
Message-Id: <330125B3.5921AC58@em.uni-frankfurt.de>
|
||||
Date: Wed, 12 Feb 1997 03:06:43 +0100
|
||||
From: "Robert O'Kane" <okane@em.uni-frankfurt.de>
|
||||
Organization: OTHERSPACE
|
||||
X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.0.29 i586)
|
||||
Mime-Version: 1.0
|
||||
To: Matthias Hessler <hessler@wi-inf.uni-essen.de>
|
||||
Cc: joe@odel.on.ca, isdn4linux@hub-wue.franken.de
|
||||
Subject: Re: MP
|
||||
References: <199702111612.RAA03177@james.mathes.uni-essen.de>
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Status:
|
||||
|
||||
Matthias Hessler wrote:
|
||||
>
|
||||
> Hi Joe,
|
||||
>
|
||||
> On Mon, 10 Feb 1997 17:48:23 -0500 (EST), joe@odel.on.ca wrote:
|
||||
> > Hi ISDN4Linux'ers. I have a two Spellcaster BRI cards and two
|
||||
> > linux boxes. One box is at my ISP's side and the other is in my office.
|
||||
> > I have obtained and compiled ISDN4LINUX, spellcasters I4L driver without
|
||||
> > many problems. I have ISDN support compiled into the kernel as well as
|
||||
> > SyncPPP support and load the driver (sc.o) with modprobe with no problems.
|
||||
> > I have a couple of questions I hope aren't too stupid. I have a feeling
|
||||
> > they have been answered in German, but unfortunately I don't (yet) speak
|
||||
> > or read German very well so please excuse my ignorance.
|
||||
>
|
||||
> No worries - you are very welcome to write in English.
|
||||
>
|
||||
> I'm not using the MP stuff, but I got the script from Robert O'Kane
|
||||
> that he uses. It is appended at the end. From the first look it
|
||||
> doesn't look too much different - but maybe you find something.
|
||||
>
|
||||
> As far as I understand the ipppd can dial out on demand (if the route
|
||||
> exists and ip packages are coming). Or you can trigger the dialing
|
||||
> with "isdnctrl dial". Very strange that you have to do latter at
|
||||
> _both_ stations. That sounds very wrong.
|
||||
>
|
||||
|
||||
Hello, (Robert here :-0 )
|
||||
|
||||
The scripts I sent in are for the "built-in" function of ISDN4Linux
|
||||
when
|
||||
using the rawip/ethernet/... encapsulation. PPP (SyncPPP) encapsulation
|
||||
doesnt
|
||||
seem to be supported for the "automatic" functions of I4L!
|
||||
|
||||
MIXING THE SLAVE (autodial/autohangup) functions with SyncPPP doesn't
|
||||
work:
|
||||
1: reliably- relying on the auto hangup appears to work until the 2nd
|
||||
-> 5th
|
||||
time. Then the kernel gets "a bit" disturbed.
|
||||
|
||||
2: Not at all- auto dial never works with syncPPP. As far as I know
|
||||
(and can
|
||||
see), the only way to add channels to SyncPPP is to
|
||||
MANUALLY
|
||||
"addlink" and "removelink" the devices. Of course you
|
||||
need to
|
||||
have the devices pre-defined for the I4L system and for
|
||||
the PPP
|
||||
program.
|
||||
|
||||
I am still looking over (and into) these issues and hope to have more
|
||||
later.
|
||||
But for now I must say that the scripts I sent to the FAQ (and the
|
||||
list?) are
|
||||
for the rawip/ethernet encapsulations. SyncPPP is another animal (user
|
||||
space)
|
||||
and will require other links between the system (kernel) and the ppp
|
||||
program
|
||||
(user space).
|
||||
|
||||
I am also still (ja ja...) porting the ITK Columbus Card driver from
|
||||
Frank Mohr
|
||||
to the HiSax device driver system. (Thanks Karsten!!)
|
||||
|
||||
> > I have read the faq but I don't seem to be able to make it work.
|
||||
>
|
||||
> Did you get the right FAQ? There is an english version available on:
|
||||
> ftp://ftp.franken.de/pub/isdn4linux/FAQ
|
||||
> and:
|
||||
> http://www.lrz-muenchen.de/~ui161ab/www/isdn/
|
||||
> which also contains some bug fixes for the MPPP stuff. Also there are
|
||||
> two ways of using multiple links with isdn4linux. One is with ipppd,
|
||||
> the other is with rawip.
|
||||
>
|
||||
> More we can't say without more logging. If you can't locate your
|
||||
> problem just log the handshaking of the ipppd (see FAQ how to do
|
||||
> that). Then we can say more.
|
||||
>
|
||||
>
|
||||
> Other than that I'm VERY interested in hearing about this spellcaster
|
||||
> BRI card - and the driver you were talking about. Can you please
|
||||
> send me more info on that so that we can incorporate it into the
|
||||
> FAQ? There are often questions about isdn4linux in America and so
|
||||
> far we don't have any information about what works and what works
|
||||
> not... :-(
|
||||
> Please, already a www link would help very much... Are there more
|
||||
> cards available but the spellcaster? How expensive is it and are you
|
||||
> using the EURO-ISDN standard?
|
||||
>
|
||||
> Bye,
|
||||
> Matthias
|
||||
>
|
||||
|
||||
<patch stuff deleted as it doesn't help here: See appropriate FAQ >
|
||||
|
||||
-Happy ISDN'ing
|
||||
|
||||
-Robert O'Kane
|
||||
|
||||
--
|
||||
----------------------------------------------
|
||||
Robert O'Kane
|
||||
OTHERSPACE
|
||||
Founding Member and Linker
|
||||
|
||||
URL : http://www.rz.uni-frankfurt.de/~okane
|
||||
email: okane@em.uni-frankfurt.de
|
||||
----------------------------------------------
|
||||
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
Date: Sat, 19 Oct 1996 02:21:45 +0200
|
||||
X-Sender: sw0001@aixrs1.hrz.uni-essen.de To: isdn4linux@hub-wue.franken.de
|
||||
From: Matthias Hessler <hessler@wi-inf.uni-essen.de> Subject: RE: options files
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
|
||||
|
||||
At 17:57 18.10.1996 +0200, you wrote:
|
||||
>Matthias Hessler <hessler@wi-inf.uni-essen.de> ha escrito a
|
||||
>isdn4linux@hub-wue.franken.de:
|
||||
>
|
||||
>> well, isdnctrl does not quite assign interface ipppx to /dev/ipppx by
|
||||
>> default (e.g. interface ippp3 to /dev/ippp3). I'm not entirely sure how
|
||||
>it
|
||||
>> does its assignements, but I think it takes interface ipppx and binds it
|
||||
>to
|
||||
>> the first available /dev/ipppx, starting x with 0 and counting up (e.g.
|
||||
>your
|
||||
>> interface ippp3 gets bound to /dev/ippp0 because there is an ipppd
|
||||
>already
|
||||
>> waiting there)
|
||||
>> Which leads to your problem: you want interface ippp3 _exclusively_ bound
|
||||
>to
|
||||
>> /dev/ippp3 because you want only your ipppd configured for /dev/ippp3
|
||||
>> answering all the traffic from your interface ippp3.
|
||||
>
|
||||
>Hi Matthias
|
||||
>
|
||||
>Ok; for clarifying scripts (and my concepts :) I name net interfaces
|
||||
>isdn0..isdn3, but when I try to launch ipppd, it tells me there must be at
|
||||
>least ippp0 configured (???) Does it means i have to configure interfaces
|
||||
>twice (one time for ipppX and other for isdnX)?
|
||||
|
||||
No.
|
||||
|
||||
Here is what happened: You named your net interfaces isdn0..isdn3 and did not use the pppbind option. Now isdnctrl has no clue that it should connect those interfaces to any /dev/ippp* .
|
||||
|
||||
If you name your net interfaces ippp0..ippp3, then isdnctrl _automatically_ recognizes (by the name of those interfaces) that those should be connected to the /dev/ippp* . It does it (if I'm not wrong about that default behavior) when data arrives by connecting a net interface to the first available /dev/ippp* .
|
||||
Let's say if data arrives on net interface ippp3, it tries to connect it to /dev/ippp0, if that is available. If not (already another connection going on?), it tries /dev/ippp1, and so on.
|
||||
As you have two ipppd's with different options running that is not what you want, because you can never tell in advance which data will be answered by which ipppd.
|
||||
|
||||
No matter how the name of your net interfaces is, if you use the "isdnctrl pppbind" option, you can tell isdnctrl to _always_ connect some netinterface with some /dev/ippp* . E.g.:
|
||||
isdnctrl pppbind isdn3 2
|
||||
tells isdnctrl to always put data from net interface isdn3 to /dev/ippp2.
|
||||
That is very handy, if you want to have a special ipppd lurking on /dev/ippp2 that should get all that traffic from isdn3.
|
||||
|
||||
Isdnctrl acts like a switch board.
|
||||
|
||||
Default behaviour (using net interfaces ippp0 and ippp1): =========================================================
|
||||
|
||||
Kernel---------+
|
||||
| |
|
||||
Net interface ippp0 ippp1 (isdnctrl addif ippp*)
|
||||
| |
|
||||
| |
|
||||
Isdnctrl (by default, to next available device
|
||||
=> no isdnctrl pppbind necessary)
|
||||
| |
|
||||
| |
|
||||
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
|
||||
| | | |
|
||||
ipppd ipppd ipppd ipppd
|
||||
|
||||
|
||||
Default behaviour (using net interfaces isdn0, isdn1, isdn2, isdn3): ====================================================================
|
||||
|
||||
Kernel------+----------+----------+
|
||||
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif ippp*)
|
||||
|
||||
isdnctrl (no connection from isdn* to any /dev/ippp*,
|
||||
because: name of net interface is not "ippp*")
|
||||
|
||||
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
|
||||
| | | |
|
||||
ipppd ipppd ipppd ipppd
|
||||
|
||||
|
||||
|
||||
Behavior using "isdnctrl pppbind" (A):
|
||||
======================================
|
||||
|
||||
Kernel------+----------+----------+
|
||||
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif isdn*)
|
||||
|
|
||||
| Isdnctrl +-------+ (isdnctrl pppbind isdn3 2)
|
||||
|
|
||||
| Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
|
||||
| | | |
|
||||
ipppd ipppd ipppd ipppd
|
||||
|
||||
|
||||
Behavior using "isdnctrl pppbind" (A):
|
||||
======================================
|
||||
|
||||
Kernel------+----------+----------+
|
||||
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif isdn*)
|
||||
|
|
||||
| Isdnctrl +-------+ (isdnctrl pppbind isdn2 1)
|
||||
|
|
||||
|
|
||||
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
|
||||
| | | |
|
||||
ipppd ipppd ipppd ipppd
|
||||
|
||||
|
||||
I hope that's correct. Please correct me if I'm wrong...
|
||||
|
||||
Bye,
|
||||
Matthias
|
||||
|
||||
**************************************************************** Matthias Heßler Email: hessler@wi-inf.uni-essen.de Gelsenkirchener Str. 67 Tel. : 0201-8915964 45141 Essen Fax. : 0201-8915965 ****************************************************************
|
||||
|
||||
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
|
|
@ -1,80 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA57240; Mon, 3 Feb 1997 02:10:16 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id CAA02823; Mon, 3 Feb 1997 02:11:22 +0100
|
||||
Received: from oops.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vrBVK-000oIZa; Mon, 3 Feb 97 00:39 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vrBSm-001IbJa; Mon, 3 Feb 97 00:36 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vrBSf-001IbGE; Mon, 3 Feb 97 00:36 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vrBTn-000Bm0C; Mon, 3 Feb 97 00:37 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vrBSa-001IbGE; Mon, 3 Feb 97 00:36 MET
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Xref: oops de.alt.comm.isdn4linux:1297
|
||||
From: Jens Brambring <jens.brambring@p-net.de>
|
||||
Newsgroups: de.alt.comm.isdn4linux
|
||||
Subject: IPX/SPX ueber isdn4linux und WIN95
|
||||
Date: Mon, 03 Feb 1997 01:33:41 +0100
|
||||
Organization: Customer of EUnet Germany; Info: info@Germany.EU.net
|
||||
Lines: 41
|
||||
Distribution: world
|
||||
Message-Id: <32F53265.5E65@p-net.de>
|
||||
Nntp-Posting-Host: peu-62.d.eunet.de
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Mailer: Mozilla 3.01Gold [de] (Macintosh; I; 68K)
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Status:
|
||||
|
||||
Hallo, es geht!!!!
|
||||
|
||||
Man muss nur den normalen pppd auf einem isd4linux ttyIx verwenden!
|
||||
(Setzt natuerlich einen mgetty oder aehnliches auf dem device voraus)
|
||||
|
||||
Zunaechst habe ich mir einen User ppptest eingerichtet dessen
|
||||
startshell auf /usr/sbin/diplogin eingetragen ist (/etc/passwd),
|
||||
|
||||
Inhalt der Datei diphosts in /etc:
|
||||
ppptest::192.9.215.80:192.9.215.70:255.255.255.0::PPP,296
|
||||
|
||||
Inhalt der Datei /etc/ppp/options:
|
||||
-detach
|
||||
192.9.215.80:192.9.215.70
|
||||
defaultroute
|
||||
mru 1524
|
||||
debug
|
||||
/dev/ttyI1
|
||||
ipx-routing 2
|
||||
ipxcp-max-failure 20
|
||||
ipx-node 4:5
|
||||
ipx-network 0x3000
|
||||
|
||||
|
||||
Hierbei scheint die Angabe von ipx-network sehr wichtig zu sein!!!!!
|
||||
Die ip-Adressen koennen vermutlich entfallen!
|
||||
|
||||
Dann legt man auf den ethernetstrang ein normales ipxinterface an
|
||||
und startet ipxd (aus dem ipxripd).
|
||||
|
||||
Unter Windows muss dann beim DFUE-Netzwerk noch ein entsprechendes
|
||||
script eingerichtet
|
||||
werden und dann sollte es eigentlich funken.
|
||||
|
||||
Bin leider schon etwas Muede vom ganzen Probieren, werde eventuell noch
|
||||
mal eine
|
||||
Ausfuehrliche Beschreibung senden.
|
||||
|
||||
Bin aber fuer alle Fragen offen!
|
||||
|
||||
Ciao, Jens
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,156 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA76880; Sat, 30 Nov 1996 13:44:05 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id NAA01959; Sat, 30 Nov 1996 13:44:57 +0100
|
||||
Received: from hub-wue.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vTliY-000oIPa; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vTlho-000Boba; Sat, 30 Nov 96 10:27 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vTlil-001IYWa; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vTlii-001IYVE; Sat, 30 Nov 96 10:28 MET
|
||||
Received: from giovanni.rhein-neckar.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vTlge-000BobC; Sat, 30 Nov 96 10:26 MET
|
||||
Message-Id: <m0vTlgM-000rArC@giovanni.rhein-neckar.de>
|
||||
From: girardi@giovanni.rhein-neckar.de (Norbert J. Girardi)
|
||||
Subject: Re: routes?
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Date: Sat, 30 Nov 1996 10:25:58 +0100 (MET)
|
||||
Cc: uwe.tetzlaff@t-online.de
|
||||
In-Reply-To: <m0vTby7-0000fJC@ermail02.btx.dtag.de> from "Uwe Tetzlaff" at Nov 29, 96 10:11:00 pm
|
||||
X-Mailer: ELM [version 2.4 PL24]
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=ISO-8859-1
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Reply-To: isdn4linux@hub-wue.franken.de
|
||||
Status:
|
||||
|
||||
>
|
||||
> Moins..
|
||||
>
|
||||
> Ich hab hier in der Firma 2 Rechner W95 192.168.254.2 Ne2000
|
||||
> LinuX 192.168.254.1 3Com 509
|
||||
|
||||
> Zu Hause habe ich einen Rechner LinuX 192.168.255.1 Teles S0-16.3
|
||||
>
|
||||
> Also zu meinem Problem : ich teste mit ping die Verbindung :
|
||||
>
|
||||
> von LinuX zu Hause <-> LinuX Firma via isdn0 = geht.
|
||||
> von W95 Firma <-> LinuX Firma via eth0 = geht.
|
||||
> von W95 Firma <-> LinuX zu Hause via eth0 -> isdn0 = geht nicht !
|
||||
> von LinuX zu Hause <-> W95 Firma via isdn0 -> eth0 = geht nicht !
|
||||
>
|
||||
>
|
||||
> Sicherlich voellig off topic denn ich tippe auf ein Problem bei meinen routes.
|
||||
>
|
||||
Es waere sicher hilfreich gewesen wenn Du die 'routes' mitgeschickt
|
||||
haettest ;-)
|
||||
|
||||
OK, versuchen wir's trotzdem mal.
|
||||
|
||||
Nennen wir Linux at home -> lihome = 192.168.255.1 ,
|
||||
Linux at work -> liwork = 192.168.254.1 ,
|
||||
W95 at work -> work95 = 192.168.254.2 .
|
||||
|
||||
Also, bei mir wuerde die '/etc/hosts' auf allen Rechnern _so_ aussehenen:
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
# hosts This file describes a number of hostname-to-address
|
||||
# mappings for the TCP/IP subsystem. It is mostly
|
||||
# used at boot time, when no name servers are running.
|
||||
# On small systems, this file can be used instead of a
|
||||
# "named" name server. Just add the names, addresses
|
||||
# and any aliases to this file...
|
||||
#
|
||||
|
||||
# For loopbacking.
|
||||
127.0.0.1 localhost
|
||||
|
||||
192.168.255.1 lihome
|
||||
|
||||
192.168.254.1 liwork
|
||||
192.168.254.2 work95
|
||||
|
||||
# End of hosts.
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Die '/etc/networks' auf allen Rechnern :
|
||||
========================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
#
|
||||
# networks This file describes a number of netname-to-address
|
||||
# mappings for the TCP/IP subsystem. It is mostly
|
||||
# used at boot time, when no name servers are running.
|
||||
#
|
||||
|
||||
loopback 127.0.0.0
|
||||
homenet 192.168.255.0
|
||||
worknet 192.168.254.0
|
||||
|
||||
# End of networks.
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Ich benutze fuer die statischen routes eine Datei in /etc/rc.d
|
||||
in die ich alle routes eintrage, und die aus /etc/rc.d/rc.inet1
|
||||
aufgerufen wird.
|
||||
|
||||
Die /etc/rc.d/rc.routes auf lihome:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig isdn0 lihome pointopoint liwork
|
||||
/sbin/route add liwork isdn0
|
||||
/sbin/route add default gw liwork isdn0
|
||||
# Alles was raus soll geht per default ueber isdn0
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
|
||||
Die /etc/rc.d/rc.routes auf liwork:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig eth0 liwork
|
||||
/sbin/route add -net worknet eth0
|
||||
# Alles was von worknet kommt und nach worknet soll
|
||||
# muss ueber eth0
|
||||
|
||||
/sbin/ifconfig isdn0 liwork pointopoint lihome
|
||||
/sbin/route add liwork
|
||||
/sbin/route add default gw liwork isdn0
|
||||
# Alle anderen gehen per default ueber isdn0
|
||||
# !!!! Klappt nur wenn auch der Kernel mit
|
||||
# IP FORWARDING/GATEWAYING kompiliert wurde !!!!
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
Fuer W95 tue ich mal so als sei es ein Linux, d.h.
|
||||
die Uebersetzung in W95 Syntax bleibt dem Leser ueberlassen :-)
|
||||
|
||||
Die /etc/rc.d/rc.routes auf work95:
|
||||
===================================
|
||||
|
||||
# ----------------- [schnippel] --------------------------
|
||||
/sbin/ifconfig eth0 work95
|
||||
/sbin/route add liwork
|
||||
/sbin/route add default gw liwork eth0
|
||||
# alles geht per default ueber eth0 nach liwork
|
||||
# der sorgt dann fuer die Verteilung
|
||||
# ----------------- [schnippel] --------------------------
|
||||
|
||||
|
||||
|
||||
- Norbert
|
||||
|
||||
--
|
||||
Norbert J. Girardi < girardi@giovanni.rhein-neckar.de >
|
||||
Voice: +49 621 493417 (h) +49 621 381-3260 (w)
|
||||
Neckarstr. 17, D-68549 Ilvesheim, Germany
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,115 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA773032; Wed, 4 Dec 1996 19:25:55 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id TAA04351; Wed, 4 Dec 1996 19:27:00 +0100
|
||||
Received: from hub-wue.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vVFcT-000oJ0a; Wed, 4 Dec 96 12:36 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vVFZi-000Boma; Wed, 4 Dec 96 12:33 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vVFbR-001IV5a; Wed, 4 Dec 96 12:35 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vVFbO-001IV3E; Wed, 4 Dec 96 12:34 MET
|
||||
Received: from dino.nus.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vVFYU-000BomC; Wed, 4 Dec 96 12:31 MET
|
||||
Received: from localhost (nils@localhost [127.0.0.1]) by dino.nus.de (8.7.6/8.7.3) with ESMTP id MAA09043 for <isdn4linux@hub-wue.franken.de>; Wed, 4 Dec 1996 12:35:02 +0100
|
||||
Date: Wed, 4 Dec 1996 12:35:02 +0100 (MET)
|
||||
From: Nils Rennebarth <nils@nus.de>
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Subject: Re: ISDN-Problem
|
||||
In-Reply-To: <199612031939.UAA07539@mail.germanlloyd.de>
|
||||
Message-Id: <Pine.LNX.3.95.961204114817.1062I-100000@dino.nus.de>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Reply-To: isdn4linux@hub-wue.franken.de
|
||||
Status:
|
||||
|
||||
On Tue, 3 Dec 1996, Martin Bauer wrote:
|
||||
|
||||
>Moin moin,
|
||||
>
|
||||
>ich habe da ein kleines Problem:
|
||||
>
|
||||
[Emma und Gegenstelle unterhalten sich prima, aber von keinem Rechner im
|
||||
Netz der Gegenstelle geht es zu Emma]
|
||||
Emma:
|
||||
eth0 inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
|
||||
isdn0 inet addr:192.168.11.1 P-t-P:192.168.11.3
|
||||
>
|
||||
>Kernel IP routing table
|
||||
>Destination Gateway Genmask Flags Metric Ref Use =
|
||||
Iface
|
||||
>172.20.1.4 0.0.0.0 255.255.255.255 UH 0 0 11 =
|
||||
isdn0
|
||||
>192.168.11.3 0.0.0.0 255.255.255.255 UH 0 0 3 =
|
||||
isdn0
|
||||
>192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 =
|
||||
eth0
|
||||
|
||||
>0.0.0.0 192.168.11.3 0.0.0.0 UG 0 0 2 =
|
||||
isdn0
|
||||
>
|
||||
>
|
||||
>
|
||||
>Die Gegenstelle:
|
||||
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
|
||||
eth0 inet addr:172.20.1.4 Bcast:172.20.255.255 Mask:255.255.0.0
|
||||
isdn0 inet addr:192.168.11.3 P-t-P:192.168.11.1 Mask:255.255.255.0
|
||||
|
||||
>Kernel IP routing table
|
||||
>Destination Gateway Genmask Flags Metric Ref Use =
|
||||
Iface
|
||||
>192.168.11.1 0.0.0.0 255.255.255.255 UH 0 0 15 =
|
||||
isdn0
|
||||
>192.168.10.0 192.168.11.1 255.255.255.0 UG 0 0 3 =
|
||||
isdn0
|
||||
>172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 39 =
|
||||
eth0
|
||||
|
||||
>0.0.0.0 172.20.1.1 0.0.0.0 UG 0 0 3 =
|
||||
eth0
|
||||
Es ist kein ISDN Problem, es ist ein routing Problem.
|
||||
|
||||
"Gegenstelle" bekommt =FCber ISDN ein Paket mit 192.168.11.3 als Gateway,
|
||||
wei=DF aber routing-technisch nicht, das es das selber ist.
|
||||
!! Allein durch Einrichten eines Point-to-Point Interfaces
|
||||
!! wei=DF ein Rechner noch nicht, da=DF IP-Pakete an die auf seiner Seite
|
||||
!! konfigurierte Adresse auch an ihn sind.
|
||||
|
||||
Mit anderen Worten: es fehlt auf "Gegenstelle" der Befehl
|
||||
route add -host 192.168.11.3 dev isdn0
|
||||
|
||||
N.B.: Warum machst Du es nicht einfacher, wenn Du Point-to-Point routen
|
||||
verwendest:
|
||||
|
||||
auf Emma:
|
||||
ifconfig isdn0 192.168.10.1 pointopoint 172.20.1.4 -arp -broadcast
|
||||
route add -host 172.20.1.4
|
||||
route add default gw 172.20.1.4
|
||||
|
||||
auf Gegenstelle:
|
||||
ifconfig isdn0 172.20.1.4 pointopoint 192.168.10.1 -arp -broadcast
|
||||
route add -host 192.168.10.1
|
||||
route add -net 192.168.10.0 gw 192.168.10.1
|
||||
|
||||
Nils
|
||||
|
||||
--
|
||||
\ / | Nils Rennebarth
|
||||
--* WINDOWS 42 *-- | Schillerstr. 61=20
|
||||
/ \ | 37083 G=F6ttingen
|
||||
| ++49-551-71626
|
||||
Micro$oft's final answer | http://www.nus.de/~nils
|
||||
|
||||
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
|
@ -1,137 +0,0 @@
|
|||
X-Sender: dekay@xplor.ipf.de
|
||||
References: <m0vIIrY-000LHmC@scorpio.in-berlin.de> from "Gernot Zander" at Oct 29, 96 07:26:08 pm
|
||||
Date: Wed, 30 Oct 1996 19:05:55 +0200
|
||||
To: isdn4linux@hub-wue.franken.de, michael@abadonna.franken.de From: Darko Krizic <dekay@ipf.de>
|
||||
Subject: Sounds erzeugen für vgetty/vboxgetty Cc: maze@frankfurt.netsurf.de
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
|
||||
|
||||
Ich möchte hier ein paar Erfahrungen mit vboxgetty zusammenzählen, insbesondere im Zusammenhang mit dem Erzeugen von Messages (Sounds)
|
||||
|
||||
Sound-Format
|
||||
------------
|
||||
Das Format ADPCM-4 generiert beim Aufzeichnen wesentlich kleinere Dateien als die Formate uLaw oder aLaw, deswegen ist dieses Format vorzuziehen.
|
||||
Vorteil von uLaw ist allerdings, daß es dem au-Format entspricht und so direkt mit cat sound.au >/dev/audio angehört werden kann, allerdings gibt es zwei Probleme:
|
||||
|
||||
- Das ist nur interessant für Leute, die auch am Linux-Rechner sitzen und dieser eine Soundkarte besitzt. Viele Leute verwenden den Linux-Rechner als "echten" Server, der weder Monitor noch Soundkarte hat.
|
||||
|
||||
- Die aufgezeichneten Samples haben einen sehr schwachen Pegel, den man theoretisch mit
|
||||
|
||||
autopvf <x.msg | pvfamp 5 | pvftoau >x_laut.msg
|
||||
|
||||
verstärken könnte, allerdings muß man sich dann sowieso mit den pvf-Tools befassen und kann dann auch gleich auf ADPCM-4 umsteigen.
|
||||
|
||||
Aufzeichen über Telefon
|
||||
-----------------------
|
||||
Wie in der i4l-FAQ beschrieben ist es ohne Probleme möglich sich selbst auf den Anrufbeantworter zu sprechen und die entsprechende Datei in das Verzeichnis /var/spool/vobx/<user>/incoming/standard.msg zu kopieren.
|
||||
Allerdings ist die Qualität bei weitem nicht ausreichend, unter anderem, weil sich am Anfang und Ende Geräusche oder Pausen befinden.
|
||||
|
||||
Selbst Dateien generieren
|
||||
-------------------------
|
||||
Ich habe einen Macintosh, der unter anderem die Möglichkeit bietet, Sound von Audio-CDs ohne Verluste per SCSI auf die Festplatte zu kopieren und nachträglich auf andere Samplegeschwindigkeit und Bitbreite zu konvertieren, z.B. "16bit, 44kHz -> 8bit, 22kHz". Desweiteren kann ich mit dem Mikrofon Sounds und am Ende alle Sounds manipulieren und mixen. Die beste Voraussetzungen für verrückte Ansagen.
|
||||
|
||||
Das Format, das der Macintosh verarbeitet ist AIFF. Dieser Standard wird auch von SGI und anderen namhaften Herstellern verwendet, allerdings konnte ich unter Linux kein Programm finden, das dieses Format versteht. Auf dem Macintosh gibt es allerdings das Programm "SoundApp", welches nach und von Suns .au konvertieren und ADPCM wenigstens abspielen kann. Anmerkung: Dummerweise nennt SoundApp das au-Format "NeXT", weil dieses Format dort verwendet wird, allerdings habe ich lange gebraucht, um herauszufinden, daß es dasselbe wie au ist.
|
||||
|
||||
Ich nehme mal an, daß unsere Windows-Freunde ähnliche Fähigkeiten haben.
|
||||
Das Windows-Hausformat nennt sich WAV. Auch dieses Format kennen die PVF-Tools nicht, aber ich denke mal, daß es unter Windows ähnliche Werkezeuge gibt, die sogar ADPCM-4 generieren können.
|
||||
|
||||
Ich weiß nicht, wie man unter Linux Sounds aufzeichnen kann und welches Format diese haben, allerdings wird es wohl Sun-AU-Format haben, so daß der weitere Text auf für Linux-Benutzer interessant ist.
|
||||
|
||||
Sounds für vboxgetty konvertieren
|
||||
---------------------------------
|
||||
Wie bereits oben beschrieben, empfehle ich den Betrieb mit ADPCM-4. Bei mgetty befindet sich die pvf-Toolsammlung, welche Soundformate konvertieren und manipulieren kann, allerdings gab es Probleme mit den Formaten, die vboxgetty generiert hatte (ADPCM-4). Gegen dieses Problem gibt es Patches, allerdings enthält die neuste Version von mgetty (0.99 Okt02 und wahrscheinlich auch ein paar ältere) bereits die Programme "zyxeltopvf" und "pvftozyxel[234]", mit welchen genau diese Formate konvertiert werden können.
|
||||
|
||||
Mein Macintosh liefert die Sounds 22254Hz. Um daraus einen entsprechenden Sound in ADPCM-4 zu generieren verwende ich folgende Kommendozeile:
|
||||
|
||||
autopvf <standard.au \
|
||||
| pvfspeed 2.73 \
|
||||
| pvfamp 0.2 \
|
||||
| pvftozyxel4 >standard.msg
|
||||
|
||||
autopvf konvertiert dan au-Sound nach pvf. pvfspeed ändert die Samplingrate auf 8000 (22554 / 8000 = 2.73), damit die Geschwindigkeit wieder stimmt.
|
||||
pvfamp 0.2 senkt den Pegel auf 20%, weil der Sound sonst total verzerrt klingt, schließlich kennt das Telefon nur Frequenzen zwischen 300 und 3000Hz. Zuletzt legt pvftozyxel4 den Sound im richtigen Format ab.
|
||||
|
||||
Dadurch, daß weder Rauschen noch Klacken zu hören sind, klingen so generierte Ansagen einfach klasse. Wer etwas mit Sound-Manipulationsprogrammen spielen kann, der kann tolle Effekte generieren, allerdings sollte man damit wegen des beschränten Frequenzbandes echt sparsam umgehen, sonst versteht der Anrufende nichts.
|
||||
|
||||
Nachbarbeiteitung von aufgezeichneten Nachrichten ------------------------------------------------- Ich möchte, daß meine Nachrichten in ein auf dem Macintosh abspielbaren Format konvertiert werden und an eine e-mail an mich attached werden sollen. Ich konvertiere den Sound nach au mit folgenden Befehlen:
|
||||
|
||||
zyxeltopvf <sound.pvf \
|
||||
| pvfamp 5
|
||||
| pvfcut 0.2 0.2 \
|
||||
| pvftoau 8000 >sound.au
|
||||
|
||||
zyxeltopvf konvertiert den aufgezeichneten Sound nach pvf und pvfamp verstärkt diesen auf das fünffache, weil der Pegel (s.ganz.o) sehr schwach ist. pvfcut schneidet 0.2 Sekunden vorne und hinten ab, weil man hinten z.B. das Auflegen des Telefons hört. Scheinbar zeichnet vboxgetty schon auf, während der Beep-Ton abgespielt wird, weil dieser ganz am Anfang zu hören ist. Die 8000 nach dem pvtoau ist sehr wichtig, weil diese sorgt, daß die Frequenz in den au-Header geschrieben wird, damit das abspielende Programm auch die richtige Rate spielt!
|
||||
|
||||
Namen des Anrufenden in der Mail
|
||||
--------------------------------
|
||||
vboxgetty kennt den Namen des Anrufenden, während es die Nachricht aufzeichnet, dummerweise wird dieser Name nicht an das Programm "-p /usr/local/vbox/new_voice" mit übergeben. Ich habe deswegen einen (very dirty) hack von vboxgetty erzeugt, welches als 4ten Parameter den Namen an new_voice übergibt, damit ist es möglich, daß das Subject der generierten Mail aussieht wie "Voice from Darko Krizic" oder zumindest "Voice from Unknown". Da bei internationalen Calls zumindest die Landeskennung übergeben wird, kann eine Nachricht aus USA ein Subject wie "Voice from USA" haben.
|
||||
|
||||
Ich bitte hiermit den Autor von vbox selbst die Änderungen zu machen.
|
||||
|
||||
Beispiel für ein new_voice-Script
|
||||
---------------------------------
|
||||
Das Nachfolgende Shellscript hat bei mir den Namen /usr/local/vbox/new_voice und in der Inittab hängt noch "-p /usr/local/vbox/new_voice" als Parameter, damit dieses Programm nach dem Aufzeichnen einer Nachricht aufgerufen wird.
|
||||
|
||||
Die Datei wird nach .au konvertiert und als MIME-encoded Message an den Benutzer für den die Nachricht aufgezeichnet wurde, geschickt. Ich verwende übrigens mimeencode nicht. Wenn diese Mail von Eudora auf dem Macintosh empfangen wird, wird der Sound als Icon angezeigt. Ein Doppelklick reicht aus, um den Sound abzuspielen.
|
||||
|
||||
#! /bin/sh
|
||||
#
|
||||
# Creates a new MIME-encoded mail to the user with an attached .au file # Written 1996 by Darko Krizic
|
||||
|
||||
PATH="${PATH}:/usr/local/vbox"
|
||||
TMP="/tmp/vboxmime.$$"
|
||||
ME="`basename $0`"
|
||||
|
||||
mailer="/usr/sbin/sendmail -t"
|
||||
bound="NewVoice_-${$}${$}"
|
||||
type="audio/ulaw"
|
||||
|
||||
file="${1}"
|
||||
id="${2}"
|
||||
user="${3}"
|
||||
name="${4}"
|
||||
date="`date +%y%m%d%H%M`"
|
||||
newname=${date}-${id}.au
|
||||
if [ -z "$name" ]
|
||||
then
|
||||
name=$id
|
||||
fi
|
||||
|
||||
echo "\
|
||||
Subject: Voice from $name
|
||||
From: root@xplor.ipf.de (Voice Subsystem) To: $user
|
||||
Content-type: multipart/mixed; boundary=\"$bound\"
|
||||
|
||||
--$bound
|
||||
Content-Type: text/pain
|
||||
|
||||
A new voice has arrived
|
||||
|
||||
Sender ID: $id
|
||||
Name: $name
|
||||
File: $file
|
||||
|
||||
--$bound
|
||||
Content-Type: application/octet-stream; name=\"$newname\" Content-transfer-encoding: x-uuencode
|
||||
" >$TMP
|
||||
|
||||
/usr/local/bin/zyxeltopvf <$file \
|
||||
| /usr/local/bin/pvfamp 5 \
|
||||
| /usr/local/bin/pvfcut 0.2 0.2 \
|
||||
| /usr/local/bin/pvftoau 8000 \
|
||||
| /usr/bin/uuencode $newname >>$TMP
|
||||
#rmdcutheader <$file | uuencode $newname >>$TMP echo "--$bound--" >>$TMP
|
||||
|
||||
|
||||
$mailer -t <$TMP
|
||||
|
||||
#cat $TMP
|
||||
rm $TMP
|
||||
|
||||
Anmerkungen: Es handelt sich dabei nur um ein Beispiel, welches ich schnell für mich zusammengehackt habe. Wenn jemand Anmerkugen und Ideen hat, soll ich bei mir melden. Ich erwähne nochmal: Das Script funktioniert zwar auch so, allerdings macht es erst richtig sinn, wenn vboxgetty als 4ten Parameter den Namen des Anrufenden übertragt, sonst ist das Subject immer "Voice from Unkown".
|
||||
|
||||
Darko Krizic
|
||||
|
||||
----------------------------------------------------------------------- Darko Krizic Phrankphurt Germany mailto:dekay@xplor.ipf.de
|
||||
|
||||
|
||||
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
|
|
@ -1,143 +0,0 @@
|
|||
Return-Path: POPmail
|
||||
Received: from hsun6.wi-inf.uni-essen.de by aixrs1.hrz.uni-essen.de (AIX 4.1/UCB 5.64/4.03)
|
||||
id AA86280; Sun, 22 Dec 1996 17:10:31 +0100
|
||||
Received: from rachael.franken.de by hsun6.wi-inf.uni-essen.de (SMI-8.6/SMI-SVR4)
|
||||
id RAA20385; Sun, 22 Dec 1996 17:11:29 +0100
|
||||
Received: from hub-wue.franken.de by rachael.franken.de with smtp
|
||||
(Smail3.1.29.1 #8) id m0vbmno-000oJba; Sun, 22 Dec 96 13:14 MET
|
||||
Received: from oops.franken.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vbmKK-000Bp3a; Sun, 22 Dec 96 12:44 MET
|
||||
Received: by oops.franken.de (Linux Smail3.1.29.1 #1)
|
||||
id m0vbmGb-001ISMa; Sun, 22 Dec 96 12:40 MET
|
||||
Received: from hub-wue.franken.de by oops.franken.de with smtp
|
||||
(Linux Smail3.1.29.1 #1) id m0vbmGX-001ISKE; Sun, 22 Dec 96 12:40 MET
|
||||
Received: from outmail.zdv.uni-tuebingen.de by hub-wue.franken.de with smtp
|
||||
(Smail3.1.29.1 #1) id m0vblye-000Bp3C; Sun, 22 Dec 96 12:21 MET
|
||||
Received: from mailserv.uni-tuebingen.de by outmail.zdv.uni-tuebingen.de (4.1/ZDV-Uni-Tuebingen-1.0)
|
||||
id AA05580; Sun, 22 Dec 96 12:21:42 +0100
|
||||
Received: from commlink.zdv.uni-tuebingen.de by mailserv.uni-tuebingen.de
|
||||
with SMTP (PP); Sun, 22 Dec 1996 12:21:34 +0100
|
||||
Received: (from pecrm01@localhost)
|
||||
by commlink.zdv.uni-tuebingen.de (8.6.12/8.6.12) id MAA11944;
|
||||
Sun, 22 Dec 1996 12:21:31 +0100
|
||||
Date: Sun, 22 Dec 1996 12:21:29 +0100 (MEZ)
|
||||
From: Michael Ruder <michael.ruder@uni-tuebingen.de>
|
||||
To: isdn4linux@hub-wue.franken.de
|
||||
Subject: ISDNLOG und SAMBA: Versand von WinPopup-Meldungen
|
||||
Message-Id: <Pine.HPP.3.91.961222122056.11937A-100000@commlink.zdv.uni-tuebingen.de>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: TEXT/PLAIN; charset=US-ASCII
|
||||
Sender: owner-isdn4linux@hub-wue.franken.de
|
||||
Precedence: bulk
|
||||
Reply-To: isdn4linux@hub-wue.franken.de
|
||||
Status:
|
||||
|
||||
Hallo!
|
||||
|
||||
Da sind sie endlich, die Skripte fuer den Versand von WinPopUp-Meldungen.
|
||||
|
||||
In die isdnlog.conf wird als allgemeines Event das START_Ring-Skript
|
||||
eingetragen, dass bei eingehenden Anrufen einmal aufgerufen wird und mit
|
||||
Send_WinPopup eine Meldung verschickt.
|
||||
|
||||
Ausserdem habe ich sowohl bei Connect als auch bei Hangup bei meinem
|
||||
Provider ein Skripte eingetragen: ZDV_Connect und ZDV_Hangup. Diese
|
||||
beiden senden ebenfalls mit Send_WinPopup einen Hinweis, dass die
|
||||
ISDN-Leitung gerade auf- bzw. abgebaut wird. (Allerdings nur, wenn eine
|
||||
Datei /etc/isdnlog/isdn.debug existiert, so kann man dies relativ leicht
|
||||
an und abschalten.)
|
||||
|
||||
Das Hauptskript Send_WinPopup versendet mit smbclient die eigentlichen
|
||||
Messages, in diesem Fall an die Rechner "mizar" und "alcor" (Das sollte
|
||||
der TCP/IP-Name (aus dem Nameserver) der jeweiligen Rechner sein, oder
|
||||
falls mit WINS gearbeitet wird, kann es auch der im Windows-Netzwerk
|
||||
eingetragene Name sein, am Besten nimmt man an beiden Stellen den
|
||||
gleichen Namen.)
|
||||
|
||||
Die Meldung im ersten Parameter wird an das Programm gepiped, da
|
||||
smbclient sie normalerweise von der Tastatur einlesen wuerde. Ausserdem
|
||||
kann man mit -U noch einen Absender angeben, den WinPopup anzeigt.
|
||||
|
||||
Auf den jeweiligen Rechnern muss WinPopup (3.11/95) oder der
|
||||
Nachrichtendienst (NT) gestartet sein.
|
||||
|
||||
Als kleine Ergaenzung: Auch auf Linux-Rechnern kann man die WinPopups
|
||||
empfangen, dann muss man allerdings im smb.conf die entsprechende Zeile
|
||||
eintragen und ein Skript anlegen, was die Meldung irgendwie anzeigt oder
|
||||
loggt.
|
||||
|
||||
Falls noch weiteres Interesse an der Konfiguration von Samba besteht,
|
||||
kann ich auch gerne mal meine Konfig-Dateien posten.
|
||||
|
||||
Ich hoffe Ihr koennt was damit anfangen, die Skripte sind nicht gerade
|
||||
elegant, aber ich hab sowas noch nicht oft gemacht.
|
||||
|
||||
Viel Spass,
|
||||
|
||||
-Michael
|
||||
|
||||
---- isdnlog.conf ----
|
||||
MYMSNS=4
|
||||
MYPREFIX=07472
|
||||
START=IR=/etc/isdnlog/START_Ring $1 $2 $3;
|
||||
MSN1 Telefon 1 -
|
||||
MSN2 Telefax 1 -
|
||||
MSN3,1 Michael 1 -
|
||||
MSN4,7 Teles 1 -
|
||||
PROVIDER ZDV_Internet 1 ippp0 OC=/etc/isdnlog/ZDV_Connect; OH=/etc/isdnlog/ZDV_Hangup;
|
||||
|
||||
---- START_Ring ---
|
||||
#!/bin/sh
|
||||
# Michael Ruder
|
||||
#
|
||||
# Version: 08.10.96
|
||||
#
|
||||
# /etc/isdnlog/START_Ring
|
||||
#
|
||||
|
||||
/etc/isdnlog/Send_WinPopup 'Eingehender Anruf von '$2' auf '$3'.' &
|
||||
|
||||
# if test $3="IRGENDEINE_NUMMER"; then
|
||||
# isdnctrl dial ippp0
|
||||
# fi
|
||||
|
||||
---- Send_WinPopup ----
|
||||
#!/bin/sh
|
||||
# Michael Ruder
|
||||
#
|
||||
# Version: 08.10.96
|
||||
#
|
||||
# /etc/isdnlog/Send_WinPopup
|
||||
#
|
||||
|
||||
echo $1 | smbclient -M mizar -U ISDN-Administrator >/dev/null
|
||||
echo $1 | smbclient -M alcor -U ISDN-Administrator >/dev/null
|
||||
|
||||
---- ZDV_Connect ----
|
||||
#!/bin/sh
|
||||
# Michael Ruder
|
||||
#
|
||||
# Version: 08.10.96
|
||||
#
|
||||
# /etc/isdnlog/ZDV_Connect
|
||||
#
|
||||
|
||||
if test -e "/etc/isdnlog/isdn.debug"; then
|
||||
/etc/isdnlog/Send_WinPopup 'Die ISDN-Leitung wird aufgebaut.' &
|
||||
fi
|
||||
|
||||
---- Auschnitt aus smb.conf ----
|
||||
[global]
|
||||
message command = mv %s %s.working; echo WinPopup-Message from %f@%m for %t: > %s; cat %s.working >> %s; wall %s; rm %s %s.working &
|
||||
|
||||
-Michael
|
||||
|
||||
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
|
||||
< Michael Ruder, Fax +49-7472-91382, email: Michael.Ruder@Uni-Tuebingen.DE >
|
||||
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
|
||||
|
||||
---------------------------------------------------
|
||||
To remove yourself from this mailing list send
|
||||
email to majordomo@hub-wue.franken.de containing
|
||||
"unsubscribe isdn4linux <your_email_address>" in
|
||||
the message body [-vg]
|
Binary file not shown.
|
@ -1,18 +0,0 @@
|
|||
Da auf meinen Arbeitsplatzrechner i.d.R. kein LinuX laeuft, habe ich zwei
|
||||
CGI-Skripte (Perl) (+2 weitere Shellscripte) gebastelt, die einem den
|
||||
Zugriff auf seine eigenen Anrufe per WWW-Browser ermoeglichen. Die Perlscripte gehoeren ins CGI-Verzeichnis
|
||||
(des Users), die anderen beiden koennen irgendwo liegen. Die Scripte greifen
|
||||
auf die Umgebungsvariable $REMOTE_USER des http-Servers zu. Es ist also
|
||||
notwendig, dass sich der User gegenueber dem Server authentifiziert !
|
||||
Weiterhin muessen die Scripte mit User-Rechten laufen. Der aktuelle
|
||||
Apache 1.2b4 sollte das zwar koennen. Da das ihm beiliegende "suexec" jedoch
|
||||
bei mir nicht richtig lief, habe ich es etwas geaendert (habe ich auch
|
||||
beigelegt).
|
||||
|
||||
Gruss
|
||||
Marc
|
||||
____________________________________________________________________
|
||||
Marc Neitzner | marc@zeus.han.de | Tel.: 0511-2714507
|
||||
Alte Ziegelei 7 | neitzner@rvs.uni-hannover.de | Fax : 0511-2714537
|
||||
30419 Hannover | |
|
||||
|
|
@ -1,277 +0,0 @@
|
|||
========
|
||||
Newsgroups: uninews.comp
|
||||
Subject: Mit Crosspoint an der Uni pollen.
|
||||
From: mklose@UNI-DUISBURG.DE (Michael Klose)
|
||||
Date: 28 Jul 1996 23:26:00 +0200
|
||||
|
||||
Hallo!
|
||||
|
||||
Ich wollte was erklären (siehe Betreff):
|
||||
|
||||
Für die Leute, die nicht wissen, was Crosspoint (ab hier mit XP abgekürzt)
|
||||
ist, hier ein kleiner Ausschnitt aus der Dok:
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
CrossPoint ist eine Multinetz-Pointsoftware. Oder ausführlicher:
|
||||
CrossPoint ist ein Programm, mit dem Sie auf sehr bequeme Weise
|
||||
Daten mit Mailboxen austauschen und insbesondere elektronische Post
|
||||
(E-Mail) versenden, empfangen und verwalten können. Wichtig ist
|
||||
dabei, daß CrossPoint verschiedene, technische Mailbox-(Netz)-
|
||||
Standards unterstützt. Dadurch benötigen Sie für verschiedene Netze
|
||||
nur EIN Programm mit einer einheitlichen Benutzeroberfläche. Wichtig
|
||||
ist auch, daß CrossPoint nicht nur den kleinsten gemeinsamen Nenner
|
||||
der verschiedenen Netze bildet, sondern Ihnen zusätzlich ermöglicht,
|
||||
die Features einzelner Netze voll auszunutzen. Dazu zählen z.B. das
|
||||
Bestellen von Dateien im FidoNet, Löschnachrichten im Usenet und das
|
||||
Nachrichtenstatus-System im MausNet.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Crosspoint bietet aber leider nur für Usenet eine Möglichkeit per UUCP zu
|
||||
pollen, nicht mit einer PPP oder SLIP Verbindung.
|
||||
|
||||
Es geht aber trotzdem, und zwar mit einem Zusatztool (UKA_PPP), welches
|
||||
sogar Freeware ist.
|
||||
|
||||
Leider funktioniert UKA_PPP nicht richtig unter NT :-(( Windows 95 weiß
|
||||
ich nicht, ich kann nur sagen, daß es unter DOS und Win 3.11 läuft.
|
||||
|
||||
Warum also Crosspoint benutzen?
|
||||
|
||||
Crosspoint ist IMHO der beste Maileditor, den es gibt, er ist nicht nr für
|
||||
e-Mail, sondern auch ein Newsreader. Ich habe bisher noch kein einziges
|
||||
Programm gesehen, welches solch einen Funktionsumfang hat. Sogar PGP
|
||||
Unterstützung ist eingebaut, MIME sowieso (obwohl hier eines der wenigen
|
||||
Schwachstellen in XP liegt, er beherrscht keine Multipart MIME Mails).
|
||||
|
||||
Vor allem kann man es für fast alle Netze einsetzten: ich verwende es für
|
||||
meine beiden Fido Adressen, für meine Internetaccounts und für den T-
|
||||
Online Zugang meines Vaters.
|
||||
|
||||
Wer XP noch nicht hat, kann es sich z.B. bei mvmpc9.ciw.uni-karlsruhe.de
|
||||
holen zusammen mit UKA_PPP. (Egal ob mit FTP oder WWW).
|
||||
|
||||
Benötigt werden folgende Pakete:
|
||||
|
||||
XP311-1.EXE
|
||||
XP311-2.EXE
|
||||
XP311-U.EXE (so heißt das DIng glaube ich - auf jednen Fall der UUCP Teil)
|
||||
|
||||
Wer es noch für FIDO nutzen möchte auch noch:
|
||||
|
||||
XP311-F.EXE
|
||||
|
||||
Fangen wir an:
|
||||
|
||||
Wer XP schon installiert hat für Fido, der braucht nur die UUZ.EXE aus dem
|
||||
UUCP Paket - eine erneute Registrierung (falls nur für Fido regristriert)
|
||||
ist nicht erforderlich, so steht es jedenfalls in der DOK von UKA_PPP.
|
||||
|
||||
Was ist UKA_PPP?
|
||||
|
||||
UKA_PPP ist ein Paket, welches es ermöglicht unter DOS eine PPP/SLIP/CSLIP
|
||||
Verbindung aufzubauen, und womit man den POP, SMPT und NEWS Server
|
||||
ansprechen kann. Zusätzlich beigefügt ist ein Telnet und Ftp Client.
|
||||
|
||||
BTW: UKA_PPP bekommt man am besten direkt beim Autor: Wieder:
|
||||
mvmpc9.ciw.uni-karlsruhe.de
|
||||
|
||||
Aktuell ist die Version 1.51.
|
||||
|
||||
Möchte man, daß sich UKA_PPP ins Verzeichnis \DFUe installiert (Umlaute im
|
||||
Verzeichnisnamen stören UKA_PPP zwar nicht, aber falls man später PGP
|
||||
installieren möchte, dann ist es empfehlenswert gleich ein Verzeichnis
|
||||
ohne Umlaute zu wählen, da PGP diese nicht mag).
|
||||
|
||||
Wo waren wir? Verzeichnic anlegen:
|
||||
|
||||
md \DFUe
|
||||
cd \DFUe
|
||||
[Verzeichnis, wo die UKA_PPP.EXE steht]\UKA_PPP
|
||||
|
||||
Jetzt entpackt UKA_PPP alle seine Installationsdateien.
|
||||
Jetzt die SETUP.BAT laufen lassen.
|
||||
Es richtet automatisch ein Unterverzeichnis für UKA_PPP ein.
|
||||
|
||||
Es erscheint jetzt ein Setup Bildschirm:
|
||||
|
||||
Jetzt 'Default' angeben.
|
||||
|
||||
Jetzt werden zuerst nach den Schnittstellenparameter gefragt:
|
||||
|
||||
Falls das Modem an COM2 hängt, 2F8 angeben, falls an COM1 3F8.
|
||||
Wenn COM2, dann IRQ3 sonst IRQ4.
|
||||
|
||||
Bei der Baudrate 57600 angeben.
|
||||
|
||||
Bei der Initstring verwendet man am besten ATZ (ENTER)
|
||||
Dann verwendet das Modem die gespeicherten Einstellungen.
|
||||
|
||||
Jetzt muß man die Anwahlstring des Internetproviders angeben.
|
||||
|
||||
Falls Pulswahl ATDP02033789353 btw. Tonwahl: ATDT02033789353
|
||||
|
||||
Dann fragt er uns nach dem Protokoll. PPP wählen.
|
||||
|
||||
Beim Packettreiberinterrupt, einfach ENTER drücken um die
|
||||
Defaulteinstellung von 61h zu nehmen.
|
||||
|
||||
Jetzt bekommen wir einen neuen Bildschirm. Es steht zwar geschrieben, daß
|
||||
wir die Infos erst später eingeben müssen, aber wir geben sie jetzt
|
||||
trotzdem ein.
|
||||
|
||||
Dommain Suffix ist bei uns: uni-duisburg.de
|
||||
IP OF Nameserver ist bei uns: 134.91.3.16
|
||||
Unser IP ist egal, weil die wegen der PPP Verbindung dynamisch zugewiesen
|
||||
wird, hier einfach ENTER drücken.
|
||||
|
||||
Unsere Gateway ist 134.91.4.1, da wir uns über die 0203/3789353 eingewählt
|
||||
haben. Irgendwie bekomme ich bei der 0203/378950 keine PPP Verbindung zu
|
||||
Stande mit UKA_PPP, unter Windows habe ich auch nur diese Nummer
|
||||
konfiguriert, die andere habe ich noch gar nicht versucht.
|
||||
|
||||
Und er soll natürlich den internen Packet Treiber verwenden. :-))
|
||||
|
||||
Als nächstes werden die Server für die E-Mail konfiguriert:
|
||||
|
||||
POP Srever ist der Rechner, auf dem das Home Verzeichnis liegt, bei mir
|
||||
e45-hrze.uni-duisburg.de
|
||||
|
||||
POP USER ID ist der Loginusername, bei mir sl652kl
|
||||
|
||||
POP PASSWORD ist das Passwort, was es bei mir ist, sage ich nicht! :-)
|
||||
|
||||
Jetzt fragt er nach dem SMPT Server. Das ist bei uns die unidui.uni-
|
||||
duisburg.de
|
||||
|
||||
Timeserver haben wir nicht, also 0 eingeben. Den Vorgeschlagenen Server
|
||||
der Uni Karlsruhe können wir nicht benutzen, da wir mit unserer PPP
|
||||
Verbindung keine Rechner außerhalb der Uni ohne Proxies ansprechen können
|
||||
:-(((
|
||||
|
||||
Time Offset ist -1.
|
||||
|
||||
Jetzt wieder Default eingeben (also 3).
|
||||
|
||||
News ist als Newsserver OK, also ENTER eingeben.
|
||||
|
||||
Nein, jetzt keine Newsgroup abbonnieren.
|
||||
|
||||
YARN brauchen wir nicht zu installieren, also n.
|
||||
|
||||
Jetzt möchte er eine Probeverbindung aufbauen, um das Login zu 'lernen'. y
|
||||
für Ja eingeben.
|
||||
|
||||
Jetzt baut er eine Verbindung auf. Bei der Frage Host: einfach PPP und
|
||||
Enter eingeben, eine Sekunde warten, bis komische Zeichen erscheinen
|
||||
(dürfte dann fat sofort passieren), dann ALT-X drücken.
|
||||
|
||||
UKA_PPP meldet sich jetzt akustisch, daß er es geschafft hat eine PPP
|
||||
Verbindung aufzubauen.
|
||||
|
||||
Jetzt solange ENTER drücken, bis wir am Bildschirm sind, wo er wieder
|
||||
fragt Compuserve, Default oder T-Online steht. Hier natürlich wieder
|
||||
Default wählen.
|
||||
|
||||
Jetzt kommt eine Fehlermeldung, naja, eigentlich nur eine Warnung, daß wir
|
||||
Online sind, einfach mit ENTER weiter.
|
||||
|
||||
Jetzt landen wir im Hauptmenü von UKA_PPP. UKA_PPP ist jetzt fertig
|
||||
installiert.
|
||||
|
||||
Testweise kann man sich eine Telnetverbindung aufbauen zu seinem
|
||||
Homeverzeichnis.
|
||||
|
||||
Auf jeden Fall sollte man nicht vergessen aufzulegen! :-)
|
||||
|
||||
|
||||
Den größten Schritt haben wir jetzt hinter uns. Jetzt muß UKA_PPP nur noch
|
||||
in Crosspoint eingebunden werden.
|
||||
|
||||
Das ist aber gar nicht so schwer.
|
||||
|
||||
Unter EDIT/BOXEN eine neue ZCONNECT Box anlegen.
|
||||
|
||||
|
||||
Boxname: UNI-DUISBURG (eigentlich egal)
|
||||
Username: Der alias oder falls nicht vorhanden, die Benutzerkennung.
|
||||
(bei mir: mklose)
|
||||
|
||||
|
||||
Kommentar: (beliebig), bei mir Uni-Duisburg Account
|
||||
|
||||
MAPS-NAME: Spielt keine Rolle, egal was hier steht.
|
||||
|
||||
Realname: Dein ECHTER Name mit Vor und Nachname. Bei mir Michael Klose
|
||||
|
||||
Domain: .DE
|
||||
|
||||
Jetzt auf den neuen EIntrag gehen, und (E)DIT/(P)oint.
|
||||
|
||||
Unter Pointname hier die Benutzerkennung eingeben (bei mir sl652kl). Der
|
||||
Rest ist egal (einfach so lassen)
|
||||
|
||||
Unter (E)dit/(D)iverses unter Eingangsfilter (da steht als Überschrift
|
||||
Filter dann da drunter Eingang und Ausgang, der Eingangsfilter ist
|
||||
wichtig) folgendes eintragen:
|
||||
|
||||
[UKA_PPP VERZEICHNIS]\x_script.exe xpnews
|
||||
|
||||
Das ist bei diesem Bildschirm alles, was eingestellt werden muß.
|
||||
|
||||
Jetzt unter /(E)dit/(S)ysopmode folgendes eintragen:
|
||||
|
||||
Eingangspuffer: [UKA_PPP Verzeichnis]\INFILE.Z
|
||||
|
||||
Ausgangspuffer: [UKA_PPP Verzeichnis]\OUTFILE.Z
|
||||
|
||||
Herzlichen Glückwunsch! Crosspoint ist jetzt für den Uni Zugang
|
||||
eingerichtet! Jetzt kann man ganz normal unter /Netcall/Einzeln pollen!
|
||||
|
||||
Newsgroups kann man aber nicht an/abbestellen in Crosspoint. Das An/
|
||||
Absbestellen von Newsgroups geht über die UKA_PPP Programme SUBSCRIBE und
|
||||
UNSUBSCRIBE oder so ähnlich. Einfacher ist es ins UKA_PPP Verzeichnis zu
|
||||
gehen, und die Batchdatei GO aufzurufen:
|
||||
|
||||
Jetzt unter:
|
||||
|
||||
Setup/Server kann man Unsubscribe oder Subsrcribe wählen.
|
||||
|
||||
Dieses macht vor dem ersten poll wenig Sinn, da UKA_PPP sich noch keine
|
||||
Newsgroupliste geholt hat.
|
||||
|
||||
|
||||
------------- Kleine Anmerkung(en) --------------------------------------
|
||||
|
||||
|
||||
Wundert EUch nicht darüber, daß zuerst die ganzen Newsgroup Messages in
|
||||
/Junk wandern. Dieses liegt am folgendem:
|
||||
|
||||
Wenn eine Mail in *einem* Brett kommt, und dieses Brett noch nicht
|
||||
existiert, so legt XP das neue Brett an.
|
||||
|
||||
Kommen aber nur tausend Crosspostings, weiß XP nicht in welcher Gruppe er
|
||||
es hinlegen soll, da er keine Lust hat tausend Bretter anzulegen.
|
||||
|
||||
Meistens gibt es aber doch ein paar Mails, die nur zu der bestellten
|
||||
Newsgroup gehören, und dann auch ein Brett angelegt wird.
|
||||
|
||||
Falls mehrere der Bretter, wo die Mail cross gepostet ist, in XP angelegt
|
||||
sind, so ist der Artikel in jeder von diesen zu sehen.
|
||||
|
||||
Das nur so als kleien Anmerkung. ich habe auch zuerst gedacht, daß UKA_PPP
|
||||
Scheiße baut, ist aber nicht so.
|
||||
|
||||
BTW: Für XP kann ich noch dringend den Filter Crosssecretary empfehlen.
|
||||
|
||||
|
||||
Ciao!
|
||||
|
||||
Michael
|
||||
|
||||
Fido: 2:2446/301.7 [PGP KEY per EB]
|
||||
Internet: mklose@uni-duisburg.de ET 2. Semester
|
||||
|
||||
...Diese Zeile ist Werbefrei und Unzensiert!
|
||||
|
717
FAQ/bin/7bit.pl
717
FAQ/bin/7bit.pl
|
@ -1,717 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Creates 7 bit ASCII text from Latin-1 FAQ
|
||||
#
|
||||
# (c) 1996 Volker Götz <volker@oops.franken.de>
|
||||
# modified 1996/1997 by
|
||||
# Bernhard Hailer <dl4mhk@lrz.uni-muenchen.de>
|
||||
# Matthias Heßler <hessler@wi-inf.uni-essen.de>
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
# Unbuffered print's
|
||||
$| = 1;
|
||||
|
||||
$margin = 6;
|
||||
$bar = "| ";
|
||||
$barlen = length ($bar);
|
||||
# maxlen gibt an, wieviele Zeichen max. pro Zeile ausgegeben werden
|
||||
# (margin geht extra...)
|
||||
$maxlen = 79 - $margin;
|
||||
|
||||
# Für die Datenausgabe benötigt...
|
||||
$actline = "";
|
||||
$commentline = "";
|
||||
$lastnumber = "";
|
||||
|
||||
# Für Änderungsstrich (default: Änderungsstrich!)
|
||||
$old = 0;
|
||||
|
||||
# Fragenzaehler
|
||||
$maincount = 0;
|
||||
$subcount = 0;
|
||||
$qcount = 0;
|
||||
|
||||
# Statusvariable
|
||||
$script = "FALSE";
|
||||
$state = "begin";
|
||||
$buffer = "-";
|
||||
|
||||
|
||||
#
|
||||
# Get file names from prompt
|
||||
#
|
||||
|
||||
$in = $ARGV[0];
|
||||
die "Usage: 7bit.pl infile [outfile] [headtempfile] [tailtempfile]\n" unless defined ($in);
|
||||
|
||||
$out = $ARGV[1];
|
||||
$out = "$in.asc" unless defined ($out);
|
||||
|
||||
|
||||
#
|
||||
# Open files
|
||||
#
|
||||
|
||||
open(IN,"<$in") || die "Can not open $in for input!\n";
|
||||
|
||||
open(OUT,">$out") || die "Can not open $out for output!\n";
|
||||
|
||||
|
||||
#
|
||||
# Create FAQ - TOC
|
||||
#
|
||||
|
||||
print ("Creating TOC:\n");
|
||||
|
||||
while($line = <IN>) {
|
||||
|
||||
chop($line); # kill \n character (newline)
|
||||
|
||||
if ($line =~ s/^!1//g) { # main headline
|
||||
if ($state eq "begin") {
|
||||
$line = &latin2asc ($line);
|
||||
output_newline ("\n\n".$line);
|
||||
output_newline ("#" x length ($line));
|
||||
output_newline ("");
|
||||
$state = "!1";
|
||||
}
|
||||
else {
|
||||
print "ERROR: too many !1 or !1 improper located:\n";
|
||||
print "!1$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "begin") { # Vorspann...
|
||||
$line = &latin2asc ($line);
|
||||
output_newline ($line);
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!2//g) { # bigger headlines
|
||||
$maincount++;
|
||||
$subcount = 0;
|
||||
$qcount = 0;
|
||||
flush_output ();
|
||||
$line = &latin2asc ($line);
|
||||
output_newline ("\n\n$maincount $line");
|
||||
output_newline ("=" x (length($line)+length($maincount)+1));
|
||||
output_newline ("");
|
||||
$state = "!2";
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!3//g) { # smaller headlines
|
||||
$subcount++;
|
||||
$qcount = 0;
|
||||
flush_output ();
|
||||
$line = &latin2asc ($line);
|
||||
output_newline ("\n$maincount.$subcount $line");
|
||||
output_newline ("-" x (length($line)+length($maincount)+length($subcount)+2));
|
||||
output_newline ("");
|
||||
$state = "!3";
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!old//g) { # old mode on
|
||||
if ($old eq 0) {
|
||||
flush_output();
|
||||
$old = 1;
|
||||
}
|
||||
else {
|
||||
print "ERROR: more than 1 !old ($state $maincount.$subcount.$qcount):\n";
|
||||
print "!old$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^Q: //g) { # questions
|
||||
|
||||
$qcount++;
|
||||
|
||||
# für jede Frage einen Punkt...
|
||||
print ".";
|
||||
|
||||
# index part
|
||||
if ($state ne "question") { # first line
|
||||
flush_output ();
|
||||
|
||||
# delete leading/trailing whitespace
|
||||
$line =~ s/^[ \t]*(.*?)[ \t]*$/$1/g;
|
||||
nice_output ( $line, "$qcount. ");
|
||||
}
|
||||
else {
|
||||
print "ERROR: \"Q: \" is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "Q: $line\n";
|
||||
}
|
||||
$state = "question";
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^A: //g) { # answers
|
||||
if ($state eq "question") {
|
||||
flush_output();
|
||||
$old = 0; # Kann wieder zurückschalten, da keine Ausgabe mehr...
|
||||
$state = "answer";
|
||||
}
|
||||
else {
|
||||
print "ERROR: \"A: \" is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "A: $line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!verbon//g) { # script mode on
|
||||
if ($state ne "script") {
|
||||
flush_output ();
|
||||
$buffer = $state;
|
||||
$state = "script";
|
||||
}
|
||||
else {
|
||||
print "ERROR: !verbon is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "!verbon$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!verboff//g) { # script mode off
|
||||
if ($state eq "script") {
|
||||
flush_output ();
|
||||
$state = $buffer;
|
||||
}
|
||||
else {
|
||||
print "ERROR: missing !verbon ($state $maincount.$subcount.$qcount):\n";
|
||||
print "!verboff$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "script") { # script mode ("!verbon")
|
||||
if ($buffer eq "question") {
|
||||
# leave spaces/margin alone => keine Formattierung
|
||||
ugly_output ($line);
|
||||
}
|
||||
elsif ($buffer eq "answer") {
|
||||
# keine Ausgabe in der TOC
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "question") { # do while in question mode
|
||||
# delete leading/trailing whitespace
|
||||
$line =~ s/^[ \t]*(.*?)[ \t]*$/$1/g;
|
||||
if (length ($line) > 0) {
|
||||
nice_output ( $line);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
flush_output();
|
||||
|
||||
#
|
||||
# Reopen Inputfile
|
||||
#
|
||||
|
||||
close (IN);
|
||||
print "\n";
|
||||
open(IN,"<$in") || die "Can not reopen $in for input!\n";
|
||||
|
||||
|
||||
#
|
||||
# Create main part of FAQ
|
||||
#
|
||||
|
||||
print ("Writing questions:\n");
|
||||
|
||||
$maincount= 0;
|
||||
$subcount = 0;
|
||||
$qcount = 0;
|
||||
|
||||
$state = "begin";
|
||||
$buffer = "-";
|
||||
|
||||
while($line = <IN>) {
|
||||
|
||||
chop($line); # kill \n character (newline)
|
||||
|
||||
if ($line =~ s/^!1//g) { # main headline
|
||||
if ($state eq "begin") {
|
||||
$line = &latin2asc ($line);
|
||||
output_newline ("");
|
||||
output_newline ("\n\n$line");
|
||||
output_newline ("#" x length ($line));
|
||||
output_newline ("");
|
||||
$state = "!1";
|
||||
}
|
||||
else {
|
||||
print "ERROR: too many !1 or !1 improper located:\n";
|
||||
print "!1$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "begin") { # Vorspann...
|
||||
# wurde schon ausgegeben => überspringen!
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!2//g) { # bigger headlines
|
||||
$maincount++;
|
||||
$subcount = 0;
|
||||
$qcount = 0;
|
||||
flush_output ();
|
||||
$line = &latin2asc ($line);
|
||||
output_newline ("");
|
||||
output_newline ("\n\n$maincount $line");
|
||||
output_newline ("=" x (length($line) + length($maincount) + 1));
|
||||
output_newline ("");
|
||||
$state = "!2";
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!3//g) { # smaller headlines
|
||||
$subcount++;
|
||||
$qcount = 0;
|
||||
flush_output ();
|
||||
$line = &latin2asc ($line);
|
||||
output_newline ("");
|
||||
output_newline ("\n\n$maincount.$subcount $line");
|
||||
output_newline ("-" x (length($line) + length($maincount) + length($subcount) + 2));
|
||||
output_newline ("");
|
||||
$state = "!3";
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!old//g) { # old mode on
|
||||
if ($old eq 0) {
|
||||
flush_output();
|
||||
$old = 1;
|
||||
}
|
||||
else {
|
||||
print "ERROR: more than 1 !old ($state $maincount.$subcount.$qcount):\n";
|
||||
print "!old$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^Q: //g) { # questions
|
||||
|
||||
$qcount++;
|
||||
|
||||
# für jede Frage einen Punkt...
|
||||
print ".";
|
||||
|
||||
# index part
|
||||
if ($state ne "question") { # first line
|
||||
flush_output ();
|
||||
|
||||
# delete leading/trailing whitespace
|
||||
$line =~ s/^[ \t]*(.*?)[ \t]*$/$1/g;
|
||||
if ($qcount != 1) {
|
||||
output_newline("");
|
||||
}
|
||||
nice_output ( $line, "$qcount. ");
|
||||
}
|
||||
else {
|
||||
print "ERROR: \"Q: \" is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "Q: $line\n";
|
||||
}
|
||||
$state = "question";
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^A: //g) { # answers
|
||||
if ($state eq "question") {
|
||||
# delete leading/trailing whitespace
|
||||
$line =~ s/^[ \t]*(.*?)[ \t]*$/$1/g;
|
||||
ugly_output("");
|
||||
nice_output ( $line);
|
||||
$state = "answer";
|
||||
}
|
||||
else {
|
||||
print "ERROR: \"A: \" is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "A: $line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!verbon//g) { # script mode on
|
||||
if ($state ne "script") {
|
||||
flush_output ();
|
||||
$buffer = $state;
|
||||
$state = "script";
|
||||
}
|
||||
else {
|
||||
print "ERROR: !verbon is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "!verbon$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!verboff//g) { # script mode off
|
||||
if ($state eq "script") {
|
||||
flush_output ();
|
||||
$state = $buffer;
|
||||
}
|
||||
else {
|
||||
print "ERROR: missing !verbon ($state $maincount.$subcount.$qcount):\n";
|
||||
print "!verboff$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!commenton//g) { # comment mode on
|
||||
if ($state ne "comment") {
|
||||
flush_output ();
|
||||
output_newline ("");
|
||||
$buffer = $state;
|
||||
$state = "comment";
|
||||
}
|
||||
else {
|
||||
print "ERROR: !commenton is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "!commenton$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^!commentoff//g) { # comment mode off
|
||||
if ($state eq "comment") {
|
||||
flush_output ();
|
||||
$state = $buffer;
|
||||
}
|
||||
else {
|
||||
print "ERROR: missing !commenton ($state $maincount.$subcount.$qcount):\n";
|
||||
print "!commentoff$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "question") { # do while in question mode
|
||||
# delete leading/trailing whitespace
|
||||
$line =~ s/^[ \t]*(.*?)[ \t]*$/$1/g;
|
||||
if (length ($line) > 0) {
|
||||
nice_output ( $line);
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "answer") { # do while in answer mode
|
||||
# delete leading/trailing whitespace
|
||||
$line =~ s/^[ \t]*(.*?)[ \t]*$/$1/g;
|
||||
if (length ($line) > 0) {
|
||||
nice_output ( $line);
|
||||
}
|
||||
else {
|
||||
flush_output ();
|
||||
output_newline ("");
|
||||
$old = 0;
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "script") { # script mode ("!verbon")
|
||||
if ($buffer eq "question") {
|
||||
# leave spaces/margin alone => keine Formattierung
|
||||
ugly_output ($line);
|
||||
}
|
||||
elsif ($buffer eq "answer") {
|
||||
# leave spaces/margin alone => keine Formattierung
|
||||
ugly_output ($line);
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "comment") {
|
||||
# delete leading/trailing whitespace
|
||||
$line =~ s/^[ \t]*(.*?)[ \t]*$/$1/g;
|
||||
comment_output ($line);
|
||||
}
|
||||
|
||||
elsif ($line =~ s/^<.*>//g) { # do if mark
|
||||
# leave spaces/margin alone
|
||||
# - and whatever the purpose of that part is after the change in
|
||||
# syntax... MatHes
|
||||
print "Skipped mark $&\n";
|
||||
}
|
||||
|
||||
else {
|
||||
# delete leading/trailing whitespace
|
||||
$line =~ s/^[ \t]*(.*?)[ \t]*$/$1/g;
|
||||
if (length($line) > 0) {
|
||||
comment_output ($line);
|
||||
}
|
||||
else {
|
||||
flush_output();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flush_output();
|
||||
ugly_output ("-" x 75);
|
||||
ugly_output ("(c) 1995,1996 Das FAQ-Team");
|
||||
|
||||
print "\n";
|
||||
|
||||
|
||||
#
|
||||
# Close files
|
||||
#
|
||||
|
||||
close (IN);
|
||||
close (OUT);
|
||||
|
||||
|
||||
sub ugly_output
|
||||
{ # Kein Wrapping, kein Rand (außer bei Änderungsstrich)
|
||||
# Input Parameter: Textzeile, evtl. Nummerierung (_als String_)
|
||||
my ($line ) = @_;
|
||||
|
||||
# Umlaute umwandeln
|
||||
$line = &latin2asc ($line);
|
||||
|
||||
# flush
|
||||
flush_output ();
|
||||
|
||||
# output...
|
||||
output_simple_line ($line);
|
||||
}
|
||||
|
||||
|
||||
sub comment_output
|
||||
{ # Wrapping, kein Rand, kein Änderungsstrich
|
||||
# Input Parameter: Textzeile, evtl. Numerierung (_als String_)
|
||||
my ($line) = @_;
|
||||
my $pos = 0;
|
||||
|
||||
# Umlaute umwandeln _vor_ Wrapping
|
||||
$line = &latin2asc ($line);
|
||||
|
||||
# Zeile anhängen mit korrektem Zwischenraum
|
||||
if (length ($line) > 0) {
|
||||
if (length ($commentline) > 0) {
|
||||
if (substr ($commentline, length ($commentline)) ne "-") {
|
||||
# Leerzeichen zwischen Zeilen einfügen, falls kein Trennstrich
|
||||
$commentline .= " ";
|
||||
}
|
||||
else {
|
||||
# Trennstrich entfernen
|
||||
$commentline = substr ($commentline, 0, length ($commentline) -1);
|
||||
}
|
||||
}
|
||||
# Zeile anhängen
|
||||
$commentline .= $line;
|
||||
}
|
||||
|
||||
# Zeilenweise ausgeben
|
||||
while( length( $commentline) > $maxlen+$margin || $commentline =~ /\n/) {
|
||||
$pos = wrap_pos ($commentline, $maxlen+$margin);
|
||||
if ($pos > 0) {
|
||||
output_newline (substr ($commentline, 0, $pos));
|
||||
# +1 für Trennzeichen: Space bzw. "\n"
|
||||
$commentline = substr ($commentline, $pos +1);
|
||||
}
|
||||
else {
|
||||
# kein wrapping möglich, da line zu lange => einfach abschneiden!
|
||||
# (zu kurze line muß aufgrund der while-Bedingung ja mindestens
|
||||
# ein "\n" als Trennzeichen haben => schon oben behandelt)
|
||||
output_newline (substr ($commentline, 0, $maxlen));
|
||||
$commentline = substr ($commentline, $maxlen);
|
||||
}
|
||||
}
|
||||
|
||||
# in commentline steht der Rest der Zeile...
|
||||
}
|
||||
|
||||
|
||||
sub nice_output
|
||||
{ # Wrapping und Rand
|
||||
# Input Parameter: Textzeile, evtl. Numerierung (_als String_)
|
||||
my ($line, $number ) = @_;
|
||||
$number = "" unless defined ($number);
|
||||
my $pos = 0;
|
||||
|
||||
# Umlaute umwandeln _vor_ Wrapping
|
||||
$line = &latin2asc ($line);
|
||||
|
||||
# flush actline, when new number comes in
|
||||
if (length ($number) > 0) {
|
||||
flush_output ();
|
||||
# Neue Nummer merken
|
||||
$lastnumber = $number;
|
||||
}
|
||||
|
||||
# Zeile anhängen mit korrektem Zwischenraum
|
||||
if (length ($line) > 0) {
|
||||
if (length ($actline) >0) {
|
||||
if (substr ($actline, length ($actline)) ne "-") {
|
||||
# Leerzeichen zwischen Zeilen einfügen, falls kein Trennstrich
|
||||
$actline .= " ";
|
||||
}
|
||||
else {
|
||||
# Trennstrich entfernen
|
||||
$actline= substr ($actline, 0, length ($actline) -1);
|
||||
}
|
||||
}
|
||||
# Zeile anhängen
|
||||
$actline .= $line;
|
||||
}
|
||||
|
||||
# Zeilenweise ausgeben
|
||||
while( length( $actline) > $maxlen || $actline =~ /\n/) {
|
||||
$pos = wrap_pos ($actline, $maxlen);
|
||||
if ($pos > 0) {
|
||||
print OUT format_margin( $lastnumber);
|
||||
print OUT substr ($actline, 0, $pos);
|
||||
print OUT "\n";
|
||||
# +1 für Trennzeichen: Space bzw. "\n"
|
||||
$actline = substr ($actline, $pos +1);
|
||||
}
|
||||
else {
|
||||
# kein wrapping möglich, da line zu lange => einfach abschneiden!
|
||||
# (zu kurze line muß aufgrund der while-Bedingung ja mindestens
|
||||
# ein "\n" als Trennzeichen haben => schon oben behandelt)
|
||||
print OUT format_margin( $lastnumber);
|
||||
print OUT substr ($actline, 0, $maxlen);
|
||||
print OUT "\n";
|
||||
$actline = substr ($actline, $maxlen);
|
||||
}
|
||||
$lastnumber = "";
|
||||
}
|
||||
|
||||
# in $actline steht der Rest der Zeile...
|
||||
}
|
||||
|
||||
|
||||
sub flush_output
|
||||
{
|
||||
# flush actline
|
||||
if (length ($actline) > 0) {
|
||||
print OUT format_margin( $lastnumber);
|
||||
print OUT $actline;
|
||||
print OUT "\n";
|
||||
$actline = "";
|
||||
$lastnumber = "";
|
||||
}
|
||||
|
||||
# flush commentline
|
||||
if (length ($commentline) > 0) {
|
||||
print OUT $commentline;
|
||||
print OUT "\n";
|
||||
$commentline = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub output_newline
|
||||
{ # Druckt eine Zeile (_ohne_ Änderungsstrich)
|
||||
# Achtung: die Umwandlung der Umlaute (latin2asc) muß schon erledigt sein!
|
||||
# Input Parameter: Textzeile
|
||||
my ($line) = @_;
|
||||
|
||||
print OUT $line;
|
||||
print OUT "\n";
|
||||
}
|
||||
|
||||
|
||||
sub output_simple_line
|
||||
{ # Gibt eine Textzeile aus, ggf. mit Änderungsstrich
|
||||
# Input Parameter: Textzeile
|
||||
my ($line) = @_;
|
||||
|
||||
flush_output();
|
||||
|
||||
if ($old == 0) {
|
||||
print OUT $bar;
|
||||
if ($line =~ /^ /) {
|
||||
print OUT substr ($line, $barlen);
|
||||
print OUT "\n";
|
||||
}
|
||||
else {
|
||||
print OUT $line;
|
||||
print OUT "\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
print OUT $line;
|
||||
print OUT "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub wrap_pos
|
||||
{
|
||||
# Input Parameter: Textzeile
|
||||
my ($line, $maxlen ) = @_;
|
||||
my $pos1 = 0;
|
||||
my $pos2 = 0;
|
||||
|
||||
$pos1 = index( $line, "\n");
|
||||
if ($pos1 <= $maxlen && $pos1 >= 0) { # !br/Zeilenumbrüche berücksichtigen
|
||||
return $pos1;
|
||||
}
|
||||
else {
|
||||
$pos2 = rindex( $line, " ", $maxlen); # wo word wrapping?
|
||||
if ($pos2 <= $maxlen && $pos2 >= 0) {
|
||||
return $pos2;
|
||||
}
|
||||
else { # Kein wrapping möglich
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub format_margin
|
||||
{
|
||||
my( $number) = @_; # Input Parameter: evtl. Nummerierung _als String_
|
||||
my $out = "";
|
||||
|
||||
if (length ($number) > 0) {
|
||||
if ($old == 0) {
|
||||
$out = $bar;
|
||||
$out .= " " x ($margin - length ($number) -$barlen); # Margin
|
||||
$out .= $number;
|
||||
}
|
||||
else {
|
||||
$out = " " x ($margin - length ($number)); # Margin
|
||||
$out .= $number;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($old == 0) {
|
||||
$out = $bar;
|
||||
$out .= " " x ($margin -$barlen); # Margin
|
||||
}
|
||||
else {
|
||||
$out .= " " x $margin; # Margin
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
sub latin2asc
|
||||
{
|
||||
my ($line) = @_;
|
||||
|
||||
# native codes
|
||||
$line =~ s/ä/ae/g;
|
||||
$line =~ s/ö/oe/g;
|
||||
$line =~ s/ü/ue/g;
|
||||
$line =~ s/Ä/Ae/g;
|
||||
$line =~ s/Ö/Oe/g;
|
||||
$line =~ s/Ü/Ue/g;
|
||||
$line =~ s/ß/ss/g;
|
||||
|
||||
# !br als Umbruch verwenden
|
||||
$line =~ s|!br|\n|g;
|
||||
while ($line =~ /!link /) {
|
||||
my $pos1= 0;
|
||||
my $pos2= 0;
|
||||
my $url= "";
|
||||
|
||||
$pos1= index($line, "!link ");
|
||||
$pos2= index($line, ";", $pos1);
|
||||
if ($pos2 == -1) {
|
||||
$pos2= length($line);
|
||||
}
|
||||
$url= substr($line, $pos1+length("!link "),
|
||||
$pos2-$pos1-length("!link "));
|
||||
$line = substr($line, 0, $pos1)
|
||||
. " $url "
|
||||
. substr($line, $pos2+1);
|
||||
}
|
||||
|
||||
# Hervorhebungen
|
||||
$line =~ s|!b1|*|g;
|
||||
$line =~ s|!b0|*|g;
|
||||
$line =~ s|!i1|/|g;
|
||||
$line =~ s|!i0|/|g;
|
||||
$line =~ s|!u1|_|g;
|
||||
$line =~ s|!u0|_|g;
|
||||
|
||||
return $line;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# $Id$
|
||||
|
||||
($infile, $outfile) = @ARGV;
|
||||
|
||||
$infile = "i4l-faq.diff" until $infile;
|
||||
$outfile = "$infile.ext" until $outfile;
|
||||
|
||||
open(IN,"<$infile") || die "cannot open $infile";
|
||||
open(OUT,">$outfile") || die "cannot open $outfile";
|
||||
|
||||
while(<IN>) {
|
||||
|
||||
if (/^\+/) {
|
||||
if ( /^\+\+/ ) {
|
||||
print OUT "$_";
|
||||
}
|
||||
else {
|
||||
print OUT "+°";
|
||||
print OUT "$'";
|
||||
}
|
||||
}
|
||||
else {
|
||||
print OUT "$_";
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# $Id$
|
||||
|
||||
($infile, $outfile) = @ARGV;
|
||||
|
||||
$infile = "de-i4l-faq" until $inputfile;
|
||||
$outfile = "$infile.out" until $outfile;
|
||||
|
||||
open(IN,"<$infile") || die "cannot open $infile";
|
||||
open(OUT,">$outfile") || die "cannot open $outfile";
|
||||
|
||||
while(<IN>) {
|
||||
|
||||
if (/^\°/) {
|
||||
print OUT "$'";
|
||||
}
|
||||
else {
|
||||
print OUT "$_";
|
||||
}
|
||||
}
|
316
FAQ/bin/html.pl
316
FAQ/bin/html.pl
|
@ -1,316 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Creates HTML version from Latin-1 FAQ
|
||||
#
|
||||
# (c) 1996 Volker Götz <volker@oops.franken.de> (V 1.0)
|
||||
# modified 08-Nov-96 Bernhard Hailer <dl4mhk@lrz.uni-muenchen.de>
|
||||
# modified 11-Nov-96 Matthias Heßler <hessler@wi-inf.uni-essen.de>
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
||||
#
|
||||
# variables
|
||||
#
|
||||
|
||||
$maincount = 0;
|
||||
$subcount = 0;
|
||||
$qcount = 0;
|
||||
|
||||
$state = "title";
|
||||
$buffer = "-";
|
||||
|
||||
$script = "FALSE";
|
||||
|
||||
|
||||
#
|
||||
# Get file names from prompt
|
||||
#
|
||||
|
||||
$in = $ARGV[0];
|
||||
die "Usage: GenHTML.pl infile [outfile] [headtempfile] [tailtempfile]\n" unless length ($in) gt 0;
|
||||
|
||||
$out = $ARGV[1];
|
||||
$out = "$in.html" unless length ($out) gt 0;
|
||||
|
||||
$head = $ARGV[2];
|
||||
$head = "head.tmp" unless length ($head) gt 0;
|
||||
|
||||
$tail = $ARGV[3];
|
||||
$tail = "tail.tmp" unless length ($tail) gt 0;
|
||||
|
||||
|
||||
#
|
||||
# Open files
|
||||
#
|
||||
|
||||
open(IN,"<$in") || die "Can not open $in for input!\n";
|
||||
|
||||
open(TAIL,">$tail") || die "Can not open $tail for output!\n";
|
||||
open(HEAD,">$head") || die "Can not open $head for output!\n";
|
||||
|
||||
|
||||
#
|
||||
# Create FAQ
|
||||
#
|
||||
|
||||
print ("Creating html temp files...\n");
|
||||
|
||||
print HEAD "<HTML>\n";
|
||||
|
||||
while($line = <IN>) {
|
||||
|
||||
chop($line); # kill \n character (newline)
|
||||
$line = &latin2html ($line); # convert Umlaut's
|
||||
|
||||
if ($state eq "title") { # pre text of FAQ
|
||||
print HEAD "<HEAD>\n";
|
||||
print HEAD "<TITLE>$inputfile</TITLE>\n";
|
||||
print HEAD "</HEAD>\n\n";
|
||||
print HEAD "<BODY>\n";
|
||||
print HEAD "<PRE>\n";
|
||||
print HEAD "$line\n";
|
||||
$state = "begin";
|
||||
}
|
||||
|
||||
elsif ($line =~ /^!1/) { # main headline
|
||||
if ($state eq "begin") {
|
||||
print HEAD "</PRE>\n\n<HR>\n<P>\n\n<H1>$'</H1>\n\n";
|
||||
print TAIL "</PRE>\n\n<HR>\n<P>\n\n<H1>$'</H1>\n\n";
|
||||
$state = "!1";
|
||||
}
|
||||
else {
|
||||
print "ERROR: too many !1 or !1 improper located:\n";
|
||||
print "$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "begin") { # body of FAQ begins
|
||||
print HEAD "$line\n";
|
||||
}
|
||||
|
||||
elsif ($line =~ /^!old/) {
|
||||
# DUMMY; sonst erscheint das !old in der HTML-Version.
|
||||
# Hier später die !old-Auswertung einfügen.
|
||||
}
|
||||
|
||||
elsif ($line =~ /^!2/) { # bigger headlines
|
||||
$maincount++;
|
||||
$subcount = 0;
|
||||
$qcount = 0;
|
||||
if ($state eq "!1") { # first headline needs no </OL>
|
||||
print HEAD "\n\n<H2>$maincount $'</H2>\n\n<OL>\n";
|
||||
print TAIL "\n\n<H2>$maincount $'</H2>\n\n<OL>\n";
|
||||
}
|
||||
else {
|
||||
print HEAD "</OL>\n<P>\n\n<H2>$maincount $'</H2>\n\n<OL>\n";
|
||||
print TAIL "</OL>\n<P>\n<BR><BR>\n<H2>$maincount $'</H2>\n\n<OL>\n";
|
||||
}
|
||||
$state = "!2";
|
||||
}
|
||||
|
||||
elsif ($line =~ /^!3/) { # smaller headlines
|
||||
$subcount++;
|
||||
$qcount = 0;
|
||||
print HEAD "</OL>\n<P>\n\n<H3>$maincount.$subcount $'</H3>\n\n<OL>\n";
|
||||
print TAIL "</OL>\n<P>\n<BR><BR>\n<H3>$maincount.$subcount $'</H3>\n\n<OL>\n";
|
||||
$state = "!3";
|
||||
}
|
||||
|
||||
elsif ($line =~ /^Q: /) { # questions
|
||||
|
||||
# index part
|
||||
$qcount++;
|
||||
if ($state eq "question") {
|
||||
print HEAD "$'\n"; # first line was already printed
|
||||
print TAIL "$'\n";
|
||||
}
|
||||
else {
|
||||
print HEAD "<LI><A HREF=\"#$maincount.$subcount.$qcount\">$'\n";
|
||||
print TAIL "<BR><BR>\n" unless $maincount == 0;
|
||||
print TAIL "<A NAME=\"$maincount.$subcount.$qcount\"></A>\n";
|
||||
print TAIL "<LI><B>$'\n";
|
||||
}
|
||||
$state = "question";
|
||||
}
|
||||
|
||||
elsif ($line =~ /^A: /) { # answers
|
||||
if ($state eq "question") {
|
||||
print HEAD "</A>\n"; # stop link in question line
|
||||
print TAIL "</B>\n<BR>\n<BR>\n\n$'\n";
|
||||
$state = "answer";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ /^!verbon/) { # script mode on
|
||||
if ($script eq "TRUE") {
|
||||
print "ERROR: !verbon is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "$line\n";
|
||||
}
|
||||
else {
|
||||
$script = "TRUE";
|
||||
print TAIL "<PRE>\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ /^!verboff/) { # script mode off
|
||||
if ($script eq "TRUE") {
|
||||
$script = "FALSE";
|
||||
print TAIL "</PRE><BR>\n";
|
||||
}
|
||||
else {
|
||||
print "ERROR: missing !verbon ($state $maincount.$subcount.$qcount):\n";
|
||||
print "$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ /^!commenton/) { # comment mode on
|
||||
if ($state eq "comment") {
|
||||
print "ERROR: !commenton is already active ($state $maincount.$subcount.$qcount):\n";
|
||||
print "$line\n";
|
||||
}
|
||||
else {
|
||||
$buffer = $state;
|
||||
$state = "comment";
|
||||
print TAIL "<P>\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($line =~ /^!commentoff/) { # comment mode off
|
||||
if ($state eq "comment") {
|
||||
$state = $buffer;
|
||||
}
|
||||
else {
|
||||
print "ERROR: missing !commenton ($state $maincount.$subcount.$qcount):\n";
|
||||
print "$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "question") { # do while in question mode
|
||||
print HEAD "$line\n";
|
||||
print TAIL "$line\n";
|
||||
}
|
||||
|
||||
elsif ($state eq "answer") { # do while in answer mode
|
||||
if (length ($line) > 0) {
|
||||
print TAIL "$line\n";
|
||||
}
|
||||
else {
|
||||
print TAIL "<P>\n";
|
||||
# $old = 0;
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($script eq "TRUE") {
|
||||
if ($state eq "question") {
|
||||
print HEAD "$line\n";
|
||||
print TAIL "$line\n";
|
||||
}
|
||||
elsif ($state eq "answer") {
|
||||
print TAIL "$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($state eq "comment") {
|
||||
print TAIL "$line\n";
|
||||
}
|
||||
|
||||
else {
|
||||
print TAIL "$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
print HEAD "</OL>\n";
|
||||
print TAIL "</OL>\n";
|
||||
print TAIL "<HR>\n";
|
||||
print TAIL "© 1995,1996 ";
|
||||
print TAIL "<A HREF=\"mailto:dl4mhk\@lrz.uni-muenchen.de?cc=hessler\@wi-inf.uni-essen.de\?subject=i4l-faq\">Das FAQ-Team</A>\n";
|
||||
print TAIL "</BODY>\n</HTML>\n";
|
||||
|
||||
|
||||
#
|
||||
# Close files
|
||||
#
|
||||
|
||||
close (IN);
|
||||
close (HEAD);
|
||||
close (TAIL);
|
||||
|
||||
|
||||
#
|
||||
# Write output file (concat head and tail)
|
||||
#
|
||||
|
||||
print ("Writing html file...\n");
|
||||
|
||||
open(OUT,">$out") || die "Can not open $out for output!\n";
|
||||
|
||||
open(HEAD,"<$head") || die "Can not reopen $head for input!\n";
|
||||
while (<HEAD>) { print OUT; }
|
||||
close (HEAD);
|
||||
|
||||
open(TAIL,"<$tail") || die "Can not reopen $tail for input!\n";
|
||||
while (<TAIL>) { print OUT; }
|
||||
close (TAIL);
|
||||
|
||||
close (OUT);
|
||||
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
unlink ($head) || die "Could not delete temp file $head!\n";
|
||||
unlink ($tail) || die "Could not delete temp file $head!\n";
|
||||
|
||||
|
||||
#
|
||||
# subroutines
|
||||
#
|
||||
|
||||
sub latin2html
|
||||
{
|
||||
local ($line) = @_;
|
||||
|
||||
# native codes
|
||||
$line =~ s/&/&/g;
|
||||
$line =~ s/</</g;
|
||||
$line =~ s/>/>/g;
|
||||
|
||||
$line =~ s/ä/ä/g;
|
||||
$line =~ s/ö/ö/g;
|
||||
$line =~ s/ü/ü/g;
|
||||
$line =~ s/Ä/Ä/g;
|
||||
$line =~ s/Ö/Ö/g;
|
||||
$line =~ s/Ü/Ü/g;
|
||||
$line =~ s/ß/ß/g;
|
||||
|
||||
# special codes
|
||||
$line =~ s|!br|<BR>|g;
|
||||
while ($line =~ /!link /) {
|
||||
my $pos1= 0;
|
||||
my $pos2= 0;
|
||||
my $url= "";
|
||||
|
||||
$pos1= index($line, "!link ");
|
||||
$pos2= index($line, ";", $pos1);
|
||||
if ($pos2 == -1) {
|
||||
$pos2= length($line);
|
||||
}
|
||||
$url= substr($line, $pos1+length("!link "),
|
||||
$pos2-$pos1-length("!link "));
|
||||
$line = substr($line, 0, $pos1)
|
||||
. "<A HREF=\"$url\" TARGET=_top>$url</A>"
|
||||
. substr($line, $pos2+1);
|
||||
}
|
||||
|
||||
# Hervorhebungen
|
||||
$line =~ s|!b1|<B>|g;
|
||||
$line =~ s|!b0|</B>|g;
|
||||
$line =~ s|!i1|<I>|g;
|
||||
$line =~ s|!i0|</I>|g;
|
||||
$line =~ s|!u1|<U>|g;
|
||||
$line =~ s|!u0|</U>|g;
|
||||
|
||||
return $line;
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Marks all Questions in FAQ as new.
|
||||
#
|
||||
# (c) 1996 Matthias Heßler <hessler@wi-inf.uni-essen.de>
|
||||
#
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# Get file names from prompt
|
||||
#
|
||||
|
||||
$in = $ARGV[0];
|
||||
die "Usage: new.pl infile [outfile]\n" unless length ($in) gt 0;
|
||||
|
||||
$out = $ARGV[1];
|
||||
$out = "$in" unless length ($out) gt 0;
|
||||
|
||||
|
||||
#
|
||||
# Open files
|
||||
#
|
||||
|
||||
if ("$in" eq "$out") {
|
||||
if( -e "$in.orig") {
|
||||
unlink( "$in.orig") || die "Can not remove $in.orig!\n";
|
||||
}
|
||||
rename( "$in", "$in.orig") || die "Can not rename $in to $in.orig!\n";
|
||||
$in .= ".orig";
|
||||
}
|
||||
|
||||
open(IN,"<$in") || die "Can not open $in for input!\n";
|
||||
open(OUT,">$out") || die "Can not open $out for output!\n";
|
||||
|
||||
|
||||
#
|
||||
# Updating FAQ
|
||||
#
|
||||
|
||||
print "Marking all FAQ questions as new...\n";
|
||||
|
||||
$old = 0;
|
||||
|
||||
while($line = <IN>) {
|
||||
|
||||
chop($line); # kill \n character (newline)
|
||||
|
||||
if ($line =~ /^!old/) { # remove all "!old"
|
||||
# Do not output line...
|
||||
}
|
||||
else {
|
||||
print OUT "$line\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Close files
|
||||
#
|
||||
|
||||
close (IN);
|
||||
close (OUT);
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Marks all Questions in FAQ as old.
|
||||
#
|
||||
# (c) 1996 Matthias Heßler <hessler@wi-inf.uni-essen.de>
|
||||
#
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# Get file names from prompt
|
||||
#
|
||||
|
||||
$in = $ARGV[0];
|
||||
die "Usage: old.pl infile [outfile]\n" unless length ($in) gt 0;
|
||||
|
||||
$out = $ARGV[1];
|
||||
$out = "$in" unless length ($out) gt 0;
|
||||
|
||||
|
||||
#
|
||||
# Open files
|
||||
#
|
||||
|
||||
if ("$in" eq "$out") {
|
||||
if( -e "$in.orig") {
|
||||
unlink( "$in.orig") || die "Can not remove $in.orig!\n";
|
||||
}
|
||||
rename( "$in", "$in.orig") || die "Can not rename $in to $in.orig!\n";
|
||||
$in .= ".orig";
|
||||
}
|
||||
|
||||
open(IN,"<$in") || die "Can not open $in for input!\n";
|
||||
open(OUT,">$out") || die "Can not open $out for output!\n";
|
||||
|
||||
|
||||
#
|
||||
# Updating FAQ
|
||||
#
|
||||
|
||||
print "Marking all FAQ questions as old...\n";
|
||||
|
||||
$old = 0;
|
||||
|
||||
while($line = <IN>) {
|
||||
|
||||
chop($line); # kill \n character (newline)
|
||||
|
||||
if ($line =~ /^!old/) { # remove all "!old"
|
||||
# Do not output line...
|
||||
}
|
||||
|
||||
elsif ($line =~ /^Q: /) { # questions
|
||||
print OUT "!old\n";
|
||||
|
||||
print OUT "$line\n";
|
||||
}
|
||||
|
||||
else {
|
||||
print OUT "$line\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Close files
|
||||
#
|
||||
|
||||
close (IN);
|
||||
close (OUT);
|
||||
|
|
@ -1,906 +0,0 @@
|
|||
#! /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_help="$ac_help
|
||||
--with-dest=DIR set installation directory"
|
||||
|
||||
# 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=de-i4l-faq
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
if test -r ../.config ; then
|
||||
source ../.config
|
||||
TARGET_DIR=$CONFIG_FAQDIR
|
||||
else
|
||||
TARGET_DIR=./out
|
||||
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'
|
||||
|
||||
# Extract the first word of "zip", so it can be a program name with args.
|
||||
set dummy zip; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_path_C_ZIP'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
case "$C_ZIP" in
|
||||
/*)
|
||||
ac_cv_path_C_ZIP="$C_ZIP" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH:/usr/sbin:/sbin:/usr/local/bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_path_C_ZIP="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
C_ZIP="$ac_cv_path_C_ZIP"
|
||||
if test -n "$C_ZIP"; then
|
||||
echo "$ac_t""$C_ZIP" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
# Extract the first word of "gzip", so it can be a program name with args.
|
||||
set dummy gzip; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_path_C_GZIP'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
case "$C_GZIP" in
|
||||
/*)
|
||||
ac_cv_path_C_GZIP="$C_GZIP" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH:/usr/sbin:/sbin:/usr/local/bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_path_C_GZIP="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
C_GZIP="$ac_cv_path_C_GZIP"
|
||||
if test -n "$C_GZIP"; then
|
||||
echo "$ac_t""$C_GZIP" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
# Extract the first word of "perl", so it can be a program name with args.
|
||||
set dummy perl; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_path_C_PERL'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
case "$C_PERL" in
|
||||
/*)
|
||||
ac_cv_path_C_PERL="$C_PERL" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH:/usr/sbin:/sbin:/usr/local/bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_path_C_PERL="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
C_PERL="$ac_cv_path_C_PERL"
|
||||
if test -n "$C_PERL"; then
|
||||
echo "$ac_t""$C_PERL" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-dest or --without-dest was given.
|
||||
if test "${with_dest+set}" = set; then
|
||||
withval="$with_dest"
|
||||
\
|
||||
TARGET_DIR="$withval"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
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%@C_ZIP@%$C_ZIP%g
|
||||
s%@C_GZIP@%$C_GZIP%g
|
||||
s%@C_PERL@%$C_PERL%g
|
||||
s%@TARGET_DIR@%$TARGET_DIR%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
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(de-i4l-faq)
|
||||
|
||||
dnl Set default installation directory
|
||||
if test -r ../.config ; then
|
||||
source ../.config
|
||||
TARGET_DIR=$CONFIG_FAQDIR
|
||||
else
|
||||
TARGET_DIR=./out
|
||||
fi
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_INSTALL
|
||||
AC_PATH_PROG(C_ZIP, zip,,$PATH:/usr/sbin:/sbin:/usr/local/bin)
|
||||
AC_PATH_PROG(C_GZIP, gzip,,$PATH:/usr/sbin:/sbin:/usr/local/bin)
|
||||
AC_PATH_PROG(C_PERL, perl,,$PATH:/usr/sbin:/sbin:/usr/local/bin)
|
||||
|
||||
dnl Check where to install.
|
||||
AC_ARG_WITH(dest,[ --with-dest=DIR set installation directory], \
|
||||
TARGET_DIR="$withval",)
|
||||
|
||||
AC_SUBST(TARGET_DIR)
|
||||
AC_OUTPUT(Makefile)
|
5627
FAQ/de-i4l-faq
5627
FAQ/de-i4l-faq
File diff suppressed because it is too large
Load Diff
|
@ -1,58 +0,0 @@
|
|||
Die Handhabung mit dem Makefile ist einfach:
|
||||
"make 7bit" erzeugt die 7bit-Version der deutschen FAQ im
|
||||
Unterverzeichnis "out".
|
||||
"make 7bit.zip" erzeugt die mit zip gepackte 7bit-Version der
|
||||
deutschen FAQ im Unterverzeichnis "out".
|
||||
"make 7bit.gz" erzeugt die mit gzip gepackte 7bit-Version der
|
||||
deutschen FAQ im Unterverzeichnis "out".
|
||||
|
||||
"make html" erzeugt die html-Version der deutschen FAQ im
|
||||
Unterverzeichnis "out".
|
||||
"make html.zip" erzeugt die mit zip gepackte html-Version der
|
||||
deutschen FAQ im Unterverzeichnis "out".
|
||||
"make html.gz" erzeugt die mit gzip gepackte html-Version der
|
||||
deutschen FAQ im Unterverzeichnis "out".
|
||||
|
||||
"make e7bit" erzeugt die 7bit-Version der englischen FAQ im
|
||||
Unterverzeichnis "out".
|
||||
"make e7bit.zip" erzeugt die mit zip gepackte 7bit-Version der
|
||||
englischen FAQ im Unterverzeichnis "out".
|
||||
"make e7bit.gz" erzeugt die mit gzip gepackte 7bit-Version der
|
||||
englischen FAQ im Unterverzeichnis "out".
|
||||
|
||||
"make ehtml" erzeugt die html-Version der englischen FAQ im
|
||||
Unterverzeichnis "out".
|
||||
"make ehtml.zip" erzeugt die mit zip gepackte html-Version der
|
||||
englischen FAQ im Unterverzeichnis "out".
|
||||
"make ehtml.gz" erzeugt die mit gzip gepackte html-Version der
|
||||
englischen FAQ im Unterverzeichnis "out".
|
||||
|
||||
|
||||
"make install" kopiert alles in "out" in ein Zielverzeichnis (kann im
|
||||
Makefile auf z.B. /home/dl4mhk/www/i4l-faq gesetzt werden)
|
||||
|
||||
"make all" oder einfach nur "make" macht alles bisher erwaehnte.
|
||||
|
||||
|
||||
"make dif" erzeugt ein diff der deutschen FAQ (verglichen wird mit der
|
||||
".old" Datei).
|
||||
|
||||
"make pat" spielt einen neuen diff fuer die deutsche FAQ ein (der muss
|
||||
als ".diff" vorliegen)
|
||||
|
||||
"make new" markiert alle Fragen der deutschen FAQ als neu.
|
||||
|
||||
"make old" markiert alle Fragen der deutschen FAQ als alt.
|
||||
|
||||
|
||||
"make edif" erzeugt ein diff der englischen FAQ (verglichen wird mit
|
||||
der ".old" Datei).
|
||||
|
||||
"make epat" spielt einen neuen diff fuer die englische FAQ ein (der
|
||||
muss als ".diff" vorliegen)
|
||||
|
||||
"make enew" markiert alle Fragen der englischen FAQ als neu.
|
||||
|
||||
"make eold" markiert alle Fragen der englischen FAQ als alt.
|
||||
|
||||
"make clean" raeumt das "out"-Verzeichnis auf.
|
|
@ -1,48 +0,0 @@
|
|||
Anmerkungen zur Syntax der FAQ
|
||||
==============================
|
||||
|
||||
Die FAQ wird mit einem Perlscript weiterverarbeitet, daher ist eine gewisse Syntax einzuhalten.
|
||||
|
||||
* Formate:
|
||||
Entwicklungsdatei: ISO-8859-1 (Latin-1) mit allen Umlauten.
|
||||
Ausgabedateien: HTML und ASCII 7 bit (werden von Perlscripten generiert).
|
||||
|
||||
* Trennungen: Aehnlich wie bei TeX sind Trennungen nicht erlaubt. Zwar kann
|
||||
HTML nicht selber trennen, aber ein erscheinendes "Trenn- zeichen" im
|
||||
Text sieht nicht gut aus.
|
||||
|
||||
* Ueberschriften: mit abnehmender Hierarchie !1, !2 oder !3 voranstellen.
|
||||
!1 darf nur *einmal* vorkommen und muss vor der FAQ-Hauptueberschrift
|
||||
stehen.
|
||||
|
||||
* Fragen: Fragen muessen mit einem "Q: " am *Anfang* der Zeile beginnen.
|
||||
(Auch die deutsche Version!)
|
||||
|
||||
* Antworten: Antworten muessen mit einem "A: " am *Anfang* der Zeile beginnen.
|
||||
|
||||
* Es duerfen keine Leerzeilen innerhalb einer Frage oder innerhalb einer
|
||||
Antwort stehen, aber es muss eine Leerzeile zwischen zwei Fragen/Antworten
|
||||
stehen. Ist insbesondere wichtig fuer die korrekte Erzeugung der Aenderungs-
|
||||
striche.
|
||||
|
||||
* Hervorhebungen: man kann !b1fett!b0, !i1kursiv!i0 und !u1unterstrichen!u0
|
||||
schreiben.
|
||||
|
||||
* Links auf ftp- oder www-Server werden in der folgenden Form angegeben:
|
||||
!link http://www.lrz-muenchen.de/~ui161ab/www/isdn/;
|
||||
bzw.
|
||||
!link ftp://ftp.franken.de/pub/isdn4linux/FAQ;
|
||||
Das Semikolon am Ende darf nicht vergessen werden! Ein Link kann uebrigens
|
||||
wie !br, !b1, !b0, !i1, !i0, !u1, !u0 ueberall im Text stehen - auch in
|
||||
Kommentaren.
|
||||
|
||||
* Scripten: Wenn bestimmte Abschnitte in den Ausgabedateien *genauso*
|
||||
erscheinen sollen wie in der Entwicklungsdatei, dann setzt man in die Zeile
|
||||
davor in der ersten Spalte "!verbon", in die Zeile danach in der ersten
|
||||
Spalte "!verboff". Diese beiden Zeilen duerfen sonst nichts enthalten.
|
||||
|
||||
* Kommentare: Kommentare zwischen einer Frage/Antwort-Kombination werden mit
|
||||
!commenton eingeleitet und !commentoff beendet.
|
||||
|
||||
Bernhard Hailer <dl4mhk@lrz.uni-muenchen.de>,
|
||||
Matthias Hessler <hessler@wi-inf.uni-essen.de>
|
5206
FAQ/eng-i4l-faq
5206
FAQ/eng-i4l-faq
File diff suppressed because it is too large
Load Diff
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exit 0
|
430
HOWTO
430
HOWTO
|
@ -1,430 +0,0 @@
|
|||
isdn4k-utils - HOWTO - Andreas Kool - 31-Mar-97 - 23:53
|
||||
|
||||
***************************************************************************
|
||||
** Dieses Dokument wendet sich z.Zt. vor allem an all diejenigen, die es **
|
||||
** nicht abwarten koennen, und sich die neuen isdn4k-utils ->PRE ALPHA ! **
|
||||
** aus dem CVS-Baum ausgecheckt haben. **
|
||||
** **
|
||||
** Es handelt sich um ein gerade entstehendes Programmpaket - daher **
|
||||
** sind alle Fehlerhinweise, Verbesserungsvorschlaege etc. sehr gerne **
|
||||
** gesehen, Anfragen bzgl. "ich bekomme das nicht kompiliert" jedoch **
|
||||
** koennen in diesem Fruehstadium leider *nicht* beantwortet werden! **
|
||||
***************************************************************************
|
||||
|
||||
Dieses Dokument versucht, jedem den Einstieg in die neuen isdn4k-utils
|
||||
so einfach wie moeglich zu machen.
|
||||
|
||||
Fuer alte isdnlog-Hasen wirkt die neue Version sicherlich erst einmal
|
||||
wie ein Kulturschock ... soo schlimm wird es aber gar nicht!
|
||||
|
||||
Um die Benutzung aller Utilities rund um isdn4linux auch fuer Neueinsteiger
|
||||
so einfach wie irgend moeglich zu machen, haben wir versucht, alle
|
||||
Tools ineinander zu verzahnen, und ueber eine einzige, gemeinsame
|
||||
Konfigurationsdatei steuerbar zu machen.
|
||||
|
||||
Mit folgenden Schritten kommt man in den Genuss von isdnlog-2.99.2:
|
||||
|
||||
|
||||
1. Es sollten als Vorbedingung Linux-2.0.29 nebst isdn4kernel-2.0.29.5
|
||||
installiert werden. isdnlog-2.99.2 arbeitet zwar auch mit aelteren
|
||||
Versionen von isdn4linux zusammen, jedoch entgehen einem dadurch
|
||||
viele neue Features, und ausserdem wurde isdnlog-2.99.2 primaer
|
||||
in dieser Umgebung getestet - daher koennen Probleme mit
|
||||
frueheren Versionen nicht ausgeschlossen werden.
|
||||
|
||||
|
||||
2. Die isdn4k-utils auspacken:
|
||||
|
||||
$ cd /usr/src
|
||||
$ tar xzf isdn4k-utils.tar.gz
|
||||
|
||||
3. Die grundsaetzlichen Betriebsmodi einstellen:
|
||||
|
||||
$ cd isdn4k-utils
|
||||
$ make config
|
||||
|
||||
Es erscheint nun ein interaktives Konfigurationsmenue, in dem die
|
||||
gewuenschten Programme/Optionen angewaehlt werden koennen.
|
||||
|
||||
Besonderes Augenmerk sollte (neben dem Freischalten von isdnlog ;-)
|
||||
folgenden Einstellungen gelten:
|
||||
|
||||
#define I4LCONFDIR "/etc/isdn"
|
||||
|
||||
hier wird angegeben, in welchem Verzeichnis alle Configurations-
|
||||
Dateien untergebracht werden sollen. Wer alles wie frueher
|
||||
belassen will, traegt hier "/etc/isdnlog" ein.
|
||||
Die Developer von isdn4linux haben sich jedoch auf das
|
||||
zukuenftige Verzeichnis "/etc/isdn" geeinigt.
|
||||
|
||||
# export LIBAREA=1
|
||||
isdnlog soll mit dem neuen AVON-Verzeichnis von
|
||||
Ullrich von Bassewitz (uz@musoftware.com)
|
||||
arbeiten. Dies sollte _immer_ eingeschaltet werden.
|
||||
|
||||
# export POSTGRES=1
|
||||
isdnlog soll alle Verbindungsinformationen auch in
|
||||
eine SQL-Relation eintragen. Dies darf nur eingeschaltet werden,
|
||||
wenn postgres95 einsatzbereit installiert ist!
|
||||
|
||||
Zur Zeit sind die naechsten beiden Schalter ueberfluessig, da der
|
||||
xisdn voruebergehend aus der Distribution genommen wurde!!!!
|
||||
# export NEED_GDBM=1
|
||||
Falls man _nicht_ LIBAREA=1 eingeschaltet hat, und zudem
|
||||
keine Datei "/usr/lib/libdbm.a", dafuer aber "/usr/lib/libgdbm.a"
|
||||
besitzt, muss dieser Schalter aktiviert werden.
|
||||
|
||||
# export NEED_ICE=1
|
||||
Wer sich das X11-Frontend "xisdn" erstellen moechte, kann hiermit
|
||||
steuern, ob auch die Bibliotheken "libICE.so" sowie "libSM.so"
|
||||
hinzugelinkt werden muessen
|
||||
|
||||
# export OLD_I4L=1
|
||||
Wer nicht bereit ist, den aktuellen Stand von isdn4linux
|
||||
einzusetzen, kann hiermit die Unterstuetzung fuer isdn4linux
|
||||
_kleiner_ Rev: 1.31/1.24/1.33 freischalten.
|
||||
Dadurch wird u.a. CHARGEINT unmoeglich!
|
||||
|
||||
# export ISDN_NL=1
|
||||
Hiermit wird die gesamte Gebuehrenauswertung auf die Niederlande
|
||||
umgeschaltet. Dieser Schalter muss also in den Niederlanden
|
||||
eingeschaltet werden.
|
||||
|
||||
# export ISDN_CH=1
|
||||
Hiermit wird die gesamte Gebuehrenauswertung auf die Schweiz
|
||||
umgeschaltet. Dieser Schalter muss also in der Schweiz
|
||||
eingeschaltet werden.
|
||||
|
||||
|
||||
4. Nun kann alles kompiliert und installiert werden:
|
||||
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
Waehrend der Compiler arbeitet bietet sich die Wartezeit geradezu
|
||||
an, um ein wenig im README von isdnlog zu schmoeckern ;-)
|
||||
|
||||
ACHTUNG: Der Schritt "make install" terminiert einen evtuell gerade
|
||||
aktiven alten isdnlog! Um nicht zu viele Verbindungsinformationen
|
||||
zu verlieren, sollten daher die folgenden Schritte zuegig
|
||||
durchgefuehrt werden!
|
||||
|
||||
|
||||
5. Vorbereiten des ersten Start des neuen isdnlog:
|
||||
|
||||
Einige wenige Command-Line-Switches von isdnlog wurden erweitert:
|
||||
|
||||
- Das Argument von "-v" wurde erweitert
|
||||
- Bei "-m", "-l" sowie "-x" wurden marginale Aenderungen durchgefuehrt
|
||||
- Das Argument von "-h" wurde geaendert
|
||||
|
||||
Wer diese Schalter verwendet, sollte sich daher die entsprechende
|
||||
Beschreibung im "isdnlog/README" durchlesen, und seine
|
||||
Angaben entsprechend korrigieren.
|
||||
|
||||
Der neue isdnlog arbeitet mit einer vollstaendig anderen
|
||||
Konfigurationsdatei.
|
||||
Diese wird automatisch aus der bestehenden generiert.
|
||||
Es wird das alte Verzeichnis "etc/isdnlog" nach "etc/isdn" umkopiert.
|
||||
|
||||
isdnlog-2.99.2 versucht daher beim ersten Start, die alte
|
||||
Konfigurationsdatei "isdnlog.conf" in die neue Syntax umzuwandeln.
|
||||
Dieses passiert automatisch mit make install
|
||||
Es werden in dieser Version alle Telefonnummern in der Datei callerid.conf
|
||||
ausgelagert, so dass die isdn.conf sehr klein wird.
|
||||
|
||||
6. Erster Start des neuen isdnlog:
|
||||
|
||||
Nach diesen Vorbereitungen kann isdnlog-2.99.2 nun endlich gestartet
|
||||
werden.
|
||||
|
||||
Im folgenden unterstelle ich mal, das isdnlog folgendermassen
|
||||
aufgerufen wird (so betreibe ich isdnlog hier):
|
||||
|
||||
isdnlog -nsS -v13 -t2 -w1 -m0x17f7 -l7 -h5:3 -H5 -22 /dev/isdnctrl0
|
||||
|
||||
isdnlog sollte sich - je nach eingestelltem Ausgabekanal - auf
|
||||
der Konsole oder dem syslog in etwa folgendermassen melden:
|
||||
|
||||
isdnlog Version 2.99.2 loaded
|
||||
(ISDN subsystem with ISDN_MAX_CHANNELS > 16 detected - x active channels
|
||||
(Data versions: iprofd=0x04 net_cfg=0x02 /dev/isdninfo=0x01)
|
||||
|
||||
Nun sollte als erste Funktionspruefung z.b. der Hoerer des Telefons
|
||||
abgenommen, und wieder aufgelegt werden.
|
||||
Es sollte die Meldung
|
||||
|
||||
(HiSax driver detected)
|
||||
|
||||
auftauchen. Ist dies nicht der Fall, muss geprueft werden, ob mittels
|
||||
|
||||
$ telesctrl ID 1 4
|
||||
|
||||
das D-Kanal logging des Hisax-Treibers eingeschaltet wurde.
|
||||
|
||||
Kurz danach sollten die D-Kanal-Meldungen erscheinen:
|
||||
|
||||
22.Feb 12:26:53 * Calling ? with ? BEARER: Speech, CCITT standardized coding
|
||||
22.Feb 12:26:53 * Calling ? with ? 64 kbit/s, Circuit mode
|
||||
22.Feb 12:26:53 * Calling ? with ? G.711 A-law
|
||||
22.Feb 12:26:53 * Calling ? with Phone HLC: CCITT
|
||||
22.Feb 12:26:53 * Calling ? with Phone HLC: Telefonie
|
||||
22.Feb 12:26:53 * Calling ? with Phone CHANNEL: BRI, B1 gefordert
|
||||
22.Feb 12:26:53 * Calling ? with Phone PROGRESS: Location: Local:public net
|
||||
22.Feb 12:26:53 * Calling ? with Phone PROGRESS: Inband Information available
|
||||
22.Feb 12:26:56 Calling ? with Phone Normal call clearing
|
||||
22.Feb 12:26:56 Calling ? with Phone HANGUP
|
||||
|
||||
Die angezeigten Informationen koennen je nach Telefon, Telefonanlage
|
||||
sowie isdnlog-Konfigurationsdatei von obigem Beispiel abweichen,
|
||||
aber irgend etwas in dieser Art muss auftauchen - sonst stimmt
|
||||
etwas grundlegendes nicht!
|
||||
|
||||
Neben diesen direkten Meldungen muss isdnlog-2.99.2 sowohl einen
|
||||
Eintrag in der "/var/log/isdn.log" vorgenommen, als auch
|
||||
die Protokolldatei "/tmp/isdnctrl0" fortgeschrieben haben.
|
||||
|
||||
|
||||
7. Nachbearbeitung der neuen Konfigurationsdatei
|
||||
|
||||
Nachdem isdnlog-2.99.2 nun offensichtlich arbeitet, ist es an der Zeit,
|
||||
die gerade automatisch neu erstellte Konfigurationsdatei zu ueberarbeiten.
|
||||
|
||||
Die Syntax erschliesst sich einem eigentlich von alleine, eine naehere
|
||||
Beschreibung findet sich im "isdnlog/README"
|
||||
|
||||
Die Umwandlung von alte auf neue Syntax ist leider ausser Stande,
|
||||
die eingestreuten Kommentare (-> Zeilen mit "#") zu uebernehmen.
|
||||
Daher muessen diese von Hand uebernommen werden.
|
||||
|
||||
In der Section [GLOBAL]
|
||||
werden automatisch mit make install die beiden Eintraege
|
||||
COUNTRYCODE = +49
|
||||
AREACODE = xxxx
|
||||
eingefuegt, wenn vorher diese Daten im Menue eingegeben wurden.
|
||||
|
||||
Nachdem die neue Konfigurationsdatei fuer gut befunden wurde, sollte
|
||||
die alte Konfigurationsdatei "isdnlog.conf" geloescht werden, da
|
||||
isdnlog sonst staendig versuchen wuerde, die alte in die neue
|
||||
Syntax umzustellen (allerdings nur, wenn die alte Datei ein neueres
|
||||
Datum hat, als die neue)
|
||||
|
||||
Wer bis hier gekommen ist, kann ein lautes "puuuh, geschafft!"
|
||||
ausstossen! Nun ist es endlich an der Zeit,
|
||||
|
||||
|
||||
7.1 Es gibt nun zwei (oder sogar drei!?!) neue Konfigurationsdateien:
|
||||
/etc/isdn/isdn.conf
|
||||
/etc/isdn/callerid.conf
|
||||
~/.isdn
|
||||
Wobei sich in der "isdn.conf" nur noch die rein auf isdnlog beziehenden
|
||||
Eintraege befinden, und in der "callerid.conf" die von isdnlog und
|
||||
(bald!?!) vbox gemeinsam verwendeten Eintraege!
|
||||
|
||||
|
||||
8. Die neuen Features von isdnlog erkunden
|
||||
|
||||
- mit dem ersten neuen Feature, der neuen Konfigurationsdatei
|
||||
wurde man ja bereits ausgiebig konfrontiert.
|
||||
Dazu gibt es nun ein neues Programm "isdnconf" zur komfortablen
|
||||
Beauskunftung - siehe dazu "isdnlog/README"
|
||||
|
||||
- isdnlog arbeitet nun durchgaengig mit "full qualified" Telefonnummern,
|
||||
d.h. alle Telefonnummern werden _nur_noch_ in der Form
|
||||
|
||||
<Internationale Vorwahl> <Vorwahl> <Rufnummer>
|
||||
|
||||
behandelt. Zum Beispiel wuerde die Nummer "4711" in Frankfurt,
|
||||
Deutschland so "+49 69 4711" dargestellt werden.
|
||||
|
||||
- isdnlog arbeitet nun mit der neuen Library "areacode-1.01" von
|
||||
Ullrich von Bassewitz (uz@musoftware.com)
|
||||
|
||||
Eine ausfuehrliche Beschreibung dazu findet sich in
|
||||
"areacode/areacode.doc"
|
||||
|
||||
Diese Library ersetzt das alte "AVON" Verzeichnis der frueheren
|
||||
isdnlog-Versionen. Sie bietet folgende Vorteile:
|
||||
|
||||
- sehr aktuelle Ortsnetz-Daten
|
||||
- Daten fuer Deutschland, Schweiz, Oesterreich, Funknetze, 0180-
|
||||
0190- usw. enthalten
|
||||
- wesentlich schneller
|
||||
- eine einzige, UNIX-weit gemeinsame Bibliothek fuer Vorwahlen.
|
||||
Per heute unterstuetzen
|
||||
- isdnlog
|
||||
- vbox
|
||||
- ESTIC
|
||||
diese Library, weitere Applikationen werden sicherlich folgen!
|
||||
|
||||
Wer unbedingt auf seine AVON besteht, kann diese natuerlich
|
||||
weiterverwenden. Dieses muss dann allerdings im Menu angegeben werden.
|
||||
|
||||
- chargeint (auflegen kurz vor dem naechsten Gebuehrenimpuls) ist
|
||||
mittlerweile offizieller Bestandteil von isdn4linux, und damit
|
||||
aus dem "Patch" Stadium heraus. Die Steuerung durch isdnlog
|
||||
wurde verfeinert - siehe dazu den "-h" Schalter
|
||||
|
||||
- isdnlog-2.99.2 bietet 4 verschiedene Moeglichkeiten, die Kosten
|
||||
gegenueber der .T... sowie dem jeweiligen Internet-Provider
|
||||
zu begrenzen:
|
||||
|
||||
- Watchdog:
|
||||
isdnlog-2.99.2 erkennt Fehlverhalten von isdn4linux, und
|
||||
terminiert es rechtzeitig.
|
||||
(Neuer Schalter "-Hx" -> wenn seit mehr als "x"
|
||||
Gebuehreneinheiten kein Datentransfer mehr feststellbar ist,
|
||||
wird isdn4linux abgewuergt - wenn es sein muss, mit einem
|
||||
Reboot der ganzen Maschine)
|
||||
|
||||
- CHARGEMAX:
|
||||
Hiermit kann definiert werden, wieviel Geld (in DM) man
|
||||
maximal gewillt ist, pro Tag zu vertelefonieren.
|
||||
Wird diese Grenze ueberschritten, wird isdn4linux
|
||||
abgewuergt (neuer Eintrag CHARGEMAX in der "isdn.conf")
|
||||
|
||||
- CONNECTMAX:
|
||||
Hiermit kann definiert werden, welche maximale Verbindungszeit
|
||||
man pro Monat haben moechte (ich habe dort die Freistunden
|
||||
meines Provider's eingetragen)
|
||||
Wird diese Grenze ueberschritten, wird isdn4linux
|
||||
abgewuergt (neuer Eintrag CONNECTMAX in der "isdn.conf")
|
||||
|
||||
- BYTEMAX:
|
||||
Hiermit kann definiert werden, wieviel Byte man pro Monat
|
||||
maximal saugen will (fuer Provider, die ein maximales
|
||||
Kontingent in Byte definieren).
|
||||
Wird diese Grenze ueberschritten, wird isdn4linux
|
||||
abgewuergt (neuer Eintrag BYTEMAX in der "isdn.conf")
|
||||
|
||||
- isdnlog-2.99.2 besitzt eine Anbindung an die SQL-Datenbank postgres95.
|
||||
Wird diese freigeschaltet, traegt isdnlog-2.99.2 jede Verbindung nicht
|
||||
nur in die "/var/log/isdn.log", sondern auch in eine SQL-Relation ein.
|
||||
Beschreibung dazu siehe "isdnlog/README"
|
||||
|
||||
- isdnlog-2.99.2 unterstuetzt nun den neuen "City Weekend Tarif"
|
||||
Wer das bei der .T... beantragt hat, muss isdnlog mit der neuen
|
||||
Option "-F" starten
|
||||
|
||||
ACHTUNG: Im "City Weekend Tarif" sind die AOC-D / AOC-E Meldungen
|
||||
(Gebuehreninfos) der VSt *definitiv* falsch!
|
||||
(Siehe Kleingedrucktes auf dem Antrag ...)
|
||||
Daher sind die Aussagen von "isdnrep" hierzu natuerlich
|
||||
auch "falsch" !
|
||||
Die Steuerung des "CHARGEINT" von seiten isdnlog ist
|
||||
jedoch richtig!
|
||||
|
||||
- isdnlog kann nun (incl. "ChargeInt" Feature) in den Niederlanden
|
||||
eingesetzt werden, da Ad Aerts (ad@aasup.nl) isdnlog _vollstaendig_
|
||||
an die Niederlande angepasst hat.
|
||||
|
||||
- isdnlog-2.99.2 versteht eine Menge neuer D-Kanal-Frames, von denen einige
|
||||
in den vergangenen Monaten Bestandteil manchmal heftiger Diskussionen
|
||||
waren:
|
||||
|
||||
- COLP
|
||||
- CLIP
|
||||
- Rufumleitung
|
||||
|
||||
Wie mir leider erst in den letzten Tagen bekannt wurde, kann isdnlog-2.99.2
|
||||
mit dem neuen Feature "Rueckruf bei besetzt" noch _nicht_ umgehen.
|
||||
Hierzu werde ich einen Patch nachliefern, sofern mir die VSt Giessen
|
||||
dieses Feature *endlich* freischaltet!
|
||||
|
||||
Entgegen frueheren Versionen verbucht isdnlog-2.99.2 jedoch ihm unbekannte
|
||||
FACILITY-Frames nicht mehr mit teilweise astronomischen Gebuehren.
|
||||
|
||||
Daneben dekodiert isdnlog-2.99.2 nun vollstaendig die Elemente
|
||||
- Bearer capability
|
||||
- Channel identification
|
||||
- Progress indicator
|
||||
- Notification indicator
|
||||
- High layer compatibility
|
||||
aus, und kann die zahlreichen neuen Informationen bei Bedarf anzeigen.
|
||||
|
||||
- isdnlog-2.99.2 zeigt nun die exakte Dauer (in Sekunden) bis zum naechsten
|
||||
berechneten (also genauen - fuer chargeint verwendeten) Gebuehrenimpuls
|
||||
an:
|
||||
|
||||
Calling EUnet with HDLC I=883,1Kb 5,8Kb/s O= 40,5Kb 272,6 b/s H#7= 12s
|
||||
------------------------------------------------------------------^^^^^^^^
|
||||
|
||||
Bedeutet: Wir befinden uns gerade in dem 7. Gebuehrentakt, noch exakt
|
||||
12 Sekunden bis zum faellig werden der naechsten DM 0,12
|
||||
|
||||
- isdnlog-2.99.2 bietet nun den neuen Schalter "-Axxx" an. Hiermit
|
||||
kann angegeben werden, welche Ziffern oder Zahlen man an einer
|
||||
Telefonanlage vorwaehlen muss, um "ein Amt" zu bekommen.
|
||||
Dadurch wird isdnlog in die Lage versetzt, diese wieder
|
||||
herauszurechnen, womit die Falschmeldungen bzgl. den Vorwahlen
|
||||
vermieden werden koennen.
|
||||
|
||||
- Unterstuetzung einer zweiten, falsch angeschlossenen Teles-Karte
|
||||
Wie mittlerweile allgemein bekannt, konnte isdnlog bislang die
|
||||
Informationen von anderen Geraeten am S0-Bus (Telefon, Fax, Modem)
|
||||
nicht mitbekommen.
|
||||
|
||||
Dagegen wurde mittlerweile eine Loesung erarbeitet:
|
||||
Falls man sich eine zweite Teles-Karte entsprechend dem
|
||||
Schaltbild in "isdnlog/README" einbaut, und isdnlog mit
|
||||
dem neuen Schalter "-2x" startet, bekommt isdnlog nun
|
||||
alle D-Kanal-Frames mit, und kann daher auch alle Informationen
|
||||
lueckenlos anzeigen.
|
||||
Wird fuer "x" 2 eingesetzt, also "isdnlog -22", zeigt isdnlog
|
||||
sogar direkt jede Ziffer an, die man z.b. an einem Telefon
|
||||
eintippt.
|
||||
|
||||
Um Missverstaendnissen vorzubeugen:
|
||||
- diese zweite Karte kann *nicht* zur Kommunikation eingesetzt
|
||||
werden - sie spielt *nur* noch Monitor
|
||||
|
||||
- die "-2" Option bedeutet nicht, das isdnlog nun mit mehr
|
||||
als 2 B-Kanaelen umgehen kann! isdnlog arbeitet nach wie
|
||||
vor nur mit einem Basis-Anschluss (BRI) zusammen.
|
||||
Gleichwohl koennen nun mehrere isdnlog's parallel betrieben
|
||||
werden (pro Basis-Anschluss einer), da sich die einzelnen
|
||||
isdnlog's nun nicht mehr gegenseitig in's Gehege kommen.
|
||||
|
||||
- isdnlog-2.99.2 haelt die Log-Datei "/var/log/isdn.log" nun nicht
|
||||
mehr staendig offen. Daher kann diese nun zu einem beliebigen
|
||||
Zeitpunkt verschoben oder geloescht werden. Danach _muss_ diese
|
||||
Datei jedoch wieder leer angelegt werden
|
||||
(cp /dev/null /var/log/isdn.log) !
|
||||
|
||||
|
||||
So, nun wuensche ich allen viel Spass mit dem neuen isdnlog-2.99.2 - nicht
|
||||
ohne mich bei den Leuten zu bedanken, die viele freie Stunden in die
|
||||
Weiterentwicklung von isdnlog gesteckt haben:
|
||||
Stefan Luethje (luethje@sl-gw.lake.de)
|
||||
Karsten Keil (isdn4@temic-ech.spacenet.de)
|
||||
Fritz Elfert (fritz@wuemaus.franken.de)
|
||||
Ullrich von Bassewitz (uz@musoftware.com)
|
||||
Hardy Buchholz (hardy@Kool.f.EUnet.de)
|
||||
Ad Aerts (ad@aasup.nl)
|
||||
Markus Leist (markus@hal.dirnet.com)
|
||||
und ganz besonders bei Dr.-Ing. Joachim Goeller, der mich beim
|
||||
Verstehen des ISDN-D-Kanal's unzaehlige Male beraten hat!
|
||||
|
||||
Abschliessend nochmals die Bitte: Wer Probleme mit isdnlog-2.99.2
|
||||
hat, sollte zu allererst dieses HOWTO, das "isdnlog/README"
|
||||
sowie die einschlaegigen FAQ's zu isdn4linux studieren.
|
||||
|
||||
Nur wer so nicht weiterkommt, schreibe uns eine email an
|
||||
|
||||
isdnlog@Kool.f.EUnet.de
|
||||
|
||||
Diese sollte auf jeden Fall als Mindestausstattung:
|
||||
|
||||
- die "isdn.conf"
|
||||
- die Aufruf-Parameter von isdnlog
|
||||
- die Versionen von Linux, isdn4linux, HiSax-Treiber
|
||||
- einen Ausschnitt der "/tmp/isdnctrl0"
|
||||
|
||||
enthalten.
|
||||
|
||||
Bitte bedenkt, das wir auf dieser Mailing-Liste mittlerweile taeglich
|
||||
eine Unzahl von Anfragen erhalten, und auch unser Tag leider nur 24 Stunden
|
||||
hat!
|
||||
|
||||
|
||||
Andreas Kool (akool@Kool.f.EUnet.de)
|
231
Makefile
231
Makefile
|
@ -1,231 +0,0 @@
|
|||
# $Id$
|
||||
#
|
||||
# Toplevel Makefile for isdn4k-utils
|
||||
#
|
||||
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
|
||||
export I4LVERSION = 2.3
|
||||
|
||||
all: do-it-all
|
||||
|
||||
#
|
||||
# Make "config" the default target if there is no configuration file.
|
||||
#
|
||||
|
||||
# Following line is important for lib and isdnlog (sl).
|
||||
export ROOTDIR=$(shell pwd)
|
||||
|
||||
ifeq (.config,$(wildcard .config))
|
||||
include .config
|
||||
do-it-all: subtargets
|
||||
else
|
||||
CONFIGURATION = config
|
||||
do-it-all: config
|
||||
endif
|
||||
|
||||
SUBDIRS :=
|
||||
ifeq ($(CONFIG_LIB_AREACODE),y)
|
||||
SUBDIRS := $(SUBDIRS) areacode
|
||||
endif
|
||||
ifeq ($(CONFIG_ISDNLOG),y)
|
||||
SUBDIRS := $(SUBDIRS) areacode lib
|
||||
else
|
||||
ifeq ($(CONFIG_CTRL_CONF),y)
|
||||
SUBDIRS := $(SUBDIRS) areacode lib
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_ISDNCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) isdnctrl
|
||||
endif
|
||||
ifeq ($(CONFIG_IPROFD),y)
|
||||
SUBDIRS := $(SUBDIRS) iprofd
|
||||
endif
|
||||
ifeq ($(CONFIG_ICNCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) icn
|
||||
endif
|
||||
ifeq ($(CONFIG_PCBITCTL),y)
|
||||
SUBDIRS := $(SUBDIRS) pcbit
|
||||
endif
|
||||
ifeq ($(CONFIG_TELESCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) teles
|
||||
else
|
||||
ifeq ($(CONFIG_HISAXCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) teles
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RCAPID),y)
|
||||
SUBDIRS := $(SUBDIRS) capi20
|
||||
else
|
||||
ifeq ($(CONFIG_AVMCAPICTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) capi20
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AVMCAPICTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) avmb1
|
||||
endif
|
||||
ifeq ($(CONFIG_ACTCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) act2000
|
||||
endif
|
||||
ifeq ($(CONFIG_LOOPCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) loop
|
||||
endif
|
||||
ifeq ($(CONFIG_DIEHLCTRL),y)
|
||||
SUBDIRS := $(SUBDIRS) diehl
|
||||
endif
|
||||
ifeq ($(CONFIG_IMON),y)
|
||||
SUBDIRS := $(SUBDIRS) imon
|
||||
endif
|
||||
ifeq ($(CONFIG_IMONTTY),y)
|
||||
SUBDIRS := $(SUBDIRS) imontty
|
||||
endif
|
||||
ifeq ($(CONFIG_ISDNLOG),y)
|
||||
SUBDIRS := $(SUBDIRS) isdnlog
|
||||
endif
|
||||
ifeq ($(CONFIG_IPPPSTATS),y)
|
||||
SUBDIRS := $(SUBDIRS) ipppstats
|
||||
endif
|
||||
ifeq ($(CONFIG_XMONISDN),y)
|
||||
SUBDIRS := $(SUBDIRS) xmonisdn
|
||||
endif
|
||||
ifeq ($(CONFIG_XISDNLOAD),y)
|
||||
SUBDIRS := $(SUBDIRS) xisdnload
|
||||
endif
|
||||
ifeq ($(CONFIG_IPPPD),y)
|
||||
SUBDIRS := $(SUBDIRS) ipppd
|
||||
endif
|
||||
ifeq ($(CONFIG_VBOX),y)
|
||||
SUBDIRS := $(SUBDIRS) vbox
|
||||
endif
|
||||
ifeq ($(CONFIG_RCAPID),y)
|
||||
SUBDIRS := $(SUBDIRS) rcapid
|
||||
endif
|
||||
ifeq ($(CONFIG_CAPIFAX),y)
|
||||
SUBDIRS := $(SUBDIRS) capifax
|
||||
endif
|
||||
ifeq ($(CONFIG_GENMAN),y)
|
||||
SUBDIRS := $(SUBDIRS) doc
|
||||
endif
|
||||
ifeq ($(CONFIG_FAQ),y)
|
||||
SUBDIRS := $(SUBDIRS) FAQ
|
||||
endif
|
||||
ifneq ($(SUBDIRS),)
|
||||
ifeq ($(filter lib,$(SUBDIRS)),)
|
||||
SUBDIRS := lib $(SUBDIRS)
|
||||
endif
|
||||
endif
|
||||
|
||||
subtargets: $(CONFIGURATION)
|
||||
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i all; done
|
||||
|
||||
rootperm:
|
||||
@echo 'main(int argc,char**argv){unlink(argv[0]);return(getuid()==0);}'>g
|
||||
@if gcc -x c -o G g && rm -f g && ./G ; then \
|
||||
echo -e "\n\n Need root permission for (de)installation!\n\n"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
install: rootperm
|
||||
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i install; done
|
||||
@if [ -c /dev/isdnctrl0 ] && ls -l /dev/isdnctrl0 | egrep "[[:space:]]45,[[:space:]]+64[[:space:]]" > /dev/null; \
|
||||
then \
|
||||
echo -e '(some) ISDN devices already exist, not creating them.\nUse scripts/makedev.sh manually if necessary.'; \
|
||||
else \
|
||||
sh scripts/makedev.sh; \
|
||||
fi
|
||||
|
||||
uninstall: rootperm
|
||||
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i uninstall; done
|
||||
|
||||
#
|
||||
# targets clean and distclean go through ALL directories
|
||||
# regardless of configured options.
|
||||
#
|
||||
clean:
|
||||
-set -e; \
|
||||
for i in `echo ${wildcard */GNUmakefile}`; do \
|
||||
$(MAKE) -i -C `dirname $$i` clean; \
|
||||
done;
|
||||
-set -e; \
|
||||
for i in `echo ${wildcard */Makefile}`; do \
|
||||
$(MAKE) -i -C `dirname $$i` clean; \
|
||||
done;
|
||||
-rm -f *~ *.o
|
||||
|
||||
distclean: clean
|
||||
-$(MAKE) -C scripts/lxdialog clean
|
||||
-set -e; \
|
||||
for i in `echo ${wildcard */GNUmakefile}`; do \
|
||||
$(MAKE) -i -C `dirname $$i` distclean; \
|
||||
done;
|
||||
-set -e; \
|
||||
for i in `echo ${wildcard */Makefile}`; do \
|
||||
if [ -f $$i ] ; then \
|
||||
$(MAKE) -i -C `dirname $$i` distclean; \
|
||||
fi ; \
|
||||
done;
|
||||
-rm -f *~ .config .config.old scripts/autoconf.h .menuconfig \
|
||||
Makefile.tmp .menuconfig.log scripts/defconfig.old .#* scripts/.#*
|
||||
|
||||
scripts/lxdialog/lxdialog:
|
||||
@$(MAKE) -C scripts/lxdialog all
|
||||
|
||||
scripts/autoconf.h: .config
|
||||
perl scripts/mk_autoconf.pl
|
||||
|
||||
# Next target makes three attempts to configure:
|
||||
# - if a configure script exists, execute it
|
||||
# - if a Makefile.in exists, make -f Makefile.in config
|
||||
# - if a Makefile already exists, make config
|
||||
#
|
||||
subconfig: scripts/autoconf.h
|
||||
@echo Selected subdirs: $(SUBDIRS)
|
||||
@set -e; for i in `echo $(SUBDIRS)`; do \
|
||||
if [ -x $$i/configure ] ; then \
|
||||
echo -e "\nRunning configure in $$i ...\n"; sleep 1; \
|
||||
(cd $$i; ./configure); \
|
||||
elif [ -f $$i/Makefile.in ] ; then \
|
||||
echo -e "\nRunning make -f Makefile.in config in $$i ...\n"; sleep 1; \
|
||||
$(MAKE) -C $$i -f Makefile.in config; \
|
||||
elif [ -f $$i/Makefile ] ; then \
|
||||
echo -e "\nRunning make config in $$i ...\n"; sleep 1; \
|
||||
$(MAKE) -C $$i config; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
#
|
||||
# Next target uses a second tempory Makefile
|
||||
# because new .config has to be re-included.
|
||||
#
|
||||
menuconfig: scripts/lxdialog/lxdialog
|
||||
@scripts/Menuconfig scripts/config.in
|
||||
@cp Makefile Makefile.tmp
|
||||
$(MAKE) -f Makefile.tmp subconfig
|
||||
@rm -f Makefile.tmp
|
||||
|
||||
#
|
||||
# For testing: runs Menuconfig only
|
||||
#
|
||||
testconfig: scripts/lxdialog/lxdialog
|
||||
@scripts/Menuconfig scripts/config.in
|
||||
|
||||
config: menuconfig
|
||||
|
||||
mrproper: distclean
|
||||
|
||||
archive: distclean
|
||||
@(cd .. ;\
|
||||
ln -nfs isdn4k-utils isdn4k-utils-$(I4LVERSION) ;\
|
||||
tar cvhzf distisdn/isdn4k-utils-$(I4LVERSION).tar.gz isdn4k-utils-$(I4LVERSION) ;\
|
||||
rm isdn4k-utils-$(I4LVERSION) )
|
||||
|
||||
distarch: distclean
|
||||
(cd .. ;\
|
||||
ln -nfs isdn4k-utils isdn4k-utils-$(I4LVERSION) ;\
|
||||
tar -cvhz --exclude=CVS -f distisdn/isdn4k-utils-$(I4LVERSION).tar.gz \
|
||||
isdn4k-utils-$(I4LVERSION) ;\
|
||||
rm isdn4k-utils-$(I4LVERSION) )
|
||||
|
||||
dist: distarch
|
123
README
123
README
|
@ -1,123 +0,0 @@
|
|||
#
|
||||
# $Id$
|
||||
#
|
||||
This is the README file for the "isdn4k-utils" package from "The i4l-crew".
|
||||
|
||||
This package contains the following stuff:
|
||||
|
||||
1. Runtime configuration tools:
|
||||
isdnctrl, general link-level setup utility.
|
||||
iprofd, daemon for realizing AT&W0 on ttyI's.
|
||||
icnctrl, setup utility for the icn driver.
|
||||
telesctrl, setup utility for the teles driver.
|
||||
hisaxctrl, setup utility for the HiSax driver.
|
||||
pcbitctl, setup utility for the pcbit driver.
|
||||
avmcapictrl setup utility for the avmb1 driver.
|
||||
actctrl setup utility for the act2000 driver.
|
||||
|
||||
2. Tools for monitoring activity:
|
||||
imon, a ncurses based utility for monitoring ISDN-activities.
|
||||
imontty, a tty based utility for monitoring ISDN-activities.
|
||||
isdnlog, a set of utilities for connection logging.
|
||||
ipppstats a utility for showing syncPPP statistics.
|
||||
xisdnload, an xload-like meter.
|
||||
xmonisdn, a utility for monitoring and controlling ISDN-activity.
|
||||
isdnmon, a Tcl/Tk based utility for monitoring ISDN-activities.
|
||||
|
||||
3. Applications:
|
||||
vbox, an answering machine/voice mailbox.
|
||||
ipppd, daemon need for syncPPP and MPP.
|
||||
|
||||
4. Miscellaneous:
|
||||
scripts/makedev.sh for creating the ISDN device files under /dev .
|
||||
|
||||
5. Documentation:
|
||||
A very detailed FAQ and the generic manpages ttyI.4, isdninfo.4,
|
||||
isdn_audio.4 and isdn_cause.7.
|
||||
Manpages for the above utilities:
|
||||
actctrl.8 avmcapictrl.8, hisaxctrl.8 icnctrl.8, imon.8, ipppd.8,
|
||||
ipppstats.8, iprofd.8, isdnctrl.8, isdnlog.8, isdnrep.1, telesctrl.8,
|
||||
xisdnload.1x and xmonisdn.1x
|
||||
|
||||
COPYRIGHT/COPYING:
|
||||
|
||||
Until explicitely stated, all programs in this package can be freely
|
||||
redistributed and/or modified 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 package 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. (File: COPYING)
|
||||
|
||||
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.
|
||||
|
||||
|
||||
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.31 or
|
||||
> 2.1.57 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 an interactive configuration tool and the various
|
||||
configuration-scripts for each sub-package. (You may know that
|
||||
tool from kernel menuconfig.)
|
||||
There is a global configuration directory, where most programs
|
||||
expect their configuration files. The default is /etc/isdn.
|
||||
|
||||
- Alternatively you can edit the .config file by hand (once that
|
||||
has been created once with "make config"), and run "make subconfig"
|
||||
instead. This might be useful if you want to automate the building
|
||||
of the package, e.g. for a Red Hat rpm or a Debian deb.
|
||||
|
||||
Run "make"
|
||||
|
||||
This builds all previously selected utilities.
|
||||
|
||||
4. Installation
|
||||
|
||||
For the following steps, root permissions are necessary
|
||||
|
||||
Install the utilities, the man pages and config-files:
|
||||
|
||||
make install
|
||||
|
||||
The config files usually are installed in /etc/isdn if not
|
||||
specified otherwise during configuration.
|
||||
|
||||
If no existing ISDN devices in /dev are detected (via an admittedly
|
||||
simple test), script/makedev.sh is run during "make install". Check
|
||||
that the permissions / groups are suitable for your needs.
|
||||
You can run the makedev.sh script again if necessary.
|
||||
|
||||
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 modularised version of the ISDN-subsystem. Refer to the
|
||||
Documentation/isdn subdirectory of your kernel-source-tree for
|
||||
more information on configuring Lowlevel drivers.
|
||||
|
||||
For the utilities refer to the man pages or look into their
|
||||
subdirectories for Documentation.
|
||||
|
||||
For tips, troubleshooting etc. look into the FAQ subdirectory.
|
||||
|
||||
-Fritz
|
|
@ -1,69 +0,0 @@
|
|||
# $Id$
|
||||
#
|
||||
# Makefile for actctrl
|
||||
# (C) 1997 Fritz Elfert
|
||||
#
|
||||
#
|
||||
SHELL = /bin/sh
|
||||
CFLAGS = -Wall -O2
|
||||
INCLUDES = -I. -I@CONFIG_KERNELDIR@/include -I@CONFIG_KERNELDIR@/drivers/isdn/act2000
|
||||
DEFS =
|
||||
LDFLAGS = -L../lib @LIBS@
|
||||
PROGRAM = actctrl
|
||||
MODULES = actctrl.o
|
||||
MANPAGE = actctrl.8
|
||||
FIRMWARE = bip1120.btl
|
||||
DATADIR = @CONFIG_DATADIR@
|
||||
SBINDIR = @CONFIG_SBINDIR@
|
||||
MANDIR = @CONFIG_MANDIR@
|
||||
MAN8DIR = $(MANDIR)/man8
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
|
||||
INSTALL_DATA = $(INSTALL) -o 0 -g 0 -m 0644
|
||||
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
CC = @CC@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
%.o: %.c Makefile
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(DEFS) -c -o $@ $<
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
config:
|
||||
@./configure
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
config.status: configure
|
||||
./config.status --recheck
|
||||
|
||||
$(PROGRAM): $(MODULES)
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(DEFS) $? $(LDFLAGS) -o $@
|
||||
|
||||
install-man: $(PROGRAM).man
|
||||
mkdir -p $(DESTDIR)$(MAN8DIR)
|
||||
$(INSTALL_MAN) $< $(DESTDIR)$(MAN8DIR)/$(MANPAGE)
|
||||
|
||||
install-data: firmware/$(FIRMWARE)
|
||||
mkdir -p $(DESTDIR)$(DATADIR)
|
||||
$(INSTALL_DATA) $< $(DESTDIR)$(DATADIR)/$(FIRMWARE)
|
||||
|
||||
install: $(PROGRAM) install-man install-data
|
||||
$(INSTALL_PROGRAM) $(PROGRAM) $(DESTDIR)$(SBINDIR)/$(PROGRAM)
|
||||
|
||||
install-strip: $(PROGRAM)
|
||||
$(INSTALL_PROGRAM) -s $(PROGRAM) $(DESTDIR)$(SBINDIR)/$(PROGRAM)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(SBINDIR)/$(PROGRAM) $(DESTDIR)$(MAN8DIR)/$(MANPAGE) $(DESTDIR)$(DATADIR)/$(FIRMWARE)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ $(PROGRAM)
|
||||
|
||||
distclean: clean
|
||||
rm -f config.status config.cache config.log Makefile actctrl.man
|
|
@ -1 +0,0 @@
|
|||
sinclude(../etc/ackernel.m4)dnl
|
|
@ -1,280 +0,0 @@
|
|||
/* $Id$
|
||||
|
||||
* IBM Active 2000 ISDN driver for Linux. (Control-Utility)
|
||||
*
|
||||
* Copyright 1994,95 by Fritz Elfert (fritz@wuemaus.franken.de)
|
||||
*
|
||||
* 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$
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/isdn.h>
|
||||
#include "act2000.h"
|
||||
|
||||
char *cmd;
|
||||
char *ctrldev;
|
||||
int arg_ofs;
|
||||
|
||||
void
|
||||
usage()
|
||||
{
|
||||
#if 0
|
||||
fprintf(stderr, "usage: %s [-d driverId] io [port] [irq] (get/set hw-io)\n", cmd);
|
||||
#endif
|
||||
fprintf(stderr, " or: %s [-d driverId] add [bus [port [irq [id]]]] (Add a new card\n", cmd);
|
||||
fprintf(stderr, " or: %s [-d driverId] load <bootcode> (load firmware)\n", cmd);
|
||||
fprintf(stderr, " or: %s [-d driverId] dproto <1tr6|euro> [msn's] (set D-channel protocol)\n", cmd);
|
||||
#if 0
|
||||
fprintf(stderr, " or: %s [-d driverId] dbg <num> (devel Func)\n", cmd);
|
||||
#endif
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
FILE *code;
|
||||
int ac;
|
||||
int a;
|
||||
u_char buf[500000];
|
||||
isdn_ioctl_struct ioctl_s;
|
||||
act2000_ddef dload;
|
||||
act2000_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("/dev/isdnctrl");
|
||||
exit(-1);
|
||||
}
|
||||
if (!strcmp(argv[arg_ofs], "add")) {
|
||||
if (ac < 3)
|
||||
usage();
|
||||
if (ac >= 3) {
|
||||
a = -1;
|
||||
if (!strcmp(argv[arg_ofs + 1], "isa"))
|
||||
a = ACT2000_BUS_ISA;
|
||||
if (!strcmp(argv[arg_ofs + 1], "mca"))
|
||||
a = ACT2000_BUS_MCA;
|
||||
if (!strcmp(argv[arg_ofs + 1], "pcmcia"))
|
||||
a = ACT2000_BUS_PCMCIA;
|
||||
if (a == -1) {
|
||||
fprintf(stderr, "Bus must be \"isa\", \"mca\" or \"pcmcia\"\n");
|
||||
exit(-1);
|
||||
}
|
||||
if (a != ACT2000_BUS_ISA) {
|
||||
fprintf(stderr, "Currently only isa Bus is supported\n");
|
||||
exit(-1);
|
||||
}
|
||||
newcard.bus = a;
|
||||
}
|
||||
a = -2;
|
||||
if (ac >= 4) {
|
||||
if (!strcmp(argv[arg_ofs + 2], "auto"))
|
||||
a = -1;
|
||||
else
|
||||
sscanf(argv[arg_ofs + 2], "%i", &a);
|
||||
if (a == 0x200 || a == 0x240 || a == 0x280 || a == 0x2c0
|
||||
|| a == 0x300 || a == 0x340 || a == 0x380 ||
|
||||
a == 0xcfe0 || a == 0xcfa0 || a == 0xcf60 || a == 0xcf20
|
||||
|| a == 0xcee0 || a == 0xcea0 || a == 0xce60 || a == -1)
|
||||
newcard.port = a;
|
||||
else {
|
||||
fprintf(stderr, "Invalid port. Possible values are:\n");
|
||||
fprintf(stderr, " 0x200, 0x240, 0x280, 0x2c0, 0x300, 0x340\n");
|
||||
fprintf(stderr, " 0x380, 0xcfe0, 0xcfa0, 0xcf60, 0xcf20\n");
|
||||
fprintf(stderr, " 0xcee0, 0xcea0, 0xce60 or \"auto\"\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
newcard.irq = -1;
|
||||
if (ac >= 5) {
|
||||
a = -2;
|
||||
if (!strcmp(argv[arg_ofs + 3], "auto"))
|
||||
a = -1;
|
||||
if (!strcmp(argv[arg_ofs + 3], "none"))
|
||||
a = 0;
|
||||
if (a == -2)
|
||||
sscanf(argv[arg_ofs + 2], "%i", &a);
|
||||
if (a == 3 || a == 5 || a == 7 || a == 10 || a == 11 || a == 12
|
||||
|| a == 15 || a == -1 || a == 0)
|
||||
newcard.irq = a;
|
||||
else {
|
||||
fprintf(stderr, "Invalid IRQ. Possible values are:\n");
|
||||
fprintf(stderr, " 3, 5, 7, 10, 11, 12, 15, \"auto\" or \"none\"\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
ioctl_s.arg = (unsigned long) &newcard;
|
||||
newcard.id[0] = 0;
|
||||
if (ac >= 6)
|
||||
strncpy(newcard.id, argv[arg_ofs + 4], sizeof(newcard.id) - 1);
|
||||
if ((ioctl(fd, ACT2000_IOCTL_ADDCARD + IIOCDRVCTL, &ioctl_s)) < 0) {
|
||||
perror("ioctl ADDCARD");
|
||||
exit(-1);
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
#if 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;
|
||||
}
|
||||
#endif
|
||||
if (!strcmp(argv[arg_ofs], "load")) {
|
||||
if (ac == 3) {
|
||||
if (!(code = fopen(argv[arg_ofs + 1], "r"))) {
|
||||
perror(argv[arg_ofs + 1]);
|
||||
exit(-1);
|
||||
}
|
||||
dload.buffer = buf;
|
||||
if ((dload.length = fread(buf, 1, sizeof(buf), code)) < 1) {
|
||||
fprintf(stderr, "Read error on %s\n", argv[arg_ofs + 1]);
|
||||
exit(-1);
|
||||
}
|
||||
dload.length -= 32;
|
||||
dload.buffer += 32;
|
||||
printf("Loading Firmware %s ... ", argv[arg_ofs + 1]);
|
||||
fflush(stdout);
|
||||
ioctl_s.arg = (ulong) & dload;
|
||||
if (ioctl(fd, ACT2000_IOCTL_LOADBOOT + IIOCDRVCTL, &ioctl_s) < 0) {
|
||||
perror("\nioctl LOADBOOT");
|
||||
exit(-1);
|
||||
}
|
||||
fclose(code);
|
||||
printf("done\n");
|
||||
return 0;
|
||||
}
|
||||
usage();
|
||||
}
|
||||
if (!strcmp(argv[arg_ofs], "dproto")) {
|
||||
if (ac >= 3) {
|
||||
char msnlist[1024];
|
||||
|
||||
int proto = -1;
|
||||
if (strcmp(argv[arg_ofs + 1], "1tr6") == 0)
|
||||
proto = 0;
|
||||
if (strcmp(argv[arg_ofs + 1], "euro") == 0)
|
||||
proto = 1;
|
||||
if (proto == -1)
|
||||
usage();
|
||||
msnlist[0] = '\0';
|
||||
if (ac > 3) {
|
||||
if (proto == 0)
|
||||
usage();
|
||||
strcpy(msnlist, argv[arg_ofs + 2]);
|
||||
}
|
||||
ioctl_s.arg = (ulong)proto;
|
||||
if (ioctl(fd, ACT2000_IOCTL_SETPROTO + IIOCDRVCTL, &ioctl_s) < 0) {
|
||||
perror("ioctl SETPROTO");
|
||||
exit(-1);
|
||||
}
|
||||
if (strlen(msnlist)) {
|
||||
char *p = msnlist;
|
||||
char m[17];
|
||||
int i = 0;
|
||||
char *q;
|
||||
|
||||
while ((q = strtok(p, ",")) && (i<10)) {
|
||||
p = NULL;
|
||||
if (strlen(q) > 15) {
|
||||
fprintf(stderr, "MSN may not exceed 15 digits\n");
|
||||
exit(-1);
|
||||
}
|
||||
if (q[0] == '-')
|
||||
sprintf(m, "%d", i);
|
||||
else
|
||||
sprintf(m, "%d%s", i, q);
|
||||
ioctl_s.arg = (ulong)&m;
|
||||
if (ioctl(fd, ACT2000_IOCTL_SETMSN + IIOCDRVCTL, &ioctl_s) < 0) {
|
||||
perror("ioctl SETMSN");
|
||||
exit(-1);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
usage();
|
||||
}
|
||||
if (!strcmp(argv[arg_ofs], "dbg")) {
|
||||
if (ac == 3) {
|
||||
int res;
|
||||
unsigned long parm;
|
||||
res = sscanf(argv[arg_ofs + 1], "%li", &parm);
|
||||
if (res != 1) {
|
||||
fprintf(stderr, "Couldn't read parameter\n");
|
||||
exit(-1);
|
||||
}
|
||||
ioctl_s.arg = parm;
|
||||
if (ioctl(fd, ACT2000_IOCTL_TEST + IIOCDRVCTL, &ioctl_s) < 0) {
|
||||
perror("ioctl TEST");
|
||||
exit(-1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
usage();
|
||||
}
|
||||
usage();
|
||||
return 0;
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
.\" $Id$
|
||||
.\"
|
||||
.\" CHECKIN $Date$
|
||||
.\"
|
||||
.\" Process this file with
|
||||
.\" groff -man -Tascii actctrl.1 for ASCII output, or
|
||||
.\" groff -man -Tps actctrl.1 for PostScript output
|
||||
.\"
|
||||
.TH ACTCTRL 8 "@MANDATE@" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
|
||||
.SH NAME
|
||||
actctrl \- configure IBM Active 2000 ISDN adaptor
|
||||
.SH SYNOPSIS
|
||||
.B actctrl [-d
|
||||
.IB Driver-Id ]
|
||||
.I action options
|
||||
.B ...
|
||||
.SH DESCRIPTION
|
||||
.B actctrl
|
||||
is used to setup the IBM Active 2000
|
||||
.SM ISDN
|
||||
device driver and for downloading the firmware into the
|
||||
.SM ISDN
|
||||
card.
|
||||
.LP
|
||||
The use of
|
||||
.I actctrl
|
||||
makes sense, if you are using an IBM Active 2000 card only.
|
||||
.LP
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BI "-d " Driver-Id
|
||||
selects the S0 interface named by
|
||||
.IR Driver-Id .
|
||||
Driver-Ids are defined during driver initialisation. See
|
||||
.BR act2000 (4)
|
||||
for a description of the syntax to be used for modularized and
|
||||
monolithic driver versions.
|
||||
This option
|
||||
.B must
|
||||
be used to identify the S0 interface if more than one S0 interface is
|
||||
existent. If a single IBM Active 2000 is used, it may be omitted.
|
||||
If using more than one card, support for the other cards is enabled
|
||||
with the
|
||||
.B add
|
||||
action of actctrl. Ids may
|
||||
.B not
|
||||
start with
|
||||
.B digits
|
||||
or small
|
||||
.BR x ,
|
||||
because these values are misinterpreted
|
||||
as numeric parameters by
|
||||
.BR insmod .
|
||||
For loading the module, always the
|
||||
newest
|
||||
.B modutils
|
||||
package should be used to avoid problems during load.
|
||||
.LP
|
||||
The following
|
||||
.I actions
|
||||
may be given to
|
||||
.BR actctrl .
|
||||
.TP
|
||||
.BI "add [" bus "[ " port "[ " irq "[ " id ]]]]
|
||||
enables support for an additional card in the driver.
|
||||
.I bus
|
||||
is is an integer describing the bus-type of the card. Currently,
|
||||
the only value which is allowed here is
|
||||
.B 1
|
||||
meaning ISA-bus. In the future, the values
|
||||
.B 2
|
||||
(for MCA) and
|
||||
.B 3
|
||||
(for PCMCIA) will be available.
|
||||
.I port
|
||||
is either an integer describing the base port, or the string
|
||||
.B auto
|
||||
which enables autoprobing.
|
||||
.I irq
|
||||
is either an integer describing the IRQ to use, the string
|
||||
.BR auto ,
|
||||
which enables grabbing of the next free IRQ or the string
|
||||
.B none
|
||||
which enables polled mode for this card.
|
||||
.I id
|
||||
is an arbitrary string for referencing the card at a later time.
|
||||
.TP
|
||||
.BI "dproto " protocol " [" msn0 , msn1 ", ... " msn9 ]
|
||||
selects the D-channel protocol and defines MSN's if using Euro protocol.
|
||||
.I protocol
|
||||
may be either the string
|
||||
.B 1tr6
|
||||
or the string
|
||||
.BR euro .
|
||||
If selecting Euro protocol, a comma-separated list of up to 10 MSN's
|
||||
may be appended. For defining an empty entry in this list, use a dash.
|
||||
.TP
|
||||
.BI "load " firmware
|
||||
downloads the firmware into the card and starts operation.
|
||||
Usually the images are located in
|
||||
.IR @CONFIG_DATADIR@ .
|
||||
The firmware is named
|
||||
.IR bip1120.bpl .
|
||||
.TP
|
||||
.B dump
|
||||
is available if the program is configured using the
|
||||
.B --enable-dump
|
||||
option only. The contents of internal driver variables is dumped on stdout.
|
||||
.SH FILES
|
||||
.TP
|
||||
.I @CONFIG_DATADIR@/bip1120.bpl
|
||||
This is the image of the firmware designed for both the German 1TR6 protocol
|
||||
and Euro ISDN.
|
||||
.LP
|
||||
.SH BUGS
|
||||
No bugs so far.
|
||||
.SH AUTHOR
|
||||
\(co 1997 by Fritz Elfert <fritz@wuemaus.franken.de>
|
||||
.LP
|
||||
.SH SEE ALSO
|
||||
.BR isdnctrl "(8), " act2000 "(4), " isdnctrl "(4), " ttyI (4).
|
File diff suppressed because it is too large
Load Diff
|
@ -1,63 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(actctrl.c)
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
|
||||
I4LVERSION=${I4LVERSION:-"?.?"}
|
||||
CONFIG_DATADIR=${CONFIG_DATADIR:-"/usr/lib/isdn"}
|
||||
CONFIG_MANDIR=`eval echo ${CONFIG_MANDIR:-"/usr/man"}`
|
||||
CONFIG_SBINDIR=`eval echo ${CONFIG_SBINDIR:-"/sbin"}`
|
||||
CONFIG_KERNELDIR=`eval echo ${CONFIG_KERNELDIR:-"/usr/src/linux"}`
|
||||
MANDATE=`grep CHECKIN actctrl.man.in | awk '{print $4}'`
|
||||
|
||||
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
|
||||
AC_FIND_KERNEL
|
||||
AC_CHECK_HEADERS($CONFIG_KERNELDIR/drivers/isdn/act2000/act2000.h,,
|
||||
AC_MSG_ERROR("Not found. You MUST specify a correct path to linux source!")
|
||||
)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MMAP
|
||||
|
||||
dnl Optional firmware directory
|
||||
AC_ARG_WITH(firmware,
|
||||
[ --with-firmware=DIR Set dir where firmware istalled. [/usr/lib/isdn]],
|
||||
CONFIG_DATADIR="${withval}"
|
||||
AC_DEFINE(CONFIG_DATADIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Optional sbin directory
|
||||
AC_ARG_WITH(sbin,
|
||||
[ --with-sbin=DIR Set dir where binary is istalled. [/sbin]],
|
||||
CONFIG_SBINDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_SBINDIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Optional man directory
|
||||
AC_ARG_WITH(man,
|
||||
[ --with-man=DIR Set manpage dir. [/usr/man]],
|
||||
CONFIG_MANDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_MANDIR,"${withval}"),
|
||||
)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(CONFIG_DATADIR)
|
||||
AC_SUBST(CONFIG_SBINDIR)
|
||||
AC_SUBST(CONFIG_MANDIR)
|
||||
AC_SUBST(I4LCONFDIR)
|
||||
AC_SUBST(I4LVERSION)
|
||||
AC_OUTPUT(Makefile actctrl.man)
|
Binary file not shown.
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exit 0
|
|
@ -1,45 +0,0 @@
|
|||
#
|
||||
# This Makefile is used for compatibility to the
|
||||
# isdn4k-utils package. In order to superseede
|
||||
# the original Makefile, it is called GNUmakefile.
|
||||
#
|
||||
|
||||
ifeq (../.config,$(wildcard ../.config))
|
||||
include ../.config
|
||||
DATAOPTS := DATATARGET=$(shell echo $(CONFIG_DATADIR))/areacodes
|
||||
#
|
||||
# Install as root with numeric Id's, since these are the
|
||||
# only ones that _really_ exist on _every_ system.
|
||||
#
|
||||
BUILDOPTS := $(DATAOPTS)
|
||||
INSTALLOPTS := $(DATAOPTS) INSTALL="install -o 0 -g 0 -m 644"
|
||||
endif
|
||||
|
||||
all: .depend
|
||||
$(MAKE) -f make/linux.mak $(BUILDOPTS) all
|
||||
|
||||
depend dep: .depend
|
||||
|
||||
.depend:
|
||||
$(MAKE) -f make/linux.mak $(BUILDOPTS) depend
|
||||
|
||||
config:
|
||||
@cp Makefile.in GNUmakefile
|
||||
|
||||
clean:
|
||||
$(MAKE) -f make/linux.mak clean
|
||||
|
||||
distclean:
|
||||
$(MAKE) -f make/linux.mak distclean
|
||||
rm -f GNUmakefile
|
||||
|
||||
install-man:
|
||||
|
||||
install: all
|
||||
ifeq ($(CONFIG_LIB_AREACODE),y)
|
||||
mkdir -p $(DESTDIR)$(CONFIG_DATADIR)
|
||||
$(MAKE) -f make/linux.mak $(INSTALLOPTS) install
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
rm -f $(shell echo $(DESTDIR)$(CONFIG_DATADIR))/areacodes
|
|
@ -1,100 +0,0 @@
|
|||
/*****************************************************************************/
|
||||
/* */
|
||||
/* ACTEST.C */
|
||||
/* */
|
||||
/* Test an areacode data file */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1996,97 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.com */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any express or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
/* claim that you wrote the original software. If you use this software */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "areacode.h"
|
||||
|
||||
|
||||
|
||||
int main (int argc, char* argv [])
|
||||
{
|
||||
acInfo AC;
|
||||
char Buf [256];
|
||||
unsigned RC;
|
||||
acMaxMem = 0;
|
||||
|
||||
/* See if there is an argument given. If so, use it as name and path of
|
||||
* the database.
|
||||
*/
|
||||
if (argc >= 2) {
|
||||
acFileName = argv [1];
|
||||
}
|
||||
|
||||
/* Test loop */
|
||||
while (1) {
|
||||
|
||||
printf ("Enter phone number: ");
|
||||
fflush (stdout);
|
||||
gets (Buf);
|
||||
if (strlen (Buf) == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
switch ((RC = GetAreaCodeInfo (&AC, Buf))) {
|
||||
|
||||
case acOk:
|
||||
printf ("acOK:\n"
|
||||
" PrefixLen = %d\n"
|
||||
" Info = %s\n",
|
||||
AC.AreaCodeLen, AC.Info);
|
||||
break;
|
||||
|
||||
case acFileError:
|
||||
printf ("acFileError\n");
|
||||
break;
|
||||
|
||||
case acInvalidFile:
|
||||
printf ("acInvalidFile\n");
|
||||
break;
|
||||
|
||||
case acWrongVersion:
|
||||
printf ("acWrongVersion\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
printf ("Unknown return: %u\n", RC);
|
||||
break;
|
||||
|
||||
}
|
||||
printf ("\n");
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
/*****************************************************************************/
|
||||
/* */
|
||||
/* ACVERS.C */
|
||||
/* */
|
||||
/* Get the version and build of an areacode data file */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1996,97 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.com */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any express or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
/* claim that you wrote the original software. If you use this software */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* This code assumes 8 bit bytes */
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#define MAGIC0 0x68
|
||||
#define MAGIC1 0x57
|
||||
#define MAGIC2 0x46
|
||||
#define MAGIC3 0x35
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
static void Usage (const char* ProgName)
|
||||
/* Print usage information and exit */
|
||||
{
|
||||
printf ("%s: Print the version of an areacode database\n\n"
|
||||
"Usage: \t%s file ...\n",
|
||||
ProgName, ProgName);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main (int argc, char* argv [])
|
||||
{
|
||||
int I;
|
||||
|
||||
if (argc < 2) {
|
||||
Usage (argv [0]);
|
||||
}
|
||||
|
||||
for (I = 1; I < argc; I++) {
|
||||
|
||||
FILE* F;
|
||||
const char* Filename = argv [I];
|
||||
unsigned char MagicBuf [4];
|
||||
unsigned char BuildBuf [2];
|
||||
unsigned char VersionBuf [2];
|
||||
unsigned Build;
|
||||
|
||||
if ((F = fopen (Filename, "rb")) == 0) {
|
||||
perror ("Cannot open input file");
|
||||
exit (2);
|
||||
}
|
||||
|
||||
fread (MagicBuf, sizeof (MagicBuf), 1, F);
|
||||
if (MagicBuf [0] != MAGIC0 || MagicBuf [1] != MAGIC1 ||
|
||||
MagicBuf [2] != MAGIC2 || MagicBuf [3] != MAGIC3) {
|
||||
fprintf (stderr, "No dial prefix database\n");
|
||||
exit (3);
|
||||
}
|
||||
|
||||
fread (BuildBuf, sizeof (BuildBuf), 1, F);
|
||||
fread (VersionBuf, sizeof (VersionBuf), 1, F);
|
||||
fclose (F);
|
||||
|
||||
Build = ((unsigned) BuildBuf [1]) * 256 + ((unsigned) BuildBuf [0]);
|
||||
printf ("%d %d %u\n", VersionBuf [1], VersionBuf [0], Build);
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,583 +0,0 @@
|
|||
/*****************************************************************************/
|
||||
/* */
|
||||
/* AREACODE.C */
|
||||
/* */
|
||||
/* Portable library module to search for an area code in a database. */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1996,97 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.com */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any express or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
/* claim that you wrote the original software. If you use this software */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The code assumes
|
||||
* - 8 bit bytes
|
||||
* - unsigned long is 32 bit. This may be changed by #defining u32 to
|
||||
* a data type that is an 32 bit unsigned when compiling this module.
|
||||
* - ascii character set
|
||||
*
|
||||
* The code does *not* assume
|
||||
* - a specific byte order. Currently the code autoadjusts to big or
|
||||
* little endian data. If you have something more weird than that,
|
||||
* you have to add conversion code.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "areacode.h"
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Externally visible data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* The name of the areacode data file. The default is what is #defined as
|
||||
* DATA_FILENAME. If this is not #defined, the default is "areacode.dat",
|
||||
* which is probably not what you want. In the latter case set this to
|
||||
* the correct filename *before* your first call to GetAreaCodeInfo.
|
||||
*/
|
||||
#ifdef DATA_FILENAME
|
||||
char* acFileName = DATA_FILENAME;
|
||||
#else
|
||||
char* acFileName = "areacode.dat";
|
||||
#endif
|
||||
|
||||
/* How much dynamic memory is GetAreaCodeInfo allowed to consume? Having less
|
||||
* memory means more disk access and vice versa. The function does even work
|
||||
* if you set this value to zero. For maximum performance, the function needs
|
||||
* 4 byte per area code stored in the data file. The default is 32KB.
|
||||
*/
|
||||
unsigned long acMaxMem = 0x8000L;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data and structures */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Define an unsigned quantity with 32 bits. Try to make some clever
|
||||
* assumptions using the data from limits.h. This may break some older
|
||||
* (non ISO compliant) compilers, but I can't help...
|
||||
*/
|
||||
#if !defined(u32) && defined(ULONG_MAX)
|
||||
# if ULONG_MAX == 4294967295UL
|
||||
# define u32 unsigned long
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(u32) && defined(UINT_MAX)
|
||||
# if UINT_MAX == 4294967295UL
|
||||
# define u32 unsigned
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(u32) && defined(USHRT_MAX)
|
||||
# if USHRT_MAX == 4294967295UL
|
||||
# define u32 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(u32)
|
||||
# define u32 unsigned long
|
||||
#endif
|
||||
|
||||
/* The version of the data file we support (major only, minor is ignored) */
|
||||
#define acVersion 0x100
|
||||
|
||||
/* The magic words in little and big endian format */
|
||||
#define LittleMagic 0x35465768L
|
||||
#define BigMagic 0x68574635L
|
||||
|
||||
/* Defining the byte ordering */
|
||||
#define boLittleEndian 0
|
||||
#define boBigEndian 1
|
||||
|
||||
/* The byte order used in the file is little endian (intel) format */
|
||||
#define FileByteOrder boLittleEndian
|
||||
|
||||
/* This is the header data of the data file. It is not used anywhere in
|
||||
* the code, just have a look at it since it describes the layout in the
|
||||
* file.
|
||||
*/
|
||||
typedef struct {
|
||||
u32 Magic;
|
||||
u32 Version; /* Version in hi word, build in lo word */
|
||||
u32 Count;
|
||||
u32 AreaCodeStart;
|
||||
u32 NameIndexStart;
|
||||
u32 NameStart;
|
||||
u32 AreaCodeLenStart; /* Version 1.02 and higher */
|
||||
} PrefixHeader;
|
||||
|
||||
/* This is what's really used: */
|
||||
typedef struct {
|
||||
|
||||
/* The file we read from */
|
||||
FILE* F;
|
||||
|
||||
/* Machine byte order */
|
||||
unsigned ByteOrder;
|
||||
|
||||
/* Stuff from the file header */
|
||||
unsigned Version;
|
||||
unsigned Build;
|
||||
u32 Count;
|
||||
u32 AreaCodeStart;
|
||||
u32 NameIndexStart;
|
||||
u32 NameStart;
|
||||
u32 AreaCodeLenStart;
|
||||
|
||||
/* Control data */
|
||||
long First;
|
||||
long Last;
|
||||
u32* Table;
|
||||
|
||||
} AreaCodeDesc;
|
||||
|
||||
/* Translation table for translation CP850 --> ISO-8859-1. To save some space,
|
||||
* the table covers only values > 127
|
||||
*/
|
||||
#ifdef CHARSET_ISO
|
||||
static char ISOMap [128] = {
|
||||
0xC7, 0xFC, 0xE9, 0xE2, 0xE4, 0xE0, 0xE5, 0xE7,
|
||||
0xEA, 0xEB, 0xE8, 0xEF, 0xEE, 0xEC, 0xC4, 0xC5,
|
||||
0xC9, 0xE6, 0xC6, 0xF4, 0xF6, 0xF2, 0xFC, 0xF9,
|
||||
0xFF, 0xD6, 0xDC, 0xA2, 0xA3, 0xA5, 0x50, 0x66,
|
||||
0xE1, 0xED, 0xF3, 0xFA, 0xF1, 0xD1, 0xAA, 0xBA,
|
||||
0xBF, 0x2D, 0xAC, 0xC6, 0xBC, 0xA1, 0xAB, 0xBB,
|
||||
0xFE, 0xFE, 0xFE, 0x7C, 0x2B, 0x2B, 0x2B, 0x2B,
|
||||
0x2B, 0x2B, 0x7C, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B,
|
||||
0x2B, 0x2B, 0x2B, 0x2B, 0x2D, 0x2B, 0x2B, 0x2B,
|
||||
0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2D, 0x2B, 0x2B,
|
||||
0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B,
|
||||
0x2B, 0x2B, 0x2B, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
|
||||
0x61, 0xDF, 0x63, 0x70, 0x5A, 0x73, 0xB5, 0x74,
|
||||
0x70, 0x54, 0x4F, 0x64, 0x38, 0x30, 0x65, 0x55,
|
||||
0x3D, 0xB1, 0x3E, 0x3C, 0x66, 0x4A, 0xF7, 0x7E,
|
||||
0xB0, 0xB7, 0xB7, 0x2F, 0x6E, 0xB2, 0xFE, 0xFF
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Macro to convert from big endian to little endian format and vice versa.
|
||||
* Beware: The macro evaluates its parameter more than once!
|
||||
*/
|
||||
#define _ByteSwap(__V) ((((__V) & 0x000000FF) << 24) | \
|
||||
(((__V) & 0xFF000000) >> 24) | \
|
||||
(((__V) & 0x0000FF00) << 8) | \
|
||||
(((__V) & 0x00FF0000) >> 8))
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Helper functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
static u32 _ByteSwapIfNeeded (u32 D, unsigned ByteOrder)
|
||||
/* Put the bytes into the correct order according to ByteOrder */
|
||||
{
|
||||
/* Swap bytes if needed and return the result */
|
||||
switch (ByteOrder) {
|
||||
case boLittleEndian: return D;
|
||||
default: return _ByteSwap (D);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static u32 ByteSwapIfNeeded (u32 D, const AreaCodeDesc* Desc)
|
||||
/* Put the bytes into the correct order according to ByteOrder in Desc */
|
||||
{
|
||||
/* Swap bytes if needed and return the result */
|
||||
return _ByteSwapIfNeeded (D, Desc->ByteOrder);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static u32 _Load_u32 (FILE* F, unsigned ByteOrder)
|
||||
/* Load an u32 from the current file position and swap it if needed */
|
||||
{
|
||||
u32 D;
|
||||
|
||||
/* Read the data from the file */
|
||||
fread (&D, sizeof (D), 1, F);
|
||||
|
||||
/* Swap bytes if needed and return the result */
|
||||
return _ByteSwapIfNeeded (D, ByteOrder);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static u32 Load_u32 (const AreaCodeDesc* Desc)
|
||||
/* Load an u32 from the current file position and swap it if needed */
|
||||
{
|
||||
return _Load_u32 (Desc->F, Desc->ByteOrder);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static unsigned LoadFileHeader (AreaCodeDesc* Desc)
|
||||
/* Load the header of a data file. Return one of the acXXX codes. */
|
||||
{
|
||||
u32 Version;
|
||||
|
||||
/* Load the magic word in the format used int the file (do not convert) */
|
||||
u32 Magic = _Load_u32 (Desc->F, FileByteOrder);
|
||||
|
||||
/* Check what we got from the file, determine the byte order */
|
||||
switch (Magic) {
|
||||
|
||||
case BigMagic:
|
||||
Desc->ByteOrder = boBigEndian;
|
||||
break;
|
||||
|
||||
case LittleMagic:
|
||||
Desc->ByteOrder = boLittleEndian;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* OOPS - the file is probably not a valid data file */
|
||||
return acInvalidFile;
|
||||
|
||||
}
|
||||
|
||||
/* Now read the rest of the header data */
|
||||
Version = Load_u32 (Desc);
|
||||
Desc->Version = (Version >> 16);
|
||||
Desc->Build = (Version & 0xFFFF);
|
||||
Desc->Count = Load_u32 (Desc);
|
||||
Desc->AreaCodeStart = Load_u32 (Desc);
|
||||
Desc->NameIndexStart = Load_u32 (Desc);
|
||||
Desc->NameStart = Load_u32 (Desc);
|
||||
if (Desc->Version >= 0x101) {
|
||||
/* Beginning with version 1.01 we have an additional table that is
|
||||
* ignored by older versions.
|
||||
*/
|
||||
Desc->AreaCodeLenStart = Load_u32 (Desc);
|
||||
}
|
||||
|
||||
/* Check for some error conditions */
|
||||
if (ferror (Desc->F)) {
|
||||
/* Some sort of file problem */
|
||||
return acFileError;
|
||||
} else if (feof (Desc->F) || Desc->Count == 0) {
|
||||
/* This should not happen on a valid file */
|
||||
return acInvalidFile;
|
||||
} else if ((Desc->Version & 0xFF00) != acVersion) {
|
||||
return acWrongVersion;
|
||||
} else {
|
||||
/* Data is sane */
|
||||
return acOk;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static u32 EncodeNumber (const char* Phone)
|
||||
/* Encode the number we got from the caller into the internally used BCD
|
||||
* format.
|
||||
*/
|
||||
{
|
||||
unsigned I;
|
||||
unsigned Len;
|
||||
u32 P = 0; /* Initialize to make gcc happy */
|
||||
|
||||
/* Get the amount of characters to convert */
|
||||
Len = strlen (Phone);
|
||||
if (Len > 8) {
|
||||
Len = 8;
|
||||
}
|
||||
|
||||
/* Convert the characters */
|
||||
for (I = 0; I < Len; I++) {
|
||||
P = (P << 4) | ((unsigned) ((unsigned char) Phone [I]) & 0x0F);
|
||||
}
|
||||
|
||||
/* Fill the rest of the number with 0x0F */
|
||||
I = 8 - Len;
|
||||
while (I--) {
|
||||
P = (P << 4) | 0x0F;
|
||||
}
|
||||
|
||||
/* Done - return the result */
|
||||
return P;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static u32 ReadPhone (const AreaCodeDesc* Desc, long Index)
|
||||
/* Read the phone number that is located at the given index. If we have a
|
||||
* part of the table already loaded into memory, use the memory copy, else
|
||||
* read the phone number from disk.
|
||||
*/
|
||||
{
|
||||
if (Desc->Table && Index >= Desc->First && Index <= Desc->Last) {
|
||||
/* Use the already loaded table, but don't forget to swap bytes */
|
||||
return ByteSwapIfNeeded (Desc->Table [Index - Desc->First], Desc);
|
||||
} else {
|
||||
/* Load the value from the file */
|
||||
fseek (Desc->F, Desc->AreaCodeStart + Index * sizeof (u32), SEEK_SET);
|
||||
return Load_u32 (Desc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void LoadTable (AreaCodeDesc* Desc)
|
||||
/* Load a part of the table into memory */
|
||||
{
|
||||
u32 SpaceNeeded = (Desc->Last - Desc->First + 1) * sizeof (u32);
|
||||
Desc->Table = malloc (SpaceNeeded);
|
||||
if (Desc->Table == 0) {
|
||||
/* Out of memory. There is no problem with this now since we do
|
||||
* not really need the table in core memory (it speeds things up,
|
||||
* that's all). In addition to that, the memory requirement halves
|
||||
* with each iteration, so maybe we have more luck next time.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
/* Seek to the correct position in the file */
|
||||
fseek (Desc->F, Desc->AreaCodeStart + Desc->First * sizeof (u32), SEEK_SET);
|
||||
|
||||
/* Read the data */
|
||||
fread (Desc->Table, SpaceNeeded, 1, Desc->F);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static unsigned char CalcCodeLen (u32 Code)
|
||||
/* Calculate the length of a given (encoded) area code in characters */
|
||||
{
|
||||
u32 Mask;
|
||||
unsigned char Len = 0;
|
||||
for (Mask = 0xF0000000L; Mask; Mask >>= 4) {
|
||||
if ((Code & Mask) != Mask) {
|
||||
Len++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Len;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
unsigned GetAreaCodeInfo (acInfo* AC, const char* PhoneNumber)
|
||||
/* Return - if possible - an information for the area code of the given number.
|
||||
* The function returns one of the error codes defined in areacode.h. If the
|
||||
* returned value is acOk, the AC struct is filled with the data of the
|
||||
* area code found. If we did not have an error, but there is no area code
|
||||
* that corresponds to the given number, the function returns acOk, but the
|
||||
* AC struct is filled with an empty Info field and a AreaCodeLen of zero.
|
||||
*/
|
||||
{
|
||||
u32 Phone; /* PhoneNumber encoded in BCD */
|
||||
long First, Last, Current; /* For binary search */
|
||||
u32 CurrentVal; /* The value at Table [Current] */
|
||||
unsigned char AreaCodeLen; /* The length of the area code found */
|
||||
unsigned char InfoLen; /* Length of info string */
|
||||
unsigned RC = acOk; /* Result code of the function */
|
||||
u32 Mask;
|
||||
AreaCodeDesc Desc;
|
||||
|
||||
|
||||
/* Clear the fields of the AC struct. Write a zero to the last field of
|
||||
* Info - this field is never written to by the rest of the code. So by
|
||||
* setting this to zero, we will assure a terminated string in case some
|
||||
* problem prevents the code below from executing correctly.
|
||||
*/
|
||||
AC->Info [0] = '\0';
|
||||
AC->Info [sizeof (AC->Info) - 1] = '\0';
|
||||
AC->AreaCodeLen = 0;
|
||||
|
||||
/* If the number is empty, return immidiately */
|
||||
if (strlen (PhoneNumber) == 0) {
|
||||
return acOk;
|
||||
}
|
||||
|
||||
/* Open the database file, check for errors */
|
||||
Desc.F = fopen (acFileName, "rb");
|
||||
if (Desc.F == 0) {
|
||||
/* We had an error opening the file */
|
||||
return acFileError;
|
||||
}
|
||||
|
||||
/* Initialize descriptor data where needed */
|
||||
Desc.Table = 0;
|
||||
|
||||
/* Read the header from the file */
|
||||
RC = LoadFileHeader (&Desc);
|
||||
if (RC != acOk) {
|
||||
/* Wrong file or file read error */
|
||||
goto ExitWithClose;
|
||||
}
|
||||
|
||||
/* Convert the phone number into the internal representation */
|
||||
Phone = EncodeNumber (PhoneNumber);
|
||||
|
||||
/* Add dead code to work around gcc warnings */
|
||||
Current = 0;
|
||||
CurrentVal = 0;
|
||||
|
||||
/* Now do a binary search over the data */
|
||||
First = 0;
|
||||
Last = (long) Desc.Count - 1;
|
||||
while (First <= Last) {
|
||||
|
||||
/* If we don't have read the table into memory, check if we can do
|
||||
* so now.
|
||||
*/
|
||||
if (Desc.Table == 0) {
|
||||
u32 NeedMemory = (Last - First + 1) * sizeof (u32);
|
||||
if (NeedMemory <= acMaxMem) {
|
||||
/* Ok, the current part of the table is now small enough to
|
||||
* load it into memory.
|
||||
*/
|
||||
Desc.First = First;
|
||||
Desc.Last = Last;
|
||||
LoadTable (&Desc);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set current to mid of range */
|
||||
Current = (Last + First) / 2;
|
||||
|
||||
/* Get the phone number from that place */
|
||||
CurrentVal = ReadPhone (&Desc, Current);
|
||||
|
||||
/* Do a compare */
|
||||
if (Phone > CurrentVal) {
|
||||
First = Current + 1;
|
||||
} else {
|
||||
Last = Current - 1;
|
||||
if (Phone == CurrentVal) {
|
||||
/* Set the condition to terminate the loop */
|
||||
First = Current;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* First is the index of the area code, we eventually found. Put the index
|
||||
* into Current and the value into CurrentVal.
|
||||
*/
|
||||
if (Current != First) {
|
||||
Current = First;
|
||||
CurrentVal = ReadPhone (&Desc, Current);
|
||||
}
|
||||
|
||||
/*
|
||||
* We may now delete an eventually allocated table space since it is
|
||||
* not needed any more.
|
||||
*/
|
||||
free (Desc.Table);
|
||||
Desc.Table = 0;
|
||||
|
||||
/* If Current points behind Last, we did not find anything */
|
||||
if (Current >= (long) Desc.Count) {
|
||||
/* Not found */
|
||||
goto ExitWithClose;
|
||||
}
|
||||
|
||||
/* Calculate the length of the area code */
|
||||
AreaCodeLen = CalcCodeLen (CurrentVal);
|
||||
|
||||
/* Check if the Prefix is actually the first part of the phone number */
|
||||
Mask = 0xFFFFFFFFL << ((8 - AreaCodeLen) * 4);
|
||||
if ((Phone & Mask) != (CurrentVal & Mask)) {
|
||||
/* They are different */
|
||||
goto ExitWithClose;
|
||||
}
|
||||
|
||||
/* Ok, we have now definitely found the code. Current is the index of the
|
||||
* area code. Seek to the corresponding position in the name index, get
|
||||
* the name position from there and seek to that place.
|
||||
*/
|
||||
fseek (Desc.F, Desc.NameIndexStart + Current * sizeof (u32), SEEK_SET);
|
||||
fseek (Desc.F, Desc.NameStart + Load_u32 (&Desc), SEEK_SET);
|
||||
|
||||
/* Read the length of the name and add the trailing zero to the info
|
||||
* field in the result struct.
|
||||
*/
|
||||
fread (&InfoLen, 1, 1, Desc.F);
|
||||
AC->Info [InfoLen] = '\0';
|
||||
|
||||
/* Read the info into the result struct */
|
||||
fread (AC->Info, 1, InfoLen, Desc.F);
|
||||
|
||||
#ifdef CHARSET_ISO
|
||||
/* Translate the info to the ISO-8859-1 charset */
|
||||
{
|
||||
unsigned I;
|
||||
for (I = 0; I < InfoLen; I++) {
|
||||
unsigned char C = (unsigned char) AC->Info [I];
|
||||
if (C >= 128) {
|
||||
AC->Info [I] = ISOMap [C - 128];
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If the areacode file is version 1.01 or greater, there is an additional
|
||||
* table with the length of the "real" area code. Older versions use the
|
||||
* length of the area code. This enables dividing of number spaces, e.g.
|
||||
* 49212[0-8] = Solingen, 492129 = Haan. With the old data file, the
|
||||
* areacode of Solingen would be 492120 but the official code is just
|
||||
* 49212 which needs an additional length byte.
|
||||
*/
|
||||
if (Desc.Version >= 0x101) {
|
||||
fseek (Desc.F, Desc.AreaCodeLenStart + Current, SEEK_SET);
|
||||
fread (&AreaCodeLen, 1, sizeof (AreaCodeLen), Desc.F);
|
||||
}
|
||||
AC->AreaCodeLen = AreaCodeLen;
|
||||
|
||||
ExitWithClose:
|
||||
/* Close the data file */
|
||||
fclose (Desc.F);
|
||||
|
||||
/* Done, return the result */
|
||||
return RC;
|
||||
}
|
||||
|
||||
|
||||
|
Binary file not shown.
|
@ -1,170 +0,0 @@
|
|||
|
||||
AREACODE
|
||||
|
||||
|
||||
Portable library module to search for an area code in a database.
|
||||
|
||||
Version 1.02
|
||||
|
||||
(C) Copyright 1996,97 by Ullrich von Bassewitz
|
||||
<uz@musoftware.com>
|
||||
|
||||
|
||||
|
||||
1. Overview
|
||||
-----------
|
||||
|
||||
The areacode module together with its database serves as a helper for
|
||||
finding names for area codes. It is freely available, subject to the
|
||||
copyright notice below.
|
||||
|
||||
|
||||
|
||||
2. Function
|
||||
-----------
|
||||
|
||||
The module exports a few data types and one function. The function resolves
|
||||
a phone number (including the country code) to some text describing the area
|
||||
code found in the phone number. Current descriptions are in german, the
|
||||
database contains german, swiss and austrian area codes.
|
||||
|
||||
Usage is easy, just have a look into the header file areacode.h.
|
||||
|
||||
|
||||
|
||||
3. Supported systems and limitations
|
||||
------------------------------------
|
||||
|
||||
The module should run on nearly all system that have the following
|
||||
characteristics:
|
||||
|
||||
* 8 bit bytes
|
||||
|
||||
* An unsigned data type with 32 bits. The code makes some checks with the
|
||||
values in limits.h to find such a datatype for itself, if all checks
|
||||
fail, unsigned long is used. This may be overriden by #defining the
|
||||
macro u32 to the datatype needed.
|
||||
|
||||
* An ANSI compatible compiler supporting prototypes. The code should also
|
||||
compile with a C++ compiler, the header file uses the #ifdef __cpluplus
|
||||
checks.
|
||||
|
||||
* Big or little endian architectures. For something more weird (old
|
||||
Vaxes?) code has to be added.
|
||||
|
||||
* Systems with CP437, CP850 or ISO-8859-1 character sets. The "native"
|
||||
format is CP850/CP437, for ISO-8859-1, the #define CHARSET_ISO has to
|
||||
be added when compiling the module.
|
||||
|
||||
The code has been tested under
|
||||
|
||||
* DOS (Watcom C/C++ 10.6)
|
||||
|
||||
* Windows-NT (Watcom C/C++ 10.6)
|
||||
|
||||
* OS/2 2.x (Watcom C/C++ 10.6)
|
||||
|
||||
* i386-Linux (gcc 2.7.2)
|
||||
|
||||
For these environments makefiles can be found in the make subdirectory.
|
||||
|
||||
The package has some limits as stated below:
|
||||
|
||||
* Current language is german.
|
||||
|
||||
* The data file contains area codes for germany, austria, switzerland
|
||||
and the netherlands.
|
||||
|
||||
* The area code including the country code (but not including the
|
||||
international prefix, often 00) may not exceed 8 digits. This may be
|
||||
bumped up to 9 digits if needed with some disadvantages (more
|
||||
complicated code).
|
||||
|
||||
* An area code description must be shorter than 256 characters.
|
||||
|
||||
|
||||
|
||||
4. How to get the source & data files
|
||||
-------------------------------------
|
||||
|
||||
You may get the source for the package itself, for the datafile builder and
|
||||
for new datafiles from
|
||||
|
||||
ftp://ftp.musoftware.com/pub/areacode
|
||||
|
||||
Note: Please do not distribute modified data files. The data files contain
|
||||
a version stamp to make shure, users don't overwrite newer versions with
|
||||
older ones. This scheme will no longer work if data files are distributed
|
||||
by third parties.
|
||||
|
||||
Note: The datafile builder needs spunk, a C++ class library to compile.
|
||||
You may want to have a look in
|
||||
|
||||
ftp://ftp.musoftware.com/pub/spunk
|
||||
|
||||
for the current spunk version.
|
||||
|
||||
|
||||
|
||||
5. Installing the package
|
||||
-------------------------
|
||||
|
||||
For all systems the location of the data file has to be known. The default
|
||||
name (including the path) may be compiled into the module by #defining
|
||||
DATA_FILENAME, or set at runtime (see areacode.h).
|
||||
The Linux makefile will install the data file in a common place, so more
|
||||
than one software package depending on areacode is able to use the data file.
|
||||
|
||||
The data file contains a version stamp, to avoid overwriting a newer file
|
||||
by an older one, when installing more than one software package. The
|
||||
program acvers is used to determine the build version, it will output three
|
||||
numbers, the last one is the data file build (the first two are format
|
||||
version numbers that - hopefully - will not change).
|
||||
|
||||
|
||||
|
||||
6. Copying
|
||||
----------
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
||||
|
||||
|
||||
7. Credits
|
||||
----------
|
||||
|
||||
Many thanks to all people that helped developing the module:
|
||||
|
||||
|
||||
Andreas Kool (akool@kool.f.eunet.de), author of isdnlog,
|
||||
for many suggestions and code testing.
|
||||
|
||||
Norbert Staudt (VKRG.Staudt@t-online.de),
|
||||
who sent me lots of sample programs resolving area codes.
|
||||
|
||||
Andreas Gutzwiller (andy@hippo.proxyon.imp.com),
|
||||
for the swiss area codes.
|
||||
|
||||
Alois Schneider (Alois.Schneider@magnet.at),
|
||||
for the austrian area codes.
|
||||
|
||||
Paul Slootman (paul@wurtel.demon.nl),
|
||||
for the two versions of the area codes for the netherlands
|
||||
and for his patience:-)
|
||||
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
/*****************************************************************************/
|
||||
/* */
|
||||
/* AREACODE.H */
|
||||
/* */
|
||||
/* Portable library module to search for an area code in a database. */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1996,97 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.com */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any express or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
/* claim that you wrote the original software. If you use this software */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The code assumes
|
||||
* - 8 bit bytes
|
||||
* - unsigned long is 32 bit. This may be changed by #defining u32 to
|
||||
* a data type that is an 32 bit unsigned when compiling this module.
|
||||
* - ascii character set
|
||||
*
|
||||
* The code does *not* assume
|
||||
* - a specific byte order. Currently the code autoadjusts to big or
|
||||
* little endian data. If you have something more weird than that,
|
||||
* you have to add conversion code.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _AREACODE_H
|
||||
#define _AREACODE_H
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data, structs and constants */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* The name of the areacode data file. The default is what is #defined as
|
||||
* DATA_FILENAME. If this is not #defined, the default is "areacode.dat",
|
||||
* which is probably not what you want. In the latter case set this to
|
||||
* the correct filename *before* your first call to GetAreaCodeInfo.
|
||||
*/
|
||||
extern char* acFileName;
|
||||
|
||||
/* How much dynamic memory is GetAreaCodeInfo allowed to consume? Having less
|
||||
* memory means more disk access and vice versa. The function does even work
|
||||
* if you set this value to zero. For maximum performance, the function needs
|
||||
* 4 byte per area code stored in the data file. The default is 32KB.
|
||||
*/
|
||||
extern unsigned long acMaxMem;
|
||||
|
||||
/* Result codes of GetAreaCodeInfo */
|
||||
#define acOk 0 /* Done */
|
||||
#define acFileError 1 /* Cannot open/read file */
|
||||
#define acInvalidFile 2 /* The file exists but is no area code data file */
|
||||
#define acWrongVersion 3 /* Wrong version of data file */
|
||||
|
||||
/* The result of an area code search */
|
||||
typedef struct {
|
||||
unsigned AreaCodeLen; /* The length of the area code found */
|
||||
char Info [256]; /* An info string */
|
||||
} acInfo;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
unsigned GetAreaCodeInfo (acInfo* /*AC*/ , const char* /*PhoneNumber*/);
|
||||
/* Return - if possible - an information for the area code of the given number.
|
||||
* The function returns one of the error codes defined in areacode.h. If the
|
||||
* returned value is acOk, the AC struct is filled with the data of the
|
||||
* area code found. If we did not have an error, but there is no area code
|
||||
* that corresponds to the given number, the function returns acOk, but the
|
||||
* AC struct is filled with an empty Info field and a AreaCodeLen of zero.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* End of AREACODE.H */
|
||||
|
||||
#endif
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
# *****************************************************************************
|
||||
# * *
|
||||
# * AREACODE Makefile for Linux *
|
||||
# * *
|
||||
# * (C) 1995-96 Ullrich von Bassewitz *
|
||||
# * Wacholderweg 14 *
|
||||
# * D-70597 Stuttgart *
|
||||
# * EMail: uz@ibb.schwaben.com *
|
||||
# * *
|
||||
# *****************************************************************************
|
||||
|
||||
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# $Log$
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Stuff you may want to edit
|
||||
|
||||
# The name of the data file after installation
|
||||
|
||||
DATATARGET=/usr/lib/areacodes
|
||||
|
||||
# Command line for the installation of the data file
|
||||
INSTALL = install -o bin -g bin -m 644
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Definitions
|
||||
|
||||
# Names of executables
|
||||
AS = gas
|
||||
AR = ar
|
||||
LD = ld
|
||||
ZIP = zip
|
||||
|
||||
# Flags for the GNU C compiler
|
||||
CFLAGS = -g -O2 -Wall
|
||||
|
||||
# Name of the data file
|
||||
DATASOURCE=areacode.dat
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Implicit rules
|
||||
|
||||
.c.o:
|
||||
gcc $(CFLAGS) -c $<
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all: actest acvers
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
endif
|
||||
|
||||
|
||||
actest: areacode.o actest.o
|
||||
gcc -o actest areacode.o actest.o
|
||||
|
||||
acvers: acvers.o
|
||||
gcc -o acvers acvers.o
|
||||
|
||||
areacode.o: areacode.h areacode.c
|
||||
gcc $(CFLAGS) -DDATA_FILENAME="\"$(DATATARGET)\"" \
|
||||
-DCHARSET_ISO -c -o areacode.o areacode.c
|
||||
|
||||
install: areacode.o acvers
|
||||
@if [ `id -u` != 0 ]; then \
|
||||
echo ""; \
|
||||
echo 'Do "make install" as root'; \
|
||||
echo ""; \
|
||||
false; \
|
||||
fi
|
||||
@if [ -f $(DATATARGET) ]; then \
|
||||
NewVersion=`./acvers $(DATASOURCE) | awk '{ print $$3 }'`;\
|
||||
OldVersion=`./acvers $(DATATARGET) | awk '{ print $$3 }'`;\
|
||||
echo "Current datafile build number: $$OldVersion"; \
|
||||
echo "Build number of new datafile: $$NewVersion"; \
|
||||
if [ $$NewVersion -gt $$OldVersion ]; then \
|
||||
echo "Installing new datafile"; \
|
||||
$(INSTALL) $(DATASOURCE) $(DATATARGET); \
|
||||
else \
|
||||
echo "Installed datafile is same or newer, skipping...";\
|
||||
fi; \
|
||||
else \
|
||||
echo "Installing new datafile"; \
|
||||
$(INSTALL) $(DATASOURCE) $(DATATARGET); \
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Create a dependency file
|
||||
|
||||
depend dep: .depend
|
||||
|
||||
.depend:
|
||||
@echo "Creating dependency information"
|
||||
$(CC) -MM *.c > .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# clean up
|
||||
|
||||
distclean: zap
|
||||
|
||||
clean:
|
||||
-rm -f *.bak *~ *.o
|
||||
-rm -f acvers actest
|
||||
|
||||
zap: clean
|
||||
-rm -f .depend
|
||||
-rm -f *.o
|
||||
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
# *****************************************************************************
|
||||
# * *
|
||||
# * AREACODE Makefile for SVR4 *
|
||||
# * *
|
||||
# * (C) 1995-96 Ullrich von Bassewitz *
|
||||
# * Wacholderweg 14 *
|
||||
# * D-70597 Stuttgart *
|
||||
# * EMail: uz@ibb.schwaben.com *
|
||||
# * *
|
||||
# * *
|
||||
# * SVR40 Port by Felix Blank (felix@tasha.muc.de) *
|
||||
# * *
|
||||
# *****************************************************************************
|
||||
|
||||
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# $Log$
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Stuff you may want to edit
|
||||
|
||||
# The name of the data file after installation
|
||||
DATATARGET=/usr/local/lib/areacodes
|
||||
|
||||
# Command line for the installation of the data file
|
||||
INSTALL = install -o bin -g bin -m 644
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Definitions
|
||||
|
||||
# Names of executables
|
||||
AS = gas
|
||||
AR = ar
|
||||
LD = ld
|
||||
ZIP = zip
|
||||
CC = gcc
|
||||
|
||||
# Flags for the GNU C compiler
|
||||
CFLAGS=-O2 -Wall
|
||||
|
||||
# Name of the data file
|
||||
DATASOURCE=areacode.dat
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Implicit rules
|
||||
|
||||
.c.o:
|
||||
gcc $(CFLAGS) -c $<
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all: actest acvers
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
endif
|
||||
|
||||
|
||||
actest: areacode.o actest.o
|
||||
gcc -o actest areacode.o actest.o
|
||||
|
||||
acvers: acvers.o
|
||||
gcc -o acvers acvers.o
|
||||
|
||||
areacode.o: areacode.h areacode.c
|
||||
gcc $(CFLAGS) -DDATA_FILENAME="\"$(DATATARGET)\"" \
|
||||
-DCHARSET_ISO -c -o areacode.o areacode.c
|
||||
|
||||
install: areacode.o acvers
|
||||
@if [ `id -u` != 0 ]; then \
|
||||
echo ""; \
|
||||
echo 'Do "make install" as root'; \
|
||||
echo ""; \
|
||||
false; \
|
||||
fi
|
||||
@if [ -f $(DATATARGET) ]; then \
|
||||
NewVersion=`./acvers $(DATASOURCE) | awk '{ print $$3 }'`;\
|
||||
OldVersion=`./acvers $(DATATARGET) | awk '{ print $$3 }'`;\
|
||||
echo "Current datafile build number: $$OldVersion"; \
|
||||
echo "Build number of new datafile: $$NewVersion"; \
|
||||
if [ $$NewVersion -gt $$OldVersion ]; then \
|
||||
echo "Installing new datafile"; \
|
||||
$(INSTALL) $(DATASOURCE) $(DATATARGET); \
|
||||
else \
|
||||
echo "Installed datafile is same or newer, skipping...";\
|
||||
fi; \
|
||||
else \
|
||||
echo "Installing new datafile"; \
|
||||
$(INSTALL) $(DATASOURCE) $(DATATARGET); \
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Create a dependency file
|
||||
|
||||
depend dep:
|
||||
@echo "Creating dependency information"
|
||||
$(CC) -MM *.c > .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# clean up
|
||||
|
||||
distclean: zap
|
||||
|
||||
clean:
|
||||
-rm *.bak *~
|
||||
|
||||
zap: clean
|
||||
-rm *.o
|
||||
-rm .depend
|
||||
|
||||
|
|
@ -1,171 +0,0 @@
|
|||
# *****************************************************************************
|
||||
# * *
|
||||
# * AREACODE Makefile *
|
||||
# * *
|
||||
# * (C) 1996 Ullrich von Bassewitz *
|
||||
# * Wacholderweg 14 *
|
||||
# * D-70597 Stuttgart *
|
||||
# * EMail: uz@ibb.schwaben.com *
|
||||
# * *
|
||||
# *****************************************************************************
|
||||
|
||||
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# $Log$
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Generelle Einstellungen
|
||||
|
||||
.AUTODEPEND
|
||||
.SUFFIXES .ASM .C .CC .CPP
|
||||
.SWAP
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Allgemeine Definitionen
|
||||
|
||||
# Names of executables
|
||||
AS = TASM
|
||||
AR = WLIB
|
||||
LD = WLINK
|
||||
!if $d(__OS2__)
|
||||
ZIP = zip
|
||||
MV = c:\os2\4os2\4os2 /C MOVE /Q
|
||||
!else
|
||||
ZIP = pkzip
|
||||
MV = mv
|
||||
!endif
|
||||
|
||||
|
||||
!if !$d(TARGET)
|
||||
!if $d(__OS2__)
|
||||
TARGET = OS2
|
||||
!else
|
||||
TARGET = DOS
|
||||
!endif
|
||||
!endif
|
||||
|
||||
LIBDIR= ..\spunk
|
||||
INCDIR= ..\spunk
|
||||
|
||||
|
||||
# target specific macros.
|
||||
!if $(TARGET)==OS2
|
||||
|
||||
# --------------------- OS2 ---------------------
|
||||
SYSTEM = os2v2
|
||||
CPP = WPP386
|
||||
CC = WCC386
|
||||
CCCFG = -bm -bt=$(TARGET) -d$(TARGET) -i=$(INCDIR) -d2 -onatx -zp4 -5 -fpi87 -zq -w2 -ze
|
||||
|
||||
!elif $(TARGET)==DOS32
|
||||
|
||||
# -------------------- DOS4G --------------------
|
||||
SYSTEM = dos4g
|
||||
CPP = WPP386
|
||||
CC = WCC386
|
||||
CCCFG = -bt=$(TARGET) -d$(TARGET) -i=$(INCDIR) -d2 -onatx -zp4 -5 -fpi -zq -w2 -ze
|
||||
|
||||
!elif $(TARGET)==DOS
|
||||
|
||||
# --------------------- DOS ---------------------
|
||||
SYSTEM = dos
|
||||
CPP = WPP
|
||||
CC = WCC
|
||||
# Optimize for size when running under plain DOS, but use 286 code. Don't
|
||||
# include ANY debugging code to make as many programs runable under plain DOS
|
||||
# as possible.
|
||||
CCCFG = -bt=$(TARGET) -d$(TARGET) -dSPUNK_NODEBUG -i=$(INCDIR) -d1 -oailmns -s -zp2 -zc -2 -fp2 -ml -zq -w2 -ze -zt255
|
||||
|
||||
!elif $(TARGET)==NETWARE
|
||||
|
||||
# --------------------- NETWARE -------------------
|
||||
SYSTEM = netware
|
||||
CPP = WPP386
|
||||
CC = WCC386
|
||||
CCCFG = -bm -bt=$(TARGET) -d$(TARGET) -i=$(INCDIR) -d1 -onatx -zp4 -5 -fpi -zq -w2 -ze
|
||||
|
||||
!elif $(TARGET)==NT
|
||||
|
||||
# --------------------- NT ----------------------
|
||||
SYSTEM = nt
|
||||
CPP = WPP386
|
||||
CC = WCC386
|
||||
CCCFG = -bm -bt=$(TARGET) -d$(TARGET) -i=$(INCDIR) -d1 -onatx -zp4 -5 -fpi87 -zq -w2 -ze
|
||||
|
||||
!else
|
||||
!error
|
||||
!endif
|
||||
|
||||
LIB = $(LIBDIR)\$(TARGET)\SPUNK.LIB
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Implicit rules
|
||||
|
||||
.c.obj:
|
||||
$(CC) $(CCCFG) $<
|
||||
|
||||
.cc.obj:
|
||||
$(CPP) $(CCCFG) $<
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
all: actest acvers
|
||||
|
||||
actest: actest.exe
|
||||
|
||||
acvers: acvers.exe
|
||||
|
||||
os2:
|
||||
$(MAKE) -DTARGET=OS2
|
||||
|
||||
nt:
|
||||
$(MAKE) -DTARGET=NT
|
||||
|
||||
dos32:
|
||||
$(MAKE) -DTARGET=DOS32
|
||||
|
||||
dos:
|
||||
$(MAKE) -DTARGET=DOS
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# actest
|
||||
|
||||
actest.exe: areacode.obj \
|
||||
actest.obj
|
||||
-@copy makefile make\watcom.mak > nul
|
||||
$(LD) system $(SYSTEM) @&&|
|
||||
DEBUG all
|
||||
NAME actest.exe
|
||||
OPTION DOSSEG
|
||||
OPTION STACK=32K
|
||||
FILE areacode.obj
|
||||
FILE actest.obj
|
||||
|
|
||||
|
||||
acvers.exe: acvers.obj
|
||||
-@copy makefile make\watcom.mak > nul
|
||||
$(LD) system $(SYSTEM) @&&|
|
||||
DEBUG all
|
||||
NAME acvers.exe
|
||||
OPTION DOSSEG
|
||||
OPTION STACK=32K
|
||||
FILE acvers.obj
|
||||
|
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Aufr„umen
|
||||
|
||||
clean:
|
||||
-del *.bak
|
||||
|
||||
zap: clean
|
||||
-del *.obj
|
||||
-del *.mbr
|
||||
-del *.dbr
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
config.*
|
||||
*.o
|
||||
*.8
|
||||
avmcapictrl
|
||||
CVS
|
|
@ -1,68 +0,0 @@
|
|||
# $Id$
|
||||
#
|
||||
# Makefile for avmcapictrl
|
||||
# (C) 1997 Carsten Paeth
|
||||
#
|
||||
#
|
||||
SHELL = /bin/sh
|
||||
CFLAGS = -Wall -O2 -I.
|
||||
LDFLAGS = -L../lib @LIBS@
|
||||
INCLUDES = -I@CONFIG_KERNELDIR@/include
|
||||
PROGRAMS = avmcapictrl
|
||||
MODULES = avmcapictrl.o
|
||||
MANPAGES = avmcapictrl.8
|
||||
SBINDIR = @CONFIG_SBINDIR@
|
||||
MANDIR = @CONFIG_MANDIR@
|
||||
MAN8DIR = $(MANDIR)/man8
|
||||
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@
|
||||
CC = @CC@
|
||||
|
||||
%.8: %.man
|
||||
cp $< $@
|
||||
|
||||
%.o: %.c Makefile
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(DEFS) -c -o $@ $<
|
||||
|
||||
all: $(PROGRAMS) $(MANPAGES)
|
||||
|
||||
config:
|
||||
@./configure
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
config.status: configure
|
||||
./config.status --recheck
|
||||
|
||||
avmcapictrl: $(MODULES)
|
||||
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
|
||||
|
||||
install: $(PROGRAMS) $(MANPAGES)
|
||||
mkdir -p $(DESTDIR)$(SBINDIR)
|
||||
$(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(SBINDIR)
|
||||
mkdir -p $(DESTDIR)$(MAN8DIR)
|
||||
$(INSTALL_MAN) $(MANPAGES) $(DESTDIR)$(MAN8DIR)
|
||||
|
||||
install-strip: $(PROGRAMS) $(MANPAGES)
|
||||
mkdir -p $(DESTDIR)$(SBINDIR)
|
||||
$(INSTALL_PROGRAM) -s $(PROGRAMS) $(DESTDIR)$(SBINDIR)
|
||||
mkdir -p $(DESTDIR)$(MAN8DIR)
|
||||
$(INSTALL_MAN) $(MANPAGES) $(DESTDIR)$(MAN8DIR)
|
||||
|
||||
uninstall:
|
||||
@for i in `echo $(PROGRAMS)` ; do \
|
||||
rm -f $(DESTDIR)$(SBINDIR)/$$i ; \
|
||||
done
|
||||
@for i in `echo $(MANPAGES)` ; do \
|
||||
rm -f $(DESTDIR)$(MAN8DIR)/$$i ; \
|
||||
done
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ $(PROGRAMS) *.8
|
||||
|
||||
distclean: clean
|
||||
rm -f config.status config.cache config.log confdefs.h Makefile *.man
|
|
@ -1 +0,0 @@
|
|||
sinclude(../etc/ackernel.m4)dnl
|
|
@ -1,547 +0,0 @@
|
|||
/*
|
||||
* $Id$
|
||||
*
|
||||
* AVM-B1-ISDN driver for Linux. (Control-Utility)
|
||||
*
|
||||
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.9 1998/02/27 15:42:00 calle
|
||||
* T1 running with slow link.
|
||||
*
|
||||
* Revision 1.8 1998/02/24 17:56:23 calle
|
||||
* changes for T1.
|
||||
*
|
||||
* Revision 1.7 1998/02/07 20:32:00 calle
|
||||
* update man page, remove old cardtype M1, add is done via avm_cs.o
|
||||
*
|
||||
* Revision 1.6 1998/02/07 20:09:00 calle
|
||||
* - added support for DN1/SPID1 DN2/SPID2 for 5ESS und NI1 protocols.
|
||||
* - allow debuging of patchvalues.
|
||||
* - optimize configure.in/configure
|
||||
*
|
||||
* Revision 1.5 1998/01/16 14:02:08 calle
|
||||
* patchvalues working now, leased lines and dchannel protocols like
|
||||
* CT1,VN3 und AUSTEL support okay, point to point also patchable.
|
||||
*
|
||||
* Revision 1.3 1997/12/07 20:02:22 calle
|
||||
* prepared support for cardtype and different protocols
|
||||
*
|
||||
* Revision 1.2 1997/03/20 00:18:57 luethje
|
||||
* inserted the line #include <errno.h> in avmb1/avmcapictrl.c and imon/imon.c,
|
||||
* some bugfixes, new structure in isdnlog/isdnrep/isdnrep.c.
|
||||
*
|
||||
* Revision 1.1 1997/03/04 22:46:32 calle
|
||||
* Added program to add and download firmware to AVM-B1 card
|
||||
*
|
||||
* Revision 2.2 1997/02/12 09:31:39 calle
|
||||
* more verbose error messages
|
||||
*
|
||||
* Revision 1.1 1997/01/31 10:32:20 calle
|
||||
* Initial revision
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <linux/isdn.h>
|
||||
#include <linux/b1lli.h>
|
||||
#include <linux/capi.h>
|
||||
|
||||
char *cmd;
|
||||
char *ctrldev;
|
||||
int arg_ofs;
|
||||
|
||||
int debugpatch = 0;
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
fprintf(stderr, "usage: %s add <portbase> <irq> [B1|T1 [<cardnr>]] (Add a new card)\n", cmd);
|
||||
fprintf(stderr, " or: %s load <bootcode> [contrnr [protocol [P2P | DN1:SPID1 [DN2:SPID2]]]] (load firmware)\n", cmd);
|
||||
fprintf(stderr, " or: %s reset [contrnr] (reset controller)\n", cmd);
|
||||
fprintf(stderr, " or: %s remove [contrnr] (reset controller)\n", cmd);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#define DP_ERROR -1
|
||||
#define DP_NONE 0
|
||||
#define DP_DSS1 1
|
||||
#define DP_D64S 2
|
||||
#define DP_D64S2 3
|
||||
#define DP_D64SD 4
|
||||
#define DP_DS01 5
|
||||
#define DP_DS02 6
|
||||
#define DP_CT1 7
|
||||
#define DP_VN3 8
|
||||
#define DP_AUSTEL 9
|
||||
#define DP_5ESS 10 /* need SPID,SPID2,DN,DN2 */
|
||||
#define DP_NI1 11 /* need SPID,SPID2,DN,DN2 */
|
||||
#define DP_DSS1MOBIL 12
|
||||
#define DP_1TR6MOBIL 13
|
||||
#define DP_GSM 14
|
||||
#define DP_1TR6 15
|
||||
#define DP_T1 16
|
||||
|
||||
static struct pmap {
|
||||
char *name;
|
||||
int protocol;
|
||||
} pmap[] = {
|
||||
{ "DSS1", DP_DSS1 },
|
||||
{ "D64S", DP_D64S },
|
||||
{ "D64S2", DP_D64S2 },
|
||||
{ "D64SD", DP_D64SD },
|
||||
{ "DS01", DP_DS01 },
|
||||
{ "DS02", DP_DS02 },
|
||||
{ "CT1", DP_CT1 },
|
||||
{ "VN3", DP_VN3 },
|
||||
{ "AUSTEL", DP_AUSTEL },
|
||||
{ "5ESS", DP_5ESS },
|
||||
{ "NI1", DP_NI1 },
|
||||
{ "T1", DP_T1 },
|
||||
#if 0
|
||||
{ "DSS1MOBIL", DP_DSS1MOBIL },
|
||||
{ "1TR6MOBIL", DP_1TR6MOBIL },
|
||||
{ "GSM", DP_GSM },
|
||||
{ "1TR6", DP_1TR6 },
|
||||
#endif
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
static void show_protocols()
|
||||
{
|
||||
struct pmap *p;
|
||||
int pos = 0;
|
||||
for (p=pmap; p->name; p++) {
|
||||
int len = strlen(p->name);
|
||||
if (pos + len + 2 > 80) {
|
||||
fprintf(stderr,",\n");
|
||||
pos = 0;
|
||||
}
|
||||
if (pos == 0) {
|
||||
fprintf(stderr, " %s", p->name);
|
||||
pos += 8 + len;
|
||||
} else {
|
||||
fprintf(stderr, ",%s", p->name);
|
||||
pos += 1 + len;
|
||||
}
|
||||
}
|
||||
if (pos)
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
static int dchan_protocol(char *pname)
|
||||
{
|
||||
struct pmap *p;
|
||||
for (p=pmap; p->name; p++) {
|
||||
if (strcasecmp(pname, p->name) == 0)
|
||||
return p->protocol;
|
||||
}
|
||||
return DP_ERROR;
|
||||
}
|
||||
|
||||
static char patcharea[2048];
|
||||
static int patchlen = 0;
|
||||
|
||||
static void addpatchvalue(char *name, char *value, int len)
|
||||
{
|
||||
int nlen = strlen(name);
|
||||
if (patchlen + nlen + len + 2 >= sizeof(patcharea)) {
|
||||
fprintf(stderr, "%s: can't add patchvalue %s\n" , cmd, name);
|
||||
exit(3);
|
||||
}
|
||||
patcharea[patchlen++] = ':';
|
||||
memcpy(&patcharea[patchlen], name, nlen);
|
||||
patchlen += nlen;
|
||||
patcharea[patchlen++] = 0;
|
||||
memcpy(&patcharea[patchlen], value, len);
|
||||
patchlen += len;
|
||||
patcharea[patchlen++] = 0;
|
||||
patcharea[patchlen+1] = 0;
|
||||
}
|
||||
|
||||
int set_configuration(avmb1_t4file *t4config, int protocol, int p2p,
|
||||
char *dn1, char *spid1, char *dn2, char *spid2)
|
||||
{
|
||||
if (protocol != DP_T1) {
|
||||
addpatchvalue("WATCHDOG", "1", 1);
|
||||
addpatchvalue("AutoFrame", "\001", 1);
|
||||
} else {
|
||||
addpatchvalue("WATCHDOG", "0", 1);
|
||||
}
|
||||
switch (protocol) {
|
||||
case DP_T1:
|
||||
case DP_NONE:
|
||||
break;
|
||||
case DP_DSS1:
|
||||
break;
|
||||
case DP_D64S:
|
||||
case DP_D64S2:
|
||||
case DP_D64SD:
|
||||
p2p = 0;
|
||||
addpatchvalue("FV2", "2", 1);
|
||||
addpatchvalue("TEI", "\000", 1);
|
||||
break;
|
||||
case DP_DS01:
|
||||
case DP_DS02:
|
||||
p2p = 0;
|
||||
addpatchvalue("FV2", "1", 1);
|
||||
addpatchvalue("TEI", "\000", 1);
|
||||
break;
|
||||
case DP_CT1:
|
||||
addpatchvalue("PROTOCOL", "\001", 1);
|
||||
break;
|
||||
case DP_VN3:
|
||||
addpatchvalue("PROTOCOL", "\002", 1);
|
||||
break;
|
||||
case DP_AUSTEL:
|
||||
addpatchvalue("PROTOCOL", "\004", 1);
|
||||
break;
|
||||
case DP_NI1:
|
||||
p2p = 0;
|
||||
addpatchvalue("PROTOCOL", "\003", 1);
|
||||
if (dn1 && spid1) {
|
||||
addpatchvalue("DN", dn1, strlen(dn1));
|
||||
addpatchvalue("SPID", spid1, strlen(spid1));
|
||||
}
|
||||
if (dn2 && spid2) {
|
||||
addpatchvalue("DN2", dn2, strlen(dn2));
|
||||
addpatchvalue("SPID2", spid2, strlen(spid2));
|
||||
}
|
||||
break;
|
||||
case DP_5ESS:
|
||||
p2p = 0;
|
||||
addpatchvalue("PROTOCOL", "\005", 1);
|
||||
if (dn1 && spid1) {
|
||||
addpatchvalue("DN", dn1, strlen(dn1));
|
||||
addpatchvalue("SPID", spid1, strlen(spid1));
|
||||
}
|
||||
if (dn2 && spid2) {
|
||||
addpatchvalue("DN2", dn2, strlen(dn2));
|
||||
addpatchvalue("SPID2", spid2, strlen(spid2));
|
||||
}
|
||||
break;
|
||||
case DP_DSS1MOBIL:
|
||||
addpatchvalue("PatchMobileMode", "0", 1);
|
||||
break;
|
||||
case DP_1TR6MOBIL:
|
||||
addpatchvalue("PatchMobileMode", "0", 1);
|
||||
break;
|
||||
case DP_GSM:
|
||||
break;
|
||||
case DP_1TR6:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
if (p2p) {
|
||||
addpatchvalue("P2P", "\001", 1);
|
||||
addpatchvalue("TEI", "\000", 1);
|
||||
}
|
||||
t4config->len = patchlen+1;
|
||||
t4config->data = patcharea;
|
||||
if (debugpatch) {
|
||||
FILE *fp = fopen("/tmp/b1.pvals", "w");
|
||||
if (fp) {
|
||||
fwrite(t4config->data, t4config->len, 1, fp);
|
||||
fclose(fp);
|
||||
fprintf(stderr, "avmcapictrl: patchvalues written to /tmp/b1.pvals\n");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int validports[] =
|
||||
{0x150, 0x250, 0x300, 0x340, 0};
|
||||
int validirqs[] = { 3, 4, 5, 6, 7, 9, 10, 11, 12, 15, 0};
|
||||
int validhemairqs[] = { 3, 5, 7, 9, 10, 11, 12, 15, 0};
|
||||
|
||||
static int checkportandirq(int cardtype, int port, int irq)
|
||||
{
|
||||
int i;
|
||||
if (cardtype == AVM_CARDTYPE_T1) {
|
||||
if ((port & 0xf) != 0) {
|
||||
fprintf(stderr, "%s: illegal port %d\n", cmd, port);
|
||||
fprintf(stderr, "%s: 3 low bits had to be zero\n", cmd);
|
||||
return -1;
|
||||
}
|
||||
if ((port & 0x30) == 0x30) {
|
||||
fprintf(stderr, "%s: illegal port %d\n", cmd, port);
|
||||
fprintf(stderr, "%s: bit 4 and 5 can not be one together\n", cmd);
|
||||
return -1;
|
||||
}
|
||||
for (i = 0; validhemairqs[i] && irq != validhemairqs[i]; i++);
|
||||
if (!validhemairqs[i]) {
|
||||
fprintf(stderr, "%s: illegal irq %d\n", cmd, irq);
|
||||
fprintf(stderr, "%s: try one of %d", cmd, validhemairqs[0]);
|
||||
for (i = 1; validhemairqs[i]; i++)
|
||||
fprintf(stderr, ", %d", validhemairqs[i]);
|
||||
fprintf(stderr, "\n");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; validports[i] && port != validports[i]; i++);
|
||||
if (!validports[i]) {
|
||||
fprintf(stderr, "%s: illegal io-addr 0x%x\n", cmd, port);
|
||||
fprintf(stderr, "%s: try one of 0x%x", cmd, validports[0]);
|
||||
for (i = 1; validports[i]; i++)
|
||||
fprintf(stderr, ", 0x%x", validports[i]);
|
||||
fprintf(stderr, "\n");
|
||||
return -1;
|
||||
}
|
||||
for (i = 0; validirqs[i] && irq != validirqs[i]; i++);
|
||||
if (!validirqs[i]) {
|
||||
fprintf(stderr, "%s: illegal irq %d\n", cmd, irq);
|
||||
fprintf(stderr, "%s: try one of %d", cmd, validirqs[0]);
|
||||
for (i = 1; validirqs[i]; i++)
|
||||
fprintf(stderr, ", %d", validirqs[i]);
|
||||
fprintf(stderr, "\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
int ac;
|
||||
capi_manufacturer_cmd ioctl_s;
|
||||
avmb1_extcarddef newcard;
|
||||
avmb1_loadandconfigdef ldef;
|
||||
avmb1_resetdef rdef;
|
||||
avmb1_getdef gdef;
|
||||
int newdriver;
|
||||
char *dn1 = 0;
|
||||
char *spid1 = 0;
|
||||
char *dn2 = 0;
|
||||
char *spid2 = 0;
|
||||
|
||||
cmd = strrchr(argv[0], '/');
|
||||
cmd = (cmd == NULL) ? argv[0] : ++cmd;
|
||||
if (argc > 1) {
|
||||
arg_ofs = 1;
|
||||
} else
|
||||
usage();
|
||||
ac = argc - (arg_ofs - 1);
|
||||
fd = open("/dev/capi20", O_RDWR);
|
||||
if (fd < 0) {
|
||||
switch (errno) {
|
||||
case ENOENT:
|
||||
perror("Device file /dev/capi20 missing, use instdev");
|
||||
exit(2);
|
||||
case ENODEV:
|
||||
perror("device capi20 not registered");
|
||||
fprintf(stderr, "look in /proc/devices.\n");
|
||||
fprintf(stderr, "maybe the devicefiles are installed with a wrong majornumber,\n");
|
||||
fprintf(stderr, "or you linux kernel version only supports 64 char device (check /usr/include/linux/major.h)\n");
|
||||
exit(2);
|
||||
}
|
||||
perror("/dev/capi20");
|
||||
exit(-1);
|
||||
}
|
||||
gdef.contr = 0;
|
||||
ioctl_s.cmd = AVMB1_GET_CARDINFO;
|
||||
ioctl_s.data = &gdef;
|
||||
newdriver = 0;
|
||||
|
||||
if ((ioctl(fd, CAPI_MANUFACTURER_CMD, &ioctl_s)) < 0) {
|
||||
if (errno != EINVAL)
|
||||
newdriver = 1;
|
||||
} else {
|
||||
newdriver = 1;
|
||||
}
|
||||
|
||||
if (!strcasecmp(argv[arg_ofs], "add")) {
|
||||
int port, irq, cardtype, cardnr = 0;
|
||||
if (ac >= 4) {
|
||||
sscanf(argv[arg_ofs + 1], "%i", &port);
|
||||
sscanf(argv[arg_ofs + 2], "%i", &irq);
|
||||
if (argv[arg_ofs + 3]) {
|
||||
if (strcasecmp(argv[arg_ofs + 3],"B1") == 0) {
|
||||
cardtype = AVM_CARDTYPE_B1;
|
||||
} else if (strcasecmp(argv[arg_ofs + 3],"T1") == 0) {
|
||||
cardtype = AVM_CARDTYPE_T1;
|
||||
if (argv[arg_ofs + 4])
|
||||
sscanf(argv[arg_ofs + 4], "%i", &cardnr);
|
||||
} else {
|
||||
fprintf(stderr, "%s: illegal cardtype \"%s\"\n", cmd, argv[arg_ofs + 3]);
|
||||
fprintf(stderr, "%s: try one of B1,T1", cmd);
|
||||
exit(-1);
|
||||
}
|
||||
} else {
|
||||
cardtype = AVM_CARDTYPE_B1;
|
||||
}
|
||||
if (checkportandirq(cardtype, port, irq) != 0)
|
||||
exit(1);
|
||||
newcard.port = port;
|
||||
newcard.irq = irq;
|
||||
newcard.cardtype = cardtype;
|
||||
newcard.cardnr = cardnr;
|
||||
if (!newdriver && cardtype != AVM_CARDTYPE_B1) {
|
||||
fprintf(stderr, "%s: only B1 supported by kernel driver, sorry\n", cmd);
|
||||
exit(1);
|
||||
}
|
||||
if (newdriver)
|
||||
ioctl_s.cmd = AVMB1_ADDCARD_WITH_TYPE;
|
||||
else ioctl_s.cmd = AVMB1_ADDCARD;
|
||||
ioctl_s.data = &newcard;
|
||||
if ((ioctl(fd, CAPI_MANUFACTURER_CMD, &ioctl_s)) < 0) {
|
||||
perror("ioctl ADDCARD");
|
||||
exit(-1);
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if ( strcasecmp(argv[arg_ofs], "load") == 0
|
||||
|| strcasecmp(argv[arg_ofs], "test") == 0 ) {
|
||||
struct stat st;
|
||||
int codefd;
|
||||
int contr = 1;
|
||||
int protocol = 0;
|
||||
int p2p = 0;
|
||||
|
||||
if (strcasecmp(argv[arg_ofs], "test") == 0)
|
||||
debugpatch = 1;
|
||||
|
||||
if (ac == 2) {
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ac > 3)
|
||||
contr = atoi(argv[arg_ofs + 2]);
|
||||
|
||||
if (ac > 4) {
|
||||
if (!newdriver) {
|
||||
fprintf(stderr, "%s: need newer kernel driver to set protocol\n",
|
||||
cmd);
|
||||
exit(1);
|
||||
}
|
||||
protocol = dchan_protocol(argv[arg_ofs + 3]);
|
||||
if (protocol < 0) {
|
||||
fprintf(stderr,"invalid protocol \"%s\"\n",
|
||||
argv[arg_ofs + 3]);
|
||||
show_protocols();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
if (ac > 5) {
|
||||
if (strcasecmp(argv[arg_ofs + 4], "P2P") == 0) {
|
||||
p2p = 1;
|
||||
} else {
|
||||
if (protocol != DP_5ESS && protocol != DP_NI1) {
|
||||
fprintf(stderr,"parameter should be P2P not \"%s\"\n",
|
||||
argv[arg_ofs + 4]);
|
||||
exit(1);
|
||||
}
|
||||
dn1 = argv[arg_ofs + 4];
|
||||
spid1 = strchr(dn1, ':');
|
||||
if (spid1 == 0) {
|
||||
fprintf(stderr,"DN1 and SPID1 should be spearated by ':s': %s\n",
|
||||
argv[arg_ofs + 4]);
|
||||
exit(1);
|
||||
|
||||
}
|
||||
*spid1++ = 0;
|
||||
if (ac > 6) {
|
||||
dn2 = argv[arg_ofs + 5];
|
||||
spid2 = strchr(dn2, ':');
|
||||
if (spid2 == 0) {
|
||||
fprintf(stderr,"DN2 and SPID2 should be spearated by ':s': %s\n",
|
||||
argv[arg_ofs + 5]);
|
||||
exit(1);
|
||||
|
||||
}
|
||||
*spid2++ = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (stat(argv[arg_ofs + 1], &st)) {
|
||||
perror(argv[arg_ofs + 1]);
|
||||
exit(2);
|
||||
}
|
||||
if (!(codefd = open(argv[arg_ofs + 1], O_RDONLY))) {
|
||||
perror(argv[arg_ofs + 1]);
|
||||
exit(2);
|
||||
}
|
||||
ldef.contr = contr;
|
||||
ldef.t4file.len = st.st_size;
|
||||
ldef.t4file.data = mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, codefd, 0);
|
||||
if (ldef.t4file.data == (unsigned char *) -1) {
|
||||
perror("mmap");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
ldef.t4config.len = 0;
|
||||
ldef.t4config.data = 0;
|
||||
if (protocol || p2p || (dn1 && spid1) || (dn2 && spid2)) {
|
||||
set_configuration(&ldef.t4config, protocol, p2p,
|
||||
dn1, spid1, dn2, spid2);
|
||||
if (debugpatch)
|
||||
exit(0);
|
||||
} else if (debugpatch) {
|
||||
fprintf(stderr,"avmcapictrl: no patchvalues needed\n");
|
||||
}
|
||||
printf("Loading Bootcode %s ... ", argv[arg_ofs + 1]);
|
||||
fflush(stdout);
|
||||
if (newdriver)
|
||||
ioctl_s.cmd = AVMB1_LOAD_AND_CONFIG;
|
||||
else ioctl_s.cmd = AVMB1_LOAD;
|
||||
ioctl_s.data = &ldef;
|
||||
if ((ioctl(fd, CAPI_MANUFACTURER_CMD, &ioctl_s)) < 0) {
|
||||
perror("\nioctl LOAD");
|
||||
exit(2);
|
||||
}
|
||||
munmap(ldef.t4file.data, ldef.t4file.len);
|
||||
close(codefd);
|
||||
close(fd);
|
||||
printf("done\n");
|
||||
return 0;
|
||||
}
|
||||
if (!strcasecmp(argv[arg_ofs], "reset")) {
|
||||
int contr = 1;
|
||||
|
||||
if (ac > 2)
|
||||
contr = atoi(argv[arg_ofs + 1]);
|
||||
|
||||
rdef.contr = contr;
|
||||
ioctl_s.cmd = AVMB1_RESETCARD;
|
||||
ioctl_s.data = &rdef;
|
||||
if ((ioctl(fd, CAPI_MANUFACTURER_CMD, &ioctl_s)) < 0) {
|
||||
perror("\nioctl RESET");
|
||||
exit(2);
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
if ( !strcasecmp(argv[arg_ofs], "remove")
|
||||
|| !strcasecmp(argv[arg_ofs], "del")) {
|
||||
int contr = 1;
|
||||
|
||||
if (ac > 2)
|
||||
contr = atoi(argv[arg_ofs + 1]);
|
||||
|
||||
rdef.contr = contr;
|
||||
ioctl_s.cmd = AVMB1_REMOVECARD;
|
||||
ioctl_s.data = &rdef;
|
||||
if ((ioctl(fd, CAPI_MANUFACTURER_CMD, &ioctl_s)) < 0) {
|
||||
perror("\nioctl RESET");
|
||||
exit(2);
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
usage();
|
||||
return 0;
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
.\" $Id$
|
||||
.\"
|
||||
.\" CHECKIN $Date$
|
||||
.\"
|
||||
.TH AVMCAPICTRL 8 "@MANDATE@" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
avmcapictrl \- Add AVM-B1 cards and load firmware
|
||||
.SH SYNOPSIS
|
||||
avmcapictrl add <portbase> <irq> <type>
|
||||
.br
|
||||
avmcapictrl load <bootcode> [<contrnr> [<protocol>
|
||||
.br
|
||||
[P2P | <dn1>:<spid1> [<dn2>:<spid2>]]]]
|
||||
.br
|
||||
avmcapictrl reset [contrnr]
|
||||
.SH DESCRIPTION
|
||||
.I avmcapictrl
|
||||
is used to register AVM-B1 ISA cards to the
|
||||
kernelcapi system and therewith to the isdn system.
|
||||
You need it also to upload the firmware to any AVM-B1 card.
|
||||
.LP
|
||||
The use of
|
||||
.I avmcapictrl
|
||||
makes sense, if you are using an AVM-B1-card only.
|
||||
.LP
|
||||
.SH COMMANDS
|
||||
.TP 5
|
||||
.B add <portbase> <irq> <type>
|
||||
is used to add a card to the kernel-capi2.0 system.
|
||||
The
|
||||
.I portbase
|
||||
can have the values 0x150, 0x250, 0x300 and 0x340,
|
||||
look at the jumper on the card.
|
||||
The
|
||||
.I irq
|
||||
can be selected from the following values:
|
||||
3, 4, 5, 6, 7, 9, 10, 11, 12 and 15.
|
||||
.I type
|
||||
can be B1 or T1.
|
||||
.LP
|
||||
.TP 5
|
||||
.B load <bootcode> [<contrnr> [<protocol>
|
||||
.B [P2P | <dn1>:<spid1> [<dn2>:<spid2>]]]]
|
||||
is used to load the firmware to a card
|
||||
.I bootcode
|
||||
is a t4-file. The actual versions of the t4-files for the different
|
||||
d-channel protocols can be found at
|
||||
ftp://calle.in-berlin.de/pub/linux/avmb1/firmware.
|
||||
you need different t4-files for different d channel protocols:
|
||||
b1-1tr6.t4 for 1TR6, b1.t4 for DSS1, D64S, D64S2, D64SD, DS01, DS02, CT1,
|
||||
VN3 or AUSTEL and b1-usa.t4 for 5ESS and NI1 (DSS1 is also supported).
|
||||
For M1/M2 PCMCIA cards you need m1-s10.t4 or m1-s4.t4 depending on the
|
||||
handy type used.
|
||||
.I contrnr
|
||||
is the number of the controller (card) starting from 1.
|
||||
.I protocol
|
||||
can be DSS1, D64S, D64S2, D64SD, DS01, DS02, CT1, VN3, AUSTEL, 5ESS or NI1.
|
||||
.I P2P
|
||||
point to point
|
||||
.I DN1:SPID1 DN2:SPID2
|
||||
is for the american protocols 5ESS and NI1.
|
||||
.LP
|
||||
.TP 5
|
||||
.B reset [contrnr]
|
||||
is used to reset a card if loading has failed.
|
||||
This function only make sence if card is not successfully loaded.
|
||||
.I contrnr
|
||||
is the number of the controller (card) starting from 1.
|
||||
|
||||
.SH AUTHOR
|
||||
Carsten Paeth <calle@calle.in-berlin.de>
|
||||
.LP
|
||||
.SH SEE ALSO
|
||||
.I ttyI\c
|
||||
\&(4),
|
||||
.I isdnctrl\c
|
||||
\&(8),
|
||||
.I isdninfo\c
|
||||
\&(4).
|
File diff suppressed because it is too large
Load Diff
|
@ -1,61 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(avmcapictrl.c)
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
|
||||
I4LVERSION=${I4LVERSION:-"?.?"}
|
||||
CONFIG_DATADIR=${CONFIG_DATADIR:-"/usr/lib/isdn"}
|
||||
CONFIG_MANDIR=`eval echo ${CONFIG_MANDIR:-"/usr/man"}`
|
||||
CONFIG_SBINDIR=`eval echo ${CONFIG_SBINDIR:-"/sbin"}`
|
||||
CONFIG_KERNELDIR=`eval echo ${CONFIG_KERNELDIR:-"/usr/src/linux"}`
|
||||
MANDATE=`grep CHECKIN avmcapictrl.man.in | awk '{print $4}'`
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
|
||||
dnl Check for kernel stuff
|
||||
AC_FIND_KERNEL
|
||||
AC_CHECK_HEADERS($CONFIG_KERNELDIR/include/linux/isdn.h $CONFIG_KERNELDIR/include/linux/b1lli.h $CONFIG_KERNELDIR/include/linux/capi.h $CONFIG_KERNELDIR/include/linux/kernelcapi.h,,
|
||||
AC_MSG_ERROR("Missing $ac_hdr. Kernel source installed?"))
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_CHECK_FUNCS(mmap)
|
||||
|
||||
dnl Optional firmware directory
|
||||
AC_ARG_WITH(firmware,
|
||||
[ --with-firmware=DIR Set dir where firmware istalled. [/usr/lib/isdn]],
|
||||
CONFIG_DATADIR="${withval}"
|
||||
AC_DEFINE(CONFIG_DATADIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Optional sbin directory
|
||||
AC_ARG_WITH(sbin,
|
||||
[ --with-sbin=DIR Set dir where binary is istalled. [/sbin]],
|
||||
CONFIG_SBINDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_SBINDIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Optional man directory
|
||||
AC_ARG_WITH(man,
|
||||
[ --with-man=DIR Set manpage dir. [/usr/man]],
|
||||
CONFIG_MANDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_MANDIR,"${withval}"),
|
||||
)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(I4LVERSION)
|
||||
AC_SUBST(CONFIG_SBINDIR)
|
||||
AC_SUBST(CONFIG_DATADIR)
|
||||
AC_SUBST(CONFIG_MANDIR)
|
||||
AC_SUBST(CONFIG_KERNELDIR)
|
||||
AC_OUTPUT(Makefile avmcapictrl.man)
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exit 0
|
|
@ -1,5 +0,0 @@
|
|||
config.log
|
||||
config.cache
|
||||
config.status
|
||||
Makefile
|
||||
comperr
|
|
@ -1,52 +0,0 @@
|
|||
# $Id$
|
||||
#
|
||||
# Makefile for libcapi20
|
||||
# (C) 1998 Carsten Paeth
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.1 1998/08/25 16:33:14 calle
|
||||
# Added CAPI2.0 library. First Version.
|
||||
#
|
||||
#
|
||||
|
||||
prefix := @prefix@
|
||||
exec_prefix := @exec_prefix@
|
||||
|
||||
LIBDIR := @libdir@
|
||||
INCLUDEDIR := @includedir@
|
||||
INSTALL := @INSTALL@
|
||||
INSTALL_DATA := $(INSTALL) -m 0644 -o 0 -g 0
|
||||
|
||||
all: libcapi20.a
|
||||
|
||||
install: all
|
||||
$(INSTALL_DATA) libcapi20.a $(LIBDIR)
|
||||
$(INSTALL_DATA) capi20.h $(INCLUDEDIR)
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
||||
|
||||
.depend:
|
||||
$(CPP) -M $(CFLAGS) $(DEFS) *.c >.depend
|
||||
|
||||
depend: .depend
|
||||
|
||||
config:
|
||||
@./configure
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
config.status: configure
|
||||
./config.status --recheck
|
||||
|
||||
libcapi20.a: capi20.o capifunc.o convert.o
|
||||
@rm -f $@
|
||||
$(AR) cvq $@ $^
|
||||
|
||||
clean:
|
||||
rm -f *.o libcapi20.a libcapi20.so.* comperr
|
||||
|
||||
distclean: clean
|
||||
rm -f config.status config.cache config.log Makefile .depend
|
|
@ -1 +0,0 @@
|
|||
sinclude(../etc/ackernel.m4)dnl
|
323
capi20/capi20.c
323
capi20/capi20.c
|
@ -1,323 +0,0 @@
|
|||
/*
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1 1998/08/25 16:33:16 calle
|
||||
* Added CAPI2.0 library. First Version.
|
||||
*
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <linux/capi.h>
|
||||
#include "capi20.h"
|
||||
|
||||
static int capi_fd = -1;
|
||||
static capi_ioctl_struct ioctl_data;
|
||||
static unsigned char rcvbuf[128+2048]; /* message + data */
|
||||
static unsigned char sndbuf[128+2048]; /* message + data */
|
||||
|
||||
unsigned capi20_isinstalled (void)
|
||||
{
|
||||
if (capi_fd >= 0)
|
||||
return 1;
|
||||
|
||||
/*----- open managment link -----*/
|
||||
if ((capi_fd = open("/dev/capi20", O_RDWR, 0666)) < 0)
|
||||
return 0;
|
||||
|
||||
return ioctl(capi_fd, CAPI_INSTALLED, 0) == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* managment of application ids
|
||||
*/
|
||||
|
||||
static struct capi_applidmap {
|
||||
int used;
|
||||
int fd;
|
||||
} capi_applidmap[CAPI_MAXAPPL] = {0};
|
||||
|
||||
static inline _cword allocapplid(int fd)
|
||||
{
|
||||
_cword i;
|
||||
for (i=0; i < CAPI_MAXAPPL; i++) {
|
||||
if (capi_applidmap[i].used == 0) {
|
||||
capi_applidmap[i].used = 1;
|
||||
capi_applidmap[i].fd = fd;
|
||||
return i+1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void freeapplid(_cword applid)
|
||||
{
|
||||
capi_applidmap[applid-1].used = 0;
|
||||
capi_applidmap[applid-1].fd = -1;
|
||||
}
|
||||
|
||||
static inline int validapplid(_cword applid)
|
||||
{
|
||||
return applid > 0 && applid <= CAPI_MAXAPPL
|
||||
&& capi_applidmap[applid-1].used;
|
||||
}
|
||||
|
||||
static inline int applid2fd(_cword applid)
|
||||
{
|
||||
if (applid < CAPI_MAXAPPL)
|
||||
return capi_applidmap[applid-1].fd;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* CAPI2.0 functions
|
||||
*/
|
||||
|
||||
_cword
|
||||
capi20_register (unsigned MaxB3Connection,
|
||||
unsigned MaxB3Blks,
|
||||
unsigned MaxSizeB3,
|
||||
CAPI_REGISTER_ERROR *ErrorCode)
|
||||
{
|
||||
_cword applid;
|
||||
char buf[PATH_MAX];
|
||||
int i, fd = -1;
|
||||
|
||||
if (!capi20_isinstalled()) {
|
||||
*ErrorCode = CapiRegNotInstalled;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*ErrorCode = CapiRegOSResourceErr;
|
||||
|
||||
for (i=0; fd < 0; i++) {
|
||||
/*----- open pseudo-clone device -----*/
|
||||
sprintf(buf, "/dev/capi20.%02d", i);
|
||||
if ((fd = open(buf, O_RDWR|O_NONBLOCK, 0666)) < 0) {
|
||||
switch (errno) {
|
||||
case EEXIST:
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((applid = allocapplid(fd)) == 0)
|
||||
return 0;
|
||||
|
||||
ioctl_data.rparams.level3cnt = MaxB3Connection;
|
||||
ioctl_data.rparams.datablkcnt = MaxB3Blks;
|
||||
ioctl_data.rparams.datablklen = MaxSizeB3;
|
||||
|
||||
if (ioctl(fd, CAPI_REGISTER, &ioctl_data) < 0) {
|
||||
if (errno == EIO) {
|
||||
if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0)
|
||||
return 0;
|
||||
*ErrorCode = ioctl_data.errcode;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return applid;
|
||||
}
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR
|
||||
capi20_release (unsigned Appl_Id)
|
||||
{
|
||||
if (!capi20_isinstalled())
|
||||
return CapiRegNotInstalled;
|
||||
if (!validapplid(Appl_Id))
|
||||
return CapiIllAppNr;
|
||||
(void)close(applid2fd(Appl_Id));
|
||||
freeapplid(Appl_Id);
|
||||
return CapiNoError;
|
||||
}
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR
|
||||
capi20_put_message (CAPI_MESSAGE Msg, unsigned Appl_Id)
|
||||
{
|
||||
MESSAGE_EXCHANGE_ERROR ret;
|
||||
int len = (Msg[0] | (Msg[1] << 8));
|
||||
int cmd = Msg[4];
|
||||
int subcmd = Msg[5];
|
||||
int rc;
|
||||
int fd;
|
||||
|
||||
if (!capi20_isinstalled())
|
||||
return CapiRegNotInstalled;
|
||||
|
||||
if (!validapplid(Appl_Id))
|
||||
return CapiIllAppNr;
|
||||
|
||||
fd = applid2fd(Appl_Id);
|
||||
|
||||
memcpy(sndbuf, Msg, len);
|
||||
|
||||
if (cmd == CAPI_DATA_B3 && subcmd == CAPI_REQ) {
|
||||
int datalen = (Msg[16] | (Msg[17] << 8));
|
||||
void *dataptr = (void *)(Msg[12]|(Msg[13]<<8)|(Msg[14]<<16)|(Msg[15]<<24));
|
||||
memcpy(sndbuf+len, dataptr, datalen);
|
||||
len += datalen;
|
||||
}
|
||||
|
||||
ret = CapiNoError;
|
||||
errno = 0;
|
||||
|
||||
if ((rc = write(fd, sndbuf, len)) != len) {
|
||||
switch (errno) {
|
||||
case EFAULT:
|
||||
case EINVAL:
|
||||
ret = CapiIllCmdOrSubcmdOrMsgToSmall;
|
||||
break;
|
||||
case EBADF:
|
||||
ret = CapiIllAppNr;
|
||||
break;
|
||||
case EIO:
|
||||
if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0)
|
||||
ret = CapiMsgOSResourceErr;
|
||||
else ret = (MESSAGE_EXCHANGE_ERROR)ioctl_data.errcode;
|
||||
break;
|
||||
default:
|
||||
ret = CapiMsgOSResourceErr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR
|
||||
capi20_get_message (unsigned Appl_Id, CAPI_MESSAGE *ReturnMessage)
|
||||
{
|
||||
MESSAGE_EXCHANGE_ERROR ret;
|
||||
int rc, fd;
|
||||
|
||||
if (!capi20_isinstalled())
|
||||
return CapiRegNotInstalled;
|
||||
|
||||
if (!validapplid(Appl_Id))
|
||||
return CapiIllAppNr;
|
||||
|
||||
fd = applid2fd(Appl_Id);
|
||||
|
||||
*ReturnMessage = rcvbuf;
|
||||
if ((rc = read(fd, rcvbuf, sizeof(rcvbuf))) > 0) {
|
||||
return CapiNoError;
|
||||
}
|
||||
|
||||
if (rc == 0)
|
||||
return CapiReceiveQueueEmpty;
|
||||
|
||||
switch (errno) {
|
||||
case EMSGSIZE:
|
||||
ret = CapiIllCmdOrSubcmdOrMsgToSmall;
|
||||
break;
|
||||
case EAGAIN:
|
||||
return CapiReceiveQueueEmpty;
|
||||
default:
|
||||
ret = CapiMsgOSResourceErr;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
CAPI_MESSAGE
|
||||
capi20_get_manufacturer(unsigned contr, CAPI_MESSAGE LpBuffer)
|
||||
{
|
||||
if (!capi20_isinstalled())
|
||||
return 0;
|
||||
ioctl_data.contr = contr;
|
||||
if (ioctl(capi_fd, CAPI_GET_MANUFACTURER, &ioctl_data) < 0)
|
||||
return 0;
|
||||
strncpy(LpBuffer, ioctl_data.manufacturer, CAPI_MANUFACTURER_LEN);
|
||||
return LpBuffer;
|
||||
}
|
||||
|
||||
CAPI_MESSAGE
|
||||
capi20_get_version(unsigned contr, CAPI_MESSAGE version)
|
||||
{
|
||||
if (!capi20_isinstalled())
|
||||
return 0;
|
||||
ioctl_data.contr = contr;
|
||||
if (ioctl(capi_fd, CAPI_GET_VERSION, &ioctl_data) < 0)
|
||||
return 0;
|
||||
memcpy(version, &ioctl_data.version, sizeof(capi_version));
|
||||
return version;
|
||||
}
|
||||
|
||||
CAPI_MESSAGE
|
||||
capi20_get_serial_number(unsigned contr, CAPI_MESSAGE LpBuffer)
|
||||
{
|
||||
if (!capi20_isinstalled())
|
||||
return 0;
|
||||
ioctl_data.contr = contr;
|
||||
if (ioctl(capi_fd, CAPI_GET_SERIAL, &ioctl_data) < 0)
|
||||
return 0;
|
||||
memcpy(LpBuffer, &ioctl_data.serial, CAPI_SERIAL_LEN);
|
||||
return LpBuffer;
|
||||
}
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR
|
||||
capi20_get_profile(unsigned Controller, CAPI_MESSAGE LpBuffer)
|
||||
{
|
||||
if (!capi20_isinstalled())
|
||||
return CapiMsgNotInstalled;
|
||||
|
||||
ioctl_data.contr = Controller;
|
||||
if (ioctl(capi_fd, CAPI_GET_PROFILE, &ioctl_data) < 0) {
|
||||
if (errno != EIO)
|
||||
return CapiMsgOSResourceErr;
|
||||
if (ioctl(capi_fd, CAPI_GET_ERRCODE, &ioctl_data) < 0)
|
||||
return CapiMsgOSResourceErr;
|
||||
return (MESSAGE_EXCHANGE_ERROR)ioctl_data.errcode;
|
||||
}
|
||||
if (Controller)
|
||||
memcpy(LpBuffer, &ioctl_data.profile, CAPI_SERIAL_LEN);
|
||||
else
|
||||
memcpy(LpBuffer, &ioctl_data.profile.ncontroller,
|
||||
sizeof(ioctl_data.profile.ncontroller));
|
||||
return CapiNoError;
|
||||
}
|
||||
/*
|
||||
* functions added to the CAPI2.0 spec
|
||||
*/
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR
|
||||
capi20_waitformessage(_cword Appl_Id, struct timeval *tvp)
|
||||
{
|
||||
int fd;
|
||||
fd_set rfds;
|
||||
int retval;
|
||||
|
||||
FD_ZERO(&rfds);
|
||||
|
||||
if(!capi20_isinstalled())
|
||||
return CapiRegNotInstalled;
|
||||
|
||||
if(!validapplid(Appl_Id))
|
||||
return CapiIllAppNr;
|
||||
|
||||
fd = applid2fd(Appl_Id);
|
||||
|
||||
FD_SET(fd, &rfds);
|
||||
|
||||
fcntl(fd, F_SETFL, !O_NONBLOCK);
|
||||
retval = select(fd + 1, &rfds, NULL, NULL, tvp);
|
||||
fcntl(fd, F_SETFL, O_NONBLOCK);
|
||||
|
||||
return(CapiNoError);
|
||||
}
|
||||
|
||||
int
|
||||
capi20_fileno(_cword applid)
|
||||
{
|
||||
return applid2fd(applid);
|
||||
}
|
||||
|
962
capi20/capi20.h
962
capi20/capi20.h
|
@ -1,962 +0,0 @@
|
|||
#ifndef __CAPI20_H
|
||||
#define __CAPI20_H
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*----- basic-type definitions -----*/
|
||||
|
||||
typedef unsigned char *CAPI_MESSAGE;
|
||||
typedef unsigned char _cbyte;
|
||||
typedef unsigned short _cword;
|
||||
typedef unsigned long _cdword;
|
||||
typedef CAPI_MESSAGE _cstruct;
|
||||
typedef enum { CAPI_COMPOSE = 0, CAPI_DEFAULT = 1 } _cmstruct;
|
||||
|
||||
/*----- errornumbers -----*/
|
||||
|
||||
typedef enum {
|
||||
CapiToManyAppls =0x1001,
|
||||
CapiLogBlkSizeToSmall =0x1002,
|
||||
CapiBuffExeceeds64k =0x1003,
|
||||
CapiMsgBufSizeToSmall =0x1004,
|
||||
CapiAnzLogConnNotSupported =0x1005,
|
||||
CapiRegReserved =0x1006,
|
||||
CapiRegBusy =0x1007,
|
||||
CapiRegOSResourceErr =0x1008,
|
||||
CapiRegNotInstalled =0x1009,
|
||||
CapiRegCtrlerNotSupportExtEquip =0x100a,
|
||||
CapiRegCtrlerOnlySupportExtEquip =0x100b
|
||||
} CAPI_REGISTER_ERROR;
|
||||
|
||||
typedef enum {
|
||||
CapiNoError =0x0000,
|
||||
CapiIllAppNr =0x1101,
|
||||
CapiIllCmdOrSubcmdOrMsgToSmall =0x1102,
|
||||
CapiSendQueueFull =0x1103,
|
||||
CapiReceiveQueueEmpty =0x1104,
|
||||
CapiReceiveOverflow =0x1105,
|
||||
CapiUnknownNotPar =0x1106,
|
||||
CapiMsgBusy =0x1107,
|
||||
CapiMsgOSResourceErr =0x1108,
|
||||
CapiMsgNotInstalled =0x1109,
|
||||
CapiMsgCtrlerNotSupportExtEquip =0x110a,
|
||||
CapiMsgCtrlerOnlySupportExtEquip =0x110b
|
||||
} MESSAGE_EXCHANGE_ERROR;
|
||||
|
||||
/*----- CAPI commands -----*/
|
||||
|
||||
#define CAPI_ALERT 0x01
|
||||
#define CAPI_CONNECT 0x02
|
||||
#define CAPI_CONNECT_ACTIVE 0x03
|
||||
#define CAPI_CONNECT_B3_ACTIVE 0x83
|
||||
#define CAPI_CONNECT_B3 0x82
|
||||
#define CAPI_CONNECT_B3_T90_ACTIVE 0x88
|
||||
#define CAPI_DATA_B3 0x86
|
||||
#define CAPI_DISCONNECT_B3 0x84
|
||||
#define CAPI_DISCONNECT 0x04
|
||||
#define CAPI_FACILITY 0x80
|
||||
#define CAPI_INFO 0x08
|
||||
#define CAPI_LISTEN 0x05
|
||||
#define CAPI_MANUFACTURER 0xff
|
||||
#define CAPI_RESET_B3 0x87
|
||||
#define CAPI_SELECT_B_PROTOCOL 0x41
|
||||
|
||||
/*----- CAPI subcommands -----*/
|
||||
|
||||
#define CAPI_REQ 0x80
|
||||
#define CAPI_CONF 0x81
|
||||
#define CAPI_IND 0x82
|
||||
#define CAPI_RESP 0x83
|
||||
|
||||
/* standard CAPI2.0 functions */
|
||||
|
||||
unsigned capi20_isinstalled (void);
|
||||
|
||||
_cword capi20_register (unsigned MaxB3Connection,
|
||||
unsigned MaxB3Blks,
|
||||
unsigned MaxSizeB3,
|
||||
CAPI_REGISTER_ERROR *ErrorCode);
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR capi20_release (unsigned Appl_Id);
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR capi20_put_message (CAPI_MESSAGE Msg, unsigned Appl_Id);
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR capi20_get_message (unsigned Appl_Id, CAPI_MESSAGE *ReturnMessage);
|
||||
|
||||
CAPI_MESSAGE capi20_get_manufacturer (unsigned contr, CAPI_MESSAGE LpBuffer);
|
||||
|
||||
CAPI_MESSAGE capi20_get_version (unsigned contr, CAPI_MESSAGE version);
|
||||
|
||||
CAPI_MESSAGE capi20_get_serial_number (unsigned contr, CAPI_MESSAGE LpBuffer);
|
||||
|
||||
MESSAGE_EXCHANGE_ERROR capi20_get_profile (unsigned Controller, CAPI_MESSAGE LpBuffer);
|
||||
|
||||
/* CAPI2.0 Spec names */
|
||||
#define CAPI20_REGISTER capi20_register
|
||||
#define CAPI20_RELEASE capi20_release
|
||||
#define CAPI20_PUT_MESSAGE capi20_put_message
|
||||
#define CAPI20_GET_MESSAGE capi20_get_message
|
||||
#define CAPI20_GET_MANUFACTURER capi20_get_manufacturer
|
||||
#define CAPI20_GET_VERSION capi20_get_version
|
||||
#define CAPI20_GET_SERIAL_NUMBER capi20_get_serial_number
|
||||
#define CAPI20_GET_PROFILE capi20_get_profile
|
||||
#define CAPI20_ISINSTALLED capi20_isinstalled
|
||||
#define CAPI_CMSG_HEADER capi_cmsg_header
|
||||
#define CAPI_GET_CMSG capi_get_cmsg
|
||||
#define CAPI_PUT_CMSG capi_put_cmsg
|
||||
|
||||
/* extra functions */
|
||||
#define CAPI20_WaitforMessage capi20_waitformessage
|
||||
MESSAGE_EXCHANGE_ERROR capi20_waitformessage(_cword Appl_Id, struct timeval *tvp);
|
||||
|
||||
int capi20_fileno(_cword applid);
|
||||
|
||||
/*
|
||||
* The _cmsg structure contains all possible CAPI 2.0 parameter.
|
||||
* All parameters are stored here first. The function capi_cmsg2message()
|
||||
* assembles the parameter and builds CAPI2.0 conform messages.
|
||||
* capi_message2cmsg disassembles CAPI 2.0 messages and stores the
|
||||
* parameter in the _cmsg structure
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* Header */
|
||||
_cword ApplId;
|
||||
_cbyte Command;
|
||||
_cbyte Subcommand;
|
||||
_cword Messagenumber;
|
||||
|
||||
/* Parameter */
|
||||
union {
|
||||
_cdword adrController;
|
||||
_cdword adrPLCI;
|
||||
_cdword adrNCCI;
|
||||
} adr;
|
||||
|
||||
_cmstruct AdditionalInfo;
|
||||
_cstruct B1configuration;
|
||||
_cword B1protocol;
|
||||
_cstruct B2configuration;
|
||||
_cword B2protocol;
|
||||
_cstruct B3configuration;
|
||||
_cword B3protocol;
|
||||
_cstruct BC;
|
||||
_cstruct BChannelinformation;
|
||||
_cmstruct BProtocol;
|
||||
_cstruct CalledPartyNumber;
|
||||
_cstruct CalledPartySubaddress;
|
||||
_cstruct CallingPartyNumber;
|
||||
_cstruct CallingPartySubaddress;
|
||||
_cdword CIPmask;
|
||||
_cdword CIPmask2;
|
||||
_cword CIPValue;
|
||||
_cdword Class;
|
||||
_cstruct ConnectedNumber;
|
||||
_cstruct ConnectedSubaddress;
|
||||
_cdword Data;
|
||||
_cword DataHandle;
|
||||
_cword DataLength;
|
||||
_cstruct FacilityConfirmationParameter;
|
||||
_cstruct Facilitydataarray;
|
||||
_cstruct FacilityIndicationParameter;
|
||||
_cstruct FacilityRequestParameter;
|
||||
_cstruct FacilityResponseParameters;
|
||||
_cword FacilitySelector;
|
||||
_cword Flags;
|
||||
_cdword Function;
|
||||
_cstruct HLC;
|
||||
_cword Info;
|
||||
_cstruct InfoElement;
|
||||
_cdword InfoMask;
|
||||
_cword InfoNumber;
|
||||
_cstruct Keypadfacility;
|
||||
_cstruct LLC;
|
||||
_cstruct ManuData;
|
||||
_cdword ManuID;
|
||||
_cstruct NCPI;
|
||||
_cword Reason;
|
||||
_cword Reason_B3;
|
||||
_cword Reject;
|
||||
_cstruct Useruserdata;
|
||||
|
||||
/* intern */
|
||||
unsigned l,p;
|
||||
unsigned char *par;
|
||||
CAPI_MESSAGE m;
|
||||
} _cmsg;
|
||||
|
||||
unsigned capi_cmsg2message(_cmsg *cmsg, CAPI_MESSAGE msg);
|
||||
|
||||
unsigned capi_message2cmsg (_cmsg *cmsg, CAPI_MESSAGE msg);
|
||||
|
||||
/*
|
||||
* capi_put_cmsg() works like capi_put_message() but it converts the _cmsg
|
||||
* first with capi_cmsg2message(). Possible errors from capi_put_message()
|
||||
* will be returned.
|
||||
*/
|
||||
|
||||
unsigned capi_put_cmsg(_cmsg *cmsg);
|
||||
|
||||
/*
|
||||
* capi_get_cmsg() works like capi_get_message() and converts the CAPI message
|
||||
* to a _cmsg with capi_message2cmsg(). Possible errors from capi_get_message()
|
||||
* will be returned.
|
||||
*/
|
||||
unsigned capi_get_cmsg(_cmsg *cmsg, unsigned applid);
|
||||
|
||||
/*
|
||||
* capi_cmsg_header() fills the _cmsg structure with default values, so only
|
||||
* parameter with non default values must be changed before sending the
|
||||
* message.
|
||||
*/
|
||||
unsigned capi_cmsg_header (_cmsg *cmsg, _cword _ApplId, _cbyte _Command, _cbyte _Subcommand, _cword _Messagenumber, _cdword _Controller);
|
||||
|
||||
/*
|
||||
* capi_cmsg_answer() is used to answer indications. It changes the header
|
||||
* of an indication to a response, and leaves all other parameters the same
|
||||
*/
|
||||
unsigned capi_cmsg_answer (_cmsg *cmsg);
|
||||
|
||||
/*----- defines to access specific parameter -----*/
|
||||
|
||||
#define ALERT_REQ_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define ALERT_REQ_ADDITIONALINFO(x) ((x)->AdditionalInfo)
|
||||
/* Additional info elements */
|
||||
#define ALERT_REQ_BCHANNELINFORMATION(x) ((x)->BChannelinformation)
|
||||
#define ALERT_REQ_KEYPADFACILITY(x) ((x)->Keypadfacility)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define ALERT_REQ_USERUSERDATA(x) ((x)->Useruserdata)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define ALERT_REQ_FACILITYDATAARRAY(x) ((x)->Facilitydataarray)
|
||||
/* which is used to transfer additional parameters coded */
|
||||
/* according to ETS 300 102-1 / Q.931 starting from octet 1. */
|
||||
/* This field is used to transport one or more complete facility */
|
||||
/* data information elements. */
|
||||
#define ALERT_CONF_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define ALERT_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: alert initiated */
|
||||
/* 0x0003: alert already sent by another application */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: illegal PLCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
#define CONNECT_REQ_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define CONNECT_REQ_CIPVALUE(x) ((x)->CIPValue)
|
||||
/* Compatibility Information Profile */
|
||||
#define CONNECT_REQ_CALLEDPARTYNUMBER(x) ((x)->CalledPartyNumber)
|
||||
/* Called party number */
|
||||
#define CONNECT_REQ_CALLINGPARTYNUMBER(x) ((x)->CallingPartyNumber)
|
||||
/* Calling party number */
|
||||
#define CONNECT_REQ_CALLEDPARTYSUBADDRESS(x) ((x)->CalledPartySubaddress)
|
||||
/* Called party subaddress */
|
||||
#define CONNECT_REQ_CALLINGPARTYSUBADDRESS(x) ((x)->CallingPartySubaddress)
|
||||
/* Calling party subaddress */
|
||||
#define CONNECT_REQ_BPROTOCOL(x) ((x)->BProtocol)
|
||||
/* B protocol to be used */
|
||||
#define CONNECT_REQ_B1PROTOCOL(x) ((x)->B1protocol)
|
||||
/* Physical layer and framing */
|
||||
#define CONNECT_REQ_B2PROTOCOL(x) ((x)->B2protocol)
|
||||
/* Data link layer */
|
||||
#define CONNECT_REQ_B3PROTOCOL(x) ((x)->B3protocol)
|
||||
/* Network layer */
|
||||
#define CONNECT_REQ_B1CONFIGURATION(x) ((x)->B1configuration)
|
||||
/* Physical layer and framing parameter */
|
||||
#define CONNECT_REQ_B2CONFIGURATION(x) ((x)->B2configuration)
|
||||
/* Data link layer parameter */
|
||||
#define CONNECT_REQ_B3CONFIGURATION(x) ((x)->B3configuration)
|
||||
/* Network layer parameter */
|
||||
#define CONNECT_REQ_BC(x) ((x)->BC)
|
||||
/* Bearer Capability */
|
||||
#define CONNECT_REQ_LLC(x) ((x)->LLC)
|
||||
/* Low Layer Compatibility */
|
||||
#define CONNECT_REQ_HLC(x) ((x)->HLC)
|
||||
/* High Layer Compatibility */
|
||||
#define CONNECT_REQ_ADDITIONALINFO(x) ((x)->AdditionalInfo)
|
||||
/* Additional information elements */
|
||||
#define CONNECT_REQ_BCHANNELINFORMATION(x) ((x)->BChannelinformation)
|
||||
#define CONNECT_REQ_KEYPADFACILITY(x) ((x)->Keypadfacility)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define CONNECT_REQ_USERUSERDATA(x) ((x)->Useruserdata)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define CONNECT_REQ_FACILITYDATAARRAY(x) ((x)->Facilitydataarray)
|
||||
/* which is used to transfer additional parameters coded */
|
||||
/* according to ETS 300 102-1 / Q.931 starting from octet 1. */
|
||||
/* This field is used to transport one or more complete facility */
|
||||
/* data information elements. */
|
||||
#define CONNECT_CONF_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define CONNECT_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: connect initiated */
|
||||
/* 0x2002: illegal controller */
|
||||
/* 0x2003: out of PLCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
/* 0x3001: B1 protocol not supported */
|
||||
/* 0x3002: B2 protocol not supported */
|
||||
/* 0x3003: B3 protocol not supported */
|
||||
/* 0x3004: B1 protocol parameter not supported */
|
||||
/* 0x3005: B2 protocol parameter not supported */
|
||||
/* 0x3006: B3 protocol parameter not supported */
|
||||
/* 0x3007: B protocol combination not supported */
|
||||
/* 0x300A: CIP Value unknown */
|
||||
#define CONNECT_IND_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define CONNECT_IND_CIPVALUE(x) ((x)->CIPValue)
|
||||
/* Compatibility Information Profile */
|
||||
#define CONNECT_IND_CALLEDPARTYNUMBER(x) ((x)->CalledPartyNumber)
|
||||
/* Called party number */
|
||||
#define CONNECT_IND_CALLINGPARTYNUMBER(x) ((x)->CallingPartyNumber)
|
||||
/* Calling party number */
|
||||
#define CONNECT_IND_CALLEDPARTYSUBADDRESS(x) ((x)->CalledPartySubaddress)
|
||||
/* Called party subaddress */
|
||||
#define CONNECT_IND_CALLINGPARTYSUBADDRESS(x) ((x)->CallingPartySubaddress)
|
||||
/* Calling party subaddress */
|
||||
#define CONNECT_IND_BC(x) ((x)->BC)
|
||||
/* Bearer compatibility */
|
||||
#define CONNECT_IND_LLC(x) ((x)->LLC)
|
||||
/* Low Layer Compatibility */
|
||||
#define CONNECT_IND_HLC(x) ((x)->HLC)
|
||||
/* High Layer Compatibility */
|
||||
#define CONNECT_IND_ADDITIONALINFO(x) ((x)->AdditionalInfo)
|
||||
/* Additional information elements */
|
||||
#define CONNECT_IND_BCHANNELINFORMATION(x) ((x)->BChannelinformation)
|
||||
#define CONNECT_IND_KEYPADFACILITY(x) ((x)->Keypadfacility)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define CONNECT_IND_USERUSERDATA(x) ((x)->Useruserdata)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define CONNECT_IND_FACILITYDATAARRAY(x) ((x)->Facilitydataarray)
|
||||
/* which is used to transfer additional parameters coded */
|
||||
/* according to ETS 300 102-1 / Q.931 starting from octet 1. */
|
||||
/* This field is used to transport one or more complete facility */
|
||||
/* data information elements. */
|
||||
#define CONNECT_RESP_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define CONNECT_RESP_REJECT(x) ((x)->Reject)
|
||||
/* 0: accept call */
|
||||
/* 1: ignore call */
|
||||
/* 2: reject call, normal call clearing */
|
||||
/* 3: reject call, user busy */
|
||||
/* 4: reject call, requestet circuit/channel not available */
|
||||
/* 5: reject call, facility rejected */
|
||||
/* 6: reject call, channel unacceptable */
|
||||
/* 7: reject call, incompatible destination */
|
||||
/* 8: reject call, destination out of order */
|
||||
#define CONNECT_RESP_BPROTOCOL(x) ((x)->BProtocol)
|
||||
/* B protocol to be used */
|
||||
#define CONNECT_RESP_B1PROTOCOL(x) ((x)->B1protocol)
|
||||
/* Physical layer and framing */
|
||||
#define CONNECT_RESP_B2PROTOCOL(x) ((x)->B2protocol)
|
||||
/* Data link layer */
|
||||
#define CONNECT_RESP_B3PROTOCOL(x) ((x)->B3protocol)
|
||||
/* Network layer */
|
||||
#define CONNECT_RESP_B1CONFIGURATION(x) ((x)->B1configuration)
|
||||
/* Physical layer and framing parameter */
|
||||
#define CONNECT_RESP_B2CONFIGURATION(x) ((x)->B2configuration)
|
||||
/* Data link layer parameter */
|
||||
#define CONNECT_RESP_B3CONFIGURATION(x) ((x)->B3configuration)
|
||||
/* Network layer parameter */
|
||||
#define CONNECT_RESP_CONNECTEDNUMBER(x) ((x)->ConnectedNumber)
|
||||
/* Connected number */
|
||||
#define CONNECT_RESP_CONNECTEDSUBADDRESS(x) ((x)->ConnectedSubaddress)
|
||||
/* Connected subaddress */
|
||||
#define CONNECT_RESP_LLC(x) ((x)->LLC)
|
||||
/* Low Layer Compatibility */
|
||||
#define CONNECT_RESP_ADDITIONALINFO(x) ((x)->AdditionalInfo)
|
||||
/* Additional information elements */
|
||||
#define CONNECT_RESP_BCHANNELINFORMATION(x) ((x)->BChannelinformation)
|
||||
#define CONNECT_RESP_KEYPADFACILITY(x) ((x)->Keypadfacility)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define CONNECT_RESP_USERUSERDATA(x) ((x)->Useruserdata)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define CONNECT_RESP_FACILITYDATAARRAY(x) ((x)->Facilitydataarray)
|
||||
/* which is used to transfer additional parameters coded */
|
||||
/* according to ETS 300 102-1 / Q.931 starting from octet 1. */
|
||||
/* This field is used to transport one or more complete facility */
|
||||
/* data information elements. */
|
||||
#define CONNECT_ACTIVE_IND_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define CONNECT_ACTIVE_IND_CONNECTEDNUMBER(x) ((x)->ConnectedNumber)
|
||||
/* Connected number */
|
||||
#define CONNECT_ACTIVE_IND_CONNECTEDSUBADDRESS(x) ((x)->ConnectedSubaddress)
|
||||
/* Connected subaddress */
|
||||
#define CONNECT_ACTIVE_IND_LLC(x) ((x)->LLC)
|
||||
/* Low Layer Compatibility */
|
||||
#define CONNECT_ACTIVE_RESP_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define CONNECT_B3_ACTIVE_IND_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define CONNECT_B3_ACTIVE_IND_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define CONNECT_B3_ACTIVE_RESP_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define CONNECT_B3_REQ_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define CONNECT_B3_REQ_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define CONNECT_B3_CONF_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define CONNECT_B3_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: connect initiated */
|
||||
/* 0x0001: NCPI not supported by current protocol, NCPI ignored */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: illegal PLCI */
|
||||
/* 0x2004: out of NCCI */
|
||||
/* 0x3008: NCPI not supported */
|
||||
#define CONNECT_B3_IND_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define CONNECT_B3_IND_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define CONNECT_B3_RESP_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define CONNECT_B3_RESP_REJECT(x) ((x)->Reject)
|
||||
/* 0: accept call */
|
||||
/* 2: reject call, normal call clearing */
|
||||
#define CONNECT_B3_RESP_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define CONNECT_B3_T90_ACTIVE_IND_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define CONNECT_B3_T90_ACTIVE_IND_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define CONNECT_B3_T90_ACTIVE_RESP_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DATA_B3_REQ_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DATA_B3_REQ_DATA(x) ((x)->Data)
|
||||
/* Pointer to the data to be sent */
|
||||
#define DATA_B3_REQ_DATALENGTH(x) ((x)->DataLength)
|
||||
/* Size of data area to be sent */
|
||||
#define DATA_B3_REQ_DATAHANDLE(x) ((x)->DataHandle)
|
||||
/* Referenced in DATA_B3_CONF */
|
||||
#define DATA_B3_REQ_FLAGS(x) ((x)->Flags)
|
||||
/* [0]: qualifier bit */
|
||||
/* [1]: more data bit */
|
||||
/* [2]: delivery confirmation bit */
|
||||
/* [3]: expedited data */
|
||||
/* [4] to [15]: reserved */
|
||||
#define DATA_B3_CONF_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DATA_B3_CONF_DATAHANDLE(x) ((x)->DataHandle)
|
||||
/* Identifies the data area of corresponding DATA_B3_REQ */
|
||||
#define DATA_B3_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: data transmission initiated */
|
||||
/* 0x0002: flags not supported by current protocol, flags ignored */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: illegal NCCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
/* 0x300A: flags not supported (reserved bits) */
|
||||
/* 0x300C: data length not supported by current protocol */
|
||||
#define DATA_B3_IND_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DATA_B3_IND_DATA(x) ((x)->Data)
|
||||
/* Pointer to data received */
|
||||
#define DATA_B3_IND_DATALENGTH(x) ((x)->DataLength)
|
||||
/* Size of data area received */
|
||||
#define DATA_B3_IND_DATAHANDLE(x) ((x)->DataHandle)
|
||||
/* handle to data area, referenced in DATA_B3_RESP */
|
||||
#define DATA_B3_IND_FLAGS(x) ((x)->Flags)
|
||||
/* 0: qualifier bit */
|
||||
/* 1: more-data bit */
|
||||
/* 2: delivery confirmation bit */
|
||||
/* 3: expedited data */
|
||||
/* 4 to 14: reserved */
|
||||
/* [15]: framing error bit, data may be invalid (only with corresponding B2 protocol) */
|
||||
#define DATA_B3_RESP_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DATA_B3_RESP_DATAHANDLE(x) ((x)->DataHandle)
|
||||
/* Data area reference in corresponding DATA_B3_IND */
|
||||
#define DISCONNECT_B3_REQ_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DISCONNECT_B3_REQ_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define DISCONNECT_B3_CONF_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DISCONNECT_B3_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: disconnect initiated */
|
||||
/* 0x0001: NCPI not supported by current protocol, NCPI ignored */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: illegal NCCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
/* 0x3008: NCPI not supported */
|
||||
#define DISCONNECT_B3_IND_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DISCONNECT_B3_IND_REASON_B3(x) ((x)->Reason_B3)
|
||||
/* 0: clearing according to protocol */
|
||||
/* 0x3301: protocol error layer 1 */
|
||||
/* 0x3302: protocol error layer 2 */
|
||||
/* 0x3303: protocol error layer 3 */
|
||||
/* protocol dependent values are described in chapter 6 */
|
||||
#define DISCONNECT_B3_IND_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define DISCONNECT_B3_RESP_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define DISCONNECT_REQ_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define DISCONNECT_REQ_ADDITIONALINFO(x) ((x)->AdditionalInfo)
|
||||
/* Additional information elements */
|
||||
#define DISCONNECT_REQ_BCHANNELINFORMATION(x) ((x)->BChannelinformation)
|
||||
#define DISCONNECT_REQ_KEYPADFACILITY(x) ((x)->Keypadfacility)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define DISCONNECT_REQ_USERUSERDATA(x) ((x)->Useruserdata)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define DISCONNECT_REQ_FACILITYDATAARRAY(x) ((x)->Facilitydataarray)
|
||||
/* which is used to transfer additional parameters coded */
|
||||
/* according to ETS 300 102-1 / Q.931 starting from octet 1. */
|
||||
/* This field is used to transport one or more complete facility */
|
||||
/* data information elements. */
|
||||
#define DISCONNECT_CONF_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define DISCONNECT_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: disconnect initiated */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: illegal PLCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
#define DISCONNECT_IND_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define DISCONNECT_IND_REASON(x) ((x)->Reason)
|
||||
/* 0: no cause available */
|
||||
/* 0x3301: protocol error layer 1 */
|
||||
/* 0x3302: protocol error layer 2 */
|
||||
/* 0x3303: protocol error layer 3 */
|
||||
/* 0x3304: another application got that call */
|
||||
/* 0x34xx: disconnect cause from the network according to Q.931/ETS 300 102-1. In the field 'xx' the cause value received within a cause information element (octet 4) from the network is indicated. */
|
||||
#define DISCONNECT_RESP_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define FACILITY_REQ_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define FACILITY_REQ_PLCI(x) ((x)->adr.adrPLCI)
|
||||
#define FACILITY_REQ_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Depending on the facility selector */
|
||||
#define FACILITY_REQ_FACILITYSELECTOR(x) ((x)->FacilitySelector)
|
||||
/* 0: Handset Support */
|
||||
/* 1: DTMF */
|
||||
/* 2 to n: reserved */
|
||||
#define FACILITY_REQ_FACILITYREQUESTPARAMETER(x) ((x)->FacilityRequestParameter)
|
||||
/* Facility depending parameters */
|
||||
#define FACILITY_CONF_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define FACILITY_CONF_PLCI(x) ((x)->adr.adrPLCI)
|
||||
#define FACILITY_CONF_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Depending on the facility selector */
|
||||
#define FACILITY_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: request accepted */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: incorrect Controller/PLCI/NCCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
/* 0x300B: facility not supported */
|
||||
#define FACILITY_CONF_FACILITYSELECTOR(x) ((x)->FacilitySelector)
|
||||
/* 0: Handset Support */
|
||||
/* 1: DTMF */
|
||||
/* 2 to n: reserved */
|
||||
#define FACILITY_CONF_FACILITYCONFIRMATIONPARAMETER(x) ((x)->FacilityConfirmationParameter)
|
||||
/* Facility-depending parameters */
|
||||
#define FACILITY_IND_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define FACILITY_IND_PLCI(x) ((x)->adr.adrPLCI)
|
||||
#define FACILITY_IND_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Depending on the facility selector */
|
||||
#define FACILITY_IND_FACILITYSELECTOR(x) ((x)->FacilitySelector)
|
||||
/* 0: Handset Support */
|
||||
/* 1: DTMF */
|
||||
/* 2 to n: reserved */
|
||||
#define FACILITY_IND_FACILITYINDICATIONPARAMETER(x) ((x)->FacilityIndicationParameter)
|
||||
/* Facility-depending parameters */
|
||||
#define FACILITY_RESP_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define FACILITY_RESP_PLCI(x) ((x)->adr.adrPLCI)
|
||||
#define FACILITY_RESP_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Depending on the facility selector */
|
||||
#define FACILITY_RESP_FACILITYSELECTOR(x) ((x)->FacilitySelector)
|
||||
/* 0: Handset Support */
|
||||
/* 1: DTMF */
|
||||
/* 2 to n: reserved */
|
||||
/* Facility response parameters */
|
||||
/* struct */
|
||||
/* Facility-depending parameters */
|
||||
#define INFO_REQ_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define INFO_REQ_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* See note */
|
||||
#define INFO_REQ_CALLEDPARTYNUMBER(x) ((x)->CalledPartyNumber)
|
||||
/* Called party number */
|
||||
#define INFO_REQ_ADDITIONALINFO(x) ((x)->AdditionalInfo)
|
||||
/* Additional information elements */
|
||||
#define INFO_REQ_BCHANNELINFORMATION(x) ((x)->BChannelinformation)
|
||||
#define INFO_REQ_KEYPADFACILITY(x) ((x)->Keypadfacility)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define INFO_REQ_USERUSERDATA(x) ((x)->Useruserdata)
|
||||
/* coded according to ETS 300 102-1 / Q.931 */
|
||||
#define INFO_REQ_FACILITYDATAARRAY(x) ((x)->Facilitydataarray)
|
||||
/* which is used to transfer additional parameters coded */
|
||||
/* according to ETS 300 102-1 / Q.931 starting from octet 1. */
|
||||
/* This field is used to transport one or more complete facility */
|
||||
/* data information elements. */
|
||||
#define INFO_CONF_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define INFO_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: transmission of information initiated */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: illegal Controller/PLCI */
|
||||
/* 0x2003: out of PLCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
#define INFO_IND_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define INFO_IND_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define INFO_IND_INFONUMBER(x) ((x)->InfoNumber)
|
||||
/* Information element identifier */
|
||||
#define INFO_IND_INFOELEMENT(x) ((x)->InfoElement)
|
||||
/* Information element dependent structure */
|
||||
#define INFO_RESP_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define INFO_RESP_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* As in INFO_IND */
|
||||
#define LISTEN_REQ_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define LISTEN_REQ_INFOMASK(x) ((x)->InfoMask)
|
||||
/* Bit field, coding as follows: */
|
||||
/* 0: cause */
|
||||
/* 1: date/Time */
|
||||
/* 2: display */
|
||||
/* 3: user-user information */
|
||||
/* 4: call progression */
|
||||
/* 5: facility */
|
||||
/* 6: charging */
|
||||
/* 7 to 31: reserved */
|
||||
#define LISTEN_REQ_CIPMASK(x) ((x)->CIPmask)
|
||||
/* Bit field, coding as follows: */
|
||||
/* 0: any match */
|
||||
/* 1: speech */
|
||||
/* 2: unrestricted digital information */
|
||||
/* 3: restricted digital information */
|
||||
/* 4: 3.1 kHz audio */
|
||||
/* 5: 7.0 kHz audio */
|
||||
/* 6: video */
|
||||
/* 7: packet mode */
|
||||
/* 8: 56 kBit/s rate adaptation */
|
||||
/* 9: unrestricted digital information with tones/announcements */
|
||||
/* 10..15: reserved */
|
||||
/* 16: telephony */
|
||||
/* 17: fax group 2/3 */
|
||||
/* 18: fax group 4 class 1 */
|
||||
/* 19: Teletex service (basic and mixed), fax group 4 class 2 */
|
||||
/* 20: Teletex service (basic and processable) */
|
||||
/* 21: Teletex service (basic) */
|
||||
/* 22: Videotex */
|
||||
/* 23: Telex */
|
||||
/* reserved for additional services */
|
||||
/* 25: OSI applications according X.200 */
|
||||
/* 26: 7 kHz Telephony */
|
||||
/* 27: Video Telephony F.721, first connection */
|
||||
/* 28: Video Telephony F.721, second connection */
|
||||
/* 29 to 31: reserved */
|
||||
#define LISTEN_REQ_CIPMASK2(x) ((x)->CIPmask2)
|
||||
/* reserved for additional services */
|
||||
#define LISTEN_REQ_CALLINGPARTYNUMBER(x) ((x)->CallingPartyNumber)
|
||||
/* Calling party number */
|
||||
#define LISTEN_REQ_CALLINGPARTYSUBADDRESS(x) ((x)->CallingPartySubaddress)
|
||||
/* Calling party subaddress */
|
||||
#define LISTEN_CONF_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define LISTEN_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: listen is active */
|
||||
/* 0x2002: illegal controller */
|
||||
/* 0x2005: out of LISTEN-Resources */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
#define MANUFACTURER_REQ_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define MANUFACTURER_REQ_MANUID(x) ((x)->ManuID)
|
||||
/* Manufacturer specific ID (should be unique) */
|
||||
/* Manufacturer specific */
|
||||
#define MANUFACTURER_REQ_CLASS(x) ((x)->Class)
|
||||
#define MANUFACTURER_REQ_FUNCTION(x) ((x)->Function)
|
||||
#define MANUFACTURER_REQ_MANUDATA(x) ((x)->ManuData)
|
||||
/* Manufacturer specific data */
|
||||
#define MANUFACTURER_CONF_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define MANUFACTURER_CONF_MANUID(x) ((x)->ManuID)
|
||||
/* Manufacturer specific ID (should be unique) */
|
||||
/* Manufacturer specific */
|
||||
#define MANUFACTURER_CONF_CLASS(x) ((x)->Class)
|
||||
#define MANUFACTURER_CONF_FUNCTION(x) ((x)->Function)
|
||||
#define MANUFACTURER_CONF_MANUDATA(x) ((x)->ManuData)
|
||||
/* Manufacturer specific data */
|
||||
#define MANUFACTURER_IND_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define MANUFACTURER_IND_MANUID(x) ((x)->ManuID)
|
||||
/* Manufacturer specific ID (should be unique) */
|
||||
/* Manufacturer specific */
|
||||
#define MANUFACTURER_IND_CLASS(x) ((x)->Class)
|
||||
#define MANUFACTURER_IND_FUNCTION(x) ((x)->Function)
|
||||
#define MANUFACTURER_IND_MANUDATA(x) ((x)->ManuData)
|
||||
/* Manufacturer specific data */
|
||||
#define MANUFACTURER_RESP_CONTROLLER(x) ((x)->adr.adrController)
|
||||
#define MANUFACTURER_RESP_MANUID(x) ((x)->ManuID)
|
||||
/* Manufacturer specific ID (should be unique) */
|
||||
/* Manufacturer specific */
|
||||
#define MANUFACTURER_RESP_CLASS(x) ((x)->Class)
|
||||
#define MANUFACTURER_RESP_FUNCTION(x) ((x)->Function)
|
||||
#define MANUFACTURER_RESP_MANUDATA(x) ((x)->ManuData)
|
||||
/* Manufacturer specific data */
|
||||
#define RESET_B3_REQ_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define RESET_B3_REQ_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define RESET_B3_CONF_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define RESET_B3_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: reset initiated */
|
||||
/* 0x0001: NCPI not supported by current protocol, NCPI ignored */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: illegal NCCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
/* 0x3008: NCPI not supported */
|
||||
/* 0x300D: reset procedure not supported by current protocol */
|
||||
#define RESET_B3_IND_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define RESET_B3_IND_NCPI(x) ((x)->NCPI)
|
||||
/* Network Control Protocol Information */
|
||||
#define RESET_B3_RESP_NCCI(x) ((x)->adr.adrNCCI)
|
||||
/* Network Control Connection Identifier */
|
||||
#define SELECT_B_PROTOCOL_REQ_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define SELECT_B_PROTOCOL_REQ_BPROTOCOL(x) ((x)->BProtocol)
|
||||
/* Protocol definition */
|
||||
#define SELECT_B_PROTOCOL_REQ_B1PROTOCOL(x) ((x)->B1protocol)
|
||||
/* Physical layer and framing */
|
||||
#define SELECT_B_PROTOCOL_REQ_B2PROTOCOL(x) ((x)->B2protocol)
|
||||
/* Data link layer */
|
||||
#define SELECT_B_PROTOCOL_REQ_B3PROTOCOL(x) ((x)->B3protocol)
|
||||
/* Network layer */
|
||||
#define SELECT_B_PROTOCOL_REQ_B1CONFIGURATION(x) ((x)->B1configuration)
|
||||
/* Physical layer and framing parameter */
|
||||
#define SELECT_B_PROTOCOL_REQ_B2CONFIGURATION(x) ((x)->B2configuration)
|
||||
/* Data link layer parameter */
|
||||
#define SELECT_B_PROTOCOL_REQ_B3CONFIGURATION(x) ((x)->B3configuration)
|
||||
/* Network layer parameter */
|
||||
#define SELECT_B_PROTOCOL_CONF_PLCI(x) ((x)->adr.adrPLCI)
|
||||
/* Physical Link Connection Identifier */
|
||||
#define SELECT_B_PROTOCOL_CONF_INFO(x) ((x)->Info)
|
||||
/* 0: protocol switch successful */
|
||||
/* 0x2001: message not supported in current state */
|
||||
/* 0x2002: illegal PLCI */
|
||||
/* 0x2007: illegal message parameter coding */
|
||||
/* 0x3001: B1 protocol not supported */
|
||||
/* 0x3002: B2 protocol not supported */
|
||||
/* 0x3003: B3 protocol not supported */
|
||||
/* 0x3004: B1 protocol parameter not supported */
|
||||
/* 0x3005: B2 protocol parameter not supported */
|
||||
/* 0x3006: B3 protocol parameter not supported */
|
||||
/* 0x3007: B protocol combination not supported */
|
||||
|
||||
/*----- tests for specific commands -----*/
|
||||
|
||||
#define IS_CONNECT_IND(m) ((m)->Command==0x02 && (m)->Subcommand==0x82)
|
||||
#define IS_CONNECT_ACTIVE_IND(m) ((m)->Command==0x03 && (m)->Subcommand==0x82)
|
||||
#define IS_CONNECT_B3_ACTIVE_IND(m) ((m)->Command==0x83 && (m)->Subcommand==0x82)
|
||||
#define IS_CONNECT_B3_IND(m) ((m)->Command==0x82 && (m)->Subcommand==0x82)
|
||||
#define IS_CONNECT_B3_T90_ACTIVE_IND(m) ((m)->Command==0x88 && (m)->Subcommand==0x82)
|
||||
#define IS_DATA_B3_IND(m) ((m)->Command==0x86 && (m)->Subcommand==0x82)
|
||||
#define IS_DISCONNECT_B3_IND(m) ((m)->Command==0x84 && (m)->Subcommand==0x82)
|
||||
#define IS_DISCONNECT_IND(m) ((m)->Command==0x04 && (m)->Subcommand==0x82)
|
||||
#define IS_FACILITY_IND(m) ((m)->Command==0x80 && (m)->Subcommand==0x82)
|
||||
#define IS_INFO_IND(m) ((m)->Command==0x08 && (m)->Subcommand==0x82)
|
||||
#define IS_MANUFACTURER_IND(m) ((m)->Command==0xff && (m)->Subcommand==0x82)
|
||||
#define IS_RESET_B3_IND(m) ((m)->Command==0x87 && (m)->Subcommand==0x82)
|
||||
#define IS_ALERT_CONF(m) ((m)->Command==0x01 && (m)->Subcommand==0x81)
|
||||
#define IS_CONNECT_CONF(m) ((m)->Command==0x02 && (m)->Subcommand==0x81)
|
||||
#define IS_CONNECT_B3_CONF(m) ((m)->Command==0x82 && (m)->Subcommand==0x81)
|
||||
#define IS_DATA_B3_CONF(m) ((m)->Command==0x86 && (m)->Subcommand==0x81)
|
||||
#define IS_DISCONNECT_B3_CONF(m) ((m)->Command==0x84 && (m)->Subcommand==0x81)
|
||||
#define IS_DISCONNECT_CONF(m) ((m)->Command==0x04 && (m)->Subcommand==0x81)
|
||||
#define IS_FACILITY_CONF(m) ((m)->Command==0x80 && (m)->Subcommand==0x81)
|
||||
#define IS_INFO_CONF(m) ((m)->Command==0x08 && (m)->Subcommand==0x81)
|
||||
#define IS_LISTEN_CONF(m) ((m)->Command==0x05 && (m)->Subcommand==0x81)
|
||||
#define IS_MANUFACTURER_CONF(m) ((m)->Command==0xff && (m)->Subcommand==0x81)
|
||||
#define IS_RESET_B3_CONF(m) ((m)->Command==0x87 && (m)->Subcommand==0x81)
|
||||
#define IS_SELECT_B_PROTOCOL_CONF(m) ((m)->Command==0x41 && (m)->Subcommand==0x81)
|
||||
|
||||
/*----- header functions that fill the _cmsg structure with default -----*/
|
||||
/*----- values. Only nonstandard parameter need to be changed -----*/
|
||||
|
||||
#define ALERT_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x01,0x80,Messagenumber,adr)
|
||||
#define CONNECT_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x02,0x80,Messagenumber,adr)
|
||||
#define CONNECT_B3_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x82,0x80,Messagenumber,adr)
|
||||
#define DATA_B3_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x86,0x80,Messagenumber,adr)
|
||||
#define DISCONNECT_B3_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x84,0x80,Messagenumber,adr)
|
||||
#define DISCONNECT_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x04,0x80,Messagenumber,adr)
|
||||
#define FACILITY_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x80,0x80,Messagenumber,adr)
|
||||
#define INFO_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x08,0x80,Messagenumber,adr)
|
||||
#define LISTEN_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x05,0x80,Messagenumber,adr)
|
||||
#define MANUFACTURER_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0xff,0x80,Messagenumber,adr)
|
||||
#define RESET_B3_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x87,0x80,Messagenumber,adr)
|
||||
#define SELECT_B_PROTOCOL_REQ_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x41,0x80,Messagenumber,adr)
|
||||
#define CONNECT_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x02,0x83,Messagenumber,adr)
|
||||
#define CONNECT_ACTIVE_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x03,0x83,Messagenumber,adr)
|
||||
#define CONNECT_B3_ACTIVE_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x83,0x83,Messagenumber,adr)
|
||||
#define CONNECT_B3_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x82,0x83,Messagenumber,adr)
|
||||
#define CONNECT_B3_T90_ACTIVE_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x88,0x83,Messagenumber,adr)
|
||||
#define DATA_B3_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x86,0x83,Messagenumber,adr)
|
||||
#define DISCONNECT_B3_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x84,0x83,Messagenumber,adr)
|
||||
#define DISCONNECT_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x04,0x83,Messagenumber,adr)
|
||||
#define FACILITY_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x80,0x83,Messagenumber,adr)
|
||||
#define INFO_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x08,0x83,Messagenumber,adr)
|
||||
#define MANUFACTURER_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0xff,0x83,Messagenumber,adr)
|
||||
#define RESET_B3_RESP_HEADER(cmsg,ApplId,Messagenumber,adr) \
|
||||
CAPI_CMSG_HEADER(cmsg,ApplId,0x87,0x83,Messagenumber,adr)
|
||||
|
||||
/*
|
||||
* CAPI-functions that correspond to the CAPI messages specified in the
|
||||
* CAPI 2.0 specification. All possible parameter have to be specified.
|
||||
* The CAPI message is sent immediately when calling these functions,
|
||||
* return values are the same as in capi_put_message()
|
||||
*/
|
||||
|
||||
unsigned ALERT_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cstruct BChannelinformation
|
||||
,_cstruct Keypadfacility
|
||||
,_cstruct Useruserdata
|
||||
,_cstruct Facilitydataarray);
|
||||
unsigned CONNECT_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cword CIPValue
|
||||
,_cstruct CalledPartyNumber
|
||||
,_cstruct CallingPartyNumber
|
||||
,_cstruct CalledPartySubaddress
|
||||
,_cstruct CallingPartySubaddress
|
||||
,_cword B1protocol
|
||||
,_cword B2protocol
|
||||
,_cword B3protocol
|
||||
,_cstruct B1configuration
|
||||
,_cstruct B2configuration
|
||||
,_cstruct B3configuration
|
||||
,_cstruct BC
|
||||
,_cstruct LLC
|
||||
,_cstruct HLC
|
||||
,_cstruct BChannelinformation
|
||||
,_cstruct Keypadfacility
|
||||
,_cstruct Useruserdata
|
||||
,_cstruct Facilitydataarray);
|
||||
unsigned CONNECT_B3_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cstruct NCPI);
|
||||
unsigned DATA_B3_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cdword Data
|
||||
,_cword DataLength
|
||||
,_cword DataHandle
|
||||
,_cword Flags);
|
||||
unsigned DISCONNECT_B3_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cstruct NCPI);
|
||||
unsigned DISCONNECT_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cstruct BChannelinformation
|
||||
,_cstruct Keypadfacility
|
||||
,_cstruct Useruserdata
|
||||
,_cstruct Facilitydataarray);
|
||||
unsigned FACILITY_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cword FacilitySelector
|
||||
,_cstruct FacilityRequestParameter);
|
||||
unsigned INFO_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cstruct CalledPartyNumber
|
||||
,_cstruct BChannelinformation
|
||||
,_cstruct Keypadfacility
|
||||
,_cstruct Useruserdata
|
||||
,_cstruct Facilitydataarray);
|
||||
unsigned LISTEN_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cdword InfoMask
|
||||
,_cdword CIPmask
|
||||
,_cdword CIPmask2
|
||||
,_cstruct CallingPartyNumber
|
||||
,_cstruct CallingPartySubaddress);
|
||||
unsigned MANUFACTURER_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cdword ManuID
|
||||
,_cdword Class
|
||||
,_cdword Function
|
||||
,_cstruct ManuData);
|
||||
unsigned RESET_B3_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cstruct NCPI);
|
||||
unsigned SELECT_B_PROTOCOL_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cword B1protocol
|
||||
,_cword B2protocol
|
||||
,_cword B3protocol
|
||||
,_cstruct B1configuration
|
||||
,_cstruct B2configuration
|
||||
,_cstruct B3configuration);
|
||||
unsigned CONNECT_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cword Reject
|
||||
,_cword B1protocol
|
||||
,_cword B2protocol
|
||||
,_cword B3protocol
|
||||
,_cstruct B1configuration
|
||||
,_cstruct B2configuration
|
||||
,_cstruct B3configuration
|
||||
,_cstruct ConnectedNumber
|
||||
,_cstruct ConnectedSubaddress
|
||||
,_cstruct LLC
|
||||
,_cstruct BChannelinformation
|
||||
,_cstruct Keypadfacility
|
||||
,_cstruct Useruserdata
|
||||
,_cstruct Facilitydataarray);
|
||||
unsigned CONNECT_ACTIVE_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr);
|
||||
unsigned CONNECT_B3_ACTIVE_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr);
|
||||
unsigned CONNECT_B3_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cword Reject
|
||||
,_cstruct NCPI);
|
||||
unsigned CONNECT_B3_T90_ACTIVE_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr);
|
||||
unsigned DATA_B3_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cword DataHandle);
|
||||
unsigned DISCONNECT_B3_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr);
|
||||
unsigned DISCONNECT_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr);
|
||||
unsigned FACILITY_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cword FacilitySelector
|
||||
,_cstruct FacilityResponseParameters);
|
||||
unsigned INFO_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr);
|
||||
unsigned MANUFACTURER_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr
|
||||
,_cdword ManuID
|
||||
,_cdword Class
|
||||
,_cdword Function
|
||||
,_cstruct ManuData);
|
||||
unsigned RESET_B3_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
|
||||
,_cdword adr);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CAPI20_H */
|
|
@ -1,310 +0,0 @@
|
|||
/*
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1 1998/08/25 16:33:19 calle
|
||||
* Added CAPI2.0 library. First Version.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "capi20.h"
|
||||
|
||||
unsigned ALERT_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cstruct BChannelinformation,
|
||||
_cstruct Keypadfacility,
|
||||
_cstruct Useruserdata,
|
||||
_cstruct Facilitydataarray) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x01,0x80,Messagenumber,adr);
|
||||
cmsg->BChannelinformation = BChannelinformation;
|
||||
cmsg->Keypadfacility = Keypadfacility;
|
||||
cmsg->Useruserdata = Useruserdata;
|
||||
cmsg->Facilitydataarray = Facilitydataarray;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned CONNECT_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cword CIPValue,
|
||||
_cstruct CalledPartyNumber,
|
||||
_cstruct CallingPartyNumber,
|
||||
_cstruct CalledPartySubaddress,
|
||||
_cstruct CallingPartySubaddress,
|
||||
_cword B1protocol,
|
||||
_cword B2protocol,
|
||||
_cword B3protocol,
|
||||
_cstruct B1configuration,
|
||||
_cstruct B2configuration,
|
||||
_cstruct B3configuration,
|
||||
_cstruct BC,
|
||||
_cstruct LLC,
|
||||
_cstruct HLC,
|
||||
_cstruct BChannelinformation,
|
||||
_cstruct Keypadfacility,
|
||||
_cstruct Useruserdata,
|
||||
_cstruct Facilitydataarray) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x02,0x80,Messagenumber,adr);
|
||||
cmsg->CIPValue = CIPValue;
|
||||
cmsg->CalledPartyNumber = CalledPartyNumber;
|
||||
cmsg->CallingPartyNumber = CallingPartyNumber;
|
||||
cmsg->CalledPartySubaddress = CalledPartySubaddress;
|
||||
cmsg->CallingPartySubaddress = CallingPartySubaddress;
|
||||
cmsg->B1protocol = B1protocol;
|
||||
cmsg->B2protocol = B2protocol;
|
||||
cmsg->B3protocol = B3protocol;
|
||||
cmsg->B1configuration = B1configuration;
|
||||
cmsg->B2configuration = B2configuration;
|
||||
cmsg->B3configuration = B3configuration;
|
||||
cmsg->BC = BC;
|
||||
cmsg->LLC = LLC;
|
||||
cmsg->HLC = HLC;
|
||||
cmsg->BChannelinformation = BChannelinformation;
|
||||
cmsg->Keypadfacility = Keypadfacility;
|
||||
cmsg->Useruserdata = Useruserdata;
|
||||
cmsg->Facilitydataarray = Facilitydataarray;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned CONNECT_B3_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cstruct NCPI) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x82,0x80,Messagenumber,adr);
|
||||
cmsg->NCPI = NCPI;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned DATA_B3_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cdword Data,
|
||||
_cword DataLength,
|
||||
_cword DataHandle,
|
||||
_cword Flags) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x86,0x80,Messagenumber,adr);
|
||||
cmsg->Data = Data;
|
||||
cmsg->DataLength = DataLength;
|
||||
cmsg->DataHandle = DataHandle;
|
||||
cmsg->Flags = Flags;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned DISCONNECT_B3_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cstruct NCPI) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x84,0x80,Messagenumber,adr);
|
||||
cmsg->NCPI = NCPI;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned DISCONNECT_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cstruct BChannelinformation,
|
||||
_cstruct Keypadfacility,
|
||||
_cstruct Useruserdata,
|
||||
_cstruct Facilitydataarray) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x04,0x80,Messagenumber,adr);
|
||||
cmsg->BChannelinformation = BChannelinformation;
|
||||
cmsg->Keypadfacility = Keypadfacility;
|
||||
cmsg->Useruserdata = Useruserdata;
|
||||
cmsg->Facilitydataarray = Facilitydataarray;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned FACILITY_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cword FacilitySelector,
|
||||
_cstruct FacilityRequestParameter) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x80,0x80,Messagenumber,adr);
|
||||
cmsg->FacilitySelector = FacilitySelector;
|
||||
cmsg->FacilityRequestParameter = FacilityRequestParameter;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned INFO_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cstruct CalledPartyNumber,
|
||||
_cstruct BChannelinformation,
|
||||
_cstruct Keypadfacility,
|
||||
_cstruct Useruserdata,
|
||||
_cstruct Facilitydataarray) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x08,0x80,Messagenumber,adr);
|
||||
cmsg->CalledPartyNumber = CalledPartyNumber;
|
||||
cmsg->BChannelinformation = BChannelinformation;
|
||||
cmsg->Keypadfacility = Keypadfacility;
|
||||
cmsg->Useruserdata = Useruserdata;
|
||||
cmsg->Facilitydataarray = Facilitydataarray;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned LISTEN_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cdword InfoMask,
|
||||
_cdword CIPmask,
|
||||
_cdword CIPmask2,
|
||||
_cstruct CallingPartyNumber,
|
||||
_cstruct CallingPartySubaddress) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x05,0x80,Messagenumber,adr);
|
||||
cmsg->InfoMask = InfoMask;
|
||||
cmsg->CIPmask = CIPmask;
|
||||
cmsg->CIPmask2 = CIPmask2;
|
||||
cmsg->CallingPartyNumber = CallingPartyNumber;
|
||||
cmsg->CallingPartySubaddress = CallingPartySubaddress;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned MANUFACTURER_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cdword ManuID,
|
||||
_cdword Class,
|
||||
_cdword Function,
|
||||
_cstruct ManuData) {
|
||||
capi_cmsg_header (cmsg,ApplId,0xff,0x80,Messagenumber,adr);
|
||||
cmsg->ManuID = ManuID;
|
||||
cmsg->Class = Class;
|
||||
cmsg->Function = Function;
|
||||
cmsg->ManuData = ManuData;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned RESET_B3_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cstruct NCPI) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x87,0x80,Messagenumber,adr);
|
||||
cmsg->NCPI = NCPI;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned SELECT_B_PROTOCOL_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cword B1protocol,
|
||||
_cword B2protocol,
|
||||
_cword B3protocol,
|
||||
_cstruct B1configuration,
|
||||
_cstruct B2configuration,
|
||||
_cstruct B3configuration) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x41,0x80,Messagenumber,adr);
|
||||
cmsg->B1protocol = B1protocol;
|
||||
cmsg->B2protocol = B2protocol;
|
||||
cmsg->B3protocol = B3protocol;
|
||||
cmsg->B1configuration = B1configuration;
|
||||
cmsg->B2configuration = B2configuration;
|
||||
cmsg->B3configuration = B3configuration;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned CONNECT_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cword Reject,
|
||||
_cword B1protocol,
|
||||
_cword B2protocol,
|
||||
_cword B3protocol,
|
||||
_cstruct B1configuration,
|
||||
_cstruct B2configuration,
|
||||
_cstruct B3configuration,
|
||||
_cstruct ConnectedNumber,
|
||||
_cstruct ConnectedSubaddress,
|
||||
_cstruct LLC,
|
||||
_cstruct BChannelinformation,
|
||||
_cstruct Keypadfacility,
|
||||
_cstruct Useruserdata,
|
||||
_cstruct Facilitydataarray) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x02,0x83,Messagenumber,adr);
|
||||
cmsg->Reject = Reject;
|
||||
cmsg->B1protocol = B1protocol;
|
||||
cmsg->B2protocol = B2protocol;
|
||||
cmsg->B3protocol = B3protocol;
|
||||
cmsg->B1configuration = B1configuration;
|
||||
cmsg->B2configuration = B2configuration;
|
||||
cmsg->B3configuration = B3configuration;
|
||||
cmsg->ConnectedNumber = ConnectedNumber;
|
||||
cmsg->ConnectedSubaddress = ConnectedSubaddress;
|
||||
cmsg->LLC = LLC;
|
||||
cmsg->BChannelinformation = BChannelinformation;
|
||||
cmsg->Keypadfacility = Keypadfacility;
|
||||
cmsg->Useruserdata = Useruserdata;
|
||||
cmsg->Facilitydataarray = Facilitydataarray;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned CONNECT_ACTIVE_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x03,0x83,Messagenumber,adr);
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned CONNECT_B3_ACTIVE_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x83,0x83,Messagenumber,adr);
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned CONNECT_B3_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cword Reject,
|
||||
_cstruct NCPI) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x82,0x83,Messagenumber,adr);
|
||||
cmsg->Reject = Reject;
|
||||
cmsg->NCPI = NCPI;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned CONNECT_B3_T90_ACTIVE_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x88,0x83,Messagenumber,adr);
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned DATA_B3_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cword DataHandle) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x86,0x83,Messagenumber,adr);
|
||||
cmsg->DataHandle = DataHandle;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned DISCONNECT_B3_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x84,0x83,Messagenumber,adr);
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned DISCONNECT_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x04,0x83,Messagenumber,adr);
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned FACILITY_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cword FacilitySelector,
|
||||
_cstruct FacilityResponseParameters) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x80,0x83,Messagenumber,adr);
|
||||
cmsg->FacilitySelector = FacilitySelector;
|
||||
cmsg->FacilityResponseParameters = FacilityResponseParameters;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned INFO_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x08,0x83,Messagenumber,adr);
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned MANUFACTURER_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr,
|
||||
_cdword ManuID,
|
||||
_cdword Class,
|
||||
_cdword Function,
|
||||
_cstruct ManuData) {
|
||||
capi_cmsg_header (cmsg,ApplId,0xff,0x83,Messagenumber,adr);
|
||||
cmsg->ManuID = ManuID;
|
||||
cmsg->Class = Class;
|
||||
cmsg->Function = Function;
|
||||
cmsg->ManuData = ManuData;
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
||||
|
||||
unsigned RESET_B3_RESP (_cmsg *cmsg, _cword ApplId, _cword Messagenumber,
|
||||
_cdword adr) {
|
||||
capi_cmsg_header (cmsg,ApplId,0x87,0x83,Messagenumber,adr);
|
||||
return capi_put_cmsg (cmsg);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,38 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(capi20.c)
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
|
||||
I4LVERSION=${I4LVERSION:-"?.?"}
|
||||
CONFIG_DATADIR=${CONFIG_DATADIR:-"/usr/lib/isdn"}
|
||||
CONFIG_MANDIR=`eval echo ${CONFIG_MANDIR:-"/usr/man"}`
|
||||
CONFIG_SBINDIR=`eval echo ${CONFIG_SBINDIR:-"/sbin"}`
|
||||
CONFIG_KERNELDIR=`eval echo ${CONFIG_KERNELDIR:-"/usr/src/linux"}`
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
|
||||
dnl Check for kernel stuff
|
||||
AC_FIND_KERNEL
|
||||
AC_CHECK_HEADERS($CONFIG_KERNELDIR/include/linux/capi.h $CONFIG_KERNELDIR/include/linux/kernelcapi.h,,
|
||||
AC_MSG_ERROR("Missing $ac_hdr. Kernel source installed?"))
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_CHECK_FUNCS(select)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(I4LVERSION)
|
||||
AC_SUBST(CONFIG_SBINDIR)
|
||||
AC_SUBST(CONFIG_DATADIR)
|
||||
AC_SUBST(CONFIG_MANDIR)
|
||||
AC_SUBST(CONFIG_KERNELDIR)
|
||||
AC_OUTPUT(Makefile)
|
441
capi20/convert.c
441
capi20/convert.c
|
@ -1,441 +0,0 @@
|
|||
/*
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.3 1998/08/30 09:57:21 calle
|
||||
* I hope it is know readable for everybody.
|
||||
*
|
||||
* Revision 1.1 1998/08/25 16:33:23 calle
|
||||
* Added CAPI2.0 library. First Version.
|
||||
*
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "capi20.h"
|
||||
|
||||
typedef struct {
|
||||
int typ;
|
||||
unsigned off;
|
||||
} _cdef;
|
||||
|
||||
#define _CBYTE 1
|
||||
#define _CWORD 2
|
||||
#define _CDWORD 3
|
||||
#define _CSTRUCT 4
|
||||
#define _CMSTRUCT 5
|
||||
#define _CEND 6
|
||||
|
||||
static _cdef cdef[] = {
|
||||
/*00*/{_CEND},
|
||||
/*01*/{_CEND},
|
||||
/*02*/{_CEND},
|
||||
/*03*/{_CDWORD, offsetof(_cmsg,adr.adrController) },
|
||||
/*04*/{_CMSTRUCT, offsetof(_cmsg,AdditionalInfo) },
|
||||
/*05*/{_CSTRUCT, offsetof(_cmsg,B1configuration) },
|
||||
/*06*/{_CWORD, offsetof(_cmsg,B1protocol) },
|
||||
/*07*/{_CSTRUCT, offsetof(_cmsg,B2configuration) },
|
||||
/*08*/{_CWORD, offsetof(_cmsg,B2protocol) },
|
||||
/*09*/{_CSTRUCT, offsetof(_cmsg,B3configuration) },
|
||||
/*0a*/{_CWORD, offsetof(_cmsg,B3protocol) },
|
||||
/*0b*/{_CSTRUCT, offsetof(_cmsg,BC) },
|
||||
/*0c*/{_CSTRUCT, offsetof(_cmsg,BChannelinformation) },
|
||||
/*0d*/{_CMSTRUCT, offsetof(_cmsg,BProtocol) },
|
||||
/*0e*/{_CSTRUCT, offsetof(_cmsg,CalledPartyNumber) },
|
||||
/*0f*/{_CSTRUCT, offsetof(_cmsg,CalledPartySubaddress) },
|
||||
/*10*/{_CSTRUCT, offsetof(_cmsg,CallingPartyNumber) },
|
||||
/*11*/{_CSTRUCT, offsetof(_cmsg,CallingPartySubaddress) },
|
||||
/*12*/{_CDWORD, offsetof(_cmsg,CIPmask) },
|
||||
/*13*/{_CDWORD, offsetof(_cmsg,CIPmask2) },
|
||||
/*14*/{_CWORD, offsetof(_cmsg,CIPValue) },
|
||||
/*15*/{_CDWORD, offsetof(_cmsg,Class) },
|
||||
/*16*/{_CSTRUCT, offsetof(_cmsg,ConnectedNumber) },
|
||||
/*17*/{_CSTRUCT, offsetof(_cmsg,ConnectedSubaddress) },
|
||||
/*18*/{_CDWORD, offsetof(_cmsg,Data) },
|
||||
/*19*/{_CWORD, offsetof(_cmsg,DataHandle) },
|
||||
/*1a*/{_CWORD, offsetof(_cmsg,DataLength) },
|
||||
/*1b*/{_CSTRUCT, offsetof(_cmsg,FacilityConfirmationParameter) },
|
||||
/*1c*/{_CSTRUCT, offsetof(_cmsg,Facilitydataarray) },
|
||||
/*1d*/{_CSTRUCT, offsetof(_cmsg,FacilityIndicationParameter) },
|
||||
/*1e*/{_CSTRUCT, offsetof(_cmsg,FacilityRequestParameter) },
|
||||
/*1f*/{_CSTRUCT, offsetof(_cmsg,FacilityResponseParameters) },
|
||||
/*20*/{_CWORD, offsetof(_cmsg,FacilitySelector) },
|
||||
/*21*/{_CWORD, offsetof(_cmsg,Flags) },
|
||||
/*22*/{_CDWORD, offsetof(_cmsg,Function) },
|
||||
/*23*/{_CSTRUCT, offsetof(_cmsg,HLC) },
|
||||
/*24*/{_CWORD, offsetof(_cmsg,Info) },
|
||||
/*25*/{_CSTRUCT, offsetof(_cmsg,InfoElement) },
|
||||
/*26*/{_CDWORD, offsetof(_cmsg,InfoMask) },
|
||||
/*27*/{_CWORD, offsetof(_cmsg,InfoNumber) },
|
||||
/*28*/{_CSTRUCT, offsetof(_cmsg,Keypadfacility) },
|
||||
/*29*/{_CSTRUCT, offsetof(_cmsg,LLC) },
|
||||
/*2a*/{_CSTRUCT, offsetof(_cmsg,ManuData) },
|
||||
/*2b*/{_CDWORD, offsetof(_cmsg,ManuID) },
|
||||
/*2c*/{_CSTRUCT, offsetof(_cmsg,NCPI) },
|
||||
/*2d*/{_CWORD, offsetof(_cmsg,Reason) },
|
||||
/*2e*/{_CWORD, offsetof(_cmsg,Reason_B3) },
|
||||
/*2f*/{_CWORD, offsetof(_cmsg,Reject) },
|
||||
/*30*/{_CSTRUCT, offsetof(_cmsg,Useruserdata) },
|
||||
};
|
||||
|
||||
static unsigned char *cpars[] = {
|
||||
/*00*/ 0,
|
||||
/*01 ALERT_REQ*/
|
||||
(unsigned char*)"\x03\x04\x0c\x28\x30\x1c\x01\x01",
|
||||
/*02 CONNECT_REQ*/
|
||||
(unsigned char*)"\x03\x14\x0e\x10\x0f\x11\x0d\x06\x08\x0a\x05\x07\x09\x01\x0b\x29\x23\x04\x0c\x28\x30\x1c\x01\x01",
|
||||
/*03*/ 0,
|
||||
/*04 DISCONNECT_REQ*/
|
||||
(unsigned char*)"\x03\x04\x0c\x28\x30\x1c\x01\x01",
|
||||
/*05 LISTEN_REQ*/
|
||||
(unsigned char*)"\x03\x26\x12\x13\x10\x11\x01",
|
||||
/*06*/ 0,
|
||||
/*07*/ 0,
|
||||
/*08 INFO_REQ*/
|
||||
(unsigned char*)"\x03\x0e\x04\x0c\x28\x30\x1c\x01\x01",
|
||||
/*09 FACILITY_REQ*/
|
||||
(unsigned char*)"\x03\x20\x1e\x01",
|
||||
/*0a SELECT_B_PROTOCOL_REQ*/
|
||||
(unsigned char*)"\x03\x0d\x06\x08\x0a\x05\x07\x09\x01\x01",
|
||||
/*0b CONNECT_B3_REQ*/
|
||||
(unsigned char*)"\x03\x2c\x01",
|
||||
/*0c*/ 0,
|
||||
/*0d DISCONNECT_B3_REQ*/
|
||||
(unsigned char*)"\x03\x2c\x01",
|
||||
/*0e*/ 0,
|
||||
/*0f DATA_B3_REQ*/
|
||||
(unsigned char*)"\x03\x18\x1a\x19\x21\x01",
|
||||
/*10 RESET_B3_REQ*/
|
||||
(unsigned char*)"\x03\x2c\x01",
|
||||
/*11*/ 0,
|
||||
/*12*/ 0,
|
||||
/*13 ALERT_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*14 CONNECT_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*15*/ 0,
|
||||
/*16 DISCONNECT_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*17 LISTEN_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*18 MANUFACTURER_REQ*/
|
||||
(unsigned char*)"\x03\x2b\x15\x22\x2a\x01",
|
||||
/*19*/ 0,
|
||||
/*1a INFO_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*1b FACILITY_CONF*/
|
||||
(unsigned char*)"\x03\x24\x20\x1b\x01",
|
||||
/*1c SELECT_B_PROTOCOL_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*1d CONNECT_B3_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*1e*/ 0,
|
||||
/*1f DISCONNECT_B3_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*20*/ 0,
|
||||
/*21 DATA_B3_CONF*/
|
||||
(unsigned char*)"\x03\x19\x24\x01",
|
||||
/*22 RESET_B3_CONF*/
|
||||
(unsigned char*)"\x03\x24\x01",
|
||||
/*23*/ 0,
|
||||
/*24*/ 0,
|
||||
/*25*/ 0,
|
||||
/*26 CONNECT_IND*/
|
||||
(unsigned char*)"\x03\x14\x0e\x10\x0f\x11\x0b\x29\x23\x04\x0c\x28\x30\x1c\x01\x01",
|
||||
/*27 CONNECT_ACTIVE_IND*/
|
||||
(unsigned char*)"\x03\x16\x17\x29\x01",
|
||||
/*28 DISCONNECT_IND*/
|
||||
(unsigned char*)"\x03\x2d\x01",
|
||||
/*29*/ 0,
|
||||
/*2a MANUFACTURER_CONF*/
|
||||
(unsigned char*)"\x03\x2b\x15\x22\x2a\x01",
|
||||
/*2b*/ 0,
|
||||
/*2c INFO_IND*/
|
||||
(unsigned char*)"\x03\x27\x25\x01",
|
||||
/*2d FACILITY_IND*/
|
||||
(unsigned char*)"\x03\x20\x1d\x01",
|
||||
/*2e*/ 0,
|
||||
/*2f CONNECT_B3_IND*/
|
||||
(unsigned char*)"\x03\x2c\x01",
|
||||
/*30 CONNECT_B3_ACTIVE_IND*/
|
||||
(unsigned char*)"\x03\x2c\x01",
|
||||
/*31 DISCONNECT_B3_IND*/
|
||||
(unsigned char*)"\x03\x2e\x2c\x01",
|
||||
/*32*/ 0,
|
||||
/*33 DATA_B3_IND*/
|
||||
(unsigned char*)"\x03\x18\x1a\x19\x21\x01",
|
||||
/*34 RESET_B3_IND*/
|
||||
(unsigned char*)"\x03\x2c\x01",
|
||||
/*35 CONNECT_B3_T90_ACTIVE_IND*/
|
||||
(unsigned char*)"\x03\x2c\x01",
|
||||
/*36*/ 0,
|
||||
/*37*/ 0,
|
||||
/*38 CONNECT_RESP*/
|
||||
(unsigned char*)"\x03\x2f\x0d\x06\x08\x0a\x05\x07\x09\x01\x16\x17\x29\x04\x0c\x28\x30\x1c\x01\x01",
|
||||
/*39 CONNECT_ACTIVE_RESP*/
|
||||
(unsigned char*)"\x03\x01",
|
||||
/*3a DISCONNECT_RESP*/
|
||||
(unsigned char*)"\x03\x01",
|
||||
/*3b*/ 0,
|
||||
/*3c MANUFACTURER_IND*/
|
||||
(unsigned char*)"\x03\x2b\x15\x22\x2a\x01",
|
||||
/*3d*/ 0,
|
||||
/*3e INFO_RESP*/
|
||||
(unsigned char*)"\x03\x01",
|
||||
/*3f FACILITY_RESP*/
|
||||
(unsigned char*)"\x03\x20\x1f\x01",
|
||||
/*40*/ 0,
|
||||
/*41 CONNECT_B3_RESP*/
|
||||
(unsigned char*)"\x03\x2f\x2c\x01",
|
||||
/*42 CONNECT_B3_ACTIVE_RESP*/
|
||||
(unsigned char*)"\x03\x01",
|
||||
/*43 DISCONNECT_B3_RESP*/
|
||||
(unsigned char*)"\x03\x01",
|
||||
/*44*/ 0,
|
||||
/*45 DATA_B3_RESP*/
|
||||
(unsigned char*)"\x03\x19\x01",
|
||||
/*46 RESET_B3_RESP*/
|
||||
(unsigned char*)"\x03\x01",
|
||||
/*47 CONNECT_B3_T90_ACTIVE_RESP*/
|
||||
(unsigned char*)"\x03\x01",
|
||||
/*48*/ 0,
|
||||
/*49*/ 0,
|
||||
/*4a*/ 0,
|
||||
/*4b*/ 0,
|
||||
/*4c*/ 0,
|
||||
/*4d*/ 0,
|
||||
/*4e MANUFACTURER_RESP*/
|
||||
(unsigned char*)"\x03\x2b\x15\x22\x2a\x01",
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
|
||||
#define byteTLcpy(x,y) *(_cbyte *)(x)=*(_cbyte *)(y);
|
||||
#define wordTLcpy(x,y) *(_cword *)(x)=*(_cword *)(y);
|
||||
#define dwordTLcpy(x,y) memcpy(x,y,4);
|
||||
#define structTLcpy(x,y,l) memcpy (x,y,l)
|
||||
#define structTLcpyovl(x,y,l) memmove (x,y,l)
|
||||
|
||||
#define byteTRcpy(x,y) *(_cbyte *)(y)=*(_cbyte *)(x);
|
||||
#define wordTRcpy(x,y) *(_cword *)(y)=*(_cword *)(x);
|
||||
#define dwordTRcpy(x,y) memcpy(y,x,4);
|
||||
#define structTRcpy(x,y,l) memcpy (y,x,l)
|
||||
#define structTRcpyovl(x,y,l) memmove (y,x,l)
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
static unsigned command_2_index (unsigned c, unsigned sc) {
|
||||
if (c & 0x80) c = 0x9+(c&0x0f);
|
||||
else if (c<=0x0f) ;
|
||||
else if (c==0x41) c = 0x9+0x1;
|
||||
else if (c==0xff) c = 0x00;
|
||||
return (sc&3)*(0x9+0x9)+c;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
#define TYP (cdef[cmsg->par[cmsg->p]].typ)
|
||||
#define OFF (((char *)cmsg)+cdef[cmsg->par[cmsg->p]].off)
|
||||
|
||||
static void jumpcstruct (_cmsg *cmsg) {
|
||||
unsigned layer;
|
||||
for (cmsg->p++,layer=1; layer;) {
|
||||
assert (cmsg->p);
|
||||
cmsg->p++;
|
||||
switch (TYP) {
|
||||
case _CMSTRUCT:
|
||||
layer++;
|
||||
break;
|
||||
case _CEND:
|
||||
layer--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-------------------------------------------------------*/
|
||||
static void PARS_2_MESSAGE (_cmsg *cmsg) {
|
||||
|
||||
for (;TYP != _CEND; cmsg->p++) {
|
||||
switch (TYP) {
|
||||
case _CBYTE:
|
||||
byteTLcpy (cmsg->m+cmsg->l, OFF);
|
||||
cmsg->l++;
|
||||
break;
|
||||
case _CWORD:
|
||||
wordTLcpy (cmsg->m+cmsg->l, OFF);
|
||||
cmsg->l+=2;
|
||||
break;
|
||||
case _CDWORD:
|
||||
dwordTLcpy (cmsg->m+cmsg->l, OFF);
|
||||
cmsg->l+=4;
|
||||
break;
|
||||
case _CSTRUCT:
|
||||
if (*(CAPI_MESSAGE *) OFF == 0) {
|
||||
*(cmsg->m+cmsg->l)='\0';
|
||||
cmsg->l++;
|
||||
}
|
||||
else if(**(_cstruct*)OFF != 0xff) {
|
||||
structTLcpy (cmsg->m+cmsg->l, *(_cstruct*)OFF, 1+**(_cstruct*)OFF);
|
||||
cmsg->l+=1+**(_cstruct*)OFF;
|
||||
}
|
||||
else {
|
||||
_cstruct s = *(_cstruct*)OFF;
|
||||
structTLcpy (cmsg->m+cmsg->l, s, 3+*(_cword*)(s+1));
|
||||
cmsg->l+= 3+*(_cword*)(s+1);
|
||||
}
|
||||
break;
|
||||
case _CMSTRUCT:
|
||||
/*----- Metastruktur 0 -----*/
|
||||
if (*(_cmstruct*)OFF == CAPI_DEFAULT) {
|
||||
*(cmsg->m+cmsg->l)='\0';
|
||||
cmsg->l++;
|
||||
jumpcstruct (cmsg);
|
||||
}
|
||||
/*----- Metastruktur wird composed -----*/
|
||||
else {
|
||||
unsigned _l = cmsg->l;
|
||||
unsigned _ls;
|
||||
cmsg->l++;
|
||||
cmsg->p++;
|
||||
PARS_2_MESSAGE (cmsg);
|
||||
_ls = cmsg->l-_l-1;
|
||||
if (_ls < 255)
|
||||
(cmsg->m+_l)[0] = (_cbyte)_ls;
|
||||
else {
|
||||
structTLcpyovl (cmsg->m+_l+3, cmsg->m+_l+1, _ls);
|
||||
(cmsg->m+_l)[0] = 0xff;
|
||||
wordTLcpy (cmsg->m+_l+1, &_ls);
|
||||
cmsg->l+=2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
unsigned capi_cmsg2message (_cmsg *cmsg, CAPI_MESSAGE msg)
|
||||
{
|
||||
cmsg->m = msg;
|
||||
cmsg->l = 8;
|
||||
cmsg->p = 0;
|
||||
cmsg->par = cpars [command_2_index (cmsg->Command,cmsg->Subcommand)];
|
||||
|
||||
PARS_2_MESSAGE (cmsg);
|
||||
|
||||
wordTLcpy (msg+0, &cmsg->l);
|
||||
byteTLcpy (cmsg->m+4, &cmsg->Command);
|
||||
byteTLcpy (cmsg->m+5, &cmsg->Subcommand);
|
||||
wordTLcpy (cmsg->m+2, &cmsg->ApplId);
|
||||
wordTLcpy (cmsg->m+6, &cmsg->Messagenumber);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
static void MESSAGE_2_PARS (_cmsg *cmsg) {
|
||||
for (;TYP != _CEND; cmsg->p++) {
|
||||
|
||||
switch (TYP) {
|
||||
case _CBYTE:
|
||||
byteTRcpy (cmsg->m+cmsg->l, OFF);
|
||||
cmsg->l++;
|
||||
break;
|
||||
case _CWORD:
|
||||
wordTRcpy (cmsg->m+cmsg->l, OFF);
|
||||
cmsg->l+=2;
|
||||
break;
|
||||
case _CDWORD:
|
||||
dwordTRcpy (cmsg->m+cmsg->l, OFF);
|
||||
cmsg->l+=4;
|
||||
break;
|
||||
case _CSTRUCT:
|
||||
*(CAPI_MESSAGE *)OFF = cmsg->m+cmsg->l;
|
||||
|
||||
if (cmsg->m[cmsg->l] != 0xff)
|
||||
cmsg->l+= 1+ cmsg->m[cmsg->l];
|
||||
else
|
||||
cmsg->l+= 3+ *(_cword *)(cmsg->m+cmsg->l+1);
|
||||
break;
|
||||
case _CMSTRUCT:
|
||||
/*----- Metastruktur 0 -----*/
|
||||
if (cmsg->m[cmsg->l] == '\0') {
|
||||
*(_cmstruct*)OFF = CAPI_DEFAULT;
|
||||
cmsg->l++;
|
||||
jumpcstruct (cmsg);
|
||||
}
|
||||
else {
|
||||
unsigned _l = cmsg->l;
|
||||
*(_cmstruct*)OFF = CAPI_COMPOSE;
|
||||
cmsg->l = (cmsg->m+_l)[0] == 255 ? cmsg->l+3 : cmsg->l+1;
|
||||
cmsg->p++;
|
||||
MESSAGE_2_PARS (cmsg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
unsigned capi_message2cmsg (_cmsg *cmsg, CAPI_MESSAGE msg)
|
||||
{
|
||||
memset (cmsg, 0, sizeof(_cmsg));
|
||||
cmsg->m = msg;
|
||||
cmsg->l = 8;
|
||||
cmsg->p = 0;
|
||||
byteTRcpy (cmsg->m+4, &cmsg->Command);
|
||||
byteTRcpy (cmsg->m+5, &cmsg->Subcommand);
|
||||
cmsg->par = cpars [command_2_index (cmsg->Command,cmsg->Subcommand)];
|
||||
|
||||
MESSAGE_2_PARS (cmsg);
|
||||
|
||||
wordTRcpy (msg+0, &cmsg->l);
|
||||
wordTRcpy (cmsg->m+2, &cmsg->ApplId);
|
||||
wordTRcpy (cmsg->m+6, &cmsg->Messagenumber);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
unsigned capi_cmsg_answer (_cmsg *cmsg)
|
||||
{
|
||||
cmsg->Subcommand |= 0x01;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
unsigned capi_cmsg_header (_cmsg *cmsg, _cword _ApplId,
|
||||
_cbyte _Command, _cbyte _Subcommand,
|
||||
_cword _Messagenumber, _cdword _Controller) {
|
||||
memset (cmsg, 0, sizeof(_cmsg));
|
||||
cmsg->ApplId = _ApplId ;
|
||||
cmsg->Command = _Command ;
|
||||
cmsg->Subcommand = _Subcommand ;
|
||||
cmsg->Messagenumber = _Messagenumber;
|
||||
cmsg->adr.adrController = _Controller ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
unsigned capi_put_cmsg (_cmsg *cmsg)
|
||||
{
|
||||
static unsigned char msg[2048];
|
||||
|
||||
capi_cmsg2message(cmsg, (CAPI_MESSAGE)msg);
|
||||
return capi20_put_message((CAPI_MESSAGE)msg, cmsg->ApplId);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
unsigned capi_get_cmsg (_cmsg *cmsg, unsigned applid)
|
||||
{
|
||||
MESSAGE_EXCHANGE_ERROR rtn;
|
||||
CAPI_MESSAGE msg;
|
||||
|
||||
rtn = capi20_get_message(applid, &msg);
|
||||
if (rtn == 0x0000)
|
||||
capi_message2cmsg(cmsg, msg);
|
||||
return rtn;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exit 0
|
|
@ -1,22 +0,0 @@
|
|||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
CLEANFILES = *~
|
||||
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in config.h.in \
|
||||
stamp-h.in
|
||||
|
||||
INCLUDES = -I../capi20 $(all_includes)
|
||||
CFLAGS = -Wall -O2
|
||||
LDFLAGS = -L../capi20 $(all_libraries)
|
||||
LDADD = -lcapi20
|
||||
|
||||
bin_PROGRAMS = capifax capifaxrcvd
|
||||
|
||||
common = c20msg.c capi.c connect.c contr.c data.c id.c init.c fax.c
|
||||
|
||||
capifax_SOURCES = $(common) capifax.c
|
||||
|
||||
capifaxrcvd_SOURCES = $(common) capifaxrcvd.c
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
all:
|
||||
@echo "Use make devel for development, make dist for distribution"
|
||||
|
||||
devel:
|
||||
aclocal
|
||||
autoheader
|
||||
automake
|
||||
autoconf
|
||||
touch stamp-h.in
|
||||
|
||||
dist:
|
||||
aclocal
|
||||
autoheader
|
||||
automake --foreign --include-deps
|
||||
autoconf
|
||||
touch stamp-h.in
|
|
@ -1,349 +0,0 @@
|
|||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
CC = @CC@
|
||||
CONFIG_KERNELDIR = @CONFIG_KERNELDIR@
|
||||
CONFIG_MANDIR = @CONFIG_MANDIR@
|
||||
CONFIG_SBINDIR = @CONFIG_SBINDIR@
|
||||
DBMLIB = @DBMLIB@
|
||||
I4LCONFDIR = @I4LCONFDIR@
|
||||
I4LVERSION = @I4LVERSION@
|
||||
INSTALL = @INSTALL@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANDATE = @MANDATE@
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
CLEANFILES = *~
|
||||
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in config.h.in \
|
||||
stamp-h.in
|
||||
|
||||
INCLUDES = -I../capi20 $(all_includes)
|
||||
CFLAGS = -Wall -O2
|
||||
LDFLAGS = -L../capi20 $(all_libraries)
|
||||
LDADD = -lcapi20
|
||||
|
||||
bin_PROGRAMS = capifax capifaxrcvd
|
||||
|
||||
common = c20msg.c capi.c connect.c contr.c data.c id.c init.c fax.c
|
||||
|
||||
capifax_SOURCES = $(common) capifax.c
|
||||
|
||||
capifaxrcvd_SOURCES = $(common) capifaxrcvd.c
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I.
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LIBS = @LIBS@
|
||||
capifax_OBJECTS = c20msg.o capi.o connect.o contr.o data.o id.o init.o \
|
||||
fax.o capifax.o
|
||||
capifax_LDADD = $(LDADD)
|
||||
capifax_DEPENDENCIES =
|
||||
capifax_LDFLAGS =
|
||||
capifaxrcvd_OBJECTS = c20msg.o capi.o connect.o contr.o data.o id.o \
|
||||
init.o fax.o capifaxrcvd.o
|
||||
capifaxrcvd_LDADD = $(LDADD)
|
||||
capifaxrcvd_DEPENDENCIES =
|
||||
capifaxrcvd_LDFLAGS =
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in acconfig.h aclocal.m4 config.h.in \
|
||||
configure configure.in install-sh missing mkinstalldirs stamp-h.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
SOURCES = $(capifax_SOURCES) $(capifaxrcvd_SOURCES)
|
||||
OBJECTS = $(capifax_OBJECTS) $(capifaxrcvd_OBJECTS)
|
||||
|
||||
all: Makefile $(PROGRAMS) config.h
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): configure.in
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
|
||||
config.status: $(srcdir)/configure
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
config.h: stamp-h
|
||||
@:
|
||||
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
|
||||
$(SHELL) ./config.status
|
||||
@echo timestamp > stamp-h
|
||||
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
|
||||
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@echo timestamp > $(srcdir)/stamp-h.in
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
clean-hdr:
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
|
||||
maintainer-clean-hdr:
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
capifax: $(capifax_OBJECTS) $(capifax_DEPENDENCIES)
|
||||
@rm -f capifax
|
||||
$(LINK) $(capifax_LDFLAGS) $(capifax_OBJECTS) $(capifax_LDADD) $(LIBS)
|
||||
|
||||
capifaxrcvd: $(capifaxrcvd_OBJECTS) $(capifaxrcvd_DEPENDENCIES)
|
||||
@rm -f capifaxrcvd
|
||||
$(LINK) $(capifaxrcvd_LDFLAGS) $(capifaxrcvd_OBJECTS) $(capifaxrcvd_LDADD) $(LIBS)
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(MAKE) check \
|
||||
&& $(MAKE) install \
|
||||
&& $(MAKE) installcheck \
|
||||
&& $(MAKE) dist
|
||||
-rm -rf $(distdir)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec: install-binPROGRAMS
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-binPROGRAMS
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(bindir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-hdr mostlyclean-binPROGRAMS \
|
||||
mostlyclean-compile mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
|
||||
clean: clean-hdr clean-binPROGRAMS clean-compile clean-tags \
|
||||
clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-hdr distclean-binPROGRAMS distclean-compile \
|
||||
distclean-tags distclean-generic clean
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-hdr maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
|
||||
mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info dvi installcheck \
|
||||
install-exec install-data install uninstall all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
#undef VERSION
|
||||
#undef PACKAGE
|
||||
#undef CONFIG_SBINDIR
|
||||
#undef CONFIG_MANDIR
|
|
@ -1,136 +0,0 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.3
|
||||
|
||||
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
dnl This Makefile.in is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AM_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
dnl test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_PROG_INSTALL,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
||||
AC_SUBST(INSTALL_SCRIPT)dnl
|
||||
])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
[AC_PREREQ([2.12])
|
||||
AC_CONFIG_HEADER([$1])
|
||||
dnl When config.status generates a header, we must update the stamp-h file.
|
||||
dnl This file resides in the same directory as the config header
|
||||
dnl that is generated. We must strip everything past the first ":",
|
||||
dnl and everything past the last "/".
|
||||
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
||||
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
||||
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
||||
<<am_indx=1
|
||||
for am_file in <<$1>>; do
|
||||
case " <<$>>CONFIG_HEADERS " in
|
||||
*" <<$>>am_file "*<<)>>
|
||||
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
||||
;;
|
||||
esac
|
||||
am_indx=`expr "<<$>>am_indx" + 1`
|
||||
done<<>>dnl>>)
|
||||
changequote([,]))])
|
||||
|
318
capifax/c20msg.c
318
capifax/c20msg.c
|
@ -1,318 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Decode_Info: Returns a string with an error description
|
||||
* Note: infos with values of 0x00xx are only warnings and the corresponding
|
||||
* messages have been processed.
|
||||
* The description for all info values but 0x34xx is taken from the CAPI 2.0
|
||||
* specification february 1994.
|
||||
* The description for the 0x34xx values is taken from ETS 300 102-1/Q.931
|
||||
*
|
||||
* $Log$
|
||||
*/
|
||||
char *Decode_Info (unsigned int Info) {
|
||||
switch (Info) {
|
||||
/* informative values (corresponding message was processed) */
|
||||
case 0x0001:
|
||||
return "NCPI not supported by current protocol, NCPI ignored";
|
||||
case 0x0002:
|
||||
return "Flags not supported by current protocol, flags ignored";
|
||||
case 0x0003:
|
||||
return "Alert already sent by another application";
|
||||
/* error information concerning CAPI_REGISTER */
|
||||
case 0x1001:
|
||||
return "Too many applications";
|
||||
case 0x1002:
|
||||
return "Logical block size to small, must be at least 128 Bytes";
|
||||
case 0x1003:
|
||||
return "Buffer exceeds 64 kByte";
|
||||
case 0x1004:
|
||||
return "Message buffer size too small, must be at least 1024 Bytes";
|
||||
case 0x1005:
|
||||
return "Max. number of logical connections not supported";
|
||||
case 0x1006:
|
||||
return "Reserved";
|
||||
case 0x1007:
|
||||
return "The message could not be accepted because of an internal busy condition";
|
||||
case 0x1008:
|
||||
return "OS resource error (no memory ?)";
|
||||
case 0x1009:
|
||||
return "CAPI not installed";
|
||||
case 0x100A:
|
||||
return "Controller does not support external equipment";
|
||||
case 0x100B:
|
||||
return "Controller does only support external equipment";
|
||||
/* error information concerning message exchange functions */
|
||||
case 0x1101:
|
||||
return "Illegal application number";
|
||||
case 0x1102:
|
||||
return "Illegal command or subcommand or message length less than 12 bytes";
|
||||
case 0x1103:
|
||||
return "The message could not be accepted because of a queue full condition !! The error code does not imply that CAPI cannot receive messages directed to another controller, PLCI or NCCI";
|
||||
case 0x1104:
|
||||
return "Queue is empty";
|
||||
case 0x1105:
|
||||
return "Queue overflow, a message was lost !! This indicates a configuration error. The only recovery from this error is to perform a CAPI_RELEASE";
|
||||
case 0x1106:
|
||||
return "Unknown notification parameter";
|
||||
case 0x1107:
|
||||
return "The Message could not be accepted because of an internal busy condition";
|
||||
case 0x1108:
|
||||
return "OS Resource error (no memory ?)";
|
||||
case 0x1109:
|
||||
return "CAPI not installed";
|
||||
case 0x110A:
|
||||
return "Controller does not support external equipment";
|
||||
case 0x110B:
|
||||
return "Controller does only support external equipment";
|
||||
/* error information concerning resource / coding problems */
|
||||
case 0x2001:
|
||||
return "Message not supported in current state";
|
||||
case 0x2002:
|
||||
return "Illegal Controller / PLCI / NCCI";
|
||||
case 0x2003:
|
||||
return "Out of PLCIs";
|
||||
case 0x2004:
|
||||
return "Out of NCCIs";
|
||||
case 0x2005:
|
||||
return "Out of LISTEN requests";
|
||||
case 0x2006:
|
||||
return "Out of FAX resources (protocol T.30)";
|
||||
case 0x2007:
|
||||
return "Illegal message parameter coding";
|
||||
/* error information concerning requested services */
|
||||
case 0x3001:
|
||||
return "B1 protocol not supported";
|
||||
case 0x3002:
|
||||
return "B2 protocol not supported";
|
||||
case 0x3003:
|
||||
return "B3 protocol not supported";
|
||||
case 0x3004:
|
||||
return "B1 protocol parameter not supported";
|
||||
case 0x3005:
|
||||
return "B2 protocol parameter not supported";
|
||||
case 0x3006:
|
||||
return "B3 protocol parameter not supported";
|
||||
case 0x3007:
|
||||
return "B protocol combination not supported";
|
||||
case 0x3008:
|
||||
return "NCPI not supported";
|
||||
case 0x3009:
|
||||
return "CIP Value unknown";
|
||||
case 0x300A:
|
||||
return "Flags not supported (reserved bits)";
|
||||
case 0x300B:
|
||||
return "Facility not supported";
|
||||
case 0x300C:
|
||||
return "Data length not supported by current protocol";
|
||||
case 0x300D:
|
||||
return "Reset procedure not supported by current protocol";
|
||||
/* informations about the clearing of a physical connection */
|
||||
case 0x3301:
|
||||
return "Protocol error layer 1 (broken line or B-channel removed by signalling protocol)";
|
||||
case 0x3302:
|
||||
return "Protocol error layer 2";
|
||||
case 0x3303:
|
||||
return "Protocol error layer 3";
|
||||
case 0x3304:
|
||||
return "Another application got that call";
|
||||
/* T.30 specific reasons */
|
||||
case 0x3311:
|
||||
return "Connecting not successful (remote station is no FAX G3 machine)";
|
||||
case 0x3312:
|
||||
return "Connecting not successful (training error)";
|
||||
case 0x3313:
|
||||
return "Disconnected before transfer (remote station does not support transfer mode, e.g. resolution)";
|
||||
case 0x3314:
|
||||
return "Disconnected during transfer (remote abort)";
|
||||
case 0x3315:
|
||||
return "Disconnected during transfer (remote procedure error, e.g. unsuccessful repetition of T.30 commands)";
|
||||
case 0x3316:
|
||||
return "Disconnected during transfer (local tx data underrun)";
|
||||
case 0x3317:
|
||||
return "Disconnected during transfer (local rx data overflow)";
|
||||
case 0x3318:
|
||||
return "Disconnected during transfer (local abort)";
|
||||
case 0x3319:
|
||||
return "Illegal parameter coding (e.g. SFF coding error)";
|
||||
/* disconnect causes from the network according to ETS 300 102-1/Q.931 */
|
||||
case 0x3481:
|
||||
return "Unallocated (unassigned) number";
|
||||
case 0x3482:
|
||||
return "No route to specified transit network";
|
||||
case 0x3483:
|
||||
return "No route to destination";
|
||||
case 0x3486:
|
||||
return "Channel unacceptable";
|
||||
case 0x3487:
|
||||
return "Call awarded and being delivered in an established channel";
|
||||
case 0x3490:
|
||||
return "Normal call clearing";
|
||||
case 0x3491:
|
||||
return "User busy";
|
||||
case 0x3492:
|
||||
return "No user responding";
|
||||
case 0x3493:
|
||||
return "No answer from user (user alerted)";
|
||||
case 0x3495:
|
||||
return "Call rejected";
|
||||
case 0x3496:
|
||||
return "Number changed";
|
||||
case 0x349A:
|
||||
return "Non-selected user clearing";
|
||||
case 0x349B:
|
||||
return "Destination out of order";
|
||||
case 0x349C:
|
||||
return "Invalid number format";
|
||||
case 0x349D:
|
||||
return "Facility rejected";
|
||||
case 0x349E:
|
||||
return "Response to STATUS ENQUIRY";
|
||||
case 0x349F:
|
||||
return "Normal, unspecified";
|
||||
case 0x34A2:
|
||||
return "No circuit / channel available";
|
||||
case 0x34A6:
|
||||
return "Network out of order";
|
||||
case 0x34A9:
|
||||
return "Temporary failure";
|
||||
case 0x34AA:
|
||||
return "Switching equipment congestion";
|
||||
case 0x34AB:
|
||||
return "Access information discarded";
|
||||
case 0x34AC:
|
||||
return "Requested circuit / channel not available";
|
||||
case 0x34AF:
|
||||
return "Resources unavailable, unspecified";
|
||||
case 0x34B1:
|
||||
return "Quality of service unavailable";
|
||||
case 0x34B2:
|
||||
return "Requested facility not subscribed";
|
||||
case 0x34B9:
|
||||
return "Bearer capability not authorized";
|
||||
case 0x34BA:
|
||||
return "Bearer capability not presently available";
|
||||
case 0x34BF:
|
||||
return "Service or option not available, unspecified";
|
||||
case 0x34C1:
|
||||
return "Bearer capability not implemented";
|
||||
case 0x34C2:
|
||||
return "Channel type not implemented";
|
||||
case 0x34C5:
|
||||
return "Requested facility not implemented";
|
||||
case 0x34C6:
|
||||
return "Only restricted digital information bearer capability is available";
|
||||
case 0x34CF:
|
||||
return "Service or option not implemented, unspecified";
|
||||
case 0x34D1:
|
||||
return "Invalid call reference value";
|
||||
case 0x34D2:
|
||||
return "Identified channel does not exist";
|
||||
case 0x34D3:
|
||||
return "A suspended call exists, but this call identity does not";
|
||||
case 0x34D4:
|
||||
return "Call identity in use";
|
||||
case 0x34D5:
|
||||
return "No call suspended";
|
||||
case 0x34D6:
|
||||
return "Call having the requested call identity has been cleared";
|
||||
case 0x34D8:
|
||||
return "Incompatible destination";
|
||||
case 0x34DB:
|
||||
return "Invalid transit network selection";
|
||||
case 0x34DF:
|
||||
return "Invalid message, unspecified";
|
||||
case 0x34E0:
|
||||
return "Mandatory information element is missing";
|
||||
case 0x34E1:
|
||||
return "Message type non-existent or not implemented";
|
||||
case 0x34E2:
|
||||
return "Message not compatible with call state or message type non-existent or not implemented";
|
||||
case 0x34E3:
|
||||
return "Information element non-existent or not implemented";
|
||||
case 0x34E4:
|
||||
return "Invalid information element contents";
|
||||
case 0x34E5:
|
||||
return "Message not compatible with call state";
|
||||
case 0x34E6:
|
||||
return "Recovery on timer expiry";
|
||||
case 0x34EF:
|
||||
return "Protocol error, unspecified";
|
||||
case 0x34FF:
|
||||
return "Interworking, unspecified";
|
||||
default:
|
||||
return "No additional information";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode_Command: Returns a textstring with the CAPI-commandname
|
||||
*/
|
||||
char *Decode_Command (unsigned char Command) {
|
||||
switch (Command) {
|
||||
case 0x01:
|
||||
return "ALERT";
|
||||
case 0x02:
|
||||
return "CONNECT";
|
||||
case 0x03:
|
||||
return "CONNECT_ACTIVE";
|
||||
case 0x04:
|
||||
return "DISCONNECT";
|
||||
case 0x05:
|
||||
return "LISTEN";
|
||||
case 0x08:
|
||||
return "INFO";
|
||||
case 0x41:
|
||||
return "SELECT_B_PROTOCOL";
|
||||
case 0x80:
|
||||
return "FACILITY";
|
||||
case 0x82:
|
||||
return "CONNECT_B3";
|
||||
case 0x83:
|
||||
return "CONNECT_B3_ACTIVE";
|
||||
case 0x84:
|
||||
return "DISCONNECT_B3";
|
||||
case 0x86:
|
||||
return "DATA_B3";
|
||||
case 0x87:
|
||||
return "RESET_B3";
|
||||
case 0x88:
|
||||
return "CONNECT_B3_T90_ACTIVE";
|
||||
case 0xff:
|
||||
return "MANUFACTURER";
|
||||
}
|
||||
return "Error: Command undefined in function Decode_Command";
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode_Sub: Returns a textstring with the CAPI-subcommandname
|
||||
*/
|
||||
char *Decode_Sub (unsigned char Sub) {
|
||||
switch (Sub) {
|
||||
case 0x80:
|
||||
/* Request */
|
||||
return "REQ";
|
||||
case 0x81:
|
||||
/* Confirmation */
|
||||
return "CONF";
|
||||
case 0x82:
|
||||
/* Indication */
|
||||
return "IND";
|
||||
case 0x83:
|
||||
/* Response */
|
||||
return "RESP";
|
||||
}
|
||||
return "Error: Subcommand undefined in function Decode_Sub";
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Decode_Info: Returns a string with an error description
|
||||
* Note: infos with values of 0x00xx are only warnings and the corresponding
|
||||
* messages have been processed.
|
||||
* The description for all info values but 0x34xx is taken from the CAPI 2.0
|
||||
* specification february 1994.
|
||||
* The description for the 0x34xx values is taken from ETS 300 102-1/Q.931
|
||||
*
|
||||
* $Log$
|
||||
*/
|
||||
#ifndef _c20msg_h_
|
||||
#define _c20msg_h_
|
||||
|
||||
char *Decode_Info(unsigned int Info);
|
||||
|
||||
/*
|
||||
* Decode_Command: Returns a textstring with the CAPI-commandname
|
||||
*/
|
||||
char *Decode_Command(unsigned char Command);
|
||||
|
||||
/*
|
||||
* Decode_Sub: Returns a textstring with the CAPI-subcommandname
|
||||
*/
|
||||
char *Decode_Sub (unsigned char Sub);
|
||||
|
||||
#endif /* _c20msg_h_ */
|
276
capifax/capi.c
276
capifax/capi.c
|
@ -1,276 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Implementation of CAPI state machine
|
||||
*
|
||||
* Based heavily on
|
||||
* CAPI.C Version 1.1 by AVM
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
#include <linux/capi.h>
|
||||
#include <capi20.h>
|
||||
|
||||
#include "connect.h"
|
||||
#include "data.h"
|
||||
#include "init.h"
|
||||
#include "capi.h"
|
||||
#include "id.h"
|
||||
|
||||
#define zNCPI (_cstruct)NULL
|
||||
|
||||
static _cmsg CMESSAGE;
|
||||
static _cmsg *CMSG = &CMESSAGE; /* used in all requests and responses */
|
||||
|
||||
/*
|
||||
* SetState: Set the state internal and informs the user
|
||||
*/
|
||||
static void ChangeState (ConnectionID Con, ConnectionState State) {
|
||||
SetState (Con, State);
|
||||
/* signal the status change to the user */
|
||||
StateChange (Con, State);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle_Indication: CAPI logic for all indications
|
||||
*/
|
||||
void Handle_Indication(void) {
|
||||
ConnectionID Connection;
|
||||
|
||||
switch (CMSG->Command) {
|
||||
case CAPI_CONNECT:
|
||||
Connection = GetConnectionByPLCI (CONNECT_IND_PLCI(CMSG));
|
||||
if (Connection == INVALID_CONNECTION_ID) {
|
||||
/* incoming call */
|
||||
Connection = AllocConnection();
|
||||
if (Connection == INVALID_CONNECTION_ID) {
|
||||
/* error no internal resources, reject call */
|
||||
CONNECT_RESP(CMSG, Appl_Id, CMSG->Messagenumber,
|
||||
CONNECT_IND_PLCI(CMSG), REJECT,
|
||||
0, 0, 0, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
SetConnectionPLCI(Connection, CONNECT_IND_PLCI(CMSG));
|
||||
}
|
||||
SetCallingPartyNumberStruct (Connection, CONNECT_IND_CALLINGPARTYNUMBER(CMSG));
|
||||
SetCalledPartyNumberStruct (Connection, CONNECT_IND_CALLEDPARTYNUMBER(CMSG));
|
||||
/* The ALERT_REQuest tells the caller that someone is listening
|
||||
* for incoming calls on the line. A new timeout of 2 minutes is set
|
||||
* Without the ALERT_REQuest a disconnect would be sent after
|
||||
* 4 seconds with the cause "no user responding" on the caller side
|
||||
* (Assumed that no CONNECT_RESPonse is sent in this time)
|
||||
* of the application
|
||||
*/
|
||||
ALERT_REQ (CMSG, Appl_Id, 0, CONNECT_IND_PLCI(CMSG),
|
||||
NULL, NULL, NULL, NULL);
|
||||
/* inform the user application */
|
||||
SetState(Connection, D_ConnectPending);
|
||||
IncomingCall(Connection, GetCallingPartyNumber (Connection));
|
||||
ChangeState(Connection, D_ConnectPending);
|
||||
/* signal incoming call to the user */
|
||||
return;
|
||||
case CAPI_CONNECT_ACTIVE:
|
||||
Connection = GetConnectionByPLCI (CONNECT_ACTIVE_IND_PLCI(CMSG));
|
||||
CONNECT_ACTIVE_RESP(CMSG, Appl_Id, CMSG->Messagenumber, CONNECT_ACTIVE_IND_PLCI(CMSG));
|
||||
ChangeState(Connection, D_Connected);
|
||||
if (GetConnectionInitiator (Connection))
|
||||
CONNECT_B3_REQ(CMSG, Appl_Id, 0, CONNECT_ACTIVE_IND_PLCI(CMSG), zNCPI);
|
||||
return;
|
||||
case CAPI_CONNECT_B3:
|
||||
Connection = GetConnectionByPLCI(CONNECT_B3_IND_NCCI(CMSG) & 0x0000FFFF);
|
||||
SetConnectionNCCI(Connection, CONNECT_B3_IND_NCCI(CMSG));
|
||||
CONNECT_B3_RESP(CMSG, Appl_Id, CMSG->Messagenumber, CONNECT_B3_IND_NCCI(CMSG), 0, zNCPI);
|
||||
ChangeState(Connection, B_ConnectPending);
|
||||
return;
|
||||
case CAPI_CONNECT_B3_ACTIVE:
|
||||
Connection = GetConnectionByNCCI(CONNECT_B3_ACTIVE_IND_NCCI(CMSG));
|
||||
SetConnectionInitiator(Connection, FALSE);
|
||||
CONNECT_B3_ACTIVE_RESP(CMSG, Appl_Id, CMSG->Messagenumber, CONNECT_B3_ACTIVE_IND_NCCI(CMSG));
|
||||
ChangeState(Connection, Connected);
|
||||
return;
|
||||
case CAPI_DISCONNECT_B3:
|
||||
Connection = GetConnectionByNCCI(DISCONNECT_B3_IND_NCCI(CMSG));
|
||||
SetFaxNCPI(Connection, (faxNCPI_t *)DISCONNECT_B3_IND_NCPI(CMSG));
|
||||
SetB3Reason(Connection, DISCONNECT_B3_IND_REASON_B3(CMSG));
|
||||
SetConnectionNCCI (Connection, INVAL_NCCI);
|
||||
DISCONNECT_B3_RESP(CMSG, Appl_Id, CMSG->Messagenumber, DISCONNECT_B3_IND_NCCI(CMSG));
|
||||
ChangeState(Connection, D_Connected);
|
||||
if (GetConnectionInitiator(Connection))
|
||||
DISCONNECT_REQ(CMSG, Appl_Id, 0, GetConnectionPLCI(Connection), NULL, NULL, NULL, NULL);
|
||||
return;
|
||||
case CAPI_DISCONNECT:
|
||||
Connection = GetConnectionByPLCI(DISCONNECT_IND_PLCI(CMSG));
|
||||
SetReason(Connection, DISCONNECT_IND_REASON(CMSG));
|
||||
DISCONNECT_RESP(CMSG, Appl_Id, CMSG->Messagenumber, DISCONNECT_IND_PLCI(CMSG));
|
||||
if (Connection != INVALID_CONNECTION_ID) {
|
||||
ChangeState(Connection, Disconnected);
|
||||
FreeConnection(Connection);
|
||||
}
|
||||
return;
|
||||
case CAPI_DATA_B3:
|
||||
Connection = GetConnectionByNCCI(DATA_B3_IND_NCCI(CMSG));
|
||||
if (CMSG->DataLength > 0) {
|
||||
int DiscardData = TRUE;
|
||||
|
||||
DataAvailable(Connection,
|
||||
(void *)DATA_B3_IND_DATA(CMSG),
|
||||
DATA_B3_IND_DATALENGTH(CMSG),
|
||||
DATA_B3_IND_DATAHANDLE(CMSG),
|
||||
&DiscardData);
|
||||
if (DiscardData)
|
||||
/* let CAPI free the data area immediately */
|
||||
DATA_B3_RESP(CMSG, Appl_Id, CMSG->Messagenumber,
|
||||
DATA_B3_IND_NCCI(CMSG), DATA_B3_IND_DATAHANDLE(CMSG));
|
||||
}
|
||||
return;
|
||||
case CAPI_INFO:
|
||||
INFO_RESP(CMSG, Appl_Id, CMSG->Messagenumber, INFO_IND_PLCI(CMSG));
|
||||
return;
|
||||
default:
|
||||
fprintf(stderr, "Handle_Indication: Unsupported Indication 0x%02x.\n", CMSG->Command);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle_Confirmation: CAPI logic for all confirmations
|
||||
*/
|
||||
static void Handle_Confirmation(void) {
|
||||
ConnectionID Connection;
|
||||
|
||||
if (CMSG->Info > 0x00FF) {
|
||||
/* Info's with value 0x00xx are only
|
||||
* warnings, the corresponding requests
|
||||
* have been processed
|
||||
*/
|
||||
fprintf(stderr, "Handle_Confirmation: Info value 0x%x indicates error.\n", CMSG->Info);
|
||||
switch (CMSG->Command) {
|
||||
case CAPI_CONNECT:
|
||||
Connection = CMSG->Messagenumber;
|
||||
ChangeState (Connection, D_ConnectPending);
|
||||
ChangeState (Connection, Disconnected);
|
||||
FreeConnection(Connection);
|
||||
break;
|
||||
case CAPI_DATA_B3:
|
||||
/* return the error value */
|
||||
Connection = GetConnectionByNCCI(DATA_B3_CONF_NCCI(CMSG));
|
||||
DataConf(Connection, DATA_B3_CONF_DATAHANDLE(CMSG),
|
||||
DATA_B3_CONF_INFO(CMSG));
|
||||
break;
|
||||
case CAPI_CONNECT_B3:
|
||||
/* disconnect line */
|
||||
Connection = GetConnectionByPLCI(CONNECT_B3_CONF_NCCI(CMSG) & 0x0000FFFF);
|
||||
if (Connection == INVALID_CONNECTION_ID)
|
||||
fprintf(stderr, "Handle_Confirmation: invalid PLCI in CONNECT_B3_CONF.\n");
|
||||
else
|
||||
DISCONNECT_REQ(CMSG, Appl_Id, 0, GetConnectionPLCI(Connection),
|
||||
NULL, NULL, NULL, NULL);
|
||||
break;
|
||||
case CAPI_DISCONNECT:
|
||||
Connection = GetConnectionByPLCI(DISCONNECT_CONF_PLCI(CMSG));
|
||||
if (Connection == INVALID_CONNECTION_ID)
|
||||
fprintf(stderr, "Handle_Confirmation: invalid PLCI in DISCONNECT_CONF.\n");
|
||||
break;
|
||||
case CAPI_DISCONNECT_B3:
|
||||
Connection = GetConnectionByNCCI(DISCONNECT_B3_CONF_NCCI(CMSG));
|
||||
if (Connection == INVALID_CONNECTION_ID)
|
||||
fprintf(stderr, "Handle_Confirmation: invalid NCCI in DISCONNECT_B3_CONF.\n");
|
||||
break;
|
||||
case CAPI_LISTEN:
|
||||
fprintf(stderr, "Handle_Confirmation: Info != 0 in LISTEN_CONF.\n");
|
||||
break;
|
||||
case CAPI_INFO:
|
||||
fprintf(stderr, "Handle_Confirmation: Info != 0 in INFO_CONF.\n");
|
||||
break;
|
||||
case CAPI_ALERT:
|
||||
fprintf(stderr, "Handle_Confirmation: Info != 0 in ALERT_CONF.\n");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/* no error */
|
||||
switch (CMSG->Command) {
|
||||
case CAPI_CONNECT:
|
||||
Connection = CMSG->Messagenumber;
|
||||
SetConnectionPLCI(Connection, CONNECT_CONF_PLCI(CMSG));
|
||||
SetConnectionInitiator(Connection, TRUE);
|
||||
ChangeState(Connection, D_ConnectPending);
|
||||
return;
|
||||
case CAPI_CONNECT_B3:
|
||||
Connection = GetConnectionByPLCI(CONNECT_B3_CONF_NCCI(CMSG) & 0x0000FFFF);
|
||||
SetConnectionNCCI(Connection, CONNECT_B3_CONF_NCCI(CMSG));
|
||||
ChangeState(Connection, B_ConnectPending);
|
||||
return;
|
||||
case CAPI_DISCONNECT:
|
||||
Connection = GetConnectionByPLCI(DISCONNECT_CONF_PLCI(CMSG));
|
||||
if (Connection != INVALID_CONNECTION_ID)
|
||||
ChangeState(Connection, D_DisconnectPending);
|
||||
return;
|
||||
case CAPI_DISCONNECT_B3:
|
||||
Connection = GetConnectionByNCCI(DISCONNECT_B3_CONF_NCCI(CMSG));
|
||||
SetConnectionInitiator(Connection, TRUE);
|
||||
ChangeState(Connection, B_DisconnectPending);
|
||||
return;
|
||||
case CAPI_DATA_B3:
|
||||
Connection = GetConnectionByNCCI(DATA_B3_CONF_NCCI(CMSG));
|
||||
DataConf(Connection, DATA_B3_CONF_DATAHANDLE(CMSG),
|
||||
DATA_B3_CONF_INFO(CMSG));
|
||||
return;
|
||||
case CAPI_LISTEN:
|
||||
case CAPI_INFO:
|
||||
case CAPI_ALERT:
|
||||
return;
|
||||
default:
|
||||
fprintf(stderr, "Handle_Confirmation: Invalid Command 0x%02x.\n", CMSG->Command);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle_CAPI_Msg: the main routine, checks for messages and handles them
|
||||
*/
|
||||
void Handle_CAPI_Msg(void) {
|
||||
MESSAGE_EXCHANGE_ERROR Info;
|
||||
struct timeval tv;
|
||||
|
||||
tv.tv_sec = 1;
|
||||
tv.tv_usec = 0;
|
||||
CAPI20_WaitforMessage(Appl_Id, &tv); /* This does a select() */
|
||||
switch (Info = CAPI_GET_CMSG(CMSG, Appl_Id)) {
|
||||
case 0x0000:
|
||||
/* a message has been read */
|
||||
switch (CMSG->Subcommand) {
|
||||
case CAPI_CONF:
|
||||
Handle_Confirmation();
|
||||
break;
|
||||
case CAPI_IND:
|
||||
Handle_Indication();
|
||||
break;
|
||||
default:
|
||||
/* neither indication nor confirmation ???? */
|
||||
fprintf(stderr, "Handle_CAPI_Msg: Unknown subcommand 0x%02x.\n", CMSG->Subcommand);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 0x1104:
|
||||
/* messagequeue is empty */
|
||||
return;
|
||||
default:
|
||||
fprintf(stderr, "Handle_CAPI_Msg: CAPI_GET_CMSG returns Info != 0.\n");
|
||||
return;
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
#ifndef _capi_h_
|
||||
#define _capi_h_
|
||||
|
||||
extern void Handle_CAPI_Msg(void);
|
||||
|
||||
#endif /* _capi_h_ */
|
|
@ -1,310 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* A FAX send application for CAPI.
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/capi.h>
|
||||
#include <capi20.h>
|
||||
|
||||
#include "c20msg.h"
|
||||
#include "capi.h"
|
||||
#include "connect.h"
|
||||
#include "contr.h"
|
||||
#include "data.h"
|
||||
#include "id.h"
|
||||
#include "init.h"
|
||||
#include "fax.h"
|
||||
|
||||
extern char *stationID;
|
||||
extern char *headLine;
|
||||
|
||||
static char *CallingPartyNumber = NULL;
|
||||
static char *CalledPartyNumber = NULL;
|
||||
|
||||
static ConnectionID Slot;
|
||||
|
||||
#define B1PROTOCOL 4
|
||||
#define B2PROTOCOL 4
|
||||
#define B3PROTOCOL 4
|
||||
|
||||
#define QueueSize 8
|
||||
|
||||
typedef struct __DataElement {
|
||||
char DATA[SendBlockSize];
|
||||
unsigned short DATA_LENGTH;
|
||||
unsigned SENT;
|
||||
} _DataElement;
|
||||
|
||||
typedef struct __DataQueue {
|
||||
_DataElement Element[QueueSize];
|
||||
unsigned Head;
|
||||
unsigned Tail;
|
||||
unsigned Fill;
|
||||
} _DataQueue;
|
||||
|
||||
_DataQueue Queue;
|
||||
|
||||
static unsigned FileTransfer = FALSE; /* signals if transfer is in progress */
|
||||
static int verbose;
|
||||
static int reason;
|
||||
static int reason_b3;
|
||||
|
||||
/*--------------------------------------------------------------------------*\
|
||||
* MainDataConf: signals the successful sending of a datablock
|
||||
* This function is called after receiving a DATA_B3_CONFirmation. CAPI signals
|
||||
* that the datablock identified by DataHandle has been sent and the memory
|
||||
* area may be freed. The DataHandle is the same as specified in SendBlock.
|
||||
\*--------------------------------------------------------------------------*/
|
||||
void MainDataConf(ConnectionID Connection,
|
||||
unsigned short DataHandle,
|
||||
unsigned short Info) {
|
||||
|
||||
assert (Connection != INVALID_CONNECTION_ID);
|
||||
if (Info != 0)
|
||||
return;
|
||||
if (FileTransfer) {
|
||||
assert (DataHandle == (unsigned short)Queue.Tail);
|
||||
Queue.Element[Queue.Tail].SENT = FALSE;
|
||||
if (++Queue.Tail >= QueueSize)
|
||||
Queue.Tail = 0;
|
||||
Queue.Fill--;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*\
|
||||
* MainStateChange: signals a state change on both B-channels (connected,
|
||||
* disconnected). Whenever a channel changes his state this function is called
|
||||
\*--------------------------------------------------------------------------*/
|
||||
void MainStateChange(ConnectionID Connection, ConnectionState State) {
|
||||
faxNCPI_t *faxNCPI;
|
||||
|
||||
assert (Connection != INVALID_CONNECTION_ID);
|
||||
if (State == Disconnected) {
|
||||
unsigned short r3 = GetB3Reason(Connection);
|
||||
unsigned short r = GetReason(Connection);
|
||||
|
||||
Slot = INVALID_CONNECTION_ID;
|
||||
reason_b3 = r3;
|
||||
reason = r;
|
||||
if (!verbose)
|
||||
return;
|
||||
printf("Disconnected.\n");
|
||||
printf(" Reason : %04x %s\n", r, Decode_Info(r));
|
||||
printf(" Reason-B3 : %04x %s\n", r3, Decode_Info(r3));
|
||||
if ((faxNCPI = GetFaxNCPI(Connection))) {
|
||||
printf(" Remote Station ID : %s\n", faxNCPI->id);
|
||||
printf(" Transfer-Rate : %d bps\n", faxNCPI->rate);
|
||||
printf(" Resolution : %s\n", faxNCPI->resolution ? "high" : "low");
|
||||
printf(" Number of Pages : %d\n", faxNCPI->pages);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*\
|
||||
* Disconnect_h: high level Disconnect
|
||||
\*--------------------------------------------------------------------------*/
|
||||
unsigned Disconnect_h(ConnectionID Connection) {
|
||||
|
||||
ConnectionState State;
|
||||
|
||||
if (Connection == INVALID_CONNECTION_ID) {
|
||||
fprintf(stderr, "Disconnect_h: ConnectionID is invalid\n");
|
||||
return 0xFFFF;
|
||||
}
|
||||
State = GetState(Connection);
|
||||
if ((State == Disconnected) || (State == D_DisconnectPending))
|
||||
return 0xFFFF;
|
||||
return Disconnect(Connection);
|
||||
}
|
||||
|
||||
void InitQueue(void) {
|
||||
unsigned x;
|
||||
|
||||
for (x=0; x<QueueSize; x++)
|
||||
Queue.Element[x].SENT = FALSE;
|
||||
Queue.Head = 0;
|
||||
Queue.Tail = 0;
|
||||
Queue.Fill = 0;
|
||||
}
|
||||
|
||||
void TransferData() {
|
||||
MESSAGE_EXCHANGE_ERROR error;
|
||||
unsigned t;
|
||||
|
||||
if (Queue.Fill > 0) {
|
||||
t = Queue.Tail;
|
||||
do {
|
||||
if (Queue.Element[t].SENT == FALSE) {
|
||||
error = SendData(0,
|
||||
(void *)Queue.Element[t].DATA,
|
||||
Queue.Element[t].DATA_LENGTH,
|
||||
(unsigned short)t);
|
||||
|
||||
if (error != 0) {
|
||||
fprintf(stderr, "Error during transfer: 0x%04X !!!\n",error);
|
||||
break;
|
||||
}
|
||||
Queue.Element[t].SENT = TRUE;
|
||||
}
|
||||
if (++t >= QueueSize)
|
||||
t = 0;
|
||||
} while (t != Queue.Head);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned SendFax(char *name) {
|
||||
int first;
|
||||
char mbuf[4];
|
||||
unsigned count;
|
||||
B3_PROTO_FAXG3 B3conf;
|
||||
FILE *f;
|
||||
|
||||
first = 1;
|
||||
reason = reason_b3 = 0;
|
||||
if (!strcmp(name, "-"))
|
||||
f = stdin;
|
||||
else
|
||||
f = fopen(name, "rb");
|
||||
if (!f) {
|
||||
perror(name);
|
||||
exit(errno);
|
||||
}
|
||||
fread(mbuf, 4, 1, f);
|
||||
|
||||
InitQueue();
|
||||
SetupB3Config(&B3conf,
|
||||
(strncmp(mbuf, "Sfff", 4)) ? FAX_ASCII_FORMAT:FAX_SFF_FORMAT);
|
||||
if (Slot != INVALID_CONNECTION_ID) {
|
||||
fprintf(stderr, "Connection is already in use\n");
|
||||
fclose(f);
|
||||
return 0xFFFF;
|
||||
}
|
||||
Connect(&Slot, CalledPartyNumber, CallingPartyNumber, SPEECH,
|
||||
B1PROTOCOL, B2PROTOCOL, B3PROTOCOL, (unsigned char *)&B3conf);
|
||||
do {
|
||||
Handle_CAPI_Msg();
|
||||
if (Slot == INVALID_CONNECTION_ID) {
|
||||
fclose(f);
|
||||
return 2;
|
||||
}
|
||||
} while (GetState(Slot) != Connected);
|
||||
FileTransfer = TRUE;
|
||||
while (!feof(f)) {
|
||||
if (Queue.Fill < 7) {
|
||||
/* max. 7 outstanding blocks supported by CAPI */
|
||||
if (first) {
|
||||
memcpy(&(Queue.Element[Queue.Head].DATA[0]), mbuf, 4);
|
||||
count = fread(&(Queue.Element[Queue.Head].DATA[4]), 1,
|
||||
SendBlockSize - 4, f);
|
||||
} else
|
||||
count = fread(&(Queue.Element[Queue.Head].DATA[0]), 1,
|
||||
SendBlockSize, f);
|
||||
if (count > 0) {
|
||||
if (first)
|
||||
count += 4;
|
||||
Queue.Element[Queue.Head].DATA_LENGTH = (unsigned short)count;
|
||||
if (++Queue.Head >= QueueSize)
|
||||
Queue.Head = 0;
|
||||
Queue.Fill++;
|
||||
}
|
||||
first = 0;
|
||||
}
|
||||
if (GetState(Slot) != Connected)
|
||||
break;
|
||||
TransferData();
|
||||
Handle_CAPI_Msg();
|
||||
}
|
||||
Disconnect_h(Slot);
|
||||
while ((Slot != INVALID_CONNECTION_ID) &&
|
||||
(GetState(Slot) != Disconnected))
|
||||
Handle_CAPI_Msg();
|
||||
FileTransfer = FALSE;
|
||||
fclose(f);
|
||||
switch (reason) {
|
||||
case 0x3490: /* Normal call clearing */
|
||||
case 0x349f: /* Normal, unspecified */
|
||||
return reason_b3;
|
||||
default:
|
||||
return reason;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void usage(void) {
|
||||
fprintf(stderr, "usage: capifax [-v] [-i stationID] [-h header] [-c callerNumber] phone file\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int numController;
|
||||
int BChannels, Contr;
|
||||
int c;
|
||||
int ret;
|
||||
|
||||
verbose = 0;
|
||||
while ((c = getopt(argc, argv, "vc:i:h:")) != EOF) {
|
||||
switch (c) {
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'c':
|
||||
CallingPartyNumber = strdup(optarg);
|
||||
break;
|
||||
case 'i':
|
||||
stationID = strdup(optarg);
|
||||
break;
|
||||
case 'h':
|
||||
headLine = strdup(optarg);
|
||||
break;
|
||||
case '?':
|
||||
usage();
|
||||
}
|
||||
}
|
||||
if (argc < optind + 2)
|
||||
usage();
|
||||
CalledPartyNumber = argv[optind++];
|
||||
Slot = INVALID_CONNECTION_ID;
|
||||
MainDataConf_p = MainDataConf;
|
||||
MainStateChange_p = MainStateChange;
|
||||
if (!RegisterCAPI())
|
||||
return -1;
|
||||
atexit (ReleaseCAPI);
|
||||
InitConnectionIDHandling();
|
||||
if (!(numController = GetNumController())) {
|
||||
fprintf(stderr, "No CAPI controllers available\n");
|
||||
return -2;
|
||||
}
|
||||
BChannels = 0;
|
||||
for (Contr=1; Contr<=numController; Contr++)
|
||||
BChannels += GetNumOfSupportedBChannels(Contr);
|
||||
if (!BChannels) {
|
||||
fprintf(stderr, "No B-Channels available\n");
|
||||
return -3;
|
||||
}
|
||||
ret = SendFax(argv[optind]);
|
||||
if ((Slot != INVALID_CONNECTION_ID) &&
|
||||
(GetState(Slot) != Disconnected) &&
|
||||
(GetState(Slot) != D_DisconnectPending))
|
||||
Disconnect(Slot);
|
||||
return ret;
|
||||
}
|
|
@ -1,324 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* A FAX receive daemon for CAPI.
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <linux/capi.h>
|
||||
#include <capi20.h>
|
||||
|
||||
#include "c20msg.h"
|
||||
#include "capi.h"
|
||||
#include "connect.h"
|
||||
#include "contr.h"
|
||||
#include "data.h"
|
||||
#include "id.h"
|
||||
#include "init.h"
|
||||
#include "fax.h"
|
||||
|
||||
extern char *stationID;
|
||||
extern char *headLine;
|
||||
|
||||
static char *CalledPartyNumber = NULL;
|
||||
static char *RcvDir = NULL;
|
||||
static char *notifyCmd = NULL;
|
||||
static char RcvName[1024];
|
||||
|
||||
static ConnectionID Slot;
|
||||
|
||||
#define B1PROTOCOL 4
|
||||
#define B2PROTOCOL 4
|
||||
#define B3PROTOCOL 4
|
||||
|
||||
#define QueueSize 8
|
||||
|
||||
typedef struct __DataElement {
|
||||
char DATA[SendBlockSize];
|
||||
unsigned short DATA_LENGTH;
|
||||
unsigned SENT;
|
||||
} _DataElement;
|
||||
|
||||
typedef struct __DataQueue {
|
||||
_DataElement Element[QueueSize];
|
||||
unsigned Head;
|
||||
unsigned Tail;
|
||||
unsigned Fill;
|
||||
} _DataQueue;
|
||||
|
||||
_DataQueue Queue;
|
||||
|
||||
static unsigned FileReceive = FALSE; /* signals if transfer is in progress */
|
||||
static FILE *f;
|
||||
static int reason;
|
||||
static int reason_b3;
|
||||
static int rres;
|
||||
static int rpages;
|
||||
static char rid[50];
|
||||
|
||||
/*
|
||||
* MainDataAvailable: signals received data blocks
|
||||
* This function is called after a DATA_B3_INDication is received. The flag
|
||||
* DiscardData tells CAPI to free the memora area directly after the return
|
||||
* of this function when set to TRUE (1) which is the preset. When the flag
|
||||
* is set to FALSE (0) the data area MUST be freed later with ReleaseData.
|
||||
* The datahandle identifies the memory area. When reaching 7 unconfirmed
|
||||
* blocks, no more incoming data will be signaled until freeing at least
|
||||
* one block.
|
||||
*/
|
||||
static void MainDataAvailable(ConnectionID Connection, void *Data, unsigned short DataLength,
|
||||
unsigned short DataHandle, int *DiscardData) {
|
||||
assert (Connection != INVALID_CONNECTION_ID);
|
||||
if ((FileReceive) && (f != NULL))
|
||||
fwrite(Data, 1, DataLength, f);
|
||||
*DiscardData = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* MainStateChange: signals a state change on both B-channels (connected,
|
||||
* disconnected). Whenever a channel changes his state this function is called
|
||||
*/
|
||||
static void MainStateChange(ConnectionID Connection, ConnectionState State) {
|
||||
faxNCPI_t *faxNCPI;
|
||||
|
||||
assert (Connection != INVALID_CONNECTION_ID);
|
||||
if (State == Disconnected) {
|
||||
unsigned short r3 = GetB3Reason(Connection);
|
||||
unsigned short r = GetReason(Connection);
|
||||
|
||||
Slot = INVALID_CONNECTION_ID;
|
||||
reason = r;
|
||||
reason_b3 = r3;
|
||||
#if 0
|
||||
printf("Disconnected.\n");
|
||||
printf(" Reason : %04x %s\n", r, Decode_Info(r));
|
||||
printf(" Reason-B3 : %04x %s\n", r3, Decode_Info(r3));
|
||||
#endif
|
||||
if ((faxNCPI = GetFaxNCPI(Connection))) {
|
||||
strcpy(rid, faxNCPI->id);
|
||||
rres = faxNCPI->resolution;
|
||||
rpages = faxNCPI->pages;
|
||||
|
||||
#if 0
|
||||
printf(" Remote Station ID : %s\n", faxNCPI->id);
|
||||
printf(" Transfer-Rate : %d bps\n", faxNCPI->rate);
|
||||
printf(" Resolution : %s\n", faxNCPI->resolution ? "high" : "low");
|
||||
printf(" Number of Pages : %d\n", faxNCPI->pages);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* MainIncomingCall: signals an incoming call
|
||||
* This function will be executed if a CONNECT_INDication appears to
|
||||
* inform the user.
|
||||
*/
|
||||
static void MainIncomingCall(ConnectionID Connection, char *CallingPartyNumber) {
|
||||
B3_PROTO_FAXG3 B3conf;
|
||||
|
||||
assert (Connection != INVALID_CONNECTION_ID);
|
||||
syslog(LOG_INFO, "Incoming Call from %s\n", CallingPartyNumber);
|
||||
SetupB3Config(&B3conf, FAX_SFF_FORMAT);
|
||||
if (CalledPartyNumber && strlen(CalledPartyNumber)) {
|
||||
syslog(LOG_INFO, "Called #: %s\n", GetCalledPartyNumber(Connection));
|
||||
if (strcmp(GetCalledPartyNumber(Connection), CalledPartyNumber)) {
|
||||
AnswerCall(Connection, IGNORE, 4, 4, 4, (_cstruct)&B3conf);
|
||||
syslog(LOG_INFO, "Call from %s ignored\n", CallingPartyNumber);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Slot == INVALID_CONNECTION_ID) {
|
||||
Slot = Connection;
|
||||
sprintf(RcvName, "rc-%s-%08lx", CallingPartyNumber, time(NULL));
|
||||
f = fopen(RcvName, "wb");
|
||||
if (f != NULL) {
|
||||
FileReceive = TRUE;
|
||||
syslog(LOG_INFO, "Call from %s accepted\n", CallingPartyNumber);
|
||||
AnswerCall(Connection, ACCEPT, 4, 4, 4, (_cstruct)&B3conf);
|
||||
chmod(RcvName, 0600);
|
||||
return;
|
||||
}
|
||||
}
|
||||
AnswerCall(Connection, REJECT, 4, 4, 4, (_cstruct)&B3conf);
|
||||
syslog(LOG_INFO, "Call from %s rejected\n", CallingPartyNumber);
|
||||
}
|
||||
|
||||
void InitQueue(void) {
|
||||
unsigned x;
|
||||
|
||||
for (x=0; x<QueueSize; x++)
|
||||
Queue.Element[x].SENT = FALSE;
|
||||
Queue.Head = 0;
|
||||
Queue.Tail = 0;
|
||||
Queue.Fill = 0;
|
||||
}
|
||||
|
||||
unsigned ReceiveFax() {
|
||||
int gotdata;
|
||||
int ret = 0;
|
||||
|
||||
reason = reason_b3 = rpages = rres = 0;
|
||||
rid[0] = '\0';
|
||||
syslog(LOG_INFO, "Start listening\n");
|
||||
InitQueue();
|
||||
Listen(0x1FFF03FF);
|
||||
while (Slot == INVALID_CONNECTION_ID)
|
||||
Handle_CAPI_Msg();
|
||||
while (Slot != INVALID_CONNECTION_ID)
|
||||
Handle_CAPI_Msg();
|
||||
FileReceive = FALSE;
|
||||
gotdata = (ftell(f) != 0L);
|
||||
fclose(f);
|
||||
switch (reason) {
|
||||
case 0:
|
||||
case 0x3490: /* Normal call clearing */
|
||||
case 0x349f: /* Normal, unspecified */
|
||||
ret = reason_b3;
|
||||
break;
|
||||
default:
|
||||
ret = reason;
|
||||
}
|
||||
if (gotdata && (!ret) && rpages) {
|
||||
/* Rename fax to reflect resolution, pages and remote-id */
|
||||
int i;
|
||||
int l;
|
||||
char newname[1024];
|
||||
|
||||
sprintf(newname, "f%c%03d%08lx", (rres)?'f':'n', rpages,
|
||||
time(NULL));
|
||||
l = strlen(newname);
|
||||
for (i=0; rid[i]; i++) {
|
||||
switch(rid[i]) {
|
||||
case ' ':
|
||||
newname[l++] = '_';
|
||||
break;
|
||||
case '/':
|
||||
case '\\':
|
||||
case '&':
|
||||
case ';':
|
||||
case '(':
|
||||
case ')':
|
||||
case '>':
|
||||
case '<':
|
||||
case '|':
|
||||
case '?':
|
||||
case '*':
|
||||
case '\'':
|
||||
case '"':
|
||||
case '`':
|
||||
if (newname[l-1] != '-' )
|
||||
newname[l++] = '-';
|
||||
break;
|
||||
default:
|
||||
newname[l++] = rid[i];
|
||||
}
|
||||
}
|
||||
newname[l] = '\0';
|
||||
rename(RcvName, newname);
|
||||
chmod(newname, 0640);
|
||||
syslog(LOG_INFO, "Received a FAX\n");
|
||||
if (notifyCmd) {
|
||||
sprintf(RcvName, "%s %s", notifyCmd, newname);
|
||||
system(RcvName);
|
||||
}
|
||||
} else
|
||||
remove(RcvName);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void usage(void) {
|
||||
fprintf(stderr, "usage: capifaxrcvd [-i stationID] [-h header] [-l listenNumber] [-n notifyCmd] rcvDirectory\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int numController;
|
||||
int BChannels, Contr;
|
||||
int c;
|
||||
|
||||
while ((c = getopt(argc, argv, "l:i:h:n:")) != EOF) {
|
||||
switch (c) {
|
||||
case 'l':
|
||||
CalledPartyNumber = strdup(optarg);
|
||||
break;
|
||||
case 'i':
|
||||
stationID = strdup(optarg);
|
||||
break;
|
||||
case 'h':
|
||||
headLine = strdup(optarg);
|
||||
break;
|
||||
case 'n':
|
||||
notifyCmd = strdup(optarg);
|
||||
break;
|
||||
case '?':
|
||||
usage();
|
||||
}
|
||||
}
|
||||
if (argc < optind + 1)
|
||||
usage();
|
||||
RcvDir = argv[optind];
|
||||
if (chdir(RcvDir) != 0) {
|
||||
perror(RcvDir);
|
||||
return -1;
|
||||
}
|
||||
Slot = INVALID_CONNECTION_ID;
|
||||
MainStateChange_p = MainStateChange;
|
||||
MainDataAvailable_p = MainDataAvailable;
|
||||
MainIncomingCall_p = MainIncomingCall;
|
||||
if (!RegisterCAPI())
|
||||
return -1;
|
||||
atexit (ReleaseCAPI);
|
||||
InitConnectionIDHandling();
|
||||
if (!(numController = GetNumController())) {
|
||||
fprintf(stderr, "No CAPI controllers available\n");
|
||||
return -2;
|
||||
}
|
||||
BChannels = 0;
|
||||
for (Contr=1; Contr<=numController; Contr++)
|
||||
BChannels += GetNumOfSupportedBChannels(Contr);
|
||||
if (!BChannels) {
|
||||
fprintf(stderr, "No B-Channels available\n");
|
||||
return -3;
|
||||
}
|
||||
switch (fork()) {
|
||||
case 0:
|
||||
openlog("capifaxrcvd", LOG_PID, LOG_DAEMON);
|
||||
close(0);
|
||||
close(1);
|
||||
close(2);
|
||||
while (1)
|
||||
ReceiveFax();
|
||||
if ((Slot != INVALID_CONNECTION_ID) &&
|
||||
(GetState(Slot) != Disconnected) &&
|
||||
(GetState(Slot) != D_DisconnectPending))
|
||||
Disconnect(Slot);
|
||||
break;
|
||||
case -1:
|
||||
perror("fork");
|
||||
exit(errno);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
#undef VERSION
|
||||
#undef PACKAGE
|
||||
#undef CONFIG_SBINDIR
|
||||
#undef CONFIG_MANDIR
|
||||
|
||||
/* 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
|
File diff suppressed because it is too large
Load Diff
|
@ -1,48 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(capifax.c)
|
||||
AM_INIT_AUTOMAKE(capifax, 1.0)
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
I4LCONFDIR=`eval echo ${CONFIG_I4LCONFDIR:-"/etc/isdn"}`
|
||||
I4LVERSION=${I4LVERSION:-"?.?"}
|
||||
CONFIG_KERNELDIR=${CONFIG_KERNELDIR:-"/usr/src/linux"}
|
||||
CONFIG_SBINDIR=${CONFIG_SBINDIR:-"/sbin"}
|
||||
CONFIG_MANDIR=${CONFIG_MANDIR:-"/usr/man"}
|
||||
#MANDATE=`grep CHECKIN isdnctrl.man.in | awk '{print $4}'`
|
||||
|
||||
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)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Optional sbin directory
|
||||
AC_ARG_WITH(sbin,
|
||||
[ --with-sbin=DIR Set dir where binary is istalled. [/sbin]],
|
||||
CONFIG_SBINDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_SBINDIR,"${withval}"),
|
||||
)
|
||||
|
||||
dnl Optional man directory
|
||||
AC_ARG_WITH(man,
|
||||
[ --with-man=DIR Set manpage dir. [/usr/man]],
|
||||
CONFIG_MANDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_MANDIR,"${withval}"),
|
||||
)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(DBMLIB)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(I4LCONFDIR)
|
||||
AC_SUBST(I4LVERSION)
|
||||
AC_SUBST(CONFIG_KERNELDIR)
|
||||
AC_SUBST(CONFIG_SBINDIR)
|
||||
AC_SUBST(CONFIG_MANDIR)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_OUTPUT(Makefile)
|
|
@ -1,204 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Functions concerning activation and deactivation of connections
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <assert.h>
|
||||
#include <sys/time.h>
|
||||
#include <linux/capi.h>
|
||||
#include <capi20.h>
|
||||
|
||||
#include "contr.h"
|
||||
#include "init.h"
|
||||
#include "connect.h"
|
||||
|
||||
/* Function Pointers for Callback-Functions */
|
||||
MainStateChange_t MainStateChange_p = 0L;
|
||||
MainIncomingCall_t MainIncomingCall_p = 0L;
|
||||
|
||||
/*
|
||||
* Listen: send a LISTEN_REQ
|
||||
* parameters: CIPmask (which services shall be accepted) (see CAPI 2.0 spec.)
|
||||
* Listen will be sent to the number of controllers specified in InitISDN.
|
||||
* Listen with CIPmask = 0 results in getting no incoming calls signaled
|
||||
* by CAPI.
|
||||
*/
|
||||
unsigned Listen(unsigned long CIPmask) {
|
||||
MESSAGE_EXCHANGE_ERROR error;
|
||||
_cmsg CMSG;
|
||||
unsigned Controller;
|
||||
unsigned numController;
|
||||
|
||||
/* send listen to all controllers */
|
||||
numController = GetNumController();
|
||||
for (Controller=1; Controller<=numController; Controller++) {
|
||||
LISTEN_REQ_HEADER(&CMSG, Appl_Id, 0, Controller);
|
||||
LISTEN_REQ_CIPMASK(&CMSG) = CIPmask;
|
||||
if ((error = CAPI_PUT_CMSG(&CMSG)) != 0)
|
||||
return error;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* all capi functions can also be called with all possible parameters specified
|
||||
* direct in the function, e.g.
|
||||
*
|
||||
* error = CONNECT_REQ(&CMSG, Appl_Id, 0,
|
||||
* Controller, CIPValue,
|
||||
* CalledPartyNumber, CallingPartyNumber,
|
||||
* CalledPartySubaddress, CallingPartySubaddress,
|
||||
* B1Protokoll, B2Protokoll, B3Protokoll,
|
||||
* B1Configuration, B2Configuration, B3Configuration,
|
||||
* BC, LLC, HLC,
|
||||
* NULL, NULL, NULL, NULL);
|
||||
*/
|
||||
|
||||
/*
|
||||
* Connect: try's to connect to 'CalledPartyNumber'
|
||||
* the return value of CAPI_PUT_CMSG is the same as CAPI_PUT_MESSAGE
|
||||
* (defined in CAPI 2.0 spec. error class 0x11xx )
|
||||
* If CallingPartyNumber is not needed, set to NULL.
|
||||
* CallingPartyNumber & CalledPartyNumber have to be zero terminated strings.
|
||||
* For datatransmission set the protocols to zero, B3Configuration to NULL
|
||||
*/
|
||||
unsigned Connect(ConnectionID *Connection, char *CalledPartyNumber, char *CallingPartyNumber,
|
||||
unsigned long Service, unsigned short B1Protocol, unsigned short B2Protocol,
|
||||
unsigned short B3Protocol, unsigned char *B3Configuration) {
|
||||
|
||||
_cmsg CMSG;
|
||||
MESSAGE_EXCHANGE_ERROR error;
|
||||
long Controller;
|
||||
unsigned short CIPValue;
|
||||
|
||||
assert (*Connection == INVALID_CONNECTION_ID);
|
||||
|
||||
Controller = GetFreeController();
|
||||
if (Controller == INVAL_CONTROLLER) {
|
||||
/* if no available controller use the first one for correct
|
||||
* error signaling
|
||||
*/
|
||||
Controller = 1;
|
||||
}
|
||||
*Connection = AllocConnection();
|
||||
if (*Connection == INVALID_CONNECTION_ID) {
|
||||
fprintf(stderr, "Connect: No available connection identifiers.\n");
|
||||
/* no OS resources */
|
||||
return 0x1108;
|
||||
}
|
||||
/* use ConnectionIdentifier as Messagenumber */
|
||||
CONNECT_REQ_HEADER(&CMSG, Appl_Id, (unsigned short)*Connection, Controller);
|
||||
/* build up service mask */
|
||||
CIPValue = 0;
|
||||
if (Service != 0) {
|
||||
do {
|
||||
if (Service & 1)
|
||||
break;
|
||||
Service >>= 1;
|
||||
CIPValue++;
|
||||
} while (CIPValue < 31);
|
||||
}
|
||||
CONNECT_REQ_CIPVALUE(&CMSG) = CIPValue;
|
||||
SetCalledPartyNumber (*Connection, CalledPartyNumber);
|
||||
SetCallingPartyNumber (*Connection, CallingPartyNumber);
|
||||
CONNECT_REQ_CALLEDPARTYNUMBER(&CMSG) = GetCalledPartyNumberStruct(*Connection);
|
||||
CONNECT_REQ_CALLINGPARTYNUMBER(&CMSG) = GetCallingPartyNumberStruct(*Connection);
|
||||
CONNECT_REQ_B1PROTOCOL(&CMSG) = B1Protocol;
|
||||
CONNECT_REQ_B2PROTOCOL(&CMSG) = B2Protocol;
|
||||
CONNECT_REQ_B3PROTOCOL(&CMSG) = B3Protocol;
|
||||
CONNECT_REQ_B3CONFIGURATION(&CMSG) = B3Configuration;
|
||||
error = CAPI_PUT_CMSG(&CMSG);
|
||||
if (error != 0) {
|
||||
FreeConnection (*Connection);
|
||||
*Connection = INVALID_CONNECTION_ID;
|
||||
fprintf(stderr, "Connect: error in CAPI_PUT_MESSAGE\n");
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
* Disconnect: disconnects one channel
|
||||
* The ConnectionID must be valid
|
||||
*/
|
||||
unsigned Disconnect(ConnectionID Connection) {
|
||||
_cmsg CMSG;
|
||||
MESSAGE_EXCHANGE_ERROR error;
|
||||
|
||||
assert (Connection != INVALID_CONNECTION_ID);
|
||||
|
||||
switch (GetState(Connection)) {
|
||||
case Connected:
|
||||
case B_ConnectPending:
|
||||
SetConnectionInitiator (Connection, TRUE);
|
||||
DISCONNECT_B3_REQ_HEADER(&CMSG, Appl_Id, 0, GetConnectionNCCI (Connection));
|
||||
error = CAPI_PUT_CMSG(&CMSG);
|
||||
break;
|
||||
case D_Connected:
|
||||
case D_ConnectPending:
|
||||
case B_DisconnectPending:
|
||||
SetConnectionInitiator (Connection, TRUE);
|
||||
DISCONNECT_REQ_HEADER(&CMSG, Appl_Id, 0, GetConnectionPLCI (Connection));
|
||||
error = CAPI_PUT_CMSG(&CMSG);
|
||||
break;
|
||||
default:
|
||||
error = 0;
|
||||
break;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
* IncomingCall: signals an incoming call
|
||||
* This function will be executed if a CONNECT_INDication appears to
|
||||
* inform the user. This function is implemented in the main program
|
||||
*/
|
||||
void IncomingCall(ConnectionID Connection, char *CallingPartyNumber) {
|
||||
if (MainIncomingCall_p)
|
||||
MainIncomingCall_p(Connection, CallingPartyNumber);
|
||||
}
|
||||
|
||||
/*
|
||||
* AnswerCall: answers incoming call with the specified reject-value
|
||||
* (some reject-values are defined in the req.h file)
|
||||
* (for more see CAPI 2.0 spec.)
|
||||
*/
|
||||
unsigned AnswerCall(ConnectionID Connection, RejectValue Reject, unsigned short B1Protocol,
|
||||
unsigned short B2Protocol, unsigned short B3Protocol, unsigned char *B3Configuration) {
|
||||
|
||||
_cmsg CMSG;
|
||||
|
||||
assert (Connection != INVALID_CONNECTION_ID);
|
||||
|
||||
CONNECT_RESP_HEADER(&CMSG, Appl_Id, 0, GetConnectionPLCI (Connection));
|
||||
CONNECT_RESP_REJECT(&CMSG) = (unsigned short)Reject;
|
||||
CONNECT_REQ_B1PROTOCOL(&CMSG) = B1Protocol;
|
||||
CONNECT_REQ_B2PROTOCOL(&CMSG) = B2Protocol;
|
||||
CONNECT_REQ_B3PROTOCOL(&CMSG) = B3Protocol;
|
||||
CONNECT_REQ_B3CONFIGURATION(&CMSG) = B3Configuration;
|
||||
return CAPI_PUT_CMSG(&CMSG);
|
||||
}
|
||||
|
||||
/*
|
||||
* StateChange: signals a state change on both B-channels (connected, disconnected)
|
||||
* Whenever a channel changes his state this function is called
|
||||
* This function is implemented in the main program
|
||||
*/
|
||||
void StateChange(ConnectionID Connection, ConnectionState State) {
|
||||
if (MainStateChange_p)
|
||||
MainStateChange_p(Connection, State);
|
||||
}
|
|
@ -1,91 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Functions concerning activation and deactivation of connections
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
#ifndef _connect_h_
|
||||
#define _connect_h_
|
||||
|
||||
#include "id.h"
|
||||
|
||||
/*
|
||||
* Listen: send a LISTEN_REQ
|
||||
* parameters: CIPmask (which services shall be accepted) (see CAPI 2.0 spec.)
|
||||
* Listen will be sent to the number of controllers specified in InitISDN.
|
||||
* Listen with CIPmask = 0 results in getting no incoming calls signaled
|
||||
* by CAPI.
|
||||
*/
|
||||
#define NO_SERVICES 0x00000000
|
||||
#define ALL_SERVICES 0x1FFF03FF
|
||||
#define SPEECH 0x00000002
|
||||
#define DATA_TRANSFER 0x00000004
|
||||
#define AUDIO3_1KHZ 0x00000010
|
||||
#define TELEPHONY 0x00010000
|
||||
#define FAX_GROUP2_3 0x00020000
|
||||
|
||||
unsigned Listen(unsigned long CIPmask);
|
||||
|
||||
/*
|
||||
* Connect: try's to connect to 'CalledPartyNumber'
|
||||
* the return value of CAPI_PUT_CMSG is the same as CAPI_PUT_MESSAGE
|
||||
* (defined in CAPI 2.0 spec. error class 0x11xx )
|
||||
* If CallingPartyNumber is not needed, set to NULL.
|
||||
* CallingPartyNumber & CalledPartyNumber have to be zero terminated strings.
|
||||
* For datatransmission set the protocols to zero, B3Configuration to NULL
|
||||
*/
|
||||
unsigned Connect(ConnectionID *Connection, char *CalledPartyNumber, char *CallingPartyNumber,
|
||||
unsigned long Service, unsigned short B1Protocol, unsigned short B2Protocol,
|
||||
unsigned short B3Protocol, unsigned char *B3Configuration);
|
||||
|
||||
/*
|
||||
* Disconnect: disconnects one channel
|
||||
* The ConnectionID must be valid
|
||||
*/
|
||||
unsigned Disconnect(ConnectionID Connection);
|
||||
|
||||
/*
|
||||
* IncomingCall: signals an incoming call
|
||||
* This function will be executed if a CONNECT_INDication appears to
|
||||
* inform the user. This function has to be implemented in the main program
|
||||
*/
|
||||
void IncomingCall(ConnectionID Connection, char *CallingPartyNumber);
|
||||
|
||||
/*
|
||||
* AnswerCall: answers incoming call with the specified reject-value
|
||||
* (for more see CAPI 2.0 spec.)
|
||||
*/
|
||||
typedef enum _RejectValue {
|
||||
ACCEPT,
|
||||
IGNORE,
|
||||
REJECT
|
||||
} RejectValue;
|
||||
|
||||
unsigned AnswerCall(ConnectionID Connection, RejectValue Reject, unsigned short B1Protocol,
|
||||
unsigned short B2Protocol, unsigned short B3Protocol, unsigned char *B3Configuration);
|
||||
|
||||
/*
|
||||
* StateChange: signals a state change on both B-channels (connected, disconnected)
|
||||
* Whenever a channel changes his state this function is called
|
||||
* This function has to be implemented in the main program
|
||||
*/
|
||||
void StateChange(ConnectionID Connection, ConnectionState State);
|
||||
|
||||
typedef void (*MainStateChange_t)(ConnectionID, ConnectionState);
|
||||
typedef void (*MainIncomingCall_t)(ConnectionID, char *);
|
||||
extern MainStateChange_t MainStateChange_p;
|
||||
extern MainIncomingCall_t MainIncomingCall_p;
|
||||
|
||||
#endif /*----- _connect_h_ -----*/
|
|
@ -1,66 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Functions for dealing with controllers.
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <sys/time.h>
|
||||
#include <linux/capi.h>
|
||||
#include <capi20.h>
|
||||
|
||||
#include "contr.h"
|
||||
#include "id.h"
|
||||
|
||||
/*
|
||||
* GetNumController: Returns the number of controllers detected by CAPI
|
||||
*/
|
||||
unsigned GetNumController(void) {
|
||||
unsigned short Buffer;
|
||||
|
||||
/* retrieve the number of installed controllers */
|
||||
CAPI20_GET_PROFILE (0, (unsigned char *)&Buffer);
|
||||
return Buffer;
|
||||
}
|
||||
|
||||
/*
|
||||
* GetNumOfSupportedBChannels: Returns the number of supported B-channels
|
||||
* for the specified controller
|
||||
*/
|
||||
unsigned GetNumOfSupportedBChannels (long Controller) {
|
||||
unsigned short Buffer[64 / sizeof (unsigned short)];
|
||||
|
||||
assert (Controller != INVAL_CONTROLLER);
|
||||
/* retrieve controller specific information */
|
||||
CAPI20_GET_PROFILE((unsigned)Controller, (unsigned char *)Buffer);
|
||||
return (unsigned)Buffer[1];
|
||||
}
|
||||
|
||||
/*
|
||||
* GetFreeController: Returns the number of the first controller that has
|
||||
* one free B-channel, or INVAL_CONTROLLER if none found.
|
||||
*/
|
||||
long GetFreeController(void) {
|
||||
long Controller;
|
||||
int numController;
|
||||
|
||||
numController = GetNumController ();
|
||||
for (Controller = 1; Controller <= numController; Controller++) {
|
||||
if (GetNumOfSupportedBChannels (Controller) > GetNumberOfConnections (Controller)) {
|
||||
return Controller;
|
||||
}
|
||||
}
|
||||
return INVAL_CONTROLLER;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Functions for dealing with controllers.
|
||||
* This stuff is based heavily on AVM's CAPI-adk for linux.
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
#ifndef _contr_h_
|
||||
#define _contr_h_
|
||||
|
||||
/*
|
||||
* GetNumController: Returns the number of controllers detected by CAPI
|
||||
*/
|
||||
unsigned GetNumController (void);
|
||||
|
||||
/*
|
||||
* GetNumOfSupportedBChannels: Returns the number of supported B-channels
|
||||
* for the specified controller
|
||||
*/
|
||||
unsigned GetNumOfSupportedBChannels (long Controller);
|
||||
|
||||
/*
|
||||
* GetFreeController: Returns the number of the first controller that has
|
||||
* one free B-channel, or INVAL_CONTROLLER if none found.
|
||||
*/
|
||||
long GetFreeController (void);
|
||||
|
||||
#endif /* _contr_h_ */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue