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.20 2004/04/28 16:52:32 ilyas Exp $
28 * Revision 1.20 2004/04/28 16:52:32 ilyas
29 * Added GDB frame processing
31 * Revision 1.19 2004/03/10 22:26:53 ilyas
32 * Added command-line parameter for IP port number.
33 * Added proxy remote termination
35 * Revision 1.18 2004/01/24 23:41:37 ilyas
36 * Added DIAG_DEBUG_CMD_LOG_SAMPLES debug command
38 * Revision 1.17 2003/11/19 02:25:45 ilyas
39 * Added definitions for LOG frame retransmission, time, ADSL2 plots
41 * Revision 1.16 2003/11/14 18:46:05 ilyas
42 * Added G992p3 debug commands
44 * Revision 1.15 2003/10/02 19:50:41 ilyas
45 * Added support for buffering data for AnnexI and statistical counters
47 * Revision 1.14 2003/09/03 19:45:11 ilyas
48 * To refuse connection with older protocol versions
50 * Revision 1.13 2003/08/30 00:12:39 ilyas
51 * Added support for running chip test regressions via DslDiags
53 * Revision 1.12 2003/08/12 00:19:28 ilyas
54 * Improved image downloading protocol.
55 * Added DEBUG command support
57 * Revision 1.11 2003/04/11 00:37:24 ilyas
58 * Added DiagProtoFrame definition
60 * Revision 1.10 2003/03/25 00:10:07 ilyas
61 * Added command for "long" BERT test
63 * Revision 1.9 2003/01/30 03:29:32 ilyas
64 * Added PHY_CFG support and fixed printing showtime counters
66 * Revision 1.8 2002/12/16 20:56:38 ilyas
67 * Added support for binary statuses
69 * Revision 1.7 2002/12/06 20:19:13 ilyas
70 * Added support for binary statuses and scrambled status strings
72 * Revision 1.6 2002/11/05 00:18:27 ilyas
73 * Added configuration dialog box for Eye tone selection.
74 * Added Centillium CRC workaround to AnnexC config dialog
75 * Bit allocation update on bit swap messages
77 * Revision 1.5 2002/07/30 23:23:43 ilyas
78 * Implemented DIAG configuration command for AnnexA and AnnexC
80 * Revision 1.4 2002/07/30 22:47:15 ilyas
81 * Added DIAG command for configuration
83 * Revision 1.3 2002/07/15 23:52:51 ilyas
84 * iAdded switch RJ11 pair command
86 * Revision 1.2 2002/04/25 17:55:51 ilyas
87 * Added mibGet command
89 * Revision 1.1 2002/04/02 22:56:39 ilyas
90 * Support DIAG connection at any time; BERT commands
93 ******************************************************************/
95 #define LOG_PROTO_ID "*L"
97 #define DIAG_PARTY_ID_MASK 0x01
98 #define LOG_PARTY_CLIENT 0x01
99 #define LOG_PARTY_SERVER 0x00
101 #define DIAG_DATA_MASK 0x0E
102 #define DIAG_DATA_LOG 0x02
103 #define DIAG_DATA_EYE 0x04
104 #define DIAG_DATA_LOG_TIME 0x08
106 #define DIAG_DATA_EX 0x80
107 #define DIAG_PARTY_ID_MASK_EX (DIAG_DATA_EX | DIAG_PARTY_ID_MASK)
108 #define LOG_PARTY_SERVER_EX (DIAG_DATA_EX | LOG_PARTY_SERVER)
110 #define DIAG_ACK_FRAME_ACK_MASK 0x000000FF
111 #define DIAG_ACK_FRAME_RCV_SHIFT 8
112 #define DIAG_ACK_FRAME_RCV_MASK 0x0000FF00
113 #define DIAG_ACK_FRAME_RCV_PRESENT 0x00010000
114 #define DIAG_ACK_TIMEOUT -1
115 #define DIAG_ACK_LEN_INDICATION -1
117 #define LOG_CMD_GDB 236
118 #define LOG_CMD_PROXY 237
119 #define LOG_CMD_RETR 238
120 #define LOG_CMD_DEBUG 239
121 #define LOG_CMD_BERT_EX 240
122 #define LOG_CMD_CFG_PHY 241
123 #define LOG_CMD_RESET 242
124 #define LOG_CMD_SCRAMBLED_STRING 243
125 #define LOG_CMD_EYE_CFG 244
126 #define LOG_CMD_CONFIG_A 245
127 #define LOG_CMD_CONFIG_C 246
128 #define LOG_CMD_SWITCH_RJ11_PAIR 247
129 #define LOG_CMD_MIB_GET 248
130 #define LOG_CMD_LOG_STOP 249
131 #define LOG_CMD_PING_REQ 250
132 #define LOG_CMD_PING_RSP 251
133 #define LOG_CMD_DISCONNECT 252
134 #define LOG_CMD_STRING_DATA 253
135 #define LOG_CMD_TEST_DATA 254
136 #define LOG_CMD_CONNECT 255
138 typedef struct _LogProtoHeader {
139 unsigned char logProtoId[2];
140 unsigned char logPartyId;
141 unsigned char logCommmand;
144 #define LOG_FILE_PORT 5100
145 #define LOG_MAX_BUF_SIZE 1400
146 #define LOG_MAX_DATA_SIZE (LOG_MAX_BUF_SIZE - sizeof(LogProtoHeader))
149 LogProtoHeader diagHdr;
150 unsigned char diagData[LOG_MAX_DATA_SIZE];
153 #define DIAG_PROXY_TERMINATE 1
155 #define DIAG_DEBUG_CMD_READ_MEM 1
156 #define DIAG_DEBUG_CMD_SET_MEM 2
157 #define DIAG_DEBUG_CMD_RESET_CONNECTION 3
158 #define DIAG_DEBUG_CMD_RESET_PHY 4
159 #define DIAG_DEBUG_CMD_RESET_CHIP 5
160 #define DIAG_DEBUG_CMD_EXEC_FUNC 6
161 #define DIAG_DEBUG_CMD_EXEC_ADSL_FUNC 7
162 #define DIAG_DEBUG_CMD_WRITE_FILE 8
163 #define DIAG_DEBUG_CMD_G992P3_DEBUG 9
164 #define DIAG_DEBUG_CMD_G992P3_DIAG_MODE 10
165 #define DIAG_DEBUG_CMD_CLEAR_TIME 11
166 #define DIAG_DEBUG_CMD_PRINT_TIME 12
167 #define DIAG_DEBUG_CMD_LOG_SAMPLES 13
169 #define DIAG_DEBUG_CMD_PRINT_STAT 21
170 #define DIAG_DEBUG_CMD_CLEAR_STAT 22
174 unsigned short cmdId;
175 unsigned long param1;
176 unsigned long param2;
177 unsigned char diagData[1];
180 #define DIAG_TEST_CMD_LOAD 101
181 #define DIAG_TEST_CMD_READ 102
182 #define DIAG_TEST_CMD_WRITE 103
183 #define DIAG_TEST_CMD_APPEND 104
184 #define DIAG_TEST_CMD_TEST_COMPLETE 105
186 #define DIAG_TEST_FILENAME_LEN 64
190 unsigned short cmdId;
191 unsigned long offset;
193 unsigned long bufPtr;
194 char fileName[DIAG_TEST_FILENAME_LEN];
198 unsigned long frStart;