maintidi.h 4.1 KB

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