man_defs.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. *
  3. Copyright (c) Eicon Networks, 2002.
  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. /* Definitions for use with the Management Information Element */
  26. /*------------------------------------------------------------------*/
  27. /* Management information element */
  28. /* ---------------------------------------------------------- */
  29. /* Byte Coding Comment */
  30. /* ---------------------------------------------------------- */
  31. /* 0 | 0 1 1 1 1 1 1 1 | ESC */
  32. /* 1 | 0 x x x x x x x | Length of information element (m-1) */
  33. /* 2 | 1 0 0 0 0 0 0 0 | Management Information Id */
  34. /* 3 | x x x x x x x x | Type */
  35. /* 4 | x x x x x x x x | Attribute */
  36. /* 5 | x x x x x x x x | Status */
  37. /* 6 | x x x x x x x x | Variable Value Length (m-n) */
  38. /* 7 | x x x x x x x x | Path / Variable Name String Length (n-8)*/
  39. /* 8..n | x x x x x x x x | Path/Node Name String separated by '\' */
  40. /* n..m | x x x x x x x x | Variable content */
  41. /*------------------------------------------------------------------*/
  42. /*------------------------------------------------------------------*/
  43. /* Type Field */
  44. /* */
  45. /* MAN_READ: not used */
  46. /* MAN_WRITE: not used */
  47. /* MAN_EVENT_ON: not used */
  48. /* MAN_EVENT_OFF: not used */
  49. /* MAN_INFO_IND: type of variable */
  50. /* MAN_EVENT_IND: type of variable */
  51. /* MAN_TRACE_IND not used */
  52. /*------------------------------------------------------------------*/
  53. #define MI_DIR 0x01 /* Directory string (zero terminated) */
  54. #define MI_EXECUTE 0x02 /* Executable function (has no value) */
  55. #define MI_ASCIIZ 0x03 /* Zero terminated string */
  56. #define MI_ASCII 0x04 /* String, first byte is length */
  57. #define MI_NUMBER 0x05 /* Number string, first byte is length*/
  58. #define MI_TRACE 0x06 /* Trace information, format see below*/
  59. #define MI_FIXED_LENGTH 0x80 /* get length from MAN_INFO max_len */
  60. #define MI_INT 0x81 /* number to display as signed int */
  61. #define MI_UINT 0x82 /* number to display as unsigned int */
  62. #define MI_HINT 0x83 /* number to display in hex format */
  63. #define MI_HSTR 0x84 /* number to display as a hex string */
  64. #define MI_BOOLEAN 0x85 /* number to display as boolean */
  65. #define MI_IP_ADDRESS 0x86 /* number to display as IP address */
  66. #define MI_BITFLD 0x87 /* number to display as bit field */
  67. #define MI_SPID_STATE 0x88 /* state# of SPID initialisation */
  68. /*------------------------------------------------------------------*/
  69. /* Attribute Field */
  70. /* */
  71. /* MAN_READ: not used */
  72. /* MAN_WRITE: not used */
  73. /* MAN_EVENT_ON: not used */
  74. /* MAN_EVENT_OFF: not used */
  75. /* MAN_INFO_IND: set according to capabilities of that variable */
  76. /* MAN_EVENT_IND: not used */
  77. /* MAN_TRACE_IND not used */
  78. /*------------------------------------------------------------------*/
  79. #define MI_WRITE 0x01 /* Variable is writeable */
  80. #define MI_EVENT 0x02 /* Variable can indicate changes */
  81. /*------------------------------------------------------------------*/
  82. /* Status Field */
  83. /* */
  84. /* MAN_READ: not used */
  85. /* MAN_WRITE: not used */
  86. /* MAN_EVENT_ON: not used */
  87. /* MAN_EVENT_OFF: not used */
  88. /* MAN_INFO_IND: set according to the actual status */
  89. /* MAN_EVENT_IND: set according to the actual statu */
  90. /* MAN_TRACE_IND not used */
  91. /*------------------------------------------------------------------*/
  92. #define MI_LOCKED 0x01 /* write protected by another instance*/
  93. #define MI_EVENT_ON 0x02 /* Event logging switched on */
  94. #define MI_PROTECTED 0x04 /* write protected by this instance */
  95. /*------------------------------------------------------------------*/
  96. /* Data Format used for MAN_TRACE_IND (no MI-element used) */
  97. /*------------------------------------------------------------------*/
  98. typedef struct mi_xlog_hdr_s MI_XLOG_HDR;
  99. struct mi_xlog_hdr_s
  100. {
  101. unsigned long time; /* Timestamp in msec units */
  102. unsigned short size; /* Size of data that follows */
  103. unsigned short code; /* code of trace event */
  104. }; /* unspecified data follows this header */
  105. /*------------------------------------------------------------------*/
  106. /* Trace mask definitions for trace events except B channel and */
  107. /* debug trace events */
  108. /*------------------------------------------------------------------*/
  109. #define TM_D_CHAN 0x0001 /* D-Channel (D-.) Code 3,4 */
  110. #define TM_L_LAYER 0x0002 /* Low Layer (LL) Code 6,7 */
  111. #define TM_N_LAYER 0x0004 /* Network Layer (N) Code 14,15 */
  112. #define TM_DL_ERR 0x0008 /* Data Link Error (MDL) Code 9 */
  113. #define TM_LAYER1 0x0010 /* Layer 1 Code 20 */
  114. #define TM_C_COMM 0x0020 /* Call Comment (SIG) Code 5,21,22 */
  115. #define TM_M_DATA 0x0040 /* Modulation Data (EYE) Code 23 */
  116. #define TM_STRING 0x0080 /* Sting data Code 24 */
  117. #define TM_N_USED2 0x0100 /* not used */
  118. #define TM_N_USED3 0x0200 /* not used */
  119. #define TM_N_USED4 0x0400 /* not used */
  120. #define TM_N_USED5 0x0800 /* not used */
  121. #define TM_N_USED6 0x1000 /* not used */
  122. #define TM_N_USED7 0x2000 /* not used */
  123. #define TM_N_USED8 0x4000 /* not used */
  124. #define TM_REST 0x8000 /* Codes 10,11,12,13,16,18,19,128,129 */
  125. /*------ End of file -----------------------------------------------*/