source: svn/trunk/newcon3bcm2_21bu/toolchain/mipsel-linux-uclibc/include/linux/isdn.h @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 5.6 KB
Line 
1/*
2 *
3 * Main header for the Linux ISDN subsystem (linklevel).
4 *
5 * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
6 * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
7 * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
8 *
9 * This software may be used and distributed according to the terms
10 * of the GNU General Public License, incorporated herein by reference.
11 *
12 */
13
14#ifndef __ISDN_H__
15#define __ISDN_H__
16
17#include <linux/ioctl.h>
18
19#if 0 && defined(CONFIG_COBALT_MICRO_SERVER)
20/* Save memory */
21#define ISDN_MAX_DRIVERS    2
22#define ISDN_MAX_CHANNELS   8
23#else
24#define ISDN_MAX_DRIVERS    32
25#define ISDN_MAX_CHANNELS   64
26#endif
27
28/* New ioctl-codes */
29#define IIOCNETAIF  _IO('I',1)
30#define IIOCNETDIF  _IO('I',2)
31#define IIOCNETSCF  _IO('I',3)
32#define IIOCNETGCF  _IO('I',4)
33#define IIOCNETANM  _IO('I',5)
34#define IIOCNETDNM  _IO('I',6)
35#define IIOCNETGNM  _IO('I',7)
36#define IIOCGETSET  _IO('I',8) /* no longer supported */
37#define IIOCSETSET  _IO('I',9) /* no longer supported */
38#define IIOCSETVER  _IO('I',10)
39#define IIOCNETHUP  _IO('I',11)
40#define IIOCSETGST  _IO('I',12)
41#define IIOCSETBRJ  _IO('I',13)
42#define IIOCSIGPRF  _IO('I',14)
43#define IIOCGETPRF  _IO('I',15)
44#define IIOCSETPRF  _IO('I',16)
45#define IIOCGETMAP  _IO('I',17)
46#define IIOCSETMAP  _IO('I',18)
47#define IIOCNETASL  _IO('I',19)
48#define IIOCNETDIL  _IO('I',20)
49#define IIOCGETCPS  _IO('I',21)
50#define IIOCGETDVR  _IO('I',22)
51#define IIOCNETLCR  _IO('I',23) /* dwabc ioctl for LCR from isdnlog */
52#define IIOCNETDWRSET  _IO('I',24) /* dwabc ioctl to reset abc-values to default on a net-interface */
53
54#define IIOCNETALN  _IO('I',32)
55#define IIOCNETDLN  _IO('I',33)
56
57#define IIOCNETGPN  _IO('I',34)
58
59#define IIOCDBGVAR  _IO('I',127)
60
61#define IIOCDRVCTL  _IO('I',128)
62
63/* cisco hdlck device private ioctls */
64#define SIOCGKEEPPERIOD (SIOCDEVPRIVATE + 0)
65#define SIOCSKEEPPERIOD (SIOCDEVPRIVATE + 1)
66#define SIOCGDEBSERINT  (SIOCDEVPRIVATE + 2)
67#define SIOCSDEBSERINT  (SIOCDEVPRIVATE + 3)
68
69/* Packet encapsulations for net-interfaces */
70#define ISDN_NET_ENCAP_ETHER      0
71#define ISDN_NET_ENCAP_RAWIP      1
72#define ISDN_NET_ENCAP_IPTYP      2
73#define ISDN_NET_ENCAP_CISCOHDLC  3 /* Without SLARP and keepalive */
74#define ISDN_NET_ENCAP_SYNCPPP    4
75#define ISDN_NET_ENCAP_UIHDLC     5
76#define ISDN_NET_ENCAP_CISCOHDLCK 6 /* With SLARP and keepalive    */
77#define ISDN_NET_ENCAP_X25IFACE   7 /* Documentation/networking/x25-iface.txt*/
78#define ISDN_NET_ENCAP_MAX_ENCAP  ISDN_NET_ENCAP_X25IFACE
79
80/* Facility which currently uses an ISDN-channel */
81#define ISDN_USAGE_NONE       0
82#define ISDN_USAGE_RAW        1
83#define ISDN_USAGE_MODEM      2
84#define ISDN_USAGE_NET        3
85#define ISDN_USAGE_VOICE      4
86#define ISDN_USAGE_FAX        5
87#define ISDN_USAGE_MASK       7 /* Mask to get plain usage */
88#define ISDN_USAGE_DISABLED  32 /* This bit is set, if channel is disabled */
89#define ISDN_USAGE_EXCLUSIVE 64 /* This bit is set, if channel is exclusive */
90#define ISDN_USAGE_OUTGOING 128 /* This bit is set, if channel is outgoing  */
91
92#define ISDN_MODEM_NUMREG    24        /* Number of Modem-Registers        */
93#define ISDN_LMSNLEN         255 /* Length of tty's Listen-MSN string */
94#define ISDN_CMSGLEN         50  /* Length of CONNECT-Message to add for Modem */
95
96#define ISDN_MSNLEN          32
97#define NET_DV 0x06  /* Data version for isdn_net_ioctl_cfg   */
98#define TTY_DV 0x06  /* Data version for iprofd etc.          */
99
100#define INF_DV 0x01  /* Data version for /dev/isdninfo        */
101
102typedef struct {
103  char drvid[25];
104  unsigned long arg;
105} isdn_ioctl_struct;
106
107typedef struct {
108  char name[10];
109  char phone[ISDN_MSNLEN];
110  int  outgoing;
111} isdn_net_ioctl_phone;
112
113typedef struct {
114  char name[10];     /* Name of interface                     */
115  char master[10];   /* Name of Master for Bundling           */
116  char slave[10];    /* Name of Slave for Bundling            */
117  char eaz[256];     /* EAZ/MSN                               */
118  char drvid[25];    /* DriverId for Bindings                 */
119  int  onhtime;      /* Hangup-Timeout                        */
120  int  charge;       /* Charge-Units                          */
121  int  l2_proto;     /* Layer-2 protocol                      */
122  int  l3_proto;     /* Layer-3 protocol                      */
123  int  p_encap;      /* Encapsulation                         */
124  int  exclusive;    /* Channel, if bound exclusive           */
125  int  dialmax;      /* Dial Retry-Counter                    */
126  int  slavedelay;   /* Delay until slave starts up           */
127  int  cbdelay;      /* Delay before Callback                 */
128  int  chargehup;    /* Flag: Charge-Hangup                   */
129  int  ihup;         /* Flag: Hangup-Timeout on incoming line */
130  int  secure;       /* Flag: Secure                          */
131  int  callback;     /* Flag: Callback                        */
132  int  cbhup;        /* Flag: Reject Call before Callback     */
133  int  pppbind;      /* ippp device for bindings              */
134  int  chargeint;    /* Use fixed charge interval length      */
135  int  triggercps;   /* BogoCPS needed for triggering slave   */
136  int  dialtimeout;  /* Dial-Timeout                          */
137  int  dialwait;     /* Time to wait after failed dial        */
138  int  dialmode;     /* Flag: off / on / auto                 */
139} isdn_net_ioctl_cfg;
140
141#define ISDN_NET_DIALMODE_MASK  0xC0    /* bits for status                */
142#define ISDN_NET_DM_OFF         0x00    /* this interface is stopped      */
143#define ISDN_NET_DM_MANUAL      0x40    /* this interface is on (manual)  */
144#define ISDN_NET_DM_AUTO        0x80    /* this interface is autodial     */
145#define ISDN_NET_DIALMODE(x) ((&(x))->flags & ISDN_NET_DIALMODE_MASK)
146
147#endif /* __ISDN_H__ */
Note: See TracBrowser for help on using the repository browser.