4 Copyright (c) 2002 Broadcom Corporation
6 No portions of this material may be reproduced in any form without the
10 Irvine, California 92619
11 All information contained in this document is Broadcom Corporation
12 company private, proprietary, and trade secret.
17 /*******************************************************************
25 * $Id: DiagDef.h,v 1.2 2005/04/29 06:59:26 echo Exp $
28 * Revision 1.2 2005/04/29 06:59:26 echo
29 * *** empty log message ***
31 * Revision 1.22 2004/10/16 23:43:19 ilyas
32 * Added playback resume command
34 * Revision 1.21 2004/10/16 23:24:08 ilyas
35 * Improved FileRead command support for LOG file playback (RecordTest on the board)
37 * Revision 1.20 2004/04/28 16:52:32 ilyas
38 * Added GDB frame processing
40 * Revision 1.19 2004/03/10 22:26:53 ilyas
41 * Added command-line parameter for IP port number.
42 * Added proxy remote termination
44 * Revision 1.18 2004/01/24 23:41:37 ilyas
45 * Added DIAG_DEBUG_CMD_LOG_SAMPLES debug command
47 * Revision 1.17 2003/11/19 02:25:45 ilyas
48 * Added definitions for LOG frame retransmission, time, ADSL2 plots
50 * Revision 1.16 2003/11/14 18:46:05 ilyas
51 * Added G992p3 debug commands
53 * Revision 1.15 2003/10/02 19:50:41 ilyas
54 * Added support for buffering data for AnnexI and statistical counters
56 * Revision 1.14 2003/09/03 19:45:11 ilyas
57 * To refuse connection with older protocol versions
59 * Revision 1.13 2003/08/30 00:12:39 ilyas
60 * Added support for running chip test regressions via DslDiags
62 * Revision 1.12 2003/08/12 00:19:28 ilyas
63 * Improved image downloading protocol.
64 * Added DEBUG command support
66 * Revision 1.11 2003/04/11 00:37:24 ilyas
67 * Added DiagProtoFrame definition
69 * Revision 1.10 2003/03/25 00:10:07 ilyas
70 * Added command for "long" BERT test
72 * Revision 1.9 2003/01/30 03:29:32 ilyas
73 * Added PHY_CFG support and fixed printing showtime counters
75 * Revision 1.8 2002/12/16 20:56:38 ilyas
76 * Added support for binary statuses
78 * Revision 1.7 2002/12/06 20:19:13 ilyas
79 * Added support for binary statuses and scrambled status strings
81 * Revision 1.6 2002/11/05 00:18:27 ilyas
82 * Added configuration dialog box for Eye tone selection.
83 * Added Centillium CRC workaround to AnnexC config dialog
84 * Bit allocation update on bit swap messages
86 * Revision 1.5 2002/07/30 23:23:43 ilyas
87 * Implemented DIAG configuration command for AnnexA and AnnexC
89 * Revision 1.4 2002/07/30 22:47:15 ilyas
90 * Added DIAG command for configuration
92 * Revision 1.3 2002/07/15 23:52:51 ilyas
93 * iAdded switch RJ11 pair command
95 * Revision 1.2 2002/04/25 17:55:51 ilyas
96 * Added mibGet command
98 * Revision 1.1 2002/04/02 22:56:39 ilyas
99 * Support DIAG connection at any time; BERT commands
102 ******************************************************************/
104 #define LOG_PROTO_ID "*L"
106 #define DIAG_PARTY_ID_MASK 0x01
107 #define LOG_PARTY_CLIENT 0x01
108 #define LOG_PARTY_SERVER 0x00
110 #define DIAG_DATA_MASK 0x0E
111 #define DIAG_DATA_LOG 0x02
112 #define DIAG_DATA_EYE 0x04
113 #define DIAG_DATA_LOG_TIME 0x08
115 #define DIAG_DATA_EX 0x80
116 #define DIAG_PARTY_ID_MASK_EX (DIAG_DATA_EX | DIAG_PARTY_ID_MASK)
117 #define LOG_PARTY_SERVER_EX (DIAG_DATA_EX | LOG_PARTY_SERVER)
119 #define DIAG_ACK_FRAME_ACK_MASK 0x000000FF
120 #define DIAG_ACK_FRAME_RCV_SHIFT 8
121 #define DIAG_ACK_FRAME_RCV_MASK 0x0000FF00
122 #define DIAG_ACK_FRAME_RCV_PRESENT 0x00010000
123 #define DIAG_ACK_TIMEOUT -1
124 #define DIAG_ACK_LEN_INDICATION -1
126 #define LOG_CMD_GDB 236
127 #define LOG_CMD_PROXY 237
128 #define LOG_CMD_RETR 238
129 #define LOG_CMD_DEBUG 239
130 #define LOG_CMD_BERT_EX 240
131 #define LOG_CMD_CFG_PHY 241
132 #define LOG_CMD_RESET 242
133 #define LOG_CMD_SCRAMBLED_STRING 243
134 #define LOG_CMD_EYE_CFG 244
135 #define LOG_CMD_CONFIG_A 245
136 #define LOG_CMD_CONFIG_C 246
137 #define LOG_CMD_SWITCH_RJ11_PAIR 247
138 #define LOG_CMD_MIB_GET 248
139 #define LOG_CMD_LOG_STOP 249
140 #define LOG_CMD_PING_REQ 250
141 #define LOG_CMD_PING_RSP 251
142 #define LOG_CMD_DISCONNECT 252
143 #define LOG_CMD_STRING_DATA 253
144 #define LOG_CMD_TEST_DATA 254
145 #define LOG_CMD_CONNECT 255
147 typedef struct _LogProtoHeader {
148 unsigned char logProtoId[2];
149 unsigned char logPartyId;
150 unsigned char logCommmand;
153 #define LOG_FILE_PORT 5100
154 #define LOG_MAX_BUF_SIZE 1400
155 #define LOG_MAX_DATA_SIZE (LOG_MAX_BUF_SIZE - sizeof(LogProtoHeader))
158 LogProtoHeader diagHdr;
159 unsigned char diagData[LOG_MAX_DATA_SIZE];
162 #define DIAG_PROXY_TERMINATE 1
164 #define DIAG_DEBUG_CMD_READ_MEM 1
165 #define DIAG_DEBUG_CMD_SET_MEM 2
166 #define DIAG_DEBUG_CMD_RESET_CONNECTION 3
167 #define DIAG_DEBUG_CMD_RESET_PHY 4
168 #define DIAG_DEBUG_CMD_RESET_CHIP 5
169 #define DIAG_DEBUG_CMD_EXEC_FUNC 6
170 #define DIAG_DEBUG_CMD_EXEC_ADSL_FUNC 7
171 #define DIAG_DEBUG_CMD_WRITE_FILE 8
172 #define DIAG_DEBUG_CMD_G992P3_DEBUG 9
173 #define DIAG_DEBUG_CMD_G992P3_DIAG_MODE 10
174 #define DIAG_DEBUG_CMD_CLEAR_TIME 11
175 #define DIAG_DEBUG_CMD_PRINT_TIME 12
176 #define DIAG_DEBUG_CMD_LOG_SAMPLES 13
178 #define DIAG_DEBUG_CMD_PLAYBACK_STOP 14
179 #define DIAG_DEBUG_CMD_PLAYBACK_RESUME 15
181 #define DIAG_DEBUG_CMD_PRINT_STAT 21
182 #define DIAG_DEBUG_CMD_CLEAR_STAT 22
186 unsigned short cmdId;
187 unsigned long param1;
188 unsigned long param2;
189 unsigned char diagData[1];
192 #define DIAG_TEST_CMD_LOAD 101
193 #define DIAG_TEST_CMD_READ 102
194 #define DIAG_TEST_CMD_WRITE 103
195 #define DIAG_TEST_CMD_APPEND 104
196 #define DIAG_TEST_CMD_TEST_COMPLETE 105
198 #define DIAG_TEST_FILENAME_LEN 64
202 unsigned short cmdId;
203 unsigned long offset;
205 unsigned long bufPtr;
206 char fileName[DIAG_TEST_FILENAME_LEN];
210 unsigned long frStart;