2 * Routines for RTnet packet disassembly
4 * Copyright (c) 2003 by Erwin Rol <erwin@erwinrol.com>
5 * Copyright (c) 2004 by Jan Kiszka <jan.kiszka@web.de>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1999 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
18 #include <epan/packet.h>
19 #include <epan/addr_resolv.h>
20 #include <epan/etypes.h>
22 #include <wsutil/array.h>
26 * http://www.rtnet.org/
28 * https://github.com/iocroblab/rtnet/blob/master/Documentation/RTcfg.spec
29 * https://github.com/iocroblab/rtnet/blob/master/Documentation/RTmac.spec
32 void proto_register_rtmac(void);
33 void proto_reg_handoff_rtmac(void);
35 static dissector_handle_t rtmac_handle
;
36 static dissector_handle_t rtcfg_handle
;
38 void proto_register_rtcfg(void);
39 void proto_reg_handoff_rtcfg(void);
41 #define RTMAC_TYPE_TDMA 0x0001 /* since version 2 */
42 #define RTMAC_TYPE_TDMA_V1 0x9031 /* first TDMA version */
44 static const value_string rtmac_type_vals
[] = {
45 { RTMAC_TYPE_TDMA
, "TDMA" },
46 { RTMAC_TYPE_TDMA_V1
, "TDMA-V1" },
50 #define RTMAC_FLAG_TUNNEL 0x01
51 #define RTMAC_FLAGS_RES 0xFE
53 #define RTCFG_MSG_S1_CONFIG 0x0
54 #define RTCFG_MSG_ANN_NEW 0x1
55 #define RTCFG_MSG_ANN_REPLY 0x2
56 #define RTCFG_MSG_S2_CONFIG 0x3
57 #define RTCFG_MSG_S2_FRAG 0x4
58 #define RTCFG_MSG_ACK 0x5
59 #define RTCFG_MSG_READY 0x6
60 #define RTCFG_MSG_HBEAT 0x7
61 #define RTCFG_MSG_DEAD_STN 0x8
63 static const value_string rtcfg_msg_vals
[] = {
64 { RTCFG_MSG_S1_CONFIG
, "Stage 1 Config" },
65 { RTCFG_MSG_ANN_NEW
, "New Announce" },
66 { RTCFG_MSG_ANN_REPLY
, "Reply Announce" },
67 { RTCFG_MSG_S2_CONFIG
, "Stage 2 Config" },
68 { RTCFG_MSG_S2_FRAG
, "Stage 2 Fragment" },
69 { RTCFG_MSG_ACK
, "Acknowledge" },
70 { RTCFG_MSG_READY
, "Ready" },
71 { RTCFG_MSG_HBEAT
, "Heartbeat" },
72 { RTCFG_MSG_DEAD_STN
, "Dead Station" },
76 #define RTCFG_ADDRESS_TYPE_MAC 0x00
77 #define RTCFG_ADDRESS_TYPE_IP 0x01
79 static const value_string rtcfg_address_type_vals
[] = {
80 { RTCFG_ADDRESS_TYPE_MAC
, "MAC" },
81 { RTCFG_ADDRESS_TYPE_IP
, "IP" },
85 #define TDMA_V1_MSG_NOTIFY_MASTER 0x10
86 #define TDMA_V1_MSG_REQUEST_TEST 0x11
87 #define TDMA_V1_MSG_ACK_TEST 0x12
88 #define TDMA_V1_MSG_REQUEST_CONF 0x13
89 #define TDMA_V1_MSG_ACK_CONF 0x14
90 #define TDMA_V1_MSG_ACK_ACK_CONF 0x15
91 #define TDMA_V1_MSG_STATION_LIST 0x16
92 #define TDMA_V1_MSG_REQUEST_CHANGE_OFFSET 0x17
93 #define TDMA_V1_MSG_START_OF_FRAME 0x18
95 static const value_string tdma_v1_msg_vals
[] = {
96 { TDMA_V1_MSG_NOTIFY_MASTER
, "Notify Master" },
97 { TDMA_V1_MSG_REQUEST_TEST
, "Request Test" },
98 { TDMA_V1_MSG_ACK_TEST
, "Acknowledge Test" },
99 { TDMA_V1_MSG_REQUEST_CONF
, "Request Config" },
100 { TDMA_V1_MSG_ACK_CONF
, "Acknowledge Config" },
101 { TDMA_V1_MSG_ACK_ACK_CONF
, "Ack Ack Config" },
102 { TDMA_V1_MSG_STATION_LIST
, "Station List" },
103 { TDMA_V1_MSG_REQUEST_CHANGE_OFFSET
, "Request Change Offset" },
104 { TDMA_V1_MSG_START_OF_FRAME
, "Start of Frame" },
108 #define TDMA_MSG_SYNC 0x0000
109 #define TDMA_MSG_CAL_REQUEST 0x0010
110 #define TDMA_MSG_CAL_REPLY 0x0011
112 static const value_string tdma_msg_vals
[] = {
113 { TDMA_MSG_SYNC
, "Synchronisation" },
114 { TDMA_MSG_CAL_REQUEST
, "Request Calibration" },
115 { TDMA_MSG_CAL_REPLY
, "Reply Calibration" },
119 static dissector_table_t ethertype_table
;
120 static dissector_handle_t data_handle
;
122 /* Define the rtnet proto */
123 static int proto_rtmac
;
124 static int proto_tdma
;
125 static int proto_rtcfg
;
128 static int hf_rtmac_header_type
;
129 static int hf_rtmac_header_ver
;
130 static int hf_rtmac_header_flags
;
131 static int hf_rtmac_header_flags_tunnel
;
132 static int hf_rtmac_header_flags_res
;
133 static int hf_rtmac_header_res_v1
;
137 static int hf_rtcfg_vers_id
;
138 static int hf_rtcfg_vers
;
139 static int hf_rtcfg_id
;
140 static int hf_rtcfg_address_type
;
141 static int hf_rtcfg_client_ip_address
;
142 static int hf_rtcfg_server_ip_address
;
143 static int hf_rtcfg_burst_rate
;
144 static int hf_rtcfg_padding
;
145 static int hf_rtcfg_s1_config_length
;
146 static int hf_rtcfg_config_data
;
147 static int hf_rtcfg_client_flags
;
148 static int hf_rtcfg_client_flags_available
;
149 static int hf_rtcfg_client_flags_ready
;
150 static int hf_rtcfg_client_flags_res
;
151 static int hf_rtcfg_server_flags
;
152 static int hf_rtcfg_server_flags_res0
;
153 static int hf_rtcfg_server_flags_ready
;
154 static int hf_rtcfg_server_flags_res2
;
155 static int hf_rtcfg_active_stations
;
156 static int hf_rtcfg_heartbeat_period
;
157 static int hf_rtcfg_s2_config_length
;
158 static int hf_rtcfg_config_offset
;
159 static int hf_rtcfg_ack_length
;
160 static int hf_rtcfg_client_hw_address
;
164 static int hf_tdma_v1_msg
;
166 /* TDMA REQUEST_CONF */
167 static int hf_tdma_v1_msg_request_conf_station
;
168 static int hf_tdma_v1_msg_request_conf_padding
;
169 static int hf_tdma_v1_msg_request_conf_mtu
;
170 static int hf_tdma_v1_msg_request_conf_cycle
;
173 static int hf_tdma_v1_msg_ack_conf_station
;
174 static int hf_tdma_v1_msg_ack_conf_padding
;
175 static int hf_tdma_v1_msg_ack_conf_mtu
;
176 static int hf_tdma_v1_msg_ack_conf_cycle
;
178 /* TDMA ACK_ACK_CONF */
179 static int hf_tdma_v1_msg_ack_ack_conf_station
;
180 static int hf_tdma_v1_msg_ack_ack_conf_padding
;
182 /* TDMA REQUEST_TEST */
183 static int hf_tdma_v1_msg_request_test_counter
;
184 static int hf_tdma_v1_msg_request_test_tx
;
187 static int hf_tdma_v1_msg_ack_test_counter
;
188 static int hf_tdma_v1_msg_ack_test_tx
;
190 /* TDMA STATION_LIST */
191 static int hf_tdma_v1_msg_station_list_nr_stations
;
192 static int hf_tdma_v1_msg_station_list_padding
;
194 static int hf_tdma_v1_msg_station_list_ip
;
195 static int hf_tdma_v1_msg_station_list_nr
;
197 /* TDMA CHANGE_OFFSET */
198 static int hf_tdma_v1_msg_request_change_offset_offset
;
200 /* TDMA START_OF_FRAME */
201 static int hf_tdma_v1_msg_start_of_frame_timestamp
;
204 /* TDMA since version 2 */
205 static int hf_tdma_ver
;
206 static int hf_tdma_id
;
209 static int hf_tdma_sync_cycle
;
210 static int hf_tdma_sync_xmit_stamp
;
211 static int hf_tdma_sync_sched_xmit
;
213 /* TDMA Request Calibration */
214 static int hf_tdma_req_cal_xmit_stamp
;
215 static int hf_tdma_req_cal_rpl_cycle
;
216 static int hf_tdma_req_cal_rpl_slot
;
218 /* TDMA Reply Calibration */
219 static int hf_tdma_rpl_cal_req_stamp
;
220 static int hf_tdma_rpl_cal_rcv_stamp
;
221 static int hf_tdma_rpl_cal_xmit_stamp
;
224 /* Define the tree for rtnet */
225 static int ett_rtmac
;
226 static int ett_rtmac_flags
;
228 static int ett_rtcfg
;
231 dissect_rtnet_tdma_notify_master(tvbuff_t
*tvb _U_
, unsigned offset
, proto_tree
*tree _U_
)
237 dissect_rtnet_tdma_request_test(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
)
239 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_test_counter
, tvb
,
240 offset
, 4, ENC_LITTLE_ENDIAN
);
243 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_test_tx
, tvb
,
244 offset
, 8, ENC_LITTLE_ENDIAN
);
251 dissect_rtnet_tdma_ack_test(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
)
253 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_test_counter
, tvb
,
254 offset
, 4, ENC_LITTLE_ENDIAN
);
257 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_test_tx
, tvb
,
258 offset
, 8, ENC_LITTLE_ENDIAN
);
265 dissect_rtnet_tdma_request_conf(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
)
267 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_conf_station
, tvb
,
268 offset
, 1, ENC_BIG_ENDIAN
);
271 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_conf_padding
, tvb
,
272 offset
, 1, ENC_BIG_ENDIAN
);
275 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_conf_mtu
, tvb
,
276 offset
, 2, ENC_BIG_ENDIAN
);
279 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_conf_cycle
, tvb
,
280 offset
, 4, ENC_BIG_ENDIAN
);
288 dissect_rtnet_tdma_ack_conf(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
)
290 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_conf_station
, tvb
,
291 offset
, 1, ENC_BIG_ENDIAN
);
294 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_conf_padding
, tvb
,
295 offset
, 1, ENC_BIG_ENDIAN
);
298 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_conf_mtu
, tvb
,
299 offset
, 2, ENC_BIG_ENDIAN
);
302 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_conf_cycle
, tvb
,
303 offset
, 4, ENC_BIG_ENDIAN
);
310 dissect_rtnet_tdma_ack_ack_conf(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
) {
312 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_ack_conf_station
, tvb
,
313 offset
, 1, ENC_BIG_ENDIAN
);
317 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_ack_conf_padding
, tvb
,
325 dissect_rtnet_tdma_station_list(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
)
330 nr_stations
= tvb_get_uint8(tvb
, offset
);
331 proto_tree_add_uint(tree
, hf_tdma_v1_msg_station_list_nr_stations
, tvb
,
332 offset
, 1, nr_stations
);
336 proto_tree_add_item(tree
, hf_tdma_v1_msg_station_list_padding
, tvb
,
341 for( i
= 0; i
< nr_stations
; i
++ )
343 proto_tree_add_item(tree
, hf_tdma_v1_msg_station_list_ip
, tvb
,
344 offset
, 4, ENC_BIG_ENDIAN
);
348 proto_tree_add_item(tree
, hf_tdma_v1_msg_station_list_nr
, tvb
,
349 offset
, 1, ENC_BIG_ENDIAN
);
353 proto_tree_add_item(tree
, hf_tdma_v1_msg_station_list_padding
, tvb
,
362 dissect_rtnet_tdma_request_change_offset(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
)
364 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_change_offset_offset
, tvb
,
365 offset
, 4, ENC_BIG_ENDIAN
);
373 dissect_rtnet_tdma_start_of_frame(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
)
375 proto_tree_add_item(tree
, hf_tdma_v1_msg_start_of_frame_timestamp
, tvb
,
376 offset
, 8, ENC_BIG_ENDIAN
);
383 dissect_rtnet_tdma_v1(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*root
) {
389 msg
= tvb_get_ntohl(tvb
, offset
);
391 /* Set the protocol column */
392 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TDMA-V1");
394 /* set the info column */
395 col_add_str(pinfo
->cinfo
, COL_INFO
,
396 val_to_str(msg
, tdma_v1_msg_vals
, "Unknown (0x%04x)"));
399 ti
= proto_tree_add_item(root
, proto_tdma
, tvb
, 0, -1, ENC_NA
);
400 tree
= proto_item_add_subtree(ti
, ett_tdma
);
402 proto_item_append_text(ti
, ", Version 1, %s",
403 val_to_str(msg
, tdma_v1_msg_vals
, "Unknown (0x%04x)"));
405 proto_tree_add_item(tree
, hf_tdma_v1_msg
, tvb
,
406 offset
, 4, ENC_BIG_ENDIAN
);
410 case TDMA_V1_MSG_NOTIFY_MASTER
:
411 dissect_rtnet_tdma_notify_master(tvb
, offset
, tree
);
414 case TDMA_V1_MSG_REQUEST_TEST
:
415 dissect_rtnet_tdma_request_test(tvb
, offset
, tree
);
418 case TDMA_V1_MSG_ACK_TEST
:
419 dissect_rtnet_tdma_ack_test(tvb
, offset
, tree
);
422 case TDMA_V1_MSG_REQUEST_CONF
:
423 dissect_rtnet_tdma_request_conf(tvb
, offset
, tree
);
426 case TDMA_V1_MSG_ACK_CONF
:
427 dissect_rtnet_tdma_ack_conf(tvb
, offset
, tree
);
430 case TDMA_V1_MSG_ACK_ACK_CONF
:
431 dissect_rtnet_tdma_ack_ack_conf(tvb
, offset
, tree
);
434 case TDMA_V1_MSG_STATION_LIST
:
435 dissect_rtnet_tdma_station_list (tvb
, offset
, tree
);
438 case TDMA_V1_MSG_REQUEST_CHANGE_OFFSET
:
439 dissect_rtnet_tdma_request_change_offset(tvb
, offset
, tree
);
442 case TDMA_V1_MSG_START_OF_FRAME
:
443 dissect_rtnet_tdma_start_of_frame(tvb
, offset
, tree
);
453 dissect_tdma_sync(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
) {
457 proto_tree_add_item(tree
, hf_tdma_sync_cycle
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
460 ti
= proto_tree_add_item(tree
, hf_tdma_sync_xmit_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
461 timestamp
= tvb_get_ntoh64(tvb
, offset
) - tvb_get_ntoh64(tvb
, offset
+8);
462 proto_item_append_text(ti
, " (%s%" PRId64
")", (timestamp
> 0) ? "+" : "", timestamp
);
465 proto_tree_add_item(tree
, hf_tdma_sync_sched_xmit
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
469 dissect_tdma_request_cal(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
) {
471 proto_tree_add_item(tree
, hf_tdma_req_cal_xmit_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
474 proto_tree_add_item(tree
, hf_tdma_req_cal_rpl_cycle
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
477 proto_tree_add_item(tree
, hf_tdma_req_cal_rpl_slot
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
481 dissect_tdma_reply_cal(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
) {
485 proto_tree_add_item(tree
, hf_tdma_rpl_cal_req_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
488 proto_tree_add_item(tree
, hf_tdma_rpl_cal_rcv_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
490 timestamp
= tvb_get_ntoh64(tvb
, offset
+8) - tvb_get_ntoh64(tvb
, offset
);
493 ti
= proto_tree_add_item(tree
, hf_tdma_rpl_cal_xmit_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
494 proto_item_append_text(ti
, " (%s%" PRId64
")", (timestamp
> 0) ? "+" : "", timestamp
);
498 dissect_rtnet_tdma(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*root
) {
504 msg
= tvb_get_ntohs(tvb
, 2);
506 /* Set the protocol column */
507 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TDMA");
509 /* Set the info column */
510 col_add_str(pinfo
->cinfo
, COL_INFO
,
511 val_to_str(msg
, tdma_msg_vals
, "Unknown (0x%04x)"));
514 ti
= proto_tree_add_item(root
, proto_tdma
, tvb
, 0, -1, ENC_NA
);
515 tree
= proto_item_add_subtree(ti
, ett_tdma
);
517 proto_item_append_text(ti
, ", %s", val_to_str(msg
, tdma_msg_vals
, "Unknown (0x%04x)"));
519 proto_tree_add_item(tree
, hf_tdma_ver
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
522 proto_tree_add_item(tree
, hf_tdma_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
527 dissect_tdma_sync(tvb
, offset
, tree
);
530 case TDMA_MSG_CAL_REQUEST
:
531 dissect_tdma_request_cal(tvb
, offset
, tree
);
534 case TDMA_MSG_CAL_REPLY
:
535 dissect_tdma_reply_cal(tvb
, offset
, tree
);
545 dissect_rtmac(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
) {
550 proto_tree
*ti
=NULL
, *rtmac_tree
=NULL
;
552 dissector_handle_t dissector
=NULL
;
553 const char *type_str
=NULL
;
555 /* Read the header */
556 type
= tvb_get_ntohs(tvb
, offset
);
557 ver
= tvb_get_uint8(tvb
, offset
+2);
558 flags
= tvb_get_uint8(tvb
, offset
+3);
561 type_str
= try_val_to_str(type
, rtmac_type_vals
);
563 dissector
= dissector_get_uint_handle(ethertype_table
, type
);
566 if (flags
& RTMAC_FLAG_TUNNEL
) {
567 dissector
= dissector_get_uint_handle(ethertype_table
, type
);
571 dissector
= data_handle
;
574 ti
= proto_tree_add_item(tree
, proto_rtmac
, tvb
, offset
, 4, ENC_NA
);
575 rtmac_tree
= proto_item_add_subtree(ti
, ett_rtmac
);
576 proto_item_append_text(ti
, ", Version %d", ver
);
579 /* Set the protocol column */
580 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "RTmac");
582 /* set the info column */
583 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Unknown (0x%04x)",type
);
588 if (dissector
!= data_handle
)
589 type_str
= dissector_handle_get_protocol_short_name(dissector
);
591 type_str
= "Unknown";
594 if (!(flags
& RTMAC_FLAG_TUNNEL
))
595 type_str
= val_to_str_const(type
, rtmac_type_vals
, "Unknown");
597 if (dissector
!= data_handle
)
598 type_str
= dissector_handle_get_protocol_short_name(dissector
);
600 type_str
= "Unknown";
603 proto_tree_add_string_format_value(rtmac_tree
, hf_rtmac_header_type
, tvb
, offset
, 2,
604 type_str
, "%s (0x%04x)", type_str
, type
);
607 proto_tree_add_item(rtmac_tree
, hf_rtmac_header_ver
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
611 proto_tree_add_item(rtmac_tree
, hf_rtmac_header_res_v1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
613 item
= proto_tree_add_item(rtmac_tree
, hf_rtmac_header_flags
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
614 ti
= proto_item_add_subtree(item
, ett_rtmac_flags
);
615 proto_tree_add_item(ti
, hf_rtmac_header_flags_res
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
616 proto_tree_add_item(ti
, hf_rtmac_header_flags_tunnel
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
623 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
627 case RTMAC_TYPE_TDMA_V1
:
628 dissect_rtnet_tdma_v1(next_tvb
, pinfo
, tree
);
632 call_dissector(dissector
, next_tvb
, pinfo
, tree
);
636 if (flags
& RTMAC_FLAG_TUNNEL
)
637 call_dissector(dissector
, next_tvb
, pinfo
, tree
);
640 case RTMAC_TYPE_TDMA
:
641 dissect_rtnet_tdma(next_tvb
, pinfo
, tree
);
645 call_dissector(data_handle
, next_tvb
, pinfo
, tree
);
651 return tvb_captured_length(tvb
);
655 dissect_rtcfg(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
) {
657 proto_tree
*vers_id_tree
, *vers_id_item
, *flags_tree
, *flags_item
;
660 uint32_t config_length
,len
;
661 proto_tree
*ti
=NULL
,*rtcfg_tree
=NULL
;
663 /* Set the protocol column */
664 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "RTcfg");
666 /* Clear out stuff in the info column */
667 col_clear(pinfo
->cinfo
, COL_INFO
);
670 ti
= proto_tree_add_item(tree
, proto_rtcfg
, tvb
, offset
, -1, ENC_NA
);
671 rtcfg_tree
= proto_item_add_subtree(ti
, ett_rtcfg
);
674 vers_id
= tvb_get_uint8(tvb
, offset
);
676 col_add_str(pinfo
->cinfo
, COL_INFO
,
677 val_to_str(vers_id
, rtcfg_msg_vals
, "Unknown (0x%04x)"));
681 vers_id_item
= proto_tree_add_uint(rtcfg_tree
, hf_rtcfg_vers_id
, tvb
,
684 vers_id_tree
=proto_item_add_subtree(vers_id_item
, ett_rtcfg
);
685 proto_tree_add_item(vers_id_tree
, hf_rtcfg_vers
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
686 proto_tree_add_item(vers_id_tree
, hf_rtcfg_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
689 proto_item_append_text(ti
, ", Version %d, %s",
691 val_to_str(vers_id
, rtcfg_msg_vals
, "Unknown (0x%04x)"));
693 switch( vers_id
& 0x1f )
695 case RTCFG_MSG_S1_CONFIG
:
696 addr_type
= tvb_get_uint8(tvb
, offset
);
697 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_address_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
702 case RTCFG_ADDRESS_TYPE_MAC
:
706 case RTCFG_ADDRESS_TYPE_IP
:
707 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
710 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_server_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
716 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_burst_rate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
719 config_length
= tvb_get_ntohs( tvb
, offset
);
720 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_s1_config_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
723 if( config_length
> 0 ) {
724 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_config_data
, tvb
, offset
, config_length
, ENC_NA
);
725 /*offset += config_length;*/
730 case RTCFG_MSG_ANN_NEW
:
731 addr_type
= tvb_get_uint8(tvb
, offset
);
732 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_address_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
737 case RTCFG_ADDRESS_TYPE_MAC
:
741 case RTCFG_ADDRESS_TYPE_IP
:
742 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
747 flags_item
= proto_tree_add_item(rtcfg_tree
, hf_rtcfg_client_flags
, tvb
,
748 offset
, 1, ENC_BIG_ENDIAN
);
750 flags_tree
=proto_item_add_subtree(flags_item
, ett_rtcfg
);
751 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_available
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
752 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_ready
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
753 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_res
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
756 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_burst_rate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
761 case RTCFG_MSG_ANN_REPLY
:
762 addr_type
= tvb_get_uint8(tvb
, offset
);
763 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_address_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
768 case RTCFG_ADDRESS_TYPE_MAC
:
772 case RTCFG_ADDRESS_TYPE_IP
:
773 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
778 flags_item
= proto_tree_add_item(rtcfg_tree
, hf_rtcfg_client_flags
, tvb
,
779 offset
, 1, ENC_BIG_ENDIAN
);
781 flags_tree
=proto_item_add_subtree(flags_item
, ett_rtcfg
);
782 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_available
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
783 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_ready
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
784 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_res
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
787 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_padding
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
792 case RTCFG_MSG_S2_CONFIG
:
793 flags_item
= proto_tree_add_item(rtcfg_tree
, hf_rtcfg_server_flags
, tvb
,
794 offset
, 1, ENC_BIG_ENDIAN
);
796 flags_tree
=proto_item_add_subtree(flags_item
, ett_rtcfg
);
797 proto_tree_add_item(flags_tree
, hf_rtcfg_server_flags_res0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
798 proto_tree_add_item(flags_tree
, hf_rtcfg_server_flags_ready
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
799 proto_tree_add_item(flags_tree
, hf_rtcfg_server_flags_res2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
802 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_active_stations
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
805 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_heartbeat_period
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
808 config_length
= tvb_get_ntohl( tvb
, offset
);
809 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_s2_config_length
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
812 if( config_length
> 0 ) {
813 len
= tvb_reported_length_remaining(tvb
, offset
);
814 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_config_data
, tvb
, offset
, len
, ENC_NA
);
820 case RTCFG_MSG_S2_FRAG
:
821 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_config_offset
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
824 len
= tvb_reported_length_remaining(tvb
, offset
);
825 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_config_data
, tvb
, offset
, len
, ENC_NA
);
830 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_ack_length
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
835 case RTCFG_MSG_READY
:
838 case RTCFG_MSG_HBEAT
:
841 case RTCFG_MSG_DEAD_STN
:
842 addr_type
= tvb_get_uint8(tvb
, offset
);
843 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_address_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
848 case RTCFG_ADDRESS_TYPE_MAC
:
852 case RTCFG_ADDRESS_TYPE_IP
:
853 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
859 * Infer the type of the physical address from the type of the
860 * source address of this packet.
862 switch( pinfo
->dl_src
.type
)
865 proto_tree_add_bytes_format_value( rtcfg_tree
, hf_rtcfg_client_hw_address
, tvb
, offset
, 32,
867 tvb_ether_to_str(pinfo
->pool
, tvb
, offset
));
871 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_hw_address
, tvb
, offset
, 32, ENC_NA
);
880 return tvb_captured_length(tvb
);
884 proto_register_rtmac(void) {
885 static hf_register_info hf_array_rtmac
[] = {
888 { &hf_rtmac_header_type
,
891 FT_STRING
, BASE_NONE
, NULL
, 0x0,
892 "RTmac Type", HFILL
}},
894 { &hf_rtmac_header_ver
,
897 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
898 "RTmac Version", HFILL
}},
900 { &hf_rtmac_header_flags
,
902 "rtmac.header.flags",
903 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
904 "RTmac Flags", HFILL
}},
906 { &hf_rtmac_header_flags_tunnel
,
908 "rtmac.header.flags.tunnel",
909 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), RTMAC_FLAG_TUNNEL
,
910 "RTmac Tunnelling Flag", HFILL
}},
912 { &hf_rtmac_header_flags_res
,
914 "rtmac.header.flags.res",
915 FT_UINT8
, BASE_HEX
, NULL
, RTMAC_FLAGS_RES
,
916 "RTmac Reserved Flags", HFILL
}},
918 { &hf_rtmac_header_res_v1
,
921 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
922 "RTmac Reserved", HFILL
}},
925 static hf_register_info hf_array_tdma
[] = {
931 FT_UINT32
, BASE_HEX
, VALS(tdma_v1_msg_vals
), 0x0,
932 "TDMA-V1 Message", HFILL
}},
934 /* TDMA request conf */
936 { &hf_tdma_v1_msg_request_conf_station
,
938 "tdma-v1.msg.request_conf.station",
939 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
940 "TDMA Station", HFILL
}},
942 { &hf_tdma_v1_msg_request_conf_padding
,
944 "tdma-v1.msg.request_conf.padding",
945 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
946 "TDMA Padding", HFILL
}},
948 { &hf_tdma_v1_msg_request_conf_mtu
,
950 "tdma-v1.msg.request_conf.mtu",
951 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
952 "TDMA MTU", HFILL
}},
954 { &hf_tdma_v1_msg_request_conf_cycle
,
956 "tdma-v1.msg.request_conf.cycle",
957 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
958 "TDMA Cycle", HFILL
}},
962 { &hf_tdma_v1_msg_ack_conf_station
,
964 "tdma-v1.msg.ack_conf.station",
965 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
966 "TDMA Station", HFILL
}},
968 { &hf_tdma_v1_msg_ack_conf_padding
,
970 "tdma-v1.msg.ack_conf.padding",
971 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
972 "TDMA Padding", HFILL
}},
974 { &hf_tdma_v1_msg_ack_conf_mtu
,
976 "tdma-v1.msg.ack_conf.mtu",
977 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
978 "TDMA MTU", HFILL
}},
980 { &hf_tdma_v1_msg_ack_conf_cycle
,
982 "tdma-v1.msg.ack_conf.cycle",
983 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
984 "TDMA Cycle", HFILL
}},
986 /* TDMA ack ack conf */
988 { &hf_tdma_v1_msg_ack_ack_conf_station
,
990 "tdma-v1.msg.ack_ack_conf.station",
991 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
992 "TDMA Station", HFILL
}},
994 { &hf_tdma_v1_msg_ack_ack_conf_padding
,
996 "tdma-v1.msg.ack_ack_conf.padding",
997 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
998 "TDMA Padding", HFILL
}},
1000 /* TDMA request test */
1002 { &hf_tdma_v1_msg_request_test_counter
,
1004 "tdma-v1.msg.request_test.counter",
1005 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1006 "TDMA Counter", HFILL
}},
1008 { &hf_tdma_v1_msg_request_test_tx
,
1010 "tdma-v1.msg.request_test.tx",
1011 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1012 "TDMA TX", HFILL
}},
1016 { &hf_tdma_v1_msg_ack_test_counter
,
1018 "tdma-v1.msg.ack_test.counter",
1019 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1020 "TDMA Counter", HFILL
}},
1022 { &hf_tdma_v1_msg_ack_test_tx
,
1024 "tdma-v1.msg.ack_test.tx",
1025 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1026 "TDMA TX", HFILL
}},
1030 { &hf_tdma_v1_msg_request_change_offset_offset
,
1032 "tdma-v1.msg.request_change_offset.offset",
1033 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1034 "TDMA Offset", HFILL
}},
1036 /* TDMA start of frame */
1039 { &hf_tdma_v1_msg_start_of_frame_timestamp
,
1041 "tdma-v1.msg.start_of_frame.timestamp",
1042 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1043 "TDMA Timestamp", HFILL
}},
1045 /* TDMA station list */
1047 { &hf_tdma_v1_msg_station_list_nr_stations
,
1049 "tdma-v1.msg.station_list.nr_stations",
1050 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1051 "TDMA Nr. Stations", HFILL
}},
1053 { &hf_tdma_v1_msg_station_list_nr
,
1055 "tdma-v1.msg.station_list.nr",
1056 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1057 "TDMA Station Number", HFILL
}},
1059 { &hf_tdma_v1_msg_station_list_ip
,
1061 "tdma-v1.msg.station_list.ip",
1062 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1063 "TDMA Station IP", HFILL
}},
1065 { &hf_tdma_v1_msg_station_list_padding
,
1067 "tdma-v1.msg.station_list.padding",
1068 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1069 "TDMA Padding", HFILL
}},
1072 /* TDMA since version 2 */
1077 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1078 "TDMA Version", HFILL
}},
1083 FT_UINT16
, BASE_HEX
, VALS(tdma_msg_vals
), 0x0,
1084 "TDMA Message ID", HFILL
}},
1088 { &hf_tdma_sync_cycle
,
1091 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1092 "TDMA Sync Cycle Number", HFILL
}},
1094 { &hf_tdma_sync_xmit_stamp
,
1095 { "Transmission Time Stamp",
1096 "tdma.sync.xmit_stamp",
1097 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1098 "TDMA Sync Transmission Time Stamp", HFILL
}},
1100 { &hf_tdma_sync_sched_xmit
,
1101 { "Scheduled Transmission Time",
1102 "tdma.sync.sched_xmit",
1103 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1104 "TDMA Sync Scheduled Transmission Time", HFILL
}},
1106 /* TDMA request calibration */
1108 { &hf_tdma_req_cal_xmit_stamp
,
1109 { "Transmission Time Stamp",
1110 "tdma.req_cal.xmit_stamp",
1111 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1112 "TDMA Request Calibration Transmission Time Stamp", HFILL
}},
1114 { &hf_tdma_req_cal_rpl_cycle
,
1115 { "Reply Cycle Number",
1116 "tdma.req_cal.rpl_cycle",
1117 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1118 "TDMA Request Calibration Reply Cycle Number", HFILL
}},
1120 { &hf_tdma_req_cal_rpl_slot
,
1121 { "Reply Slot Offset",
1122 "tdma.req_cal.rpl_slot",
1123 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1124 "TDMA Request Calibration Reply Slot Offset", HFILL
}},
1126 /* TDMA reply calibration */
1128 { &hf_tdma_rpl_cal_req_stamp
,
1129 { "Request Transmission Time",
1130 "tdma.rpl_cal.req_stamp",
1131 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1132 "TDMA Reply Calibration Request Transmission Time", HFILL
}},
1134 { &hf_tdma_rpl_cal_rcv_stamp
,
1135 { "Reception Time Stamp",
1136 "tdma.rpl_cal.rcv_stamp",
1137 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1138 "TDMA Reply Calibration Reception Time Stamp", HFILL
}},
1140 { &hf_tdma_rpl_cal_xmit_stamp
,
1141 { "Transmission Time Stamp",
1142 "tdma.rpl_cal.xmit_stamp",
1143 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1144 "TDMA Reply Calibration Transmission Time Stamp", HFILL
}},
1147 static int *ett_array_rtmac
[] = {
1152 static int *ett_array_tdma
[] = {
1156 proto_rtmac
= proto_register_protocol("Real-Time Media Access Control", "RTmac", "rtmac");
1157 proto_register_field_array(proto_rtmac
, hf_array_rtmac
, array_length(hf_array_rtmac
));
1158 proto_register_subtree_array(ett_array_rtmac
, array_length(ett_array_rtmac
));
1160 rtmac_handle
= register_dissector("rtmac", dissect_rtmac
, proto_rtmac
);
1162 proto_tdma
= proto_register_protocol("TDMA RTmac Discipline", "TDMA", "tdma");
1163 proto_register_field_array(proto_rtmac
, hf_array_tdma
, array_length(hf_array_tdma
));
1164 proto_register_subtree_array(ett_array_tdma
, array_length(ett_array_tdma
));
1169 proto_register_rtcfg(void) {
1170 static hf_register_info hf
[] = {
1171 { &hf_rtcfg_vers_id
,
1174 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1175 "RTcfg Version and ID", HFILL
}},
1180 FT_UINT8
, BASE_DEC
, NULL
, 0xe0,
1181 "RTcfg Version", HFILL
}},
1186 FT_UINT8
, BASE_HEX
, VALS(rtcfg_msg_vals
), 0x1f,
1187 "RTcfg ID", HFILL
}},
1189 { &hf_rtcfg_address_type
,
1191 "rtcfg.address_type",
1192 FT_UINT8
, BASE_DEC
, VALS(rtcfg_address_type_vals
), 0x00,
1193 "RTcfg Address Type", HFILL
}},
1195 { &hf_rtcfg_client_ip_address
,
1196 { "Client IP Address",
1197 "rtcfg.client_ip_address",
1198 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1199 "RTcfg Client IP Address", HFILL
}},
1201 { &hf_rtcfg_server_ip_address
,
1202 { "Server IP Address",
1203 "rtcfg.server_ip_address",
1204 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1205 "RTcfg Server IP Address", HFILL
}},
1207 { &hf_rtcfg_burst_rate
,
1208 { "Stage 2 Burst Rate",
1210 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1211 "RTcfg Stage 2 Burst Rate", HFILL
}},
1213 { &hf_rtcfg_s1_config_length
,
1214 { "Stage 1 Config Length",
1215 "rtcfg.s1_config_length",
1216 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1217 "RTcfg Stage 1 Config Length", HFILL
}},
1219 { &hf_rtcfg_config_data
,
1221 "rtcfg.config_data",
1222 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1223 "RTcfg Config Data", HFILL
}},
1225 { &hf_rtcfg_padding
,
1228 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1229 "RTcfg Padding", HFILL
}},
1231 { &hf_rtcfg_client_flags
,
1233 "rtcfg.client_flags",
1234 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
1235 "RTcfg Client Flags", HFILL
}},
1237 { &hf_rtcfg_client_flags_available
,
1239 "rtcfg.client_flags.available",
1240 FT_UINT8
, BASE_DEC
, NULL
, 0x01,
1241 "Request Available", HFILL
}},
1243 { &hf_rtcfg_client_flags_ready
,
1245 "rtcfg.client_flags.ready",
1246 FT_UINT8
, BASE_DEC
, NULL
, 0x02,
1249 { &hf_rtcfg_client_flags_res
,
1251 "rtcfg.client_flags.res",
1252 FT_UINT8
, BASE_HEX
, NULL
, 0xfc,
1255 { &hf_rtcfg_server_flags
,
1257 "rtcfg.server_flags",
1258 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
1259 "RTcfg Server Flags", HFILL
}},
1261 { &hf_rtcfg_server_flags_res0
,
1263 "rtcfg.server_flags.res0",
1264 FT_UINT8
, BASE_HEX
, NULL
, 0x01,
1267 { &hf_rtcfg_server_flags_ready
,
1269 "rtcfg.server_flags.ready",
1270 FT_UINT8
, BASE_DEC
, NULL
, 0x02,
1273 { &hf_rtcfg_server_flags_res2
,
1275 "rtcfg.server_flags.res2",
1276 FT_UINT8
, BASE_HEX
, NULL
, 0xfc,
1279 { &hf_rtcfg_active_stations
,
1280 { "Active Stations",
1281 "rtcfg.active_stations",
1282 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1283 "RTcfg Active Stations", HFILL
}},
1285 { &hf_rtcfg_heartbeat_period
,
1286 { "Heartbeat Period",
1287 "rtcfg.hearbeat_period",
1288 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1289 "RTcfg Heartbeat Period", HFILL
}},
1291 { &hf_rtcfg_s2_config_length
,
1292 { "Stage 2 Config Length",
1293 "rtcfg.s2_config_length",
1294 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1295 "RTcfg Stage 2 Config Length", HFILL
}},
1297 { &hf_rtcfg_config_offset
,
1299 "rtcfg.config_offset",
1300 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1301 "RTcfg Config Offset", HFILL
}},
1303 { &hf_rtcfg_ack_length
,
1306 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1307 "RTcfg Ack Length", HFILL
}},
1309 { &hf_rtcfg_client_hw_address
,
1310 { "Client Hardware Address",
1311 "rtcfg.client_hw_address",
1312 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1313 "RTcfg Client Hardware Address", HFILL
}}
1316 static int *ett
[] = {
1320 proto_rtcfg
= proto_register_protocol("RTcfg","RTcfg","rtcfg");
1321 proto_register_field_array(proto_rtcfg
,hf
,array_length(hf
));
1322 proto_register_subtree_array(ett
,array_length(ett
));
1324 rtcfg_handle
= register_dissector("rtcfg", dissect_rtcfg
, proto_rtcfg
);
1327 /* The registration hand-off routing */
1330 proto_reg_handoff_rtmac(void) {
1331 dissector_add_uint("ethertype", ETHERTYPE_RTMAC
, rtmac_handle
);
1332 ethertype_table
= find_dissector_table("ethertype");
1336 proto_reg_handoff_rtcfg(void) {
1337 data_handle
= find_dissector("data");
1338 dissector_add_uint("ethertype", ETHERTYPE_RTCFG
, rtcfg_handle
);
1342 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1347 * indent-tabs-mode: nil
1350 * ex: set shiftwidth=2 tabstop=8 expandtab:
1351 * :indentSize=2:tabSize=8:noTabs=true: