Skip to content
Browse files

Imported Upstream version 3.10.20070306

  • Loading branch information...
1 parent 334298c commit 5946c1aba2de52bcb5f5a48149a9a5a972fc8f5a @leggewie leggewie committed
Showing with 381 additions and 6,785 deletions.
  1. +2 −2 Makefile
  2. +5 −2 act2000/actctrl.c
  3. +17 −10 capi20/capi20.c
  4. +15 −1 capi20/capiutils.h
  5. +8 −5 capi20/convert.c
  6. +1 −1 capifax/aclocal.m4
  7. +29 −8 capiinfo/capiinfo.c
  8. +3 −2 eurofile/src/eft/fileheader.c
  9. +4 −3 eurofile/src/eft/tdu_log.c
  10. +5 −2 icn/icnctrl.c
  11. +25 −9 isdnlog/.country-alias
  12. +7 −0 isdnlog/ChangeLog
  13. +22 −4 isdnlog/Makefile.in
  14. +55 −36 isdnlog/country-de.dat
  15. +10 −0 isdnlog/isdnlog/ChangeLog
  16. +6 −3 isdnlog/isdnlog/functions.c
  17. +6 −2 isdnlog/isdnlog/isdnlog.c
  18. +5 −2 isdnlog/isdnlog/isdnlog.h
  19. +6 −3 isdnlog/isdnlog/processor.c
  20. +7 −0 isdnlog/isdnrep/ChangeLog
  21. +1 −2 isdnlog/isdnrep/isdnbill.c
  22. +44 −60 isdnlog/isdnrep/isdnrep.1.in
  23. +5 −2 isdnlog/isdnrep/isdnrep.c
  24. +13 −0 isdnlog/tools/ChangeLog
  25. +4 −3 isdnlog/tools/rate.conf.5.in
  26. +8 −0 isdnlog/tools/telnum.c
  27. +6 −3 isdnlog/tools/tools.c
  28. +9 −3 isdnlog/tools/tools.h
  29. +1 −1 isdnlog/tools/zone/de/code
  30. +11 −2 lib/libisdn.h
  31. +11 −2 lib/libtools.h
  32. +6 −2 loop/loopctrl.c
  33. +23 −19 pppdcapiplugin/Makefile
  34. +1 −1 pppdcapiplugin/Rules.make
  35. +0 −14 pppdcapiplugin/ppp-2.3.11/Makefile
  36. +0 −6 pppdcapiplugin/ppp-2.3.11/pppd/patchlevel.h
  37. +0 −671 pppdcapiplugin/ppp-2.3.11/pppd/pppd.h
  38. +0 −14 pppdcapiplugin/ppp-2.4.0/Makefile
  39. +0 −6 pppdcapiplugin/ppp-2.4.0/pppd/patchlevel.h
  40. +0 −738 pppdcapiplugin/ppp-2.4.0/pppd/pppd.h
  41. +0 −14 pppdcapiplugin/ppp-2.4.1/Makefile
  42. +0 −4 pppdcapiplugin/ppp-2.4.1/pppd/patchlevel.h
  43. +0 −789 pppdcapiplugin/ppp-2.4.1/pppd/pppd.h
  44. +0 −14 pppdcapiplugin/ppp-2.4.1b1/Makefile
  45. +0 −4 pppdcapiplugin/ppp-2.4.1b1/pppd/patchlevel.h
  46. +0 −786 pppdcapiplugin/ppp-2.4.1b1/pppd/pppd.h
  47. +0 −14 pppdcapiplugin/ppp-2.4.1b2/Makefile
  48. +0 −4 pppdcapiplugin/ppp-2.4.1b2/pppd/patchlevel.h
  49. +0 −789 pppdcapiplugin/ppp-2.4.1b2/pppd/pppd.h
  50. +0 −14 pppdcapiplugin/ppp-2.4.2/Makefile
  51. +0 −4 pppdcapiplugin/ppp-2.4.2/pppd/patchlevel.h
  52. +0 −883 pppdcapiplugin/ppp-2.4.2/pppd/pppd.h
  53. +0 −14 pppdcapiplugin/ppp-2.4.2b3/Makefile
  54. +0 −4 pppdcapiplugin/ppp-2.4.2b3/pppd/patchlevel.h
  55. +0 −881 pppdcapiplugin/ppp-2.4.2b3/pppd/pppd.h
  56. +0 −14 pppdcapiplugin/ppp-2.4.3/Makefile
  57. +0 −4 pppdcapiplugin/ppp-2.4.3/pppd/patchlevel.h
  58. +0 −905 pppdcapiplugin/ppp-2.4.3/pppd/pppd.h
View
4 Makefile
@@ -1,11 +1,11 @@
-# $Id: Makefile,v 1.60 2006/01/15 15:19:05 keil Exp $
+# $Id: Makefile,v 1.61 2006/08/08 13:23:28 keil Exp $
#
# Toplevel Makefile for isdn4k-utils
#
.EXPORT_ALL_VARIABLES:
-export I4LVERSION = 3.9
+export I4LVERSION = 3.10
all: do-it-all
View
7 act2000/actctrl.c
@@ -1,4 +1,4 @@
-/* $Id: actctrl.c,v 1.3 2002/01/31 18:50:51 paul Exp $
+/* $Id: actctrl.c,v 1.4 2007/03/05 18:04:34 keil Exp $
* IBM Active 2000 ISDN driver for Linux. (Control-Utility)
*
@@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: actctrl.c,v $
+ * Revision 1.4 2007/03/05 18:04:34 keil
+ * Small fixes to avoid warnings with newer gcc
+ *
* Revision 1.3 2002/01/31 18:50:51 paul
* #include <stdlib.h> for prototypes against warnings.
*
@@ -73,7 +76,7 @@ main(int argc, char **argv)
act2000_cdef newcard;
cmd = strrchr(argv[0], '/');
- cmd = (cmd == NULL) ? argv[0] : ++cmd;
+ cmd = (cmd == NULL) ? argv[0] : cmd + 1;
if (argc > 1) {
if (!strcmp(argv[1], "-d")) {
strcpy(ioctl_s.drvid, argv[2]);
View
27 capi20/capi20.c
@@ -1,7 +1,10 @@
/*
- * $Id: capi20.c,v 1.27 2005/05/09 08:21:57 calle Exp $
+ * $Id: capi20.c,v 1.28 2006/08/08 13:23:29 keil Exp $
*
* $Log: capi20.c,v $
+ * Revision 1.28 2006/08/08 13:23:29 keil
+ * some endian fixes for BIGENDIAN systems
+ *
* Revision 1.27 2005/05/09 08:21:57 calle
* - get_buffer() now returns 0, if no buffer is available.
*
@@ -488,18 +491,22 @@ capi20_put_message (unsigned ApplID, unsigned char *Msg)
void *dataptr;
if (sizeof(void *) != 4) {
if (len >= 30) { /* 64Bit CAPI-extention */
- u_int64_t data64;
- memcpy(&data64,Msg+22, sizeof(u_int64_t));
- if (data64 != 0) dataptr = (void *)(unsigned long)data64;
- else dataptr = Msg + len; /* Assume data after message */
+ _cqword data64;
+ data64 = CAPIMSG_U64(Msg, 22);
+ if (data64 != 0)
+ dataptr = (void *)(unsigned long)data64;
+ else
+ dataptr = Msg + len; /* Assume data after message */
} else {
- dataptr = Msg + len; /* Assume data after message */
+ dataptr = Msg + len; /* Assume data after message */
}
} else {
- u_int32_t data;
- memcpy(&data,Msg+12, sizeof(u_int32_t));
- if (data != 0) dataptr = (void *)(unsigned long)data;
- else dataptr = Msg + len; /* Assume data after message */
+ _cdword data;
+ data = CAPIMSG_U32(Msg, 12);
+ if (data != 0)
+ dataptr = (void *)(unsigned long)data;
+ else
+ dataptr = Msg + len; /* Assume data after message */
}
if (len + datalen > SEND_BUFSIZ)
return CapiMsgOSResourceErr;
View
16 capi20/capiutils.h
@@ -111,6 +111,7 @@ typedef enum { CAPI_COMPOSE = 0, CAPI_DEFAULT = 1 } _cmstruct;
#define CAPIMSG_U8(m, off) (m[off])
#define CAPIMSG_U16(m, off) (m[off]|(m[(off)+1]<<8))
#define CAPIMSG_U32(m, off) (m[off]|(m[(off)+1]<<8)|(m[(off)+2]<<16)|(m[(off)+3]<<24))
+#define CAPIMSG_U64(m, off) (((_cqword)CAPIMSG_U32(m, off))|(((_cqword)CAPIMSG_U32(m, off+4))<<32))
#define CAPIMSG_LEN(m) CAPIMSG_U16(m,0)
#define CAPIMSG_APPID(m) CAPIMSG_U16(m,2)
#define CAPIMSG_COMMAND(m) CAPIMSG_U8(m,4)
@@ -141,6 +142,18 @@ static inline void capimsg_setu32(void *m, int off, _cdword val)
((_cbyte *)m)[off+3] = (val >> 24) & 0xff;
}
+static inline void capimsg_setu64(void *m, int off, _cqword val)
+{
+ ((_cbyte *)m)[off] = val & 0xff;
+ ((_cbyte *)m)[off+1] = (val >> 8) & 0xff;
+ ((_cbyte *)m)[off+2] = (val >> 16) & 0xff;
+ ((_cbyte *)m)[off+3] = (val >> 24) & 0xff;
+ ((_cbyte *)m)[off+4] = (val >> 32) & 0xff;
+ ((_cbyte *)m)[off+5] = (val >> 40) & 0xff;
+ ((_cbyte *)m)[off+6] = (val >> 48) & 0xff;
+ ((_cbyte *)m)[off+7] = (val >> 56) & 0xff;
+}
+
#define CAPIMSG_SETLEN(m, len) capimsg_setu16(m, 0, len)
#define CAPIMSG_SETAPPID(m, applid) capimsg_setu16(m, 2, applid)
#define CAPIMSG_SETCOMMAND(m,cmd) capimsg_setu8(m, 4, cmd)
@@ -227,7 +240,8 @@ typedef struct {
unsigned char *Data;
/* intern */
- unsigned l, p;
+ _cword l;
+ unsigned p;
unsigned char *par;
_cbyte *m;
View
13 capi20/convert.c
@@ -1,7 +1,10 @@
/*
- * $Id: convert.c,v 1.19 2005/05/09 08:23:01 calle Exp $
+ * $Id: convert.c,v 1.20 2006/08/08 13:23:29 keil Exp $
*
* $Log: convert.c,v $
+ * Revision 1.20 2006/08/08 13:23:29 keil
+ * some endian fixes for BIGENDIAN systems
+ *
* Revision 1.19 2005/05/09 08:23:01 calle
* - added SendingComplete to CONNECT_RESP (no funktions changed).
*
@@ -482,14 +485,14 @@ static unsigned char *cpars[] = {
/*-------------------------------------------------------*/
#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 wordTLcpy(x,y) capimsg_setu16(x, 0, *(_cword *)(y))
+#define dwordTLcpy(x,y) capimsg_setu32(x, 0, *(_cdword *)(y))
#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 wordTRcpy(x,y) *(_cword *)(y)=CAPIMSG_U16((x), 0)
+#define dwordTRcpy(x,y) *(_cdword *)(y)=CAPIMSG_U32((x), 0)
#define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l)
View
2 capifax/aclocal.m4
@@ -29,7 +29,7 @@ AC_DEFUN([CS_TEST_ALERT],
#
#
AC_DEFUN([CS_TEST_GLOBALCONFIG],
-[AC_MSG_CHECKING([for capi20 ALERT with sending complete])
+[AC_MSG_CHECKING([for capi20 BProtocol with global configuration])
AC_TRY_COMPILE([#include <capiutils.h>],
[_cmsg cm;void *p; p=CONNECT_REQ_GLOBALCONFIGURATION(&cm);],
[
View
37 capiinfo/capiinfo.c
@@ -1,4 +1,4 @@
-/* $Id: capiinfo.c,v 1.12 2005/03/04 10:55:52 calle Exp $
+/* $Id: capiinfo.c,v 1.13 2006/08/08 13:23:29 keil Exp $
*
* A CAPI application to get infomation about installed controllers
*
@@ -17,6 +17,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: capiinfo.c,v $
+ * Revision 1.13 2006/08/08 13:23:29 keil
+ * some endian fixes for BIGENDIAN systems
+ *
* Revision 1.12 2005/03/04 10:55:52 calle
* changes for 64 bit arch
*
@@ -157,8 +160,8 @@ int main(int argc, char **argv)
return 2;
}
- CAPI20_GET_PROFILE(0, (CAPI_MESSAGE)&cprofile);
- ncontr = cprofile.ncontroller;
+ CAPI20_GET_PROFILE(0, (CAPI_MESSAGE)buf);
+ ncontr = CAPIMSG_U16(buf, 0);
printf("Number of Controllers : %d\n", ncontr);
//err = CAPI20_REGISTER(1, 1, 2048, &ApplId);
@@ -171,10 +174,16 @@ int main(int argc, char **argv)
for (i = 1; i <= ncontr; i++) {
isAVM = 0;
printf("Controller %d:\n", i);
- CAPI20_GET_MANUFACTURER (i, buf);
+ if (!CAPI20_GET_MANUFACTURER (i, buf)) {
+ fprintf(stderr, "could not get manufacturer info for controller %d\n", i);
+ return 1;
+ }
printf("Manufacturer: %s\n", buf);
if (strstr((char *)buf, "AVM") != 0) isAVM = 1;
- CAPI20_GET_VERSION (i, buf);
+ if (!CAPI20_GET_VERSION (i, buf)) {
+ fprintf(stderr, "could not get capi version info for controller %d\n", i);
+ return 1;
+ }
vbuf = (unsigned int *)buf;
printf("CAPI Version: %u.%u\n",vbuf[0], vbuf[1]);
if (isAVM) {
@@ -187,9 +196,21 @@ int main(int argc, char **argv)
} else {
printf("Manufacturer Version: %u.%u\n",vbuf[2], vbuf[3]);
}
- CAPI20_GET_SERIAL_NUMBER (i, buf);
+ if (!CAPI20_GET_SERIAL_NUMBER (i, buf)) {
+ fprintf(stderr, "could not get serial number info for controller %d\n", i);
+ return 1;
+ }
printf("Serial Number: %s\n", (char *)buf);
- CAPI20_GET_PROFILE(i, (CAPI_MESSAGE)&cprofile);
+ err = CAPI20_GET_PROFILE(i, (CAPI_MESSAGE)buf);
+ if (err != CapiNoError) {
+ fprintf(stderr, "could not get profile info for controller %d - %s (%#x)\n", i, capi_info2str(err), err);
+ return 1;
+ }
+ cprofile.nbchannel = CAPIMSG_U16(buf, 2);
+ cprofile.goptions = CAPIMSG_U32(buf, 4);
+ cprofile.support1 = CAPIMSG_U32(buf, 8);
+ cprofile.support2 = CAPIMSG_U32(buf, 12);
+ cprofile.support3 = CAPIMSG_U32(buf, 16);
printf("BChannels: %u\n", cprofile.nbchannel);
printf("Global Options: 0x%08x\n", cprofile.goptions);
showbitvalues(goptions, cprofile.goptions);
@@ -199,7 +220,7 @@ int main(int argc, char **argv)
showbitvalues(b2support, cprofile.support2);
printf("B3 protocols support: 0x%08x\n", cprofile.support3);
showbitvalues(b3support, cprofile.support3);
- for (j=0, s = (unsigned char *)&cprofile; j < sizeof(cprofile); j++) {
+ for (j=0, s = buf; j < sizeof(cprofile); j++) {
switch (j) {
case 0: printf("\n "); break;
case 2: printf("\n "); break;
View
5 eurofile/src/eft/fileheader.c
@@ -1,4 +1,4 @@
-/* $Id: fileheader.c,v 1.4 2001/03/01 14:59:12 paul Exp $ */
+/* $Id: fileheader.c,v 1.5 2007/03/05 18:04:35 keil Exp $ */
/*
Copyright 1998 by Henner Eisen
@@ -88,7 +88,8 @@ static char * tdu_print_file_par( int ct, unsigned char *pkt, unsigned char *end
if( pkt >= end ) goto packet_too_small;
if( (len = *(pkt++)) == 0xff ) {
if( pkt+2 > end ) goto packet_too_small;
- len = 0x100 * *(pkt++) + *(pkt++);
+ len = 0x100 * pkt[0] + pkt[1];
+ pkt += 2;
}
tdu_printf (ct,"len=%d)", len);
ret = pkt + len;
View
7 eurofile/src/eft/tdu_log.c
@@ -1,4 +1,4 @@
-/* $Id: tdu_log.c,v 1.2 2001/03/01 14:59:12 paul Exp $ */
+/* $Id: tdu_log.c,v 1.3 2007/03/05 18:04:35 keil Exp $ */
/*
Copyright 1997 by Henner Eisen
@@ -169,7 +169,7 @@ int tdu_log_prefix(const char * id_fmt, const char *tm_fmt)
int tdu_printf( int context, char * fmt, ... )
{
- int ret, nl, i;
+ int ret = 0, nl, i;
va_list ap;
char tst[20];
@@ -409,7 +409,8 @@ unsigned char * tdu_print_par( int ct, unsigned char *pkt, unsigned char *end, i
if( pkt >= end ) goto packet_too_small;
if( (len = *(pkt++)) == 0xff ) {
if( pkt+2 > end ) goto packet_too_small;
- len = 0x100 * *(pkt++) + *(pkt++);
+ len = 0x100 * pkt[0] + pkt[1];
+ pkt += 2;
}
tdu_printf(ct,"len=%d)", len);
ret = pkt + len;
View
7 icn/icnctrl.c
@@ -1,4 +1,4 @@
-/* $Id: icnctrl.c,v 1.5 2002/01/31 18:55:45 paul Exp $
+/* $Id: icnctrl.c,v 1.6 2007/03/05 18:04:35 keil Exp $
* ICN-ISDN driver for Linux. (Control-Utility)
*
@@ -22,6 +22,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: icnctrl.c,v $
+ * Revision 1.6 2007/03/05 18:04:35 keil
+ * Small fixes to avoid warnings with newer gcc
+ *
* Revision 1.5 2002/01/31 18:55:45 paul
* #include <stdlib.h> for prototypes against warnings.
*
@@ -223,7 +226,7 @@ main(int argc, char **argv)
icn_cdef newcard;
cmd = strrchr(argv[0], '/');
- cmd = (cmd == NULL) ? argv[0] : ++cmd;
+ cmd = (cmd == NULL) ? argv[0] : cmd + 1;
if (argc > 1) {
if (!strcmp(argv[1], "-d")) {
strcpy(ioctl_s.drvid, argv[2]);
View
34 isdnlog/.country-alias
@@ -44,6 +44,7 @@ cook inseln mobilfunk cookinseln mobilfunk
cook-inseln cookinseln
costa-rica mobilfunk costa rica mobilfunk
cote d�ivory elfenbeink�ste cote de ivoire
+c�te d'ivoire cote d'ivoire
c�te d'ivoire mobilfunk elfenbeink�ste cote de ivoire mobilfunk
deutschland b�ndelfunk dolphin deutschland b�ndelfunk dolphin telecom
deutschland mobil deutschland mobilfunk
@@ -63,6 +64,7 @@ eritea eritrea
faeroer f�r�er-inseln
falkland inseln falklandinseln
falkland-inseln falklandinseln
+far�erinseln far�er inseln
fidschi-inseln fidschi
fidschiinseln fidschi
finland mobilfunk finnland mobilfunk
@@ -134,9 +136,8 @@ island mobilfunk irland mobilfunk
jamaica mobilfunk jamaika mobilfunk
jemen arab. rep. mobilfunk jemen mobilfunk
jemen arab. republik jemen (arab. republik)
-jugoslawien (rest-) serbien und montenegro
-jugoslawien (rest-) mobilfunk serbien und montenegro mobilfunk
-jugoslawien (serbien und montenegro) serbien und montenegro
+jugoslawien serbien
+jugoslawien mobilfunk serbien mobilfunk
jungfern inseln britisch britische jungferninseln
jungferninseln (us) amerikanische jungferninseln
kaiman inseln kaimaninseln
@@ -156,6 +157,7 @@ kongo demokr. republik kongo (demokratische republik)
kongo mobilfunk kongo (republik) mobilfunk
kongo republik kongo (republik)
korea s�dkorea
+korea (demokratische volksrepublik) korea (demokratische republik)
korea (republik) mobilfunk korea (s�d) mobilfunk
korea dem. vr (nord) korea (demokratische republik)
korea nord nordkorea
@@ -166,6 +168,8 @@ korea rep.(south) mobilfunk korea rep. (south) mobilfunk
korea s�d s�dkorea
korea s�d mobilfunk korea (s�d) mobilfunk
kuwait-mobilfunk kuwait mobilfunk
+laos (demokratische volksrepublik) laos
+liberien liberia
libyien libyen
libysch-arabische dschamahirija mobilfunk libyen mobilfunk
libysch-arabische dschamahrija libyen
@@ -192,6 +196,7 @@ midway inseln midway-inseln
midway island midway-inseln
midway islands midway-inseln
midwayinseln midway-inseln
+mikronesien (f�derierte staaten) mikronesien
moldau-republik moldau (republik)
moldau-republik mobilfunk moldau (republik) mobilfunk
moldavien mobilfunk moldawien mobilfunk
@@ -221,6 +226,8 @@ osttimor ost timor
osttimor mobilfunk ost timor mobilfunk
palau (=belau) palau /belau
palau-inseln palau /belau
+palestinian territory palestina
+palestinian territory mobile palestina cellphone
pal�stina mobilfunk palestina mobilfunk
pal�stinensische autonomie palestinensisches autonomiegebiet
pal�stinensische autonomie mobilfunk palestina mobilfunk
@@ -249,6 +256,7 @@ russland russische forderation (ostl.)
russland (westlich) russische f�derat. (westl.)
russland (�stlich) russische forderation (ostl.)
russland mobilfunk ru�land mobilfunk
+russland moscow ru�land moskau
russland moskau ru�land moskau
russland st petersburg ru�land st. petersburg
russland st. petersburg ru�land st. petersburg
@@ -274,12 +282,14 @@ saudi - arabien saudi arabien
saudi-arabien saudi arabien
saudi-arabien mobilfunk saudi arabien mobilfunk
saudiarabien saudi arabien
-serbien / montenegro serbien und montenegro
-serbien / montenegro mobilfunk serbien und montenegro mobilfunk
-serbien-montenegro serbia and montenegro
-serbien-montenegro mobilfunk serbien und montenegro mobilfunk
-serbien/montenegro serbien und montenegro
-serbien/montenegro mobilfunk serbien und montenegro mobilfunk
+serbien und montenegro serbien
+serbien und montenegro mobilfunk serbien mobilfunk
+serbien-montenegro serbien
+serbien-montenegro mobilfunk serbien mobilfunk
+slovakische republik slowakische republik
+slovakische republik mobilfunk slowakische republik mobilfunk
+slovenien slowenien
+slovenien mobilfunk slowenien mobilfunk
slowak. republik slowakische republik
slowak. republik mobilfunk slowakische republik mobilfunk
slowakai slowakische republik
@@ -310,11 +320,17 @@ st.-pierre und miquelon st. pierre und miquelon
surinam mobilfunk suriname mobilfunk
syrien (arabische repubik) syrien
s�o tom� und principe sao tome und principe
+s�o tom� und pr�ncipe sao tome und principe
+s�d afrika s�dafrika
+s�d afrika mobilfunk s�dafrika mobilfunk
+s�d korea s�dkorea
+s�d korea mobilfunk korea (s�d) mobilfunk
s�d-korea s�dkorea
s�dafrika-mobilfunk s�dafrika mobilfunk
s�dkorea mobilfunk korea (s�d) mobilfunk
takelau tokelau
tansani tansania
+tansania (vereinigte republik) tansania
thuraya / emsat thuraya
tokelau mobilfunk tokelan mobilfunk
trinidad/tobago trinidad und tobago
View
7 isdnlog/ChangeLog
@@ -1,3 +1,10 @@
+2007-01-05 Tobias Becker <tobiasb@isdn4linux.de>
+
+ * Makefile.in (NO_UTF8_CONV): Made this variable overwriteable.
+
+ * Makefile.in (NO_ISDNLOG): New, set to 1 in order to build
+ everything but isdnlog itself.
+
2006-07-03 Tobias Becker <tobiasb@isdn4linux.de>
* Makefile.in (NO_UTF8_FILES): Fixed an error in the generation of
View
26 isdnlog/Makefile.in
@@ -1,4 +1,4 @@
-## $Id: Makefile.in,v 1.223 2006/07/03 19:47:51 tobiasb Exp $
+## $Id: Makefile.in,v 1.224 2007/01/05 04:23:57 tobiasb Exp $
##
## ISDN accounting for isdn4linux.
##
@@ -19,6 +19,9 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
## $Log: Makefile.in,v $
+## Revision 1.224 2007/01/05 04:23:57 tobiasb
+## Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
+##
## Revision 1.223 2006/07/03 19:47:51 tobiasb
## Fix in filelist generation for NO_UTF8=1.
##
@@ -1752,8 +1755,11 @@ export NO_UTF8
CSEXT = .latin1
-# NO_UTF8_CONV will be used as filter command
-export NO_UTF8_CONV := iconv -f UTF-8 -t ISO-8859-1
+# NO_UTF8_CONV will be used as filter command, prior overwrite possible
+ifndef NO_UTF8_CONV
+NO_UTF8_CONV := iconv -f UTF-8 -t ISO-8859-1
+endif
+export NO_UTF8_CONV
# files which have to be recoded for make all
# use .conf.in files for selection; .conf files may not created yet
@@ -1945,6 +1951,11 @@ endif
PROGS = $(ISDNLOG) $(ISDNREP) $(ISDNBILL) $(ISDNCONF) $(ISDNRATE)
+# do not build isdnlog when NO_ISDNLOG=1 is given
+ifeq ($(NO_ISDNLOG), 1)
+PROGS := $(filter-out $(ISDNLOG),$(PROGS))
+endif
+
ifeq ($(ORACLE),1)
PROGS += $(ORA_LOAD)
endif
@@ -1981,6 +1992,9 @@ $(FILES_USING_VERSION): Makefile
options:
@echo Making $< with
@echo $(CC) $(CFLAGS) $(DEFS) $(INCLUDE)
+ifeq ($(NO_ISDNLOG), 1)
+ @echo Build of isdnlog itself disabled by NO_ISDNLOG=1
+endif
progs: options $(PROGS)
@@ -2015,10 +2029,12 @@ HEADERS := $(HEADERS) .depend
endif
rootperm:
+ifneq ($(NO_ROOTPERM), 1)
@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 ""; echo 'Do "make (un)install" as root!' ;echo ""; false; \
fi
+endif
uninstall: rootperm
if ps x | fgrep $(ISDNLOG) >/dev/null; then kill `cat $(RUNDIR)/isdnlog.isdnctrl0.pid` 2>/dev/null; fi
@@ -2100,15 +2116,17 @@ install-conf:
install-progs:
- $(INSTALL_BIN) $(ISDNLOG) $(DESTDIR)$(SBINDIR)
$(INSTALL_BIN) $(ISDNREP) $(DESTDIR)$(BINDIR)
$(INSTALL_BIN) $(ISDNCONF) $(DESTDIR)$(BINDIR)
$(INSTALL_BIN) $(ISDNRATE) $(DESTDIR)$(BINDIR)
$(INSTALL_BIN) $(ISDNBILL) $(DESTDIR)$(BINDIR)
+ifneq ($(NO_ISDNLOG), 1)
+ $(INSTALL_BIN) $(ISDNLOG) $(DESTDIR)$(SBINDIR)
-@if (ps x | fgrep $(ISDNLOG) | grep -v grep) >/dev/null; then \
kill -HUP `cat $(RUNDIR)/isdnlog.isdnctrl0.pid 2>/dev/null`; \
echo "Restarting (the first) running isdnlog!" ; \
fi
+endif
# FIXME: "Installing /usr/local/lib/isdn/tools/dest/dest.cdb" is confusing
# because "/tools/dest" is only right for the source location of that file.
View
91 isdnlog/country-de.dat
@@ -1,10 +1,8 @@
-V:1.60 Int [03-Jan-2005 01:02:00]
+V:1.61 Int [05-Jan-2007 01:01:00]
#
+# $Id: country-de.dat,v 1.51 2007/01/05 03:03:32 tobiasb Exp $
# This version of country.dat originates from rates4linux:
-# $Id: country-de.dat,v 1.50 2006/01/23 17:07:09 keil Exp $
# The rates4linux homepage: http://www.sourceforge.net/projects/rates4linux/
-# It bases on Rev. 1.39 of isdn4k-utils/isdnlog/country-de.dat
-# in the CVS at http://www.isdn4linux.de.
#
# Countries have a 2 letter ISO-Code
# Towns have a 3 letter airportcode or
@@ -22,7 +20,7 @@ V:1.60 Int [03-Jan-2005 01:02:00]
# lines. Entries for the same country should be separated by one blank line.
# The entry for the whole county should be first, followed by the cellphone
# ("Mobilfunk" in German) entry of this country, followed by further national
-# destinations if present.
+# destinations if present.
#
# Due to ratefile generation considerations, each real country (regular alpha-2
# code) should have an cellphone entry, even if the cellphone numbering range
@@ -32,8 +30,8 @@ V:1.60 Int [03-Jan-2005 01:02:00]
# and vice versa. Until further evolution code changes should be avoided.
#
# International Country Codes according to:
-# List of ITU-T Recommendation E.164 Assigned Country Codes (2004-02-01)
-# http://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html
+# List of ITU-T Recommendation E.164 Assigned Country Codes (2006-10-15)
+# http://www.itu.int/dms_pub/itu-t/opb/sp/T-SP-E.164D-2006-PDF-E.pdf
#
# Partial source for national numbering plans (2004-09-17):
# http://www.itu.int/ITU-T/inr/nnp/index.html
@@ -44,7 +42,8 @@ V:1.60 Int [03-Jan-2005 01:02:00]
# Decoding table for ISO 3166-1 alpha-2 codes (2004-09-17)
# http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/iso_3166-1_decoding_table.html
#
-# Last code change was new entry for Âland Islands (AX) on 2004-02-13.
+# Last code change were new entries for Serbia (RS) and Montenegro (ME)
+# on 2006-09-26.
#
# User-assigned code elements: AA, QM..QZ, XA..XZ, ZZ
# Should be used for numerical country codes not related to a country and
@@ -52,8 +51,8 @@ V:1.60 Int [03-Jan-2005 01:02:00]
#
# Airportcodes: http://www.TravelDesk.com/airports.html
#
-# Offical German language country names (2004-08-20):
-# http://www.auswaertiges-amt.de/www/de/infoservice/download/pdf/publikationen/staatennamen.pdf
+# Offical German language country names (2006-18-10):
+# http://www.auswaertiges-amt.de/diplo/de/Infoservice/Terminologie/Staatennamen.pdf
#
# Note: The information in this file gets included in the destination database
# usually /usr/lib/isdn/dest.cdb. As of August 2002 there is a limit of 1024
@@ -1807,9 +1806,8 @@ R:FK
T:_FKMF
-# Source (2003-03-55):
-# http://www.regtp.de/reg_tele/start/in_05-06-01-01-00_m/index.html
-# http://www.regtp.de/reg_tele/start/in_05-06-01-00-00_m/index.html
+# Source (2006-01-18):
+# http://www.bundesnetzagentur.de/enid/0,0/Nummernverwaltung/Uebersicht_Nummernraum_1hz.html
N:Deutschland
E:Germany
C:+49
@@ -1817,9 +1815,10 @@ T:DE
N:Deutschland Mobilfunk
E:Germany cellphone
-C:+491511,+49160,+49170,+49171,+49175 # D1
+C:+491511,+491515,+49160,+49170,+49171,+49175 # D1
C:+491520,+49162,+49172,+49173,+49174 # D2
-C:+49163,+49177,+49178 # Eplus
+C:+491577,+49163,+49177,+49178 # Eplus
+C:+491570 # vistream
C:+49176,+49179 # E2
C:+491505 # Quam
C:+491566 # Mobilcom
@@ -1829,7 +1828,7 @@ T:_DEMF
N:Deutschland Mobilfunk D1
E:Germany cellphone D1
A:D1, Deutschland Mobilfunk T-Mobile
-C:+491511,+49160,+49170,+49171,+49175 # reserved (2002-07-12): +49151
+C:+491511,+491515,+49160,+49170,+49171,+49175 # reserved (2002-07-12): +49151
R:_DEMF
T:_DEMD1
@@ -1843,10 +1842,18 @@ T:_DEMD2
N:Deutschland Mobilfunk E1
E:Germany cellphone E1
A:E1, Eplus, Deutschland Mobilfunk E-Plus
-C:+49163,+49177,+49178 # reserved (2002-07-12): +49155
+C:+491577,+49163,+49177,+49178 # reserved (2002-07-12): +49157
+C:+491570 # treat vistream (_DEMFV) as subsidary
R:_DEMF
T:_DEME1
+N:Deutschland Mobilfunk vistream
+E:Germany cellphone vistream
+C:+491570 # registered to E-Plus (_DEME1)
+R:_DEME1
+T:_DEMV
+
+
N:Deutschland Mobilfunk E2
E:Germany cellphone E2
A:E2, Deutschland Mobilfunk Interkom, Deutschland Mobilfunk O2, O2 Germany
@@ -1856,8 +1863,8 @@ T:_DEME2
N:Deutschland Mobilfunk Quam
E:Germany cellphone Quam
-A:Quam
-C:+491505 # reserved (2002-07-12): +49151
+A:Quam, Deutschland Mobilfunk Group 3G
+C:+491505 # reserved (2002-07-12): +49150
R:_DEMF
T:_DEMQ
@@ -1876,7 +1883,6 @@ T:_DEBD
N:Deutschland Premium Rate
E:Germany premium rate
A:Deutschland Mehrwertdienste, Deutschland Premium Rate Dienste
-C:+49190 # will be out of service after 2005-12-31
C:+49900
R:DE
T:_DESO
@@ -2055,6 +2061,8 @@ T:_SOEN
# nofix: code assigned is GB, UK is exceptionally reserved
+# TODO: new url, new numbering plan:
+# http://www.ofcom.org.uk/telecoms/ioi/numbers/num_plan_0904.pdf
# Source (2003-07-22):
# http://www.oftel.gov.uk/publications/numbering/2003/ntnp_final_c0703.pdf
N:Großbritannien
@@ -2101,6 +2109,7 @@ C:+44131
R:UK
T:EDI
+# fixme: code should be IM ("Isle Of Man"),
# Source (2001-09-17):
# http://www.warwick.ac.uk/search/Phones/nng_list.txt
N:Insel Man (Großbritannien)
@@ -2126,6 +2135,7 @@ C:+44808162
R:_UKIM
T:_IMFF
+# fixme: codes should be GG ("Gurnsey") and JE ("Jersey")
# Source see Isle of Man
N:Kanalinseln (Großbritannien)
A:Kanalinseln, Kanalinseln (GB), Guernsey und Jersey
@@ -2411,28 +2421,37 @@ R:HR
T:_HRMF
-# +382 .. +384 -- Spare codes
+# +383 .. +384 -- Spare codes
+
+
+N:Montenegro
+A:Republik Montenegro
+A:Republic of Montenegro
+C:+382
+T:ME
+N:Montenegro Mobilfunk
+E:Montenegro cellphone
+R:ME
+T:_MEMF
# fixme: code YU ("Yugoslawia") was deleted 2003-07,
-# should be CS ("Serbia and Montenegro")
-# Source (2002-12-05):
-# http://www.itu.int/itudoc/itu-t/number/y/yug/82105_ww2.doc
-N:Serbien und Montenegro
-A:Jugoslawien
-A:Jugoslawien (Serbien/Montenegro), Serbien, Montenegro, Yugoslavia (Servia & Montenegro)
-A:Jugoslawien Montenegro, Jugoslawien Serbien und Montenegro, Jugoslawien-Serbien
-E:Serbia and Montenegro
-A:Yugoslavia
+# should be RS ("Serbia")
+# Source (2006-10-19):
+# http://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000B90001MSWE.doc
+N:Serbien
+E:Serbia
+A:Republik Serbien
+A:Republic of Serbia
C:+381
+# +381-8x for geopraphic numbers in Montenegro
T:YU
-N:Serbien und Montenegro Mobilfunk
-A:Jugoslawien Mobilfunk
-E:Serbia and Montenegro cellphone
-A:Yugoslavia cellphone
-C:+38161, +38163, +38164, +38165, +38167, +38169
-C:+381663, +381664, +381665, +381666, +381667
+N:Serbien Mobilfunk
+E:Serbia cellphone
+C:+38161 # "temporarily not in use"
+C:+38162, +38163, +38164, +38165
+C:+38167, +38169 # operators in Montenegro
R:YU
T:_YUMF
View
10 isdnlog/isdnlog/ChangeLog
@@ -1,3 +1,13 @@
+2007-01-05 Tobias Becker <tobiasb@isdn4linux.de>
+
+ * isdnlog.c: Do no longer include <linux/limits.h> directly,
+ it is included through isdnlog.h -> ../tools/tools.h ->
+ ../../lib/libisdn.h.
+
+ * processor.c (decode), functions.c (info, showmsg): Renamed
+ iprintf to il_printf because of the integer printf function
+ iprintf in the newlib C library.
+
2006-04-09 Tobias Becker <tobiasb@isdn4linux.de>
* processor.c (decode): Do not append same digits twice to called
View
9 isdnlog/isdnlog/functions.c
@@ -1,4 +1,4 @@
-/* $Id: functions.c,v 1.33 2002/01/26 20:43:31 akool Exp $
+/* $Id: functions.c,v 1.34 2007/01/05 04:23:58 tobiasb Exp $
*
* ISDN accounting for isdn4linux. (log-module)
*
@@ -19,6 +19,9 @@
* along with this program; if not, write to the Free Software
*
* $Log: functions.c,v $
+ * Revision 1.34 2007/01/05 04:23:58 tobiasb
+ * Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
+ *
* Revision 1.33 2002/01/26 20:43:31 akool
* isdnlog-4.56:
* - dont set the Provider-field of the MySQL DB to "?*? ???" on incoming calls
@@ -673,7 +676,7 @@ void info(int chan, int reason, int state, char *msg)
if (allflags & PRT_DEBUG_INFO)
print_msg(PRT_DEBUG_INFO, "%d INFO> ", chan);
- (void)iprintf(s, chan, call[chan].dialin ? ilabel : olabel, left, msg, right);
+ (void)il_printf(s, chan, call[chan].dialin ? ilabel : olabel, left, msg, right);
print_msg(PRT_DEBUG_INFO, "%s", s);
@@ -704,7 +707,7 @@ void showmsg(const char *fmt, ...)
(void)vsnprintf(s, BUFSIZ, fmt, ap);
va_end(ap);
- (void)iprintf(s1, -1, mlabel, "", s, "");
+ (void)il_printf(s1, -1, mlabel, "", s, "");
print_msg(PRT_SHOWNUMBERS, "%s", s1);
} /* showmsg */
View
8 isdnlog/isdnlog/isdnlog.c
@@ -1,4 +1,4 @@
-/* $Id: isdnlog.c,v 1.76 2005/02/23 14:33:39 tobiasb Exp $
+/* $Id: isdnlog.c,v 1.77 2007/01/05 04:23:58 tobiasb Exp $
*
* ISDN accounting for isdn4linux. (log-module)
*
@@ -19,6 +19,9 @@
* along with this program; if not, write to the Free Software
*
* $Log: isdnlog.c,v $
+ * Revision 1.77 2007/01/05 04:23:58 tobiasb
+ * Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
+ *
* Revision 1.76 2005/02/23 14:33:39 tobiasb
* New feature: provider skipping.
* Certain providers can be completely ignored (skipped) when loading the
@@ -545,7 +548,8 @@
#define _ISDNLOG_C_
-#include <linux/limits.h>
+/* included via isdnlog/isdnlog.h -> tools/tools.h -> ../lib/libisdn.h
+ #include <linux/limits.h> */
#include <termios.h>
#include "isdnlog.h"
View
7 isdnlog/isdnlog/isdnlog.h
@@ -1,4 +1,4 @@
-/* $Id: isdnlog.h,v 1.29 2004/09/05 22:04:56 tobiasb Exp $
+/* $Id: isdnlog.h,v 1.30 2007/01/05 04:23:58 tobiasb Exp $
*
* ISDN accounting for isdn4linux.
*
@@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdnlog.h,v $
+ * Revision 1.30 2007/01/05 04:23:58 tobiasb
+ * Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
+ *
* Revision 1.29 2004/09/05 22:04:56 tobiasb
* New parameter file entry "ignoreUPD" for suppressing "Unexpected
* discrimator (...)" messages, demanded by Günther J. Niederwimmer
@@ -333,7 +336,7 @@
/****************************************************************************/
-#include <tools.h>
+#include <tools.h> /* includes linux/isdn.h for __linux__ */
#include <holiday.h>
#include <rate.h>
#include "socket.h"
View
9 isdnlog/isdnlog/processor.c
@@ -1,4 +1,4 @@
-/* $Id: processor.c,v 1.133 2006/05/01 13:52:31 tobiasb Exp $
+/* $Id: processor.c,v 1.134 2007/01/05 04:23:58 tobiasb Exp $
*
* ISDN accounting for isdn4linux. (log-module)
*
@@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: processor.c,v $
+ * Revision 1.134 2007/01/05 04:23:58 tobiasb
+ * Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
+ *
* Revision 1.133 2006/05/01 13:52:31 tobiasb
* Fix for special case with DUALFIX_SRCNUM (-2/dual= includes 0x200).
* A more general approach would do reordering of layer 2 frames.
@@ -2291,7 +2294,7 @@ static void decode(int chan, register char *p, int type, int version, int tei)
}
if (n == AOC_OTHER) {
if (asnm && *asnm) {
- (void)iprintf(s1, -1, mlabel, "", asnm, "\n");
+ (void)il_printf(s1, -1, mlabel, "", asnm, "\n");
print_msg(PRT_SHOWNUMBERS, "%s", s1);
} /* if */
}
@@ -2731,7 +2734,7 @@ static void decode(int chan, register char *p, int type, int version, int tei)
info(chan, PRT_SHOWNUMBERS, STATE_RING, s1);
if (cl != NULL) {
- iprintf(s1, chan, callfmt);
+ il_printf(s1, chan, callfmt);
fprintf(cl, "%s\n", s1);
fclose(cl);
} /* if */
View
7 isdnlog/isdnrep/ChangeLog
@@ -1,3 +1,10 @@
+2007-01-05 Tobias Becker <tobiasb@isdn4linux.de>
+
+ * isdnrep.c: Do not include <linux/limits.h>, this is already done
+ by ../../lib/libisdn.h.
+
+ * isdnbill.c: Do not include <asm/param.h>, it is no longer needed.
+
2005-01-22 Tobias Becker <tobiasb@isdn4linux.de>
* opt_time.c (get_ytime): New function for setting time relative
View
3 isdnlog/isdnrep/isdnbill.c
@@ -1,4 +1,4 @@
-/* $Id: isdnbill.c,v 1.21 2006/07/03 15:51:27 keil Exp $
+/* $Id: isdnbill.c,v 1.22 2007/01/05 04:23:58 tobiasb Exp $
*
* ISDN accounting for isdn4linux. (Billing-module)
*
@@ -26,7 +26,6 @@
#include "isdnlog.h"
#include "tools/zone.h"
#include <unistd.h>
-#include <asm/param.h>
#include <math.h>
#include "dest.h"
View
104 isdnlog/isdnrep/isdnrep.1.in
@@ -1,5 +1,5 @@
-.\" $Id: isdnrep.1.in,v 1.10 2005/01/22 18:47:16 tobiasb Exp $
-.\" CHECKIN $Date: 2005/01/22 18:47:16 $
+.\" $Id: isdnrep.1.in,v 1.11 2007/01/05 02:40:54 tobiasb Exp $
+.\" CHECKIN $Date: 2007/01/05 02:40:54 $
.TH isdnrep 1 "@MANDATE_ISDNREP@" "ISDN 4 Linux @I4LVERSION@" "Linux System Commands"
.PD 0
@@ -32,7 +32,7 @@ option is given twice, the summaries per day are hidden too. Don't use with
There will be no header for each day, nor will the summary at the end
of each day and at the end of the report be generated. This is useful
if the output is to be processed by another program.
-.br
+.sp
This option doesn't work if the
.B \-wX
is also given.
@@ -156,23 +156,23 @@ only hours matching
all hours not matching
.I timelist
.RE
-
-.in +7
+.sp
.I daylist
and
.I timelist
have the same syntax as described in
.IR rate-files(5) .
If a day or an hour is included and excluded it will be excluded.
-
-Example
-.br
+.sp
+Example:
+.sp
+.RS
-xd2-4:DH:h9-17:H12-15
-.br
+.RE
+.sp
This will display all calls on Tuesdays, Wednesdays, or Thursdays
that are no holidays with a start time between 09:00 and 12:00 or
15:00 and 17:00.
-.in -7
.TP
.B \-u unknown caller
@@ -204,14 +204,12 @@ providers of outgoing calls
m,M
MSNs (own subscriber numbers) of outgoing calls
.RE
-
-.in +7
+.sp
Upper case letters deselect, lower case letters select a summary.
With at least one lower case letter, only the selected
summaries are shown, as long as they are not also deselected.
-LiI for example will show no summary at all.
Per default all summaries are displayed.
-.in -7
.TP
.B \-rPROV recompute
@@ -281,28 +279,23 @@ be given):
.RS
.TP 4
%X
-time without date
-.br
+time without date,
e.g. 23:54:06
.TP
%x
-the date
-.br
+the date,
e.g. 25/07/97
.TP
%y
-date without year
-.br
+date without year,
e.g. Sun May 04
.TP
%Y
-year, in four digits
-.br
+year, in four digits,
e.g. 1997
.TP
%D
-duration of connection
-.br
+duration of connection,
e.g. 00:03:34
.TP
%\fBx\fRH
@@ -334,26 +327,22 @@ an arrow indicating the direction of the connection, reversed
the local MSN should be displayed on the right side of this.
.TP
%\fBx\fRu
-the charge units, if known
-.br
+the charge units, if known,
e.g. 6 EH
.TP
%U
-the cost, if known
-.br
+the cost, if known,
e.g. 2,28 DM
.TP
%\fBx\fRj
the name of the used provider
.TP
%v
-the VBN (carrier selection prefix) of the provider
-.br
+the VBN (carrier selection prefix) of the provider,
e.g. 01012
.TP
%V
-the VBN and variant of the provider
-.br
+the VBN and variant of the provider,
e.g. 01012_3
.TP
%I
@@ -374,7 +363,7 @@ Service Indicator
%G
displays a HTTP link to the corresponding fax, when a fax was received
by mgetty. This fax can be displayed by using the link in a HTTP browser.
-.br
+.sp
This option is only valid when used with -wx, see below for more information.
.TP
%C
@@ -382,36 +371,33 @@ displays a HTTP link to the corresponding voice file, when a call was
recorded by vbox.
This option is only valid when used with -wx, see below for more information.
.RE
-
-.in +7
+.sp
The default format string for (non-HTML output) is
-
-.in +4
+.RS
" %X %D %15.15H %T %-15.15F %7u %U %I %O"
-.in -4
-
+.RE
+.sp
With the following string all the important data is displayed while
keeping the total length to 80:
-
-.in +4
+.sp
+.RS
"%X%D %10.10H%T%-14.14F%U%I %O"
-.in -4
-
+.RE
+.sp
The above string is put into @CONFFILE@ at installation as
.B REPFMTSHORT
and can be used with
.B -Fshort.
Without showing the transfered bytes, this string also fits into 80 chars:
-
-.in +4
+.sp
+.RS
" %X %D %16.16H %T %-25.25F %U"
-.in -4
-
+.RE
+.sp
It is included as
.B REPFMTNIO.
-.in -7
.TP
.B \-FX format
format strings can be specified in @CONFFILE@; this option
@@ -475,8 +461,7 @@ which version created the recording.
The program must first output a line with the content-type, followed
by the data itself. To convert the ZyXEL format into a WAV file, the
following script may be used:
-
-.in +4
+.RS
.nf
#! /bin/sh
##
@@ -505,7 +490,7 @@ cat $FILENAME2
rm -f $FILENAME1 $FILENAME2
.fi
-.in -4
+.RE
The script above needs the packages sox and pvftools.
Additionally, the browser needs to be told how to handle "audio/x-wav".
This is done by adding the following lines to the files listed:
@@ -587,7 +572,7 @@ VBOXCMD = /usr/bin/g3tojpeg # example
The script g3tojpeg can be something like this:
-.in +4
+.RS
.nf
#! /bin/sh
##
@@ -603,7 +588,7 @@ echo
g3topbm < $1 | convert pbm:- jpeg:-
.fi
-.in -4
+.RE
The packages ImageMagick and mgetty are needed. Mgetty is probably
already installed if you want to use this feature :-)
@@ -634,8 +619,8 @@ connected to the wrong isdn connection.
With the default configuration the following output can be generated
on stdout (whitespace slightly edited for clarity):
+.RS
.nf
-.in -4
$ isdnrep -v -t 6/1/96
I S D N Connection Report - Tue Aug 26 22:21:19 1997
@@ -670,7 +655,7 @@ Zone 1 : City 2 call(s) 2:23:13 50 EH 6,00 DM \fB(13)
Zone x : UNKNOWN 11 call(s) 0:17:00 20 EH 2,40 DM
.fi
-.in +4
+.RE
.B Notes
.RS 1
@@ -772,11 +757,11 @@ October 16th 1998
specifies an exact time. Unspecified parts are defined as 0 when
interpreted as a begin time, and 23 or 59 when interpreted as an
end time.
-.br
+.sp
If a year is to be specified, the hours and minutes
.B must
also be specified.
-.br
+.sp
The format is copied from the date command.
Examples:
@@ -796,10 +781,9 @@ January 7th 1996 17:31:00 (or 17:31:59)
error: \fBnot\fR December 12th 1995, but December 12th of the current
year at 19:95, so it's garbage.
.RE
-
-.in +7
+.sp
+.RS
Examples of time spans and their meaning:
-
.RS
.TP
6/95-081214381996.25
@@ -822,6 +806,7 @@ September 8th in the current year 23:59:59
3
third day of the current month
.RE
+.RE
.TP
[CC]YY\-MM\-DDThh:mm:ss
@@ -870,7 +855,6 @@ the day before yesterday,
three days ago and so on.
For time spans these can also be used in conjunction
with the notations explained above.
-.in -7
.SH "FILES"
.TP
View
7 isdnlog/isdnrep/isdnrep.c
@@ -1,4 +1,4 @@
-/* $Id: isdnrep.c,v 1.103 2006/07/03 15:51:27 keil Exp $
+/* $Id: isdnrep.c,v 1.104 2007/01/05 04:23:58 tobiasb Exp $
*
* ISDN accounting for isdn4linux. (Report-module)
*
@@ -24,6 +24,9 @@
*
*
* $Log: isdnrep.c,v $
+ * Revision 1.104 2007/01/05 04:23:58 tobiasb
+ * Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
+ *
* Revision 1.103 2006/07/03 15:51:27 keil
* - HZ is not used anymore, this value is defined as duration in
* 1/100 seconds independ from system HZ value
@@ -216,7 +219,7 @@
#include <sys/param.h>
#include <dirent.h>
#include <search.h>
-#include <linux/limits.h>
+/* included by libisdn.h: #include <linux/limits.h> */
#include <string.h>
#include "dest.h"
View
13 isdnlog/tools/ChangeLog
@@ -1,3 +1,16 @@
+2007-01-05 Tobias Becker <tobiasb@isdn4linux.de>
+
+ * tools.h, tools.c (iprintf, il_printf): Renamed iprintf to
+ il_printf because of the integer printf function iprintf in the
+ newlib C library.
+
+ * tools.h: Replaced linux by __linux as condition for inclusion
+ of <sys/kd.h> and <linux/isdn.h>. Set ISDN_MSNLEN to 32 if
+ <linux/isdn.h> is unavailable.
+
+ * telnum.c (stpcpy): Added this non IEEE 1003.1 function if
+ _NEWLIB_VERSION is defined and indicates the newlib C library.
+
2006-02-05 Tobias Becker <tobiasb@isdn4linux.de>
* rate.c (initRate, appendArea, get_area1): Remember federal zone for
View
7 isdnlog/tools/rate.conf.5.in
@@ -1,5 +1,5 @@
-.\" $Id: rate.conf.5.in,v 1.1 2005/02/23 14:33:40 tobiasb Exp $
-.\" CHECKIN $Date: 2005/02/23 14:33:40 $
+.\" $Id: rate.conf.5.in,v 1.2 2007/01/05 02:40:54 tobiasb Exp $
+.\" CHECKIN $Date: 2007/01/05 02:40:54 $
.TH rate.conf 5 "@MANDATE_RATE_CONF@" "ISDN 4 Linux @I4LVERSION@" "isdnlog @ISDNLOG_VERSION@"
.SH NAME
@@ -76,9 +76,10 @@ carrier selection prefix and no exceptions matching.
.SS Exceptions to Provider Selection
+.nf
.BI X: number = pnum
-.br
.BI X: number = pnum z zone
+.fi
Connections to
.I number
View
8 isdnlog/tools/telnum.c
@@ -95,6 +95,14 @@
/* #define DEBUG 1 */
+#ifdef _NEWLIB_VERSION
+/* provide missing stpcpy, lines taken from dietlibc-0.30/libcompat/stpcpy.c */
+static char * stpcpy (char *dst, const char *src) {
+ while ((*dst++ = *src++));
+ return (dst-1);
+}
+#endif
+
static TELNUM defnum;
TELNUM *getMynum(void)
View
9 isdnlog/tools/tools.c
@@ -1,4 +1,4 @@
-/* $Id: tools.c,v 1.54 2005/01/12 16:28:05 tobiasb Exp $
+/* $Id: tools.c,v 1.55 2007/01/05 04:23:58 tobiasb Exp $
*
* ISDN accounting for isdn4linux. (Utilities)
*
@@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: tools.c,v $
+ * Revision 1.55 2007/01/05 04:23:58 tobiasb
+ * Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
+ *
* Revision 1.54 2005/01/12 16:28:05 tobiasb
* Fixed processing of numbers without an entry in dest.cdb like +8.
*
@@ -1092,7 +1095,7 @@ static char *ltoa(register unsigned long num, register char *p, register int rad
/****************************************************************************/
-int iprintf(char *obuf, int chan, register char *fmt, ...)
+int il_printf(char *obuf, int chan, register char *fmt, ...)
{
register char *p, *s;
register int c, i, who;
@@ -1349,7 +1352,7 @@ go: if (!ndigit)
} /* while */
} /* for */
-} /* iprintf */
+} /* il_printf */
/****************************************************************************/
View
12 isdnlog/tools/tools.h
@@ -1,4 +1,4 @@
-/* $Id: tools.h,v 1.64 2005/02/23 14:33:40 tobiasb Exp $
+/* $Id: tools.h,v 1.65 2007/01/05 04:23:58 tobiasb Exp $
*
* ISDN accounting for isdn4linux.
*
@@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: tools.h,v $
+ * Revision 1.65 2007/01/05 04:23:58 tobiasb
+ * Made isdnrep and isdnrate buildable under cygwin. See ChangeLog for details.
+ *
* Revision 1.64 2005/02/23 14:33:40 tobiasb
* New feature: provider skipping.
* Certain providers can be completely ignored (skipped) when loading the
@@ -644,7 +647,7 @@
#include <math.h>
#include <syslog.h>
#include <sys/ioctl.h>
-#ifdef linux
+#ifdef __linux__
#include <sys/kd.h>
#include <linux/isdn.h>
#else
@@ -710,6 +713,9 @@
/****************************************************************************/
+#ifndef ISDN_MSNLEN /* if linux undefined and <linux/isdn.h> not included */
+#define ISDN_MSNLEN 32
+#endif
#define NUMSIZE (ISDN_MSNLEN + 1)
#define FNSIZE 64
#define RETSIZE 128
@@ -1281,7 +1287,7 @@ _EXTERN char *time2str(time_t sec);
_EXTERN char *double2clock(double n);
_EXTERN char *vnum(int chan, int who);
_EXTERN char *i2a(int n, int l, int base);
-_EXTERN int iprintf(char *obuf, int chan, register char *fmt, ...);
+_EXTERN int il_printf(char *obuf, int chan, register char *fmt, ...);
_EXTERN char *qmsg(int type, int version, int val);
_EXTERN char *Myname;
_EXTERN char *zonen[MAXZONES];
View
2 isdnlog/tools/zone/de/code
@@ -1493,7 +1493,7 @@
37431 Mehltheuer
37432 Pausa
37433 Gutenfürst
-37434 Bobenkirchen
+37434 Bobenneukirchen
37435 Reuth
37436 Weischlitz
37437 Bad Elster
View
13 lib/libisdn.h
@@ -1,5 +1,5 @@
-/* $Id: libisdn.h,v 1.14 2002/01/31 20:03:59 paul Exp $
+/* $Id: libisdn.h,v 1.15 2007/01/05 03:45:50 tobiasb Exp $
*
* ISDN accounting for isdn4linux.
*
@@ -20,6 +20,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: libisdn.h,v $
+ * Revision 1.15 2007/01/05 03:45:50 tobiasb
+ * - replaced prototype for basename() by #include <libgen.h>
+ * - include <linux/limits.h> only if __linux__ is defined, try
+ * <limits.h> otherwise
+ *
* Revision 1.14 2002/01/31 20:03:59 paul
* Add "#define CCODE_OTHER 9999" for defining behaviour in
* non-specified countries.
@@ -78,7 +83,11 @@
#ifndef _LIB_H_
#define _LIB_H_
+#ifdef __linux__
#include <linux/limits.h>
+#else
+#include <limits.h>
+#endif
#include "policy.h"
#include "conffile.h"
@@ -90,7 +99,7 @@
/****************************************************************************/
-extern char *basename __P((__const char *__name));
+#include <libgen.h>
/****************************************************************************/
View
13 lib/libtools.h
@@ -1,4 +1,4 @@
-/* $Id: libtools.h,v 1.8 1998/10/13 22:17:25 luethje Exp $
+/* $Id: libtools.h,v 1.9 2007/01/05 03:45:50 tobiasb Exp $
*
* ISDN accounting for isdn4linux.
*
@@ -19,6 +19,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: libtools.h,v $
+ * Revision 1.9 2007/01/05 03:45:50 tobiasb
+ * - replaced prototype for basename() by #include <libgen.h>
+ * - include <linux/limits.h> only if __linux__ is defined, try
+ * <limits.h> otherwise
+ *
* Revision 1.8 1998/10/13 22:17:25 luethje
* isdnlog: evaluate the variable PATH for program starts.
*
@@ -44,11 +49,15 @@
#ifndef _LIB_TOOLS_H_
#define _LIB_TOOLS_H_
+#ifdef __linux__
#include <linux/limits.h>
+#else
+#include <limits.h>
+#endif
/****************************************************************************/
-extern char *basename __P((__const char *__name));
+#include <libgen.h>
/****************************************************************************/
View
8 loop/loopctrl.c
@@ -1,4 +1,4 @@
-/* $Id: loopctrl.c,v 1.3 1999/09/06 08:03:26 fritz Exp $
+/* $Id: loopctrl.c,v 1.4 2007/03/05 18:04:35 keil Exp $
* loop-ISDN driver for Linux. (Control-Utility)
*
@@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: loopctrl.c,v $
+ * Revision 1.4 2007/03/05 18:04:35 keil
+ * Small fixes to avoid warnings with newer gcc
+ *
* Revision 1.3 1999/09/06 08:03:26 fritz
* Changed my mail-address.
*
@@ -33,6 +36,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <fcntl.h>
@@ -175,7 +179,7 @@ main(int argc, char **argv)
isdnloop_sdef startparm;
cmd = strrchr(argv[0], '/');
- cmd = (cmd == NULL) ? argv[0] : ++cmd;
+ cmd = (cmd == NULL) ? argv[0] : cmd + 1;
if (argc > 1) {
if (!strcmp(argv[1], "-d")) {
strcpy(ioctl_s.drvid, argv[2]);
View
42 pppdcapiplugin/Makefile
@@ -14,11 +14,11 @@ export CAPILIB=$(TOPDIR)/../capi20
export INSTALL=$(TOPDIR)/install-sh -c
export INSTALLDATA=$(TOPDIR)/install-sh -c -o root -m 600
export MKDIR=$(TOPDIR)/mkinstalldirs
+export PPPINC=/usr/include/pppd
-PPPSRCDIRS=/src/isdn/pppd
-
-ifeq ($(PPPVERSIONS),)
-PPPVERSIONS = 2.3.11 2.4.0 2.4.1 2.4.1b1 2.4.1b2 2.4.2b3 2.4.2 2.4.3
+ifeq ($(PPPVERSION),)
+PPPVERSION_XX=$(shell grep VERSION $(PPPINC)/patchlevel.h)
+PPPVERSION=$(word 3,$(PPPVERSION_XX))
endif
PEERDIR=${DESTDIR}/etc/ppp/peers/isdn
@@ -28,20 +28,26 @@ DRDSLFILES = adsl.conf
ALL = capiplugin.so userpass.so
-all: pversion
- @for i in $(PPPVERSIONS) ; do \
- echo $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
- $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
- done
+#all: pversion
+# @for i in $(PPPVERSIONS) ; do \
+# echo $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
+# $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
+# done
+
+all: pversion ppp-$(PPPVERSION)
+ echo $(MAKE) -C ppp-$(PPPVERSION) PPPVERSION=$(PPPVERSION)
+ $(MAKE) -C ppp-$(PPPVERSION) PPPVERSION=$(PPPVERSION)
+
+ppp-$(PPPVERSION):
+ $(MKDIR) ppp-$(PPPVERSION)
+ echo created ppp-$(PPPVERSION)
+ cp Makefile.template ppp-$(PPPVERSION)/Makefile
distclean: clean
clean:
- @for i in $(PPPVERSIONS) ; do \
- echo $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
- $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
- done
- $(RM) comperr pversion
+ echo $(MAKE) -C ppp-$(PPPVERSION) PPPVERSION=$(PPPVERSION) $@ ;
+ $(MAKE) -C ppp-$(PPPVERSION) PPPVERSION=$(PPPVERSION) $@ ;
install-peers:
$(MKDIR) $(PEERDIR)
@@ -69,11 +75,9 @@ install-man:
fi ; \
done
-install: pversion
- @for i in $(PPPVERSIONS) ; do \
- echo $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
- $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \
- done
+install:
+ echo $(MAKE) -C ppp-$(PPPVERSION) PPPVERSION=$(PPPVERSION) $@ ;
+ $(MAKE) -C ppp-$(PPPVERSION) PPPVERSION=$(PPPVERSION) $@ ;
$(MAKE) install-peers
$(MAKE) install-drdsl
$(MAKE) install-man
View
2 pppdcapiplugin/Rules.make
@@ -11,7 +11,7 @@
vpath %.c $(TOPDIR)
CC = gcc
-INC = -I$(TOPDIR) -I$(CAPIINC) -Ipppd
+INC = -I$(TOPDIR) -I$(CAPIINC) -I$(PPPINC)
DEFS = -DPPPVER=$(shell $(TOPDIR)/pversion $(PPPVERSION))
MYCFLAGS= -O2 -Wall -fPIC $(DEFS) $(INC) -L$(CAPILIB)
LDFLAGS = -shared -L$(CAPILIB)
View
14 pppdcapiplugin/ppp-2.3.11/Makefile
@@ -1,14 +0,0 @@
-# Makefile for the capiplugin for pppd(8).
-#
-# Copyright 2000 Carsten Paeth (calle@calle.in-berlin.de)
-# Copyright 2000 AVM GmbH Berlin (info@avm.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 of the License, or (at your option) any later version.
-
-PLUGINDIR=${DESTDIR}/usr/lib/pppd/$(PPPVERSION)
-
-include $(TOPDIR)/Rules.make
-
View
6 pppdcapiplugin/ppp-2.3.11/pppd/patchlevel.h
@@ -1,6 +0,0 @@
-/* $Id: patchlevel.h,v 1.2 2001/05/03 09:00:51 calle Exp $ */
-#define PATCHLEVEL 11
-
-#define VERSION "2.3"
-#define IMPLEMENTATION ""
-#define DATE "23 December 1999"
View
671 pppdcapiplugin/ppp-2.3.11/pppd/pppd.h
@@ -1,671 +0,0 @@
-/*
- * pppd.h - PPP daemon global declarations.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id: pppd.h,v 1.2 2001/05/03 09:00:51 calle Exp $
- */
-
-/*
- * TODO:
- */
-
-#ifndef __PPPD_H__
-#define __PPPD_H__
-
-#include <stdio.h> /* for FILE */
-#include <limits.h> /* for NGROUPS_MAX */
-#include <sys/param.h> /* for MAXPATHLEN and BSD4_4, if defined */
-#include <sys/types.h> /* for u_int32_t, if defined */
-#include <sys/time.h> /* for struct timeval */
-#include <net/ppp_defs.h>
-
-#if defined(__STDC__)
-#include <stdarg.h>
-#define __V(x) x
-#else
-#include <varargs.h>
-#define __V(x) (va_alist) va_dcl
-#define const
-#define volatile
-#endif
-
-#ifdef INET6
-#include "eui64.h"
-#endif
-
-/*
- * Limits.
- */
-
-#define NUM_PPP 1 /* One PPP interface supported (per process) */
-#define MAXWORDLEN 1024 /* max length of word in file (incl null) */
-#define MAXARGS 1 /* max # args to a command */
-#define MAXNAMELEN 256 /* max length of hostname or name for auth */
-#define MAXSECRETLEN 256 /* max length of password or secret */
-
-/*
- * Option descriptor structure.
- */
-
-typedef unsigned char bool;
-
-enum opt_type {
- o_special_noarg = 0,
- o_special = 1,
- o_bool,
- o_int,
- o_uint32,
- o_string,
-};
-
-typedef struct {
- char *name; /* name of the option */
- enum opt_type type;
- void *addr;
- char *description;
- int flags;
- void *addr2;
- int upper_limit;
- int lower_limit;
-} option_t;
-
-/* Values for flags */
-#define OPT_VALUE 0xff /* mask for presupplied value */
-#define OPT_HEX 0x100 /* int option is in hex */
-#define OPT_NOARG 0x200 /* option doesn't take argument */
-#define OPT_OR 0x400 /* OR in argument to value */
-#define OPT_INC 0x800 /* increment value */
-#define OPT_PRIV 0x1000 /* privileged option */
-#define OPT_STATIC 0x2000 /* string option goes into static array */
-#define OPT_LLIMIT 0x4000 /* check value against lower limit */
-#define OPT_ULIMIT 0x8000 /* check value against upper limit */
-#define OPT_LIMITS (OPT_LLIMIT|OPT_ULIMIT)
-#define OPT_ZEROOK 0x10000 /* 0 value is OK even if not within limits */
-#define OPT_NOINCR 0x20000 /* value mustn't be increased */
-#define OPT_ZEROINF 0x40000 /* with OPT_NOINCR, 0 == infinity */
-#define OPT_A2INFO 0x100000 /* addr2 -> option_info to update */
-#define OPT_A2COPY 0x200000 /* addr2 -> second location to rcv value */
-#define OPT_ENABLE 0x400000 /* use *addr2 as enable for option */
-#define OPT_PRIVFIX 0x800000 /* can't be overridden if noauth */
-#define OPT_PREPASS 0x1000000 /* do this opt in pre-pass to find device */
-#define OPT_INITONLY 0x2000000 /* option can only be set in init phase */
-#define OPT_DEVEQUIV 0x4000000 /* equiv to device name */
-#define OPT_DEVNAM (OPT_PREPASS | OPT_INITONLY | OPT_DEVEQUIV)
-
-#define OPT_VAL(x) ((x) & OPT_VALUE)
-
-#ifndef GIDSET_TYPE
-#define GIDSET_TYPE gid_t
-#endif
-
-/* Structure representing a list of permitted IP addresses. */
-struct permitted_ip {
- int permit; /* 1 = permit, 0 = forbid */
- u_int32_t base; /* match if (addr & mask) == base */
- u_int32_t mask; /* base and mask are in network byte order */
-};
-
-/*
- * Unfortunately, the linux kernel driver uses a different structure
- * for statistics from the rest of the ports.
- * This structure serves as a common representation for the bits
- * pppd needs.
- */
-struct pppd_stats {
- unsigned int bytes_in;
- unsigned int bytes_out;
-};
-
-/* Used for storing a sequence of words. Usually malloced. */
-struct wordlist {
- struct wordlist *next;
- char *word;
-};
-
-/*
- * Global variables.
- */
-
-extern int hungup; /* Physical layer has disconnected */
-extern int ifunit; /* Interface unit number */
-extern char ifname[]; /* Interface name */
-extern int ttyfd; /* Serial device file descriptor */
-extern char hostname[]; /* Our hostname */
-extern u_char outpacket_buf[]; /* Buffer for outgoing packets */
-extern int phase; /* Current state of link - see values below */
-extern int baud_rate; /* Current link speed in bits/sec */
-extern char *progname; /* Name of this program */
-extern int redirect_stderr;/* Connector's stderr should go to file */
-extern char peer_authname[];/* Authenticated name of peer */
-extern int privileged; /* We were run by real-uid root */
-extern int need_holdoff; /* Need holdoff period after link terminates */
-extern char **script_env; /* Environment variables for scripts */
-extern int detached; /* Have detached from controlling tty */
-extern GIDSET_TYPE groups[NGROUPS_MAX]; /* groups the user is in */
-extern int ngroups; /* How many groups valid in groups */
-extern struct pppd_stats link_stats; /* byte/packet counts etc. for link */
-extern int link_stats_valid; /* set if link_stats is valid */
-extern int link_connect_time; /* time the link was up for */
-extern int using_pty; /* using pty as device (notty or pty opt.) */
-extern int log_to_fd; /* logging to this fd as well as syslog */
-extern char *no_ppp_msg; /* message to print if ppp not in kernel */
-extern volatile int status; /* exit status for pppd */
-extern int devnam_fixed; /* can no longer change devnam */
-extern int unsuccess; /* # unsuccessful connection attempts */
-extern int do_callback; /* set if we want to do callback next */
-extern int doing_callback; /* set if this is a callback */
-
-/* Values for do_callback and doing_callback */
-#define CALLBACK_DIALIN 1 /* we are expecting the call back */
-#define CALLBACK_DIALOUT 2 /* we are dialling out to call back */
-
-/*
- * Variables set by command-line options.
- */
-
-extern int debug; /* Debug flag */
-extern int kdebugflag; /* Tell kernel to print debug messages */
-extern int default_device; /* Using /dev/tty or equivalent */
-extern char devnam[MAXPATHLEN]; /* Device name */
-extern int crtscts; /* Use hardware flow control */
-extern bool modem; /* Use modem control lines */
-extern int inspeed; /* Input/Output speed requested */
-extern u_int32_t netmask; /* IP netmask to set on interface */
-extern bool lockflag; /* Create lock file to lock the serial dev */
-extern bool nodetach; /* Don't detach from controlling tty */
-extern bool updetach; /* Detach from controlling tty when link up */
-extern char *initializer; /* Script to initialize physical link */
-extern char *connect_script; /* Script to establish physical link */
-extern char *disconnect_script; /* Script to disestablish physical link */
-extern char *welcomer; /* Script to welcome client after connection */
-extern char *ptycommand; /* Command to run on other side of pty */
-extern int maxconnect; /* Maximum connect time (seconds) */
-extern char user[MAXNAMELEN];/* Our name for authenticating ourselves */
-extern char passwd[MAXSECRETLEN]; /* Password for PAP or CHAP */
-extern bool auth_required; /* Peer is required to authenticate */
-extern bool persist; /* Reopen link after it goes down */
-extern bool uselogin; /* Use /etc/passwd for checking PAP */
-extern char our_name[MAXNAMELEN];/* Our name for authentication purposes */
-extern char remote_name[MAXNAMELEN]; /* Peer's name for authentication */
-extern bool explicit_remote;/* remote_name specified with remotename opt */
-extern bool demand; /* Do dial-on-demand */
-extern char *ipparam; /* Extra parameter for ip up/down scripts */
-extern bool cryptpap; /* Others' PAP passwords are encrypted */
-extern int idle_time_limit;/* Shut down link if idle for this long */
-extern int holdoff; /* Dead time before restarting */
-extern bool holdoff_specified; /* true if user gave a holdoff value */
-extern bool notty; /* Stdin/out is not a tty */
-extern char *record_file; /* File to record chars sent/received */
-extern bool sync_serial; /* Device is synchronous serial device */
-extern int maxfail; /* Max # of unsuccessful connection attempts */
-extern char linkname[MAXPATHLEN]; /* logical name for link */
-extern bool tune_kernel; /* May alter kernel settings as necessary */
-extern int connect_delay; /* Time to delay after connect script */
-
-#ifdef PPP_FILTER
-extern struct bpf_program pass_filter; /* Filter for pkts to pass */
-extern struct bpf_program active_filter; /* Filter for link-active pkts */
-#endif
-
-#ifdef MSLANMAN
-extern bool ms_lanman; /* Use LanMan password instead of NT */
- /* Has meaning only with MS-CHAP challenges */
-#endif
-
-extern char *current_option; /* the name of the option being parsed */
-extern int privileged_option; /* set iff the current option came from root */
-extern char *option_source; /* string saying where the option came from */
-
-/*
- * Values for phase.
- */
-#define PHASE_DEAD 0
-#define PHASE_INITIALIZE 1
-#define PHASE_SERIALCONN 2
-#define PHASE_DORMANT 3
-#define PHASE_ESTABLISH 4
-#define PHASE_AUTHENTICATE 5
-#define PHASE_CALLBACK 6
-#define PHASE_NETWORK 7
-#define PHASE_RUNNING 8
-#define PHASE_TERMINATE 9
-#define PHASE_DISCONNECT 10
-#define PHASE_HOLDOFF 11
-
-/*
- * The following struct gives the addresses of procedures to call
- * for a particular protocol.
- */
-struct protent {
- u_short protocol; /* PPP protocol number */
- /* Initialization procedure */
- void (*init) __P((int unit));
- /* Process a received packet */
- void (*input) __P((int unit, u_char *pkt, int len));
- /* Process a received protocol-reject */
- void (*protrej) __P((int unit));
- /* Lower layer has come up */
- void (*lowerup) __P((int unit));
- /* Lower layer has gone down */
- void (*lowerdown) __P((int unit));
- /* Open the protocol */
- void (*open) __P((int unit));
- /* Close the protocol */
- void (*close) __P((int unit, char *reason));
- /* Print a packet in readable form */
- int (*printpkt) __P((u_char *pkt, int len,
- void (*printer) __P((void *, char *, ...)),
- void *arg));
- /* Process a received data packet */
- void (*datainput) __P((int unit, u_char *pkt, int len));
- bool enabled_flag; /* 0 iff protocol is disabled */
- char *name; /* Text name of protocol */
- char *data_name; /* Text name of corresponding data protocol */
- option_t *options; /* List of command-line options */
- /* Check requested options, assign defaults */
- void (*check_options) __P((void));
- /* Configure interface for demand-dial */
- int (*demand_conf) __P((int unit));
- /* Say whether to bring up link for this pkt */
- int (*active_pkt) __P((u_char *pkt, int len));
-};
-
-/* Table of pointers to supported protocols */
-extern struct protent *protocols[];
-
-/*
- * Prototypes.
- */
-
-/* Procedures exported from main.c. */
-void detach __P((void)); /* Detach from controlling tty */
-void die __P((int)); /* Cleanup and exit */
-void quit __P((void)); /* like die(1) */
-void novm __P((char *)); /* Say we ran out of memory, and die */
-void timeout __P((void (*func)(void *), void *arg, int t));
- /* Call func(arg) after t seconds */
-void untimeout __P((void (*func)(void *), void *arg));
- /* Cancel call to func(arg) */
-pid_t run_program __P((char *prog, char **args, int must_exist,
- void (*done)(void *), void *arg));
- /* Run program prog with args in child */
-void reopen_log __P((void)); /* (re)open the connection to syslog */
-void update_link_stats __P((int)); /* Get stats at link termination */
-void script_setenv __P((char *, char *)); /* set script env var */
-void script_unsetenv __P((char *)); /* unset script env var */
-void new_phase __P((int)); /* signal start of new phase */
-
-/* Procedures exported from utils.c. */
-void log_packet __P((u_char *, int, char *, int));
- /* Format a packet and log it with syslog */
-void print_string __P((char *, int, void (*) (void *, char *, ...),
- void *)); /* Format a string for output */
-int slprintf __P((char *, int, char *, ...)); /* sprintf++ */
-int vslprintf __P((char *, int, char *, va_list)); /* vsprintf++ */
-size_t strlcpy __P((char *, const char *, size_t)); /* safe strcpy */
-size_t strlcat __P((char *, const char *, size_t)); /* safe strncpy */
-void dbglog __P((char *, ...)); /* log a debug message */
-void info __P((char *, ...)); /* log an informational message */
-void notice __P((char *, ...)); /* log a notice-level message */
-void warn __P((char *, ...)); /* log a warning message */
-void error __P((char *, ...)); /* log an error message */
-void fatal __P((char *, ...)); /* log an error message and die(1) */
-
-/* Procedures exported from auth.c */
-void link_required __P((int)); /* we are starting to use the link */
-void link_terminated __P((int)); /* we are finished with the link */
-void link_down __P((int)); /* the LCP layer has left the Opened state */
-void link_established __P((int)); /* the link is up; authenticate now */