/src/wireshark/epan/dissectors/packet-rdt.c
Line | Count | Source |
1 | | /* packet-rdt.c |
2 | | * |
3 | | * Routines for RDT dissection |
4 | | * RDT = Real Data Transport |
5 | | * |
6 | | * Copyright 2005 |
7 | | * Written by Martin Mathieson and Tom Marshall |
8 | | * |
9 | | * Wireshark - Network traffic analyzer |
10 | | * By Gerald Combs <gerald@wireshark.org> |
11 | | * Copyright 1998 Gerald Combs |
12 | | * |
13 | | * SPDX-License-Identifier: GPL-2.0-or-later |
14 | | */ |
15 | | |
16 | | /* Information sources: |
17 | | * helixcommunity.org sources, in particular |
18 | | * server/protocol/transport/rdt/pub/tngpkt.pm |
19 | | */ |
20 | | |
21 | | #include "config.h" |
22 | | |
23 | | #include <epan/packet.h> |
24 | | #include <epan/expert.h> |
25 | | #include <epan/conversation.h> |
26 | | #include <epan/prefs.h> |
27 | | #include <epan/proto_data.h> |
28 | | #include "packet-rdt.h" |
29 | | |
30 | | static dissector_handle_t rdt_handle; |
31 | | |
32 | | static int proto_rdt; |
33 | | |
34 | | /* Packet fields */ |
35 | | static int hf_rdt_packet; |
36 | | |
37 | | /* flags1: shared */ |
38 | | static int hf_rdt_len_included; |
39 | | |
40 | | /* flags1: data packet */ |
41 | | static int hf_rdt_data_flags1; |
42 | | static int hf_rdt_data_need_reliable; |
43 | | static int hf_rdt_data_stream_id; |
44 | | static int hf_rdt_data_is_reliable; |
45 | | |
46 | | /* flags2: data packet */ |
47 | | static int hf_rdt_data_flags2; |
48 | | static int hf_rdt_data_backtoback; |
49 | | static int hf_rdt_data_slowdata; |
50 | | static int hf_rdt_data_asmrule; |
51 | | |
52 | | /* flags1: asm action packet */ |
53 | | static int hf_rdt_aact_flags; |
54 | | static int hf_rdt_aact_stream_id; |
55 | | |
56 | | /* flags1: ack packet */ |
57 | | static int hf_rdt_ack_flags; |
58 | | static int hf_rdt_ack_lost_high; |
59 | | |
60 | | /* flags1: latency report packet */ |
61 | | static int hf_rdt_latency_report_flags; |
62 | | |
63 | | /* flags1: bandwidth report packet */ |
64 | | static int hf_rdt_bandwidth_report_flags; |
65 | | |
66 | | /* flags1: stream end packet */ |
67 | | static int hf_rdt_stre_flags; |
68 | | static int hf_rdt_stre_need_reliable; |
69 | | static int hf_rdt_stre_stream_id; |
70 | | static int hf_rdt_stre_packet_sent; |
71 | | static int hf_rdt_stre_ext_flag; |
72 | | |
73 | | /* static int hf_rdt_rtt_request_flags; */ |
74 | | /* static int hf_rdt_rtt_response_flags; */ |
75 | | /* static int hf_rdt_congestion_flags; */ |
76 | | static int hf_rdt_report_flags; |
77 | | /* static int hf_rdt_tirq_flags; */ |
78 | | static int hf_rdt_tirp_flags; |
79 | | static int hf_rdt_bw_probing_flags; |
80 | | |
81 | | /* Octets 1-2: sequence number or packet type */ |
82 | | static int hf_rdt_sequence_number; |
83 | | static int hf_rdt_packet_type; |
84 | | |
85 | | /* Only present if length_included */ |
86 | | static int hf_rdt_packet_length; |
87 | | |
88 | | /* General shared fields */ |
89 | | static int hf_rdt_timestamp; |
90 | | static int hf_rdt_stream_id_ex; |
91 | | static int hf_rdt_asmrule_ex; |
92 | | static int hf_rdt_total_reliable; |
93 | | static int hf_rdt_data; |
94 | | |
95 | | /* Special use fields */ |
96 | | static int hf_rdt_aact_reliable_seqno; |
97 | | static int hf_rdt_brpt_interval; |
98 | | static int hf_rdt_brpt_bandwidth; |
99 | | static int hf_rdt_brpt_sequence; |
100 | | static int hf_rdt_rtrp_ts_sec; |
101 | | static int hf_rdt_rtrp_ts_usec; |
102 | | static int hf_rdt_cong_xmit_mult; |
103 | | static int hf_rdt_cong_recv_mult; |
104 | | static int hf_rdt_stre_seqno; |
105 | | static int hf_rdt_stre_dummy_flags1; |
106 | | static int hf_rdt_stre_dummy_type; |
107 | | static int hf_rdt_stre_reason_code; |
108 | | static int hf_rdt_lrpt_server_out_time; |
109 | | static int hf_rdt_tirq_request_rtt_info; |
110 | | static int hf_rdt_tirq_request_buffer_info; |
111 | | static int hf_rdt_tirq_request_time_msec; |
112 | | static int hf_rdt_tirp_has_rtt_info; |
113 | | static int hf_rdt_tirp_is_delayed; |
114 | | static int hf_rdt_tirp_has_buffer_info; |
115 | | static int hf_rdt_tirp_request_time_msec; |
116 | | static int hf_rdt_tirp_response_time_msec; |
117 | | static int hf_rdt_tirp_buffer_info; |
118 | | static int hf_rdt_tirp_buffer_info_count; |
119 | | static int hf_rdt_tirp_buffer_info_stream_id; |
120 | | static int hf_rdt_tirp_buffer_info_lowest_timestamp; |
121 | | static int hf_rdt_tirp_buffer_info_highest_timestamp; |
122 | | static int hf_rdt_tirp_buffer_info_bytes_buffered; |
123 | | static int hf_rdt_bwpp_seqno; |
124 | | static int hf_rdt_unk_flags1; |
125 | | |
126 | | /* RDT setup fields */ |
127 | | static int hf_rdt_setup; |
128 | | static int hf_rdt_setup_frame; |
129 | | static int hf_rdt_setup_method; |
130 | | static int hf_rdt_feature_level; |
131 | | |
132 | | /* RDT fields defining a sub tree */ |
133 | | static int ett_rdt; |
134 | | static int ett_rdt_packet; |
135 | | static int ett_rdt_setup; |
136 | | static int ett_rdt_data_flags1; |
137 | | static int ett_rdt_data_flags2; |
138 | | static int ett_rdt_aact_flags; |
139 | | static int ett_rdt_ack_flags; |
140 | | static int ett_rdt_latency_report_flags; |
141 | | static int ett_rdt_bandwidth_report_flags; |
142 | | static int ett_rdt_stre_flags; |
143 | | static int ett_rdt_rtt_request_flags; |
144 | | static int ett_rdt_rtt_response_flags; |
145 | | static int ett_rdt_congestion_flags; |
146 | | static int ett_rdt_report_flags; |
147 | | static int ett_rdt_tirq_flags; |
148 | | static int ett_rdt_tirp_flags; |
149 | | static int ett_rdt_tirp_buffer_info; |
150 | | static int ett_rdt_bw_probing_flags; |
151 | | |
152 | | static expert_field ei_rdt_packet_length; |
153 | | |
154 | 14 | #define RDT_UDP_PORT 6970 |
155 | | |
156 | | void proto_register_rdt(void); |
157 | | void proto_reg_handoff_rdt(void); |
158 | | |
159 | | /* Parse individual packet types */ |
160 | | static unsigned dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
161 | | static unsigned dissect_rdt_asm_action_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
162 | | static unsigned dissect_rdt_bandwidth_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
163 | | static unsigned dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
164 | | static unsigned dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
165 | | static unsigned dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
166 | | static unsigned dissect_rdt_congestion_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
167 | | static unsigned dissect_rdt_stream_end_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
168 | | static unsigned dissect_rdt_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
169 | | static unsigned dissect_rdt_latency_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
170 | | static unsigned dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
171 | | static unsigned dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
172 | | static unsigned dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
173 | | static unsigned dissect_rdt_unknown_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset); |
174 | | |
175 | | static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); |
176 | | |
177 | | /* Preferences bool to control whether or not setup info should be shown */ |
178 | | static bool global_rdt_show_setup_info = true; |
179 | | |
180 | | /* Packet types */ |
181 | 3 | #define RDT_ASMACTIION_PACKET 0xff00 |
182 | 2 | #define RDT_BANDWIDTHREPORT_PACKET 0xff01 |
183 | 1 | #define RDT_ACK_PACKET 0xff02 |
184 | 1 | #define RDT_RTTREQUEST_PACKET 0xff03 |
185 | 0 | #define RDT_RTTRESPONSE_PACKET 0xff04 |
186 | 0 | #define RDT_CONGESTION_PACKET 0xff05 |
187 | 0 | #define RDT_STREAMEND_PACKET 0xff06 |
188 | 0 | #define RDT_REPORT_PACKET 0xff07 |
189 | 0 | #define RDT_LATENCYREPORT_PACKET 0xff08 |
190 | 1 | #define RDT_TRANSPORTINFO_PACKET 0xff09 |
191 | 7 | #define RDT_TRANSPORTINFORESPONSE_PACKET 0xff0a |
192 | 2 | #define RDT_BWPROBING_PACKET 0xff0b |
193 | | |
194 | | static const value_string packet_type_vals[] = |
195 | | { |
196 | | { RDT_ASMACTIION_PACKET, "Asm action" }, |
197 | | { RDT_BANDWIDTHREPORT_PACKET, "Bandwidth report" }, |
198 | | { RDT_ACK_PACKET, "Ack" }, |
199 | | { RDT_RTTREQUEST_PACKET, "RTT request" }, |
200 | | { RDT_RTTRESPONSE_PACKET, "RTT response" }, |
201 | | { RDT_CONGESTION_PACKET, "Congestion" }, |
202 | | { RDT_STREAMEND_PACKET, "Stream end" }, |
203 | | { RDT_REPORT_PACKET, "Report" }, |
204 | | { RDT_LATENCYREPORT_PACKET, "Latency report" }, |
205 | | { RDT_TRANSPORTINFO_PACKET, "Transport info" }, |
206 | | { RDT_TRANSPORTINFORESPONSE_PACKET, "Transport info response" }, |
207 | | { RDT_BWPROBING_PACKET, "BW probing" }, |
208 | | { 0, NULL } |
209 | | }; |
210 | | |
211 | | |
212 | | /* Set up an RDT conversation */ |
213 | | void rdt_add_address(packet_info *pinfo, |
214 | | address *addr, int port, |
215 | | int other_port, |
216 | | const char *setup_method, |
217 | | int rdt_feature_level) |
218 | 0 | { |
219 | 0 | address null_addr; |
220 | 0 | conversation_t* p_conv; |
221 | 0 | struct _rdt_conversation_info *p_conv_data; |
222 | | |
223 | | /* If this isn't the first time this packet has been processed, |
224 | | we've already done this work, so we don't need to do it |
225 | | again. */ |
226 | 0 | if (pinfo->fd->visited) |
227 | 0 | { |
228 | 0 | return; |
229 | 0 | } |
230 | | |
231 | 0 | clear_address(&null_addr); |
232 | | |
233 | | /* Check if the ip address and port combination is not already registered |
234 | | as a conversation. */ |
235 | 0 | p_conv = find_conversation(pinfo->num, addr, &null_addr, CONVERSATION_UDP, port, other_port, |
236 | 0 | NO_ADDR_B | (!other_port ? NO_PORT_B : 0)); |
237 | | |
238 | | /* If not, create a new conversation. */ |
239 | 0 | if ( !p_conv || p_conv->setup_frame != pinfo->num) |
240 | 0 | { |
241 | 0 | p_conv = conversation_new(pinfo->num, addr, &null_addr, CONVERSATION_UDP, |
242 | 0 | (uint32_t)port, (uint32_t)other_port, |
243 | 0 | NO_ADDR2 | (!other_port ? NO_PORT2 : 0)); |
244 | 0 | } |
245 | | |
246 | | /* Set dissector */ |
247 | 0 | conversation_set_dissector(p_conv, rdt_handle); |
248 | | |
249 | | /* Check if the conversation has data associated with it. */ |
250 | 0 | p_conv_data = (struct _rdt_conversation_info *)conversation_get_proto_data(p_conv, proto_rdt); |
251 | | |
252 | | /* If not, add a new data item. */ |
253 | 0 | if (!p_conv_data) |
254 | 0 | { |
255 | | /* Create conversation data */ |
256 | 0 | p_conv_data = wmem_new(wmem_file_scope(), struct _rdt_conversation_info); |
257 | 0 | conversation_add_proto_data(p_conv, proto_rdt, p_conv_data); |
258 | 0 | } |
259 | | |
260 | | /* Update the conversation data. */ |
261 | 0 | (void) g_strlcpy(p_conv_data->method, setup_method, MAX_RDT_SETUP_METHOD_SIZE); |
262 | 0 | p_conv_data->frame_number = pinfo->num; |
263 | 0 | p_conv_data->feature_level = rdt_feature_level; |
264 | 0 | } |
265 | | |
266 | | |
267 | | |
268 | | /****************************************************************************/ |
269 | | /* Main dissection function */ |
270 | | /****************************************************************************/ |
271 | | static int dissect_rdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
272 | 25 | { |
273 | 25 | unsigned previous_offset = 0; |
274 | 25 | int offset = 0; |
275 | 25 | proto_item *ti; |
276 | 25 | proto_tree *rdt_tree = NULL; |
277 | 25 | proto_tree *rdt_packet_tree; |
278 | 25 | uint16_t packet_type; |
279 | | |
280 | | /* Set/clear columns */ |
281 | 25 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "RDT"); |
282 | 25 | col_clear(pinfo->cinfo, COL_INFO); |
283 | | |
284 | | /* Create RDT protocol tree */ |
285 | 25 | ti = proto_tree_add_item(tree, proto_rdt, tvb, offset, -1, ENC_NA); |
286 | 25 | rdt_tree = proto_item_add_subtree(ti, ett_rdt); |
287 | | |
288 | | /* Conversation setup info */ |
289 | 25 | if (global_rdt_show_setup_info) |
290 | 25 | { |
291 | 25 | show_setup_info(tvb, pinfo, rdt_tree); |
292 | 25 | } |
293 | | |
294 | | /* Parse all RDT packets found in the frame */ |
295 | 40 | while (offset != -1 && tvb_reported_length_remaining(tvb, offset)) |
296 | 27 | { |
297 | | /* Every packet type should have at least 3 bytes */ |
298 | 27 | tvb_ensure_bytes_exist(tvb, offset, 3); |
299 | | |
300 | | /* 2nd & 3rd bytes determine packet type */ |
301 | 27 | packet_type = tvb_get_ntohs(tvb, offset+1); |
302 | | |
303 | | /* Add a tree for the next individual packet */ |
304 | 27 | ti = proto_tree_add_string_format(rdt_tree, hf_rdt_packet, tvb, offset, -1, |
305 | 27 | "", |
306 | 27 | "RDT packet (%s)", |
307 | 27 | packet_type < 0xff00 ? "Data" : |
308 | 27 | val_to_str_const(packet_type, packet_type_vals, "Unknown")); |
309 | 27 | rdt_packet_tree = proto_item_add_subtree(ti, ett_rdt_packet); |
310 | | |
311 | | /* Dissect the details of the next packet in this frame */ |
312 | 27 | if (packet_type < 0xff00) |
313 | 7 | { |
314 | 7 | offset = dissect_rdt_data_packet(tvb, pinfo, rdt_packet_tree, offset); |
315 | 7 | } |
316 | 20 | else |
317 | 20 | { |
318 | 20 | switch (packet_type) |
319 | 20 | { |
320 | 3 | case RDT_ASMACTIION_PACKET: |
321 | 3 | offset = dissect_rdt_asm_action_packet(tvb, pinfo, rdt_packet_tree, offset); |
322 | 3 | break; |
323 | 2 | case RDT_BANDWIDTHREPORT_PACKET: |
324 | 2 | offset = dissect_rdt_bandwidth_report_packet(tvb, pinfo, rdt_packet_tree, offset); |
325 | 2 | break; |
326 | 1 | case RDT_ACK_PACKET: |
327 | 1 | offset = dissect_rdt_ack_packet(tvb, pinfo, rdt_packet_tree, offset); |
328 | 1 | break; |
329 | 1 | case RDT_RTTREQUEST_PACKET: |
330 | 1 | offset = dissect_rdt_rtt_request_packet(tvb, pinfo, rdt_packet_tree, offset); |
331 | 1 | break; |
332 | 0 | case RDT_RTTRESPONSE_PACKET: |
333 | 0 | offset = dissect_rdt_rtt_response_packet(tvb, pinfo, rdt_packet_tree, offset); |
334 | 0 | break; |
335 | 0 | case RDT_CONGESTION_PACKET: |
336 | 0 | offset = dissect_rdt_congestion_packet(tvb, pinfo, rdt_packet_tree, offset); |
337 | 0 | break; |
338 | 0 | case RDT_STREAMEND_PACKET: |
339 | 0 | offset = dissect_rdt_stream_end_packet(tvb, pinfo, rdt_packet_tree, offset); |
340 | 0 | break; |
341 | 0 | case RDT_REPORT_PACKET: |
342 | 0 | offset = dissect_rdt_report_packet(tvb, pinfo, rdt_packet_tree, offset); |
343 | 0 | break; |
344 | 0 | case RDT_LATENCYREPORT_PACKET: |
345 | 0 | offset = dissect_rdt_latency_report_packet(tvb, pinfo, rdt_packet_tree, offset); |
346 | 0 | break; |
347 | 1 | case RDT_TRANSPORTINFO_PACKET: |
348 | 1 | offset = dissect_rdt_transport_info_request_packet(tvb, pinfo, rdt_packet_tree, offset); |
349 | 1 | break; |
350 | 7 | case RDT_TRANSPORTINFORESPONSE_PACKET: |
351 | 7 | offset = dissect_rdt_transport_info_response_packet(tvb, pinfo, rdt_packet_tree, offset); |
352 | 7 | break; |
353 | 2 | case RDT_BWPROBING_PACKET: |
354 | 2 | offset = dissect_rdt_bw_probing_packet(tvb, pinfo, rdt_packet_tree, offset); |
355 | 2 | break; |
356 | | |
357 | 1 | default: |
358 | | /* Unknown control packet */ |
359 | 1 | offset = dissect_rdt_unknown_control(tvb, pinfo, rdt_packet_tree, offset); |
360 | 1 | break; |
361 | 20 | } |
362 | 20 | } |
363 | | |
364 | | /* Select correct number of bytes for the tree showing this packet */ |
365 | 15 | if (offset != -1) |
366 | 9 | { |
367 | 9 | proto_item_set_len(rdt_packet_tree, offset-previous_offset); |
368 | 9 | } |
369 | 15 | previous_offset = offset; |
370 | 15 | } |
371 | | |
372 | 13 | return tvb_captured_length(tvb); |
373 | 25 | } |
374 | | |
375 | | |
376 | | |
377 | | /************************************************/ |
378 | | /* Functions to dissect individual packet types */ |
379 | | /************************************************/ |
380 | | |
381 | | /* Dissect a data packet */ |
382 | | unsigned dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
383 | 7 | { |
384 | 7 | unsigned start_offset = offset; |
385 | 7 | uint16_t packet_length; |
386 | 7 | uint8_t flags1; |
387 | 7 | uint8_t length_included_flag; |
388 | 7 | uint8_t need_reliable_flag; |
389 | 7 | uint16_t stream_id; |
390 | 7 | uint16_t sequence_number; |
391 | 7 | uint8_t is_reliable_flag; |
392 | 7 | uint8_t flags2; |
393 | 7 | uint32_t timestamp; |
394 | 7 | uint16_t asm_rule_number; |
395 | 7 | uint8_t back_to_back; |
396 | 7 | uint8_t slow_data; |
397 | 7 | proto_tree *flags_tree1; |
398 | 7 | proto_tree *flags_tree2; |
399 | 7 | proto_item *ti; |
400 | | |
401 | | /* Flags in first byte */ |
402 | 7 | flags1 = tvb_get_uint8(tvb, offset); |
403 | 7 | length_included_flag = (flags1 & 0x80) >> 7; |
404 | 7 | need_reliable_flag = (flags1 & 0x40) >> 6; |
405 | 7 | stream_id = (flags1 & 0x3e) >> 1; |
406 | 7 | is_reliable_flag = flags1 & 0x01; |
407 | | |
408 | | /* Create subtree for flags1 fields */ |
409 | 7 | ti = proto_tree_add_string_format(tree, hf_rdt_data_flags1, tvb, offset, 1, |
410 | 7 | "", |
411 | 7 | "Length-included=%u, need-reliable=%u, stream-id=%u, is-reliable=%u", |
412 | 7 | length_included_flag, |
413 | 7 | need_reliable_flag, |
414 | 7 | stream_id, |
415 | 7 | is_reliable_flag); |
416 | 7 | flags_tree1 = proto_item_add_subtree(ti, ett_rdt_data_flags1); |
417 | | |
418 | 7 | proto_tree_add_item(flags_tree1, hf_rdt_len_included, tvb, offset, 1, ENC_BIG_ENDIAN); |
419 | 7 | proto_tree_add_item(flags_tree1, hf_rdt_data_need_reliable, tvb, offset, 1, ENC_BIG_ENDIAN); |
420 | 7 | proto_tree_add_item(flags_tree1, hf_rdt_data_stream_id, tvb, offset, 1, ENC_BIG_ENDIAN); |
421 | 7 | proto_tree_add_item(flags_tree1, hf_rdt_data_is_reliable, tvb, offset, 1, ENC_BIG_ENDIAN); |
422 | 7 | offset++; |
423 | | |
424 | | /* Sequence number */ |
425 | 7 | sequence_number = tvb_get_ntohs(tvb, offset); |
426 | 7 | proto_tree_add_item(tree, hf_rdt_sequence_number, tvb, offset, 2, ENC_BIG_ENDIAN); |
427 | 7 | offset += 2; |
428 | | |
429 | | /* Length field is optional */ |
430 | 7 | if (length_included_flag) |
431 | 2 | { |
432 | 2 | packet_length = tvb_get_ntohs(tvb, offset); |
433 | 2 | proto_tree_add_item(tree, hf_rdt_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
434 | 2 | offset += 2; |
435 | | |
436 | | /* Check that there are as many bytes as reported */ |
437 | 2 | tvb_ensure_bytes_exist(tvb, start_offset, packet_length); |
438 | 2 | } |
439 | 5 | else |
440 | 5 | { |
441 | 5 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
442 | 5 | } |
443 | | |
444 | | /* More flags */ |
445 | 7 | flags2 = tvb_get_uint8(tvb, offset); |
446 | 7 | back_to_back = (flags2 & 0x80) >> 7; |
447 | 7 | slow_data = (flags2 & 0x40) >> 6; |
448 | 7 | asm_rule_number = flags2 & 0x3f; |
449 | | |
450 | | |
451 | | /* Create subtree for flags2 fields */ |
452 | 7 | ti = proto_tree_add_string_format(tree, hf_rdt_data_flags2, tvb, offset, 1, |
453 | 7 | "", |
454 | 7 | "Back-to-back=%u, slow-data=%u, asm-rule=%u", |
455 | 7 | back_to_back, |
456 | 7 | slow_data, |
457 | 7 | asm_rule_number); |
458 | | |
459 | | /* Create subtree for flags and add fields */ |
460 | 7 | flags_tree2 = proto_item_add_subtree(ti, ett_rdt_data_flags2); |
461 | | |
462 | 7 | proto_tree_add_item(flags_tree2, hf_rdt_data_backtoback, tvb, offset, 1, ENC_BIG_ENDIAN); |
463 | 7 | proto_tree_add_item(flags_tree2, hf_rdt_data_slowdata, tvb, offset, 1, ENC_BIG_ENDIAN); |
464 | 7 | proto_tree_add_item(flags_tree2, hf_rdt_data_asmrule, tvb, offset, 1, ENC_BIG_ENDIAN); |
465 | 7 | offset++; |
466 | | |
467 | | /* Timestamp */ |
468 | 7 | timestamp = tvb_get_ntohl(tvb, offset); |
469 | 7 | proto_tree_add_item(tree, hf_rdt_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN); |
470 | 7 | offset += 4; |
471 | | |
472 | | /* Stream ID expansion */ |
473 | 7 | if (stream_id == 31) |
474 | 1 | { |
475 | 1 | stream_id = tvb_get_ntohs(tvb, offset); |
476 | 1 | proto_tree_add_item(tree, hf_rdt_stream_id_ex, tvb, offset, 2, ENC_BIG_ENDIAN); |
477 | 1 | offset += 2; |
478 | 1 | } |
479 | | |
480 | | /* Total reliable */ |
481 | 7 | if (need_reliable_flag) |
482 | 3 | { |
483 | 3 | proto_tree_add_item(tree, hf_rdt_total_reliable, tvb, offset, 2, ENC_BIG_ENDIAN); |
484 | 3 | offset += 2; |
485 | 3 | } |
486 | | |
487 | | /* Asm rule number */ |
488 | 7 | if (asm_rule_number == 63) |
489 | 1 | { |
490 | 1 | asm_rule_number = tvb_get_ntohs(tvb, offset); |
491 | 1 | proto_tree_add_item(tree, hf_rdt_asmrule_ex, tvb, offset, 2, ENC_BIG_ENDIAN); |
492 | 1 | offset += 2; |
493 | 1 | } |
494 | | |
495 | 7 | col_append_fstr(pinfo->cinfo, COL_INFO, |
496 | 7 | "DATA: stream-id=%02u asm-rule=%02u seq=%05u ts=%05u ", |
497 | 7 | stream_id, asm_rule_number, sequence_number, timestamp); |
498 | | |
499 | | /* The remaining data is unparsed. */ |
500 | 7 | proto_tree_add_item(tree, hf_rdt_data, tvb, offset, -1, ENC_NA); |
501 | 7 | offset += tvb_captured_length_remaining(tvb, offset); |
502 | | |
503 | 7 | if (packet_length < (offset - start_offset) || |
504 | 1 | packet_length > tvb_reported_length_remaining(tvb, start_offset)) |
505 | 0 | { |
506 | 0 | proto_tree_add_expert(tree, pinfo, &ei_rdt_packet_length, tvb, 0, 0); |
507 | 0 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
508 | 0 | } |
509 | | |
510 | 7 | return start_offset + packet_length; |
511 | 7 | } |
512 | | |
513 | | /* Dissect an asm-action packet */ |
514 | | unsigned dissect_rdt_asm_action_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
515 | 3 | { |
516 | 3 | unsigned start_offset = offset; |
517 | 3 | uint16_t packet_length; |
518 | 3 | uint8_t flags1; |
519 | 3 | uint8_t length_included_flag; |
520 | 3 | uint16_t stream_id; |
521 | 3 | uint16_t rel_seqno; |
522 | 3 | proto_tree *flags_tree; |
523 | 3 | proto_item *ti; |
524 | | |
525 | | /* Flags in first byte */ |
526 | 3 | flags1 = tvb_get_uint8(tvb, offset); |
527 | 3 | length_included_flag = (flags1 & 0x80) >> 7; |
528 | 3 | stream_id = (flags1 & 0x7c) >> 2; |
529 | | |
530 | | /* Create subtree for flags fields */ |
531 | 3 | proto_tree_add_item(tree, proto_rdt, tvb, offset, -1, ENC_NA); |
532 | 3 | ti = proto_tree_add_string_format(tree, hf_rdt_aact_flags, tvb, offset, 1, |
533 | 3 | "", |
534 | 3 | "Length-included=%u, stream_id=%u", |
535 | 3 | length_included_flag, |
536 | 3 | stream_id); |
537 | 3 | flags_tree = proto_item_add_subtree(ti, ett_rdt_aact_flags); |
538 | | |
539 | 3 | proto_tree_add_item(flags_tree, hf_rdt_len_included, tvb, offset, 1, ENC_BIG_ENDIAN); |
540 | 3 | proto_tree_add_item(flags_tree, hf_rdt_aact_stream_id, tvb, offset, 1, ENC_BIG_ENDIAN); |
541 | 3 | offset++; |
542 | | |
543 | | /* Packet type */ |
544 | 3 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
545 | 3 | offset += 2; |
546 | | |
547 | 3 | rel_seqno = tvb_get_ntohs(tvb, offset); |
548 | 3 | proto_tree_add_item(tree, hf_rdt_aact_reliable_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); |
549 | 3 | offset += 2; |
550 | | |
551 | | /* Length field is optional */ |
552 | 3 | if (length_included_flag) |
553 | 2 | { |
554 | 2 | packet_length = tvb_get_ntohs(tvb, offset); |
555 | 2 | proto_tree_add_item(tree, hf_rdt_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
556 | 2 | offset += 2; |
557 | | |
558 | | /* Check that there are as many bytes as reported */ |
559 | 2 | tvb_ensure_bytes_exist(tvb, start_offset, packet_length); |
560 | 2 | } |
561 | 1 | else |
562 | 1 | { |
563 | 1 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
564 | 1 | } |
565 | | |
566 | | /* Stream ID expansion */ |
567 | 3 | if (stream_id == 31) |
568 | 1 | { |
569 | 1 | stream_id = tvb_get_ntohs(tvb, offset); |
570 | 1 | proto_tree_add_item(tree, hf_rdt_stream_id_ex, tvb, offset, 2, ENC_BIG_ENDIAN); |
571 | 1 | offset += 2; |
572 | 1 | } |
573 | | |
574 | 3 | col_append_fstr(pinfo->cinfo, COL_INFO, |
575 | 3 | "ASM-ACTION: stream-id=%02u rel-seqno=%05u ", |
576 | 3 | stream_id, rel_seqno); |
577 | | |
578 | | /* The remaining data is unparsed. */ |
579 | 3 | proto_tree_add_item(tree, hf_rdt_data, tvb, offset, -1, ENC_NA); |
580 | | |
581 | 3 | if (packet_length < (offset - start_offset) || |
582 | 1 | packet_length > tvb_reported_length_remaining(tvb, start_offset)) |
583 | 1 | { |
584 | 1 | proto_tree_add_expert(tree, pinfo, &ei_rdt_packet_length, tvb, 0, 0); |
585 | 1 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
586 | 1 | } |
587 | | |
588 | 3 | return start_offset + packet_length; |
589 | 3 | } |
590 | | |
591 | | /* Dissect an bandwidth-report packet */ |
592 | | unsigned dissect_rdt_bandwidth_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
593 | 2 | { |
594 | 2 | unsigned start_offset = offset; |
595 | 2 | uint16_t packet_length; |
596 | 2 | uint8_t flags1; |
597 | 2 | uint8_t length_included_flag; |
598 | 2 | proto_tree *flags_tree; |
599 | 2 | proto_item *ti; |
600 | | |
601 | | /* Flags in first byte */ |
602 | 2 | flags1 = tvb_get_uint8(tvb, offset); |
603 | 2 | length_included_flag = (flags1 & 0x80) >> 7; |
604 | | |
605 | | /* Create subtree for flags fields */ |
606 | 2 | ti = proto_tree_add_string_format(tree, hf_rdt_bandwidth_report_flags, tvb, offset, 1, |
607 | 2 | "", |
608 | 2 | "Length-included=%u", |
609 | 2 | length_included_flag); |
610 | 2 | flags_tree = proto_item_add_subtree(ti, ett_rdt_bandwidth_report_flags); |
611 | | |
612 | 2 | proto_tree_add_item(flags_tree, hf_rdt_len_included, tvb, offset, 1, ENC_BIG_ENDIAN); |
613 | 2 | offset++; |
614 | | |
615 | | /* Packet type */ |
616 | 2 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
617 | 2 | offset += 2; |
618 | | |
619 | | /* Length field is optional */ |
620 | 2 | if (length_included_flag) |
621 | 2 | { |
622 | 2 | packet_length = tvb_get_ntohs(tvb, offset); |
623 | 2 | proto_tree_add_item(tree, hf_rdt_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
624 | 2 | offset += 2; |
625 | | |
626 | | /* Check that there are as many bytes as reported */ |
627 | 2 | tvb_ensure_bytes_exist(tvb, start_offset, packet_length); |
628 | 2 | } |
629 | 0 | else |
630 | 0 | { |
631 | 0 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
632 | 0 | } |
633 | | |
634 | 2 | proto_tree_add_item(tree, hf_rdt_brpt_interval, tvb, offset, 2, ENC_BIG_ENDIAN); |
635 | 2 | offset += 2; |
636 | 2 | proto_tree_add_item(tree, hf_rdt_brpt_bandwidth, tvb, offset, 4, ENC_BIG_ENDIAN); |
637 | 2 | offset += 4; |
638 | 2 | proto_tree_add_item(tree, hf_rdt_brpt_sequence, tvb, offset, 1, ENC_BIG_ENDIAN); |
639 | 2 | offset += 1; |
640 | | |
641 | 2 | col_append_str(pinfo->cinfo, COL_INFO, "BANDWIDTH-REPORT: "); |
642 | | |
643 | 2 | if (packet_length < (offset - start_offset) || |
644 | 0 | packet_length > tvb_reported_length_remaining(tvb, start_offset)) |
645 | 1 | { |
646 | 1 | proto_tree_add_expert(tree, pinfo, &ei_rdt_packet_length, tvb, 0, 0); |
647 | 1 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
648 | 1 | } |
649 | | |
650 | 2 | return start_offset + packet_length; |
651 | 2 | } |
652 | | |
653 | | /* Dissect an ack packet */ |
654 | | unsigned dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
655 | 1 | { |
656 | 1 | unsigned start_offset = offset; |
657 | 1 | uint16_t packet_length; |
658 | 1 | uint8_t flags1; |
659 | 1 | uint8_t length_included_flag; |
660 | 1 | uint8_t lost_high_flag; |
661 | 1 | proto_tree *flags_tree; |
662 | 1 | proto_item *ti; |
663 | | |
664 | | /* Flags in first byte */ |
665 | 1 | flags1 = tvb_get_uint8(tvb, offset); |
666 | 1 | length_included_flag = (flags1 & 0x80) >> 7; |
667 | 1 | lost_high_flag = (flags1 & 0x40) >> 6; |
668 | | |
669 | | /* Create subtree for flags fields */ |
670 | 1 | ti = proto_tree_add_string_format(tree, hf_rdt_ack_flags, tvb, offset, 1, |
671 | 1 | "", |
672 | 1 | "Length-included=%u, lost-high=%u", |
673 | 1 | length_included_flag, |
674 | 1 | lost_high_flag); |
675 | 1 | flags_tree = proto_item_add_subtree(ti, ett_rdt_ack_flags); |
676 | | |
677 | 1 | proto_tree_add_item(flags_tree, hf_rdt_len_included, tvb, offset, 1, ENC_BIG_ENDIAN); |
678 | 1 | proto_tree_add_item(flags_tree, hf_rdt_ack_lost_high, tvb, offset, 1, ENC_BIG_ENDIAN); |
679 | 1 | offset++; |
680 | | |
681 | | /* Packet type */ |
682 | 1 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
683 | 1 | offset += 2; |
684 | | |
685 | | /* Length field is optional */ |
686 | 1 | if (length_included_flag) |
687 | 0 | { |
688 | 0 | packet_length = tvb_get_ntohs(tvb, offset); |
689 | 0 | proto_tree_add_item(tree, hf_rdt_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
690 | 0 | offset += 2; |
691 | | |
692 | | /* Check that there are as many bytes as reported */ |
693 | 0 | tvb_ensure_bytes_exist(tvb, start_offset, packet_length); |
694 | 0 | } |
695 | 1 | else |
696 | 1 | { |
697 | 1 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
698 | 1 | } |
699 | | |
700 | | /* XXX: The remaining data is unparsed. */ |
701 | 1 | proto_tree_add_item(tree, hf_rdt_data, tvb, offset, -1, ENC_NA); |
702 | | |
703 | 1 | col_append_fstr(pinfo->cinfo, COL_INFO, "ACK: lh=%u ", lost_high_flag); |
704 | | |
705 | 1 | if (packet_length < (offset - start_offset) || |
706 | 1 | packet_length > tvb_reported_length_remaining(tvb, start_offset)) |
707 | 0 | { |
708 | 0 | proto_tree_add_expert(tree, pinfo, &ei_rdt_packet_length, tvb, 0, 0); |
709 | 0 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
710 | 0 | } |
711 | | |
712 | 1 | return start_offset + packet_length; |
713 | 1 | } |
714 | | |
715 | | /* Dissect an att-request packet */ |
716 | | unsigned dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
717 | 1 | { |
718 | | /* Flags in first byte */ |
719 | 1 | offset++; |
720 | | |
721 | | /* Packet type */ |
722 | 1 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
723 | 1 | offset += 2; |
724 | | |
725 | 1 | col_append_str(pinfo->cinfo, COL_INFO, "RTT-REQUEST: "); |
726 | | |
727 | 1 | return offset; |
728 | 1 | } |
729 | | |
730 | | /* Dissect an att-response packet */ |
731 | | unsigned dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
732 | 0 | { |
733 | | /* Flags in first byte */ |
734 | 0 | offset++; |
735 | | |
736 | | /* Packet type */ |
737 | 0 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
738 | 0 | offset += 2; |
739 | |
|
740 | 0 | proto_tree_add_item(tree, hf_rdt_rtrp_ts_sec, tvb, offset, 4, ENC_BIG_ENDIAN); |
741 | 0 | offset += 4; |
742 | 0 | proto_tree_add_item(tree, hf_rdt_rtrp_ts_usec, tvb, offset, 4, ENC_BIG_ENDIAN); |
743 | 0 | offset += 4; |
744 | |
|
745 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "RTT-RESPONSE: "); |
746 | |
|
747 | 0 | return offset; |
748 | 0 | } |
749 | | |
750 | | /* Dissect an congestion packet */ |
751 | | unsigned dissect_rdt_congestion_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
752 | 0 | { |
753 | | /* Flags in first byte */ |
754 | 0 | offset++; |
755 | | |
756 | | /* Packet type */ |
757 | 0 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
758 | 0 | offset += 2; |
759 | |
|
760 | 0 | proto_tree_add_item(tree, hf_rdt_cong_xmit_mult, tvb, offset, 4, ENC_BIG_ENDIAN); |
761 | 0 | offset += 4; |
762 | 0 | proto_tree_add_item(tree, hf_rdt_cong_recv_mult, tvb, offset, 4, ENC_BIG_ENDIAN); |
763 | 0 | offset += 4; |
764 | |
|
765 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "CONGESTION: "); |
766 | |
|
767 | 0 | return offset; |
768 | 0 | } |
769 | | |
770 | | /* Dissect an stream-end packet */ |
771 | | unsigned dissect_rdt_stream_end_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
772 | 0 | { |
773 | 0 | uint8_t flags1; |
774 | 0 | uint8_t need_reliable; |
775 | 0 | uint16_t stream_id; |
776 | 0 | uint8_t packet_sent; |
777 | 0 | uint8_t ext_flag; |
778 | 0 | proto_tree *flags_tree; |
779 | 0 | proto_item *ti; |
780 | | |
781 | | /* Flags in first byte */ |
782 | 0 | flags1 = tvb_get_uint8(tvb, offset); |
783 | 0 | need_reliable = (flags1 & 0x80) >> 7; |
784 | 0 | stream_id = (flags1 & 0x7c) >> 2; |
785 | 0 | packet_sent = (flags1 & 0x2) >> 1; |
786 | 0 | ext_flag = flags1 & 0x1; |
787 | | |
788 | | /* Create subtree for flags fields */ |
789 | 0 | ti = proto_tree_add_string_format(tree, hf_rdt_stre_flags, tvb, offset, 1, |
790 | 0 | "", |
791 | 0 | "Need-reliable=%u, stream-id=%u, packet-sent=%u, ext-flag=%u", |
792 | 0 | need_reliable, |
793 | 0 | stream_id, |
794 | 0 | packet_sent, |
795 | 0 | ext_flag); |
796 | 0 | flags_tree = proto_item_add_subtree(ti, ett_rdt_stre_flags); |
797 | |
|
798 | 0 | proto_tree_add_item(flags_tree, hf_rdt_stre_need_reliable, tvb, offset, 1, ENC_BIG_ENDIAN); |
799 | 0 | proto_tree_add_item(flags_tree, hf_rdt_stre_stream_id, tvb, offset, 1, ENC_BIG_ENDIAN); |
800 | 0 | proto_tree_add_item(flags_tree, hf_rdt_stre_packet_sent, tvb, offset, 1, ENC_BIG_ENDIAN); |
801 | 0 | proto_tree_add_item(flags_tree, hf_rdt_stre_ext_flag, tvb, offset, 1, ENC_BIG_ENDIAN); |
802 | 0 | offset++; |
803 | | |
804 | | /* Packet type */ |
805 | 0 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
806 | 0 | offset += 2; |
807 | |
|
808 | 0 | proto_tree_add_item(tree, hf_rdt_stre_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); |
809 | 0 | offset += 2; |
810 | 0 | proto_tree_add_item(tree, hf_rdt_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN); |
811 | 0 | offset += 4; |
812 | | |
813 | | /* Stream ID expansion */ |
814 | 0 | if (stream_id == 31) |
815 | 0 | { |
816 | 0 | stream_id = tvb_get_ntohs(tvb, offset); |
817 | 0 | proto_tree_add_item(tree, hf_rdt_stream_id_ex, tvb, offset, 2, ENC_BIG_ENDIAN); |
818 | 0 | offset += 2; |
819 | 0 | } |
820 | | |
821 | | /* Total reliable */ |
822 | 0 | if (need_reliable) |
823 | 0 | { |
824 | 0 | proto_tree_add_item(tree, hf_rdt_total_reliable, tvb, offset, 2, ENC_BIG_ENDIAN); |
825 | 0 | offset += 2; |
826 | 0 | } |
827 | |
|
828 | 0 | if (ext_flag) |
829 | 0 | { |
830 | 0 | proto_tree_add_item(tree, hf_rdt_stre_dummy_flags1, tvb, offset, 1, ENC_BIG_ENDIAN); |
831 | 0 | offset += 1; |
832 | 0 | proto_tree_add_item(tree, hf_rdt_stre_dummy_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
833 | 0 | offset += 2; |
834 | 0 | proto_tree_add_item(tree, hf_rdt_stre_reason_code, tvb, offset, 4, ENC_BIG_ENDIAN); |
835 | 0 | offset += 4; |
836 | | /* XXX: Remainder is reason_text */ |
837 | 0 | offset += tvb_captured_length_remaining(tvb, offset); |
838 | 0 | } |
839 | |
|
840 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "STREAM-END: stream-id=%02u ", stream_id); |
841 | |
|
842 | 0 | return offset; |
843 | 0 | } |
844 | | |
845 | | /* Dissect an report packet */ |
846 | | unsigned dissect_rdt_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
847 | 0 | { |
848 | 0 | unsigned start_offset = offset; |
849 | 0 | uint16_t packet_length; |
850 | 0 | uint8_t flags1; |
851 | 0 | uint8_t length_included_flag; |
852 | 0 | proto_tree *flags_tree; |
853 | 0 | proto_item *ti; |
854 | | |
855 | | /* Flags in first byte */ |
856 | 0 | flags1 = tvb_get_uint8(tvb, offset); |
857 | 0 | length_included_flag = (flags1 & 0x80) >> 7; |
858 | | |
859 | | /* Create subtree for flags fields */ |
860 | 0 | ti = proto_tree_add_string_format(tree, hf_rdt_report_flags, tvb, offset, 1, |
861 | 0 | "", |
862 | 0 | "Length-included=%u", |
863 | 0 | length_included_flag); |
864 | 0 | flags_tree = proto_item_add_subtree(ti, ett_rdt_report_flags); |
865 | |
|
866 | 0 | proto_tree_add_item(flags_tree, hf_rdt_len_included, tvb, offset, 1, ENC_BIG_ENDIAN); |
867 | 0 | offset++; |
868 | | |
869 | | /* Packet type */ |
870 | 0 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
871 | 0 | offset += 2; |
872 | | |
873 | | /* Length field is optional */ |
874 | 0 | if (length_included_flag) |
875 | 0 | { |
876 | 0 | packet_length = tvb_get_ntohs(tvb, offset); |
877 | 0 | proto_tree_add_item(tree, hf_rdt_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
878 | 0 | offset += 2; |
879 | | |
880 | | /* Check that there are as many bytes as reported */ |
881 | 0 | tvb_ensure_bytes_exist(tvb, start_offset, packet_length); |
882 | 0 | } |
883 | 0 | else |
884 | 0 | { |
885 | 0 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
886 | 0 | } |
887 | |
|
888 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "REPORT: "); |
889 | | |
890 | | /* The remaining data is unparsed. */ |
891 | 0 | proto_tree_add_item(tree, hf_rdt_data, tvb, offset, -1, ENC_NA); |
892 | |
|
893 | 0 | if (packet_length < (offset - start_offset) || |
894 | 0 | packet_length > tvb_reported_length_remaining(tvb, start_offset)) |
895 | 0 | { |
896 | 0 | proto_tree_add_expert(tree, pinfo, &ei_rdt_packet_length, tvb, 0, 0); |
897 | 0 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
898 | 0 | } |
899 | |
|
900 | 0 | return start_offset + packet_length; |
901 | 0 | } |
902 | | |
903 | | /* Dissect an latency-report packet */ |
904 | | unsigned dissect_rdt_latency_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
905 | 0 | { |
906 | 0 | unsigned start_offset = offset; |
907 | 0 | uint16_t packet_length; |
908 | 0 | uint8_t flags1; |
909 | 0 | uint8_t length_included_flag; |
910 | 0 | uint32_t server_out_time; |
911 | 0 | proto_tree *flags_tree; |
912 | 0 | proto_item *ti; |
913 | | |
914 | | /* Flags in first byte */ |
915 | 0 | flags1 = tvb_get_uint8(tvb, offset); |
916 | 0 | length_included_flag = (flags1 & 0x80) >> 7; |
917 | | |
918 | | /* Create subtree for flags fields */ |
919 | 0 | ti = proto_tree_add_string_format(tree, hf_rdt_latency_report_flags, tvb, offset, 1, |
920 | 0 | "", |
921 | 0 | "Length-included=%u", |
922 | 0 | length_included_flag); |
923 | 0 | flags_tree = proto_item_add_subtree(ti, ett_rdt_latency_report_flags); |
924 | |
|
925 | 0 | proto_tree_add_item(flags_tree, hf_rdt_len_included, tvb, offset, 1, ENC_BIG_ENDIAN); |
926 | 0 | offset++; |
927 | | |
928 | | /* Packet type */ |
929 | 0 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
930 | 0 | offset += 2; |
931 | | |
932 | | /* Length field is optional */ |
933 | 0 | if (length_included_flag) |
934 | 0 | { |
935 | 0 | packet_length = tvb_get_ntohs(tvb, offset); |
936 | 0 | proto_tree_add_item(tree, hf_rdt_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
937 | 0 | offset += 2; |
938 | | |
939 | | /* Check that there are as many bytes as reported */ |
940 | 0 | tvb_ensure_bytes_exist(tvb, start_offset, packet_length); |
941 | 0 | } |
942 | 0 | else |
943 | 0 | { |
944 | 0 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
945 | 0 | } |
946 | |
|
947 | 0 | server_out_time = tvb_get_ntohl(tvb, offset); |
948 | 0 | proto_tree_add_item(tree, hf_rdt_lrpt_server_out_time, tvb, offset, 4, ENC_BIG_ENDIAN); |
949 | 0 | offset += 4; |
950 | |
|
951 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "LATENCY-REPORT: t=%u ", server_out_time); |
952 | |
|
953 | 0 | if (packet_length < (offset - start_offset) || |
954 | 0 | packet_length > tvb_reported_length_remaining(tvb, start_offset)) |
955 | 0 | { |
956 | 0 | proto_tree_add_expert(tree, pinfo, &ei_rdt_packet_length, tvb, 0, 0); |
957 | 0 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
958 | 0 | } |
959 | |
|
960 | 0 | return start_offset + packet_length; |
961 | 0 | } |
962 | | |
963 | | /* Dissect a transport-info packet */ |
964 | | unsigned dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
965 | 1 | { |
966 | 1 | uint8_t flags1; |
967 | 1 | uint8_t request_rtt_info_flag; |
968 | 1 | uint8_t request_buffer_info_flag; |
969 | 1 | proto_tree *flags_tree; |
970 | 1 | proto_item *ti; |
971 | | |
972 | | /* Flags in first byte */ |
973 | 1 | flags1 = tvb_get_uint8(tvb, offset); |
974 | 1 | request_rtt_info_flag = (flags1 & 0x2) >> 1; |
975 | 1 | request_buffer_info_flag = (flags1 & 0x01); |
976 | | |
977 | | /* Create subtree for flags fields */ |
978 | 1 | ti = proto_tree_add_string_format(tree, hf_rdt_ack_flags, tvb, offset, 1, |
979 | 1 | "", |
980 | 1 | "Request-rtt-info=%u, request-buffer-info=%u", |
981 | 1 | request_rtt_info_flag, |
982 | 1 | request_buffer_info_flag); |
983 | 1 | flags_tree = proto_item_add_subtree(ti, ett_rdt_tirq_flags); |
984 | | |
985 | 1 | proto_tree_add_item(flags_tree, hf_rdt_tirq_request_rtt_info, tvb, offset, 1, ENC_BIG_ENDIAN); |
986 | 1 | proto_tree_add_item(flags_tree, hf_rdt_tirq_request_buffer_info, tvb, offset, 1, ENC_BIG_ENDIAN); |
987 | 1 | offset++; |
988 | | |
989 | | /* Packet type */ |
990 | 1 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
991 | 1 | offset += 2; |
992 | | |
993 | 1 | if (request_rtt_info_flag) |
994 | 0 | { |
995 | 0 | proto_tree_add_item(tree, hf_rdt_tirq_request_time_msec, tvb, offset, 4, ENC_BIG_ENDIAN); |
996 | 0 | offset += 4; |
997 | 0 | } |
998 | | |
999 | 1 | col_append_str(pinfo->cinfo, COL_INFO, "TRANSPORT-INFO-REQUEST: "); |
1000 | | |
1001 | 1 | return offset; |
1002 | 1 | } |
1003 | | |
1004 | | /* Dissect an transport-info-response packet */ |
1005 | | unsigned dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
1006 | 7 | { |
1007 | 7 | uint8_t flags1; |
1008 | 7 | uint8_t has_rtt_info; |
1009 | 7 | uint8_t is_delayed; |
1010 | 7 | uint8_t has_buffer_info; |
1011 | 7 | proto_tree *flags_tree; |
1012 | 7 | proto_item *ti; |
1013 | | |
1014 | | /* Flags in first byte */ |
1015 | 7 | flags1 = tvb_get_uint8(tvb, offset); |
1016 | 7 | has_rtt_info = (flags1 & 0x4) >> 2; |
1017 | 7 | is_delayed = (flags1 & 0x2) >> 1; |
1018 | 7 | has_buffer_info = (flags1 & 0x1); |
1019 | | |
1020 | | /* Create subtree for flags fields */ |
1021 | 7 | ti = proto_tree_add_string_format(tree, hf_rdt_tirp_flags, tvb, offset, 1, |
1022 | 7 | "", |
1023 | 7 | "Has-rtt-info=%u, is-delayed=%u, has-buffer-info=%u", |
1024 | 7 | has_rtt_info, |
1025 | 7 | is_delayed, |
1026 | 7 | has_buffer_info); |
1027 | 7 | flags_tree = proto_item_add_subtree(ti, ett_rdt_tirp_flags); |
1028 | | |
1029 | 7 | proto_tree_add_item(flags_tree, hf_rdt_tirp_has_rtt_info, tvb, offset, 1, ENC_BIG_ENDIAN); |
1030 | 7 | proto_tree_add_item(flags_tree, hf_rdt_tirp_is_delayed, tvb, offset, 1, ENC_BIG_ENDIAN); |
1031 | 7 | proto_tree_add_item(flags_tree, hf_rdt_tirp_has_buffer_info, tvb, offset, 1, ENC_BIG_ENDIAN); |
1032 | 7 | offset++; |
1033 | | |
1034 | | /* Packet type */ |
1035 | 7 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
1036 | 7 | offset += 2; |
1037 | | |
1038 | | /* RTT info */ |
1039 | 7 | if (has_rtt_info) |
1040 | 7 | { |
1041 | 7 | proto_tree_add_item(tree, hf_rdt_tirp_request_time_msec, tvb, offset, 4, ENC_BIG_ENDIAN); |
1042 | 7 | offset += 4; |
1043 | | |
1044 | 7 | if (is_delayed) |
1045 | 7 | { |
1046 | 7 | proto_tree_add_item(tree, hf_rdt_tirp_response_time_msec, tvb, offset, 4, ENC_BIG_ENDIAN); |
1047 | 7 | offset += 4; |
1048 | 7 | } |
1049 | 7 | } |
1050 | | |
1051 | | /* Buffer info */ |
1052 | 7 | if (has_buffer_info) |
1053 | 7 | { |
1054 | 7 | uint16_t n; |
1055 | | |
1056 | | /* Read number of buffers */ |
1057 | 7 | uint16_t buffer_info_count = tvb_get_ntohs(tvb, offset); |
1058 | 7 | proto_tree_add_item(tree, hf_rdt_tirp_buffer_info_count, tvb, offset, 2, ENC_BIG_ENDIAN); |
1059 | 7 | offset += 2; |
1060 | | |
1061 | 50 | for (n=0; n < buffer_info_count; n++) |
1062 | 43 | { |
1063 | 43 | proto_tree *buffer_info_tree; |
1064 | 43 | proto_item *ti2; |
1065 | | |
1066 | | /* Each buffer info in a new subtree */ |
1067 | 43 | ti2 = proto_tree_add_string_format(tree, hf_rdt_tirp_buffer_info, tvb, offset, 14, |
1068 | 43 | "", |
1069 | 43 | "Buffer info %u", |
1070 | 43 | n+1); |
1071 | 43 | buffer_info_tree = proto_item_add_subtree(ti2, ett_rdt_tirp_buffer_info); |
1072 | | |
1073 | | /* Read individual buffer info */ |
1074 | 43 | proto_tree_add_item(buffer_info_tree, hf_rdt_tirp_buffer_info_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1075 | 43 | offset += 2; |
1076 | 43 | proto_tree_add_item(buffer_info_tree, hf_rdt_tirp_buffer_info_lowest_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN); |
1077 | 43 | offset += 4; |
1078 | 43 | proto_tree_add_item(buffer_info_tree, hf_rdt_tirp_buffer_info_highest_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN); |
1079 | 43 | offset += 4; |
1080 | 43 | proto_tree_add_item(buffer_info_tree, hf_rdt_tirp_buffer_info_bytes_buffered, tvb, offset, 4, ENC_BIG_ENDIAN); |
1081 | 43 | offset += 4; |
1082 | 43 | } |
1083 | 7 | } |
1084 | | |
1085 | | /* Report what is left */ |
1086 | 7 | offset += tvb_captured_length_remaining(tvb, offset); |
1087 | | |
1088 | 7 | col_append_str(pinfo->cinfo, COL_INFO, "RESPONSE: "); |
1089 | | |
1090 | 7 | return offset; |
1091 | 7 | } |
1092 | | |
1093 | | /* Dissect a bw-probing packet */ |
1094 | | unsigned dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
1095 | 2 | { |
1096 | 2 | unsigned start_offset = offset; |
1097 | 2 | uint16_t packet_length; |
1098 | 2 | uint8_t flags1; |
1099 | 2 | uint8_t length_included_flag; |
1100 | 2 | proto_tree *flags_tree; |
1101 | 2 | proto_item *ti; |
1102 | | |
1103 | | /* Flags in first byte */ |
1104 | 2 | flags1 = tvb_get_uint8(tvb, offset); |
1105 | 2 | length_included_flag = (flags1 & 0x80) >> 7; |
1106 | | |
1107 | | /* Create subtree for flags fields */ |
1108 | 2 | ti = proto_tree_add_string_format(tree, hf_rdt_bw_probing_flags, tvb, offset, 1, |
1109 | 2 | "", |
1110 | 2 | "Length-included=%u", |
1111 | 2 | length_included_flag); |
1112 | 2 | flags_tree = proto_item_add_subtree(ti, ett_rdt_bw_probing_flags); |
1113 | | |
1114 | 2 | proto_tree_add_item(flags_tree, hf_rdt_len_included, tvb, offset, 1, ENC_BIG_ENDIAN); |
1115 | 2 | offset++; |
1116 | | |
1117 | | /* Packet type */ |
1118 | 2 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
1119 | 2 | offset += 2; |
1120 | | |
1121 | | /* Length field is optional */ |
1122 | 2 | if (length_included_flag) |
1123 | 1 | { |
1124 | 1 | packet_length = tvb_get_ntohs(tvb, offset); |
1125 | 1 | proto_tree_add_item(tree, hf_rdt_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
1126 | 1 | offset += 2; |
1127 | | |
1128 | | /* Check that there are as many bytes as reported */ |
1129 | 1 | tvb_ensure_bytes_exist(tvb, start_offset, packet_length); |
1130 | 1 | } |
1131 | 1 | else |
1132 | 1 | { |
1133 | 1 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
1134 | 1 | } |
1135 | | |
1136 | 2 | proto_tree_add_item(tree, hf_rdt_bwpp_seqno, tvb, offset, 1, ENC_BIG_ENDIAN); |
1137 | 2 | offset += 1; |
1138 | 2 | proto_tree_add_item(tree, hf_rdt_timestamp, tvb, offset, 1, ENC_BIG_ENDIAN); |
1139 | 2 | offset += 4; |
1140 | | |
1141 | 2 | col_append_str(pinfo->cinfo, COL_INFO, "BW-PROBING: "); |
1142 | | |
1143 | 2 | if (packet_length < (offset - start_offset) || |
1144 | 1 | packet_length > tvb_reported_length_remaining(tvb, start_offset)) |
1145 | 0 | { |
1146 | 0 | proto_tree_add_expert(tree, pinfo, &ei_rdt_packet_length, tvb, 0, 0); |
1147 | 0 | packet_length = tvb_captured_length_remaining(tvb, start_offset); |
1148 | 0 | } |
1149 | | |
1150 | 2 | return start_offset + packet_length; |
1151 | 2 | } |
1152 | | |
1153 | | /* Dissect an unknown control packet */ |
1154 | | unsigned dissect_rdt_unknown_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset) |
1155 | 1 | { |
1156 | | /* Flags in first byte */ |
1157 | 1 | proto_tree_add_item(tree, hf_rdt_unk_flags1, tvb, offset, 1, ENC_BIG_ENDIAN); |
1158 | 1 | offset++; |
1159 | | |
1160 | | /* Packet type */ |
1161 | 1 | proto_tree_add_item(tree, hf_rdt_packet_type, tvb, offset, 2, ENC_BIG_ENDIAN); |
1162 | 1 | offset += 2; |
1163 | | |
1164 | | /* The remaining data is unparsed. */ |
1165 | 1 | proto_tree_add_item(tree, hf_rdt_data, tvb, offset, -1, ENC_NA); |
1166 | 1 | offset += tvb_captured_length_remaining(tvb, offset); |
1167 | | |
1168 | 1 | col_append_str(pinfo->cinfo, COL_INFO, "UNKNOWN-CTL: "); |
1169 | | |
1170 | 1 | return offset; |
1171 | 1 | } |
1172 | | |
1173 | | /* Look for conversation info and display any setup info found */ |
1174 | | static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
1175 | 25 | { |
1176 | | /* Conversation and current data */ |
1177 | 25 | conversation_t *p_conv; |
1178 | 25 | struct _rdt_conversation_info *p_conv_data; |
1179 | | |
1180 | | /* Use existing packet info if available */ |
1181 | 25 | p_conv_data = (struct _rdt_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rdt, 0); |
1182 | | |
1183 | 25 | if (!p_conv_data) |
1184 | 25 | { |
1185 | | /* First time, get info from conversation */ |
1186 | 25 | p_conv = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, |
1187 | 25 | conversation_pt_to_conversation_type(pinfo->ptype), |
1188 | 25 | pinfo->destport, pinfo->srcport, NO_ADDR_B); |
1189 | 25 | if (p_conv) |
1190 | 2 | { |
1191 | | /* Create space for conversation info */ |
1192 | 2 | struct _rdt_conversation_info *p_conv_packet_data; |
1193 | 2 | p_conv_data = (struct _rdt_conversation_info *)conversation_get_proto_data(p_conv, proto_rdt); |
1194 | | |
1195 | 2 | if (p_conv_data) |
1196 | 0 | { |
1197 | | /* Save this conversation info into packet info */ |
1198 | 0 | p_conv_packet_data = wmem_new(wmem_file_scope(), struct _rdt_conversation_info); |
1199 | 0 | (void) g_strlcpy(p_conv_packet_data->method, p_conv_data->method, MAX_RDT_SETUP_METHOD_SIZE); |
1200 | 0 | p_conv_packet_data->frame_number = p_conv_data->frame_number; |
1201 | 0 | p_conv_packet_data->feature_level = p_conv_data->feature_level; |
1202 | 0 | p_add_proto_data(wmem_file_scope(), pinfo, proto_rdt, 0, p_conv_packet_data); |
1203 | 0 | } |
1204 | 2 | } |
1205 | 25 | } |
1206 | | |
1207 | | /* Create setup info subtree with summary info. */ |
1208 | 25 | if (p_conv_data) |
1209 | 0 | { |
1210 | 0 | proto_tree *rdt_setup_tree; |
1211 | 0 | proto_item *ti = proto_tree_add_string_format(tree, hf_rdt_setup, tvb, 0, 0, |
1212 | 0 | "", |
1213 | 0 | "Stream setup by %s (frame %u), feature level %d", |
1214 | 0 | p_conv_data->method, |
1215 | 0 | p_conv_data->frame_number, |
1216 | 0 | p_conv_data->feature_level); |
1217 | 0 | proto_item_set_generated(ti); |
1218 | 0 | rdt_setup_tree = proto_item_add_subtree(ti, ett_rdt_setup); |
1219 | 0 | if (rdt_setup_tree) |
1220 | 0 | { |
1221 | | /* Add details into subtree */ |
1222 | 0 | proto_item* item = proto_tree_add_uint(rdt_setup_tree, hf_rdt_setup_frame, |
1223 | 0 | tvb, 0, 0, p_conv_data->frame_number); |
1224 | 0 | proto_item_set_generated(item); |
1225 | 0 | item = proto_tree_add_string(rdt_setup_tree, hf_rdt_setup_method, |
1226 | 0 | tvb, 0, 0, p_conv_data->method); |
1227 | 0 | proto_item_set_generated(item); |
1228 | 0 | item = proto_tree_add_int(rdt_setup_tree, hf_rdt_feature_level, |
1229 | 0 | tvb, 0, 0, p_conv_data->feature_level); |
1230 | 0 | proto_item_set_generated(item); |
1231 | 0 | } |
1232 | 0 | } |
1233 | 25 | } |
1234 | | |
1235 | | |
1236 | | void proto_register_rdt(void) |
1237 | 14 | { |
1238 | 14 | static hf_register_info hf[] = |
1239 | 14 | { |
1240 | 14 | { |
1241 | 14 | &hf_rdt_packet, |
1242 | 14 | { |
1243 | 14 | "RDT packet", |
1244 | 14 | "rdt.packet", |
1245 | 14 | FT_STRING, |
1246 | 14 | BASE_NONE, |
1247 | 14 | NULL, |
1248 | 14 | 0x0, |
1249 | 14 | NULL, HFILL |
1250 | 14 | } |
1251 | 14 | }, |
1252 | 14 | { |
1253 | 14 | &hf_rdt_data_flags1, |
1254 | 14 | { |
1255 | 14 | "RDT data flags 1", |
1256 | 14 | "rdt.data-flags1", |
1257 | 14 | FT_STRING, |
1258 | 14 | BASE_NONE, |
1259 | 14 | NULL, |
1260 | 14 | 0x0, |
1261 | 14 | NULL, HFILL |
1262 | 14 | } |
1263 | 14 | }, |
1264 | 14 | { |
1265 | 14 | &hf_rdt_len_included, |
1266 | 14 | { |
1267 | 14 | "Length included", |
1268 | 14 | "rdt.length-included", |
1269 | 14 | FT_UINT8, |
1270 | 14 | BASE_DEC, |
1271 | 14 | NULL, |
1272 | 14 | 0x80, |
1273 | 14 | NULL, HFILL |
1274 | 14 | } |
1275 | 14 | }, |
1276 | 14 | { |
1277 | 14 | &hf_rdt_data_need_reliable, |
1278 | 14 | { |
1279 | 14 | "Need reliable", |
1280 | 14 | "rdt.need-reliable", |
1281 | 14 | FT_UINT8, |
1282 | 14 | BASE_DEC, |
1283 | 14 | NULL, |
1284 | 14 | 0x40, |
1285 | 14 | NULL, HFILL |
1286 | 14 | } |
1287 | 14 | }, |
1288 | 14 | { |
1289 | 14 | &hf_rdt_data_stream_id, |
1290 | 14 | { |
1291 | 14 | "Stream ID", |
1292 | 14 | "rdt.stream-id", |
1293 | 14 | FT_UINT8, |
1294 | 14 | BASE_DEC, |
1295 | 14 | NULL, |
1296 | 14 | 0x3e, |
1297 | 14 | NULL, HFILL |
1298 | 14 | } |
1299 | 14 | }, |
1300 | 14 | { |
1301 | 14 | &hf_rdt_data_is_reliable, |
1302 | 14 | { |
1303 | 14 | "Is reliable", |
1304 | 14 | "rdt.is-reliable", |
1305 | 14 | FT_UINT8, |
1306 | 14 | BASE_DEC, |
1307 | 14 | NULL, |
1308 | 14 | 0x01, |
1309 | 14 | NULL, HFILL |
1310 | 14 | } |
1311 | 14 | }, |
1312 | 14 | { |
1313 | 14 | &hf_rdt_data_flags2, |
1314 | 14 | { |
1315 | 14 | "RDT data flags 2", |
1316 | 14 | "rdt.data-flags2", |
1317 | 14 | FT_STRING, |
1318 | 14 | BASE_NONE, |
1319 | 14 | NULL, |
1320 | 14 | 0x0, |
1321 | 14 | "RDT data flags2", HFILL |
1322 | 14 | } |
1323 | 14 | }, |
1324 | 14 | { |
1325 | 14 | &hf_rdt_data_backtoback, |
1326 | 14 | { |
1327 | 14 | "Back-to-back", |
1328 | 14 | "rdt.back-to-back", |
1329 | 14 | FT_UINT8, |
1330 | 14 | BASE_DEC, |
1331 | 14 | NULL, |
1332 | 14 | 0x80, |
1333 | 14 | NULL, HFILL |
1334 | 14 | } |
1335 | 14 | }, |
1336 | 14 | { |
1337 | 14 | &hf_rdt_data_slowdata, |
1338 | 14 | { |
1339 | 14 | "Slow data", |
1340 | 14 | "rdt.slow-data", |
1341 | 14 | FT_UINT8, |
1342 | 14 | BASE_DEC, |
1343 | 14 | NULL, |
1344 | 14 | 0x40, |
1345 | 14 | NULL, HFILL |
1346 | 14 | } |
1347 | 14 | }, |
1348 | 14 | { |
1349 | 14 | &hf_rdt_data_asmrule, |
1350 | 14 | { |
1351 | 14 | "asm rule", |
1352 | 14 | "rdt.asm-rule", |
1353 | 14 | FT_UINT8, |
1354 | 14 | BASE_DEC, |
1355 | 14 | NULL, |
1356 | 14 | 0x3f, |
1357 | 14 | NULL, HFILL |
1358 | 14 | } |
1359 | 14 | }, |
1360 | 14 | { |
1361 | 14 | &hf_rdt_aact_flags, |
1362 | 14 | { |
1363 | 14 | "RDT asm-action flags 1", |
1364 | 14 | "rdt.aact-flags", |
1365 | 14 | FT_STRING, |
1366 | 14 | BASE_NONE, |
1367 | 14 | NULL, |
1368 | 14 | 0x0, |
1369 | 14 | "RDT aact flags", HFILL |
1370 | 14 | } |
1371 | 14 | }, |
1372 | 14 | { |
1373 | 14 | &hf_rdt_aact_stream_id, |
1374 | 14 | { |
1375 | 14 | "Stream ID", |
1376 | 14 | "rdt.stream-id", |
1377 | 14 | FT_UINT8, |
1378 | 14 | BASE_DEC, |
1379 | 14 | NULL, |
1380 | 14 | 0x7c, |
1381 | 14 | NULL, HFILL |
1382 | 14 | } |
1383 | 14 | }, |
1384 | 14 | { |
1385 | 14 | &hf_rdt_sequence_number, |
1386 | 14 | { |
1387 | 14 | "Sequence number", |
1388 | 14 | "rdt.sequence-number", |
1389 | 14 | FT_UINT16, |
1390 | 14 | BASE_DEC, |
1391 | 14 | NULL, |
1392 | 14 | 0x0, |
1393 | 14 | NULL, HFILL |
1394 | 14 | } |
1395 | 14 | }, |
1396 | 14 | { |
1397 | 14 | &hf_rdt_packet_type, |
1398 | 14 | { |
1399 | 14 | "Packet type", |
1400 | 14 | "rdt.packet-type", |
1401 | 14 | FT_UINT16, |
1402 | 14 | BASE_HEX, |
1403 | 14 | VALS(packet_type_vals), |
1404 | 14 | 0x0, |
1405 | 14 | NULL, HFILL |
1406 | 14 | } |
1407 | 14 | }, |
1408 | 14 | { |
1409 | 14 | &hf_rdt_ack_flags, |
1410 | 14 | { |
1411 | 14 | "RDT ack flags", |
1412 | 14 | "rdt.ack-flags", |
1413 | 14 | FT_STRING, |
1414 | 14 | BASE_NONE, |
1415 | 14 | NULL, |
1416 | 14 | 0x0, |
1417 | 14 | NULL, HFILL |
1418 | 14 | } |
1419 | 14 | }, |
1420 | 14 | { |
1421 | 14 | &hf_rdt_ack_lost_high, |
1422 | 14 | { |
1423 | 14 | "Lost high", |
1424 | 14 | "rdt.lost-high", |
1425 | 14 | FT_UINT8, |
1426 | 14 | BASE_DEC, |
1427 | 14 | NULL, |
1428 | 14 | 0x40, |
1429 | 14 | NULL, HFILL |
1430 | 14 | } |
1431 | 14 | }, |
1432 | 14 | { |
1433 | 14 | &hf_rdt_latency_report_flags, |
1434 | 14 | { |
1435 | 14 | "RDT latency report flags", |
1436 | 14 | "rdt.latency-report-flags", |
1437 | 14 | FT_STRING, |
1438 | 14 | BASE_NONE, |
1439 | 14 | NULL, |
1440 | 14 | 0x0, |
1441 | 14 | NULL, HFILL |
1442 | 14 | } |
1443 | 14 | }, |
1444 | 14 | { |
1445 | 14 | &hf_rdt_bandwidth_report_flags, |
1446 | 14 | { |
1447 | 14 | "RDT bandwidth report flags", |
1448 | 14 | "rdt.bandwidth-report-flags", |
1449 | 14 | FT_STRING, |
1450 | 14 | BASE_NONE, |
1451 | 14 | NULL, |
1452 | 14 | 0x0, |
1453 | 14 | NULL, HFILL |
1454 | 14 | } |
1455 | 14 | }, |
1456 | 14 | { |
1457 | 14 | &hf_rdt_stre_flags, |
1458 | 14 | { |
1459 | 14 | "RDT stream end flags", |
1460 | 14 | "rdt.stream-end-flags", |
1461 | 14 | FT_STRING, |
1462 | 14 | BASE_NONE, |
1463 | 14 | NULL, |
1464 | 14 | 0x0, |
1465 | 14 | NULL, HFILL |
1466 | 14 | } |
1467 | 14 | }, |
1468 | | #if 0 |
1469 | | { |
1470 | | &hf_rdt_rtt_request_flags, |
1471 | | { |
1472 | | "RDT rtt request flags", |
1473 | | "rdt.rtt-request-flags", |
1474 | | FT_STRING, |
1475 | | BASE_NONE, |
1476 | | NULL, |
1477 | | 0x0, |
1478 | | NULL, HFILL |
1479 | | } |
1480 | | }, |
1481 | | #endif |
1482 | | #if 0 |
1483 | | { |
1484 | | &hf_rdt_rtt_response_flags, |
1485 | | { |
1486 | | "RDT rtt response flags", |
1487 | | "rdt.rtt-response-flags", |
1488 | | FT_STRING, |
1489 | | BASE_NONE, |
1490 | | NULL, |
1491 | | 0x0, |
1492 | | NULL, HFILL |
1493 | | } |
1494 | | }, |
1495 | | #endif |
1496 | | #if 0 |
1497 | | { |
1498 | | &hf_rdt_congestion_flags, |
1499 | | { |
1500 | | "RDT congestion flags", |
1501 | | "rdt.congestion-flags", |
1502 | | FT_STRING, |
1503 | | BASE_NONE, |
1504 | | NULL, |
1505 | | 0x0, |
1506 | | NULL, HFILL |
1507 | | } |
1508 | | }, |
1509 | | #endif |
1510 | 14 | { |
1511 | 14 | &hf_rdt_report_flags, |
1512 | 14 | { |
1513 | 14 | "RDT report flags", |
1514 | 14 | "rdt.report-flags", |
1515 | 14 | FT_STRING, |
1516 | 14 | BASE_NONE, |
1517 | 14 | NULL, |
1518 | 14 | 0x0, |
1519 | 14 | NULL, HFILL |
1520 | 14 | } |
1521 | 14 | }, |
1522 | | #if 0 |
1523 | | { |
1524 | | &hf_rdt_tirq_flags, |
1525 | | { |
1526 | | "RDT transport info request flags", |
1527 | | "rdt.transport-info-request-flags", |
1528 | | FT_STRING, |
1529 | | BASE_NONE, |
1530 | | NULL, |
1531 | | 0x0, |
1532 | | NULL, HFILL |
1533 | | } |
1534 | | }, |
1535 | | #endif |
1536 | 14 | { |
1537 | 14 | &hf_rdt_tirp_flags, |
1538 | 14 | { |
1539 | 14 | "RDT transport info response flags", |
1540 | 14 | "rdt.transport-info-response-flags", |
1541 | 14 | FT_STRING, |
1542 | 14 | BASE_NONE, |
1543 | 14 | NULL, |
1544 | 14 | 0x0, |
1545 | 14 | NULL, HFILL |
1546 | 14 | } |
1547 | 14 | }, |
1548 | 14 | { |
1549 | 14 | &hf_rdt_bw_probing_flags, |
1550 | 14 | { |
1551 | 14 | "RDT bw probing flags", |
1552 | 14 | "rdt.bw-probing-flags", |
1553 | 14 | FT_STRING, |
1554 | 14 | BASE_NONE, |
1555 | 14 | NULL, |
1556 | 14 | 0x0, |
1557 | 14 | NULL, HFILL |
1558 | 14 | } |
1559 | 14 | }, |
1560 | 14 | { |
1561 | 14 | &hf_rdt_packet_length, |
1562 | 14 | { |
1563 | 14 | "Packet length", |
1564 | 14 | "rdt.packet-length", |
1565 | 14 | FT_UINT16, |
1566 | 14 | BASE_DEC, |
1567 | 14 | NULL, |
1568 | 14 | 0x0, |
1569 | 14 | NULL, HFILL |
1570 | 14 | } |
1571 | 14 | }, |
1572 | 14 | { |
1573 | 14 | &hf_rdt_timestamp, |
1574 | 14 | { |
1575 | 14 | "Timestamp", |
1576 | 14 | "rdt.timestamp", |
1577 | 14 | FT_UINT32, |
1578 | 14 | BASE_DEC, |
1579 | 14 | NULL, |
1580 | 14 | 0x0, |
1581 | 14 | NULL, HFILL |
1582 | 14 | } |
1583 | 14 | }, |
1584 | 14 | { |
1585 | 14 | &hf_rdt_stream_id_ex, |
1586 | 14 | { |
1587 | 14 | "Stream-id expansion", |
1588 | 14 | "rdt.stream-id-expansion", |
1589 | 14 | FT_UINT16, |
1590 | 14 | BASE_DEC, |
1591 | 14 | NULL, |
1592 | 14 | 0x0, |
1593 | 14 | NULL, HFILL |
1594 | 14 | } |
1595 | 14 | }, |
1596 | 14 | { |
1597 | 14 | &hf_rdt_asmrule_ex, |
1598 | 14 | { |
1599 | 14 | "Asm rule expansion", |
1600 | 14 | "rdt.asm-rule-expansion", |
1601 | 14 | FT_UINT16, |
1602 | 14 | BASE_DEC, |
1603 | 14 | NULL, |
1604 | 14 | 0x0, |
1605 | 14 | NULL, HFILL |
1606 | 14 | } |
1607 | 14 | }, |
1608 | 14 | { |
1609 | 14 | &hf_rdt_total_reliable, |
1610 | 14 | { |
1611 | 14 | "Total reliable", |
1612 | 14 | "rdt.total-reliable", |
1613 | 14 | FT_UINT16, |
1614 | 14 | BASE_DEC, |
1615 | 14 | NULL, |
1616 | 14 | 0x0, |
1617 | 14 | NULL, HFILL |
1618 | 14 | } |
1619 | 14 | }, |
1620 | 14 | { |
1621 | 14 | &hf_rdt_data, |
1622 | 14 | { |
1623 | 14 | "Data", |
1624 | 14 | "rdt.data", |
1625 | 14 | FT_NONE, |
1626 | 14 | BASE_NONE, |
1627 | 14 | NULL, |
1628 | 14 | 0x0, |
1629 | 14 | NULL, HFILL |
1630 | 14 | } |
1631 | 14 | }, |
1632 | 14 | { |
1633 | 14 | &hf_rdt_aact_reliable_seqno, |
1634 | 14 | { |
1635 | 14 | "Reliable sequence number", |
1636 | 14 | "rdt.reliable-seq-no", |
1637 | 14 | FT_UINT16, |
1638 | 14 | BASE_DEC, |
1639 | 14 | NULL, |
1640 | 14 | 0x0, |
1641 | 14 | NULL, HFILL |
1642 | 14 | } |
1643 | 14 | }, |
1644 | 14 | { |
1645 | 14 | &hf_rdt_brpt_interval, |
1646 | 14 | { |
1647 | 14 | "Bandwidth report interval", |
1648 | 14 | "rdt.bwid-report-interval", |
1649 | 14 | FT_UINT16, |
1650 | 14 | BASE_DEC, |
1651 | 14 | NULL, |
1652 | 14 | 0x0, |
1653 | 14 | NULL, HFILL |
1654 | 14 | } |
1655 | 14 | }, |
1656 | 14 | { |
1657 | 14 | &hf_rdt_brpt_bandwidth, |
1658 | 14 | { |
1659 | 14 | "Bandwidth report bandwidth", |
1660 | 14 | "rdt.bwid-report-bandwidth", |
1661 | 14 | FT_UINT32, |
1662 | 14 | BASE_DEC, |
1663 | 14 | NULL, |
1664 | 14 | 0x0, |
1665 | 14 | NULL, HFILL |
1666 | 14 | } |
1667 | 14 | }, |
1668 | 14 | { |
1669 | 14 | &hf_rdt_brpt_sequence, |
1670 | 14 | { |
1671 | 14 | "Bandwidth report sequence", |
1672 | 14 | "rdt.bwid-report-sequence", |
1673 | 14 | FT_UINT16, |
1674 | 14 | BASE_DEC, |
1675 | 14 | NULL, |
1676 | 14 | 0x0, |
1677 | 14 | NULL, HFILL |
1678 | 14 | } |
1679 | 14 | }, |
1680 | 14 | { |
1681 | 14 | &hf_rdt_rtrp_ts_sec, |
1682 | 14 | { |
1683 | 14 | "Round trip response timestamp seconds", |
1684 | 14 | "rdt.rtrp-ts-sec", |
1685 | 14 | FT_UINT32, |
1686 | 14 | BASE_DEC, |
1687 | 14 | NULL, |
1688 | 14 | 0x0, |
1689 | 14 | NULL, HFILL |
1690 | 14 | } |
1691 | 14 | }, |
1692 | 14 | { |
1693 | 14 | &hf_rdt_rtrp_ts_usec, |
1694 | 14 | { |
1695 | 14 | "Round trip response timestamp microseconds", |
1696 | 14 | "rdt.rtrp-ts-usec", |
1697 | 14 | FT_UINT32, |
1698 | 14 | BASE_DEC, |
1699 | 14 | NULL, |
1700 | 14 | 0x0, |
1701 | 14 | NULL, HFILL |
1702 | 14 | } |
1703 | 14 | }, |
1704 | 14 | { |
1705 | 14 | &hf_rdt_cong_xmit_mult, |
1706 | 14 | { |
1707 | 14 | "Congestion transmit multiplier", |
1708 | 14 | "rdt.cong-xmit-mult", |
1709 | 14 | FT_UINT32, |
1710 | 14 | BASE_DEC, |
1711 | 14 | NULL, |
1712 | 14 | 0x0, |
1713 | 14 | NULL, HFILL |
1714 | 14 | } |
1715 | 14 | }, |
1716 | 14 | { |
1717 | 14 | &hf_rdt_cong_recv_mult, |
1718 | 14 | { |
1719 | 14 | "Congestion receive multiplier", |
1720 | 14 | "rdt.cong-recv-mult", |
1721 | 14 | FT_UINT32, |
1722 | 14 | BASE_DEC, |
1723 | 14 | NULL, |
1724 | 14 | 0x0, |
1725 | 14 | NULL, HFILL |
1726 | 14 | } |
1727 | 14 | }, |
1728 | 14 | { |
1729 | 14 | &hf_rdt_stre_need_reliable, |
1730 | 14 | { |
1731 | 14 | "Need reliable", |
1732 | 14 | "rdt.stre-need-reliable", |
1733 | 14 | FT_UINT8, |
1734 | 14 | BASE_DEC, |
1735 | 14 | NULL, |
1736 | 14 | 0x80, |
1737 | 14 | NULL, HFILL |
1738 | 14 | } |
1739 | 14 | }, |
1740 | 14 | { |
1741 | 14 | &hf_rdt_stre_stream_id, |
1742 | 14 | { |
1743 | 14 | "Stream id", |
1744 | 14 | "rdt.stre-stream-id", |
1745 | 14 | FT_UINT8, |
1746 | 14 | BASE_DEC, |
1747 | 14 | NULL, |
1748 | 14 | 0x7c, |
1749 | 14 | NULL, HFILL |
1750 | 14 | } |
1751 | 14 | }, |
1752 | 14 | { |
1753 | 14 | &hf_rdt_stre_packet_sent, |
1754 | 14 | { |
1755 | 14 | "Packet sent", |
1756 | 14 | "rdt.stre-packet-sent", |
1757 | 14 | FT_UINT8, |
1758 | 14 | BASE_DEC, |
1759 | 14 | NULL, |
1760 | 14 | 0x02, |
1761 | 14 | NULL, HFILL |
1762 | 14 | } |
1763 | 14 | }, |
1764 | 14 | { |
1765 | 14 | &hf_rdt_stre_ext_flag, |
1766 | 14 | { |
1767 | 14 | "Ext flag", |
1768 | 14 | "rdt.stre-ext-flag", |
1769 | 14 | FT_UINT8, |
1770 | 14 | BASE_DEC, |
1771 | 14 | NULL, |
1772 | 14 | 0x01, |
1773 | 14 | NULL, HFILL |
1774 | 14 | } |
1775 | 14 | }, |
1776 | | |
1777 | 14 | { |
1778 | 14 | &hf_rdt_stre_seqno, |
1779 | 14 | { |
1780 | 14 | "Stream end sequence number", |
1781 | 14 | "rdt.stre-seqno", |
1782 | 14 | FT_UINT16, |
1783 | 14 | BASE_DEC, |
1784 | 14 | NULL, |
1785 | 14 | 0x0, |
1786 | 14 | NULL, HFILL |
1787 | 14 | } |
1788 | 14 | }, |
1789 | 14 | { |
1790 | 14 | &hf_rdt_stre_dummy_flags1, |
1791 | 14 | { |
1792 | 14 | "Stream end reason dummy flags1", |
1793 | 14 | "rdt.stre-reason-dummy-flags1", |
1794 | 14 | FT_UINT8, |
1795 | 14 | BASE_HEX, |
1796 | 14 | NULL, |
1797 | 14 | 0x0, |
1798 | 14 | NULL, HFILL |
1799 | 14 | } |
1800 | 14 | }, |
1801 | 14 | { |
1802 | 14 | &hf_rdt_stre_dummy_type, |
1803 | 14 | { |
1804 | 14 | "Stream end reason dummy type", |
1805 | 14 | "rdt.stre-reason-dummy-type", |
1806 | 14 | FT_UINT16, |
1807 | 14 | BASE_HEX, |
1808 | 14 | NULL, |
1809 | 14 | 0x0, |
1810 | 14 | NULL, HFILL |
1811 | 14 | } |
1812 | 14 | }, |
1813 | 14 | { |
1814 | 14 | &hf_rdt_stre_reason_code, |
1815 | 14 | { |
1816 | 14 | "Stream end reason code", |
1817 | 14 | "rdt.stre-reason-code", |
1818 | 14 | FT_UINT32, |
1819 | 14 | BASE_HEX, |
1820 | 14 | NULL, |
1821 | 14 | 0x0, |
1822 | 14 | NULL, HFILL |
1823 | 14 | } |
1824 | 14 | }, |
1825 | 14 | { |
1826 | 14 | &hf_rdt_lrpt_server_out_time, |
1827 | 14 | { |
1828 | 14 | "Latency report server out time", |
1829 | 14 | "rdt.lrpt-server-out-time", |
1830 | 14 | FT_UINT32, |
1831 | 14 | BASE_DEC, |
1832 | 14 | NULL, |
1833 | 14 | 0x0, |
1834 | 14 | NULL, HFILL |
1835 | 14 | } |
1836 | 14 | }, |
1837 | 14 | { |
1838 | 14 | &hf_rdt_tirq_request_rtt_info, |
1839 | 14 | { |
1840 | 14 | "Transport info request rtt info flag", |
1841 | 14 | "rdt.tirq-request-rtt-info", |
1842 | 14 | FT_UINT8, |
1843 | 14 | BASE_DEC, |
1844 | 14 | NULL, |
1845 | 14 | 0x2, |
1846 | 14 | NULL, HFILL |
1847 | 14 | } |
1848 | 14 | }, |
1849 | 14 | { |
1850 | 14 | &hf_rdt_tirq_request_buffer_info, |
1851 | 14 | { |
1852 | 14 | "Transport info request buffer info flag", |
1853 | 14 | "rdt.tirq-request-buffer-info", |
1854 | 14 | FT_UINT8, |
1855 | 14 | BASE_DEC, |
1856 | 14 | NULL, |
1857 | 14 | 0x1, |
1858 | 14 | NULL, HFILL |
1859 | 14 | } |
1860 | 14 | }, |
1861 | 14 | { |
1862 | 14 | &hf_rdt_tirq_request_time_msec, |
1863 | 14 | { |
1864 | 14 | "Transport info request time msec", |
1865 | 14 | "rdt.tirq-request-time-msec", |
1866 | 14 | FT_UINT32, |
1867 | 14 | BASE_DEC, |
1868 | 14 | NULL, |
1869 | 14 | 0x0, |
1870 | 14 | NULL, HFILL |
1871 | 14 | } |
1872 | 14 | }, |
1873 | 14 | { |
1874 | 14 | &hf_rdt_tirp_has_rtt_info, |
1875 | 14 | { |
1876 | 14 | "Transport info response has rtt info flag", |
1877 | 14 | "rdt.tirp-has-rtt-info", |
1878 | 14 | FT_UINT8, |
1879 | 14 | BASE_DEC, |
1880 | 14 | NULL, |
1881 | 14 | 0x4, |
1882 | 14 | NULL, HFILL |
1883 | 14 | } |
1884 | 14 | }, |
1885 | 14 | { |
1886 | 14 | &hf_rdt_tirp_is_delayed, |
1887 | 14 | { |
1888 | 14 | "Transport info response is delayed", |
1889 | 14 | "rdt.tirp-is-delayed", |
1890 | 14 | FT_UINT8, |
1891 | 14 | BASE_DEC, |
1892 | 14 | NULL, |
1893 | 14 | 0x2, |
1894 | 14 | NULL, HFILL |
1895 | 14 | } |
1896 | 14 | }, |
1897 | 14 | { |
1898 | 14 | &hf_rdt_tirp_has_buffer_info, |
1899 | 14 | { |
1900 | 14 | "Transport info response has buffer info", |
1901 | 14 | "rdt.tirp-has-buffer-info", |
1902 | 14 | FT_UINT8, |
1903 | 14 | BASE_DEC, |
1904 | 14 | NULL, |
1905 | 14 | 0x1, |
1906 | 14 | NULL, HFILL |
1907 | 14 | } |
1908 | 14 | }, |
1909 | 14 | { |
1910 | 14 | &hf_rdt_tirp_request_time_msec, |
1911 | 14 | { |
1912 | 14 | "Transport info request time msec", |
1913 | 14 | "rdt.tirp-request-time-msec", |
1914 | 14 | FT_UINT32, |
1915 | 14 | BASE_DEC, |
1916 | 14 | NULL, |
1917 | 14 | 0x0, |
1918 | 14 | NULL, HFILL |
1919 | 14 | } |
1920 | 14 | }, |
1921 | 14 | { |
1922 | 14 | &hf_rdt_tirp_response_time_msec, |
1923 | 14 | { |
1924 | 14 | "Transport info response time msec", |
1925 | 14 | "rdt.tirp-response-time-msec", |
1926 | 14 | FT_UINT32, |
1927 | 14 | BASE_DEC, |
1928 | 14 | NULL, |
1929 | 14 | 0x0, |
1930 | 14 | NULL, HFILL |
1931 | 14 | } |
1932 | 14 | }, |
1933 | 14 | { |
1934 | 14 | &hf_rdt_tirp_buffer_info_count, |
1935 | 14 | { |
1936 | 14 | "Transport info buffer into count", |
1937 | 14 | "rdt.tirp-buffer-info-count", |
1938 | 14 | FT_UINT16, |
1939 | 14 | BASE_DEC, |
1940 | 14 | NULL, |
1941 | 14 | 0x0, |
1942 | 14 | NULL, HFILL |
1943 | 14 | } |
1944 | 14 | }, |
1945 | 14 | { |
1946 | 14 | &hf_rdt_tirp_buffer_info, |
1947 | 14 | { |
1948 | 14 | "RDT buffer info", |
1949 | 14 | "rdt.tirp-buffer-info", |
1950 | 14 | FT_STRING, |
1951 | 14 | BASE_NONE, |
1952 | 14 | NULL, |
1953 | 14 | 0x0, |
1954 | 14 | NULL, HFILL |
1955 | 14 | } |
1956 | 14 | }, |
1957 | 14 | { |
1958 | 14 | &hf_rdt_tirp_buffer_info_stream_id, |
1959 | 14 | { |
1960 | 14 | "Buffer info stream-id", |
1961 | 14 | "rdt.tirp-buffer-info-stream-id", |
1962 | 14 | FT_UINT16, |
1963 | 14 | BASE_DEC, |
1964 | 14 | NULL, |
1965 | 14 | 0x0, |
1966 | 14 | NULL, HFILL |
1967 | 14 | } |
1968 | 14 | }, |
1969 | 14 | { |
1970 | 14 | &hf_rdt_tirp_buffer_info_lowest_timestamp, |
1971 | 14 | { |
1972 | 14 | "Lowest timestamp", |
1973 | 14 | "rdt.tirp-buffer-info-lowest-timestamp", |
1974 | 14 | FT_UINT32, |
1975 | 14 | BASE_DEC, |
1976 | 14 | NULL, |
1977 | 14 | 0x0, |
1978 | 14 | NULL, HFILL |
1979 | 14 | } |
1980 | 14 | }, |
1981 | 14 | { |
1982 | 14 | &hf_rdt_tirp_buffer_info_highest_timestamp, |
1983 | 14 | { |
1984 | 14 | "Highest timestamp", |
1985 | 14 | "rdt.tirp-buffer-info-highest-timestamp", |
1986 | 14 | FT_UINT32, |
1987 | 14 | BASE_DEC, |
1988 | 14 | NULL, |
1989 | 14 | 0x0, |
1990 | 14 | NULL, HFILL |
1991 | 14 | } |
1992 | 14 | }, |
1993 | 14 | { |
1994 | 14 | &hf_rdt_tirp_buffer_info_bytes_buffered, |
1995 | 14 | { |
1996 | 14 | "Bytes buffered", |
1997 | 14 | "rdt.tirp-buffer-info-bytes-buffered", |
1998 | 14 | FT_UINT32, |
1999 | 14 | BASE_DEC, |
2000 | 14 | NULL, |
2001 | 14 | 0x0, |
2002 | 14 | NULL, HFILL |
2003 | 14 | } |
2004 | 14 | }, |
2005 | 14 | { |
2006 | 14 | &hf_rdt_bwpp_seqno, |
2007 | 14 | { |
2008 | 14 | "Bandwidth probing packet seqno", |
2009 | 14 | "rdt.bwpp-seqno", |
2010 | 14 | FT_UINT8, |
2011 | 14 | BASE_DEC, |
2012 | 14 | NULL, |
2013 | 14 | 0x0, |
2014 | 14 | NULL, HFILL |
2015 | 14 | } |
2016 | 14 | }, |
2017 | 14 | { |
2018 | 14 | &hf_rdt_unk_flags1, |
2019 | 14 | { |
2020 | 14 | "Unknown packet flags", |
2021 | 14 | "rdt.unk-flags1", |
2022 | 14 | FT_UINT8, |
2023 | 14 | BASE_DEC, |
2024 | 14 | NULL, |
2025 | 14 | 0x0, |
2026 | 14 | NULL, HFILL |
2027 | 14 | } |
2028 | 14 | }, |
2029 | 14 | { |
2030 | 14 | &hf_rdt_setup, |
2031 | 14 | { |
2032 | 14 | "Stream setup", |
2033 | 14 | "rdt.setup", |
2034 | 14 | FT_STRING, |
2035 | 14 | BASE_NONE, |
2036 | 14 | NULL, |
2037 | 14 | 0x0, |
2038 | 14 | "Stream setup, method and frame number", HFILL |
2039 | 14 | } |
2040 | 14 | }, |
2041 | 14 | { |
2042 | 14 | &hf_rdt_setup_frame, |
2043 | 14 | { |
2044 | 14 | "Setup frame", |
2045 | 14 | "rdt.setup-frame", |
2046 | 14 | FT_FRAMENUM, |
2047 | 14 | BASE_NONE, |
2048 | 14 | NULL, |
2049 | 14 | 0x0, |
2050 | 14 | "Frame that set up this stream", HFILL |
2051 | 14 | } |
2052 | 14 | }, |
2053 | 14 | { |
2054 | 14 | &hf_rdt_setup_method, |
2055 | 14 | { |
2056 | 14 | "Setup Method", |
2057 | 14 | "rdt.setup-method", |
2058 | 14 | FT_STRING, |
2059 | 14 | BASE_NONE, |
2060 | 14 | NULL, |
2061 | 14 | 0x0, |
2062 | 14 | "Method used to set up this stream", HFILL |
2063 | 14 | } |
2064 | 14 | }, |
2065 | 14 | { |
2066 | 14 | &hf_rdt_feature_level, |
2067 | 14 | { |
2068 | 14 | "RDT feature level", |
2069 | 14 | "rdt.feature-level", |
2070 | 14 | FT_INT32, |
2071 | 14 | BASE_DEC, |
2072 | 14 | NULL, |
2073 | 14 | 0x0, |
2074 | 14 | NULL, HFILL |
2075 | 14 | } |
2076 | 14 | }, |
2077 | 14 | }; |
2078 | | |
2079 | 14 | static int *ett[] = |
2080 | 14 | { |
2081 | 14 | &ett_rdt, |
2082 | 14 | &ett_rdt_packet, |
2083 | 14 | &ett_rdt_setup, |
2084 | 14 | &ett_rdt_data_flags1, |
2085 | 14 | &ett_rdt_data_flags2, |
2086 | 14 | &ett_rdt_aact_flags, |
2087 | 14 | &ett_rdt_ack_flags, |
2088 | 14 | &ett_rdt_latency_report_flags, |
2089 | 14 | &ett_rdt_bandwidth_report_flags, |
2090 | 14 | &ett_rdt_stre_flags, |
2091 | 14 | &ett_rdt_rtt_request_flags, |
2092 | 14 | &ett_rdt_rtt_response_flags, |
2093 | 14 | &ett_rdt_congestion_flags, |
2094 | 14 | &ett_rdt_report_flags, |
2095 | 14 | &ett_rdt_tirq_flags, |
2096 | 14 | &ett_rdt_tirp_flags, |
2097 | 14 | &ett_rdt_tirp_buffer_info, |
2098 | 14 | &ett_rdt_bw_probing_flags |
2099 | 14 | }; |
2100 | | |
2101 | 14 | static ei_register_info ei[] = { |
2102 | 14 | { &ei_rdt_packet_length, { "rdt.invalid_packet_length", PI_MALFORMED, PI_ERROR, "Packet length invalid", EXPFILL }}, |
2103 | 14 | }; |
2104 | | |
2105 | 14 | module_t *rdt_module; |
2106 | 14 | expert_module_t* expert_rdt; |
2107 | | |
2108 | | /* Register protocol and fields */ |
2109 | 14 | proto_rdt = proto_register_protocol("Real Data Transport", "RDT", "rdt"); |
2110 | 14 | proto_register_field_array(proto_rdt, hf, array_length(hf)); |
2111 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
2112 | 14 | expert_rdt = expert_register_protocol(proto_rdt); |
2113 | 14 | expert_register_field_array(expert_rdt, ei, array_length(ei)); |
2114 | 14 | rdt_handle = register_dissector("rdt", dissect_rdt, proto_rdt); |
2115 | | |
2116 | | /* Preference settings */ |
2117 | 14 | rdt_module = prefs_register_protocol(proto_rdt, NULL); |
2118 | 14 | prefs_register_bool_preference(rdt_module, "show_setup_info", |
2119 | 14 | "Show stream setup information", |
2120 | 14 | "Where available, show which protocol and frame caused " |
2121 | 14 | "this RDT stream to be created", |
2122 | 14 | &global_rdt_show_setup_info); |
2123 | | |
2124 | 14 | prefs_register_obsolete_preference(rdt_module, "register_udp_port"); |
2125 | 14 | } |
2126 | | |
2127 | | void proto_reg_handoff_rdt(void) |
2128 | 14 | { |
2129 | 14 | dissector_add_uint_with_preference("udp.port", RDT_UDP_PORT, rdt_handle); |
2130 | 14 | } |
2131 | | |
2132 | | /* |
2133 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
2134 | | * |
2135 | | * Local variables: |
2136 | | * c-basic-offset: 4 |
2137 | | * tab-width: 8 |
2138 | | * indent-tabs-mode: nil |
2139 | | * End: |
2140 | | * |
2141 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
2142 | | * :indentSize=4:tabSize=8:noTabs=true: |
2143 | | */ |