ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / isdn / hardware / eicon / maintidi.h
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_IDI_IFC_H__
26 #define __DIVA_EICON_TRACE_IDI_IFC_H__
27
28 void* SuperTraceOpenAdapter   (int AdapterNumber);
29 int   SuperTraceCloseAdapter  (void* AdapterHandle);
30 int   SuperTraceWrite         (void* AdapterHandle,
31                                const void* data, int length);
32 int   SuperTraceReadRequest   (void* AdapterHandle,const char* name,byte* data);
33 int   SuperTraceGetNumberOfChannels (void* AdapterHandle);
34 int   SuperTraceASSIGN        (void* AdapterHandle, byte* data);
35 int   SuperTraceREMOVE        (void* AdapterHandle);
36 int   SuperTraceTraceOnRequest(void* hAdapter, const char* name, byte* data);
37 int   SuperTraceWriteVar (void* AdapterHandle,
38                                                                                                 byte* data,
39                                                                                                 const char* name,
40                                                                                                 void* var,
41                                                                                                 byte type,
42                                                                                                 byte var_length);
43 int   SuperTraceExecuteRequest (void* AdapterHandle,
44                                                                                                                                 const char* name,
45                                                                                                                                 byte* data);
46
47 typedef struct _diva_strace_path2action {
48         char               path[64]; /* Full path to variable            */
49         void*                                                    variable; /* Variable that will receive value */
50 } diva_strace_path2action_t;
51
52 typedef struct _diva_strace_context {
53         diva_strace_library_interface_t instance;
54
55         int   Adapter;
56         void* hAdapter;
57
58         int Channels;
59         int     req_busy;
60
61   ENTITY   e;
62   IDI_CALL request;
63   BUFFERS  XData;
64   BUFFERS  RData;
65         byte buffer[2048+512+1];
66   int removal_state;
67   int general_b_ch_event;
68   int general_fax_event;
69   int general_mdm_event;
70
71         byte    rc_ok;
72
73         /*
74                 Initialization request state machine
75                 */
76         int ChannelsTraceActive;
77         int ModemTraceActive;
78         int FaxTraceActive;
79         int IncomingCallsCallsActive;
80         int IncomingCallsConnectedActive;
81         int OutgoingCallsCallsActive;
82         int OutgoingCallsConnectedActive;
83
84         int trace_mask_init;
85         int audio_trace_init;
86         int bchannel_init;
87         int trace_length_init;
88         int     trace_on;
89         int trace_events_down;
90         int l1_trace;
91         int l2_trace;
92
93         /*
94                 Trace\Event Enable
95                 */
96         word trace_event_mask;
97         word current_trace_event_mask;
98
99         dword audio_tap_mask;
100         dword current_audio_tap_mask;
101         dword current_eye_pattern_mask;
102         int   audio_tap_pending;
103         int   eye_pattern_pending;
104
105         dword bchannel_trace_mask;
106         dword current_bchannel_trace_mask;
107
108
109         diva_trace_line_state_t lines[30];
110
111         int     parse_entries;
112         int     cur_parse_entry;
113         diva_strace_path2action_t* parse_table;
114
115         diva_trace_library_user_interface_t user_proc_table;
116
117         int line_parse_entry_first[30];
118         int line_parse_entry_last[30];
119
120         int modem_parse_entry_first[30];
121         int modem_parse_entry_last[30];
122
123         int fax_parse_entry_first[30];
124         int fax_parse_entry_last[30];
125
126         int statistic_parse_first;
127         int statistic_parse_last;
128
129         int mdm_statistic_parse_first;
130         int mdm_statistic_parse_last;
131
132         int fax_statistic_parse_first;
133         int fax_statistic_parse_last;
134
135         dword   line_init_event;
136         dword   modem_init_event;
137         dword   fax_init_event;
138
139         dword   pending_line_status;
140         dword   pending_modem_status;
141         dword   pending_fax_status;
142
143         dword clear_call_command;
144
145         int outgoing_ifc_stats;
146         int incoming_ifc_stats;
147         int modem_ifc_stats;
148         int fax_ifc_stats;
149         int b1_ifc_stats;
150         int b2_ifc_stats;
151         int d1_ifc_stats;
152         int d2_ifc_stats;
153
154         diva_trace_interface_state_t Interface;
155         diva_ifc_statistics_t                            InterfaceStat;
156 } diva_strace_context_t;
157
158 typedef struct _diva_man_var_header {
159         byte   escape;
160         byte   length;
161         byte   management_id;
162         byte   type;
163         byte   attribute;
164         byte   status;
165         byte   value_length;
166         byte     path_length;
167 } diva_man_var_header_t;
168
169 #endif
170