pre-2.3.4..
[davej-history.git] / drivers / isdn / isdn_common.h
blob3ba4855b72ae1611543df8c3361ef702fbf22e14
1 /* $Id: isdn_common.h,v 1.15 1999/04/18 14:06:50 fritz Exp $
3 * header for Linux ISDN subsystem, common used functions and debugging-switches (linklevel).
5 * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
6 * Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
7 * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * $Log: isdn_common.h,v $
24 * Revision 1.15 1999/04/18 14:06:50 fritz
25 * Removed TIMRU stuff.
27 * Revision 1.14 1999/04/12 12:33:18 fritz
28 * Changes from 2.0 tree.
30 * Revision 1.13 1999/03/02 12:04:47 armin
31 * -added ISDN_STAT_ADDCH to increase supported channels after
32 * register_isdn().
33 * -ttyI now goes on-hook on ATZ when B-Ch is connected.
34 * -added timer-function for register S7 (Wait for Carrier).
35 * -analog modem (ISDN_PROTO_L2_MODEM) implementations.
36 * -on L2_MODEM a string will be appended to the CONNECT-Message,
37 * which is provided by the HL-Driver in parm.num in ISDN_STAT_BCONN.
38 * -variable "dialing" used for ATA also, for interrupting call
39 * establishment and register S7.
41 * Revision 1.12 1998/06/26 15:12:27 fritz
42 * Added handling of STAT_ICALL with incomplete CPN.
43 * Added AT&L for ttyI emulator.
44 * Added more locking stuff in tty_write.
46 * Revision 1.11 1998/04/14 16:28:47 he
47 * Fixed user space access with interrupts off and remaining
48 * copy_{to,from}_user() -> -EFAULT return codes
50 * Revision 1.10 1998/03/07 18:21:03 cal
51 * Dynamic Timeout-Rule-Handling vs. 971110 included
53 * Revision 1.9 1998/02/20 17:19:01 fritz
54 * Added common stub for sending commands to lowlevel.
56 * Revision 1.8 1997/10/09 21:28:49 fritz
57 * New HL<->LL interface:
58 * New BSENT callback with nr. of bytes included.
59 * Sending without ACK.
60 * New L1 error status (not yet in use).
61 * Cleaned up obsolete structures.
62 * Implemented Cisco-SLARP.
63 * Changed local net-interface data to be dynamically allocated.
64 * Removed old 2.0 compatibility stuff.
66 * Revision 1.7 1997/10/01 09:20:30 fritz
67 * Removed old compatibility stuff for 2.0.X kernels.
68 * From now on, this code is for 2.1.X ONLY!
69 * Old stuff is still in the separate branch.
71 * Revision 1.6 1997/02/28 02:32:44 fritz
72 * Cleanup: Moved some tty related stuff from isdn_common.c
73 * to isdn_tty.c
74 * Bugfix: Bisync protocol did not behave like documented.
76 * Revision 1.5 1997/02/10 10:05:45 fritz
77 * More changes for Kernel 2.1.X
78 * Symbol information moved to isdn_syms.c
80 * Revision 1.4 1997/02/03 22:56:50 fritz
81 * Removed isdn_writebuf_stub prototype.
83 * Revision 1.3 1996/05/19 00:13:05 fritz
84 * Removed debug flag.
86 * Revision 1.2 1996/04/20 16:20:40 fritz
87 * Misc. typos.
89 * Revision 1.1 1996/01/10 21:37:19 fritz
90 * Initial revision
94 #undef ISDN_DEBUG_MODEM_OPEN
95 #undef ISDN_DEBUG_MODEM_IOCTL
96 #undef ISDN_DEBUG_MODEM_WAITSENT
97 #undef ISDN_DEBUG_MODEM_HUP
98 #undef ISDN_DEBUG_MODEM_ICALL
99 #undef ISDN_DEBUG_MODEM_DUMP
100 #undef ISDN_DEBUG_MODEM_VOICE
101 #undef ISDN_DEBUG_AT
102 #undef ISDN_DEBUG_NET_DUMP
103 #undef ISDN_DEBUG_NET_DIAL
104 #undef ISDN_DEBUG_NET_ICALL
106 /* Prototypes */
107 extern void isdn_MOD_INC_USE_COUNT(void);
108 extern void isdn_MOD_DEC_USE_COUNT(void);
109 extern void isdn_free_channel(int di, int ch, int usage);
110 extern void isdn_all_eaz(int di, int ch);
111 extern int isdn_command(isdn_ctrl *);
112 extern int isdn_dc2minor(int di, int ch);
113 extern void isdn_info_update(void);
114 extern char *isdn_map_eaz2msn(char *msn, int di);
115 extern void isdn_timer_ctrl(int tf, int onoff);
116 extern void isdn_unexclusive_channel(int di, int ch);
117 extern int isdn_getnum(char **);
118 #if LINUX_VERSION_CODE < 131841
119 extern int isdn_readbchan(int, int, u_char *, u_char *, int, struct wait_queue**);
120 #else
121 extern int isdn_readbchan(int, int, u_char *, u_char *, int, wait_queue_head_t *);
122 #endif
123 extern int isdn_get_free_channel(int, int, int, int, int);
124 extern int isdn_writebuf_skb_stub(int, int, int, struct sk_buff *);
125 extern int register_isdn(isdn_if * i);
126 extern int isdn_wildmat(char *, char *);
127 extern int isdn_add_channels(driver *, int, int, int);
128 #if defined(ISDN_DEBUG_NET_DUMP) || defined(ISDN_DEBUG_MODEM_DUMP)
129 extern void isdn_dumppkt(char *, u_char *, int, int);
130 #endif