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