6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
|
#ifndef __ISDNIF_H__
#define __ISDNIF_H__
#include <linux/skbuff.h>
#include <uapi/linux/isdnif.h>
#define DSS1_CMD_INVOKE ((0x00 << 8) | ISDN_PTYPE_EURO) /* invoke a supplementary service */
#define DSS1_CMD_INVOKE_ABORT ((0x01 << 8) | ISDN_PTYPE_EURO) /* abort a invoke cmd */
#define DSS1_STAT_INVOKE_RES ((0x80 << 8) | ISDN_PTYPE_EURO) /* Result for invocation */
#define DSS1_STAT_INVOKE_ERR ((0x81 << 8) | ISDN_PTYPE_EURO) /* Error Return for invocation */
#define DSS1_STAT_INVOKE_BRD ((0x82 << 8) | ISDN_PTYPE_EURO) /* Deliver invoke broadcast info */
#define NI1_CMD_INVOKE ((0x00 << 8) | ISDN_PTYPE_NI1) /* invoke a supplementary service */
#define NI1_CMD_INVOKE_ABORT ((0x01 << 8) | ISDN_PTYPE_NI1) /* abort a invoke cmd */
#define NI1_STAT_INVOKE_RES ((0x80 << 8) | ISDN_PTYPE_NI1) /* Result for invocation */
#define NI1_STAT_INVOKE_ERR ((0x81 << 8) | ISDN_PTYPE_NI1) /* Error Return for invocation */
#define NI1_STAT_INVOKE_BRD ((0x82 << 8) | ISDN_PTYPE_NI1) /* Deliver invoke broadcast info */
typedef struct
{ ulong ll_id;
int hl_id;
int proc;
int timeout;
int datalen;
u_char *data;
} isdn_cmd_stat;
#define ISDN_CMD_IOCTL 0 /* Perform ioctl */
#define ISDN_CMD_DIAL 1 /* Dial out */
#define ISDN_CMD_ACCEPTD 2 /* Accept an incoming call on D-Chan. */
#define ISDN_CMD_ACCEPTB 3 /* Request B-Channel connect. */
#define ISDN_CMD_HANGUP 4 /* Hangup */
#define ISDN_CMD_CLREAZ 5 /* Clear EAZ(s) of channel */
#define ISDN_CMD_SETEAZ 6 /* Set EAZ(s) of channel */
#define ISDN_CMD_GETEAZ 7 /* Get EAZ(s) of channel */
#define ISDN_CMD_SETSIL 8 /* Set Service-Indicator-List of channel */
#define ISDN_CMD_GETSIL 9 /* Get Service-Indicator-List of channel */
#define ISDN_CMD_SETL2 10 /* Set B-Chan. Layer2-Parameter */
#define ISDN_CMD_GETL2 11 /* Get B-Chan. Layer2-Parameter */
#define ISDN_CMD_SETL3 12 /* Set B-Chan. Layer3-Parameter */
#define ISDN_CMD_GETL3 13 /* Get B-Chan. Layer3-Parameter */
#define ISDN_CMD_SUSPEND 16 /* Suspend connection */
#define ISDN_CMD_RESUME 17 /* Resume connection */
#define ISDN_CMD_PROCEED 18 /* Proceed with call establishment */
#define ISDN_CMD_ALERT 19 /* Alert after Proceeding */
#define ISDN_CMD_REDIR 20 /* Redir a incoming call */
#define ISDN_CMD_PROT_IO 21 /* Protocol specific commands */
#define CAPI_PUT_MESSAGE 22 /* CAPI message send down or up */
#define ISDN_CMD_FAXCMD 23 /* FAX commands to HL-driver */
#define ISDN_CMD_AUDIO 24 /* DSP, DTMF, ... settings */
#define ISDN_STAT_STAVAIL 256 /* Raw status-data available */
#define ISDN_STAT_ICALL 257 /* Incoming call detected */
#define ISDN_STAT_RUN 258 /* Signal protocol-code is running */
#define ISDN_STAT_STOP 259 /* Signal halt of protocol-code */
#define ISDN_STAT_DCONN 260 /* Signal D-Channel connect */
#define ISDN_STAT_BCONN 261 /* Signal B-Channel connect */
#define ISDN_STAT_DHUP 262 /* Signal D-Channel disconnect */
#define ISDN_STAT_BHUP 263 /* Signal B-Channel disconnect */
#define ISDN_STAT_CINF 264 /* Charge-Info */
#define ISDN_STAT_LOAD 265 /* Signal new lowlevel-driver is loaded */
#define ISDN_STAT_UNLOAD 266 /* Signal unload of lowlevel-driver */
#define ISDN_STAT_BSENT 267 /* Signal packet sent */
#define ISDN_STAT_NODCH 268 /* Signal no D-Channel */
#define ISDN_STAT_ADDCH 269 /* Add more Channels */
#define ISDN_STAT_CAUSE 270 /* Cause-Message */
#define ISDN_STAT_ICALLW 271 /* Incoming call without B-chan waiting */
#define ISDN_STAT_REDIR 272 /* Redir result */
#define ISDN_STAT_PROT 273 /* protocol IO specific callback */
#define ISDN_STAT_DISPLAY 274 /* deliver a received display message */
#define ISDN_STAT_L1ERR 275 /* Signal Layer-1 Error */
#define ISDN_STAT_FAXIND 276 /* FAX indications from HL-driver */
#define ISDN_STAT_AUDIO 277 /* DTMF, DSP indications */
#define ISDN_STAT_DISCH 278 /* Disable/Enable channel usage */
#define ISDN_AUDIO_SETDD 0 /* Set DTMF detection */
#define ISDN_AUDIO_DTMF 1 /* Rx/Tx DTMF */
#define ISDN_STAT_L1ERR_SEND 1
#define ISDN_STAT_L1ERR_RECV 2
#define ISDN_FEATURE_L2_X75I (0x0001 << ISDN_PROTO_L2_X75I)
#define ISDN_FEATURE_L2_X75UI (0x0001 << ISDN_PROTO_L2_X75UI)
#define ISDN_FEATURE_L2_X75BUI (0x0001 << ISDN_PROTO_L2_X75BUI)
#define ISDN_FEATURE_L2_HDLC (0x0001 << ISDN_PROTO_L2_HDLC)
#define ISDN_FEATURE_L2_TRANS (0x0001 << ISDN_PROTO_L2_TRANS)
#define ISDN_FEATURE_L2_X25DTE (0x0001 << ISDN_PROTO_L2_X25DTE)
#define ISDN_FEATURE_L2_X25DCE (0x0001 << ISDN_PROTO_L2_X25DCE)
#define ISDN_FEATURE_L2_V11096 (0x0001 << ISDN_PROTO_L2_V11096)
#define ISDN_FEATURE_L2_V11019 (0x0001 << ISDN_PROTO_L2_V11019)
#define ISDN_FEATURE_L2_V11038 (0x0001 << ISDN_PROTO_L2_V11038)
#define ISDN_FEATURE_L2_MODEM (0x0001 << ISDN_PROTO_L2_MODEM)
#define ISDN_FEATURE_L2_FAX (0x0001 << ISDN_PROTO_L2_FAX)
#define ISDN_FEATURE_L2_HDLC_56K (0x0001 << ISDN_PROTO_L2_HDLC_56K)
#define ISDN_FEATURE_L2_MASK (0x0FFFF) /* Max. 16 protocols */
#define ISDN_FEATURE_L2_SHIFT (0)
#define ISDN_FEATURE_L3_TRANS (0x10000 << ISDN_PROTO_L3_TRANS)
#define ISDN_FEATURE_L3_TRANSDSP (0x10000 << ISDN_PROTO_L3_TRANSDSP)
#define ISDN_FEATURE_L3_FCLASS2 (0x10000 << ISDN_PROTO_L3_FCLASS2)
#define ISDN_FEATURE_L3_FCLASS1 (0x10000 << ISDN_PROTO_L3_FCLASS1)
#define ISDN_FEATURE_L3_MASK (0x0FF0000) /* Max. 8 Protocols */
#define ISDN_FEATURE_L3_SHIFT (16)
#define ISDN_FEATURE_P_UNKNOWN (0x1000000 << ISDN_PTYPE_UNKNOWN)
#define ISDN_FEATURE_P_1TR6 (0x1000000 << ISDN_PTYPE_1TR6)
#define ISDN_FEATURE_P_EURO (0x1000000 << ISDN_PTYPE_EURO)
#define ISDN_FEATURE_P_NI1 (0x1000000 << ISDN_PTYPE_NI1)
#define ISDN_FEATURE_P_MASK (0x0FF000000) /* Max. 8 Protocols */
#define ISDN_FEATURE_P_SHIFT (24)
typedef struct setup_parm {
unsigned char phone[32];
unsigned char eazmsn[32];
unsigned char si1;
unsigned char si2;
unsigned char plan;
unsigned char screen;
} setup_parm;
#ifdef CONFIG_ISDN_TTY_FAX
#define FAXIDLEN 21
typedef struct T30_s {
__u8 resolution;
__u8 rate;
__u8 width;
__u8 length;
__u8 compression;
__u8 ecm;
__u8 binary;
__u8 scantime;
__u8 id[FAXIDLEN];
__u8 phase;
__u8 direction;
__u8 code;
__u8 badlin;
__u8 badmul;
__u8 bor;
__u8 fet;
__u8 pollid[FAXIDLEN];
__u8 cq;
__u8 cr;
__u8 ctcrty;
__u8 minsp;
__u8 phcto;
__u8 rel;
__u8 nbc;
__u8 r_resolution;
__u8 r_rate;
__u8 r_width;
__u8 r_length;
__u8 r_compression;
__u8 r_ecm;
__u8 r_binary;
__u8 r_scantime;
__u8 r_id[FAXIDLEN];
__u8 r_code;
} __packed T30_s;
#define ISDN_TTY_FAX_CONN_IN 0
#define ISDN_TTY_FAX_CONN_OUT 1
#define ISDN_TTY_FAX_FCON 0
#define ISDN_TTY_FAX_DIS 1
#define ISDN_TTY_FAX_FTT 2
#define ISDN_TTY_FAX_MCF 3
#define ISDN_TTY_FAX_DCS 4
#define ISDN_TTY_FAX_TRAIN_OK 5
#define ISDN_TTY_FAX_EOP 6
#define ISDN_TTY_FAX_EOM 7
#define ISDN_TTY_FAX_MPS 8
#define ISDN_TTY_FAX_DTC 9
#define ISDN_TTY_FAX_RID 10
#define ISDN_TTY_FAX_HNG 11
#define ISDN_TTY_FAX_DT 12
#define ISDN_TTY_FAX_FCON_I 13
#define ISDN_TTY_FAX_DR 14
#define ISDN_TTY_FAX_ET 15
#define ISDN_TTY_FAX_CFR 16
#define ISDN_TTY_FAX_PTS 17
#define ISDN_TTY_FAX_SENT 18
#define ISDN_FAX_PHASE_IDLE 0
#define ISDN_FAX_PHASE_A 1
#define ISDN_FAX_PHASE_B 2
#define ISDN_FAX_PHASE_C 3
#define ISDN_FAX_PHASE_D 4
#define ISDN_FAX_PHASE_E 5
#endif /* TTY_FAX */
#define ISDN_FAX_CLASS1_FAE 0
#define ISDN_FAX_CLASS1_FTS 1
#define ISDN_FAX_CLASS1_FRS 2
#define ISDN_FAX_CLASS1_FTM 3
#define ISDN_FAX_CLASS1_FRM 4
#define ISDN_FAX_CLASS1_FTH 5
#define ISDN_FAX_CLASS1_FRH 6
#define ISDN_FAX_CLASS1_CTRL 7
#define ISDN_FAX_CLASS1_OK 0
#define ISDN_FAX_CLASS1_CONNECT 1
#define ISDN_FAX_CLASS1_NOCARR 2
#define ISDN_FAX_CLASS1_ERROR 3
#define ISDN_FAX_CLASS1_FCERROR 4
#define ISDN_FAX_CLASS1_QUERY 5
typedef struct {
__u8 cmd;
__u8 subcmd;
__u8 para[50];
} aux_s;
#define AT_COMMAND 0
#define AT_EQ_VALUE 1
#define AT_QUERY 2
#define AT_EQ_QUERY 3
#define MAX_CAPI_PARA_LEN 50
typedef struct {
__u16 Length;
__u16 ApplId;
__u8 Command;
__u8 Subcommand;
__u16 Messagenumber;
union {
__u32 Controller;
__u32 PLCI;
__u32 NCCI;
} adr;
__u8 para[MAX_CAPI_PARA_LEN];
} capi_msg;
typedef struct {
int driver;
int command;
ulong arg;
union {
ulong errcode;
int length;
u_char num[50];
setup_parm setup;
capi_msg cmsg;
char display[85];
isdn_cmd_stat isdn_io;
aux_s aux;
#ifdef CONFIG_ISDN_TTY_FAX
T30_s *fax;
#endif
ulong userdata;
} parm;
} isdn_ctrl;
#define dss1_io isdn_io
#define ni1_io isdn_io
typedef struct {
struct module *owner;
int channels;
int maxbufsize;
unsigned long features;
unsigned short hl_hdrlen;
void (*rcvcallb_skb)(int, int, struct sk_buff *);
int (*statcallb)(isdn_ctrl*);
int (*command)(isdn_ctrl*);
int (*writebuf_skb) (int, int, int, struct sk_buff *);
int (*writecmd)(const u_char __user *, int, int, int);
int (*readstat)(u_char __user *, int, int, int);
char id[20];
} isdn_if;
extern int register_isdn(isdn_if*);
#include <asm/uaccess.h>
#endif /* __ISDNIF_H__ */
|