Merge with Linux 2.4.0-test6-pre9.
[linux-2.6/linux-mips.git] / include / linux / isdnif.h
blob15ebaffcba9d2355c730bd051e28948fb16a9f37
1 /* $Id: isdnif.h,v 1.35 2000/06/16 13:19:38 keil Exp $
3 * Linux ISDN subsystem
5 * Definition of the interface between the subsystem and its low-level drivers.
7 * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
8 * Copyright 1995,96 Thinking Objects Software GmbH Wuerzburg
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2, or (at your option)
13 * any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #ifndef isdnif_h
27 #define isdnif_h
29 #include <linux/config.h>
32 * Values for general protocol-selection
34 #define ISDN_PTYPE_UNKNOWN 0 /* Protocol undefined */
35 #define ISDN_PTYPE_1TR6 1 /* german 1TR6-protocol */
36 #define ISDN_PTYPE_EURO 2 /* EDSS1-protocol */
37 #define ISDN_PTYPE_LEASED 3 /* for leased lines */
38 #define ISDN_PTYPE_NI1 4 /* US NI-1 protocol */
39 #define ISDN_PTYPE_MAX 7 /* Max. 8 Protocols */
42 * Values for Layer-2-protocol-selection
44 #define ISDN_PROTO_L2_X75I 0 /* X75/LAPB with I-Frames */
45 #define ISDN_PROTO_L2_X75UI 1 /* X75/LAPB with UI-Frames */
46 #define ISDN_PROTO_L2_X75BUI 2 /* X75/LAPB with UI-Frames */
47 #define ISDN_PROTO_L2_HDLC 3 /* HDLC */
48 #define ISDN_PROTO_L2_TRANS 4 /* Transparent (Voice) */
49 #define ISDN_PROTO_L2_X25DTE 5 /* X25/LAPB DTE mode */
50 #define ISDN_PROTO_L2_X25DCE 6 /* X25/LAPB DCE mode */
51 #define ISDN_PROTO_L2_V11096 7 /* V.110 bitrate adaption 9600 Baud */
52 #define ISDN_PROTO_L2_V11019 8 /* V.110 bitrate adaption 19200 Baud */
53 #define ISDN_PROTO_L2_V11038 9 /* V.110 bitrate adaption 38400 Baud */
54 #define ISDN_PROTO_L2_MODEM 10 /* Analog Modem on Board */
55 #define ISDN_PROTO_L2_FAX 11 /* Fax Group 2/3 */
56 #define ISDN_PROTO_L2_MAX 15 /* Max. 16 Protocols */
59 * Values for Layer-3-protocol-selection
61 #define ISDN_PROTO_L3_TRANS 0 /* Transparent */
62 #define ISDN_PROTO_L3_TRANSDSP 1 /* Transparent with DSP */
63 #define ISDN_PROTO_L3_FCLASS2 2 /* Fax Group 2/3 CLASS 2 */
64 #define ISDN_PROTO_L3_FCLASS1 3 /* Fax Group 2/3 CLASS 1 */
65 #define ISDN_PROTO_L3_MAX 7 /* Max. 8 Protocols */
67 #ifdef __KERNEL__
69 #include <linux/skbuff.h>
71 /***************************************************************************/
72 /* Extensions made by Werner Cornelius (werner@ikt.de) */
73 /* */
74 /* The proceed command holds a incoming call in a state to leave processes */
75 /* enough time to check whether ist should be accepted. */
76 /* The PROT_IO Command extends the interface to make protocol dependant */
77 /* features available (call diversion, call waiting...). */
78 /* */
79 /* The PROT_IO Command is executed with the desired driver id and the arg */
80 /* parameter coded as follows: */
81 /* The lower 8 bits of arg contain the desired protocol from ISDN_PTYPE */
82 /* definitions. The upper 24 bits represent the protocol specific cmd/stat.*/
83 /* Any additional data is protocol and command specific. */
84 /* This mechanism also applies to the statcallb callback STAT_PROT. */
85 /* */
86 /* This suggested extension permits an easy expansion of protocol specific */
87 /* handling. Extensions may be added at any time without changing the HL */
88 /* driver code and not getting conflicts without certifications. */
89 /* The well known CAPI 2.0 interface handles such extensions in a similar */
90 /* way. Perhaps a protocol specific module may be added and separately */
91 /* loaded and linked to the basic isdn module for handling. */
92 /***************************************************************************/
94 /*****************/
95 /* DSS1 commands */
96 /*****************/
97 #define DSS1_CMD_INVOKE ((0x00 << 8) | ISDN_PTYPE_EURO) /* invoke a supplementary service */
98 #define DSS1_CMD_INVOKE_ABORT ((0x01 << 8) | ISDN_PTYPE_EURO) /* abort a invoke cmd */
100 /*******************************/
101 /* DSS1 Status callback values */
102 /*******************************/
103 #define DSS1_STAT_INVOKE_RES ((0x80 << 8) | ISDN_PTYPE_EURO) /* Result for invocation */
104 #define DSS1_STAT_INVOKE_ERR ((0x81 << 8) | ISDN_PTYPE_EURO) /* Error Return for invocation */
105 #define DSS1_STAT_INVOKE_BRD ((0x82 << 8) | ISDN_PTYPE_EURO) /* Deliver invoke broadcast info */
108 /*********************************************************************/
109 /* structures for DSS1 commands and callback */
110 /* */
111 /* An action is invoked by sending a DSS1_CMD_INVOKE. The ll_id, proc*/
112 /* timeout, datalen and data fields must be set before calling. */
113 /* */
114 /* The return value is a positive hl_id value also delivered in the */
115 /* hl_id field. A value of zero signals no more left hl_id capacitys.*/
116 /* A negative return value signals errors in LL. So if the return */
117 /* value is <= 0 no action in LL will be taken -> request ignored */
118 /* */
119 /* The timeout field must be filled with a positive value specifying */
120 /* the amount of time the INVOKED process waits for a reaction from */
121 /* the network. */
122 /* If a response (either error or result) is received during this */
123 /* intervall, a reporting callback is initiated and the process will */
124 /* be deleted, the hl identifier will be freed. */
125 /* If no response is received during the specified intervall, a error*/
126 /* callback is initiated with timeout set to -1 and a datalen set */
127 /* to 0. */
128 /* If timeout is set to a value <= 0 during INVOCATION the process is*/
129 /* immediately deleted after sending the data. No callback occurs ! */
130 /* */
131 /* A currently waiting process may be aborted with INVOKE_ABORT. No */
132 /* callback will occur when a process has been aborted. */
133 /* */
134 /* Broadcast invoke frames from the network are reported via the */
135 /* STAT_INVOKE_BRD callback. The ll_id is set to 0, the other fields */
136 /* are supplied by the network and not by the HL. */
137 /*********************************************************************/
139 /*****************/
140 /* NI1 commands */
141 /*****************/
142 #define NI1_CMD_INVOKE ((0x00 << 8) | ISDN_PTYPE_NI1) /* invoke a supplementary service */
143 #define NI1_CMD_INVOKE_ABORT ((0x01 << 8) | ISDN_PTYPE_NI1) /* abort a invoke cmd */
145 /*******************************/
146 /* NI1 Status callback values */
147 /*******************************/
148 #define NI1_STAT_INVOKE_RES ((0x80 << 8) | ISDN_PTYPE_NI1) /* Result for invocation */
149 #define NI1_STAT_INVOKE_ERR ((0x81 << 8) | ISDN_PTYPE_NI1) /* Error Return for invocation */
150 #define NI1_STAT_INVOKE_BRD ((0x82 << 8) | ISDN_PTYPE_NI1) /* Deliver invoke broadcast info */
152 typedef struct
153 { ulong ll_id; /* ID supplied by LL when executing */
154 /* a command and returned by HL for */
155 /* INVOKE_RES and INVOKE_ERR */
156 int hl_id; /* ID supplied by HL when called */
157 /* for executing a cmd and delivered */
158 /* for results and errors */
159 /* must be supplied by LL when aborting*/
160 int proc; /* invoke procedure used by CMD_INVOKE */
161 /* returned by callback and broadcast */
162 int timeout; /* timeout for INVOKE CMD in ms */
163 /* -1 in stat callback when timed out */
164 /* error value when error callback */
165 int datalen; /* length of cmd or stat data */
166 u_char *data;/* pointer to data delivered or send */
167 } isdn_cmd_stat;
170 * Commands from linklevel to lowlevel
173 #define ISDN_CMD_IOCTL 0 /* Perform ioctl */
174 #define ISDN_CMD_DIAL 1 /* Dial out */
175 #define ISDN_CMD_ACCEPTD 2 /* Accept an incoming call on D-Chan. */
176 #define ISDN_CMD_ACCEPTB 3 /* Request B-Channel connect. */
177 #define ISDN_CMD_HANGUP 4 /* Hangup */
178 #define ISDN_CMD_CLREAZ 5 /* Clear EAZ(s) of channel */
179 #define ISDN_CMD_SETEAZ 6 /* Set EAZ(s) of channel */
180 #define ISDN_CMD_GETEAZ 7 /* Get EAZ(s) of channel */
181 #define ISDN_CMD_SETSIL 8 /* Set Service-Indicator-List of channel */
182 #define ISDN_CMD_GETSIL 9 /* Get Service-Indicator-List of channel */
183 #define ISDN_CMD_SETL2 10 /* Set B-Chan. Layer2-Parameter */
184 #define ISDN_CMD_GETL2 11 /* Get B-Chan. Layer2-Parameter */
185 #define ISDN_CMD_SETL3 12 /* Set B-Chan. Layer3-Parameter */
186 #define ISDN_CMD_GETL3 13 /* Get B-Chan. Layer3-Parameter */
187 #define ISDN_CMD_LOCK 14 /* Signal usage by upper levels */
188 #define ISDN_CMD_UNLOCK 15 /* Release usage-lock */
189 #define ISDN_CMD_SUSPEND 16 /* Suspend connection */
190 #define ISDN_CMD_RESUME 17 /* Resume connection */
191 #define ISDN_CMD_PROCEED 18 /* Proceed with call establishment */
192 #define ISDN_CMD_ALERT 19 /* Alert after Proceeding */
193 #define ISDN_CMD_REDIR 20 /* Redir a incoming call */
194 #define ISDN_CMD_PROT_IO 21 /* Protocol specific commands */
195 #define CAPI_PUT_MESSAGE 22 /* CAPI message send down or up */
196 #define ISDN_CMD_FAXCMD 23 /* FAX commands to HL-driver */
197 #define ISDN_CMD_AUDIO 24 /* DSP, DTMF, ... settings */
200 * Status-Values delivered from lowlevel to linklevel via
201 * statcallb().
204 #define ISDN_STAT_STAVAIL 256 /* Raw status-data available */
205 #define ISDN_STAT_ICALL 257 /* Incoming call detected */
206 #define ISDN_STAT_RUN 258 /* Signal protocol-code is running */
207 #define ISDN_STAT_STOP 259 /* Signal halt of protocol-code */
208 #define ISDN_STAT_DCONN 260 /* Signal D-Channel connect */
209 #define ISDN_STAT_BCONN 261 /* Signal B-Channel connect */
210 #define ISDN_STAT_DHUP 262 /* Signal D-Channel disconnect */
211 #define ISDN_STAT_BHUP 263 /* Signal B-Channel disconnect */
212 #define ISDN_STAT_CINF 264 /* Charge-Info */
213 #define ISDN_STAT_LOAD 265 /* Signal new lowlevel-driver is loaded */
214 #define ISDN_STAT_UNLOAD 266 /* Signal unload of lowlevel-driver */
215 #define ISDN_STAT_BSENT 267 /* Signal packet sent */
216 #define ISDN_STAT_NODCH 268 /* Signal no D-Channel */
217 #define ISDN_STAT_ADDCH 269 /* Add more Channels */
218 #define ISDN_STAT_CAUSE 270 /* Cause-Message */
219 #define ISDN_STAT_ICALLW 271 /* Incoming call without B-chan waiting */
220 #define ISDN_STAT_REDIR 272 /* Redir result */
221 #define ISDN_STAT_PROT 273 /* protocol IO specific callback */
222 #define ISDN_STAT_DISPLAY 274 /* deliver a received display message */
223 #define ISDN_STAT_L1ERR 275 /* Signal Layer-1 Error */
224 #define ISDN_STAT_FAXIND 276 /* FAX indications from HL-driver */
225 #define ISDN_STAT_AUDIO 277 /* DTMF, DSP indications */
226 #define ISDN_STAT_DISCH 278 /* Disable/Enable channel usage */
229 * Audio commands
231 #define ISDN_AUDIO_SETDD 0 /* Set DTMF detection */
232 #define ISDN_AUDIO_DTMF 1 /* Rx/Tx DTMF */
235 * Values for errcode field
237 #define ISDN_STAT_L1ERR_SEND 1
238 #define ISDN_STAT_L1ERR_RECV 2
241 * Values for feature-field of interface-struct.
243 /* Layer 2 */
244 #define ISDN_FEATURE_L2_X75I (0x0001 << ISDN_PROTO_L2_X75I)
245 #define ISDN_FEATURE_L2_X75UI (0x0001 << ISDN_PROTO_L2_X75UI)
246 #define ISDN_FEATURE_L2_X75BUI (0x0001 << ISDN_PROTO_L2_X75BUI)
247 #define ISDN_FEATURE_L2_HDLC (0x0001 << ISDN_PROTO_L2_HDLC)
248 #define ISDN_FEATURE_L2_TRANS (0x0001 << ISDN_PROTO_L2_TRANS)
249 #define ISDN_FEATURE_L2_X25DTE (0x0001 << ISDN_PROTO_L2_X25DTE)
250 #define ISDN_FEATURE_L2_X25DCE (0x0001 << ISDN_PROTO_L2_X25DCE)
251 #define ISDN_FEATURE_L2_V11096 (0x0001 << ISDN_PROTO_L2_V11096)
252 #define ISDN_FEATURE_L2_V11019 (0x0001 << ISDN_PROTO_L2_V11019)
253 #define ISDN_FEATURE_L2_V11038 (0x0001 << ISDN_PROTO_L2_V11038)
254 #define ISDN_FEATURE_L2_MODEM (0x0001 << ISDN_PROTO_L2_MODEM)
255 #define ISDN_FEATURE_L2_FAX (0x0001 << ISDN_PROTO_L2_FAX)
257 #define ISDN_FEATURE_L2_MASK (0x0FFFF) /* Max. 16 protocols */
258 #define ISDN_FEATURE_L2_SHIFT (0)
260 /* Layer 3 */
261 #define ISDN_FEATURE_L3_TRANS (0x10000 << ISDN_PROTO_L3_TRANS)
262 #define ISDN_FEATURE_L3_TRANSDSP (0x10000 << ISDN_PROTO_L3_TRANSDSP)
263 #define ISDN_FEATURE_L3_FCLASS2 (0x10000 << ISDN_PROTO_L3_FCLASS2)
264 #define ISDN_FEATURE_L3_FCLASS1 (0x10000 << ISDN_PROTO_L3_FCLASS1)
266 #define ISDN_FEATURE_L3_MASK (0x0FF0000) /* Max. 8 Protocols */
267 #define ISDN_FEATURE_L3_SHIFT (16)
269 /* Signaling */
270 #define ISDN_FEATURE_P_UNKNOWN (0x1000000 << ISDN_PTYPE_UNKNOWN)
271 #define ISDN_FEATURE_P_1TR6 (0x1000000 << ISDN_PTYPE_1TR6)
272 #define ISDN_FEATURE_P_EURO (0x1000000 << ISDN_PTYPE_EURO)
273 #define ISDN_FEATURE_P_NI1 (0x1000000 << ISDN_PTYPE_NI1)
275 #define ISDN_FEATURE_P_MASK (0x0FF000000) /* Max. 8 Protocols */
276 #define ISDN_FEATURE_P_SHIFT (24)
278 typedef struct setup_parm {
279 unsigned char phone[32]; /* Remote Phone-Number */
280 unsigned char eazmsn[32]; /* Local EAZ or MSN */
281 unsigned char si1; /* Service Indicator 1 */
282 unsigned char si2; /* Service Indicator 2 */
283 unsigned char plan; /* Numbering plan */
284 unsigned char screen; /* Screening info */
285 } setup_parm;
288 #ifdef CONFIG_ISDN_TTY_FAX
289 /* T.30 Fax G3 */
291 #define FAXIDLEN 21
293 typedef struct T30_s {
294 /* session parameters */
295 __u8 resolution __attribute__ ((packed));
296 __u8 rate __attribute__ ((packed));
297 __u8 width __attribute__ ((packed));
298 __u8 length __attribute__ ((packed));
299 __u8 compression __attribute__ ((packed));
300 __u8 ecm __attribute__ ((packed));
301 __u8 binary __attribute__ ((packed));
302 __u8 scantime __attribute__ ((packed));
303 __u8 id[FAXIDLEN] __attribute__ ((packed));
304 /* additional parameters */
305 __u8 phase __attribute__ ((packed));
306 __u8 direction __attribute__ ((packed));
307 __u8 code __attribute__ ((packed));
308 __u8 badlin __attribute__ ((packed));
309 __u8 badmul __attribute__ ((packed));
310 __u8 bor __attribute__ ((packed));
311 __u8 fet __attribute__ ((packed));
312 __u8 pollid[FAXIDLEN] __attribute__ ((packed));
313 __u8 cq __attribute__ ((packed));
314 __u8 cr __attribute__ ((packed));
315 __u8 ctcrty __attribute__ ((packed));
316 __u8 minsp __attribute__ ((packed));
317 __u8 phcto __attribute__ ((packed));
318 __u8 rel __attribute__ ((packed));
319 __u8 nbc __attribute__ ((packed));
320 /* remote station parameters */
321 __u8 r_resolution __attribute__ ((packed));
322 __u8 r_rate __attribute__ ((packed));
323 __u8 r_width __attribute__ ((packed));
324 __u8 r_length __attribute__ ((packed));
325 __u8 r_compression __attribute__ ((packed));
326 __u8 r_ecm __attribute__ ((packed));
327 __u8 r_binary __attribute__ ((packed));
328 __u8 r_scantime __attribute__ ((packed));
329 __u8 r_id[FAXIDLEN] __attribute__ ((packed));
330 __u8 r_code __attribute__ ((packed));
331 } T30_s;
333 #define ISDN_TTY_FAX_CONN_IN 0
334 #define ISDN_TTY_FAX_CONN_OUT 1
336 #define ISDN_TTY_FAX_FCON 0
337 #define ISDN_TTY_FAX_DIS 1
338 #define ISDN_TTY_FAX_FTT 2
339 #define ISDN_TTY_FAX_MCF 3
340 #define ISDN_TTY_FAX_DCS 4
341 #define ISDN_TTY_FAX_TRAIN_OK 5
342 #define ISDN_TTY_FAX_EOP 6
343 #define ISDN_TTY_FAX_EOM 7
344 #define ISDN_TTY_FAX_MPS 8
345 #define ISDN_TTY_FAX_DTC 9
346 #define ISDN_TTY_FAX_RID 10
347 #define ISDN_TTY_FAX_HNG 11
348 #define ISDN_TTY_FAX_DT 12
349 #define ISDN_TTY_FAX_FCON_I 13
350 #define ISDN_TTY_FAX_DR 14
351 #define ISDN_TTY_FAX_ET 15
352 #define ISDN_TTY_FAX_CFR 16
353 #define ISDN_TTY_FAX_PTS 17
354 #define ISDN_TTY_FAX_SENT 18
356 #define ISDN_FAX_PHASE_IDLE 0
357 #define ISDN_FAX_PHASE_A 1
358 #define ISDN_FAX_PHASE_B 2
359 #define ISDN_FAX_PHASE_C 3
360 #define ISDN_FAX_PHASE_D 4
361 #define ISDN_FAX_PHASE_E 5
363 #endif /* TTY_FAX */
365 #define ISDN_FAX_CLASS1_FAE 0
366 #define ISDN_FAX_CLASS1_FTS 1
367 #define ISDN_FAX_CLASS1_FRS 2
368 #define ISDN_FAX_CLASS1_FTM 3
369 #define ISDN_FAX_CLASS1_FRM 4
370 #define ISDN_FAX_CLASS1_FTH 5
371 #define ISDN_FAX_CLASS1_FRH 6
372 #define ISDN_FAX_CLASS1_CTRL 7
374 #define ISDN_FAX_CLASS1_OK 0
375 #define ISDN_FAX_CLASS1_CONNECT 1
376 #define ISDN_FAX_CLASS1_NOCARR 2
377 #define ISDN_FAX_CLASS1_ERROR 3
378 #define ISDN_FAX_CLASS1_FCERROR 4
379 #define ISDN_FAX_CLASS1_QUERY 5
381 typedef struct {
382 __u8 cmd;
383 __u8 subcmd;
384 __u8 para[50];
385 } aux_s;
387 #define AT_COMMAND 0
388 #define AT_EQ_VALUE 1
389 #define AT_QUERY 2
390 #define AT_EQ_QUERY 3
392 /* CAPI structs */
394 /* this is compatible to the old union size */
395 #define MAX_CAPI_PARA_LEN 50
397 typedef struct {
398 /* Header */
399 __u16 Length;
400 __u16 ApplId;
401 __u8 Command;
402 __u8 Subcommand;
403 __u16 Messagenumber;
405 /* Parameter */
406 union {
407 __u32 Controller;
408 __u32 PLCI;
409 __u32 NCCI;
410 } adr;
411 __u8 para[MAX_CAPI_PARA_LEN];
412 } capi_msg;
415 * Structure for exchanging above infos
418 typedef struct {
419 int driver; /* Lowlevel-Driver-ID */
420 int command; /* Command or Status (see above) */
421 ulong arg; /* Additional Data */
422 union {
423 ulong errcode; /* Type of error with STAT_L1ERR */
424 int length; /* Amount of bytes sent with STAT_BSENT */
425 u_char num[50]; /* Additional Data */
426 setup_parm setup;/* For SETUP msg */
427 capi_msg cmsg; /* For CAPI like messages */
428 char display[85];/* display message data */
429 isdn_cmd_stat isdn_io; /* ISDN IO-parameter/result */
430 aux_s aux; /* for modem commands/indications */
431 #ifdef CONFIG_ISDN_TTY_FAX
432 T30_s *fax; /* Pointer to ttys fax struct */
433 #endif
434 } parm;
435 } isdn_ctrl;
437 #define dss1_io isdn_io
438 #define ni1_io isdn_io
441 * The interface-struct itself (initialized at load-time of lowlevel-driver)
443 * See Documentation/isdn/INTERFACE for a description, how the communication
444 * between the ISDN subsystem and its drivers is done.
447 typedef struct {
448 /* Number of channels supported by this driver
450 int channels;
453 * Maximum Size of transmit/receive-buffer this driver supports.
455 int maxbufsize;
457 /* Feature-Flags for this driver.
458 * See defines ISDN_FEATURE_... for Values
460 unsigned long features;
463 * Needed for calculating
464 * dev->hard_header_len = linklayer header + hl_hdrlen;
465 * Drivers, not supporting sk_buff's should set this to 0.
467 unsigned short hl_hdrlen;
470 * Receive-Callback using sk_buff's
471 * Parameters:
472 * int Driver-ID
473 * int local channel-number (0 ...)
474 * struct sk_buff *skb received Data
476 void (*rcvcallb_skb)(int, int, struct sk_buff *);
478 /* Status-Callback
479 * Parameters:
480 * isdn_ctrl*
481 * driver = Driver ID.
482 * command = One of above ISDN_STAT_... constants.
483 * arg = depending on status-type.
484 * num = depending on status-type.
486 int (*statcallb)(isdn_ctrl*);
488 /* Send command
489 * Parameters:
490 * isdn_ctrl*
491 * driver = Driver ID.
492 * command = One of above ISDN_CMD_... constants.
493 * arg = depending on command.
494 * num = depending on command.
496 int (*command)(isdn_ctrl*);
499 * Send data using sk_buff's
500 * Parameters:
501 * int driverId
502 * int local channel-number (0...)
503 * int Flag: Need ACK for this packet.
504 * struct sk_buff *skb Data to send
506 int (*writebuf_skb) (int, int, int, struct sk_buff *);
508 /* Send raw D-Channel-Commands
509 * Parameters:
510 * u_char pointer data
511 * int length of data
512 * int Flag: 0 = Call form Kernel-Space (use memcpy,
513 * no schedule allowed)
514 * 1 = Data is in User-Space (use memcpy_fromfs,
515 * may schedule)
516 * int driverId
517 * int local channel-number (0 ...)
519 int (*writecmd)(const u_char*, int, int, int, int);
521 /* Read raw Status replies
522 * u_char pointer data (volatile)
523 * int length of buffer
524 * int Flag: 0 = Call form Kernel-Space (use memcpy,
525 * no schedule allowed)
526 * 1 = Data is in User-Space (use memcpy_fromfs,
527 * may schedule)
528 * int driverId
529 * int local channel-number (0 ...)
531 int (*readstat)(u_char*, int, int, int, int);
533 char id[20];
534 } isdn_if;
537 * Function which must be called by lowlevel-driver at loadtime with
538 * the following fields of above struct set:
540 * channels Number of channels that will be supported.
541 * hl_hdrlen Space to preserve in sk_buff's when sending. Drivers, not
542 * supporting sk_buff's should set this to 0.
543 * command Address of Command-Handler.
544 * features Bitwise coded Features of this driver. (use ISDN_FEATURE_...)
545 * writebuf_skb Address of Skbuff-Send-Handler.
546 * writecmd " " D-Channel " which accepts raw D-Ch-Commands.
547 * readstat " " D-Channel " which delivers raw Status-Data.
549 * The linklevel-driver fills the following fields:
551 * channels Driver-ID assigned to this driver. (Must be used on all
552 * subsequent callbacks.
553 * rcvcallb_skb Address of handler for received Skbuff's.
554 * statcallb " " " for status-changes.
557 extern int register_isdn(isdn_if*);
558 #include <asm/uaccess.h>
560 #endif /* __KERNEL__ */
561 #endif /* isdnif_h */