1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef _UAPI__ISDN_H__
16#define _UAPI__ISDN_H__
17
18#include <linux/ioctl.h>
19#include <linux/tty.h>
20
21#define ISDN_MAX_DRIVERS 32
22#define ISDN_MAX_CHANNELS 64
23
24
25#define IIOCNETAIF _IO('I',1)
26#define IIOCNETDIF _IO('I',2)
27#define IIOCNETSCF _IO('I',3)
28#define IIOCNETGCF _IO('I',4)
29#define IIOCNETANM _IO('I',5)
30#define IIOCNETDNM _IO('I',6)
31#define IIOCNETGNM _IO('I',7)
32#define IIOCGETSET _IO('I',8)
33#define IIOCSETSET _IO('I',9)
34#define IIOCSETVER _IO('I',10)
35#define IIOCNETHUP _IO('I',11)
36#define IIOCSETGST _IO('I',12)
37#define IIOCSETBRJ _IO('I',13)
38#define IIOCSIGPRF _IO('I',14)
39#define IIOCGETPRF _IO('I',15)
40#define IIOCSETPRF _IO('I',16)
41#define IIOCGETMAP _IO('I',17)
42#define IIOCSETMAP _IO('I',18)
43#define IIOCNETASL _IO('I',19)
44#define IIOCNETDIL _IO('I',20)
45#define IIOCGETCPS _IO('I',21)
46#define IIOCGETDVR _IO('I',22)
47#define IIOCNETLCR _IO('I',23)
48#define IIOCNETDWRSET _IO('I',24)
49
50#define IIOCNETALN _IO('I',32)
51#define IIOCNETDLN _IO('I',33)
52
53#define IIOCNETGPN _IO('I',34)
54
55#define IIOCDBGVAR _IO('I',127)
56
57#define IIOCDRVCTL _IO('I',128)
58
59
60#define SIOCGKEEPPERIOD (SIOCDEVPRIVATE + 0)
61#define SIOCSKEEPPERIOD (SIOCDEVPRIVATE + 1)
62#define SIOCGDEBSERINT (SIOCDEVPRIVATE + 2)
63#define SIOCSDEBSERINT (SIOCDEVPRIVATE + 3)
64
65
66#define ISDN_NET_ENCAP_ETHER 0
67#define ISDN_NET_ENCAP_RAWIP 1
68#define ISDN_NET_ENCAP_IPTYP 2
69#define ISDN_NET_ENCAP_CISCOHDLC 3
70#define ISDN_NET_ENCAP_SYNCPPP 4
71#define ISDN_NET_ENCAP_UIHDLC 5
72#define ISDN_NET_ENCAP_CISCOHDLCK 6
73#define ISDN_NET_ENCAP_X25IFACE 7
74#define ISDN_NET_ENCAP_MAX_ENCAP ISDN_NET_ENCAP_X25IFACE
75
76
77#define ISDN_USAGE_NONE 0
78#define ISDN_USAGE_RAW 1
79#define ISDN_USAGE_MODEM 2
80#define ISDN_USAGE_NET 3
81#define ISDN_USAGE_VOICE 4
82#define ISDN_USAGE_FAX 5
83#define ISDN_USAGE_MASK 7
84#define ISDN_USAGE_DISABLED 32
85#define ISDN_USAGE_EXCLUSIVE 64
86#define ISDN_USAGE_OUTGOING 128
87
88#define ISDN_MODEM_NUMREG 24
89#define ISDN_LMSNLEN 255
90#define ISDN_CMSGLEN 50
91
92#define ISDN_MSNLEN 32
93#define NET_DV 0x06
94#define TTY_DV 0x06
95
96#define INF_DV 0x01
97
98typedef struct {
99 char drvid[25];
100 unsigned long arg;
101} isdn_ioctl_struct;
102
103typedef struct {
104 char name[10];
105 char phone[ISDN_MSNLEN];
106 int outgoing;
107} isdn_net_ioctl_phone;
108
109typedef struct {
110 char name[10];
111 char master[10];
112 char slave[10];
113 char eaz[256];
114 char drvid[25];
115 int onhtime;
116 int charge;
117 int l2_proto;
118 int l3_proto;
119 int p_encap;
120 int exclusive;
121 int dialmax;
122 int slavedelay;
123 int cbdelay;
124 int chargehup;
125 int ihup;
126 int secure;
127 int callback;
128 int cbhup;
129 int pppbind;
130 int chargeint;
131 int triggercps;
132 int dialtimeout;
133 int dialwait;
134 int dialmode;
135} isdn_net_ioctl_cfg;
136
137#define ISDN_NET_DIALMODE_MASK 0xC0
138#define ISDN_NET_DM_OFF 0x00
139#define ISDN_NET_DM_MANUAL 0x40
140#define ISDN_NET_DM_AUTO 0x80
141#define ISDN_NET_DIALMODE(x) ((&(x))->flags & ISDN_NET_DIALMODE_MASK)
142
143
144#endif
145