📄 isdn.h
字号:
/* $Id: isdn.h,v 1.32 1997/08/21 09:49:46 fritz Exp $
*
* Main header for the Linux ISDN subsystem (linklevel).
*
* Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
* Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn.h,v $
* Revision 1.32 1997/08/21 09:49:46 fritz
* Increased NET_DV
*
* Revision 1.31 1997/06/22 11:57:07 fritz
* Added ability to adjust slave triggerlevel.
*
* Revision 1.30 1997/06/17 13:07:23 hipp
* compression changes , MP changes
*
* Revision 1.29 1997/05/27 15:18:02 fritz
* Added changes for recent 2.1.x kernels:
* changed return type of isdn_close
* queue_task_* -> queue_task
* clear/set_bit -> test_and_... where apropriate.
* changed type of hard_header_cache parameter.
*
* Revision 1.28 1997/03/07 01:33:01 fritz
* Added proper ifdef's for CONFIG_ISDN_AUDIO
*
* Revision 1.27 1997/03/05 21:11:49 fritz
* Minor fixes.
*
* Revision 1.26 1997/02/28 02:37:53 fritz
* Added some comments.
*
* Revision 1.25 1997/02/23 16:54:23 hipp
* some initial changes for future PPP compresion
*
* Revision 1.24 1997/02/18 09:42:45 fritz
* Bugfix: Increased ISDN_MODEM_ANZREG.
* Increased TTY_DV.
*
* Revision 1.23 1997/02/10 22:07:13 fritz
* Added 2 modem registers for numbering plan and screening info.
*
* Revision 1.22 1997/02/03 23:42:08 fritz
* Added ISDN_TIMER_RINGING
* Misc. changes for Kernel 2.1.X compatibility
*
* Revision 1.21 1997/01/17 01:19:10 fritz
* Applied chargeint patch.
*
* Revision 1.20 1997/01/17 00:41:19 fritz
* Increased TTY_DV.
*
* Revision 1.19 1997/01/14 01:41:07 fritz
* Added ATI2 related variables.
* Added variables for audio support in skbuffs.
*
* Revision 1.18 1996/11/06 17:37:50 keil
* more changes for 2.1.X
*
* Revision 1.17 1996/09/07 12:53:57 hipp
* moved a few isdn_ppp.c specific defines to drives/isdn/isdn_ppp.h
*
* Revision 1.16 1996/08/12 16:20:56 hipp
* renamed ppp_minor to ppp_slot
*
* Revision 1.15 1996/06/15 14:56:57 fritz
* Added version signatures for data structures used
* by userlevel programs.
*
* Revision 1.14 1996/06/06 21:24:23 fritz
* Started adding support for suspend/resume.
*
* Revision 1.13 1996/06/05 02:18:20 fritz
* Added DTMF decoding stuff.
*
* Revision 1.12 1996/06/03 19:55:08 fritz
* Fixed typos.
*
* Revision 1.11 1996/05/31 01:37:47 fritz
* Minor changes, due to changes in isdn_tty.c
*
* Revision 1.10 1996/05/18 01:37:18 fritz
* Added spelling corrections and some minor changes
* to stay in sync with kernel.
*
* Revision 1.9 1996/05/17 03:58:20 fritz
* Added flags for DLE handling.
*
* Revision 1.8 1996/05/11 21:49:55 fritz
* Removed queue management variables.
* Changed queue management to use sk_buffs.
*
* Revision 1.7 1996/05/07 09:10:06 fritz
* Reorganized tty-related structs.
*
* Revision 1.6 1996/05/06 11:38:27 hipp
* minor change in ippp struct
*
* Revision 1.5 1996/04/30 11:03:16 fritz
* Added Michael's ippp-bind patch.
*
* Revision 1.4 1996/04/29 23:00:02 fritz
* Added variables for voice-support.
*
* Revision 1.3 1996/04/20 16:54:58 fritz
* Increased maximum number of channels.
* Added some flags for isdn_net to handle callback more reliable.
* Fixed delay-definitions to be more accurate.
* Misc. typos
*
* Revision 1.2 1996/02/11 02:10:02 fritz
* Changed IOCTL-names
* Added rx_netdev, st_netdev, first_skb, org_hcb, and org_hcu to
* Netdevice-local struct.
*
* Revision 1.1 1996/01/10 20:55:07 fritz
* Initial revision
*
*/
#ifndef isdn_h
#define isdn_h
#include <linux/ioctl.h>
#define ISDN_TTY_MAJOR 43
#define ISDN_TTYAUX_MAJOR 44
#define ISDN_MAJOR 45
/* The minor-devicenumbers for Channel 0 and 1 are used as arguments for
* physical Channel-Mapping, so they MUST NOT be changed without changing
* the correspondent code in isdn.c
*/
#define ISDN_MAX_DRIVERS 32
#define ISDN_MAX_CHANNELS 64
#define ISDN_MINOR_B 0
#define ISDN_MINOR_BMAX (ISDN_MAX_CHANNELS-1)
#define ISDN_MINOR_CTRL ISDN_MAX_CHANNELS
#define ISDN_MINOR_CTRLMAX (2*ISDN_MAX_CHANNELS-1)
#define ISDN_MINOR_PPP (2*ISDN_MAX_CHANNELS)
#define ISDN_MINOR_PPPMAX (3*ISDN_MAX_CHANNELS-1)
#define ISDN_MINOR_STATUS 255
/* New ioctl-codes */
#define IIOCNETAIF _IO('I',1)
#define IIOCNETDIF _IO('I',2)
#define IIOCNETSCF _IO('I',3)
#define IIOCNETGCF _IO('I',4)
#define IIOCNETANM _IO('I',5)
#define IIOCNETDNM _IO('I',6)
#define IIOCNETGNM _IO('I',7)
#define IIOCGETSET _IO('I',8)
#define IIOCSETSET _IO('I',9)
#define IIOCSETVER _IO('I',10)
#define IIOCNETHUP _IO('I',11)
#define IIOCSETGST _IO('I',12)
#define IIOCSETBRJ _IO('I',13)
#define IIOCSIGPRF _IO('I',14)
#define IIOCGETPRF _IO('I',15)
#define IIOCSETPRF _IO('I',16)
#define IIOCGETMAP _IO('I',17)
#define IIOCSETMAP _IO('I',18)
#define IIOCNETASL _IO('I',19)
#define IIOCNETDIL _IO('I',20)
#define IIOCGETCPS _IO('I',21)
#define IIOCGETDVR _IO('I',22)
#define IIOCNETALN _IO('I',32)
#define IIOCNETDLN _IO('I',33)
#define IIOCDBGVAR _IO('I',127)
#define IIOCDRVCTL _IO('I',128)
/* Packet encapsulations for net-interfaces */
#define ISDN_NET_ENCAP_ETHER 0
#define ISDN_NET_ENCAP_RAWIP 1
#define ISDN_NET_ENCAP_IPTYP 2
#define ISDN_NET_ENCAP_CISCOHDLC 3
#define ISDN_NET_ENCAP_SYNCPPP 4
#define ISDN_NET_ENCAP_UIHDLC 5
/* Facility which currently uses an ISDN-channel */
#define ISDN_USAGE_NONE 0
#define ISDN_USAGE_RAW 1
#define ISDN_USAGE_MODEM 2
#define ISDN_USAGE_NET 3
#define ISDN_USAGE_VOICE 4
#define ISDN_USAGE_FAX 5
#define ISDN_USAGE_MASK 7 /* Mask to get plain usage */
#define ISDN_USAGE_EXCLUSIVE 64 /* This bit is set, if channel is exclusive */
#define ISDN_USAGE_OUTGOING 128 /* This bit is set, if channel is outgoing */
#define ISDN_MODEM_ANZREG 23 /* Number of Modem-Registers */
#define ISDN_MSNLEN 20
typedef struct {
char drvid[25];
unsigned long arg;
} isdn_ioctl_struct;
typedef struct {
unsigned long isdndev;
unsigned long atmodem[ISDN_MAX_CHANNELS];
unsigned long info[ISDN_MAX_CHANNELS];
} debugvar_addr;
typedef struct {
char name[10];
char phone[ISDN_MSNLEN];
int outgoing;
} isdn_net_ioctl_phone;
#define NET_DV 0x04 /* Data version for net_cfg */
#define TTY_DV 0x04 /* Data version for iprofd etc. */
typedef struct {
char name[10]; /* Name of interface */
char master[10]; /* Name of Master for Bundling */
char slave[10]; /* Name of Slave for Bundling */
char eaz[256]; /* EAZ/MSN */
char drvid[25]; /* DriverId for Bindings */
int onhtime; /* Hangup-Timeout */
int charge; /* Charge-Units */
int l2_proto; /* Layer-2 protocol */
int l3_proto; /* Layer-3 protocol */
int p_encap; /* Encapsulation */
int exclusive; /* Channel, if bound exclusive */
int dialmax; /* Dial Retry-Counter */
int slavedelay; /* Delay until slave starts up */
int cbdelay; /* Delay before Callback */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -