HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-wreth.c
blob51d48b249e48f551ca248de9bb7832b64cd9c83f
1 /* packet-wreth.c
2 * Functions for the WSE Remote Ethernet Dissector
4 * $Id$
6 * Dissector - WSE RemoteEthernet
7 * By Clement Marrast <clement.marrast@molex.com>
8 * Copyright 2012 Clement Marrast
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * 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, see <http://www.gnu.org/licenses/>
24 #include "config.h"
26 #include <epan/packet.h>
28 #define WRETH_PORT 0xAAAA
30 static void dissect_wreth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
31 static gint WrethIdentPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
32 static gint WrethConnectPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
33 static gint WrethDisconnectPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
34 static gint WrethBlinkyPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
35 static gint WrethGetValuePacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
36 static gint WrethSetValuePacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
37 static gint WrethBoostPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
38 static gint WrethAckPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
39 static gint WrethNackPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
40 static gint WrethMailPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree);
41 static gint WrethMailDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree, guint8 fragmented);
42 static gint WrethCodefMasterInfoDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethMailboxTree);
43 static gint WrethCodefEquipmentInfoDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethMailboxTree);
45 /* Remote ethernet sub packet type */
46 #define WSE_RETH_SUBTYPE 0x0200
48 /* Remote ethernet function code */
49 #define WRETH_IDENT 1
50 #define WRETH_CONNECT 2
51 #define WRETH_ACK 3
52 #define WRETH_NACK 4
53 #define WRETH_DISCONNECT 5
54 #define WRETH_MAIL 6
55 #define WRETH_BLINKY 7
56 #define WRETH_GET_VALUE 8
57 #define WRETH_SET_VALUE 9
58 #define WRETH_BOOST 10
60 /* Remote ethernet error code */
61 #define WRETH_BAD_FUNCTION_CODE 1
62 #define WRETH_ALREADY_CONNECTED 2
63 #define WRETH_INVALID_PROTOCOL_VERSION 3
64 #define WRETH_NOT_CONNECTED 4
65 #define WRETH_INVALID_MAC_ADDRESS 5
66 #define WRETH_INVALID_FRAME_SIZE 6
67 #define WRETH_NO_MEMORY_AVAILABLE 7
68 #define WRETH_BAD_PARAMETER 8
69 #define WRETH_TASK_REGISTERED 9
71 /* Initialize the protocol and registered fields */
72 static gint wreth_proto = -1;
74 /* static gint wreth_mail_proto = -1; */
75 static int hf_Wreth_Subtype = -1;
76 static int hf_Wreth_Size = -1;
77 static int hf_Wreth_FunctionCode = -1;
78 static int hf_Wreth_FrameId = -1;
79 static int hf_Wreth_ErrorCode = -1;
80 static int hf_Wreth_Fragmented = -1;
81 static int hf_Wreth_Retry = -1;
82 static int hf_Wreth_IdentificationBiosVersion = -1;
83 static int hf_Wreth_IdentificationBoardNumber = -1;
84 static int hf_Wreth_IdentificationProtocolVersion = -1;
85 static int hf_Wreth_IdentificationBoardId = -1;
86 static int hf_Wreth_IdentificationState = -1;
87 static int hf_Wreth_IdentificationMacAddr = -1;
88 static int hf_Wreth_ConnectProtocolVersion = -1;
89 static int hf_Wreth_ConnectTimeout = -1;
90 static int hf_Wreth_BlinkyPeriod = -1;
91 static int hf_Wreth_GetValueVal = -1;
92 static int hf_Wreth_SetValueVal = -1;
93 static int hf_Wreth_BoostValue = -1;
94 static int hf_Wreth_MailDestTic = -1;
95 static int hf_Wreth_MailReserved = -1;
96 static int hf_Wreth_Mail_Codef = -1;
97 static int hf_Wreth_Mail_Status = -1;
98 static int hf_Wreth_Mail_TicUser_Root = -1;
99 static int hf_Wreth_Mail_PidUser = -1;
100 static int hf_Wreth_Mail_Mode = -1;
101 static int hf_Wreth_Mail_Time = -1;
102 static int hf_Wreth_Mail_Stop = -1;
103 static int hf_Wreth_Mail_Nfonc = -1;
104 static int hf_Wreth_Mail_Ncard = -1;
105 static int hf_Wreth_Mail_Nchan = -1;
106 static int hf_Wreth_Mail_Nes = -1;
107 static int hf_Wreth_Mail_Nb = -1;
108 static int hf_Wreth_Mail_TypVar = -1;
109 static int hf_Wreth_Mail_Adr = -1;
110 static int hf_Wreth_Mail_TicUser_DispCyc = -1;
111 static int hf_Wreth_Mail_Nb_Max_Size_Mail = -1;
112 static int hf_Wreth_Mail_User_ThreadID = -1;
113 static int hf_Wreth_Mail_DispCyc_Version = -1;
114 static int hf_Wreth_Mail_DifUserParam = -1;
115 static int hf_Wreth_Mail_Filler = -1;
116 /* static int hf_Wreth_Mail_Data = -1; */
117 static int hf_Wreth_Mail_Mastinf_Version = -1;
118 static int hf_Wreth_Mail_Mastinf_Release = -1;
119 static int hf_Wreth_Mail_Mastinf_Protocol = -1;
120 static int hf_Wreth_Mail_Mastinf_CyclicFlux = -1;
121 static int hf_Wreth_Mail_Mastinf_szProtocolName = -1;
122 static int hf_Wreth_Mail_Mastinf_MaxTypeEquipment = -1;
123 static int hf_Wreth_Mail_Mastinf_MinEquipmentNumber = -1;
124 static int hf_Wreth_Mail_Mastinf_MaxEquipmentNumber = -1;
125 static int hf_Wreth_Mail_Equinf_Version = -1;
126 static int hf_Wreth_Mail_Equinf_Release = -1;
127 static int hf_Wreth_Mail_Equinf_Network = -1;
128 static int hf_Wreth_Mail_Equinf_Protocol = -1;
129 static int hf_Wreth_Mail_Equinf_Messaging = -1;
130 static int hf_Wreth_Mail_Equinf_Equipment = -1;
131 static int hf_Wreth_Mail_Equinf_Flux = -1;
132 static int hf_Wreth_Mail_Equinf_IncWord = -1;
133 static int hf_Wreth_Mail_Equinf_IncDWord = -1;
134 static int hf_Wreth_Mail_Equinf_IncFWord = -1;
135 static int hf_Wreth_Mail_Mastinf_DllItemName = -1;
136 static int hf_Wreth_Mail_Mastinf_szEquipmentName = -1;
137 static int hf_Wreth_Mail_Equinf_MaxWriteBit = -1;
138 static int hf_Wreth_Mail_Equinf_MaxReadBit = -1;
139 static int hf_Wreth_Mail_Equinf_BreakBit = -1;
140 static int hf_Wreth_Mail_Equinf_MaxWriteIBit = -1;
141 static int hf_Wreth_Mail_Equinf_MaxReadIBit = -1;
142 static int hf_Wreth_Mail_Equinf_MaxWriteQBit = -1;
143 static int hf_Wreth_Mail_Equinf_MaxReadQBit = -1;
144 static int hf_Wreth_Mail_Equinf_BreakQBit = -1;
145 static int hf_Wreth_Mail_Equinf_MaxWriteByte = -1;
146 static int hf_Wreth_Mail_Equinf_MaxReadByte = -1;
147 static int hf_Wreth_Mail_Equinf_BreakByte = -1;
148 static int hf_Wreth_Mail_Equinf_MaxWriteIByte = -1;
149 static int hf_Wreth_Mail_Equinf_MaxReadIByte = -1;
150 static int hf_Wreth_Mail_Equinf_BreakIByte = -1;
151 static int hf_Wreth_Mail_Equinf_MaxWriteQByte = -1;
152 static int hf_Wreth_Mail_Equinf_MaxReadQByte = -1;
153 static int hf_Wreth_Mail_Equinf_BreakQByte = -1;
154 static int hf_Wreth_Mail_Equinf_MaxWriteWord = -1;
155 static int hf_Wreth_Mail_Equinf_MaxReadWord = -1;
156 static int hf_Wreth_Mail_Equinf_BreakWord = -1;
157 static int hf_Wreth_Mail_Equinf_MaxWriteIWord = -1;
158 static int hf_Wreth_Mail_Equinf_MaxReadIWord = -1;
159 static int hf_Wreth_Mail_Equinf_BreakIWord = -1;
160 static int hf_Wreth_Mail_Equinf_MaxWriteQWord = -1;
161 static int hf_Wreth_Mail_Equinf_MaxReadQWord = -1;
162 static int hf_Wreth_Mail_Equinf_BreakQWord = -1;
163 static int hf_Wreth_Mail_Equinf_MaxWriteDWord = -1;
164 static int hf_Wreth_Mail_Equinf_MaxReadDWord = -1;
165 static int hf_Wreth_Mail_Equinf_BreakDWord = -1;
166 static int hf_Wreth_Mail_Equinf_MaxWriteFWord = -1;
167 static int hf_Wreth_Mail_Equinf_MaxReadFWord = -1;
168 static int hf_Wreth_Mail_Equinf_BreakFWord = -1;
169 static int hf_Wreth_Mail_Equinf_ReadFactorWord = -1;
170 static int hf_Wreth_Mail_Equinf_ReadFactorIWord = -1;
171 static int hf_Wreth_Mail_Equinf_ReadFactorQWord = -1;
172 static int hf_Wreth_Mail_Equinf_ReadFactorDWord = -1;
173 static int hf_Wreth_Mail_Equinf_ReadFactorFWord = -1;
174 static int hf_Wreth_Mail_Equinf_WriteFactorWord = -1;
175 static int hf_Wreth_Mail_Equinf_WriteFactorIWord = -1;
176 static int hf_Wreth_Mail_Equinf_WriteFactorQWord = -1;
177 static int hf_Wreth_Mail_Equinf_WriteFactorDWord = -1;
178 static int hf_Wreth_Mail_Equinf_WriteFactorFWord = -1;
179 static int hf_Wreth_Mail_Equinf_DataFormat = -1;
180 static int hf_Wreth_Mail_Equinf_BreakIBit = -1;
182 /* Initialize the subtree pointers */
183 static gint ett_wreth = -1;
185 /* Note: vals are stored as unsigned 32 bit quantities */
186 static const value_string tabStatus[] = {
187 { 0, "stat_ok" },
188 { 1, "stat_err_fonc" },
189 { 2, "stat_err_addr" },
190 { 3, "stat_bad_frame" },
191 { 4, "stat_lock_data" },
192 { 10, "STAT_QUEUE_OVERFLOW" },
194 { 32, "stat_par" },
195 { 33, "statjb_timeout" },
196 { 34, "statjb_crc" },
197 { 35, "stat_cyc_inc" },
198 { 36, "stat_escl_inconnu" },
200 { 40, "STAT_DIF_MAX_THREAD" },
201 { 41, "stat_dif_full" },
202 { 42, "stat_dif_empty" },
203 { 43, "STAT_NES_UNKNOWN" },
204 { 45, "stat_no_soft" },
205 { 46, "stat_conf" },
206 { 47, "stat_no_board" },
207 { 48, "stat_timeout_cts" },
208 { 49, "stat_timeout_wait" },
209 { 50, "stat_fill" },
210 { 51, "stat_sys" },
211 { 52, "stat_bug" },
212 { 53, "stat_sync" },
213 { 54, "stat_nopolling" },
214 { 55, "stat_badintpol" },
215 { 56, "stat_answer" },
216 { 57, "stat_no_statment" },
217 { 58, "stat_net_no_ready" },
218 { 59, "stat_key" },
220 { 60, "stat_no_retmail" },
221 { 61, "stat_no_dsr_gt4000" },
222 { 62, "stat_no_cts_gt4000" },
223 { 63, "stat_timeout_gt4000" },
224 { 64, "stat_bcc_gt4000" },
225 { 65, "STAT_NOT_CONNECT" },
226 { 66, "STAT_RESSOURCE" },
227 { 67, "STAT_ERR_PDU" },
228 { 68, "STAT_OBJECT_NON_EXISTENT" },
229 { 69, "STAT_TYPE_CONFLICT" },
230 { 70, "STAT_ABORT_USER" },
231 { 71, "STAT_ABORT_FMS" },
232 { 72, "STAT_ABORT_LLI" },
233 { 73, "STAT_ABORT_LAYER2" },
234 { 74, "STAT_MAX_PDU_SIZE" },
235 { 75, "STAT_FEATURE_NOT_SUPPORTED" },
236 { 76, "STAT_VERSION_INCOMPATIBLE" },
237 { 77, "STAT_USER_INITIATE_DENIED" },
238 { 78, "STAT_PASSWORD_ERROR" },
239 { 79, "STAT_PROFILE_INCOMPATIBLE" },
240 { 80, "STAT_ABORT_LLI_CONTEXT" },
241 { 81, "STAT_ABORT_LLI_ABT_RC2" },
242 { 82, "STAT_ABORT_LLI_ABT_RC3" },
243 { 83, "STAT_ERR_CLASS_VFD_STATE" },
244 { 84, "STAT_ERR_CLASS_APPLICATION_REF" },
245 { 85, "STAT_ERR_CLASS_DEFINITION" },
246 { 86, "STAT_ERR_CLASS_RESSOURCE" },
247 { 87, "STAT_ERR_CLASS_SERVICE" },
248 { 88, "STAT_ERR_CLASS_ACCESS" },
249 { 89, "STAT_ERR_CLASS_OD" },
250 { 90, "STAT_ERR_CLASS_OTHER" },
251 { 91, "STAT_REJECT_PDU" },
252 { 92, "STAT_ERR_HARDWARE" },
253 { 93, "STAT_DRIVER_ACCESS" },
254 { 94, "STAT_DRIVER_BAD_VERSION" },
255 { 95, "STAT_FILL_BIG_MAIL" },
256 { 96, "STAT_NO_TASK_VERSION" },
257 { 97, "STAT_DLL_LOCKED" },
258 { 98, "STAT_BOARD_LOCKED" },
259 { 99, "STAT_MODEIO_LOCKED" },
261 /*---- RESERVED STATUS FOR USER KIT4000 ----*/
262 { 100, "STAT_KIT_START" },
263 /* ..... */
264 { 127, "STAT_KIT_END" },
265 /*------------------------------------------*/
266 { 128, "STAT_ERR_NO_REMOTE_CONNECTION" },
267 { 129, "STAT_CONFIG_OK" },
268 { 130, "STAT_CONFIG_NOK" },
270 { 131, "STAT_DNS_PENDING" },
271 { 132, "STAT_DNS_ERROR" },
272 { 133, "STAT_OVERTIME" },
274 { 134, "STAT_FRAG_WRITE" },
275 { 135, "STAT_FRAG_READ" },
277 { 136, "STAT_API_ACCESS" },
278 { 137, "STAT_QUEUE_EMPTY" },
279 { 138, "STAT_QUEUE_FULL" },
281 { 254, "STAT_DEV_INIT" },
282 { 255, "STAT_NA" },
283 { -11, "index not updated" },
284 { -10, "stat_handshake" },
285 { -9, "stat_event_data" },
286 { -8, "stat_timeout_ic_read" },
287 { -7, "stat_timeout_read" },
288 { -6, "stat_cyc_stopped" },
289 { -5, "stat_dif_not_ready" },
290 { -4, "stat_unchanged" },
291 { -3, "stat_nes_broadcast" },
292 { -2, "Unknown Status" },
293 { -1, "stat_writedif_ok" },
294 { 0, NULL }
296 static value_string_ext tabStatus_ext = VALUE_STRING_EXT_INIT(tabStatus);
298 static const value_string tabCodef[] = {
299 /* Code for monitor */
300 { 0x0000, "TIC_INVALID_ROOT" },
301 { 0x0002, "tic_monitor" },
303 /*Loader*/
304 { 0x0003, "COD_LOAD_TASK" },
305 { 0x0004, "COD_LOAD_TASK" },
307 { 0x00ff, "TIC_TASK_NON_INIT" }, /* 255 */
309 /* Code for monitor */
310 { 0x0106, "COD_MON_INFO" },
311 { 0x0109, "COD_GETTIC" },
312 { 0x0119, "COD_MON_SETTIME" },
313 { 0x0126, "COD_MON_SIZEMAIL" },
314 { 0x0127, "COD_MON_SETSYNCHRO" },
315 { 0x0128, "COD_MON_GETSYNCHRO" },
317 { 0x012A, "COD_MON_FLAG_DEBUG" },
318 { 0x012B, "COD_MON_SETSCADA_PT" },
319 { 0x012C, "COD_MON_GETSCADA_PT" },
321 { 0x0134, "COD_MON_SETGENVAR" },
322 { 0x0135, "COD_MON_GETGENVAR" },
323 { 0x0200, "COD_MON_READFLASHGT" },
324 { 0x0206, "COD_MON_SETCOMSPEED" },
325 { 0x020c, "COD_MON_TESTCARDTYPE" },
327 /*Loader*/
328 { 0x0400, "COD_LOAD_TASK" },
329 { 0x0600, "COD_RELOAD_TASK" },
331 /* Code for master function */
332 { 0x1000, "cod_initmasterline" },
333 { 0x1001, "cod_loadmasterconf" },
334 { 0x1002, "cod_masterinfo" },
335 { 0x1003, "cod_readpackbit" },
336 { 0x1004, "cod_readpackibit" },
337 { 0x1005, "cod_readword" },
338 { 0x1006, "cod_readiword" },
339 { 0x1007, "cod_readdword" },
340 { 0x1008, "cod_readfword" },
341 { 0x1009, "cod_writepackbit" },
342 { 0x100A, "cod_writeword" },
343 { 0x100B, "cod_writedword" },
344 { 0x100C, "cod_writefword" },
345 { 0x100D, "cod_readquickbit" },
346 { 0x100E, "cod_readdiag" },
347 { 0x100F, "cod_readeven" },
348 { 0x1010, "cod_readtrace" },
349 { 0x1011, "cod_statjbus" },
350 { 0x1012, "cod_creatjnet" },
351 { 0x1013, "cod_rijnet" },
352 { 0x1014, "cod_rcjnet" },
353 { 0x1015, "cod_writemes" },
354 { 0x1016, "cod_readmes" },
355 { 0x1017, "cod_manual" },
356 { 0x1018, "cod_automatic" },
357 { 0x1019, "cod_connect" },
358 { 0x101A, "cod_unconnect" },
359 { 0x101B, "cod_iocounter" },
360 { 0x101C, "cod_resetiocounter" },
361 { 0x101D, "codute_identequipment" },
362 { 0x101E, "codute_readbit_SY" },
363 { 0x101F, "codute_readbit_IO" },
364 { 0x1020, "codute_readword_CW" },
365 { 0x1021, "codute_readword_SW" },
366 { 0x1022, "codute_readword_COM" },
367 { 0x1023, "codute_readtempo" },
368 { 0x1024, "codute_readmonost_Mi" },
369 { 0x1025, "codute_readcounter_Ci" },
370 { 0x1026, "codute_readreg_Ri" },
371 { 0x1027, "codute_readsteps_Xi" },
372 { 0x1028, "codute_readdword_DW" },
373 { 0x1029, "codute_readdword_CDW" },
374 { 0x102A, "codute_readone_step" },
375 { 0x102B, "codute_writebit_SY" },
376 { 0x102C, "codute_writebit_IO" },
377 { 0x102D, "codute_writeword_SW" },
378 { 0x102E, "codute_writeword_COM" },
379 { 0x102F, "codute_writetimer_Ti" },
380 { 0x1030, "codute_writemonost_Mi" },
381 { 0x1031, "codute_writecounter_Ci" },
382 { 0x1032, "codute_writereg_Ri" },
383 { 0x1033, "codute_writedword_DW" },
384 { 0x1034, "codute_readbit_B" },
385 { 0x1035, "codute_readword_W" },
386 { 0x1036, "codute_readobjets" },
387 { 0x1037, "codute_readstruc_obj" },
388 { 0x1038, "codute_writebit_B" },
389 { 0x1039, "codute_writeword_W" },
390 { 0x103A, "codute_writestruc_obj" },
391 { 0x103B, "codute_no_requestdata" },
392 { 0x103C, "codute_prot_ver" },
393 { 0x103D, "codute_status" },
394 { 0x103E, "codute_mirror" },
395 { 0x103F, "codute_readerror_count" },
396 { 0x1040, "codute_readstation_status" },
397 { 0x1041, "codute_razerror_counter" },
398 { 0x1042, "codute_write_xgs" },
399 { 0x1043, "codute_stop" },
400 { 0x1044, "codute_run" },
401 { 0x1045, "codute_selftest" },
402 { 0x1046, "codute_init" },
403 { 0x1047, "codute_reserv" },
404 { 0x1048, "codute_unreserv" },
405 { 0x1049, "codute_entreserv" },
406 { 0x104A, "codute_initloader" },
407 { 0x104B, "codute_upload_seg" },
408 { 0x104C, "codute_end_upload_seg" },
409 { 0x104D, "codute_init_download" },
410 { 0x104E, "codute_download_seg" },
411 { 0x104F, "codute_end_download" },
412 { 0x1050, "codute_writereq_file" },
413 { 0x1051, "codute_readanswer_file" },
414 { 0x1052, "codute_exereq_file" },
415 { 0x1053, "codute_razreq_file" },
416 { 0x1054, "codute_stopdrum_DiS" },
417 { 0x1055, "codute_incdrum_DiS" },
418 { 0x1056, "codute_godrum_DiS" },
419 { 0x1057, "codute_readeven_DiS" },
420 { 0x1058, "codute_readone_DiS" },
421 { 0x1059, "codute_write_objet" },
422 { 0x105A, "cod_readpackqbit" },
423 { 0x105B, "cod_writepackqbit" },
424 { 0x105C, "cod_send_rec_txt" },
425 { 0x105D, "cod_iowhite" },
426 { 0x105E, "cod_readpackbyte" },
427 { 0x105F, "cod_readbyte" },
428 { 0x1060, "cod_writepackbyte" },
429 { 0x1061, "cod_writebyte" },
430 { 0x1062, "cod_readwordbcd" },
431 { 0x1063, "cod_writewordbcd" },
432 { 0x1064, "cod_writereadmes" },
433 { 0x1065, "cod_readqword" },
434 { 0x1066, "cod_writeqword" },
435 { 0x1067, "cod_writereaddifmes" },
436 { 0x1068, "cod_readpackibyte" },
437 { 0x1069, "cod_readibyte" },
438 { 0x106A, "cod_readpackqbyte" },
439 { 0x106B, "cod_readqbyte" },
440 { 0x106C, "cod_writepackqbyte" },
441 { 0x106D, "cod_writeqbyte" },
442 { 0x106E, "cod_readident" },
443 { 0x106F, "cod_readpackiqbit" },
444 { 0x1070, "cod_writepackiqbit" },
445 { 0x1071, "cod_layer2profibus" },
446 { 0x1072, "cod_readtimer" },
447 { 0x1073, "cod_writetimer" },
448 { 0x1074, "cod_readcounter" },
449 { 0x1075, "cod_writecounter" },
450 { 0x1076, "0x1076COD_FMSGETOD" },
451 { 0x1077, "cod_endloadmasterconf" },
452 { 0x1078, "COD_FMSSTATUS" },
453 { 0x1079, "COD_EQUIPMENTINFO" },
454 { 0x107A, "COD_WRITEREADPACKBIT" },
455 { 0x107B, "COD_WRITEREADPACKQBIT" },
456 { 0x107C, "COD_WRITEREADPACKBYTE" },
457 { 0x107D, "COD_WRITEREADBYTE" },
458 { 0x107E, "COD_WRITEREADPACKQBYTE" },
459 { 0x107F, "COD_WRITEREADQBYTE" },
460 { 0x1080, "COD_WRITEREADWORD" },
461 { 0x1081, "COD_WRITEREADQWORD" },
462 { 0x1082, "COD_WRITEREADDWORD" },
463 { 0x1083, "COD_WRITEREADFWORD" },
464 { 0x1084, "COD_WRITEREADWORDBCD" },
465 { 0x1085, "COD_CLOSECONNECTION" },
466 { 0x1086, "COD_GET_SUPPORTED_FUNCTION" },
467 { 0x1087, "COD_READOBJECT" },
468 { 0x1088, "COD_WRITEFIELDOBJECT" },
469 { 0x1089, "COD_EQUINFO_OBJ" },
470 { 0x1090, "COD_WRITEREADMSG" },
471 { 0x1091, "COD_START_SCANNER" },
473 /* Code slave function */
474 { 0x2000, "cod_initslave" },
475 { 0x2001, "cod_loadslaveconf" },
476 { 0x2002, "cod_endloadslaveconf" },
478 /* Codes Database*/
479 { 0x3000, "cod_getpackbit" },
480 { 0x3001, "cod_getbit" },
481 { 0x3002, "cod_getword" },
482 { 0x3003, "cod_getdword" },
483 { 0x3004, "cod_getfword" },
484 { 0x3005, "cod_setpackbit" },
485 { 0x3006, "cod_setbit" },
486 { 0x3007, "cod_setword" },
487 { 0x3008, "cod_setdword" },
488 { 0x3009, "cod_setfword" },
489 { 0x300A, "cod_getdispbit" },
490 { 0x300B, "cod_getdispword" },
491 { 0x300C, "cod_getdispdword" },
492 { 0x300D, "cod_getdispfword" },
493 { 0x300E, "cod_setdispbit" },
494 { 0x300F, "cod_setdispword" },
495 { 0x3010, "cod_setdispdword" },
496 { 0x3011, "cod_setdispfword" },
497 { 0x3012, "cod_incdispword" },
498 { 0x3013, "cod_incdispdword" },
499 { 0x3014, "cod_decdispword" },
500 { 0x3015, "cod_decdispdword" },
501 { 0x3016, "cod_getevent" },
502 { 0x3017, "cod_confdb" },
503 { 0x3018, "cod_puteventvar" },
504 { 0x3019, "cod_getpackbyte" },
505 { 0x301A, "cod_setpackbyte" },
506 { 0x301B, "cod_fillbit" },
507 { 0x301C, "cod_fillbyte" },
508 { 0x301D, "cod_fillword" },
509 { 0x301E, "cod_filldword" },
510 { 0x301F, "cod_fillfword" },
511 { 0x3020, "COD_APPGETBIT" },
512 { 0x3021, "COD_DBEXECUTED" },
513 { 0x3022, "COD_GETRIGHTS" },
514 { 0x3023, "COD_WFCYC_COS" },
515 { 0x3024, "COD_END_FCYC" },
516 { 0x3025, "COD_FCYC_END" },
517 { 0x3026, "COD_TAB_FCYC" },
518 { 0x3027, "COD_GETFCYCCOS" },
519 { 0x3028, "COD_SETIOAREAADDR" },
520 { 0x3029, "COD_GETIOAREAADDR" },
521 { 0x3030, "COD_SETACTFNTADDR" },
522 { 0x3031, "COD_GETACTFNTADDR" },
523 { 0x3032, "COD_GETACTFNTBITWORD" },
525 /* Code disp_cyc functions */
526 { 0x4000, "cod_cycinfo" },
527 { 0x4001, "cod_createcyc" },
528 { 0x4002, "cod_startcyc" },
529 { 0x4003, "cod_stopcyc" },
530 { 0x4004, "cod_transcyc" },
531 { 0x4005, "cod_actcyc" },
532 { 0x4006, "cod_initcyc" },
533 { 0x4007, "cod_cycparam" },
534 { 0x4008, "cod_stopallcyc" },
535 { 0x4009, "cod_stopallcycread" },
536 { 0x400A, "cod_stopallcycwrite" },
537 { 0x400B, "cod_cyctimebase" },
538 { 0x400C, "COD_CYCEXECUTED" },
539 { 0x400E, "COD_NEWCREATECYC" },
540 { 0x400F, "COD_DISPCYC_DEBUG" },
541 { 0x4010, "COD_NEWCREATECYC_ID" },
542 { 0x4011, "COD_DESTROYCYC_ID" },
543 { 0x4012, "COD_CREATECYC_OBJ" },
544 { 0x4013, "COD_TRANSCYC_VERIF" },
545 { 0x4014, "COD_CREATECYC_WRMSG" },
546 { 0x4015, "COD_NEWCREATECYC_WRMSG" },
547 { 0x4016, "COD_NEWCREATECYC_WRMSG_ID" },
548 { 0x4017, "COD_CYCEXECUTED_AND_COS" },
549 { 0x4018, "COD_STARTCYCONE" },
550 { 0x4019, "COD_GETCRESCENDO_USB" },
551 { 0x4020, "COD_GETCYCPARAM2" },
552 { 0x4021, "COD_FCYCWRITENONCOS" },
553 { 0x4022, "COD_RESETCPTACTIVATION" },
555 /* Code Root function */
556 { 0x5000, "cod_rootinfo" },
557 { 0x5001, "cod_initjbus" },
558 { 0x5002, "cod_exitjbus" },
559 { 0x5003, "cod_transdif" },
560 { 0x5004, "cod_testtransdif" },
561 { 0x5005, "cod_watchdog" },
562 { 0x5006, "cod_accesskey" },
563 { 0x5007, "cod_getmodem" },
564 { 0x5008, "cod_setmodem" },
565 { 0x5009, "COD_GETSTATIONNAME" },
566 { 0x500A, "COD_GETSTATIONINFO" },
567 { 0x500B, "COD_GETWATCHDOG" },
568 { 0x500C, "COD_DIAG_ROOT" },
570 /* Code bt100 function */
571 { 0x6000, "COD_CREATEBT" },
572 { 0x6001, "COD_TIMEBASEBT" },
573 { 0x6002, "COD_CREATEBASETIME" },
575 /* Code ADMINFL-0 : files */
576 { 0x7000, "COD_OPENFILE" },
577 { 0x7001, "COD_CLOSEFILE" },
578 { 0x7002, "COD_READFILE" },
579 { 0x7003, "COD_WRITEFILE" },
580 { 0x7004, "COD_DELETEFILE" },
581 { 0x7005, "COD_SEEKFILE" },
582 { 0x7006, "COD_TEELFILE" },
583 { 0x7007, "COD_EOFFILE" },
584 { 0x7008, "COD_GETPTRFILE" },
585 { 0x7009, "COD_DIRFILE" },
587 /* Code MSG USER */
588 { 0x7500, "COD_USER_FIRST" },
590 { 0x7501, "COD_USER_EXCHANGE" },
591 { 0x7502, "COD_USER_STATUSEXCHANGE" },
592 { 0x7503, "COD_USER_SENDFRAME" },
593 { 0x7504, "COD_USER_STATUSSENDFRAME" },
595 { 0x7600, "COD_USER_EQUIPPARAMSREAD" },
596 { 0x7601, "COD_USER_EQUIPINFOUPDATE" },
597 { 0x7602, "COD_USER_ANALYZESTDREQUEST" },
598 { 0x7603, "COD_USER_ANALYZEOBJREQUEST" },
599 { 0x7604, "COD_USER_PREPROCESSREQUEST" },
600 { 0x7605, "COD_USER_PREPROCESSANSWER" },
601 { 0x7606, "COD_USER_EXEFUNCREQUEST" },
602 { 0x7607, "COD_USER_EXEFUNCANSWER" },
603 { 0x7608, "COD_USER_ABORTFRAME" },
605 { 0x7700, "COD_USER_GETFUNCTION" },
606 { 0x7701, "COD_USER_EXEFUNCREQ" },
607 { 0x7702, "COD_USER_EXEFUNCACK" },
609 { 0x7999, "COD_USER_LAST" },
611 /* ??? */
612 { 0x8000, "COD_INDWRITEMASK" },
614 /* Code ADMINMSG-0 : message */
615 { 0x9000, "COD_READMSG" },
616 { 0x9001, "COD_CLEARMSG" },
617 { 0x9002, "COD_DIRMSG" },
618 { 0x9003, "COD_ENABLEMSG" },
619 { 0x9004, "COD_DISABLEMSG" },
620 { 0x9005, "COD_CREATEMSG" },
621 { 0x9006, "COD_GETDESCRMSG" },
622 { 0x9007, "COD_DIRALLMSG" },
623 { 0x9008, "COD_INFOMSG" },
624 { 0x9009, "COD_GETFLAGSMSG" },
625 { 0x900A, "COD_SETFLAGSMSG" },
626 { 0x9100, "COD_MSG_ENABLED" },
628 /* First LLI MAIL Codef */
629 { 0x9500, "COD_LLI_WHITE" },
631 /* system commands */
632 { 0x9510, "COD_MANAGE_INIT" },
633 { 0x9511, "COD_MANAGE_SAP" },
634 { 0x9512, "COD_LLI_DIAG" },
635 { 0x9513, "COD_LLI_MANAGE" },
636 { 0x9514, "COD_ADD_INSTANCE" },
637 { 0x9515, "COD_REM_INSTANCE" },
638 { 0x9516, "COD_GET_MESSAGING" },
639 { 0x9517, "COD_LLI_CMD" },
641 /* protocol commands */
642 { 0x9600, "COD_LLI_EXCHANGE" },
643 { 0x9602, "COD_LLI_INIT" },
644 { 0x9603, "COD_LLI_START" },
645 { 0x9604, "COD_LLI_STOP" },
646 { 0x9605, "COD_LLI_READ_INPUT" },
647 { 0x9606, "COD_LLI_READ_OUTPUT" },
648 { 0x9607, "COD_LLI_ABORT" },
649 { 0x9608, "COD_LLI_TRACE_ON" },
650 { 0x9609, "COD_LLI_TRACE_OFF" },
651 { 0x960A, "COD_LLI_WRITE_OUTPUT" },
652 { 0x960B, "COD_LLI_READ_ASYNC" },
653 { 0x960C, "COD_LLI_WRITE_ASYNC" },
654 { 0x960D, "COD_LLI_DP_SERVICE" },
655 { 0x960E, "COD_LLI_FDL_SERVICE" },
656 { 0x960F, "COD_LLI_SCAN_L2" },
657 { 0x9610, "COD_LLI_SCAN_MESSAGING" },
658 { 0x9611, "COD_LLI_MPISLAVE_SERVICE" },
659 { 0x9612, "COD_LLI_FDL_MESSAGING" },
661 /* Last LLI MAIL Codef */
662 { 0x96FF, "COD_LLI_LAST" },
664 { 0xA001, "COD_REFRESH_INPUT" },
665 { 0xA002, "COD_REFRESH_OUTPUT" },
667 /* Codef SOCKET */
668 { 0xB001, "COD_SOCKET_CREATE" },
669 { 0xB002, "COD_SOCKET_BIND" },
670 { 0xB003, "COD_SOCKET_CONNECT" },
671 { 0xB004, "COD_SOCKET_LISTEN" },
672 { 0xB005, "COD_SOCKET_ACCEPT" },
673 { 0xB006, "COD_SOCKET_SENDTO" },
674 { 0xB007, "COD_SOCKET_RECVFROM" },
675 { 0xB008, "COD_SOCKET_SEND" },
676 { 0xB009, "COD_SOCKET_RECV" },
677 { 0xB010, "COD_SOCKET_CLOSE" },
678 { 0xB011, "COD_SOCKET_HOST_INFO" },
679 { 0xB012, "COD_SOCKET_PEER_INFO" },
680 { 0xB013, "COD_SOCKET_RECV_GET_DATA" },
681 { 0xB014, "COD_SOCKET_GET_STAT" },
682 { 0xB015, "COD_SOCKET_RESET_STAT" },
683 /*New type for the version 2*/
684 { 0xB016, "COD_SOCKET_SETSOCKOPT" },
685 { 0xB017, "COD_SOCKET_SELECT" },
686 { 0xB018, "COD_SOCKET_SHUTDOWN_ALL" },
687 { 0xB019, "COD_SOCKET_DIAG_SUMMARY" },
688 { 0xB01A, "COD_SOCKET_DIAG_DETAILS" },
689 { 0xB01B, "COD_SOCKET_DIAG_SO" },
690 { 0xB01C, "COD_SOCKET_EVENT" },
692 /* Codef ARP */
693 { 0xC000, "COD_ARP_QUERY" },
694 { 0xC001, "COD_ARP_FLUSH" },
696 { 0xFFEF, "index not updated" }, /* -11 */
698 { 0xFFFE, "Unknown Status" },
699 { 0, NULL }
701 static value_string_ext tabCodef_ext = VALUE_STRING_EXT_INIT(tabCodef);
703 static const value_string FunctionCodes[] = {
704 { WRETH_IDENT, "Identification" },
705 { WRETH_CONNECT, "Connection" },
706 { WRETH_ACK, "Acknowledge" },
707 { WRETH_NACK, "Non acknowledge" },
708 { WRETH_DISCONNECT, "Disconnection" },
709 { WRETH_MAIL, "Mail" },
710 { WRETH_BLINKY, "Blinky" },
711 { WRETH_GET_VALUE, "Get value" },
712 { WRETH_SET_VALUE, "Set value" },
713 { WRETH_BOOST, "Boost" },
714 { 0, NULL }
716 static value_string_ext FunctionCodes_ext = VALUE_STRING_EXT_INIT(FunctionCodes);
718 static const value_string ErrorCode_vals[] = {
719 { 0, "No error" },
720 { WRETH_BAD_FUNCTION_CODE, "Bad function code" },
721 { WRETH_ALREADY_CONNECTED, "Already connected" },
722 { WRETH_INVALID_PROTOCOL_VERSION, "Invalid protocol version" },
723 { WRETH_NOT_CONNECTED, "Not connected" },
724 { WRETH_INVALID_MAC_ADDRESS, "Invalid MAC address" },
725 { WRETH_INVALID_FRAME_SIZE, "Invalid frame size" },
726 { WRETH_NO_MEMORY_AVAILABLE, "No memory available" },
727 { WRETH_BAD_PARAMETER, "Bad parameter" },
728 { WRETH_TASK_REGISTERED, "Task registered" },
729 { 0, NULL }
731 static value_string_ext ErrorCode_vals_ext = VALUE_STRING_EXT_INIT(ErrorCode_vals);
733 static void dissect_wreth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
736 guint16 packet_type,functionCode;
737 guint8 fragmented;
738 proto_item *mi, *ti;
739 proto_tree *pWrethTree ;
740 guint8 Offset = 0 ;
743 col_set_str(pinfo->cinfo, COL_PROTOCOL, "Wreth");
744 /* Clear out stuff in the info column */
745 col_clear(pinfo->cinfo,COL_INFO);
747 /*Read the packet type, if not good, exit*/
748 packet_type = tvb_get_ntohs(tvb,0);
749 if(packet_type != WSE_RETH_SUBTYPE) return;
751 mi = proto_tree_add_protocol_format(tree, wreth_proto, tvb, Offset, -1, "WSE remote ethernet");
752 pWrethTree = proto_item_add_subtree(mi, ett_wreth);
754 functionCode = tvb_get_letohs(tvb,4);
755 fragmented = tvb_get_guint8(tvb,10);
757 if(fragmented > 2)
759 col_set_str(pinfo->cinfo, COL_INFO, "Invalid fragmented byte");
760 return;
763 if (tree)
765 /*Subtype*/
766 proto_tree_add_item(pWrethTree, hf_Wreth_Subtype, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
768 /*Size*/
769 proto_tree_add_item(pWrethTree, hf_Wreth_Size, tvb, Offset + 2, 2, ENC_LITTLE_ENDIAN);
771 /*Function code*/
772 proto_tree_add_item(pWrethTree, hf_Wreth_FunctionCode, tvb, Offset + 4, 2, ENC_LITTLE_ENDIAN);
774 /*FrameID*/
775 proto_tree_add_item(pWrethTree, hf_Wreth_FrameId, tvb, Offset + 6, 2, ENC_LITTLE_ENDIAN);
777 /*Error Code*/
778 proto_tree_add_item(pWrethTree, hf_Wreth_ErrorCode, tvb, Offset + 8, 2, ENC_LITTLE_ENDIAN);
782 /*Fragmented*/
783 if(fragmented == 2)
785 ti = proto_tree_add_item(pWrethTree, hf_Wreth_Fragmented, tvb, Offset + 10, 1, ENC_LITTLE_ENDIAN);
786 proto_item_append_text(ti, ": second fragment");
788 /*Retry*/
789 proto_tree_add_item(pWrethTree, hf_Wreth_Retry, tvb, Offset + 11, 1, ENC_LITTLE_ENDIAN);
791 WrethMailDissection(tvb, Offset + 12, pinfo, pWrethTree, fragmented);
792 return;
795 ti = proto_tree_add_item(pWrethTree, hf_Wreth_Fragmented, tvb, Offset + 10, 1, ENC_LITTLE_ENDIAN);
796 if(fragmented == 1)
798 proto_item_append_text(ti, ": first fragment");
799 }else
800 proto_item_append_text(ti, ": no");
802 /*Retry*/
803 proto_tree_add_item(pWrethTree, hf_Wreth_Retry, tvb, Offset + 11, 1, ENC_LITTLE_ENDIAN);
805 /* Add items to protocol tree specific to Wreth */
806 switch(functionCode)
808 case WRETH_IDENT:
809 WrethIdentPacket(tvb, Offset + 12, pinfo, pWrethTree);
810 break;
811 case WRETH_CONNECT:
812 WrethConnectPacket(tvb, Offset + 12, pinfo, pWrethTree);
813 break;
814 case WRETH_ACK:
815 WrethAckPacket(tvb, Offset + 12, pinfo, pWrethTree);
816 break;
817 case WRETH_NACK:
818 WrethNackPacket(tvb, Offset + 12, pinfo, pWrethTree);
819 break;
820 case WRETH_DISCONNECT:
821 WrethDisconnectPacket(tvb, Offset + 12, pinfo, pWrethTree);
822 break;
823 case WRETH_MAIL:
824 WrethMailPacket(tvb, Offset + 12, pinfo, pWrethTree);
825 break;
826 case WRETH_BLINKY:
827 WrethBlinkyPacket(tvb, Offset + 12, pinfo, pWrethTree);
828 break;
829 case WRETH_GET_VALUE:
830 WrethGetValuePacket(tvb, Offset + 12, pinfo, pWrethTree);
831 break;
832 case WRETH_SET_VALUE:
833 WrethSetValuePacket(tvb, Offset + 12, pinfo, pWrethTree);
834 break;
835 case WRETH_BOOST:
836 WrethBoostPacket(tvb, Offset + 12, pinfo, pWrethTree);
837 break;
838 default:
839 break;
844 /*****************************************************************************/
846 static const value_string IdentState[] = {
847 { 0, "Ready" },
848 { 1, "Busy"},
849 { 0, NULL }
852 gint WrethIdentPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree)
854 guint16 Size;
856 Size = tvb_get_letohs(tvb, 2);
858 if((Size != 0)&&(Size != 19))
860 /* Invalid identification frame */
861 col_set_str(pInfo->cinfo, COL_INFO, "Invalid identification frame");
862 return 0;
865 if(Size == 0)
867 col_set_str(pInfo->cinfo, COL_INFO, "Identification question");
868 return 0;
871 /*BiosVersion*/
872 proto_tree_add_item(pWrethTree, hf_Wreth_IdentificationBiosVersion, tvb, Offset, 6, ENC_ASCII|ENC_NA);
874 /*Board Number*/
875 proto_tree_add_item(pWrethTree, hf_Wreth_IdentificationBoardNumber, tvb, Offset + 6, 2, ENC_LITTLE_ENDIAN);
877 /*Protocol*/
878 proto_tree_add_item(pWrethTree, hf_Wreth_IdentificationProtocolVersion, tvb, Offset + 8, 2, ENC_LITTLE_ENDIAN);
880 /*Board Id*/
881 proto_tree_add_item(pWrethTree, hf_Wreth_IdentificationBoardId, tvb, Offset + 10, 2, ENC_LITTLE_ENDIAN);
883 /*State*/
884 proto_tree_add_item(pWrethTree, hf_Wreth_IdentificationState, tvb, Offset + 12, 1, ENC_LITTLE_ENDIAN);
886 /*Client MAC address*/
887 proto_tree_add_item(pWrethTree, hf_Wreth_IdentificationMacAddr, tvb, Offset + 13, 6, ENC_BIG_ENDIAN);
889 col_set_str(pInfo->cinfo, COL_INFO, "Identification response");
891 return Offset;
894 /*****************************************************************************/
896 gint WrethConnectPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree _U_)
898 guint16 Size;
900 Size = tvb_get_letohs(tvb,2);
902 if(Size != 4)
904 /* Invalid connection frame */
905 col_set_str(pInfo->cinfo, COL_INFO, "Invalid connection frame");
906 return 0;
909 col_set_str(pInfo->cinfo, COL_INFO, "Connection");
911 proto_tree_add_item(pWrethTree, hf_Wreth_ConnectProtocolVersion, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
913 proto_tree_add_item(pWrethTree, hf_Wreth_ConnectTimeout, tvb, Offset + 2, 2, ENC_LITTLE_ENDIAN);
915 return Offset;
918 /*****************************************************************************/
920 gint WrethDisconnectPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree _U_)
922 guint16 Size;
924 Size = tvb_get_letohs(tvb,2);
926 if(Size != 0)
928 /* Invalid disconnection frame */
929 col_set_str(pInfo->cinfo, COL_INFO, "Invalid disconnection frame");
930 return 0;
933 col_set_str(pInfo->cinfo, COL_INFO, "Disconnection");
935 return Offset;
938 /*****************************************************************************/
940 gint WrethBlinkyPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree)
942 guint16 Size;
944 Size = tvb_get_letohs(tvb,2);
946 if(Size != 2)
948 /* Invalid blinky frame */
949 col_set_str(pInfo->cinfo, COL_INFO, "Invalid blinky frame");
950 return 0;
953 col_set_str(pInfo->cinfo, COL_INFO, "Blinky");
955 proto_tree_add_item(pWrethTree, hf_Wreth_BlinkyPeriod, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
957 return Offset;
960 /*****************************************************************************/
962 gint WrethGetValuePacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree)
964 guint16 Size;
966 Size = tvb_get_letohs(tvb,2);
968 switch(Size)
970 case 0:
971 col_set_str(pInfo->cinfo, COL_INFO, "Get value question");
972 break;
973 case 1:
974 proto_tree_add_item(pWrethTree, hf_Wreth_GetValueVal, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
975 col_set_str(pInfo->cinfo, COL_INFO, "Get value response");
976 break;
977 default:
978 col_set_str(pInfo->cinfo, COL_INFO, "Invalid get value frame");
979 break;
982 return Offset;
985 /*****************************************************************************/
987 gint WrethSetValuePacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree)
989 guint16 Size;
991 Size = tvb_get_letohs(tvb,2);
993 if(Size != 0)
995 col_set_str(pInfo->cinfo, COL_INFO, "Invalid set value frame");
998 proto_tree_add_item(pWrethTree, hf_Wreth_SetValueVal, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1000 col_set_str(pInfo->cinfo, COL_INFO, "Set value question");
1002 return Offset;
1005 /*****************************************************************************/
1006 static const value_string BoostValue[] = {
1007 { 0, "disabled" },
1008 { 1, "enabled"},
1009 { 0, NULL }
1012 gint WrethBoostPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree)
1014 guint16 Size;
1016 Size = tvb_get_letohs(tvb,2);
1018 if(Size != 2)
1020 /* Invalid boost frame */
1021 col_set_str(pInfo->cinfo, COL_INFO, "Invalid boost frame");
1022 return 0;
1025 col_set_str(pInfo->cinfo, COL_INFO, "Boost");
1027 proto_tree_add_item(pWrethTree, hf_Wreth_BoostValue, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1029 return Offset;
1032 /*****************************************************************************/
1034 gint WrethAckPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree _U_)
1036 guint16 Size;
1038 Size = tvb_get_letohs(tvb,2);
1040 if(Size != 0)
1042 /* Invalid ack frame */
1043 col_set_str(pInfo->cinfo, COL_INFO, "Invalid acknowledge frame");
1044 return 0;
1047 col_set_str(pInfo->cinfo, COL_INFO, "Acknowledge");
1049 return Offset;
1052 /*****************************************************************************/
1054 gint WrethNackPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree)
1056 guint16 Size;
1057 guint16 ErrorCode;
1059 Size = tvb_get_letohs(tvb,2);
1060 ErrorCode = tvb_get_letohs(tvb,8);
1062 if((Size != 0)&&(Size != 6))
1064 /* Invalid ack frame */
1065 col_set_str(pInfo->cinfo, COL_INFO, "Invalid non acknowledge frame");
1066 return 0;
1070 col_add_str(pInfo->cinfo, COL_INFO, val_to_str_ext(ErrorCode, &ErrorCode_vals_ext, "Unknown 0x%04x"));
1072 if(Size == 6)
1074 proto_tree_add_item(pWrethTree, hf_Wreth_IdentificationMacAddr, tvb, Offset, 6, ENC_BIG_ENDIAN);
1077 return Offset;
1080 /*****************************************************************************/
1082 gint WrethMailPacket(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree)
1085 proto_tree_add_item(pWrethTree, hf_Wreth_MailDestTic, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1086 proto_tree_add_item(pWrethTree, hf_Wreth_MailReserved, tvb, Offset + 2, 4, ENC_LITTLE_ENDIAN);
1088 col_set_str(pInfo->cinfo, COL_INFO, "Mail");
1090 /*Frame not fragmented => last argument = 0*/
1091 WrethMailDissection(tvb, Offset+6, pInfo, pWrethTree,0);
1093 return Offset;
1096 /*****************************************************************************/
1098 gint WrethMailDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, proto_tree * pWrethTree, guint8 fragmented)
1100 proto_item *mi;
1101 proto_tree *pWrethMailboxTree;
1102 gint Nb = 0;
1103 guint16 Codef = 0;
1105 mi = proto_tree_add_protocol_format(pWrethTree, wreth_proto, tvb, Offset, -1, "MailBox");
1106 pWrethMailboxTree = proto_item_add_subtree(mi, ett_wreth);
1108 /*If it's not the last fragment, display the header of the MailBox*/
1109 if (2 != fragmented)
1111 guint16 Card, Chan;
1112 gint Status;
1114 /*Codef*/
1115 Codef = tvb_get_letohs(tvb,Offset);
1116 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Codef, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1117 Offset += 2;
1118 /*Status*/
1119 Status = (gint16)tvb_get_letohs(tvb,Offset); /* cast fetched value to signed so sign is extended */
1120 /* so that lookup of 32-bit unsigned in tabCodef */
1121 /* value_string array will work properly. */
1122 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Status, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1123 Offset += 2;
1124 /*TicUser Root*/
1125 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_TicUser_Root, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1126 Offset += 2;
1127 /*Mail PidUser*/
1128 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_PidUser, tvb, Offset, 4, ENC_LITTLE_ENDIAN);
1129 Offset += 4;
1130 /*Mail Mode*/
1131 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Mode, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1132 Offset += 2;
1133 /*Mail Time*/
1134 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Time, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1135 Offset += 2;
1136 /*Mail Stop*/
1137 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Stop, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1138 Offset += 2;
1139 /*Mail Nfonc*/
1140 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nfonc, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1141 Offset += 2;
1142 /*Mail Ncard*/
1143 Card = tvb_get_letohs(tvb,Offset);
1144 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Ncard, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1145 Offset += 2;
1146 /*Mail Nchan*/
1147 Chan = tvb_get_letohs(tvb,Offset);
1148 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nchan, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1149 Offset += 2;
1150 /*Mail Nes*/
1151 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nes, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1152 Offset += 2;
1153 /*Mail Nb*/
1154 Nb = (gint)tvb_get_letohs(tvb,Offset);
1155 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nb, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1156 Offset += 2;
1157 /*Mail TypVar*/
1158 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_TypVar, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1159 Offset += 2;
1160 /*Mail Adr*/
1161 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Adr, tvb, Offset, 4, ENC_LITTLE_ENDIAN);
1162 Offset += 4;
1163 /*Mail TicUser*/
1164 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_TicUser_DispCyc, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1165 Offset += 2;
1166 /*Mail Nb Max Size Mail*/
1167 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nb_Max_Size_Mail, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1168 Offset += 2;
1169 /*Mail User ThreadID*/
1170 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_User_ThreadID, tvb, Offset, 4, ENC_LITTLE_ENDIAN);
1171 Offset += 4;
1172 /*Mail DispCyc Version*/
1173 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_DispCyc_Version, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1174 Offset += 2;
1175 /*Mail DifUserParam*/
1176 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_DifUserParam, tvb, Offset, 4, ENC_LITTLE_ENDIAN);
1177 Offset += 4;
1178 /*Mail Filler*/
1179 proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Filler, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1180 Offset += 2;
1182 col_add_fstr(pInfo->cinfo, COL_INFO, "Mail : Codef = Ox%X (%s), Status = %02d (%s), Card = %d, Chan = %d" ,
1183 Codef,
1184 val_to_str_ext(Codef, &tabCodef_ext, "Unknown 0x%04x%"),
1185 Status,
1186 val_to_str_ext(Status, &tabStatus_ext, "Unknown %d"),
1187 Card,
1188 Chan);
1190 else
1192 col_set_str(pInfo->cinfo, COL_INFO, "Mail : Data Second Fragment ");
1195 if (0 != Nb)
1197 /*Specific Decode for some Codef*/
1198 switch(Codef)
1200 case 0x1002: /*Master Info*/
1201 WrethCodefMasterInfoDissection(tvb, Offset, pInfo, pWrethMailboxTree);
1202 break;
1203 case 0x1079: /*Equipment Info*/
1204 WrethCodefEquipmentInfoDissection(tvb, Offset, pInfo, pWrethMailboxTree);
1205 break;
1206 default:
1207 proto_tree_add_protocol_format(pWrethMailboxTree, wreth_proto, tvb, Offset, -1, "Data");
1208 break;
1212 return Offset;
1215 /*****************************************************************************/
1217 gint WrethCodefMasterInfoDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo _U_, proto_tree * pWrethMailboxTree)
1219 proto_item *mi;
1220 proto_tree *pWrethMailboxDataTree;
1222 mi = proto_tree_add_protocol_format(pWrethMailboxTree, wreth_proto, tvb, Offset, -1, "Data");
1223 pWrethMailboxDataTree = proto_item_add_subtree(mi, ett_wreth);
1225 /*bVersion*/
1226 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_Version, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1227 Offset += 1;
1228 /*bRelease*/
1229 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_Release, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1230 Offset += 1;
1231 /*bProtocol*/
1232 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_Protocol, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1233 Offset += 1;
1234 /*bCyclicFlux*/
1235 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_CyclicFlux, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1236 Offset += 1;
1237 /*szProtocolName*/
1238 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_szProtocolName, tvb, Offset, 16, ENC_ASCII|ENC_NA);
1239 Offset += 16;
1240 /*bMaxTypeEquipment*/
1241 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_MaxTypeEquipment, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1242 Offset += 1;
1243 /*wMinEquipmentNumber*/
1244 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_MinEquipmentNumber, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1245 Offset += 2;
1246 /*wMaxEquipmentNumber*/
1247 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_MaxEquipmentNumber, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1248 Offset += 2;
1250 return Offset;
1253 /*****************************************************************************/
1255 gint WrethCodefEquipmentInfoDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo _U_, proto_tree * pWrethMailboxTree)
1257 proto_item *mi;
1258 proto_tree *pWrethMailboxDataTree;
1260 mi = proto_tree_add_protocol_format(pWrethMailboxTree, wreth_proto, tvb, Offset, -1, "Data");
1261 pWrethMailboxDataTree = proto_item_add_subtree(mi, ett_wreth);
1263 /*bVersion*/
1264 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_Version, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1265 Offset += 1;
1266 /*Free*/
1267 Offset += 1;
1268 /*bRelease*/
1269 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_Release, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1270 Offset += 1;
1271 /*bNetwork*/
1272 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_Network, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1273 Offset += 1;
1274 /*bProtocol*/
1275 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_Protocol, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1276 Offset += 1;
1277 /*bMessaging*/
1278 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_Messaging, tvb, Offset, 1, ENC_LITTLE_ENDIAN);
1279 Offset += 1;
1280 /*wEquipment*/
1281 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_Equipment, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1282 Offset += 2;
1283 /*wFlux*/
1284 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_Flux, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1285 Offset += 2;
1286 /*Free*/
1287 Offset += 10;
1288 /*IncWord*/
1289 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_IncWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1290 Offset += 2;
1291 /*IncDWord*/
1292 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_IncDWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1293 Offset += 2;
1294 /*IncFWord*/
1295 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_IncFWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1296 Offset += 2;
1297 /*Free*/
1298 Offset += 4;
1299 /*DllItemName*/
1300 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_DllItemName, tvb, Offset, 14, ENC_ASCII|ENC_NA);
1301 Offset += 14;
1302 /*szEquipmentName*/
1303 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Mastinf_szEquipmentName, tvb, Offset, 16, ENC_ASCII|ENC_NA);
1304 Offset += 16;
1305 /*Free*/
1306 Offset += 2;
1307 /*wMaxWriteBit*/
1308 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1309 Offset += 2;
1310 /*wMaxReadBit*/
1311 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1312 Offset += 2;
1313 /*wBreakBit*/
1314 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1315 Offset += 2;
1316 /*wMaxWriteIBit*/
1317 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteIBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1318 Offset += 2;
1319 /*wMaxReadIBit*/
1320 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadIBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1321 Offset += 2;
1322 /*wBreakIBit*/
1323 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakIBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1324 Offset += 2;
1325 /*wMaxWriteQBit*/
1326 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteQBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1327 Offset += 2;
1328 /*wMaxReadQBit*/
1329 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadQBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1330 Offset += 2;
1331 /*wBreakQBit*/
1332 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakQBit, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1333 Offset += 2;
1334 /*wMaxWriteByte*/
1335 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1336 Offset += 2;
1337 /*wMaxReadByte*/
1338 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1339 Offset += 2;
1340 /*wBreakByte*/
1341 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1342 Offset += 2;
1343 /*wMaxWriteIByte*/
1344 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteIByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1345 Offset += 2;
1346 /*wMaxReadIByte*/
1347 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadIByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1348 Offset += 2;
1349 /*wBreakIByte*/
1350 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakIByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1351 Offset += 2;
1352 /*wMaxWriteQByte*/
1353 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteQByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1354 Offset += 2;
1355 /*wMaxReadQByte*/
1356 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadQByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1357 Offset += 2;
1358 /*wBreakQByte*/
1359 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakQByte, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1360 Offset += 2;
1361 /*wMaxWriteWord*/
1362 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1363 Offset += 2;
1364 /*wMaxReadWord*/
1365 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1366 Offset += 2;
1367 /*wBreakWord*/
1368 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1369 Offset += 2;
1370 /*wMaxWriteIWord*/
1371 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteIWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1372 Offset += 2;
1373 /*wMaxReadIWord*/
1374 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadIWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1375 Offset += 2;
1376 /*wBreakIWord*/
1377 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakIWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1378 Offset += 2;
1379 /*wMaxWriteQWord*/
1380 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteQWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1381 Offset += 2;
1382 /*wMaxReadQWord*/
1383 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadQWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1384 Offset += 2;
1385 /*wBreakQWord*/
1386 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakQWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1387 Offset += 2;
1388 /*wMaxWriteDWord*/
1389 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteDWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1390 Offset += 2;
1391 /*wMaxReadDWord*/
1392 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadDWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1393 Offset += 2;
1394 /*wBreakDWord*/
1395 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakDWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1396 Offset += 2;
1397 /*wMaxWriteFWord*/
1398 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxWriteFWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1399 Offset += 2;
1400 /*wMaxReadFWord*/
1401 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_MaxReadFWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1402 Offset += 2;
1403 /*wBreakFWord*/
1404 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_BreakFWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1405 Offset += 2;
1406 /*wReadFactorWord*/
1407 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_ReadFactorWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1408 Offset += 2;
1409 /*wReadFactorIWord*/
1410 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_ReadFactorIWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1411 Offset += 2;
1412 /*wReadFactorQWord*/
1413 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_ReadFactorQWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1414 Offset += 2;
1415 /*wReadFactorDWord*/
1416 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_ReadFactorDWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1417 Offset += 2;
1418 /*wReadFactorFWord*/
1419 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_ReadFactorFWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1420 Offset += 2;
1421 /*wWriteFactorWord*/
1422 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_WriteFactorWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1423 Offset += 2;
1424 /*wWriteFactorIWord*/
1425 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_WriteFactorIWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1426 Offset += 2;
1427 /*wWriteFactorQWord*/
1428 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_WriteFactorQWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1429 Offset += 2;
1430 /*wWriteFactorDWord*/
1431 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_WriteFactorDWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1432 Offset += 2;
1433 /*wWriteFactorFWord*/
1434 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_WriteFactorFWord, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1435 Offset += 2;
1436 /*wDataFormat*/
1437 proto_tree_add_item(pWrethMailboxDataTree, hf_Wreth_Mail_Equinf_DataFormat, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
1438 Offset += 2;
1440 return Offset;
1443 void proto_register_wreth(void)
1445 static hf_register_info hf[] =
1447 /* Wreth header fields */
1448 { &hf_Wreth_Subtype,
1449 { "Subtype", "wreth.Subtype",
1450 FT_UINT16, BASE_DEC, NULL, 0x0,
1451 NULL, HFILL }
1453 { &hf_Wreth_Size,
1454 { "Size", "wreth.Size",
1455 FT_UINT16, BASE_DEC, NULL, 0x0,
1456 "", HFILL }
1458 { &hf_Wreth_FunctionCode,
1459 { "Function code","wreth.FunctionCode",
1460 FT_UINT16, BASE_DEC | BASE_EXT_STRING, &FunctionCodes_ext, 0x0,
1461 NULL, HFILL }
1463 { &hf_Wreth_FrameId,
1464 { "FrameId", "wreth.FrameId",
1465 FT_UINT16, BASE_DEC, NULL, 0x0,
1466 NULL, HFILL }
1468 { &hf_Wreth_ErrorCode,
1469 { "Error code", "wreth.ErrorCode",
1470 FT_UINT16, BASE_DEC | BASE_EXT_STRING, &ErrorCode_vals_ext, 0x0,
1471 NULL, HFILL }
1473 { &hf_Wreth_Fragmented,
1474 { "Fragmented", "wreth.Fragmented",
1475 FT_UINT8, BASE_DEC, NULL, 0x0,
1476 NULL, HFILL }
1478 { &hf_Wreth_Retry,
1479 { "Retry", "wreth.Retry",
1480 FT_UINT8, BASE_DEC, NULL, 0x0,
1481 NULL, HFILL }
1483 { &hf_Wreth_IdentificationBiosVersion,
1484 { "Bios version", "wreth.IdentBiosVersion",
1485 FT_STRING, BASE_NONE, NULL, 0x0,
1486 NULL, HFILL }
1488 { &hf_Wreth_IdentificationBoardNumber,
1489 { "Board number", "wreth.IdentBoardNumber",
1490 FT_UINT16, BASE_DEC, NULL, 0x0,
1491 NULL, HFILL }
1493 { &hf_Wreth_IdentificationProtocolVersion,
1494 { "Protocol version", "wreth.IdentProtocolVersion",
1495 FT_UINT16, BASE_DEC, NULL, 0x0,
1496 NULL, HFILL }
1498 { &hf_Wreth_IdentificationBoardId,
1499 { "Board Id", "wreth.IdentBoardId",
1500 FT_UINT16, BASE_DEC, NULL, 0x0,
1501 NULL, HFILL }
1503 { &hf_Wreth_IdentificationState,
1504 { "State", "wreth.IdentState",
1505 FT_UINT8, BASE_DEC, VALS(IdentState), 0x0,
1506 NULL, HFILL }
1508 { &hf_Wreth_IdentificationMacAddr,
1509 { "Client MAC address :", "wreth.IdentClientMacAddr",
1510 FT_ETHER, BASE_NONE, NULL, 0x0,
1511 NULL, HFILL }
1513 { &hf_Wreth_ConnectProtocolVersion,
1514 { "Protocol version", "wreth.ConnectProtocolVersion",
1515 FT_UINT16, BASE_DEC, NULL, 0x0,
1516 NULL, HFILL }
1518 { &hf_Wreth_ConnectTimeout,
1519 { "Connect timeout", "wreth.ConnectTimeout",
1520 FT_UINT16, BASE_DEC, NULL, 0x0,
1521 NULL, HFILL }
1523 { &hf_Wreth_BlinkyPeriod,
1524 { "Period", "wreth.BlinkyPeriod",
1525 FT_UINT16, BASE_DEC, NULL, 0x0,
1526 NULL, HFILL }
1528 { &hf_Wreth_GetValueVal,
1529 { "Value", "wreth.GetValue",
1530 FT_UINT8, BASE_DEC, NULL, 0x0,
1531 NULL, HFILL }
1533 { &hf_Wreth_SetValueVal,
1534 { "Value", "wreth.SetValue",
1535 FT_UINT8, BASE_DEC, NULL, 0x0,
1536 NULL, HFILL }
1538 { &hf_Wreth_BoostValue,
1539 { "Boost", "wreth.BoostStatus",
1540 FT_UINT16, BASE_DEC, VALS(BoostValue), 0x0,
1541 NULL, HFILL }
1543 { &hf_Wreth_MailDestTic,
1544 { "Dest tic", "wreth.MailDestTic",
1545 FT_UINT16, BASE_DEC, NULL, 0x0,
1546 NULL, HFILL }
1548 { &hf_Wreth_MailReserved,
1549 { "Reserved", "wreth.MailReserved",
1550 FT_UINT32, BASE_DEC, NULL, 0x0,
1551 NULL, HFILL }
1553 { &hf_Wreth_Mail_Codef,
1554 { "Codef", "wreth.Mail.Codef",
1555 FT_UINT16, BASE_HEX | BASE_EXT_STRING, &tabCodef_ext, 0x0,
1556 NULL, HFILL }
1558 { &hf_Wreth_Mail_Status,
1559 { "Status", "wreth.Mail.Status",
1560 FT_INT16, BASE_DEC | BASE_EXT_STRING, &tabStatus_ext, 0x0,
1561 NULL, HFILL }
1563 { &hf_Wreth_Mail_TicUser_Root,
1564 { "TicUser Root", "wreth.Mail.TicUserRoot",
1565 FT_UINT16, BASE_DEC, NULL, 0x0,
1566 NULL, HFILL }
1568 { &hf_Wreth_Mail_PidUser,
1569 { "PidUser", "wreth.Mail.PidUser",
1570 FT_UINT32, BASE_DEC, NULL, 0x0,
1571 NULL, HFILL }
1573 { &hf_Wreth_Mail_Mode,
1574 { "Mode", "wreth.Mail.Mode",
1575 FT_UINT16, BASE_DEC, NULL, 0x0,
1576 NULL, HFILL }
1578 { &hf_Wreth_Mail_Time,
1579 { "Time", "wreth.Mail.Time",
1580 FT_UINT16, BASE_DEC, NULL, 0x0,
1581 NULL, HFILL }
1583 { &hf_Wreth_Mail_Stop,
1584 { "Stop", "wreth.Mail.Stop",
1585 FT_UINT16, BASE_DEC, NULL, 0x0,
1586 NULL, HFILL }
1588 { &hf_Wreth_Mail_Nfonc,
1589 { "Nfonc", "wreth.Mail.Nfonc",
1590 FT_UINT16, BASE_DEC, NULL, 0x0,
1591 NULL, HFILL }
1593 { &hf_Wreth_Mail_Ncard,
1594 { "Ncard", "wreth.Mail.Ncard",
1595 FT_UINT16, BASE_DEC, NULL, 0x0,
1596 NULL, HFILL }
1598 { &hf_Wreth_Mail_Nchan,
1599 { "Nchan", "wreth.Mail.Nchan",
1600 FT_UINT16, BASE_DEC, NULL, 0x0,
1601 NULL, HFILL }
1603 { &hf_Wreth_Mail_Nes,
1604 { "Nes", "wreth.Mail.Nes",
1605 FT_UINT16, BASE_DEC, NULL, 0x0,
1606 NULL, HFILL }
1608 { &hf_Wreth_Mail_Nb,
1609 { "Nb", "wreth.Mail.Nb",
1610 FT_UINT16, BASE_DEC, NULL, 0x0,
1611 NULL, HFILL }
1613 { &hf_Wreth_Mail_TypVar,
1614 { "TypVar", "wreth.Mail.TypVar",
1615 FT_UINT16, BASE_DEC, NULL, 0x0,
1616 NULL, HFILL }
1618 { &hf_Wreth_Mail_Adr,
1619 { "Adr", "wreth.Mail.Adr",
1620 FT_UINT32, BASE_DEC, NULL, 0x0,
1621 NULL, HFILL }
1623 { &hf_Wreth_Mail_TicUser_DispCyc,
1624 { "TicUser DispCyc", "wreth.Mail.TicUser.DispCyc",
1625 FT_UINT16, BASE_DEC, NULL, 0x0,
1626 NULL, HFILL }
1628 { &hf_Wreth_Mail_Nb_Max_Size_Mail,
1629 { "Nb Max Size Mail", "wreth.Mail.TicUser.Nb.Max.Size.Mail",
1630 FT_UINT16, BASE_DEC, NULL, 0x0,
1631 NULL, HFILL }
1633 { &hf_Wreth_Mail_User_ThreadID,
1634 { "User ThreadID", "wreth.Mail.User.ThreadID",
1635 FT_UINT32, BASE_DEC, NULL, 0x0,
1636 NULL, HFILL }
1638 { &hf_Wreth_Mail_DispCyc_Version,
1639 { "DispCyc Version", "wreth.Mail.DispCyc.Version",
1640 FT_UINT16, BASE_DEC, NULL, 0x0,
1641 NULL, HFILL }
1643 { &hf_Wreth_Mail_DifUserParam,
1644 { "DifUserParam", "wreth.Mail.DifUserParam",
1645 FT_UINT32, BASE_DEC, NULL, 0x0,
1646 NULL, HFILL }
1648 { &hf_Wreth_Mail_Filler,
1649 { "Filler", "wreth.Mail.Filler",
1650 FT_UINT16, BASE_DEC, NULL, 0x0,
1651 NULL, HFILL }
1653 #if 0
1654 { &hf_Wreth_Mail_Data,
1655 { "Data", "wreth.Mail.Data",
1656 FT_UINT16, BASE_DEC, NULL, 0x0,
1657 NULL, HFILL }
1659 #endif
1660 { &hf_Wreth_Mail_Mastinf_Version,
1661 { "Version", "wreth.Mail.Mastinf.Version",
1662 FT_UINT8, BASE_DEC, NULL, 0x0,
1663 NULL, HFILL }
1665 { &hf_Wreth_Mail_Mastinf_Release,
1666 { "Release", "wreth.Mail.Mastinf.Release",
1667 FT_UINT8, BASE_DEC, NULL, 0x0,
1668 NULL, HFILL }
1670 { &hf_Wreth_Mail_Mastinf_Protocol,
1671 { "Protocol", "wreth.Mail.Mastinf.Protocol",
1672 FT_UINT8, BASE_DEC, NULL, 0x0,
1673 NULL, HFILL }
1675 { &hf_Wreth_Mail_Mastinf_CyclicFlux,
1676 { "CyclicFlux", "wreth.Mail.Mastinf.CyclicFlux",
1677 FT_UINT8, BASE_DEC, NULL, 0x0,
1678 NULL, HFILL }
1680 { &hf_Wreth_Mail_Mastinf_szProtocolName,
1681 { "ProtocolName", "wreth.Mail.Mastinf.ProtocolName",
1682 FT_STRING, BASE_NONE, NULL, 0x0,
1683 NULL, HFILL }
1685 { &hf_Wreth_Mail_Mastinf_MaxTypeEquipment,
1686 { "MaxTypeEquipment", "wreth.Mail.Mastinf.MaxTypeEquipment",
1687 FT_UINT8, BASE_DEC, NULL, 0x0,
1688 NULL, HFILL }
1690 { &hf_Wreth_Mail_Mastinf_MinEquipmentNumber,
1691 { "MinEquipmentNumber", "wreth.Mail.Mastinf.MinEquipmentNumber",
1692 FT_UINT16, BASE_DEC, NULL, 0x0,
1693 NULL, HFILL }
1695 { &hf_Wreth_Mail_Mastinf_MaxEquipmentNumber,
1696 { "MaxEquipmentNumber", "wreth.Mail.Mastinf.MaxEquipmentNumber",
1697 FT_UINT16, BASE_DEC, NULL, 0x0,
1698 NULL, HFILL }
1700 { &hf_Wreth_Mail_Equinf_Version,
1701 { "Version", "wreth.Mail.Equinf.Version",
1702 FT_UINT8, BASE_DEC, NULL, 0x0,
1703 NULL, HFILL }
1705 { &hf_Wreth_Mail_Equinf_Release,
1706 { "Release", "wreth.Mail.Equinf.Release",
1707 FT_UINT8, BASE_DEC, NULL, 0x0,
1708 NULL, HFILL }
1710 { &hf_Wreth_Mail_Equinf_Network,
1711 { "Network", "wreth.Mail.Equinf.Network",
1712 FT_UINT8, BASE_DEC, NULL, 0x0,
1713 NULL, HFILL }
1715 { &hf_Wreth_Mail_Equinf_Protocol,
1716 { "Protocol", "wreth.Mail.Equinf.Protocol",
1717 FT_UINT8, BASE_DEC, NULL, 0x0,
1718 NULL, HFILL }
1720 { &hf_Wreth_Mail_Equinf_Messaging,
1721 { "Messaging", "wreth.Mail.Equinf.Messaging",
1722 FT_UINT8, BASE_DEC, NULL, 0x0,
1723 NULL, HFILL }
1725 { &hf_Wreth_Mail_Equinf_Equipment,
1726 { "Equipment", "wreth.Mail.Equinf.Equipment",
1727 FT_UINT16, BASE_DEC, NULL, 0x0,
1728 NULL, HFILL }
1730 { &hf_Wreth_Mail_Equinf_Flux,
1731 { "Flux", "wreth.Mail.Equinf.Flux",
1732 FT_UINT16, BASE_DEC, NULL, 0x0,
1733 NULL, HFILL }
1735 { &hf_Wreth_Mail_Equinf_IncWord,
1736 { "IncWord", "wreth.Mail.Equinf.IncWord",
1737 FT_UINT16, BASE_DEC, NULL, 0x0,
1738 NULL, HFILL }
1740 { &hf_Wreth_Mail_Equinf_IncDWord,
1741 { "IncDWord", "wreth.Mail.Equinf.IncDWord",
1742 FT_UINT16, BASE_DEC, NULL, 0x0,
1743 NULL, HFILL }
1745 { &hf_Wreth_Mail_Equinf_IncFWord,
1746 { "IncFWord", "wreth.Mail.Equinf.IncFWord",
1747 FT_UINT16, BASE_DEC, NULL, 0x0,
1748 NULL, HFILL }
1750 { &hf_Wreth_Mail_Mastinf_DllItemName,
1751 { "DllItemName", "wreth.Mail.Equinf.DllItemName",
1752 FT_STRING, BASE_NONE, NULL, 0x0,
1753 NULL, HFILL }
1755 { &hf_Wreth_Mail_Mastinf_szEquipmentName,
1756 { "EquipmentName", "wreth.Mail.Equinf.EquipmentName",
1757 FT_STRING, BASE_NONE, NULL, 0x0,
1758 NULL, HFILL }
1760 { &hf_Wreth_Mail_Equinf_MaxWriteBit,
1761 { "MaxWriteBit", "wreth.Mail.Equinf.MaxWriteBit",
1762 FT_UINT16, BASE_DEC, NULL, 0x0,
1763 NULL, HFILL }
1765 { &hf_Wreth_Mail_Equinf_MaxReadBit,
1766 { "MaxReadBit", "wreth.Mail.Equinf.MaxReadBit",
1767 FT_UINT16, BASE_DEC, NULL, 0x0,
1768 NULL, HFILL }
1770 { &hf_Wreth_Mail_Equinf_BreakBit,
1771 { "BreakBit", "wreth.Mail.Equinf.BreakBit",
1772 FT_UINT16, BASE_DEC, NULL, 0x0,
1773 NULL, HFILL }
1775 { &hf_Wreth_Mail_Equinf_MaxWriteIBit,
1776 { "MaxWriteIBit", "wreth.Mail.Equinf.MaxWriteIBit",
1777 FT_UINT16, BASE_DEC, NULL, 0x0,
1778 NULL, HFILL }
1780 { &hf_Wreth_Mail_Equinf_MaxReadIBit,
1781 { "MaxReadIBit", "wreth.Mail.Equinf.MaxReadIBit",
1782 FT_UINT16, BASE_DEC, NULL, 0x0,
1783 NULL, HFILL }
1785 { &hf_Wreth_Mail_Equinf_MaxWriteQBit,
1786 { "MaxWriteQBit", "wreth.Mail.Equinf.MaxWriteQBit",
1787 FT_UINT16, BASE_DEC, NULL, 0x0,
1788 NULL, HFILL }
1790 { &hf_Wreth_Mail_Equinf_MaxReadQBit,
1791 { "MaxReadQBit", "wreth.Mail.Equinf.MaxReadQBit",
1792 FT_UINT16, BASE_DEC, NULL, 0x0,
1793 NULL, HFILL }
1795 { &hf_Wreth_Mail_Equinf_BreakQBit,
1796 { "BreakQBit", "wreth.Mail.Equinf.BreakQBit",
1797 FT_UINT16, BASE_DEC, NULL, 0x0,
1798 NULL, HFILL }
1800 { &hf_Wreth_Mail_Equinf_MaxWriteByte,
1801 { "MaxWriteByte", "wreth.Mail.Equinf.MaxWriteByte",
1802 FT_UINT16, BASE_DEC, NULL, 0x0,
1803 NULL, HFILL }
1805 { &hf_Wreth_Mail_Equinf_MaxReadByte,
1806 { "MaxReadByte", "wreth.Mail.Equinf.MaxReadByte",
1807 FT_UINT16, BASE_DEC, NULL, 0x0,
1808 NULL, HFILL }
1810 { &hf_Wreth_Mail_Equinf_BreakByte,
1811 { "BreakByte", "wreth.Mail.Equinf.BreakByte",
1812 FT_UINT16, BASE_DEC, NULL, 0x0,
1813 NULL, HFILL }
1815 { &hf_Wreth_Mail_Equinf_MaxWriteIByte,
1816 { "MaxWriteIByte", "wreth.Mail.Equinf.MaxWriteIByte",
1817 FT_UINT16, BASE_DEC, NULL, 0x0,
1818 NULL, HFILL }
1820 { &hf_Wreth_Mail_Equinf_MaxReadIByte,
1821 { "MaxReadIByte", "wreth.Mail.Equinf.MaxReadIByte",
1822 FT_UINT16, BASE_DEC, NULL, 0x0,
1823 NULL, HFILL }
1825 { &hf_Wreth_Mail_Equinf_BreakIByte,
1826 { "BreakIByte", "wreth.Mail.Equinf.BreakIByte",
1827 FT_UINT16, BASE_DEC, NULL, 0x0,
1828 NULL, HFILL }
1830 { &hf_Wreth_Mail_Equinf_MaxWriteQByte,
1831 { "MaxWriteQByte", "wreth.Mail.Equinf.MaxWriteQByte",
1832 FT_UINT16, BASE_DEC, NULL, 0x0,
1833 NULL, HFILL }
1835 { &hf_Wreth_Mail_Equinf_MaxReadQByte,
1836 { "MaxReadQByte", "wreth.Mail.Equinf.MaxReadQByte",
1837 FT_UINT16, BASE_DEC, NULL, 0x0,
1838 NULL, HFILL }
1841 { &hf_Wreth_Mail_Equinf_BreakQByte ,
1842 { "BreakQByte", "wreth.Mail.Equinf.BreakQByte",
1843 FT_UINT16, BASE_DEC, NULL, 0x0,
1844 NULL, HFILL }
1846 { &hf_Wreth_Mail_Equinf_MaxWriteWord ,
1847 { "MaxWriteWord", "wreth.Mail.Equinf.MaxWriteWord",
1848 FT_UINT16, BASE_DEC, NULL, 0x0,
1849 NULL, HFILL }
1851 { &hf_Wreth_Mail_Equinf_MaxReadWord ,
1852 { "MaxReadWord", "wreth.Mail.Equinf.MaxReadWord",
1853 FT_UINT16, BASE_DEC, NULL, 0x0,
1854 NULL, HFILL }
1856 { &hf_Wreth_Mail_Equinf_BreakWord ,
1857 { "BreakWord", "wreth.Mail.Equinf.BreakWord",
1858 FT_UINT16, BASE_DEC, NULL, 0x0,
1859 NULL, HFILL }
1861 { &hf_Wreth_Mail_Equinf_MaxWriteIWord ,
1862 { "MaxWriteIWord", "wreth.Mail.Equinf.MaxWriteIWord",
1863 FT_UINT16, BASE_DEC, NULL, 0x0,
1864 NULL, HFILL }
1866 { &hf_Wreth_Mail_Equinf_MaxReadIWord ,
1867 { "MaxReadIWord", "wreth.Mail.Equinf.MaxReadIWord",
1868 FT_UINT16, BASE_DEC, NULL, 0x0,
1869 NULL, HFILL }
1871 { &hf_Wreth_Mail_Equinf_BreakIWord ,
1872 { "BreakIWord", "wreth.Mail.Equinf.BreakIWord",
1873 FT_UINT16, BASE_DEC, NULL, 0x0,
1874 NULL, HFILL }
1876 { &hf_Wreth_Mail_Equinf_MaxReadQWord ,
1877 { "MaxReadQWord", "wreth.Mail.Equinf.MaxReadQWord",
1878 FT_UINT16, BASE_DEC, NULL, 0x0,
1879 NULL, HFILL }
1881 { &hf_Wreth_Mail_Equinf_MaxWriteQWord ,
1882 { "MaxWriteQWord", "wreth.Mail.Equinf.MaxWriteQWord",
1883 FT_UINT16, BASE_DEC, NULL, 0x0,
1884 NULL, HFILL }
1886 { &hf_Wreth_Mail_Equinf_BreakQWord ,
1887 { "BreakQWord", "wreth.Mail.Equinf.BreakQWord",
1888 FT_UINT16, BASE_DEC, NULL, 0x0,
1889 NULL, HFILL }
1891 { &hf_Wreth_Mail_Equinf_MaxWriteDWord ,
1892 { "MaxWriteDWord", "wreth.Mail.Equinf.MaxWriteDWord",
1893 FT_UINT16, BASE_DEC, NULL, 0x0,
1894 NULL, HFILL }
1896 { &hf_Wreth_Mail_Equinf_MaxReadDWord ,
1897 { "MaxReadDWord", "wreth.Mail.Equinf.MaxReadDWord",
1898 FT_UINT16, BASE_DEC, NULL, 0x0,
1899 NULL, HFILL }
1901 { &hf_Wreth_Mail_Equinf_BreakDWord ,
1902 { "BreakDWord", "wreth.Mail.Equinf.BreakDWord",
1903 FT_UINT16, BASE_DEC, NULL, 0x0,
1904 NULL, HFILL }
1906 { &hf_Wreth_Mail_Equinf_MaxWriteFWord ,
1907 { "MaxWriteFWord", "wreth.Mail.Equinf.MaxWriteFWord",
1908 FT_UINT16, BASE_DEC, NULL, 0x0,
1909 NULL, HFILL }
1911 { &hf_Wreth_Mail_Equinf_MaxReadFWord ,
1912 { "MaxReadFWord", "wreth.Mail.Equinf.MaxReadFWord",
1913 FT_UINT16, BASE_DEC, NULL, 0x0,
1914 NULL, HFILL }
1916 { &hf_Wreth_Mail_Equinf_BreakFWord ,
1917 { "BreakFWord", "wreth.Mail.Equinf.BreakFWord",
1918 FT_UINT16, BASE_DEC, NULL, 0x0,
1919 NULL, HFILL }
1921 { &hf_Wreth_Mail_Equinf_ReadFactorWord ,
1922 { "ReadFactorWord", "wreth.Mail.Equinf.ReadFactorWord",
1923 FT_UINT16, BASE_DEC, NULL, 0x0,
1924 NULL, HFILL }
1926 { &hf_Wreth_Mail_Equinf_ReadFactorIWord ,
1927 { "ReadFactorIWord", "wreth.Mail.Equinf.ReadFactorIWord",
1928 FT_UINT16, BASE_DEC, NULL, 0x0,
1929 NULL, HFILL }
1931 { &hf_Wreth_Mail_Equinf_ReadFactorQWord ,
1932 { "ReadFactorQWord", "wreth.Mail.Equinf.ReadFactorQWord",
1933 FT_UINT16, BASE_DEC, NULL, 0x0,
1934 NULL, HFILL }
1936 { &hf_Wreth_Mail_Equinf_ReadFactorDWord ,
1937 { "ReadFactorDWord", "wreth.Mail.Equinf.ReadFactorDWord",
1938 FT_UINT16, BASE_DEC, NULL, 0x0,
1939 NULL, HFILL }
1941 { &hf_Wreth_Mail_Equinf_ReadFactorFWord ,
1942 { "ReadFactorFWord", "wreth.Mail.Equinf.ReadFactorFWord",
1943 FT_UINT16, BASE_DEC, NULL, 0x0,
1944 NULL, HFILL }
1946 { &hf_Wreth_Mail_Equinf_WriteFactorWord ,
1947 { "WriteFactorWord", "wreth.Mail.Equinf.WriteFactorWord",
1948 FT_UINT16, BASE_DEC, NULL, 0x0,
1949 NULL, HFILL }
1951 { &hf_Wreth_Mail_Equinf_WriteFactorIWord ,
1952 { "WriteFactorIWord", "wreth.Mail.Equinf.WriteFactorIWord",
1953 FT_UINT16, BASE_DEC, NULL, 0x0,
1954 NULL, HFILL }
1956 { &hf_Wreth_Mail_Equinf_WriteFactorQWord ,
1957 { "WriteFactorQWord", "wreth.Mail.Equinf.WriteFactorQWord",
1958 FT_UINT16, BASE_DEC, NULL, 0x0,
1959 NULL, HFILL }
1961 { &hf_Wreth_Mail_Equinf_WriteFactorDWord ,
1962 { "WriteFactorDWord", "wreth.Mail.Equinf.WriteFactorDWord",
1963 FT_UINT16, BASE_DEC, NULL, 0x0,
1964 NULL, HFILL }
1966 { &hf_Wreth_Mail_Equinf_WriteFactorFWord ,
1967 { "WriteFactorFWord", "wreth.Mail.Equinf.WriteFactorFWord",
1968 FT_UINT16, BASE_DEC, NULL, 0x0,
1969 NULL, HFILL }
1971 { &hf_Wreth_Mail_Equinf_DataFormat ,
1972 { "DataFormat", "wreth.Mail.Equinf.DataFormat",
1973 FT_UINT16, BASE_DEC, NULL, 0x0,
1974 NULL, HFILL }
1976 { &hf_Wreth_Mail_Equinf_BreakIBit ,
1977 { "BreakIBit", "wreth.Mail.Equinf.BreakIBit",
1978 FT_UINT16, BASE_DEC, NULL, 0x0,
1979 NULL, HFILL }
1983 static gint *ett[] = {
1984 &ett_wreth
1987 wreth_proto = proto_register_protocol (
1988 "WSE remote ethernet", /* name */
1989 "WRETH", /* short name */
1990 "wreth" /* abbrev */
1992 proto_register_field_array(wreth_proto, hf, array_length(hf));
1993 proto_register_subtree_array(ett, array_length(ett));
1996 void proto_reg_handoff_wreth(void)
1998 dissector_handle_t wreth_handle;
2000 wreth_handle = create_dissector_handle(dissect_wreth, wreth_proto);
2001 dissector_add_uint("ethertype", WRETH_PORT, wreth_handle);
2005 * Editor modelines - http://www.wireshark.org/tools/modelines.html
2007 * Local variables:
2008 * c-basic-offset: 4
2009 * tab-width: 8
2010 * indent-tabs-mode: nil
2011 * End:
2013 * vi: set shiftwidth=4 tabstop=8 expandtab:
2014 * :indentSize=4:tabSize=8:noTabs=true: