isdnlog-3.58

- big cleanup ( > 1.3 Mb removed!)
  - v0.02 of destination support - better, but not perfect
    (does't work with gcc-2.7.2.3 yet - use egcs!)
This commit is contained in:
akool 1999-10-26 18:17:11 +00:00
parent c793cb437a
commit a9c6ab312a
29 changed files with 237 additions and 6147 deletions

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.38 1999/10/25 12:29:44 keil Exp $
# $Id: Makefile,v 1.39 1999/10/26 18:17:11 akool Exp $
#
# Toplevel Makefile for isdn4k-utils
#
@ -24,15 +24,14 @@ CONFIGURATION = config
do-it-all: config
endif
EXTRADIRS = isdnlog/tools/zone isdnlog/tools/dest
SUBDIRS :=
ifeq ($(CONFIG_LIB_AREACODE),y)
SUBDIRS := $(SUBDIRS) areacode
endif
ifeq ($(CONFIG_ISDNLOG),y)
SUBDIRS := $(SUBDIRS) areacode lib
SUBDIRS := $(SUBDIRS) lib $(EXTRADIRS)
else
ifeq ($(CONFIG_CTRL_CONF),y)
SUBDIRS := $(SUBDIRS) areacode lib
SUBDIRS := $(SUBDIRS) lib
endif
endif
ifeq ($(CONFIG_ISDNCTRL),y)
@ -158,6 +157,9 @@ clean:
for i in `echo ${wildcard */Makefile}`; do \
$(MAKE) -i -C `dirname $$i` clean; \
done;
for i in `echo $(EXTRADIRS)`; do \
$(MAKE) -i -C $$i clean; \
done;
-rm -f *~ *.o
distclean: clean
@ -172,6 +174,9 @@ distclean: clean
$(MAKE) -i -C `dirname $$i` distclean; \
fi ; \
done;
for i in `echo $(EXTRADIRS)`; do \
$(MAKE) -i -C $$i distclean; \
done;
-rm -f *~ .config .config.old scripts/autoconf.h .menuconfig \
Makefile.tmp .menuconfig.log scripts/defconfig.old
find . -name '.#*' -exec rm -f {} \;

4
NEWS
View File

@ -1,6 +1,10 @@
Recent changes made to the isdn4k-utils archive are listed here,
most recent on top.
------------------
1999/10/12 lt (Leopold Toetch <lt@toetsch.at>)
Destination database replaces country stuff and getAreacode
1999/10/08 he (Henner Eisen <eis@baty.hanse.de)
eurofile - further integration in isdn4k-utils config/built,
removed entry from distexclude file.

4
README
View File

@ -1,5 +1,5 @@
#
# $Id: README,v 1.11 1999/07/05 21:19:12 werner Exp $
# $Id: README,v 1.12 1999/10/26 18:17:11 akool Exp $
#
This is the README file for the "isdn4k-utils" package from "The i4l-crew".
@ -39,7 +39,7 @@ This package contains the following stuff:
Manpages for the above utilities:
actctrl.8 avmcapictrl.8, hisaxctrl.8 icnctrl.8, eiconctrl.8, imon.8, ipppd.8,
ipppstats.8, iprofd.8, isdnctrl.8, isdnlog.8, isdnrep.1, telesctrl.8,
xisdnload.1x and xmonisdn.1x
isdnrate.1, rate-files.5, xisdnload.1x and xmonisdn.1x
COPYRIGHT/COPYING:

View File

@ -1,4 +1,4 @@
## $Id: Makefile.in,v 1.111 1999/10/25 18:33:13 akool Exp $
## $Id: Makefile.in,v 1.112 1999/10/26 18:17:11 akool Exp $
##
## ISDN accounting for isdn4linux.
##
@ -19,6 +19,12 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
## $Log: Makefile.in,v $
## Revision 1.112 1999/10/26 18:17:11 akool
## isdnlog-3.58
## - big cleanup ( > 1.3 Mb removed!)
## - v0.02 of destination support - better, but not perfect
## (does't work with gcc-2.7.2.3 yet - use egcs!)
##
## Revision 1.111 1999/10/25 18:33:13 akool
## isdnlog-3.57
## WARNING: Experimental version!
@ -790,7 +796,7 @@ SERVICEFILE = /etc/services
# DON'T EDIT BELOW THIS LINE
######################################################################
VERSION = 3.57
VERSION = 3.58
MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \
isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \

View File

@ -1,189 +0,0 @@
- 2.6.40 17-Feb-97 sl
* Bugfixes
* Erstellen einer Lib fuer vboxgetty
* Anpassen an die isdn4k-utils-Struktur
- 2.6.39 16-Feb-97 sl
* Aenderungen in vnum()/area2area()/get_areacode()
* Anpassung an die isdn4k-utils-Struktur
* Bugfixes
- 2.6.38 15-Feb-97 sl
* Anpassung an die isdn4k-utils-Struktur
* Anlegen der Datei policy.h
* Erweiterung der conffile.c
* Definition der Vorwahlen-Prefixes
- 2.6.35 8-Feb-97 sl
* isdnconf um einige Features erweitert.
* AREALIB in Section [GLOBAL] eingefuehrt.
* Funktionen vereinheitlicht.
* PID-Datei-Funktion sauber implementierert und dokumentiert.
- 2.6.33 4-Feb-97 sl
* Die Schalter Amtsholung, Q931, dual und CityWeekend in die Syntax fuer
die Parameterdateien aufgenommen (z.B. DUAL=2).
* Einheitliche Funktionen fuer die PID-Dateien in der Lib.
* Die Syntax der Config-Dateien um das Feature include(datei.xyz) erweitert.
* Die Datei ~/.isdn eingefuehrt.
- 2.6.32 30-Jan-97 sl
* isdnrep laueft wieder ;-)
* conffile-lib erweitert und fleissig debuggt
- 2.6.31 27-Jan-97 sl
* myarea in myconfig und myprefix in myarea umbenannt
* Syntax von der Fkt. {num_}match() dem gaengigen Standart angepasst.
* Aenderungen am Aufbau der isdn.conf vorgenommen
* conffile-lib erweitert
- 2.6.24 10-Jan-97 akool
* "-q" erweitert (Layer 2, I, S, U-Format)
* Library "prefix" wurde von Uz auf "areacode" umbenannt - uebernommen
* City Weekend Tarif implemented, new Cmd-Line-Switch "-F" enables that
- 2.6.22 07-Jan-97 akool
* neue Option "-q" implementiert
* Option "-R" entfernt, Option "-r" Auto-Erkennung auf "-R" Funktionalitaet
* neue Version "prefix" von Uz integriert
* Makefile optimiert, unnoetige Module (entsprechend Konfiguration)
werden nicht mehr mitgelinkt
- 2.6.20 5-Jan-96 sl
* RELOAD, STOPCMD und REBOOTCMD in die isdn.conf aufgenommen
* Erweiterung der Datei README um einen Teil der neuen Syntax
* Ausgabe bei ungueltigen User/Group bei Programmstart
- 2.6.18 4-Jan-96 sl
* Bugfix bei den Umgebungsvariablen
* Erweiterung der Datei README um den isdnconf
- 2.6.15 2-Jan-96 sl
* Bugfix in USER und GROUP
* neue Syntax um CONNECTMAX und BYTEMAX erweitert.
- 2.6.14 1-Jan-96 sl
* Erstellung des Programmes isdnconf
* Erweiterung der Datei isdn.conf um CHARGEMAX und MYAREA
* Erweiterung des Programm-Startes um User- und Group-Rechten
- 2.6.1 19-Oct-96 sl
* Neue Syntax vervollstaendigt (Datei isdn.conf)
* Automatische Generierung der isdn.conf aus isdnlog.conf
* README erweitert
* Bug-fixing in diversen Funktionen
- 2.60 05-Oct-96 akool
* mit S.Luethje in Beuern merge 2.4.2 / 2.52 -> 2.60 durchgefuehrt
- 2.50 01-Sep-96 akool
* Freigabe
- 2.40 am 20-Jun-96 freigegeben
- 2.3.30 29-May-96 sl
* Bug-Fix in strpbrk
* Weiterentwicklung von neuer Syntax von Config-Files
* printf's in tools.c durch print_msg ersetzt
* Option -f eingebaut
* SI in isdnlog.conf vorbereitet
- 2.3.29 09-May-96 sl
* isdnlog.c gesplittet
* #define -DSL auf Option -b gelegt
* Ausgabe von Programmen jetzt auf -x/l/m 4096
* Interval vor dem select() geaendert.
* Pfad von isdn.log von /var/adm auf /var/log umgesetzt.
* Pfad "/dev/tty" in Option -C weggelassen (akool).
* "Erstes Programm von -S wird nicht mehr beendet"-Bug fixed.
* "selecet()-Bug" fixed.
* Dienstekennung implementiert (akool)
* Teilsweise Umstellung der Config-Files auf die neue Syntax
- 2.3.24 03-May-96 sl
* Doku erweitert
* Blanks in den Flags erlaubt
- 2.3.21 27-Apr-96 sl
* Bug in Flag L und Intervall fixed
* Gequotete Zeichen ergaenzt
- 2.3.19 25-Apr-96 sl
* Soundfiles beigelegt
* kleinere Bug-fixes
* Option -C geaendert
- 2.3.16 23-Apr-96 sl
* Intervall ergaenzt
* Option -S umgebaut und um Loop erweitert
* Doku erweitert
- 2.3.14 23-Apr-96 sl
* Bug-Fixes in Option -S
* Bug-Fixes im xisdn (os,sl)
- 2.3.12 20-Apr-96 sl
* Ueberarbeitung und Erweiterung von Option -S
* Aenderung der Syntax der Datei "isdnlog.conf"
* Entfernen von Xmt aus dem "xisdn" (os)
* Dokumentation im SGML-Format ('Ghandi')
* Bug im C/S fixed
* Bug im discardconfig/readconfig fixed
- 2.3.11 13-Apr-96 sl
* Bug in angzeigten Zeit (xisdn) fixed
* Wiederaktivierung von Adressbuch-Anfaengen
* kleinere Bugfixes
- 2.3.10 12-Apr-96 sl
* Bug im sscanf von user-access fixed
* Ausgabe von unbekannten Meldungen im xisdn ergaenzt (os)
- 2.3.9 11-Apr-96 sl
* Bugs im isdnlog-C/S fixed
* Bug im xisdn change_channel fixed
- 2.3.8 10-Apr-96 sl
* Doku ergaenzt
* Channel-States im Server geaendert
* change_channel im xisdn realisiert
- 2.3.6 08-Apr-96 akool
* xisdnload an neues isdn4linux angepasst (Fritz Elfert)
- 2.3.5 05-Apr-96 sl
* User_Get_Message fixed
* Probleme in User-Access behoben
* Defines ergaenzt
* kleinere Umstrukturierungen
* Doku ergaenzt
- 2.3.4 05-Apr-96 akool
- 2.3.3 04-Apr-96 sl
* Einfuehrung der Umgebungsvariable "ISDNLOG"
* Vervollstaendigung von User-Access
- 2.3.1 02-Apr-96 sl
* C/S-Protokoll-Version eingebaut
* User-Access-Datei fuer Client ergaenzt
* "malloc()"-Bug in del_socket() behoben
* Doku fuer User-Access-File ergaenzt
- 2.30 am 31-Mar-96 freigegeben akool
- 2.2.5 28-Mar-96 akool
* Exit() fixed (sl)
* 1TR6 fixed
* Pipe fixed
- 2.2.4 24-Mar-96 akool
* Speicherleck im Server beseitigt (sl)
* neues Versionsnummernschema begonnen, 2.23 -> 2.2.4
* Pipe-Funktionalitaet reaktiviert (lasagne@garfield.ping.de)
* Alle Console-Ausgaben wieder mit "\r"
* Gebuehrenauswertung fuer 1TR6 implementiert (Wim Bonis (bonis@kiss.de))
* Unterscheidung von 1TR6/EDSS1 Frames implementiert
* 1TR6 Causes implementiert
- 2.23 am 17-Mar-96 freigegeben akool

View File

@ -0,0 +1,31 @@
README for Distributors
-----------------------
Some remarks for binary distributions of isdnlog
Isdnlog contains till now some country specific code, which makes it
difficult, to build a binary version of isdnlog.
The problem is, that in the ISDN-protocol there are some country specifc
variations, which are by now handled by preprocessor defines in code itself.
An isdnlog binary built for Germany or Austria might run in other
countrys too, but is not guaranteed to.
Isdnlog and the accompanying utils isdnrate and isdnrep rely on
datafiles, which are by now built during the make-run for the selected
country from make config => Options for isdnlog
(s. tools/zone/Makefile.in and tools/dest/Makefile.in for details).
Nethertheless there are targets to build all possible datafiles:
tools/zone: make zonefiles
tools/dest: make alldata
The destination database has also a paramete LANG which allowes to
build a database with english country names (s. dest/makedest for usage)
There is also country specific stuff in decoding telephonnumbers for
alternate telephon providers, where every country has it's own method to
encode such a number.
These options are since isdnlog 3.57 configurable with config-variables
(s. isdnlog/samples/idsn.conf.CC), but might not handle all possiblities.
-lt-
Leopold Toetsch <lt@toetsch.at> 26.10.1999

View File

@ -0,0 +1,115 @@
README for Internationalization of Isdnlog
------------------------------------------
Some remarks for building isdnlog for different countries.
Isdnlog contains till now some country specific code, which makes it
difficult, to build a version of isdnlog for countries not listed in
make config.
There are mainly three areas, where adaption could and will be necessary:
1) The ISDN protocol itself
2) Decoding telephonnnumbers for alternate telephon providers
3) Datafiles
ad 1)
The problem is, that in the ISDN-protocol there are some country specifc
variations, which are by now handled by preprocessor defines in code itself.
An isdnlog binary built for Germany or Austria might run in other
countrys too, but is not guaranteed to.
If you have troubles with isdnlog itself please contact
Andreas Kool <akool@isdn4linux.de>.
ad 2)
Isdnlog since version 3.57 has 3 new options for configuration in
/etc/isdn/isdn.conf.
These are
VBN .... Alternate provider prefix
VBNLEN ... Number of digits following VBN
PRESELECTED ... Default provider number
s. isdnlog/samples/isdn.conf.* for examples
e.g. in Austria VBN=10, VBNLEN=2
The telephon number 1002012345 is decoded a 1002 1 2345, a call with provider
#2 (UTA) to city Vienna (1) and local numbe i.e MSN 2345
We are in a process of concentrating this country specifc stuff in the
module tools/telnum.c.
If you have some adaption for it please let me know.
ad 3)
Isdnlog and the accompanying utils isdnrate and isdnrep rely on
datafiles, which are by now built during the make-run for the selected
country from make config => Options for isdnlog
(s. tools/zone/Makefile.in and tools/dest/Makefile.in for details).
As of this writing versions for DE, AT and NL are ready.
To build datafiles for a country not handled by now, please follow
these steps:
Isdnlog /-rep /-rate use mainly these datafiles:
rate-CC.dat ... telephonrates per provider / zone / daytime
zone-CC-PPP.gdbm ... zone files per provider PPP
holiday-CC.dat ... exactly what it sounds like
dest.gdbm ... international destinations
where CC is your (ISO) countrycode, also known as TLD (Top Level Domain).
3a) rate-CC.dat
This file holds telephonrates per provider / zone / daytime.
man 5 rate-files
should give you the necessary information to build a rate file.
It might be also helpful to look at e.g. rate-at.dat for a working
version.
Since isdnlog 3.57 the raw rate files (with explicit country names)
have to be preprocessed with the utility dest/pp_rate, where the
country names are replaced by their ISO-codes.
s. tools/Makefile target AT: for an example.
3b) zone-CC-PPP.gdbm
These files hold information about domestic zones. This is a list
of from-to-zone entries for all possible domestic destinations.
If your telephon provider charges the same amount despite of
source and destination of call, you don't need this.
s. tools/zone/zoneutils.html and CC subdirs below zone for more
information.
You might ask your telephon provider to give you a file about how
much is the charge for a telephon call from each x to each y.
In Austria a small Perl script "asked" a web page of the provider
for this info.
s. also zone/Makefile.in for building the zone database.
3c) holiday-CC.dat
Just make a copy of an existing file and edit it.
3d) dest.gdbm
The destination database is built from the following textfiles:
- country-de.dat ... International telephonnumbers mainly of countries
with german and english country names
- cities.dat ... international cities
- code-CC.dat or zone/CC/code ... domestic city names with telephon numbers
For the beginning you can use the standard dest.gdbm. If you want to have
your city names instead of numbers only in the log-files, you can add
your city codes to the database.
s. dest/Makefile.in and dest/makedest for usage.
IF you have datafiles ready for different countries, please let me know.
And finally, this whole process is handled by various make files,
which are built depending on information taken from idsnlog/.Config.in.
-lt-
Leopold Toetsch <lt@toetsch.at> 26.10.1999

View File

@ -1,4 +1,4 @@
/* $Id: processor.c,v 1.83 1999/09/13 09:09:43 akool Exp $
/* $Id: processor.c,v 1.84 1999/10/26 18:17:13 akool Exp $
*
* ISDN accounting for isdn4linux. (log-module)
*
@ -19,6 +19,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: processor.c,v $
* Revision 1.84 1999/10/26 18:17:13 akool
* isdnlog-3.58
* - big cleanup ( > 1.3 Mb removed!)
* - v0.02 of destination support - better, but not perfect
* (does't work with gcc-2.7.2.3 yet - use egcs!)
*
* Revision 1.83 1999/09/13 09:09:43 akool
* isdnlog-3.51
* - changed getProvider() to not return NULL on unknown providers
@ -1214,7 +1220,7 @@ static int AOC_1TR6(int l, char *p)
auto int digit = 0;
#ifdef ISDN_NL /* Fixme: never defined! */
#ifdef ISDN_NL /* Fixme: do this at runtime */
/*
* NL ISDN: N40*<Einheiten>#, mit Einheiten ASCII kodiert.
* Beispiel 30 Einheiten: N40*30#
@ -1225,7 +1231,7 @@ static int AOC_1TR6(int l, char *p)
p += 9;
l -= 3;
aoc_debug(-1, "AOC_INITIAL_NL");
#elif defined(ISDN_CH) /* Fixme: never defined! */
#elif defined(ISDN_CH) /* Fixme: do this at runtime */
/*
* "FR. 0.10"
*
@ -1616,6 +1622,7 @@ static void decode(int chan, register char *p, int type, int version, int tei)
break;
#if !defined(ISDN_NL) && !defined(ISDN_CH) /* -lt- else it will not compile */
case 0x28 : /* DISPLAY ... z.b. Makelweg, AOC-E ... */
{
auto char s[BUFSIZ];
@ -1633,6 +1640,7 @@ static void decode(int chan, register char *p, int type, int version, int tei)
info(chan, PRT_SHOWNUMBERS, STATE_RING, s);
}
break;
#endif
case 0x2d : /* SUSPEND ACKNOWLEDGE (Parkweg) */
p += (l * 3);
@ -1650,7 +1658,7 @@ static void decode(int chan, register char *p, int type, int version, int tei)
case 0x02 : /* Facility AOC-E on 1TR6 */
case 0x1c : /* Facility AOC-D/AOC-E on E-DSS1 */
#if defined(ISDN_NL) || defined(ISDN_CH) /* Fixme: never defined! */
#if defined(ISDN_NL) || defined(ISDN_CH) /* Fixme: do this at runtime */
case 0x28 : /* DISPLAY: Facility AOC-E on E-DSS1 in NL, CH */
#endif
if ((element == 0x02) && (version == VERSION_1TR6)) {
@ -1663,7 +1671,7 @@ static void decode(int chan, register char *p, int type, int version, int tei)
} /* if */
}
else {
#if defined(ISDN_NL) || defined(ISDN_CH) /* Fixme: never defined! */
#if defined(ISDN_NL) || defined(ISDN_CH) /* Fixme: do this at runtime */
n = AOC_1TR6(l, p);
#else
n = facility(l, p);

View File

@ -31,7 +31,7 @@ CC = @CC@
.SUFFIXES:
.SUFFIXES: .c .o
.PHONY: all config distclean dist install uninstall data
.PHONY: all config distclean dist install uninstall data alldata
%.o: %.c Makefile
$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) -c -o $@ $<
@ -88,3 +88,10 @@ endif
ifeq ($(CONFIG_ISDN_LOG_DEST_NL),y)
./makedest -v -a nl
endif
alldata:
./makedest $(LANG) -v
./makedest $(LANG) -v -a -gcities.dat
./makedest -v -a at
./makedest -v -a de
./makedest -v -a nl

View File

@ -1,4 +1,4 @@
/* $Id: isdnrate.c,v 1.21 1999/10/25 18:30:03 akool Exp $
/* $Id: isdnrate.c,v 1.22 1999/10/26 18:17:14 akool Exp $
* ISDN accounting for isdn4linux. (rate evaluation)
*
@ -19,6 +19,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdnrate.c,v $
* Revision 1.22 1999/10/26 18:17:14 akool
* isdnlog-3.58
* - big cleanup ( > 1.3 Mb removed!)
* - v0.02 of destination support - better, but not perfect
* (does't work with gcc-2.7.2.3 yet - use egcs!)
*
* Revision 1.21 1999/10/25 18:30:03 akool
* isdnlog-3.57
* WARNING: Experimental version!
@ -911,6 +917,7 @@ static void printTable(char *num)
auto SORT2 wsort[MAXPROVIDER];
static int firsttime = 1;
int first;
int prefix;
memset(used, 0, sizeof(used));
memset(hours, 0, sizeof(hours));
@ -941,6 +948,9 @@ static void printTable(char *num)
first = 1;
while (1) {
destnum.nprovider = UNKNOWN;
if(provider2prefix(num, &prefix)) /* set provider if it is in number */
normalizeNumber(num, &destnum, TN_PROVIDER);
n = compute(num);
if (header && first && d == 0 && firsttime)

View File

@ -1737,8 +1737,9 @@ void rate_1067(void) {
{ "max.online", "+436762323" },
{ "max.mobil", "+43676" },
{ "andere Mobilfunknetze", "+43663,+43664,+43699" },
{ "Nachbarländer", "Deutschland, Italien, Schweiz, Tschechische Republik, Ungarn, Slowakische Republik, Slowenien, Liechtenstein" },
{ "EU", "Belgien, Dänemark, Finnland, Frankreich, Griechenland, Irland, Luxemburg, Niederlande, Portugal, Spanien, Schweden, Großbritannien, Nordirland" },
{ "Deutschland", "Deutschland" },
{ "Nachbarländer", "Italien, Liechtenstein, Schweiz, Slowakei, Slowenien, Tschechien, Ungarn" },
{ "EU", "Belgien, Dänemark, Finnland, Frankreich, Großbritannien, Griechenland, Irland, Luxemburg, Niederlande, Portugal, Spanien, Schweden, Nordirland" },
{ "Weltzone 1", "Andorra, Australien, Bahamas, Bosnien-Herzegowina, Kanada, Kroatien, Färöer-Inseln, Gibraltar, Island, Japan, Lettland, Malta, Mazedonien, Monaco, Neuseeland, Norwegen, Polen, Puerto Rico, San Marino, Singapur, USA, Vatikan, Jugoslawien" },
{ "Weltzone 2", "Albanien, Algerien, Belarus, Bulgarien, Zypern, Estland, Hong Kong, Litauen, Marokko, Oman, Rumänien, Rußland, Tunesien, Türkei, Ukraine, American Virgin Isles" },
{ "Weltzone 3", "Bermuda, Brasilien, Brunei, Chile, Christmas Island, Cocos Island, Dominikanische Republik, Georgien, Ghana, Grönland, Israel, Jamaica, Kasachstan, Südkorea, Kirgisistan, Libyen, Macau, Malaysia, Mexiko, Südafrika, Taiwan, Tadschikistan" },
@ -1746,11 +1747,12 @@ void rate_1067(void) {
{ "Iridium 8816", "Iridium 008816"},
{ "Iridium 8817", "Iridium 008817"}};
double Tarif[] = { 01.00,
double Tarif[] = { 00.88,
01.00,
01.00,
02.70,
03.90,
02.50,
03.30,
03.50,
05.50,
@ -1764,10 +1766,10 @@ void rate_1067(void) {
rprintf ("P:67", "max.plus" );
rprintf ("C:Maintainer:", "Michael Reinelt <reinelt@eunet.at>" );
rprintf ("C:Name:", "max.plus" );
/* rprintf ("","C:Address:"); */
rprintf ("C:Name:", "max.mobil Telekommunikation Service GmbH" );
rprintf ("C:Address:", "Postfach 333, A-1031 Wien");
rprintf ("C:Homepage:", "http://www.maxmobil.at" );
rprintf ("C:Telefon:", "0676 20 200" );
rprintf ("C:Telefon:", "0676 2010" );
rprintf ("C:Special:", "Nur für max - Vertragskunden." );
for (z=0; z<COUNT(Zone); z++) {
@ -2277,7 +2279,7 @@ int main (int argc, char *argv[])
printf ("# Many thanks to Daniela Bruder <dbruder@sime.com>\n");
printf ("# for collecting and preparing most of the call charges.\n\n\n");
printf ("V:1.86-Austria [12-Oct-1999]\n\n");
printf ("V:1.87-Austria [26-Oct-1999]\n\n");
printf ("U:%%.3f öS\n");
#if 0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -35,65 +35,38 @@ export _CC = gcc
endif
CC = $(_CC)
export AVON = avon
export I4LCONFDIR
######################################################################
# DON'T EDIT BELOW THIS LINE
######################################################################
AREADIR = ../areacode
LIB_AREA = $(AREADIR)/areacode.o
ifeq ($(LIBAREA),1)
DEFS += -DLIBAREA
endif
AVONDIR = avon
LIB_AVON += $(AVONDIR)/createDB.o
DEFS += -DAVON=\"$(AVON)\"
SUBDIRS = $(AVONDIR) #$(AREADIR)
SUBDIRS =
DEFS += -I$(PREFIXDIR)
%.o: %.c
$(CC) $(CFLAGS) $(DEFS) -c -o $@ $<
all: .depend libs libisdn.a
libs:
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i; done
all: .depend libisdn.a
depend dep: .depend
.depend:
$(CPP) -M $(CFLAGS) $(DEFS) *.c >.depend
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i depend; done
clean:
-rm -f *.o *.a
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i clean; done
distclean: clean
-rm -f .depend policy.h
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i distclean; done
install: depend all
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i depend; done
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i all; done
ifneq ($(CONFIG_LIB_AREACODE),y)
set -e; for i in `echo $(AVONDIR)`; do $(MAKE) -C $$i install; done
#else
# set -e; for i in `echo $(AREADIR)`; do $(MAKE) -C $$i install; done
endif
deinstall: distclean
set -e; for i in `echo $(SUBDIRS)`; do $(MAKE) -C $$i deinstall; done
libisdn.a: conffile.o isdntools.o libtools.o $(LIB_AREA) $(LIB_AVON)
ar rs libisdn.a isdntools.o conffile.o libtools.o $(LIB_AREA) $(LIB_AVON)
libisdn.a: conffile.o isdntools.o libtools.o
ar rs libisdn.a isdntools.o conffile.o libtools.o
ranlib libisdn.a
ifeq (.depend,$(wildcard .depend))

View File

@ -7,9 +7,6 @@
ifeq (../.config,$(wildcard ../.config))
include ../.config
BUILDOPTS :=
ifeq ($(CONFIG_LIB_AREACODE),y)
BUILDOPTS += SUBDIRS= LIBAREA=1
endif
#
# Install as root with numeric Id's, since these are the
# only ones that _really_ exist on _every_ system.
@ -25,7 +22,6 @@ all: .depend
config:
@cp Makefile.in GNUmakefile
@rm -f areacode; ln -s ../areacode .
@echo '/*' > policy.h
@echo ' * Automatically generated by config: DO NOT EDIT' >> policy.h
@echo ' */' >> policy.h
@ -48,27 +44,10 @@ clean:
distclean:
$(MAKE) -f Makefile distclean
rm -f GNUmakefile policy.h areacode
rm -f GNUmakefile policy.h
#
# Currently isdnlib.a is used in place.
# When using avon, I4LCONFDIR points to avon data.
#
# TODO: build a shared version and install it.
#
install-avon:
$(MAKE) -f Makefile I4LCONFDIR=$(CONFIG_I4LCONFDIR) install
uninstall-avon:
$(MAKE) -f Makefile I4LCONFDIR=$(CONFIG_I4LCONFDIR) deinstall
ifeq ($(CONFIG_LIB_AREACODE),y)
install:
$(MAKE) -f Makefile $(BUILDOPTS) all
uninstall:
else
install: install-avon
uninstall: uninstall-avon
endif

View File

@ -1,71 +0,0 @@
##
## Makefile for avon for isdn4linux
##
## Copyright 1996, 1997 by Stefan Luethje (luethje@sl-gw.lake.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.
ifndef ROOTDIR
export ROOTDIR=$(shell pwd)
PREFIXDIR =.
else
PREFIXDIR =$(ROOTDIR)
endif
######################################################################
# USER CONFIGURATION AREA
######################################################################
ifndef _CC
export _CC = gcc -Wall -pipe -O6
endif
CC = $(_CC)
######################################################################
# DON'T EDIT BELOW THIS LINE
######################################################################
INSTALL =install
INSTALL_DIR := $(INSTALL) -m 0755 -o 0 -g 0 -d
INSTALL_AVON := $(INSTALL) -m 0644 $(AVON) $(DESTDIR)$(I4LCONFDIR)
#CFLAGS = -I$(PREFIXDIR)
all: createDB.o
clean:
rm -f *.o *.a
depend: .depend
.depend:
$(CPP) -M $(CFLAGS) createDB.c >.depend
distclean: clean
rm -f .depend
install: depend all
ifneq ($(CONFIG_LIB_AREACODE),y)
-$(INSTALL_DIR) $(DESTDIR)$(I4LCONFDIR)
-test $(AVON) -ot $(DESTDIR)$(I4LCONFDIR)/$(AVON) || ( $(INSTALL_AVON) )
-@rm -f $(DESTDIR)$(I4LCONFDIR)/$(AVON).pag $(DESTDIR)$(I4LCONFDIR)/$(AVON).dir
endif
deinstall: distclean
-rm -f $(DESTDIR)$(I4LCONFDIR)/$(AVON)*
createDB.o: createDB.c createDB.h

File diff suppressed because it is too large Load Diff

View File

@ -1,240 +0,0 @@
/* $Id: createDB.c,v 1.4 1999/06/11 15:47:01 akool Exp $
*
* ISDN accounting for isdn4linux. (Utilities)
*
* Copyright 1995, 1997 by Andreas Kool (akool@Kool.f.EUnet.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: createDB.c,v $
* Revision 1.4 1999/06/11 15:47:01 akool
* not required references to libndbm removed
*
* Revision 1.3 1997/05/19 22:58:34 luethje
* - bugfix: it is possible to install isdnlog now
* - improved performance for read files for vbox files and mgetty files.
* - it is possible to decide via config if you want to use avon or
* areacode.
*
* Revision 1.2 1997/04/17 23:29:50 luethje
* new structure of isdnrep completed.
*
*/
/****************************************************************************/
#define _CREATEDB_C_
/****************************************************************************/
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include "createDB.h"
/****************************************************************************/
#define FILEMODE 0664
/****************************************************************************/
#ifndef LIBAREA
static int ln = 0;
#endif
/****************************************************************************/
static int (*print_msg)(const char *, ...) = printf;
/****************************************************************************/
void set_print_fct_for_avon(int (*new_print_msg)(const char *, ...))
{
print_msg = new_print_msg;
}
/****************************************************************************/
#ifndef LIBAREA
int createDB(char *fn, int force)
{
register int f;
auto char s[BUFSIZ];
auto struct stat statbuf;
sprintf(s, "%s.dir", fn);
if (force || stat(s, &statbuf)) {
if ((f = open(s, O_CREAT | O_TRUNC | O_RDWR, FILEMODE)) >= 0) {
close(f);
sprintf(s, "%s.pag", fn);
if ((f = open(s, O_CREAT | O_TRUNC | O_RDWR, FILEMODE)) >= 0) {
close(f);
if(!openDB(fn, O_RDWR | O_CREAT))
{
readAVON(fn);
closeDB();
return 0;
}
} /* if */
else
print_msg("Can not open file `%s': %s!\n",s,strerror(errno));
} /* if */
else
print_msg("Can not open file `%s': %s!\n",s,strerror(errno));
} /* if */
return(-1);
} /* createDB */
/******************************************************************************/
int openDB(char *fn, int flag)
{
dbm = dbm_open(fn, flag, FILEMODE);
return((dbm == (DBM *)NULL) ? -1 : 0);
} /* dbminit */
/******************************************************************************/
void closeDB()
{
if (dbm != (DBM *)NULL) {
dbm_close(dbm);
dbm = (DBM *)NULL;
} /* if */
} /* dbmclose */
/******************************************************************************/
void insertDB(char *num, char *area)
{
key.dsize = strlen(num);
key.dptr = num;
data.dsize = strlen(area) + 1;
data.dptr = area;
if (dbm_store(dbm, key, data, DBM_INSERT)) {
print_msg( "\navon: WARNING: Duplicate Entry ``%s'' in AVON in Line %d, ignored\n", num, ln);
data = dbm_fetch(dbm, key);
print_msg( "avon: WARNING: Can't be ``%s'' and ``%s''!\n", area, data.dptr);
print_msg( " <- Reading AVON, please wait ...");
} /* if */
} /* insertDB */
/******************************************************************************/
#ifdef DEVEL
void writeAVON()
{
auto char s[BUFSIZ];
auto FILE *f;
sprintf(s, "%s%c%s.new", confdir(), C_SLASH, AVON);
if ((f = fopen(s, "w")) != (FILE *)NULL) {
for (key = dbm_firstkey(dbm); key.dptr != NULL; key = dbm_nextkey(dbm)) {
strcpy(s, key.dptr);
*(s + key.dsize) = 0;
data = dbm_fetch(dbm, key);
fprintf(f, "%s:%s\n", s, data.dptr);
} /* for */
fclose(f);
} /* if */
} /* writeAVON */
#endif
/******************************************************************************/
void readAVON(char *fn)
{
register char *p, *p1;
auto char s[BUFSIZ];
auto FILE *f;
ln = 0;
if ((f = fopen(fn, "r")) != (FILE *)NULL) {
print_msg( " <- Reading AVON, please wait ...");
while (fgets(s, BUFSIZ, f) != NULL) {
ln++;
if ((*s != '#') && (*s != '\n')) {
if ((p = strchr(s, '\n'))) {
*p = 0;
if (*(p - 1) == '\r') /* I *hate* DOS! */
*(--p) = 0;
while (*--p == ' ')
*p = 0;
} /* if */
if ((p = strchr(s, ':'))) { /* "avon.txt" Format */
*p = 0;
if (!(ln % 50))
print_msg( "\r%s", s);
insertDB(s, p + 1);
}
else if (*s == 'D') { /* "avon.uisdn" Format */
if ((p = p1 = strchr(s, '+'))) {
p -= 7;
*p = 0;
if ((p = strchr(p1, '-')))
*p = 0;
if (!(ln % 50))
print_msg( "\r%s", p1 + 4);
while ((p = strchr(s + 6, '_')))
*p = ' ';
insertDB(p1 + 4, s + 6);
} /* if */
}
else
print_msg( "avons: WARNING: Syntax error in AVON at Line %d, ignored\n", ln);
} /* if */
} /* while */
fclose(f);
print_msg( "\n");
} /* if */
} /* readAVON */
#endif
/******************************************************************************/

View File

@ -1,82 +0,0 @@
/* $Id: createDB.h,v 1.5 1999/06/11 15:47:03 akool Exp $
*
* ISDN accounting for isdn4linux.
*
* Copyright 1995, 1997 by Andreas Kool (akool@Kool.f.EUnet.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: createDB.h,v $
* Revision 1.5 1999/06/11 15:47:03 akool
* not required references to libndbm removed
*
* Revision 1.4 1999/06/01 12:42:45 paul
* glibc 2.1 compatibility
*
* Revision 1.3 1997/05/19 22:58:36 luethje
* - bugfix: it is possible to install isdnlog now
* - improved performance for read files for vbox files and mgetty files.
* - it is possible to decide via config if you want to use avon or
* areacode.
*
* Revision 1.2 1997/04/17 23:29:51 luethje
* new structure of isdnrep completed.
*
*/
#ifndef _CREATEDB_H_
#define _CREATEDB_H_
#ifndef LIBAREA
#ifdef linux
# if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
# include <db1/ndbm.h>
# else
# include <ndbm.h>
# endif
#else
# include "/usr/ucbinclude/ndbm.h"
/*# include <libgen.h>*/
#endif
#endif
#ifdef DBMALLOC
#include "dbmalloc.h"
#endif
#ifdef _CREATEDB_C_
#define _EXTERN
#define SET_NULL = NULL
#else
#define _EXTERN extern
#define SET_NULL
#endif
#ifndef LIBAREA
_EXTERN datum key, data;
_EXTERN DBM *dbm SET_NULL;
#endif
_EXTERN void set_print_fct_for_avon(int (*new_print_msg)(const char *, ...));
_EXTERN int createDB(char *fn, int force);
_EXTERN int openDB(char *fn, int flag);
_EXTERN void closeDB();
_EXTERN void insertDB(char *num, char *area);
_EXTERN void readAVON(char *fn);
#undef SET_NULL
#undef _EXTERN
#endif

View File

@ -1,5 +1,5 @@
/* $Id: libisdn.h,v 1.11 1999/08/20 19:43:48 akool Exp $
/* $Id: libisdn.h,v 1.12 1999/10/26 18:17:17 akool Exp $
*
* ISDN accounting for isdn4linux.
*
@ -20,6 +20,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: libisdn.h,v $
* Revision 1.12 1999/10/26 18:17:17 akool
* isdnlog-3.58
* - big cleanup ( > 1.3 Mb removed!)
* - v0.02 of destination support - better, but not perfect
* (does't work with gcc-2.7.2.3 yet - use egcs!)
*
* Revision 1.11 1999/08/20 19:43:48 akool
* removed avon-, vorwahl- and areacodes-support
*
@ -142,6 +148,12 @@ extern char *basename __P((__const char *__name));
#define CONF_ENT_AREA_PREFIX "AREAPREFIX"
#define CONF_ENT_COUNTRY "COUNTRYCODE"
#define CONF_ENT_AREA "AREACODE"
#if 0 /* Fixme: tools.h defines these - should they be global ??? */
#define CONF_ENT_VBN "VBN"
#define CONF_ENT_VBNLEN "VBNLEN"
#define CONF_ENT_PRESELECT "PRESELECTED"
#endif
#if 0 /* DELETE_ME AK:18-Aug-99 */
#define CONF_ENT_AREALIB "AREALIB"
#define CONF_ENT_AVONLIB "AVON"

View File

@ -1,5 +1,5 @@
#
# $Id: config.in,v 1.30 1999/10/08 16:25:37 he Exp $
# $Id: config.in,v 1.31 1999/10/26 18:17:19 akool Exp $
#
# The whole configuration stuff is borrowed from the kernel
# configuration.
@ -40,12 +40,12 @@ string 'Your area code' CONFIG_AREACODE
string 'Default country prefix' CONFIG_COUNTRY_PREFIX
string 'Default area prefix' CONFIG_AREA_PREFIX
string 'Directory to install fixed data' CONFIG_DATADIR
choice 'Database for area codes' \
"Areacode CONFIG_LIB_AREACODE \
Avon CONFIG_LIB_AVON"
if [ "$CONFIG_LIB_AVON" = "y" ]; then
string 'Directory to install avon database' CONFIG_AVON_DATA
fi
#choice 'Database for area codes' \
# "Areacode CONFIG_LIB_AREACODE \
# Avon CONFIG_LIB_AVON"
#if [ "$CONFIG_LIB_AVON" = "y" ]; then
# string 'Directory to install avon database' CONFIG_AVON_DATA
#fi
endmenu
mainmenu_option nextcomment
comment 'Runtime configuration tools'