debug_if.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. *
  3. Copyright (c) Eicon Technology Corporation, 2000.
  4. *
  5. This source file is supplied for the use with Eicon
  6. Technology Corporation's range of DIVA Server Adapters.
  7. *
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2, or (at your option)
  11. any later version.
  12. *
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
  15. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. See the GNU General Public License for more details.
  17. *
  18. You should have received a copy of the GNU General Public License
  19. along with this program; if not, write to the Free Software
  20. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. *
  22. */
  23. #ifndef __DIVA_DEBUG_IF_H__
  24. #define __DIVA_DEBUG_IF_H__
  25. #define MSG_TYPE_DRV_ID 0x0001
  26. #define MSG_TYPE_FLAGS 0x0002
  27. #define MSG_TYPE_STRING 0x0003
  28. #define MSG_TYPE_BINARY 0x0004
  29. #define MSG_TYPE_MLOG 0x0005
  30. #define MSG_FRAME_MAX_SIZE 2150
  31. typedef struct _diva_dbg_entry_head {
  32. dword sequence;
  33. dword time_sec;
  34. dword time_usec;
  35. dword facility;
  36. dword dli;
  37. dword drv_id;
  38. dword di_cpu;
  39. dword data_length;
  40. } diva_dbg_entry_head_t;
  41. int diva_maint_init(byte *base, unsigned long length, int do_init);
  42. void *diva_maint_finit(void);
  43. dword diva_dbg_q_length(void);
  44. diva_dbg_entry_head_t *diva_maint_get_message(word *size,
  45. diva_os_spin_lock_magic_t *old_irql);
  46. void diva_maint_ack_message(int do_release,
  47. diva_os_spin_lock_magic_t *old_irql);
  48. void diva_maint_prtComp(char *format, ...);
  49. void diva_maint_wakeup_read(void);
  50. int diva_get_driver_info(dword id, byte *data, int data_length);
  51. int diva_get_driver_dbg_mask(dword id, byte *data);
  52. int diva_set_driver_dbg_mask(dword id, dword mask);
  53. void diva_mnt_remove_xdi_adapter(const DESCRIPTOR *d);
  54. void diva_mnt_add_xdi_adapter(const DESCRIPTOR *d);
  55. int diva_mnt_shutdown_xdi_adapters(void);
  56. #define DIVA_MAX_SELECTIVE_FILTER_LENGTH 127
  57. int diva_set_trace_filter(int filter_length, const char *filter);
  58. int diva_get_trace_filter(int max_length, char *filter);
  59. #define DITRACE_CMD_GET_DRIVER_INFO 1
  60. #define DITRACE_READ_DRIVER_DBG_MASK 2
  61. #define DITRACE_WRITE_DRIVER_DBG_MASK 3
  62. #define DITRACE_READ_TRACE_ENTRY 4
  63. #define DITRACE_READ_TRACE_ENTRYS 5
  64. #define DITRACE_WRITE_SELECTIVE_TRACE_FILTER 6
  65. #define DITRACE_READ_SELECTIVE_TRACE_FILTER 7
  66. /*
  67. Trace lavels for debug via management interface
  68. */
  69. #define DIVA_MGT_DBG_TRACE 0x00000001 /* All trace messages from the card */
  70. #define DIVA_MGT_DBG_DCHAN 0x00000002 /* All D-channel relater trace messages */
  71. #define DIVA_MGT_DBG_MDM_PROGRESS 0x00000004 /* Modem progress events */
  72. #define DIVA_MGT_DBG_FAX_PROGRESS 0x00000008 /* Fax progress events */
  73. #define DIVA_MGT_DBG_IFC_STATISTICS 0x00000010 /* Interface call statistics */
  74. #define DIVA_MGT_DBG_MDM_STATISTICS 0x00000020 /* Global modem statistics */
  75. #define DIVA_MGT_DBG_FAX_STATISTICS 0x00000040 /* Global call statistics */
  76. #define DIVA_MGT_DBG_LINE_EVENTS 0x00000080 /* Line state events */
  77. #define DIVA_MGT_DBG_IFC_EVENTS 0x00000100 /* Interface/L1/L2 state events */
  78. #define DIVA_MGT_DBG_IFC_BCHANNEL 0x00000200 /* B-Channel trace for all channels */
  79. #define DIVA_MGT_DBG_IFC_AUDIO 0x00000400 /* Audio Tap trace for all channels */
  80. # endif /* DEBUG_IF___H */