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