diff --git a/isdnlog/Makefile.in b/isdnlog/Makefile.in index b7406350..ec00f665 100644 --- a/isdnlog/Makefile.in +++ b/isdnlog/Makefile.in @@ -1,4 +1,4 @@ -## $Id: Makefile.in,v 1.88 1999/06/21 19:32:08 akool Exp $ +## $Id: Makefile.in,v 1.89 1999/06/26 10:11:06 akool Exp $ ## ## ISDN accounting for isdn4linux. ## @@ -19,6 +19,11 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ## ## $Log: Makefile.in,v $ +## Revision 1.89 1999/06/26 10:11:06 akool +## isdnlog Version 3.36 +## - EGCS 1.1.2 bug correction from Nima +## - zone-1.11 +## ## Revision 1.88 1999/06/21 19:32:08 akool ## isdnlog Version 3.35 ## zone data for .nl (many thanks to Paul!) @@ -692,7 +697,7 @@ SERVICEFILE = /etc/services # DON'T EDIT BELOW THIS LINE ###################################################################### -VERSION = 3.35 +VERSION = 3.36 MANPAGES = isdnlog/callerid.conf.5 isdnlog/isdn.conf.5 \ isdnlog/isdnformat.5 isdnlog/isdnlog.5 isdnlog/isdnlog.8 \ diff --git a/isdnlog/isdnlog/asn1.h b/isdnlog/isdnlog/asn1.h index ba888004..f522938e 100644 --- a/isdnlog/isdnlog/asn1.h +++ b/isdnlog/isdnlog/asn1.h @@ -1,4 +1,4 @@ -/* $Id: asn1.h,v 1.3 1999/05/04 19:32:32 akool Exp $ +/* $Id: asn1.h,v 1.4 1999/06/26 10:12:02 akool Exp $ * * ISDN accounting for isdn4linux. (ASN.1 parser) * @@ -21,6 +21,11 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: asn1.h,v $ + * Revision 1.4 1999/06/26 10:12:02 akool + * isdnlog Version 3.36 + * - EGCS 1.1.2 bug correction from Nima + * - zone-1.11 + * * Revision 1.3 1999/05/04 19:32:32 akool * isdnlog Version 3.24 * @@ -260,7 +265,7 @@ ELEMENT_1(ParseRESInterrogateServedUserNumbers, char, ); #define CHECK_TAG(a) \ int elnr = 0; \ \ - elnr = elnr; // makes lint happy \ + elnr = elnr; /* makes lint happy */ \ if (tag == ASN1_NOT_TAGGED) { \ if ((el.tag &~ 0x20) != (a)) { \ print_msg(PRT_DEBUG_DECODE, " DEBUG> native tag %2x not found, %2x instead\n", \ diff --git a/isdnlog/rate-at.dat b/isdnlog/rate-at.dat index 65d9f892..56dc7e19 100644 --- a/isdnlog/rate-at.dat +++ b/isdnlog/rate-at.dat @@ -10,7 +10,7 @@ # for collecting and preparing most of the call charges. -V:1.60-Austria [22-Jun-1999] +V:1.61-Austria [23-Jun-1999] U:%.3f öS @@ -919,13 +919,14 @@ T:E,H/*=0.936/15 Sparzeit A:+43717 P:02 UTA -C:Fixme: Bundesland-Verzonung nicht implementiert +C:Fixme: Bundesland-Verzonung (angrenzende) nicht implementiert +D:uta # Verzonung Z:1 Bundeslandzone T:1-5/8-18=1.00(60)/1 Geschäftszeit T:1-5/18-8=0.88(60)/1 Freizeit T:E,H/*=0.88(60)/1 Freizeit Z:2 Österreichzone -T:1-5/8-18=2.50(60)/1 Geschäftszeit +T:1-5/8-18=1.50(60)/1 Geschäftszeit T:1-5/18-8=1.00(60)/1 Freizeit T:E,H/*=1.00(60)/1 Freizeit A:Österreich @@ -1035,15 +1036,17 @@ A:Pakistan, Palau, Salomonen, Senegal, Seychellen, Somalia, Tokelau, Tschad A:Tuvalu, Vietnam, Wake-Inseln, Wallis- und Futuna-Inseln, Zaire P:03 Multikom +C:Fixme: Verify Verzonung +D:pta # Verzonung Z:1 Regionalzone T:*/*=1.00(60)/60/1 rund um die Uhr Z:2 Fernzone 1 T:*/*=1.00(60)/60/1 rund um die Uhr -Z:3 5 Freunde -T:*/*=1.00(60)/60/1 rund um die Uhr -Z:4 Fernzone 2 +Z:3 Fernzone 2 T:*/*=2.00(60)/60/1 rund um die Uhr A:Österreich +Z:4 5 Freunde +T:*/*=1.00(60)/60/1 rund um die Uhr Z:5 Mobilfunk T:*/*=3.00(60)/60/1 rund um die Uhr A:+43663, +43664, +43676, +43699 @@ -1148,6 +1151,8 @@ T:*/*=19.00(60)/60/1 rund um die Uhr A:+ alle übrigen Länder P:07,1 European Telecom +C:Fixme: Verify Verzonung +D:1007 # Verzonung C:Tarif: 1 Jahr feste Bindung Z:1 Fernzone 1 T:1-5/08-12=2.376(60)/1 Tageszeit 1 @@ -1278,6 +1283,8 @@ T:1-5/18-8=1.980(60)/1 Sparzeit T:E,H/*=1.980(60)/1 Sparzeit P:07,2 European Telecom +C:Fixme: Verify Verzonung +D:1007 # Verzonung C:Tarif: 14-tägig kündbar Z:1 Fernzone 1 T:1-5/08-12=2.532(60)/1 Tageszeit 1 @@ -1408,6 +1415,7 @@ T:1-5/18-8=2.112(60)/1 Sparzeit T:E,H/*=2.112(60)/1 Sparzeit P:11 RSL COM +D:1012 # Verzonung Z:1 Bundesland T:1-5/8-18=1.00(60)/1 Tag T:1-5/18-8=0.88(60)/1 Nacht @@ -1550,6 +1558,7 @@ A:+ alle P:24 Telepassport C:Fixme: International D: Zentral- und Südamerika nicht implementiert +D:1024 # Verzonung Z:1 Regionalzone T:1-5/8-18=0.98(60)/1 Tag T:1-5/18-8=0.88(60)/1 Nacht @@ -1559,9 +1568,9 @@ T:1-5/8-18=1.28(60)/1 Tag T:1-5/18-8=1.18(60)/1 Nacht T:E,H/*=1.18(60)/1 Weekend Z:3 Österreich -T:1-5/8-18=2.48(60)/1 Tag -T:1-5/18-8=1.48(60)/1 Nacht -T:E,H/*=1.48(60)/1 Weekend +T:1-5/8-18=1.98(60)/1 Tag +T:1-5/18-8=1.18(60)/1 Nacht +T:E,H/*=1.18(60)/1 Weekend A:Österreich Z:4 Deutschland, Schweiz T:*/*=3.98(60)/1 rund um die Uhr @@ -1685,13 +1694,14 @@ Z:9 International A:+ alle übrigen Länder P:44 Citykom +D:1012 # Verzonung C:Fixme: internationale Zonen nicht implementiert Z:1 Regional -T:*/*=1.20(60)/1 rund um die Uhr +T:*/*=0.72(60)/1 rund um die Uhr Z:2 Österreich -T:1-5/8-18=2.16(60)/1 Tag -T:1-5/18-8=2.70(60)/1 Nacht -T:E,H/*=2.70(60)/1 Weekend +T:1-5/8-18=1.44(60)/1 Tag +T:1-5/18-8=0.72(60)/1 Nacht +T:E,H/*=0.72(60)/1 Weekend A:Österreich Z:3 Mobilfunk T:*/*=4.20(60)/1 rund um die Uhr @@ -1700,6 +1710,8 @@ Z:4 Ausland A:+ alle übrigen Länder P:66 MIT 1066 +D:1066 # Verzonung +C:Fixme Verzonung -50/+50 verifizieren Z:1 Regionalzone T:1-5/8-18=0.96(60)/18.75/1 Tag T:1-5/18-8=0.80(60)/22.50/1 Nacht diff --git a/isdnlog/tools/rate-at.c b/isdnlog/tools/rate-at.c index a5a15ac9..06c761f0 100644 --- a/isdnlog/tools/rate-at.c +++ b/isdnlog/tools/rate-at.c @@ -253,7 +253,7 @@ void rate_1002(void) { { "Welt 5", "Afghanistan, Amerikanisch-Samoa, Antigua & Barbuda, Ascension, Bangladesch, Burkina Faso, Cook-Inseln, Diego Garcia, El Salvador, Eritrea, Falklandinseln, Guam, Guantanamo, Guatemala, Haiti, Kamerun, Kongo, Madagaskar, Honduras, Jemen, Kambodscha, Kamerun, Kap Verde, Kongo, Madagaskar, Mali, Marshallinseln, Midway-Inseln, Mikronesien, Montserrat, Pakistan, Palau, Salomonen, Senegal, Seychellen, Somalia, Tokelau, Tschad, Tuvalu, Vietnam, Wake-Inseln, Wallis- und Futuna-Inseln, Zaire" }}; double Tarif[][2] = {{ 1.00, 0.88 }, - { 2.50, 1.00 }, + { 1.50, 1.00 }, { 1.80, 0.88 }, { 4.20, 2.88 }, { 1.00, 1.00 }, @@ -274,7 +274,8 @@ void rate_1002(void) { printf ("\n"); rprintf ("UTA", "P:02"); - rprintf ("Bundesland-Verzonung nicht implementiert", "C:Fixme:"); + rprintf ("Bundesland-Verzonung (angrenzende) nicht implementiert", "C:Fixme:"); + rprintf ("# Verzonung", "D:uta"); for (z=0; z\n"); printf ("# for collecting and preparing most of the call charges.\n\n\n"); - printf ("V:1.60-Austria [22-Jun-1999]\n\n"); + printf ("V:1.61-Austria [23-Jun-1999]\n\n"); printf ("U:%%.3f öS\n"); #if 0 @@ -875,5 +885,5 @@ void main (int argc, char *argv[]) rate_1066(); rate_1069(); #endif - + return(EXIT_SUCCESS); } diff --git a/isdnlog/tools/rate.c b/isdnlog/tools/rate.c index 608c214e..1c57006b 100644 --- a/isdnlog/tools/rate.c +++ b/isdnlog/tools/rate.c @@ -1,4 +1,4 @@ -/* $Id: rate.c,v 1.25 1999/06/22 19:41:23 akool Exp $ +/* $Id: rate.c,v 1.26 1999/06/26 10:12:12 akool Exp $ * * Tarifdatenbank * @@ -19,6 +19,11 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: rate.c,v $ + * Revision 1.26 1999/06/26 10:12:12 akool + * isdnlog Version 3.36 + * - EGCS 1.1.2 bug correction from Nima + * - zone-1.11 + * * Revision 1.25 1999/06/22 19:41:23 akool * zone-1.1 fixes * @@ -594,7 +599,7 @@ int initRate(char *conf, char *dat, char *dom, char **msg) break; case 'P': /* P:nn[,v] Bezeichnung */ - if (prefix!=UNKNOWN && !ignore && !domestic) + if (zone!=UNKNOWN && !ignore && !domestic) warning (dat, "Provider %d has no default domestic zone (missing 'A:%s')", prefix, mycountry); v = UNKNOWN; zone = UNKNOWN; @@ -1060,7 +1065,7 @@ int initRate(char *conf, char *dat, char *dom, char **msg) } fclose(stream); - if (prefix!=UNKNOWN && !domestic) + if (zone!=UNKNOWN && !domestic) warning (dat, "Provider %d has no default domestic zone (missing 'A:%s')", prefix, mycountry); if (!*Format) { diff --git a/isdnlog/tools/zone.c b/isdnlog/tools/zone.c index c22f6b46..5193357e 100644 --- a/isdnlog/tools/zone.c +++ b/isdnlog/tools/zone.c @@ -1,4 +1,4 @@ -/* $Id: zone.c,v 1.7 1999/06/22 19:41:28 akool Exp $ +/* $Id: zone.c,v 1.8 1999/06/26 10:12:14 akool Exp $ * * Zonenberechnung * @@ -19,6 +19,11 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: zone.c,v $ + * Revision 1.8 1999/06/26 10:12:14 akool + * isdnlog Version 3.36 + * - EGCS 1.1.2 bug correction from Nima + * - zone-1.11 + * * Revision 1.7 1999/06/22 19:41:28 akool * zone-1.1 fixes * @@ -97,7 +102,7 @@ struct sth { static struct sth *sthp; static int count; -static char version[] = "1.10"; +static char version[] = "1.11"; static bool area_read = false; #define LINK 127 @@ -197,20 +202,20 @@ int initZone(int provider, char *path, char **msg) file = path; } else { - if ((dir = strdup(path)) == 0) { - if (msg) - snprintf (message, LENGTH, - "Zone V%s: Error: Out of mem 10", version); - return res; - } - p = strrchr(dir, '/'); - if ((file = strdup(p+1)) == 0) { - if (msg) - snprintf (message, LENGTH, - "Zone V%s: Error: Out of mem 11", version); - return res; - } - p[1] = '\0'; + if ((dir = strdup(path)) == 0) { + if (msg) + snprintf (message, LENGTH, + "Zone V%s: Error: Out of mem 10", version); + return res; + } + p = strrchr(dir, '/'); + if ((file = strdup(p+1)) == 0) { + if (msg) + snprintf (message, LENGTH, + "Zone V%s: Error: Out of mem 11", version); + return res; + } + p[1] = '\0'; } if ((dp = opendir(dir)) == 0) { if (msg) @@ -233,8 +238,8 @@ int initZone(int provider, char *path, char **msg) } closedir(dp); if ((p = strrchr(path, '/')) != 0) { - free(dir); - free(file); + free(dir); + free(file); } if (msg && strlen(message) < LENGTH-5) { strcat(message, " - "); @@ -269,6 +274,7 @@ static int _initZone(int provider, char *path, char **msg, bool area_only) if (msg) snprintf (message, LENGTH, "Zone V%s: Error: Out of mem 0", version); + count--; return -1; } } @@ -286,6 +292,7 @@ static int _initZone(int provider, char *path, char **msg, bool area_only) if (msg) snprintf (message, LENGTH, "Zone V%s: Error: Out of mem 1", version); + count--; return -1; } sthp = newsthp; @@ -334,6 +341,7 @@ static int _initZone(int provider, char *path, char **msg, bool area_only) snprintf (message, LENGTH, "Zone V%s: Error: gdbm_open '%s': '%s'", version, path, GET_ERR); + count--; return -1; } /* read info */ @@ -415,7 +423,7 @@ static int _initZone(int provider, char *path, char **msg, bool area_only) if (area_only) { if (sthp[ocount].cc == 0) _exitZone(provider); /* discard this one */ - return; + return 0; } /* alloc & read table */ if ( (sthp[ocount].table = calloc(csize > 256 ? 256 : csize, @@ -550,7 +558,6 @@ static int _getAreacode(struct sth *sthp, char *from, char **text) { _DB fh = sthp->fh; datum key, value; static char newfrom[LENGTH]; - bool found = false; int len; strncpy(newfrom, from, sthp->numlen); newfrom[sthp->numlen] = '\0'; @@ -558,7 +565,7 @@ static int _getAreacode(struct sth *sthp, char *from, char **text) { UL lifrom = (UL) atol(newfrom); /* keys could be long */ US ifrom = (US) lifrom; if (sthp->pack_key == 2) { - if (lifrom >= 0x10000) { /* can't be, so cut a dig */ + if (lifrom >= 0x10000) { /* can't be, so cut a dig */ newfrom[strlen(newfrom)-1] = '\0'; continue; } @@ -611,16 +618,31 @@ static int checkZone(char *zf, char* df,int num1,int num2, bool verbose) int z, ret=0; char from[10]; char to[10]; + int cc; if (initZone(1, df, &msg)) { fprintf(stderr,"%s\n", msg); exit(1); } + cc = sthp[0].cc; if(verbose) printf("%s\n", msg); if (num1 && num2) { + char *ort1, *ort2; snprintf(from, 9, "%d",num1); snprintf(to, 9, "%d",num2); ret = getZone(1, from, to); + if (cc) { + if (getAreacode(cc, from, &ort1) >0 && + getAreacode(cc, to, &ort2) >0) { + printf("%s(%s) %s(%s) = %d\n", from, ort1, to, ort2, ret); + free(ort1); + free(ort2); + } + else + goto no_ort; + } + else +no_ort: printf("%s %s = %d\n", from, to, ret); } else { @@ -639,7 +661,8 @@ static int checkZone(char *zf, char* df,int num1,int num2, bool verbose) fprintf(stderr,"%d\r",n); fflush(stderr); } - fgets(line, 39, fp); + if (!fgets(line, 39, fp)) + break; p=line; q=from; if (!isdigit(*p)) @@ -693,23 +716,89 @@ static int checkArea(char *df, int cc, char *from, int verbose) { exitZone(1); return ret; } +static int checkAllArea(char *df, char *cf, int cc, int verbose) { + char *msg; + int ret=0; + FILE *fp; + char line[BUFSIZ]; + char from[20]; + char *ort; + char *p, *q; + int i, n, len, olen; + int ifrom; + + if (initZone(1, df, &msg)) { + fprintf(stderr,"%s\n", msg); + exit(1); + } + if(verbose) + printf("%s\n", msg); + if ((fp = fopen(cf, "r")) == 0) { + fprintf(stderr, "Can't read %s\n", cf); + exitZone(1); + exit(1); + } + n=0; + while (!feof(fp)) { + if (!fgets(line, BUFSIZ, fp)) + break; + line[strlen(line)-1] = '\0'; + p=line; + q=from; + if (!isdigit(*p)) + continue; + i=0; + while (isdigit(*p) && ++i<9) { + *q++ = *p++; + } + *q = '\0'; + /* append some randoms */ + olen = strlen(from); + p++; + ifrom=atol(from); + for (i=0; i< 20; i++) { + sprintf(from, "%d%d%d", ifrom, i, rand() % 999999); + if((++n % 1000) == 0 && verbose) { + fprintf(stderr,"%d\r",n); + fflush(stderr); + } + len = getAreacode(cc, from, &ort); + if (olen != len || strcmp(ort, p)) { + fprintf(stderr, "Err: %s:%s not %s Len %d\n", from, p, ort, len); + free(ort); + ret = 1; + break; + } + free(ort); + } + } + fclose(fp); + exitZone(1); + if (verbose) + printf("'%s' verified %s.\n", df, ret==0? "Ok": "NoNo"); + free(cf); + free(df); + return ret; +} int main (int argc, char *argv[]) { int verbose=false; char *df=0; char *zf=0; + char *cf=0; int c; int num1=0, num2=0; int cc=0; char snum1[LENGTH]; - while ( (c=getopt(argc, argv, "vVd:z:a:")) != EOF) { + while ( (c=getopt(argc, argv, "vVd:z:a:c:")) != EOF) { switch (c) { case 'v' : verbose = true; break; case 'V' : printf("%s: V%s\n", basename(argv[0]), version); exit(1); case 'd' : df = strdup(optarg); break; case 'z' : zf = strdup(optarg); break; case 'a' : cc = atoi(optarg); break; + case 'c' : cf = strdup(optarg); break; } } while (optind < argc) { @@ -730,8 +819,11 @@ int main (int argc, char *argv[]) return checkZone(zf, df, num1, num2, verbose); if (df && num1 && cc) return checkArea(df, cc, snum1, verbose); + if (df && cf && cc) + return checkAllArea(df, cf, cc, verbose); fprintf(stderr, "Usage:\n%s -d DBfile -v -V { -z Zonefile | num1 num2 | -a cc num}\n", basename(argv[0])); - fprintf(stderr, "\t-d DBfile -v -V num1\n"); + fprintf(stderr, "\t-d DBfile -v -V -a CC num1 \n"); + fprintf(stderr, "\t-d DBfile -c Codefile -a CC -v -V\n"); return 0; } #endif diff --git a/isdnlog/tools/zone/Makefile.in b/isdnlog/tools/zone/Makefile.in index d0bca372..b8a11a79 100644 --- a/isdnlog/tools/zone/Makefile.in +++ b/isdnlog/tools/zone/Makefile.in @@ -1,5 +1,5 @@ # -# Makefile for mkzonedb (borrowed from iMON) +# Makefile for mkzonedb (parts borrowed from iMON) # # (C) 1999 l.toetsch # @@ -10,6 +10,7 @@ INCLUDES = LDFLAGS = @DBMLIB@ DBEXT = @DBEXT@ RDBEXT = @RDBEXT@ +BIGENDIAN = @WORDS_BIGENDIAN@ PROGRAM = mkzonedb MODULES = $(PROGRAM).o MANPAGE = $(PROGRAM).8 @@ -18,19 +19,25 @@ MANDIR = @CONFIG_MANDIR@ SBINDIR = @CONFIG_SBINDIR@ MAN8DIR = $(MANDIR)/man8 INSTALL = @INSTALL@ -INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750 +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@ +CC = @CC@ +ifeq ($(BIGENDIAN), yes) +ZONEFILES=zonefiles +endif .SUFFIXES: .SUFFIXES: .c .o +.PHONY: all config zonefiles AT DE NL distclean dist test install uninstall + %.o: %.c Makefile $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< -all: $(PROGRAM) zone +# $(ZONEFILES) should propably go to pre-install +all: $(PROGRAM) zone $(ZONEFILES) config: @./configure @@ -50,7 +57,7 @@ $(PROGRAM): $(MODULES) $(CC) $(CFLAGS) $? $(LDFLAGS) -o $@ zone: ../zone.c $(HEADERS) Makefile - $(CC) -DSTANDALONE -g ../zone.c $(LDFLAGS) -o $@ + $(CC) -DSTANDALONE -DZONETEST $(CFLAGS) ../zone.c $(LDFLAGS) -o $@ install-man: $(PROGRAM).man mkdir -p $(DESTDIR)$(MAN8DIR) @@ -72,10 +79,11 @@ distclean: clean rm -f config.h config.status config.cache config.log *.man Makefile configure test: - ./$(PROGRAM) -d zone-at-pta$(DBEXT) -r at/pta/zred.pta -c at/code -a43 -v $(BZIP2) -d at/pta/zred.pta.bz2 $(BZIP2) -d at/pta/zoneall.pta.bz2 + ./$(PROGRAM) -d zone-at-pta$(DBEXT) -r at/pta/zred.pta -c at/code -a43 -v ./zone -d zone-at-pta$(RDBEXT) -z at/pta/zoneall.pta -v + ./zone -d zone-at-pta$(RDBEXT) -c at/code -v $(BZIP2) -9 at/pta/zred.pta $(BZIP2) -9 at/pta/zoneall.pta @@ -85,21 +93,45 @@ test: # zonefiles: AT DE NL -AT: - ./$(PROGRAM) -d ../../zone-at-1012$(DBEXT) -r at/1012/zred-at-1012 -c at/code -v -l4 - $(BZIP2) -d at/uta/zred.uta.bz2 - ./$(PROGRAM) -d ../../zone-at-uta$(DBEXT) -r at/uta/zred.uta -c at/code -v - $(BZIP2) -9 at/uta/zred.uta +AT: AT-pta AT-1002 AT-1007 AT-1012 AT-1024 AT-1066 +.PHONY: AT-pta AT-1002 AT-1007 AT-1012 AT-1024 AT-1066 + +AT-pta: $(BZIP2) -d at/pta/zred.pta.bz2 ./$(PROGRAM) -d ../../zone-at-pta$(DBEXT) -r at/pta/zred.pta -c at/code -a43 -v $(BZIP2) -9 at/pta/zred.pta -DE: +AT-1002: + $(BZIP2) -d at/uta/zred.uta.bz2 + ./$(PROGRAM) -d ../../zone-at-uta$(DBEXT) -r at/uta/zred.uta -c at/code -v + $(BZIP2) -9 at/uta/zred.uta +AT-1007: + $(BZIP2) -d at/1007/zred.bz2 + ./$(PROGRAM) -d ../../zone-at-1007$(DBEXT) -r at/1007/zred -c at/code -v + $(BZIP2) -9 at/1007/zred +AT-1012: + ./$(PROGRAM) -d ../../zone-at-1012$(DBEXT) -r at/1012/zred-at-1012 -c at/code -v -l4 +AT-1024: + $(BZIP2) -d at/1024/zred.bz2 + ./$(PROGRAM) -d ../../zone-at-1024$(DBEXT) -r at/1024/zred -c at/code -v -l4 + $(BZIP2) -9 at/1024/zred +AT-1066: + $(BZIP2) -d at/1066/zred.bz2 + ./$(PROGRAM) -d ../../zone-at-1066$(DBEXT) -r at/1066/zred -c at/code -v + $(BZIP2) -9 at/1066/zred + +DE: DE-dtag +.PHONY: DE-dtag + +DE-dtag: $(BZIP2) -d de/01033/zred.dtag.bz2 ./$(PROGRAM) -d ../../zone-de-dtag$(DBEXT) -r de/01033/zred.dtag -c de/code -a49 -v $(BZIP2) -9 de/01033/zred.dtag -NL: +NL: NL-kpn +.PHONY: NL-kpn + +NL-kpn: $(BZIP2) -d nl/kpn/zred.bz2 ./$(PROGRAM) -d ../../zone-nl-kpn$(DBEXT) -r nl/kpn/zred -c nl/code -a31 -v -o3 $(BZIP2) -9 nl/kpn/zred diff --git a/isdnlog/tools/zone/at/uta/README b/isdnlog/tools/zone/at/uta/README index 731a74ad..c19d0c7a 100644 --- a/isdnlog/tools/zone/at/uta/README +++ b/isdnlog/tools/zone/at/uta/README @@ -7,7 +7,7 @@ erzeugt zoneall.uta # ../../redzone -z zoneall.uta -r zred.uta -n generiert die reduzierte Verzonung -# ../../mkzonedb -r zred.uta -d ../../../../zone-at-uta.gdbm +# ../../mkzonedb -r zred.uta -d ../../../../zone-at-uta.gdbm -c ../code die Datenbank. -leo \ No newline at end of file +leo diff --git a/isdnlog/tools/zone/at/uta/mkuta b/isdnlog/tools/zone/at/uta/mkuta index 823a79e4..10346428 100755 --- a/isdnlog/tools/zone/at/uta/mkuta +++ b/isdnlog/tools/zone/at/uta/mkuta @@ -14,7 +14,9 @@ foreach $a (@a) { $nb = substr($nb,1); if (($bla eq $blb) || ($bla eq 'W' && $blb =~ /^N/) || - ($blb eq 'W' && $bla =~ /^N/)) { + ($blb eq 'W' && $bla =~ /^N/) || + ($na =~ /^5/ && $nb =~ /^5/) # Tirol=Vorarlb + ) { print OUT "$na $nb 1\n"; } else { @@ -23,4 +25,4 @@ foreach $a (@a) { } } close(OUT); -system('sort zoneall.uta && rm zoneall.uta.temp'); \ No newline at end of file +system('sort zoneall.uta && rm zoneall.uta.temp'); diff --git a/isdnlog/tools/zone/at/uta/zred.uta.bz2 b/isdnlog/tools/zone/at/uta/zred.uta.bz2 index 559b1ad9..e1d9a12d 100644 Binary files a/isdnlog/tools/zone/at/uta/zred.uta.bz2 and b/isdnlog/tools/zone/at/uta/zred.uta.bz2 differ diff --git a/isdnlog/tools/zone/configure b/isdnlog/tools/zone/configure index 1dff15b2..a7a431f4 100755 --- a/isdnlog/tools/zone/configure +++ b/isdnlog/tools/zone/configure @@ -1335,16 +1335,109 @@ cat >> confdefs.h <&6 +echo "configure:1340: checking whether byte ordering is bigendian" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat > conftest.$ac_ext < +#include +int main() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. +cat > conftest.$ac_ext < +#include +int main() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if { (eval echo configure:1373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian=yes +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + +if test $ac_cv_c_bigendian = yes; then + WORDS_BIGENDIAN=yes +fi for ac_func in strdup strtoul do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1343: checking for $ac_func" >&5 +echo "configure:1436: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1542,6 +1635,7 @@ s%@RDBEXT@%$RDBEXT%g s%@INSTALL@%$INSTALL%g s%@CONFIG_SBINDIR@%$CONFIG_SBINDIR%g s%@CONFIG_MANDIR@%$CONFIG_MANDIR%g +s%@WORDS_BIGENDIAN@%$WORDS_BIGENDIAN%g CEOF EOF diff --git a/isdnlog/tools/zone/configure.in b/isdnlog/tools/zone/configure.in index 2bf2c202..afd1e4f8 100644 --- a/isdnlog/tools/zone/configure.in +++ b/isdnlog/tools/zone/configure.in @@ -30,6 +30,10 @@ AC_CHECK_SIZEOF(char,1) AC_CHECK_SIZEOF(short,2) AC_CHECK_SIZEOF(long,4) AC_CHECK_SIZEOF(int,4) +AC_C_BIGENDIAN +if test $ac_cv_c_bigendian = yes; then + WORDS_BIGENDIAN=yes +fi dnl Checks for library functions. AC_CHECK_FUNCS(strdup strtoul) @@ -41,5 +45,5 @@ AC_SUBST(CC) AC_SUBST(INSTALL) AC_SUBST(CONFIG_SBINDIR) AC_SUBST(CONFIG_MANDIR) - +AC_SUBST(WORDS_BIGENDIAN) AC_OUTPUT(Makefile) diff --git a/isdnlog/zone-at-1007.gdbm b/isdnlog/zone-at-1007.gdbm new file mode 100644 index 00000000..64a4b1ea Binary files /dev/null and b/isdnlog/zone-at-1007.gdbm differ diff --git a/isdnlog/zone-at-1012.gdbm b/isdnlog/zone-at-1012.gdbm index f249f3da..131b3e29 100644 Binary files a/isdnlog/zone-at-1012.gdbm and b/isdnlog/zone-at-1012.gdbm differ diff --git a/isdnlog/zone-at-1024.gdbm b/isdnlog/zone-at-1024.gdbm new file mode 100644 index 00000000..d737ab4a Binary files /dev/null and b/isdnlog/zone-at-1024.gdbm differ diff --git a/isdnlog/zone-at-1066.gdbm b/isdnlog/zone-at-1066.gdbm new file mode 100644 index 00000000..784e8ace Binary files /dev/null and b/isdnlog/zone-at-1066.gdbm differ diff --git a/isdnlog/zone-at-pta.gdbm b/isdnlog/zone-at-pta.gdbm index d43a64fa..f598108f 100644 Binary files a/isdnlog/zone-at-pta.gdbm and b/isdnlog/zone-at-pta.gdbm differ diff --git a/isdnlog/zone-at-uta.gdbm b/isdnlog/zone-at-uta.gdbm index fe199562..acac2a1c 100644 Binary files a/isdnlog/zone-at-uta.gdbm and b/isdnlog/zone-at-uta.gdbm differ diff --git a/isdnlog/zone-de-dtag.gdbm b/isdnlog/zone-de-dtag.gdbm index 90d91ca0..e5ad4931 100644 Binary files a/isdnlog/zone-de-dtag.gdbm and b/isdnlog/zone-de-dtag.gdbm differ diff --git a/isdnlog/zone-nl-kpn.gdbm b/isdnlog/zone-nl-kpn.gdbm index 05d85f53..efec925d 100644 Binary files a/isdnlog/zone-nl-kpn.gdbm and b/isdnlog/zone-nl-kpn.gdbm differ