Merge branch 'linus' into x86/xen
[linux-2.6] / 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 #define DIVA_MAX_MANAGEMENT_TRANSFER_SIZE 4096
53
54 typedef struct _diva_strace_context {
55         diva_strace_library_interface_t instance;
56
57         int   Adapter;
58         void* hAdapter;
59
60         int Channels;
61         int     req_busy;
62
63   ENTITY   e;
64   IDI_CALL request;
65   BUFFERS  XData;
66   BUFFERS  RData;
67         byte buffer[DIVA_MAX_MANAGEMENT_TRANSFER_SIZE + 1];
68   int removal_state;
69   int general_b_ch_event;
70   int general_fax_event;
71   int general_mdm_event;
72
73         byte    rc_ok;
74
75         /*
76                 Initialization request state machine
77                 */
78         int ChannelsTraceActive;
79         int ModemTraceActive;
80         int FaxTraceActive;
81         int IncomingCallsCallsActive;
82         int IncomingCallsConnectedActive;
83         int OutgoingCallsCallsActive;
84         int OutgoingCallsConnectedActive;
85
86         int trace_mask_init;
87         int audio_trace_init;
88         int bchannel_init;
89         int trace_length_init;
90         int     trace_on;
91         int trace_events_down;
92         int l1_trace;
93         int l2_trace;
94
95         /*
96                 Trace\Event Enable
97                 */
98         word trace_event_mask;
99         word current_trace_event_mask;
100
101         dword audio_tap_mask;
102         dword current_audio_tap_mask;
103         dword current_eye_pattern_mask;
104         int   audio_tap_pending;
105         int   eye_pattern_pending;
106
107         dword bchannel_trace_mask;
108         dword current_bchannel_trace_mask;
109
110
111         diva_trace_line_state_t lines[30];
112
113         int     parse_entries;
114         int     cur_parse_entry;
115         diva_strace_path2action_t* parse_table;
116
117         diva_trace_library_user_interface_t user_proc_table;
118
119         int line_parse_entry_first[30];
120         int line_parse_entry_last[30];
121
122         int modem_parse_entry_first[30];
123         int modem_parse_entry_last[30];
124
125         int fax_parse_entry_first[30];
126         int fax_parse_entry_last[30];
127
128         int statistic_parse_first;
129         int statistic_parse_last;
130
131         int mdm_statistic_parse_first;
132         int mdm_statistic_parse_last;
133
134         int fax_statistic_parse_first;
135         int fax_statistic_parse_last;
136
137         dword   line_init_event;
138         dword   modem_init_event;
139         dword   fax_init_event;
140
141         dword   pending_line_status;
142         dword   pending_modem_status;
143         dword   pending_fax_status;
144
145         dword clear_call_command;
146
147         int outgoing_ifc_stats;
148         int incoming_ifc_stats;
149         int modem_ifc_stats;
150         int fax_ifc_stats;
151         int b1_ifc_stats;
152         int b2_ifc_stats;
153         int d1_ifc_stats;
154         int d2_ifc_stats;
155
156         diva_trace_interface_state_t Interface;
157         diva_ifc_statistics_t                            InterfaceStat;
158 } diva_strace_context_t;
159
160 typedef struct _diva_man_var_header {
161         byte   escape;
162         byte   length;
163         byte   management_id;
164         byte   type;
165         byte   attribute;
166         byte   status;
167         byte   value_length;
168         byte     path_length;
169 } diva_man_var_header_t;
170
171 #endif
172