2 * Routines for Real Time Location System dissection
3 * Copyright 2016, Alexis La Goutte (See Authors)
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
13 * http://community.arubanetworks.com/aruba/attachments/aruba/unified-wired-wireless-access/23715/1/RTLS_integrationv6.docx
18 #include <epan/packet.h>
19 #include <epan/expert.h>
21 void proto_reg_handoff_rtls(void);
22 void proto_register_rtls(void);
24 static dissector_handle_t rtls_handle
;
26 static int proto_rtls
;
27 static int hf_rtls_message_type
;
28 static int hf_rtls_message_id
;
29 static int hf_rtls_version_major
;
30 static int hf_rtls_version_minor
;
31 static int hf_rtls_data_length
;
32 static int hf_rtls_ap_mac
;
33 static int hf_rtls_padding
;
34 static int hf_rtls_reserved
;
35 static int hf_rtls_signature
;
37 static int hf_rtls_as_tag_addr
;
38 static int hf_rtls_sr_mac_address
;
39 static int hf_rtls_nack_flags
;
40 static int hf_rtls_nack_flags_internal_error
;
41 static int hf_rtls_nack_flags_station_not_found
;
42 static int hf_rtls_nack_flags_reserved
;
43 static int hf_rtls_tr_bssid
;
44 static int hf_rtls_tr_rssi
;
45 static int hf_rtls_tr_rssi_calculated
;
46 static int hf_rtls_tr_noise_floor
;
47 static int hf_rtls_tr_timestamp
;
48 static int hf_rtls_tr_tag_mac
;
49 static int hf_rtls_tr_frame_control
;
50 static int hf_rtls_tr_sequence
;
51 static int hf_rtls_tr_data_rate
;
52 static int hf_rtls_tr_tx_power
;
53 static int hf_rtls_tr_channel
;
54 static int hf_rtls_tr_battery
;
55 static int hf_rtls_sr_mac
;
56 static int hf_rtls_sr_noise_floor
;
57 static int hf_rtls_sr_data_rate
;
58 static int hf_rtls_sr_channel
;
59 static int hf_rtls_sr_rssi
;
60 static int hf_rtls_sr_rssi_calculated
;
61 static int hf_rtls_sr_type
;
62 static int hf_rtls_sr_associated
;
63 static int hf_rtls_sr_radio_bssid
;
64 static int hf_rtls_sr_mon_bssid
;
65 static int hf_rtls_sr_age
;
66 static int hf_rtls_ser_mac
;
67 static int hf_rtls_ser_bssid
;
68 static int hf_rtls_ser_essid
;
69 static int hf_rtls_ser_channel
;
70 static int hf_rtls_ser_phy_type
;
71 static int hf_rtls_ser_rssi
;
72 static int hf_rtls_ser_rssi_calculated
;
73 static int hf_rtls_ser_duration
;
74 static int hf_rtls_ser_num_packets
;
75 static int hf_rtls_ser_noise_floor
;
76 static int hf_rtls_ser_classification
;
77 static int hf_rtls_aer_bssid
;
78 static int hf_rtls_aer_essid
;
79 static int hf_rtls_aer_channel
;
80 static int hf_rtls_aer_phy_type
;
81 static int hf_rtls_aer_rssi
;
82 static int hf_rtls_aer_rssi_calculated
;
83 static int hf_rtls_aer_duration
;
84 static int hf_rtls_aer_num_packets
;
85 static int hf_rtls_aer_noise_floor
;
86 static int hf_rtls_aer_classification
;
87 static int hf_rtls_aer_match_type
;
88 static int hf_rtls_aer_match_method
;
89 static int hf_rtls_cmr_messages
;
91 static int * const rtls_nack_flags
[] = {
92 &hf_rtls_nack_flags_internal_error
,
93 &hf_rtls_nack_flags_station_not_found
,
94 &hf_rtls_nack_flags_reserved
,
98 static expert_field ei_rtls_undecoded
;
100 static int ett_rtls_message
;
101 static int ett_rtls_nack_flags
;
103 #define RTLS_HDR_LENGTH 16
104 #define RTLS_SIGN_LENGTH 20
106 #define AR_AS_CONFIG_SET 0x0000
107 #define AR_STATION_REQUEST 0x0001
108 #define AR_ACK 0x0010
109 #define AR_NACK 0x0011
110 #define AR_TAG_REPORT 0x0012
111 #define AR_STATION_REPORT 0x0013
112 #define AR_COMPOUND_MESSAGE_REPORT 0x0014
113 #define AR_AP_NOTIFICATION 0x0015
114 #define AR_MMS_CONFIG_SET 0x0016
115 #define AR_STATION_EX_REPORT 0x0017
116 #define AR_AP_EX_REPORT 0x0018
118 static const value_string rtls_message_type_vals
[] = {
119 { AR_AS_CONFIG_SET
, "AR_AS_CONFIG_SET" },
120 { AR_STATION_REQUEST
, "AR_STATION_REQUEST" },
122 { AR_NACK
, "AR_NACK"},
123 { AR_TAG_REPORT
, "AR_TAG_REPORT"},
124 { AR_STATION_REPORT
, "AR_STATION_REPORT"},
125 { AR_COMPOUND_MESSAGE_REPORT
, "AR_COMPOUND_MESSAGE_REPORT"},
126 { AR_AP_NOTIFICATION
, "AR_AP_NOTIFICATION"},
127 { AR_MMS_CONFIG_SET
, "AR_MMS_CONFIG_SET"},
128 { AR_STATION_EX_REPORT
, "AR_STATION_EX_REPORT"},
129 { AR_AP_EX_REPORT
, "AR_AP_EX_REPORT"},
133 static const value_string rtls_sr_type_vals
[] = {
134 { 1, "AR_WLAN_CLIENT" },
139 static const value_string rtls_sr_associated_vals
[] = {
140 { 1, "AR_WLAN_ASSOCIATED (All APs and Associated Stations)" },
141 { 2, "AR_WLAN_UNASSOCIATED (Unassociated Stations)" },
145 static const value_string rtls_data_rate_vals
[] = {
148 { 0x02, "5.5 Mbits" },
151 { 0x05, "11 Mbits" },
152 { 0x06, "12 Mbits" },
153 { 0x07, "18 Mbits" },
154 { 0x08, "24 Mbits" },
155 { 0x09, "36 Mbits" },
156 { 0x0A, "48 Mbits" },
157 { 0x0B, "54 Mbits" },
161 static const value_string rtls_ex_phy_type_vals
[] = {
169 static const value_string rtls_ex_classification_vals
[] = {
171 { 2, "interfering" },
177 rssi_base_custom(char *result
, uint32_t rssi
)
179 /* Convert Hex to decimal and subtract 256 to get the signal value */
180 snprintf(result
, ITEM_LABEL_LENGTH
, "%d", rssi
- 256);
185 dissect_rtls_header(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*rtls_tree
, unsigned offset
, unsigned *data_length
)
188 proto_tree_add_item(rtls_tree
, hf_rtls_message_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
191 proto_tree_add_item(rtls_tree
, hf_rtls_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
194 proto_tree_add_item(rtls_tree
, hf_rtls_version_major
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
197 proto_tree_add_item(rtls_tree
, hf_rtls_version_minor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
200 proto_tree_add_item(rtls_tree
, hf_rtls_data_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
202 *data_length
= tvb_get_ntohs(tvb
, offset
);
206 proto_tree_add_item(rtls_tree
, hf_rtls_ap_mac
, tvb
, offset
, 6, ENC_NA
);
209 proto_tree_add_item(rtls_tree
, hf_rtls_padding
, tvb
, offset
, 2, ENC_NA
);
216 // NOLINTNEXTLINE(misc-no-recursion)
217 dissect_rtls_message_type(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*rtls_tree
, unsigned offset
, unsigned type
)
222 case AR_AS_CONFIG_SET
:
223 proto_tree_add_item(rtls_tree
, hf_rtls_as_tag_addr
, tvb
, offset
, 6, ENC_NA
);
225 proto_tree_add_item(rtls_tree
, hf_rtls_reserved
, tvb
, offset
, 2, ENC_NA
);
228 case AR_STATION_REQUEST
:
229 proto_tree_add_item(rtls_tree
, hf_rtls_sr_mac_address
, tvb
, offset
, 6, ENC_NA
);
231 proto_tree_add_item(rtls_tree
, hf_rtls_reserved
, tvb
, offset
, 2, ENC_NA
);
235 case AR_AP_NOTIFICATION
:
239 proto_tree_add_bitmask_with_flags(rtls_tree
, tvb
, offset
,
240 hf_rtls_nack_flags
, ett_rtls_nack_flags
, rtls_nack_flags
, ENC_BIG_ENDIAN
, BMT_NO_APPEND
);
242 proto_tree_add_item(rtls_tree
, hf_rtls_reserved
, tvb
, offset
, 2, ENC_NA
);
246 proto_tree_add_item(rtls_tree
, hf_rtls_tr_bssid
, tvb
, offset
, 6, ENC_NA
);
248 proto_tree_add_item(rtls_tree
, hf_rtls_tr_rssi
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
249 ti_rssi
= proto_tree_add_item(rtls_tree
, hf_rtls_tr_rssi_calculated
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
250 proto_item_set_generated(ti_rssi
);
252 proto_tree_add_item(rtls_tree
, hf_rtls_tr_noise_floor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
254 proto_tree_add_item(rtls_tree
, hf_rtls_tr_timestamp
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
256 proto_tree_add_item(rtls_tree
, hf_rtls_tr_tag_mac
, tvb
, offset
, 6, ENC_NA
);
258 proto_tree_add_item(rtls_tree
, hf_rtls_tr_frame_control
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
260 proto_tree_add_item(rtls_tree
, hf_rtls_tr_sequence
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
262 proto_tree_add_item(rtls_tree
, hf_rtls_tr_data_rate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
264 proto_tree_add_item(rtls_tree
, hf_rtls_tr_tx_power
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
266 proto_tree_add_item(rtls_tree
, hf_rtls_tr_channel
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
268 proto_tree_add_item(rtls_tree
, hf_rtls_tr_battery
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
270 proto_tree_add_item(rtls_tree
, hf_rtls_reserved
, tvb
, offset
, 2, ENC_NA
);
273 case AR_STATION_REPORT
:
274 proto_tree_add_item(rtls_tree
, hf_rtls_sr_mac
, tvb
, offset
, 6, ENC_NA
);
276 proto_tree_add_item(rtls_tree
, hf_rtls_sr_noise_floor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
278 proto_tree_add_item(rtls_tree
, hf_rtls_sr_data_rate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
280 proto_tree_add_item(rtls_tree
, hf_rtls_sr_channel
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
282 proto_tree_add_item(rtls_tree
, hf_rtls_sr_rssi
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
283 ti_rssi
= proto_tree_add_item(rtls_tree
, hf_rtls_sr_rssi_calculated
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
284 proto_item_set_generated(ti_rssi
);
286 proto_tree_add_item(rtls_tree
, hf_rtls_sr_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
288 proto_tree_add_item(rtls_tree
, hf_rtls_sr_associated
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
290 proto_tree_add_item(rtls_tree
, hf_rtls_sr_radio_bssid
, tvb
, offset
, 6, ENC_NA
);
292 proto_tree_add_item(rtls_tree
, hf_rtls_sr_mon_bssid
, tvb
, offset
, 6, ENC_NA
);
294 proto_tree_add_item(rtls_tree
, hf_rtls_sr_age
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
297 case AR_STATION_EX_REPORT
:
298 proto_tree_add_item(rtls_tree
, hf_rtls_ser_mac
, tvb
, offset
, 6, ENC_NA
);
300 proto_tree_add_item(rtls_tree
, hf_rtls_ser_bssid
, tvb
, offset
, 6, ENC_NA
);
302 proto_tree_add_item(rtls_tree
, hf_rtls_ser_essid
, tvb
, offset
, 33, ENC_ASCII
);
304 proto_tree_add_item(rtls_tree
, hf_rtls_ser_channel
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
306 proto_tree_add_item(rtls_tree
, hf_rtls_ser_phy_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
308 proto_tree_add_item(rtls_tree
, hf_rtls_ser_rssi
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
309 ti_rssi
= proto_tree_add_item(rtls_tree
, hf_rtls_ser_rssi_calculated
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
310 proto_item_set_generated(ti_rssi
);
312 proto_tree_add_item(rtls_tree
, hf_rtls_ser_duration
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
314 proto_tree_add_item(rtls_tree
, hf_rtls_ser_num_packets
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
316 proto_tree_add_item(rtls_tree
, hf_rtls_ser_noise_floor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
318 proto_tree_add_item(rtls_tree
, hf_rtls_ser_classification
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
320 proto_tree_add_item(rtls_tree
, hf_rtls_reserved
, tvb
, offset
, 2, ENC_NA
);
323 case AR_AP_EX_REPORT
:
324 proto_tree_add_item(rtls_tree
, hf_rtls_aer_bssid
, tvb
, offset
, 6, ENC_NA
);
326 proto_tree_add_item(rtls_tree
, hf_rtls_aer_essid
, tvb
, offset
, 33, ENC_ASCII
);
328 proto_tree_add_item(rtls_tree
, hf_rtls_aer_channel
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
330 proto_tree_add_item(rtls_tree
, hf_rtls_aer_phy_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
332 proto_tree_add_item(rtls_tree
, hf_rtls_aer_rssi
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
333 ti_rssi
= proto_tree_add_item(rtls_tree
, hf_rtls_aer_rssi_calculated
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
334 proto_item_set_generated(ti_rssi
);
336 proto_tree_add_item(rtls_tree
, hf_rtls_aer_duration
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
338 proto_tree_add_item(rtls_tree
, hf_rtls_aer_num_packets
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
340 proto_tree_add_item(rtls_tree
, hf_rtls_aer_noise_floor
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
342 proto_tree_add_item(rtls_tree
, hf_rtls_aer_classification
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
344 proto_tree_add_item(rtls_tree
, hf_rtls_aer_match_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
346 proto_tree_add_item(rtls_tree
, hf_rtls_aer_match_method
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
348 proto_tree_add_item(rtls_tree
, hf_rtls_reserved
, tvb
, offset
, 2, ENC_NA
);
351 case AR_COMPOUND_MESSAGE_REPORT
:{
352 uint32_t cmr_messages
;
353 proto_tree
*sub_tree
;
355 proto_tree_add_item_ret_uint(rtls_tree
, hf_rtls_cmr_messages
, tvb
, offset
, 2, ENC_BIG_ENDIAN
, &cmr_messages
);
357 proto_tree_add_item(rtls_tree
, hf_rtls_reserved
, tvb
, offset
, 2, ENC_NA
);
360 uint32_t data_length
;
361 type
= tvb_get_ntohs(tvb
, offset
);
362 sub_tree
= proto_tree_add_subtree_format(rtls_tree
, tvb
, offset
, -1, ett_rtls_message
, NULL
, "%s", val_to_str(type
, rtls_message_type_vals
, "(unknown %d)"));
364 offset
= dissect_rtls_header(tvb
, pinfo
, sub_tree
, offset
, &data_length
);
366 // We recurse here, but we'll run out of packet before we run out of stack.
367 offset
= dissect_rtls_message_type(tvb
, pinfo
, sub_tree
, offset
, type
);
369 proto_item_set_len(sub_tree
, data_length
+ RTLS_HDR_LENGTH
);
375 uint32_t remaining
= tvb_reported_length_remaining(tvb
, offset
);
376 if(remaining
> RTLS_SIGN_LENGTH
){
377 proto_tree_add_expert(rtls_tree
, pinfo
, &ei_rtls_undecoded
, tvb
, offset
, remaining
- RTLS_SIGN_LENGTH
);
378 offset
+= remaining
- RTLS_SIGN_LENGTH
;
388 dissect_rtls(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
391 proto_tree
*rtls_tree
;
395 if (tvb_reported_length(tvb
) < RTLS_HDR_LENGTH
+ RTLS_SIGN_LENGTH
)
398 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "RTLS");
401 ti
= proto_tree_add_item(tree
, proto_rtls
, tvb
, 0, -1, ENC_NA
);
403 rtls_tree
= proto_item_add_subtree(ti
, ett_rtls
);
406 type
= tvb_get_ntohs(tvb
, offset
);
407 col_add_str(pinfo
->cinfo
, COL_INFO
, val_to_str(type
, rtls_message_type_vals
, "(unknown %d)"));
409 offset
= dissect_rtls_header(tvb
, pinfo
, rtls_tree
, offset
, NULL
);
411 offset
= dissect_rtls_message_type(tvb
, pinfo
, rtls_tree
, offset
, type
);
413 /* TODO: Check signature ? HMAC-SHA1 with shared key and RTLS packet data */
414 proto_tree_add_item(rtls_tree
, hf_rtls_signature
, tvb
, offset
, RTLS_SIGN_LENGTH
, ENC_NA
);
421 proto_register_rtls(void)
423 expert_module_t
*expert_rtls
;
425 static hf_register_info hf
[] = {
428 { &hf_rtls_message_type
,
429 { "Message Type", "rtls.message_type",
430 FT_UINT16
, BASE_HEX
, VALS(rtls_message_type_vals
), 0x0,
433 { &hf_rtls_message_id
,
434 { "Message Id", "rtls.message_id",
435 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
438 { &hf_rtls_version_major
,
439 { "Version Major", "rtls.version_major",
440 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
443 { &hf_rtls_version_minor
,
444 { "Version Minor", "rtls.version_minor",
445 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
448 { &hf_rtls_data_length
,
449 { "Data Length", "rtls.data_length",
450 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
454 { "AP MAC Address", "rtls.ap_mac",
455 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
459 { "Padding", "rtls.padding",
460 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
464 { "Reserved", "rtls.reserved",
465 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
468 { &hf_rtls_signature
,
469 { "Signature", "rtls.signature",
470 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
474 /* AR_AS_CONFIG_SET */
475 { &hf_rtls_as_tag_addr
,
476 { "AS Tag Address", "rtls.as_tag_addr",
477 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
478 "Tag multicast address", HFILL
}
480 /* AR_STATION_REQUEST */
481 { &hf_rtls_sr_mac_address
,
482 { "MAC Address", "rtls.sr_mac_addr",
483 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
487 { &hf_rtls_nack_flags
,
488 { "Flags", "rtls.nack.flags",
489 FT_UINT16
, BASE_HEX
, NULL
, 0x00,
492 { &hf_rtls_nack_flags_internal_error
,
493 { "Internal Error", "rtls.nack.flags.internal_errors",
494 FT_UINT16
, BASE_HEX
, NULL
, 0x01,
497 { &hf_rtls_nack_flags_station_not_found
,
498 { "Station Not found", "rtls.nack.flags.station_not_found",
499 FT_UINT16
, BASE_HEX
, NULL
, 0x02,
502 { &hf_rtls_nack_flags_reserved
,
503 { "Reserved", "rtls.nack.flags.reserved",
504 FT_UINT16
, BASE_HEX
, NULL
, 0xFC,
510 { "BSSID", "rtls.tr.bssid",
511 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
512 "MAC address of the radio where the frame was received", HFILL
}
515 { "RSSI", "rtls.tr.rssi",
516 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
517 "Signal as a signed negative hex value", HFILL
}
519 { &hf_rtls_tr_rssi_calculated
,
520 { "RSSI (calculated)", "rtls.tr.rssi.calculated",
521 FT_UINT8
, BASE_CUSTOM
, CF_FUNC(rssi_base_custom
), 0x0,
524 { &hf_rtls_tr_noise_floor
,
525 { "Noise Floor", "rtls.tr.noise_floor",
526 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
527 "Noise floor of the radio", HFILL
}
529 { &hf_rtls_tr_timestamp
,
530 { "Timestamp", "rtls.tr.timestamp",
531 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
532 "Millisecond granularity timestamp that represents local time in AP when message was sent", HFILL
}
534 { &hf_rtls_tr_tag_mac
,
535 { "Tag Mac", "rtls.tr.tag_mac",
536 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
537 "MAC address of the tag", HFILL
}
539 { &hf_rtls_tr_frame_control
,
540 { "Frame Control", "rtls.tr.frame_control",
541 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
542 "Frame control from 802.11 header", HFILL
}
544 { &hf_rtls_tr_sequence
,
545 { "Sequence", "rtls.tr.sequence",
546 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
547 "Sequence number from the 802.11 header", HFILL
}
549 { &hf_rtls_tr_data_rate
,
550 { "Data Rate", "rtls.tr.data_rate",
551 FT_UINT8
, BASE_DEC
, VALS(rtls_data_rate_vals
), 0x0,
552 "Data rate of chirp frame", HFILL
}
554 { &hf_rtls_tr_tx_power
,
555 { "Tx Power", "rtls.tr.tx_power",
556 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
557 "Transmit power in dbm", HFILL
}
559 { &hf_rtls_tr_channel
,
560 { "Channel", "rtls.tr.channel",
561 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
562 "Channel of tag transmission", HFILL
}
564 { &hf_rtls_tr_battery
,
565 { "Battery", "rtls.tr.battery",
566 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
567 "Batter level information from the chirp frame if present", HFILL
}
569 /* AR_STATION_REPORT */
571 { "MAC", "rtls.sr.mac",
572 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
575 { &hf_rtls_sr_noise_floor
,
576 { "Noise Floor", "rtls.sr.noise_floor",
577 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
578 "Noise floor of the channel where the station was last heard", HFILL
}
580 { &hf_rtls_sr_data_rate
,
581 { "Data Rate", "rtls.sr.data_rate",
582 FT_UINT8
, BASE_DEC
, VALS(rtls_data_rate_vals
), 0x0,
583 "Data rate of chirp frame", HFILL
}
585 { &hf_rtls_sr_channel
,
586 { "Channel", "rtls.sr.channel",
587 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
588 "Channel where station was last heard", HFILL
}
591 { "RSSI", "rtls.sr.rssi",
592 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
593 "Signal as a signed negative hex value", HFILL
}
595 { &hf_rtls_sr_rssi_calculated
,
596 { "RSSI (calculated)", "rtls.sr.rssi.calculated",
597 FT_UINT8
, BASE_CUSTOM
, CF_FUNC(rssi_base_custom
), 0x0,
601 { "Type", "rtls.sr.type",
602 FT_UINT8
, BASE_DEC
, VALS(rtls_sr_type_vals
), 0x0,
603 "Type of device", HFILL
}
605 { &hf_rtls_sr_associated
,
606 { "Associated", "rtls.sr.associated",
607 FT_UINT8
, BASE_DEC
, VALS(rtls_sr_associated_vals
), 0x0,
608 "Association status of station", HFILL
}
610 { &hf_rtls_sr_radio_bssid
,
611 { "Radio BSSID", "rtls.sr.radio_bssids",
612 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
613 "Association status of station BSSID of the radio that detected the device", HFILL
}
615 { &hf_rtls_sr_mon_bssid
,
616 { "Mon BSSID", "rtls.sr.mon_bssids",
617 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
618 "BSSID of the AP that the station is associated to", HFILL
}
621 { "Age", "rtls.sr.age",
622 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
623 "The number of seconds since the last packet was heard from this station", HFILL
}
625 /* AR_STATION_EX_REPORT */
627 { "MAC", "rtls.ser.mac",
628 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
629 "MAC address of station", HFILL
}
631 { &hf_rtls_ser_bssid
,
632 { "BSSID", "rtls.ser.bssid",
633 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
634 "BSSID with which this station is associated", HFILL
}
636 { &hf_rtls_ser_essid
,
637 { "ESSID", "rtls.ser.essid",
638 FT_STRING
, BASE_NONE
, NULL
, 0x0,
639 "ESSID with which this station is associated", HFILL
}
641 { &hf_rtls_ser_channel
,
642 { "Channel", "rtls.ser.channel",
643 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
644 "Channel where this station is active", HFILL
}
646 { &hf_rtls_ser_phy_type
,
647 { "Phy type", "rtls.ser.phy_type",
648 FT_UINT8
, BASE_DEC
, VALS(rtls_ex_phy_type_vals
), 0x0,
652 { "RSSI", "rtls.ser.rssi",
653 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
654 "Average RSSI during the duration", HFILL
}
656 { &hf_rtls_ser_rssi_calculated
,
657 { "RSSI (calculated)", "rtls.ser.rssi.calculated",
658 FT_UINT8
, BASE_CUSTOM
, CF_FUNC(rssi_base_custom
), 0x0,
661 { &hf_rtls_ser_duration
,
662 { "Duration", "rtls.ser.duration",
663 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
664 "Average calculation duration", HFILL
}
666 { &hf_rtls_ser_num_packets
,
667 { "Num Packets", "rtls.ser.num_packets",
668 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
669 "Number of packets used in average RSSI calculation", HFILL
}
671 { &hf_rtls_ser_noise_floor
,
672 { "Noise Floor", "rtls.ser.noise_floor",
673 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
674 "Noise floor of the radio", HFILL
}
676 { &hf_rtls_ser_classification
,
677 { "Classification", "rtls.ser.classification",
678 FT_UINT8
, BASE_DEC
, VALS(rtls_ex_classification_vals
), 0x0,
679 "Millisecond granularity timestamp that represents local time in AP when message was sent", HFILL
}
681 /* AR_AP_EX_REPORT */
682 { &hf_rtls_aer_bssid
,
683 { "BSSID", "rtls.aer.bssid",
684 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
685 "BSSID with which this station is associated", HFILL
}
687 { &hf_rtls_aer_essid
,
688 { "ESSID", "rtls.aer.essid",
689 FT_STRING
, BASE_NONE
, NULL
, 0x0,
690 "ESSID with which this station is associated", HFILL
}
692 { &hf_rtls_aer_channel
,
693 { "Channel", "rtls.aer.channel",
694 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
695 "Channel where this station is active", HFILL
}
697 { &hf_rtls_aer_phy_type
,
698 { "Phy type", "rtls.aer.phy_type",
699 FT_UINT8
, BASE_DEC
, VALS(rtls_ex_phy_type_vals
), 0x0,
703 { "RSSI", "rtls.aer.rssi",
704 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
705 "Average RSSI during the duration", HFILL
}
707 { &hf_rtls_aer_rssi_calculated
,
708 { "RSSI (calculated)", "rtls.aer.rssi.calculated",
709 FT_UINT8
, BASE_CUSTOM
, CF_FUNC(rssi_base_custom
), 0x0,
712 { &hf_rtls_aer_duration
,
713 { "Duration", "rtls.aer.duration",
714 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
715 "Average calculation duration", HFILL
}
717 { &hf_rtls_aer_num_packets
,
718 { "Num Packets", "rtls.aer.num_packets",
719 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
720 "Number of packets used in average RSSI calculation", HFILL
}
722 { &hf_rtls_aer_noise_floor
,
723 { "Noise Floor", "rtls.aer.noise_floor",
724 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
725 "Noise floor of the radio", HFILL
}
727 { &hf_rtls_aer_classification
,
728 { "Classification", "rtls.aer.classification",
729 FT_UINT8
, BASE_DEC
, VALS(rtls_ex_classification_vals
), 0x0,
730 "Millisecond granularity timestamp that represents local time in AP when message was sent", HFILL
}
732 { &hf_rtls_aer_match_type
,
733 { "Match Type", "rtls.aer.match_type",
734 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
735 "Internal Aruba use", HFILL
}
737 { &hf_rtls_aer_match_method
,
738 { "Match Method", "rtls.aer.match_method",
739 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
740 "Internal Aruba use", HFILL
}
743 { &hf_rtls_cmr_messages
,
744 { "Messages", "rtls.cmr_messages",
745 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
746 "number of messages", HFILL
}
751 static int *ett
[] = {
754 &ett_rtls_nack_flags
,
758 /* Setup protocol expert items */
759 static ei_register_info ei
[] = {
760 { &ei_rtls_undecoded
,
761 { "rtls.undecoded", PI_UNDECODED
, PI_NOTE
, "Undecoded Payload", EXPFILL
}
766 proto_rtls
= proto_register_protocol("Real Time Location System", "RTLS", "rtls");
767 rtls_handle
= register_dissector("rtls", dissect_rtls
, proto_rtls
);
769 proto_register_field_array(proto_rtls
, hf
, array_length(hf
));
770 proto_register_subtree_array(ett
, array_length(ett
));
772 expert_rtls
= expert_register_protocol(proto_rtls
);
773 expert_register_field_array(expert_rtls
, ei
, array_length(ei
));
778 proto_reg_handoff_rtls(void)
780 // If this is ever streamed (transported over TCP) we need to add recursion checks
781 dissector_add_for_decode_as_with_preference("udp.port", rtls_handle
);
785 * Editor modelines - https://www.wireshark.org/tools/modelines.html
790 * indent-tabs-mode: nil
793 * vi: set shiftwidth=4 tabstop=8 expandtab:
794 * :indentSize=4:tabSize=8:noTabs=true: