2 * Routines for RTnet packet disassembly
6 * Copyright (c) 2003 by Erwin Rol <erwin@erwinrol.com>
7 * Copyright (c) 2004 by Jan Kiszka <jan.kiszka@web.de>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1999 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
34 #include <epan/packet.h>
35 #include <epan/addr_resolv.h>
36 #include <epan/etypes.h>
37 #include <epan/strutil.h>
42 * http://www.rtnet.org/
44 * http://www.rts.uni-hannover.de/rtnet/lxr/source/Documentation/RTmac.spec
47 #define RTMAC_TYPE_TDMA 0x0001 /* since version 2 */
48 #define RTMAC_TYPE_TDMA_V1 0x9031 /* first TDMA version */
50 static const value_string rtmac_type_vals
[] = {
51 { RTMAC_TYPE_TDMA
, "TDMA" },
52 { RTMAC_TYPE_TDMA_V1
, "TDMA-V1" },
56 #define RTMAC_FLAG_TUNNEL 0x01
57 #define RTMAC_FLAGS_RES 0xFE
59 #define RTCFG_MSG_S1_CONFIG 0x0
60 #define RTCFG_MSG_ANN_NEW 0x1
61 #define RTCFG_MSG_ANN_REPLY 0x2
62 #define RTCFG_MSG_S2_CONFIG 0x3
63 #define RTCFG_MSG_S2_FRAG 0x4
64 #define RTCFG_MSG_ACK 0x5
65 #define RTCFG_MSG_READY 0x6
66 #define RTCFG_MSG_HBEAT 0x7
67 #define RTCFG_MSG_DEAD_STN 0x8
69 static const value_string rtcfg_msg_vals
[] = {
70 { RTCFG_MSG_S1_CONFIG
, "Stage 1 Config" },
71 { RTCFG_MSG_ANN_NEW
, "New Announce" },
72 { RTCFG_MSG_ANN_REPLY
, "Reply Announce" },
73 { RTCFG_MSG_S2_CONFIG
, "Stage 2 Config" },
74 { RTCFG_MSG_S2_FRAG
, "Stage 2 Fragment" },
75 { RTCFG_MSG_ACK
, "Acknowledge" },
76 { RTCFG_MSG_READY
, "Ready" },
77 { RTCFG_MSG_HBEAT
, "Heartbeat" },
78 { RTCFG_MSG_DEAD_STN
, "Dead Station" },
82 #define RTCFG_ADDRESS_TYPE_MAC 0x00
83 #define RTCFG_ADDRESS_TYPE_IP 0x01
85 static const value_string rtcfg_address_type_vals
[] = {
86 { RTCFG_ADDRESS_TYPE_MAC
, "MAC" },
87 { RTCFG_ADDRESS_TYPE_IP
, "IP" },
91 #define TDMA_V1_MSG_NOTIFY_MASTER 0x10
92 #define TDMA_V1_MSG_REQUEST_TEST 0x11
93 #define TDMA_V1_MSG_ACK_TEST 0x12
94 #define TDMA_V1_MSG_REQUEST_CONF 0x13
95 #define TDMA_V1_MSG_ACK_CONF 0x14
96 #define TDMA_V1_MSG_ACK_ACK_CONF 0x15
97 #define TDMA_V1_MSG_STATION_LIST 0x16
98 #define TDMA_V1_MSG_REQUEST_CHANGE_OFFSET 0x17
99 #define TDMA_V1_MSG_START_OF_FRAME 0x18
101 static const value_string tdma_v1_msg_vals
[] = {
102 { TDMA_V1_MSG_NOTIFY_MASTER
, "Notify Master" },
103 { TDMA_V1_MSG_REQUEST_TEST
, "Request Test" },
104 { TDMA_V1_MSG_ACK_TEST
, "Acknowledge Test" },
105 { TDMA_V1_MSG_REQUEST_CONF
, "Request Config" },
106 { TDMA_V1_MSG_ACK_CONF
, "Acknowledge Config" },
107 { TDMA_V1_MSG_ACK_ACK_CONF
, "Ack Ack Config" },
108 { TDMA_V1_MSG_STATION_LIST
, "Station List" },
109 { TDMA_V1_MSG_REQUEST_CHANGE_OFFSET
, "Request Change Offset" },
110 { TDMA_V1_MSG_START_OF_FRAME
, "Start of Frame" },
114 #define TDMA_MSG_SYNC 0x0000
115 #define TDMA_MSG_CAL_REQUEST 0x0010
116 #define TDMA_MSG_CAL_REPLY 0x0011
118 static const value_string tdma_msg_vals
[] = {
119 { TDMA_MSG_SYNC
, "Synchronisation" },
120 { TDMA_MSG_CAL_REQUEST
, "Request Calibration" },
121 { TDMA_MSG_CAL_REPLY
, "Reply Calibration" },
125 static dissector_table_t ethertype_table
;
126 static dissector_handle_t data_handle
;
128 /* Define the rtnet proto */
129 static int proto_rtmac
= -1;
130 static int proto_tdma
= -1;
131 static int proto_rtcfg
= -1;
134 static int hf_rtmac_header_type
= -1;
135 static int hf_rtmac_header_ver
= -1;
136 static int hf_rtmac_header_flags
= -1;
137 static int hf_rtmac_header_flags_tunnel
= -1;
138 static int hf_rtmac_header_flags_res
= -1;
139 static int hf_rtmac_header_res_v1
= -1;
143 static int hf_rtcfg_vers_id
= -1;
144 static int hf_rtcfg_vers
= -1;
145 static int hf_rtcfg_id
= -1;
146 static int hf_rtcfg_address_type
= -1;
147 static int hf_rtcfg_client_ip_address
= -1;
148 static int hf_rtcfg_server_ip_address
= -1;
149 static int hf_rtcfg_burst_rate
= -1;
150 static int hf_rtcfg_padding
= -1;
151 static int hf_rtcfg_s1_config_length
= -1;
152 static int hf_rtcfg_config_data
= -1;
153 static int hf_rtcfg_client_flags
= -1;
154 static int hf_rtcfg_client_flags_available
= -1;
155 static int hf_rtcfg_client_flags_ready
= -1;
156 static int hf_rtcfg_client_flags_res
= -1;
157 static int hf_rtcfg_server_flags
= -1;
158 static int hf_rtcfg_server_flags_res0
= -1;
159 static int hf_rtcfg_server_flags_ready
= -1;
160 static int hf_rtcfg_server_flags_res2
= -1;
161 static int hf_rtcfg_active_stations
= -1;
162 static int hf_rtcfg_heartbeat_period
= -1;
163 static int hf_rtcfg_s2_config_length
= -1;
164 static int hf_rtcfg_config_offset
= -1;
165 static int hf_rtcfg_ack_length
= -1;
166 static int hf_rtcfg_client_hw_address
= -1;
170 static int hf_tdma_v1_msg
= -1;
172 /* TDMA REQUEST_CONF */
173 static int hf_tdma_v1_msg_request_conf_station
= -1;
174 static int hf_tdma_v1_msg_request_conf_padding
= -1;
175 static int hf_tdma_v1_msg_request_conf_mtu
= -1;
176 static int hf_tdma_v1_msg_request_conf_cycle
= -1;
179 static int hf_tdma_v1_msg_ack_conf_station
= -1;
180 static int hf_tdma_v1_msg_ack_conf_padding
= -1;
181 static int hf_tdma_v1_msg_ack_conf_mtu
= -1;
182 static int hf_tdma_v1_msg_ack_conf_cycle
= -1;
184 /* TDMA ACK_ACK_CONF */
185 static int hf_tdma_v1_msg_ack_ack_conf_station
= -1;
186 static int hf_tdma_v1_msg_ack_ack_conf_padding
= -1;
188 /* TDMA REQUEST_TEST */
189 static int hf_tdma_v1_msg_request_test_counter
= -1;
190 static int hf_tdma_v1_msg_request_test_tx
= -1;
193 static int hf_tdma_v1_msg_ack_test_counter
= -1;
194 static int hf_tdma_v1_msg_ack_test_tx
= -1;
196 /* TDMA STATION_LIST */
197 static int hf_tdma_v1_msg_station_list_nr_stations
= -1;
198 static int hf_tdma_v1_msg_station_list_padding
= -1;
200 static int hf_tdma_v1_msg_station_list_ip
= -1;
201 static int hf_tdma_v1_msg_station_list_nr
= -1;
203 /* TDMA CHANGE_OFFSET */
204 static int hf_tdma_v1_msg_request_change_offset_offset
= -1;
206 /* TDMA START_OF_FRAME */
207 static int hf_tdma_v1_msg_start_of_frame_timestamp
= -1;
210 /* TDMA since version 2 */
211 static int hf_tdma_ver
= -1;
212 static int hf_tdma_id
= -1;
215 static int hf_tdma_sync_cycle
= -1;
216 static int hf_tdma_sync_xmit_stamp
= -1;
217 static int hf_tdma_sync_sched_xmit
= -1;
219 /* TDMA Request Calibration */
220 static int hf_tdma_req_cal_xmit_stamp
= -1;
221 static int hf_tdma_req_cal_rpl_cycle
= -1;
222 static int hf_tdma_req_cal_rpl_slot
= -1;
224 /* TDMA Reply Calibration */
225 static int hf_tdma_rpl_cal_req_stamp
= -1;
226 static int hf_tdma_rpl_cal_rcv_stamp
= -1;
227 static int hf_tdma_rpl_cal_xmit_stamp
= -1;
230 /* Define the tree for rtnet */
231 static int ett_rtmac
= -1;
232 static int ett_rtmac_flags
= -1;
233 static int ett_tdma
= -1;
234 static int ett_rtcfg
= -1;
237 dissect_rtnet_tdma_notify_master(tvbuff_t
*tvb _U_
, guint offset
, proto_tree
*tree _U_
)
243 dissect_rtnet_tdma_request_test(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
)
245 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_test_counter
, tvb
,
246 offset
, 4, ENC_LITTLE_ENDIAN
);
249 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_test_tx
, tvb
,
250 offset
, 8, ENC_LITTLE_ENDIAN
);
257 dissect_rtnet_tdma_ack_test(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
)
259 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_test_counter
, tvb
,
260 offset
, 4, ENC_LITTLE_ENDIAN
);
263 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_test_tx
, tvb
,
264 offset
, 8, ENC_LITTLE_ENDIAN
);
271 dissect_rtnet_tdma_request_conf(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
)
273 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_conf_station
, tvb
,
274 offset
, 1, ENC_BIG_ENDIAN
);
277 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_conf_padding
, tvb
,
278 offset
, 1, ENC_BIG_ENDIAN
);
281 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_conf_mtu
, tvb
,
282 offset
, 2, ENC_BIG_ENDIAN
);
285 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_conf_cycle
, tvb
,
286 offset
, 4, ENC_BIG_ENDIAN
);
294 dissect_rtnet_tdma_ack_conf(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
)
296 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_conf_station
, tvb
,
297 offset
, 1, ENC_BIG_ENDIAN
);
300 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_conf_padding
, tvb
,
301 offset
, 1, ENC_BIG_ENDIAN
);
304 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_conf_mtu
, tvb
,
305 offset
, 2, ENC_BIG_ENDIAN
);
308 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_conf_cycle
, tvb
,
309 offset
, 4, ENC_BIG_ENDIAN
);
316 dissect_rtnet_tdma_ack_ack_conf(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
) {
318 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_ack_conf_station
, tvb
,
319 offset
, 1, ENC_BIG_ENDIAN
);
323 proto_tree_add_item(tree
, hf_tdma_v1_msg_ack_ack_conf_padding
, tvb
,
331 dissect_rtnet_tdma_station_list(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
)
336 nr_stations
= tvb_get_guint8(tvb
, offset
);
337 proto_tree_add_uint(tree
, hf_tdma_v1_msg_station_list_nr_stations
, tvb
,
338 offset
, 1, nr_stations
);
342 proto_tree_add_item(tree
, hf_tdma_v1_msg_station_list_padding
, tvb
,
347 for( i
= 0; i
< nr_stations
; i
++ )
349 proto_tree_add_item(tree
, hf_tdma_v1_msg_station_list_ip
, tvb
,
350 offset
, 4, ENC_BIG_ENDIAN
);
354 proto_tree_add_item(tree
, hf_tdma_v1_msg_station_list_nr
, tvb
,
355 offset
, 1, ENC_BIG_ENDIAN
);
359 proto_tree_add_item(tree
, hf_tdma_v1_msg_station_list_padding
, tvb
,
368 dissect_rtnet_tdma_request_change_offset(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
)
370 proto_tree_add_item(tree
, hf_tdma_v1_msg_request_change_offset_offset
, tvb
,
371 offset
, 4, ENC_BIG_ENDIAN
);
379 dissect_rtnet_tdma_start_of_frame(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
)
381 proto_tree_add_item(tree
, hf_tdma_v1_msg_start_of_frame_timestamp
, tvb
,
382 offset
, 8, ENC_BIG_ENDIAN
);
389 dissect_rtnet_tdma_v1(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*root
) {
395 msg
= tvb_get_ntohl(tvb
, offset
);
397 /* Set the protocol column */
398 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TDMA-V1");
400 /* set the info column */
401 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s",
402 val_to_str(msg
, tdma_v1_msg_vals
, "Unknown (0x%04x)"));
405 ti
= proto_tree_add_item(root
, proto_tdma
, tvb
, 0, -1, ENC_NA
);
406 tree
= proto_item_add_subtree(ti
, ett_tdma
);
408 proto_item_append_text(ti
, ", Version 1, %s",
409 val_to_str(msg
, tdma_v1_msg_vals
, "Unknown (0x%04x)"));
411 proto_tree_add_item(tree
, hf_tdma_v1_msg
, tvb
,
412 offset
, 4, ENC_BIG_ENDIAN
);
416 case TDMA_V1_MSG_NOTIFY_MASTER
:
417 dissect_rtnet_tdma_notify_master(tvb
, offset
, tree
);
420 case TDMA_V1_MSG_REQUEST_TEST
:
421 dissect_rtnet_tdma_request_test(tvb
, offset
, tree
);
424 case TDMA_V1_MSG_ACK_TEST
:
425 dissect_rtnet_tdma_ack_test(tvb
, offset
, tree
);
428 case TDMA_V1_MSG_REQUEST_CONF
:
429 dissect_rtnet_tdma_request_conf(tvb
, offset
, tree
);
432 case TDMA_V1_MSG_ACK_CONF
:
433 dissect_rtnet_tdma_ack_conf(tvb
, offset
, tree
);
436 case TDMA_V1_MSG_ACK_ACK_CONF
:
437 dissect_rtnet_tdma_ack_ack_conf(tvb
, offset
, tree
);
440 case TDMA_V1_MSG_STATION_LIST
:
441 dissect_rtnet_tdma_station_list (tvb
, offset
, tree
);
444 case TDMA_V1_MSG_REQUEST_CHANGE_OFFSET
:
445 dissect_rtnet_tdma_request_change_offset(tvb
, offset
, tree
);
448 case TDMA_V1_MSG_START_OF_FRAME
:
449 dissect_rtnet_tdma_start_of_frame(tvb
, offset
, tree
);
459 dissect_tdma_sync(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
) {
463 proto_tree_add_item(tree
, hf_tdma_sync_cycle
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
466 ti
= proto_tree_add_item(tree
, hf_tdma_sync_xmit_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
467 timestamp
= tvb_get_ntoh64(tvb
, offset
) - tvb_get_ntoh64(tvb
, offset
+8);
468 proto_item_append_text(ti
, " (%s%" G_GINT64_MODIFIER
"d)", (timestamp
> 0) ? "+" : "", timestamp
);
471 proto_tree_add_item(tree
, hf_tdma_sync_sched_xmit
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
475 dissect_tdma_request_cal(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
) {
477 proto_tree_add_item(tree
, hf_tdma_req_cal_xmit_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
480 proto_tree_add_item(tree
, hf_tdma_req_cal_rpl_cycle
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
483 proto_tree_add_item(tree
, hf_tdma_req_cal_rpl_slot
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
487 dissect_tdma_reply_cal(tvbuff_t
*tvb
, guint offset
, proto_tree
*tree
) {
491 proto_tree_add_item(tree
, hf_tdma_rpl_cal_req_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
494 proto_tree_add_item(tree
, hf_tdma_rpl_cal_rcv_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
496 timestamp
= tvb_get_ntoh64(tvb
, offset
+8) - tvb_get_ntoh64(tvb
, offset
);
499 ti
= proto_tree_add_item(tree
, hf_tdma_rpl_cal_xmit_stamp
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
500 proto_item_append_text(ti
, " (%s%" G_GINT64_MODIFIER
"d)", (timestamp
> 0) ? "+" : "", timestamp
);
504 dissect_rtnet_tdma(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*root
) {
510 msg
= tvb_get_ntohs(tvb
, 2);
512 /* Set the protocol column */
513 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TDMA");
515 /* Set the info column */
516 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s",
517 val_to_str(msg
, tdma_msg_vals
, "Unknown (0x%04x)"));
520 ti
= proto_tree_add_item(root
, proto_tdma
, tvb
, 0, -1, ENC_NA
);
521 tree
= proto_item_add_subtree(ti
, ett_tdma
);
523 proto_item_append_text(ti
, ", %s", val_to_str(msg
, tdma_msg_vals
, "Unknown (0x%04x)"));
525 proto_tree_add_item(tree
, hf_tdma_ver
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
528 proto_tree_add_item(tree
, hf_tdma_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
533 dissect_tdma_sync(tvb
, offset
, tree
);
536 case TDMA_MSG_CAL_REQUEST
:
537 dissect_tdma_request_cal(tvb
, offset
, tree
);
540 case TDMA_MSG_CAL_REPLY
:
541 dissect_tdma_reply_cal(tvb
, offset
, tree
);
551 dissect_rtmac(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
) {
556 proto_tree
*ti
=NULL
, *rtmac_tree
=NULL
;
558 dissector_handle_t dissector
=NULL
;
559 const gchar
*type_str
=NULL
;
561 /* Read the header */
562 type
= tvb_get_ntohs(tvb
, offset
);
563 ver
= tvb_get_guint8(tvb
, offset
+2);
564 flags
= tvb_get_guint8(tvb
, offset
+3);
567 type_str
= try_val_to_str(type
, rtmac_type_vals
);
569 dissector
= dissector_get_uint_handle(ethertype_table
, type
);
572 if (flags
& RTMAC_FLAG_TUNNEL
) {
573 dissector
= dissector_get_uint_handle(ethertype_table
, type
);
577 dissector
= data_handle
;
580 ti
= proto_tree_add_item(tree
, proto_rtmac
, tvb
, offset
, 4, ENC_NA
);
581 rtmac_tree
= proto_item_add_subtree(ti
, ett_rtmac
);
582 proto_item_append_text(ti
, ", Version %d", ver
);
585 /* Set the protocol column */
586 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "RTmac");
588 /* set the info column */
589 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Unknown (0x%04x)",type
);
594 if (dissector
!= data_handle
)
595 type_str
= dissector_handle_get_short_name(dissector
);
597 type_str
= "Unknown";
600 if (!(flags
& RTMAC_FLAG_TUNNEL
))
601 type_str
= val_to_str_const(type
, rtmac_type_vals
, "Unknown");
603 if (dissector
!= data_handle
)
604 type_str
= dissector_handle_get_short_name(dissector
);
606 type_str
= "Unknown";
609 proto_tree_add_string_format_value(rtmac_tree
, hf_rtmac_header_type
, tvb
, offset
, 2,
610 type_str
, "%s (0x%04x)", type_str
, type
);
613 proto_tree_add_item(rtmac_tree
, hf_rtmac_header_ver
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
617 proto_tree_add_item(rtmac_tree
, hf_rtmac_header_res_v1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
619 item
= proto_tree_add_item(rtmac_tree
, hf_rtmac_header_flags
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
620 ti
= proto_item_add_subtree(item
, ett_rtmac_flags
);
621 proto_tree_add_item(ti
, hf_rtmac_header_flags_res
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
622 proto_tree_add_item(ti
, hf_rtmac_header_flags_tunnel
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
629 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
633 case RTMAC_TYPE_TDMA_V1
:
634 dissect_rtnet_tdma_v1(next_tvb
, pinfo
, tree
);
638 call_dissector(dissector
, next_tvb
, pinfo
, tree
);
642 if (flags
& RTMAC_FLAG_TUNNEL
)
643 call_dissector(dissector
, next_tvb
, pinfo
, tree
);
646 case RTMAC_TYPE_TDMA
:
647 dissect_rtnet_tdma(next_tvb
, pinfo
, tree
);
651 call_dissector(data_handle
, next_tvb
, pinfo
, tree
);
657 dissect_rtcfg(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
) {
659 proto_tree
*vers_id_tree
, *vers_id_item
, *flags_tree
, *flags_item
;
662 guint32 config_length
,len
;
663 proto_tree
*ti
=NULL
,*rtcfg_tree
=NULL
;
665 /* Set the protocol column */
666 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "RTcfg");
668 /* Clear out stuff in the info column */
669 col_clear(pinfo
->cinfo
, COL_INFO
);
672 ti
= proto_tree_add_item(tree
, proto_rtcfg
, tvb
, offset
, -1, ENC_NA
);
673 rtcfg_tree
= proto_item_add_subtree(ti
, ett_rtcfg
);
676 vers_id
= tvb_get_guint8(tvb
, offset
);
678 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s",
679 val_to_str(vers_id
, rtcfg_msg_vals
, "Unknown (0x%04x)"));
683 vers_id_item
= proto_tree_add_uint(rtcfg_tree
, hf_rtcfg_vers_id
, tvb
,
686 vers_id_tree
=proto_item_add_subtree(vers_id_item
, ett_rtcfg
);
687 proto_tree_add_item(vers_id_tree
, hf_rtcfg_vers
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
688 proto_tree_add_item(vers_id_tree
, hf_rtcfg_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
691 proto_item_append_text(ti
, ", Version %d, %s",
693 val_to_str(vers_id
, rtcfg_msg_vals
, "Unknown (0x%04x)"));
695 switch( vers_id
& 0x1f )
697 case RTCFG_MSG_S1_CONFIG
:
698 addr_type
= tvb_get_guint8(tvb
, offset
);
699 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_address_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
704 case RTCFG_ADDRESS_TYPE_MAC
:
708 case RTCFG_ADDRESS_TYPE_IP
:
709 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
712 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_server_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
718 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_burst_rate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
721 config_length
= tvb_get_ntohs( tvb
, offset
);
722 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_s1_config_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
725 if( config_length
> 0 ) {
726 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_config_data
, tvb
, offset
, config_length
, ENC_NA
);
727 /*offset += config_length;*/
732 case RTCFG_MSG_ANN_NEW
:
733 addr_type
= tvb_get_guint8(tvb
, offset
);
734 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_address_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
739 case RTCFG_ADDRESS_TYPE_MAC
:
743 case RTCFG_ADDRESS_TYPE_IP
:
744 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
749 flags_item
= proto_tree_add_item(rtcfg_tree
, hf_rtcfg_client_flags
, tvb
,
750 offset
, 1, ENC_BIG_ENDIAN
);
752 flags_tree
=proto_item_add_subtree(flags_item
, ett_rtcfg
);
753 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_available
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
754 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_ready
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
755 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_res
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
758 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_burst_rate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
763 case RTCFG_MSG_ANN_REPLY
:
764 addr_type
= tvb_get_guint8(tvb
, offset
);
765 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_address_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
770 case RTCFG_ADDRESS_TYPE_MAC
:
774 case RTCFG_ADDRESS_TYPE_IP
:
775 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
780 flags_item
= proto_tree_add_item(rtcfg_tree
, hf_rtcfg_client_flags
, tvb
,
781 offset
, 1, ENC_BIG_ENDIAN
);
783 flags_tree
=proto_item_add_subtree(flags_item
, ett_rtcfg
);
784 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_available
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
785 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_ready
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
786 proto_tree_add_item(flags_tree
, hf_rtcfg_client_flags_res
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
789 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_padding
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
794 case RTCFG_MSG_S2_CONFIG
:
795 flags_item
= proto_tree_add_item(rtcfg_tree
, hf_rtcfg_server_flags
, tvb
,
796 offset
, 1, ENC_BIG_ENDIAN
);
798 flags_tree
=proto_item_add_subtree(flags_item
, ett_rtcfg
);
799 proto_tree_add_item(flags_tree
, hf_rtcfg_server_flags_res0
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
800 proto_tree_add_item(flags_tree
, hf_rtcfg_server_flags_ready
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
801 proto_tree_add_item(flags_tree
, hf_rtcfg_server_flags_res2
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
804 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_active_stations
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
807 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_heartbeat_period
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
810 config_length
= tvb_get_ntohl( tvb
, offset
);
811 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_s2_config_length
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
814 if( config_length
> 0 ) {
815 len
= tvb_reported_length_remaining(tvb
, offset
);
816 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_config_data
, tvb
, offset
, len
, ENC_NA
);
822 case RTCFG_MSG_S2_FRAG
:
823 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_config_offset
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
826 len
= tvb_reported_length_remaining(tvb
, offset
);
827 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_config_data
, tvb
, offset
, len
, ENC_NA
);
832 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_ack_length
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
837 case RTCFG_MSG_READY
:
840 case RTCFG_MSG_HBEAT
:
843 case RTCFG_MSG_DEAD_STN
:
844 addr_type
= tvb_get_guint8(tvb
, offset
);
845 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_address_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
850 case RTCFG_ADDRESS_TYPE_MAC
:
854 case RTCFG_ADDRESS_TYPE_IP
:
855 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_ip_address
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
860 switch (pinfo
->fd
->lnk_t
) {
861 case WTAP_ENCAP_ETHERNET
:
862 proto_tree_add_bytes_format_value( rtcfg_tree
, hf_rtcfg_client_hw_address
, tvb
, offset
, 32,
864 tvb_ether_to_str(tvb
, offset
));
868 proto_tree_add_item( rtcfg_tree
, hf_rtcfg_client_hw_address
, tvb
, offset
, 32, ENC_NA
);
880 proto_register_rtmac(void) {
881 static hf_register_info hf_array_rtmac
[] = {
884 { &hf_rtmac_header_type
,
887 FT_STRING
, BASE_NONE
, NULL
, 0x0,
888 "RTmac Type", HFILL
}},
890 { &hf_rtmac_header_ver
,
893 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
894 "RTmac Version", HFILL
}},
896 { &hf_rtmac_header_flags
,
898 "rtmac.header.flags",
899 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
900 "RTmac Flags", HFILL
}},
902 { &hf_rtmac_header_flags_tunnel
,
904 "rtmac.header.flags.tunnel",
905 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), RTMAC_FLAG_TUNNEL
,
906 "RTmac Tunnelling Flag", HFILL
}},
908 { &hf_rtmac_header_flags_res
,
910 "rtmac.header.flags.res",
911 FT_UINT8
, BASE_HEX
, NULL
, RTMAC_FLAGS_RES
,
912 "RTmac Reserved Flags", HFILL
}},
914 { &hf_rtmac_header_res_v1
,
917 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
918 "RTmac Reserved", HFILL
}},
921 static hf_register_info hf_array_tdma
[] = {
927 FT_UINT32
, BASE_HEX
, VALS(tdma_v1_msg_vals
), 0x0,
928 "TDMA-V1 Message", HFILL
}},
930 /* TDMA request conf */
932 { &hf_tdma_v1_msg_request_conf_station
,
934 "tdma-v1.msg.request_conf.station",
935 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
936 "TDMA Station", HFILL
}},
938 { &hf_tdma_v1_msg_request_conf_padding
,
940 "tdma-v1.msg.request_conf.padding",
941 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
942 "TDMA Padding", HFILL
}},
944 { &hf_tdma_v1_msg_request_conf_mtu
,
946 "tdma-v1.msg.request_conf.mtu",
947 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
948 "TDMA MTU", HFILL
}},
950 { &hf_tdma_v1_msg_request_conf_cycle
,
952 "tdma-v1.msg.request_conf.cycle",
953 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
954 "TDMA Cycle", HFILL
}},
958 { &hf_tdma_v1_msg_ack_conf_station
,
960 "tdma-v1.msg.ack_conf.station",
961 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
962 "TDMA Station", HFILL
}},
964 { &hf_tdma_v1_msg_ack_conf_padding
,
966 "tdma-v1.msg.ack_conf.padding",
967 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
968 "TDMA Padding", HFILL
}},
970 { &hf_tdma_v1_msg_ack_conf_mtu
,
972 "tdma-v1.msg.ack_conf.mtu",
973 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
974 "TDMA MTU", HFILL
}},
976 { &hf_tdma_v1_msg_ack_conf_cycle
,
978 "tdma-v1.msg.ack_conf.cycle",
979 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
980 "TDMA Cycle", HFILL
}},
982 /* TDMA ack ack conf */
984 { &hf_tdma_v1_msg_ack_ack_conf_station
,
986 "tdma-v1.msg.ack_ack_conf.station",
987 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
988 "TDMA Station", HFILL
}},
990 { &hf_tdma_v1_msg_ack_ack_conf_padding
,
992 "tdma-v1.msg.ack_ack_conf.padding",
993 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
994 "TDMA Padding", HFILL
}},
996 /* TDMA request test */
998 { &hf_tdma_v1_msg_request_test_counter
,
1000 "tdma-v1.msg.request_test.counter",
1001 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1002 "TDMA Counter", HFILL
}},
1004 { &hf_tdma_v1_msg_request_test_tx
,
1006 "tdma-v1.msg.request_test.tx",
1007 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1008 "TDMA TX", HFILL
}},
1012 { &hf_tdma_v1_msg_ack_test_counter
,
1014 "tdma-v1.msg.ack_test.counter",
1015 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1016 "TDMA Counter", HFILL
}},
1018 { &hf_tdma_v1_msg_ack_test_tx
,
1020 "tdma-v1.msg.ack_test.tx",
1021 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1022 "TDMA TX", HFILL
}},
1026 { &hf_tdma_v1_msg_request_change_offset_offset
,
1028 "tdma-v1.msg.request_change_offset.offset",
1029 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1030 "TDMA Offset", HFILL
}},
1032 /* TDMA start of frame */
1035 { &hf_tdma_v1_msg_start_of_frame_timestamp
,
1037 "tdma-v1.msg.start_of_frame.timestamp",
1038 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1039 "TDMA Timestamp", HFILL
}},
1041 /* TDMA station list */
1043 { &hf_tdma_v1_msg_station_list_nr_stations
,
1045 "tdma-v1.msg.station_list.nr_stations",
1046 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1047 "TDMA Nr. Stations", HFILL
}},
1049 { &hf_tdma_v1_msg_station_list_nr
,
1051 "tdma-v1.msg.station_list.nr",
1052 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1053 "TDMA Station Number", HFILL
}},
1055 { &hf_tdma_v1_msg_station_list_ip
,
1057 "tdma-v1.msg.station_list.ip",
1058 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1059 "TDMA Station IP", HFILL
}},
1061 { &hf_tdma_v1_msg_station_list_padding
,
1063 "tdma-v1.msg.station_list.padding",
1064 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1065 "TDMA Padding", HFILL
}},
1068 /* TDMA since version 2 */
1073 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1074 "TDMA Version", HFILL
}},
1079 FT_UINT16
, BASE_HEX
, VALS(tdma_msg_vals
), 0x0,
1080 "TDMA Message ID", HFILL
}},
1084 { &hf_tdma_sync_cycle
,
1087 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1088 "TDMA Sync Cycle Number", HFILL
}},
1090 { &hf_tdma_sync_xmit_stamp
,
1091 { "Transmission Time Stamp",
1092 "tdma.sync.xmit_stamp",
1093 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1094 "TDMA Sync Transmission Time Stamp", HFILL
}},
1096 { &hf_tdma_sync_sched_xmit
,
1097 { "Scheduled Transmission Time",
1098 "tdma.sync.sched_xmit",
1099 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1100 "TDMA Sync Scheduled Transmission Time", HFILL
}},
1102 /* TDMA request calibration */
1104 { &hf_tdma_req_cal_xmit_stamp
,
1105 { "Transmission Time Stamp",
1106 "tdma.req_cal.xmit_stamp",
1107 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1108 "TDMA Request Calibration Transmission Time Stamp", HFILL
}},
1110 { &hf_tdma_req_cal_rpl_cycle
,
1111 { "Reply Cycle Number",
1112 "tdma.req_cal.rpl_cycle",
1113 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1114 "TDMA Request Calibration Reply Cycle Number", HFILL
}},
1116 { &hf_tdma_req_cal_rpl_slot
,
1117 { "Reply Slot Offset",
1118 "tdma.req_cal.rpl_slot",
1119 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1120 "TDMA Request Calibration Reply Slot Offset", HFILL
}},
1122 /* TDMA reply calibration */
1124 { &hf_tdma_rpl_cal_req_stamp
,
1125 { "Request Transmission Time",
1126 "tdma.rpl_cal.req_stamp",
1127 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1128 "TDMA Reply Calibration Request Transmission Time", HFILL
}},
1130 { &hf_tdma_rpl_cal_rcv_stamp
,
1131 { "Reception Time Stamp",
1132 "tdma.rpl_cal.rcv_stamp",
1133 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1134 "TDMA Reply Calibration Reception Time Stamp", HFILL
}},
1136 { &hf_tdma_rpl_cal_xmit_stamp
,
1137 { "Transmission Time Stamp",
1138 "tdma.rpl_cal.xmit_stamp",
1139 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1140 "TDMA Reply Calibration Transmission Time Stamp", HFILL
}},
1143 static gint
*ett_array_rtmac
[] = {
1148 static gint
*ett_array_tdma
[] = {
1152 proto_rtmac
= proto_register_protocol("Real-Time Media Access Control", "RTmac", "rtmac");
1153 proto_register_field_array(proto_rtmac
, hf_array_rtmac
, array_length(hf_array_rtmac
));
1154 proto_register_subtree_array(ett_array_rtmac
, array_length(ett_array_rtmac
));
1156 proto_tdma
= proto_register_protocol("TDMA RTmac Discipline", "TDMA", "tdma");
1157 proto_register_field_array(proto_rtmac
, hf_array_tdma
, array_length(hf_array_tdma
));
1158 proto_register_subtree_array(ett_array_tdma
, array_length(ett_array_tdma
));
1163 proto_register_rtcfg(void) {
1164 static hf_register_info hf
[] = {
1165 { &hf_rtcfg_vers_id
,
1168 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1169 "RTcfg Version and ID", HFILL
}},
1174 FT_UINT8
, BASE_DEC
, NULL
, 0xe0,
1175 "RTcfg Version", HFILL
}},
1180 FT_UINT8
, BASE_HEX
, VALS(rtcfg_msg_vals
), 0x1f,
1181 "RTcfg ID", HFILL
}},
1183 { &hf_rtcfg_address_type
,
1185 "rtcfg.address_type",
1186 FT_UINT8
, BASE_DEC
, VALS(rtcfg_address_type_vals
), 0x00,
1187 "RTcfg Address Type", HFILL
}},
1189 { &hf_rtcfg_client_ip_address
,
1190 { "Client IP Address",
1191 "rtcfg.client_ip_address",
1192 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1193 "RTcfg Client IP Address", HFILL
}},
1195 { &hf_rtcfg_server_ip_address
,
1196 { "Server IP Address",
1197 "rtcfg.server_ip_address",
1198 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1199 "RTcfg Server IP Address", HFILL
}},
1201 { &hf_rtcfg_burst_rate
,
1202 { "Stage 2 Burst Rate",
1204 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1205 "RTcfg Stage 2 Burst Rate", HFILL
}},
1207 { &hf_rtcfg_s1_config_length
,
1208 { "Stage 1 Config Length",
1209 "rtcfg.s1_config_length",
1210 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1211 "RTcfg Stage 1 Config Length", HFILL
}},
1213 { &hf_rtcfg_config_data
,
1215 "rtcfg.config_data",
1216 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1217 "RTcfg Config Data", HFILL
}},
1219 { &hf_rtcfg_padding
,
1222 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1223 "RTcfg Padding", HFILL
}},
1225 { &hf_rtcfg_client_flags
,
1227 "rtcfg.client_flags",
1228 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
1229 "RTcfg Client Flags", HFILL
}},
1231 { &hf_rtcfg_client_flags_available
,
1233 "rtcfg.client_flags.available",
1234 FT_UINT8
, BASE_DEC
, NULL
, 0x01,
1235 "Request Available", HFILL
}},
1237 { &hf_rtcfg_client_flags_ready
,
1239 "rtcfg.client_flags.ready",
1240 FT_UINT8
, BASE_DEC
, NULL
, 0x02,
1243 { &hf_rtcfg_client_flags_res
,
1245 "rtcfg.client_flags.res",
1246 FT_UINT8
, BASE_HEX
, NULL
, 0xfc,
1249 { &hf_rtcfg_server_flags
,
1251 "rtcfg.server_flags",
1252 FT_UINT8
, BASE_HEX
, NULL
, 0x00,
1253 "RTcfg Server Flags", HFILL
}},
1255 { &hf_rtcfg_server_flags_res0
,
1257 "rtcfg.server_flags.res0",
1258 FT_UINT8
, BASE_HEX
, NULL
, 0x01,
1261 { &hf_rtcfg_server_flags_ready
,
1263 "rtcfg.server_flags.ready",
1264 FT_UINT8
, BASE_DEC
, NULL
, 0x02,
1267 { &hf_rtcfg_server_flags_res2
,
1269 "rtcfg.server_flags.res2",
1270 FT_UINT8
, BASE_HEX
, NULL
, 0xfc,
1273 { &hf_rtcfg_active_stations
,
1274 { "Active Stations",
1275 "rtcfg.active_stations",
1276 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1277 "RTcfg Active Stations", HFILL
}},
1279 { &hf_rtcfg_heartbeat_period
,
1280 { "Heartbeat Period",
1281 "rtcfg.hearbeat_period",
1282 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1283 "RTcfg Heartbeat Period", HFILL
}},
1285 { &hf_rtcfg_s2_config_length
,
1286 { "Stage 2 Config Length",
1287 "rtcfg.s2_config_length",
1288 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1289 "RTcfg Stage 2 Config Length", HFILL
}},
1291 { &hf_rtcfg_config_offset
,
1293 "rtcfg.config_offset",
1294 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1295 "RTcfg Config Offset", HFILL
}},
1297 { &hf_rtcfg_ack_length
,
1300 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1301 "RTcfg Ack Length", HFILL
}},
1303 { &hf_rtcfg_client_hw_address
,
1304 { "Client Hardware Address",
1305 "rtcfg.client_ip_address",
1306 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1307 "RTcfg Client Hardware Address", HFILL
}}
1310 static gint
*ett
[] = {
1314 proto_rtcfg
= proto_register_protocol("RTcfg","RTcfg","rtcfg");
1315 proto_register_field_array(proto_rtcfg
,hf
,array_length(hf
));
1316 proto_register_subtree_array(ett
,array_length(ett
));
1319 /* The registration hand-off routing */
1322 proto_reg_handoff_rtmac(void) {
1323 dissector_handle_t rtmac_handle
;
1325 rtmac_handle
= create_dissector_handle(dissect_rtmac
, proto_rtmac
);
1326 dissector_add_uint("ethertype", ETHERTYPE_RTMAC
, rtmac_handle
);
1327 ethertype_table
= find_dissector_table("ethertype");
1331 proto_reg_handoff_rtcfg(void) {
1332 dissector_handle_t rtcfg_handle
;
1334 data_handle
= find_dissector("data");
1335 rtcfg_handle
= create_dissector_handle(dissect_rtcfg
, proto_rtcfg
);
1336 dissector_add_uint("ethertype", ETHERTYPE_RTCFG
, rtcfg_handle
);