Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 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 1 2 3 4 5 6


isdn.h
001: /* $Id: isdn.h,v 1.125.2.3 2004/02/10 01:07:14 keil Exp $
002:  *
003:  * Main header for the Linux ISDN subsystem (linklevel).
004:  *
005:  * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
006:  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
007:  * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
008:  * 
009:  * This software may be used and distributed according to the terms
010:  * of the GNU General Public License, incorporated herein by reference.
011:  *
012:  */
013: 
014: #ifndef __ISDN_H__
015: #define __ISDN_H__
016: 
017: #include <linux/ioctl.h>
018: 
019: #define ISDN_MAX_DRIVERS    32
020: #define ISDN_MAX_CHANNELS   64
021: 
022: /* New ioctl-codes */
023: #define IIOCNETAIF  _IO('I',1)
024: #define IIOCNETDIF  _IO('I',2)
025: #define IIOCNETSCF  _IO('I',3)
026: #define IIOCNETGCF  _IO('I',4)
027: #define IIOCNETANM  _IO('I',5)
028: #define IIOCNETDNM  _IO('I',6)
029: #define IIOCNETGNM  _IO('I',7)
030: #define IIOCGETSET  _IO('I',8) /* no longer supported */
031: #define IIOCSETSET  _IO('I',9) /* no longer supported */
032: #define IIOCSETVER  _IO('I',10)
033: #define IIOCNETHUP  _IO('I',11)
034: #define IIOCSETGST  _IO('I',12)
035: #define IIOCSETBRJ  _IO('I',13)
036: #define IIOCSIGPRF  _IO('I',14)
037: #define IIOCGETPRF  _IO('I',15)
038: #define IIOCSETPRF  _IO('I',16)
039: #define IIOCGETMAP  _IO('I',17)
040: #define IIOCSETMAP  _IO('I',18)
041: #define IIOCNETASL  _IO('I',19)
042: #define IIOCNETDIL  _IO('I',20)
043: #define IIOCGETCPS  _IO('I',21)
044: #define IIOCGETDVR  _IO('I',22)
045: #define IIOCNETLCR  _IO('I',23) /* dwabc ioctl for LCR from isdnlog */
046: #define IIOCNETDWRSET  _IO('I',24) /* dwabc ioctl to reset abc-values to default on a net-interface */
047: 
048: #define IIOCNETALN  _IO('I',32)
049: #define IIOCNETDLN  _IO('I',33)
050: 
051: #define IIOCNETGPN  _IO('I',34)
052: 
053: #define IIOCDBGVAR  _IO('I',127)
054: 
055: #define IIOCDRVCTL  _IO('I',128)
056: 
057: /* cisco hdlck device private ioctls */
058: #define SIOCGKEEPPERIOD (SIOCDEVPRIVATE + 0)
059: #define SIOCSKEEPPERIOD (SIOCDEVPRIVATE + 1)
060: #define SIOCGDEBSERINT  (SIOCDEVPRIVATE + 2)
061: #define SIOCSDEBSERINT  (SIOCDEVPRIVATE + 3)
062: 
063: /* Packet encapsulations for net-interfaces */
064: #define ISDN_NET_ENCAP_ETHER      0
065: #define ISDN_NET_ENCAP_RAWIP      1
066: #define ISDN_NET_ENCAP_IPTYP      2
067: #define ISDN_NET_ENCAP_CISCOHDLC  3 /* Without SLARP and keepalive */
068: #define ISDN_NET_ENCAP_SYNCPPP    4
069: #define ISDN_NET_ENCAP_UIHDLC     5
070: #define ISDN_NET_ENCAP_CISCOHDLCK 6 /* With SLARP and keepalive    */
071: #define ISDN_NET_ENCAP_X25IFACE   7 /* Documentation/networking/x25-iface.txt */
072: #define ISDN_NET_ENCAP_MAX_ENCAP  ISDN_NET_ENCAP_X25IFACE
073: 
074: /* Facility which currently uses an ISDN-channel */
075: #define ISDN_USAGE_NONE       0
076: #define ISDN_USAGE_RAW        1
077: #define ISDN_USAGE_MODEM      2
078: #define ISDN_USAGE_NET        3
079: #define ISDN_USAGE_VOICE      4
080: #define ISDN_USAGE_FAX        5
081: #define ISDN_USAGE_MASK       7 /* Mask to get plain usage */
082: #define ISDN_USAGE_DISABLED  32 /* This bit is set, if channel is disabled */
083: #define ISDN_USAGE_EXCLUSIVE 64 /* This bit is set, if channel is exclusive */
084: #define ISDN_USAGE_OUTGOING 128 /* This bit is set, if channel is outgoing  */
085: 
086: #define ISDN_MODEM_NUMREG    24        /* Number of Modem-Registers        */
087: #define ISDN_LMSNLEN         255 /* Length of tty's Listen-MSN string */
088: #define ISDN_CMSGLEN         50  /* Length of CONNECT-Message to add for Modem */
089: 
090: #define ISDN_MSNLEN          32
091: #define NET_DV 0x06  /* Data version for isdn_net_ioctl_cfg   */
092: #define TTY_DV 0x06  /* Data version for iprofd etc.          */
093: 
094: #define INF_DV 0x01  /* Data version for /dev/isdninfo        */
095: 
096: typedef struct {
097:   char drvid[25];
098:   unsigned long arg;
099: } isdn_ioctl_struct;
100: 
101: typedef struct {
102:   char name[10];
103:   char phone[ISDN_MSNLEN];
104:   int  outgoing;
105: } isdn_net_ioctl_phone;
106: 
107: typedef struct {
108:   char name[10];     /* Name of interface                     */
109:   char master[10];   /* Name of Master for Bundling           */
110:   char slave[10];    /* Name of Slave for Bundling            */
111:   char eaz[256];     /* EAZ/MSN                               */
112:   char drvid[25];    /* DriverId for Bindings                 */
113:   int  onhtime;      /* Hangup-Timeout                        */
114:   int  charge;       /* Charge-Units                          */
115:   int  l2_proto;     /* Layer-2 protocol                      */
116:   int  l3_proto;     /* Layer-3 protocol                      */
117:   int  p_encap;      /* Encapsulation                         */
118:   int  exclusive;    /* Channel, if bound exclusive           */
119:   int  dialmax;      /* Dial Retry-Counter                    */
120:   int  slavedelay;   /* Delay until slave starts up           */
121:   int  cbdelay;      /* Delay before Callback                 */
122:   int  chargehup;    /* Flag: Charge-Hangup                   */
123:   int  ihup;         /* Flag: Hangup-Timeout on incoming line */
124:   int  secure;       /* Flag: Secure                          */
125:   int  callback;     /* Flag: Callback                        */
126:   int  cbhup;        /* Flag: Reject Call before Callback     */
127:   int  pppbind;      /* ippp device for bindings              */
128:   int  chargeint;    /* Use fixed charge interval length      */
129:   int  triggercps;   /* BogoCPS needed for triggering slave   */
130:   int  dialtimeout;  /* Dial-Timeout                          */
131:   int  dialwait;     /* Time to wait after failed dial        */
132:   int  dialmode;     /* Flag: off / on / auto                 */
133: } isdn_net_ioctl_cfg;
134: 
135: #define ISDN_NET_DIALMODE_MASK  0xC0    /* bits for status                */
136: #define ISDN_NET_DM_OFF         0x00    /* this interface is stopped      */
137: #define ISDN_NET_DM_MANUAL      0x40    /* this interface is on (manual)  */
138: #define ISDN_NET_DM_AUTO        0x80    /* this interface is autodial     */
139: #define ISDN_NET_DIALMODE(x) ((&(x))->flags & ISDN_NET_DIALMODE_MASK)
140: 
141: 
142: #endif /* __ISDN_H__ */
143: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/