~ubuntu-branches/ubuntu/jaunty/isdnutils/jaunty-proposed

« back to all changes in this revision

Viewing changes to isdnlog/isdnlog/isdnlog.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2004-09-04 08:20:20 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040904082020-g641px056lshw203
Tags: 1:3.3.0.20040728-2
* Put libcapi20 development files into new libcapi20-dev package,
  change libcapi20 soname to libcapi20-3, conflict with existing
  versions of packages depending on libcapi20-3 (closes: #268767).
* Update debconf translation strings (closes: #268716).
* Update french debconf translation (closes: #269666).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: isdnlog.h,v 1.25 2001/06/08 11:55:24 kai Exp $
 
1
/* $Id: isdnlog.h,v 1.28 2004/01/28 14:27:46 tobiasb Exp $
2
2
 *
3
3
 * ISDN accounting for isdn4linux.
4
4
 *
20
20
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
21
 *
22
22
 * $Log: isdnlog.h,v $
 
23
 * Revision 1.28  2004/01/28 14:27:46  tobiasb
 
24
 * Second step in restricting fds at isdnlog restart and script starting.
 
25
 * The fd limit is now taken from getrlimit() instead of NR_OPEN.
 
26
 * Close_Fds(first) which tries to close all possible fds is generally
 
27
 * built in but the execution must be requested with "closefds=yes" in
 
28
 * the parameterfile otherwise the isdnlog behaviour remains unchanged.
 
29
 *
 
30
 * Revision 1.27  2004/01/26 15:20:08  tobiasb
 
31
 * First step to close all unnecessary open file descriptors before
 
32
 * starting a start script as reaction to a call.  The same applies to the
 
33
 * restart of isdnlog using SIGHUP.  Till now each restart increases the
 
34
 * number of used fds.
 
35
 * For now the modifications are inactive by default.  They can be enabled
 
36
 * by adding the line "DEFS += -DFD_AT_EXEC_MODE=1" to ../Makefile.in.
 
37
 * The next isdnlog (4.68) will have this enabled per default.
 
38
 * The upper limit for fd numbers is taken from NR_OPEN in <linux/limits.h>.
 
39
 * If there is a smarter way to access this limit, please let me know.
 
40
 * Another approach would be to set the close-on-exec flag on each fd
 
41
 * directly after it is opened.  This would require more extensive changes.
 
42
 * I'd like to thank Jan Bernhardt for discovering this problem.
 
43
 *
 
44
 * Revision 1.26  2003/08/26 19:46:12  tobiasb
 
45
 * isdnlog-4.66:
 
46
 *  - Added support for AVM B1 (with layer 2 d-channel trace) in point-to-
 
47
 *    point mode, where only TEI 0 is used ("Anlagenanschluss" in German).
 
48
 *    Many thanks to Klaus Heske for his testing efforts.
 
49
 *  - The source number "0" in outgoing calls is now expanded to
 
50
 *    +<country><area>0.  This may be useful for point-to-point setups,
 
51
 *    when <area> contains area code and local number without extension.
 
52
 *  - Basic support for different codesets in (E)DSS1 messages.  Except
 
53
 *    for codeset 0, unknown information elements are now silently
 
54
 *    ignored (controlled by ignore_unknown_IE in isdnlog/isdnlog.h).
 
55
 *  - Added some information elements to isdnlog/messages.c.
 
56
 *  - Increased the length of msn (local number) in struct telnum.
 
57
 *  - Fixed seperation of country and area code for long numbers
 
58
 *    in getDest, tools/dest.c.
 
59
 *  - Changed broken (with gcc 2.95.2) generation of .depend.  The old
 
60
 *    output did not consider the location of objectfiles in subdirs.
 
61
 *    Remove this file before compiling this upgraded isdnlog.
 
62
 *  - Moved DUALFIX... defines from tools/tools.h to isdnlog/isdnlog.h.
 
63
 *  - Added missing R:-Links for cellphone entries in country-de.dat.
 
64
 *  - Different entry for each city "Neustadt" in tools/zone/de/code.
 
65
 *  - Earlier changes since isdnlog-4.65:
 
66
 *     - Allow dualmode workaround 0x100 (DUALFIX_DESTNUM) to work also with
 
67
 *       CALL_PROCEEDING messages for cleaning up unanswered incoming calls.
 
68
 *
23
69
 * Revision 1.25  2001/06/08 11:55:24  kai
24
70
 * fix to compile with newer kernel headers. Maybe someone wants to fix isdnlog to recognize the number of channels at run time?
25
71
 *
369
415
 
370
416
/****************************************************************************/
371
417
 
 
418
#define DUALFIX_DESTNUM    0x100
 
419
#define DUALFIX_SRCNUM     0x200
 
420
#define DUALFIX_MULTLOG    0x400
 
421
 
 
422
/****************************************************************************/
 
423
 
 
424
typedef struct {
 
425
        int     current;
 
426
        int     shift;
 
427
        int     locked;
 
428
} CODESET;
 
429
 
 
430
/****************************************************************************/
 
431
 
372
432
typedef struct _interval {
373
433
        int        event;
374
434
        int        chan;
382
442
#ifdef _ISDNLOG_C_
383
443
#define _EXTERN
384
444
socket_queue *sockets = NULL;
 
445
_EXTERN int     ignore_unknown_IE = 0xFE;    /* codesets 7 to 1 */
 
446
_EXTERN int     param_closefds = 0;
385
447
#else
386
448
#define _EXTERN extern
387
449
extern socket_queue *sockets;
 
450
_EXTERN int     ignore_unknown_IE;
 
451
_EXTERN int     param_closefds;
388
452
#endif
389
453
 
390
454
_EXTERN FILE   *flog;    /* /var/adm/isdn.log          */
533
597
_EXTERN struct timeval *Get_Interval(int Sec);
534
598
_EXTERN int Change_Channel_Ring( int old_channel, int new_channel);
535
599
_EXTERN int Start_Interval(void);
 
600
_EXTERN void Close_Fds( const int first );
536
601
 
537
602
#undef _EXTERN
538
603