Go to the documentation of this file.
17 #include <linux/errno.h>
21 #include <linux/kernel.h>
22 #include <linux/signal.h>
23 #include <linux/slab.h>
25 #include <linux/wait.h>
26 #include <linux/tty.h>
29 #include <linux/fcntl.h>
30 #include <linux/types.h>
34 #include <linux/netdevice.h>
37 #include <linux/tcp.h>
41 #define ISDN_TTY_MAJOR 43
42 #define ISDN_TTYAUX_MAJOR 44
50 #define ISDN_MINOR_B 0
51 #define ISDN_MINOR_BMAX (ISDN_MAX_CHANNELS-1)
52 #define ISDN_MINOR_CTRL 64
53 #define ISDN_MINOR_CTRLMAX (64 + (ISDN_MAX_CHANNELS-1))
54 #define ISDN_MINOR_PPP 128
55 #define ISDN_MINOR_PPPMAX (128 + (ISDN_MAX_CHANNELS-1))
56 #define ISDN_MINOR_STATUS 255
58 #ifdef CONFIG_ISDN_PPP
60 #ifdef CONFIG_ISDN_PPP_VJ
64 #include <linux/ppp_defs.h>
67 #include <linux/isdn_ppp.h>
70 #ifdef CONFIG_ISDN_X25
74 #include <linux/isdnif.h>
76 #define ISDN_DRVIOCTL_MASK 0x7f
79 #define ISDN_SERVICE_VOICE 1
80 #define ISDN_SERVICE_AB 1<<1
81 #define ISDN_SERVICE_X21 1<<2
82 #define ISDN_SERVICE_G4 1<<3
83 #define ISDN_SERVICE_BTX 1<<4
84 #define ISDN_SERVICE_DFUE 1<<5
85 #define ISDN_SERVICE_X25 1<<6
86 #define ISDN_SERVICE_TTX 1<<7
87 #define ISDN_SERVICE_MIXED 1<<8
88 #define ISDN_SERVICE_FW 1<<9
89 #define ISDN_SERVICE_GTEL 1<<10
90 #define ISDN_SERVICE_BTXN 1<<11
91 #define ISDN_SERVICE_BTEL 1<<12
94 #define USG_NONE(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_NONE)
95 #define USG_RAW(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_RAW)
96 #define USG_MODEM(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_MODEM)
97 #define USG_VOICE(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_VOICE)
98 #define USG_NET(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_NET)
99 #define USG_FAX(x) ((x & ISDN_USAGE_MASK)==ISDN_USAGE_FAX)
100 #define USG_OUTGOING(x) ((x & ISDN_USAGE_OUTGOING)==ISDN_USAGE_OUTGOING)
101 #define USG_MODEMORVOICE(x) (((x & ISDN_USAGE_MASK)==ISDN_USAGE_MODEM) || \
102 ((x & ISDN_USAGE_MASK)==ISDN_USAGE_VOICE) )
105 #define ISDN_TIMER_RES 4
106 #define ISDN_TIMER_02SEC (HZ/ISDN_TIMER_RES/5)
107 #define ISDN_TIMER_1SEC (HZ/ISDN_TIMER_RES)
108 #define ISDN_TIMER_RINGING 5
109 #define ISDN_TIMER_KEEPINT 10
110 #define ISDN_TIMER_MODEMREAD 1
111 #define ISDN_TIMER_MODEMPLUS 2
112 #define ISDN_TIMER_MODEMRING 4
113 #define ISDN_TIMER_MODEMXMIT 8
114 #define ISDN_TIMER_NETDIAL 16
115 #define ISDN_TIMER_NETHANGUP 32
116 #define ISDN_TIMER_CARRIER 256
117 #define ISDN_TIMER_FAST (ISDN_TIMER_MODEMREAD | ISDN_TIMER_MODEMPLUS | \
118 ISDN_TIMER_MODEMXMIT)
119 #define ISDN_TIMER_SLOW (ISDN_TIMER_MODEMRING | ISDN_TIMER_NETHANGUP | \
120 ISDN_TIMER_NETDIAL | ISDN_TIMER_CARRIER)
123 #define ISDN_TIMER_DTIMEOUT10 (10*HZ/(ISDN_TIMER_02SEC*(ISDN_TIMER_RES+1)))
124 #define ISDN_TIMER_DTIMEOUT15 (15*HZ/(ISDN_TIMER_02SEC*(ISDN_TIMER_RES+1)))
125 #define ISDN_TIMER_DTIMEOUT60 (60*HZ/(ISDN_TIMER_02SEC*(ISDN_TIMER_RES+1)))
128 #define ISDN_GLOBAL_STOPPED 1
133 #define ISDN_NET_CONNECTED 0x01
134 #define ISDN_NET_SECURE 0x02
135 #define ISDN_NET_CALLBACK 0x04
136 #define ISDN_NET_CBHUP 0x08
137 #define ISDN_NET_CBOUT 0x10
139 #define ISDN_NET_MAGIC 0x49344C02
231 #ifdef CONFIG_ISDN_X25
255 #ifdef CONFIG_ISDN_PPP
259 #ifdef CONFIG_ISDN_X25
269 #define ISDN_ASYNC_MAGIC 0x49344C01
270 #define ISDN_SERIAL_XMIT_SIZE 1024
271 #define ISDN_SERIAL_XMIT_MAX 4000
273 #ifdef CONFIG_ISDN_AUDIO
279 typedef struct _isdn_audio_data {
280 unsigned short dle_count;
284 #define ISDN_AUDIO_SKB_DLECOUNT(skb) (((isdn_audio_data_t *)&skb->cb[0])->dle_count)
285 #define ISDN_AUDIO_SKB_LOCK(skb) (((isdn_audio_data_t *)&skb->cb[0])->lock)
298 #ifdef CONFIG_ISDN_AUDIO
340 #ifdef CONFIG_ISDN_AUDIO
351 #ifdef CONFIG_ISDN_TTY_FAX
359 #define ISDN_MODEM_WINSIZE 8
374 #define V110_BUFSIZE 1024
405 #define DRV_FLAG_RUNNING 1
406 #define DRV_FLAG_REJBUS 2
407 #define DRV_FLAG_LOADED 4
422 #ifdef CONFIG_ISDN_AUDIO
423 unsigned long DLEflag;