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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
static char _isdn_ioctl_id[] = "@(#)$Id: isdn_ioctl.h,v 1.2 1995/03/28 07:54:45 bde Exp $";
/*******************************************************************************
* II - Version 0.1 $Revision: 1.2 $ $State: Exp $
*
* Copyright 1994 Dietmar Friede
*******************************************************************************
* Bug reports, patches, comments, suggestions should be sent to:
*
* jkr@saarlink.de or jkrause@guug.de
*
*******************************************************************************
* $Log: isdn_ioctl.h,v $
* Revision 1.2 1995/03/28 07:54:45 bde
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
* (except in netccitt, netiso and netns) that I didn't notice when I fixed
* "all" such warnings before.
*
* Revision 1.1 1995/02/14 15:00:35 jkh
* An ISDN driver that supports the EDSS1 and the 1TR6 ISDN interfaces.
* EDSS1 is the "Euro-ISDN", 1TR6 is the soon obsolete german ISDN Interface.
* Obtained from: Dietmar Friede <dfriede@drnhh.neuhaus.de> and
* Juergen Krause <jkr@saarlink.de>
*
* This is only one part - the rest to follow in a couple of hours.
* This part is a benign import, since it doesn't affect anything else.
*
*
******************************************************************************/
#pragma pack (1)
typedef struct
{
u_char protokoll;
u_char length;
u_short data_length;
u_char link_addr_a;
u_char link_addr_b;
u_char modulo_mode;
u_char window_size;
u_char xid;
} dlpd_t;
typedef struct
{
u_char protokoll;
u_char length;
u_short lic, hic, ltc, htc, loc, hoc;
u_char modulo_mode;
}ncpd_t;
typedef struct
{
u_char length;
u_short lic, hic, ltc, htc, loc, hoc;
u_char modulo_mode;
}ncpi_t;
typedef struct
{
u_char stat;
u_char length;
u_char no[124];
} telno_t;
#pragma pack ()
typedef struct
{
short appl;
dlpd_t dlpd;
ncpd_t ncpd;
u_long timeout;
u_char prot;
int (*PassUp)(); /* pass data from isdn interface upstream to appl. */
int (*PassUpInfo)(); /* pass info from isdn interface upstream to appl. */
int (*PassDown)(); /* get data from application */
int (*Connect)(); /* Connect Indikation */
int (*DisConn)(); /* Disconnect Indikation */
short drivno; /* Number of the high level Driver */
char ctrl;
char typ;
short state;
short listen_state;
u_long send_err;
} isdn_appl_t;
typedef struct
{
char ctrl;
char islisten;
short unit;
short appl;
int (*connect)();
int (*listen)();
int (*accept)();
int (*disconnect)();
int (*output)();
int (*state)();
short o_len;
char *o_buf;
time_t lastact;
u_long send_err;
u_long rcv_err;
} isdn_ctrl_t;
typedef struct
{
short appl;
dlpd_t dlpd;
ncpd_t ncpd;
u_long timeout;
u_char prot;
} isdn_param;
typedef struct
{
short appl;
short ctrl;
u_char b_channel;
u_long inf_mask;
u_char out_serv;
u_char out_serv_add;
u_char src_subadr;
u_char spv;
telno_t telno;
} dial_t;
typedef struct
{
short appl;
short ctrl;
u_long inf_mask;
u_short subadr_mask;
u_short si_mask;
} listen_t;
#define ISBUSY(x) (((x) & 0x80) == 0)
#define ISFREE(x) (((x) & 0x80) == 0x80)
#define TELNO_VALID 1
#define TELNO_PROMISC 2
#define N_ISDN_CTRL 2
#define ISDN_DIAL _IOWR('I',1,dial_t)
#define ISDN_LISTEN _IOWR('I',2,listen_t)
#define ISDN_ACCEPT _IOWR('I',3,int)
#define ISDN_HANGUP _IOWR('I',4,int)
#define ISDN_SET_PARAM _IOWR('I',8,isdn_param)
#define ISDN_GET_PARAM _IOWR('I',9,isdn_param)
#ifdef KERNEL
/* XXX should be elsewhere. */
/* From isdn.c. */
void isdn_accept_con_ind __P((int an, int cn, char serv, char serv_add,
char subadr, char nl, char *num));
void isdn_conn_ind __P((int an, int cn, int dial));
int isdn_ctrl_attach __P((int n));
void isdn_disconn_ind __P((int an));
void isdn_disconnect __P((int an, int rea));
void isdn_info __P((int an, int typ, int len, char *data));
int isdn_input __P((int an, int len, char *buf, int dir));
int isdn_msg __P((int an));
int isdn_output __P((int an));
/* From if_ii.c. */
int iiattach __P((int ap));
/* From iispy.c. */
int ispyattach __P((int ap));
/* From iitel.c. */
int itelattach __P((int ap));
/* From iitty.c. */
int ityattach __P((int ap));
#endif /* KERNEL */
|