Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
kst_ifc.h
Go to the documentation of this file.
1 /*
2  *
3  Copyright (c) Eicon Networks, 2000.
4  *
5  This source file is supplied for the use with
6  Eicon Networks range of DIVA Server Adapters.
7  *
8  Eicon File Revision : 1.9
9  *
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2, or (at your option)
13  any later version.
14  *
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18  See the GNU General Public License for more details.
19  *
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  *
24  */
25 #ifndef __DIVA_EICON_TRACE_API__
26 #define __DIVA_EICON_TRACE_API__
27 
28 #define DIVA_TRACE_LINE_TYPE_LEN 64
29 #define DIVA_TRACE_IE_LEN 64
30 #define DIVA_TRACE_FAX_PRMS_LEN 128
31 
32 typedef struct _diva_trace_ie {
36 
37 /*
38  Structure used to represent "State\\BX\\Modem" directory
39  to user.
40 */
41 typedef struct _diva_trace_modem_state {
43 
45 
47 
48  dword Options; /* Options received from Application */
49 
52 
54 
56 
59 
62 
67 
69 
71 
72 /*
73  Representation of "State\\BX\\FAX" directory
74 */
75 typedef struct _diva_trace_fax_state {
91 
92 /*
93  Structure used to represent Interface State in the abstract
94  and interface/D-channel protocol independent form.
95 */
100 
111 
121 
133 
154 
155 typedef struct _diva_prot_statistics {
163 
164 typedef struct _diva_ifc_statistics {
174 
175 /*
176  Structure used to represent "State\\BX" directory
177  to user.
178 */
179 typedef struct _diva_trace_line_state {
181 
183 
185 
188 
191 
194 
198 
200 
202 
204 
206 
209 
211 
213 
215 
216 #define DIVA_SUPER_TRACE_NOTIFY_LINE_CHANGE ('l')
217 #define DIVA_SUPER_TRACE_NOTIFY_MODEM_CHANGE ('m')
218 #define DIVA_SUPER_TRACE_NOTIFY_FAX_CHANGE ('f')
219 #define DIVA_SUPER_TRACE_INTERFACE_CHANGE ('i')
220 #define DIVA_SUPER_TRACE_NOTIFY_STAT_CHANGE ('s')
221 #define DIVA_SUPER_TRACE_NOTIFY_MDM_STAT_CHANGE ('M')
222 #define DIVA_SUPER_TRACE_NOTIFY_FAX_STAT_CHANGE ('F')
223 
227  int Adapter,
228  diva_trace_line_state_t *channel, int notify_subject);
231  int Adapter, void *xlog_buffer, int length);
234  int Adapter,
235  int error, const char *file, int line);
236 
237 /*
238  This structure creates interface from user to library
239 */
246 
247 /*
248  Interface from Library to User
249 */
250 typedef int (*DivaSTraceLibraryStart_proc_t)(void *hLib);
251 typedef int (*DivaSTraceLibraryFinit_proc_t)(void *hLib);
252 typedef int (*DivaSTraceMessageInput_proc_t)(void *hLib);
253 typedef void* (*DivaSTraceGetHandle_proc_t)(void *hLib);
254 
255 /*
256  Turn Audio Tap trace on/off
257  Channel should be in the range 1 ... Number of Channels
258 */
259 typedef int (*DivaSTraceSetAudioTap_proc_t)(void *hLib, int Channel, int on);
260 
261 /*
262  Turn B-channel trace on/off
263  Channel should be in the range 1 ... Number of Channels
264 */
265 typedef int (*DivaSTraceSetBChannel_proc_t)(void *hLib, int Channel, int on);
266 
267 /*
268  Turn D-channel (Layer1/Layer2/Layer3) trace on/off
269  Layer1 - All D-channel frames received/sent over the interface
270  inclusive Layer 2 headers, Layer 2 frames and TEI management frames
271  Layer2 - Events from LAPD protocol instance with SAPI of signalling protocol
272  Layer3 - All D-channel frames addressed to assigned to the card TEI and
273  SAPI of signalling protocol, and signalling protocol events.
274 */
275 typedef int (*DivaSTraceSetDChannel_proc_t)(void *hLib, int on);
276 
277 /*
278  Get overall card statistics
279 */
283 typedef int (*DivaSTraceGetFaxStatistics_proc_t)(void *hLib);
288 
289 /*
290  Call control
291 */
292 typedef int (*DivaSTraceClearCall_proc_t)(void *hLib, int Channel);
293 
295  void *hLib;
305  DivaSTraceGetOutgoingCallStatistics_proc_t \
306  DivaSTraceGetOutgoingCallStatistics;
307  DivaSTraceGetIncomingCallStatistics_proc_t \
308  DivaSTraceGetIncomingCallStatistics;
309  DivaSTraceGetModemStatistics_proc_t \
310  DivaSTraceGetModemStatistics;
311  DivaSTraceGetFaxStatistics_proc_t \
312  DivaSTraceGetFaxStatistics;
313  DivaSTraceGetBLayer1Statistics_proc_t \
314  DivaSTraceGetBLayer1Statistics;
315  DivaSTraceGetBLayer2Statistics_proc_t \
316  DivaSTraceGetBLayer2Statistics;
317  DivaSTraceGetDLayer1Statistics_proc_t \
318  DivaSTraceGetDLayer1Statistics;
319  DivaSTraceGetDLayer2Statistics_proc_t \
320  DivaSTraceGetDLayer2Statistics;
323 
324 /*
325  Create and return Library interface
326 */
328  const diva_trace_library_user_interface_t *user_proc,
329  byte *pmem);
331 
332 #define DIVA_MAX_ADAPTERS 64
333 #define DIVA_MAX_LINES 32
334 
335 #endif