Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-acn.c
blobfe87ac5df48d222fcaf311e7b7aa88adcf0896d7
1 /* packet-acn.c
2 * Routines for ACN packet disassembly
4 * Copyright (c) 2003 by Erwin Rol <erwin@erwinrol.com>
5 * Copyright (c) 2006 by Electronic Theatre Controls, Inc.
6 * Bill Florac <bflorac@etcconnect.com>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1999 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
16 Todo:
17 Add reading of DDL files so we can further explode DMP packets
18 For some of the Set/Get properties where we have a range of data
19 it would be better to show the block of data rather and
20 address-data pair on each line...
22 Build CID to "Name" table from file so we can display real names
23 rather than CIDs
26 /* Include files */
28 #include "config.h"
30 #include <epan/packet.h>
31 #include <epan/prefs.h>
32 #include <epan/strutil.h>
33 #include <epan/to_str.h>
34 #include <epan/expert.h>
36 #include "packet-rdm.h"
37 #include "packet-tcp.h"
39 /* Forward declarations */
40 void proto_register_acn(void);
41 void proto_reg_handoff_acn(void);
43 static dissector_handle_t acn_handle;
45 /* pdu flags */
46 #define ACN_PDU_FLAG_L 0x80
47 #define ACN_PDU_FLAG_V 0x40
48 #define ACN_PDU_FLAG_H 0x20
49 #define ACN_PDU_FLAG_D 0x10
51 #define ACN_DMX_OPTION_P 0x80
52 #define ACN_DMX_OPTION_S 0x40
53 #define ACN_DMX_OPTION_F 0x20
55 #define ACN_DMP_ADT_FLAG_V 0x80 /* V = Specifies whether address is a virtual address or not. */
56 #define ACN_DMP_ADT_FLAG_R 0x40 /* R = Specifies whether address is relative to last valid address in packet or not. */
57 #define ACN_DMP_ADT_FLAG_D 0x30 /* D1, D0 = Specify non-range or range address, single data, equal size
58 or mixed size data array */
59 #define ACN_DMP_ADT_EXTRACT_D(f) (((f) & ACN_DMP_ADT_FLAG_D) >> 4)
61 #define ACN_DMP_ADT_FLAG_X 0x0c /* X1, X0 = These bits are reserved and their values shall be set to 0
62 when encoded. Their values shall be ignored when decoding. */
64 #define ACN_DMP_ADT_FLAG_A 0x03 /* A1, A0 = Size of Address elements */
65 #define ACN_DMP_ADT_EXTRACT_A(f) ((f) & ACN_DMP_ADT_FLAG_A)
67 #define ACN_DMP_ADT_V_ACTUAL 0
68 #define ACN_DMP_ADT_V_VIRTUAL 1
70 #define ACN_DMP_ADT_R_ABSOLUTE 0
71 #define ACN_DMP_ADT_R_RELATIVE 1
73 #define ACN_DMP_ADT_D_NS 0
74 #define ACN_DMP_ADT_D_RS 1
75 #define ACN_DMP_ADT_D_RE 2
76 #define ACN_DMP_ADT_D_RM 3
78 #define ACN_DMP_ADT_A_1 0
79 #define ACN_DMP_ADT_A_2 1
80 #define ACN_DMP_ADT_A_4 2
81 #define ACN_DMP_ADT_A_R 3
83 #define ACN_PROTOCOL_ID_SDT 0x00000001
84 #define ACN_PROTOCOL_ID_DMP 0x00000002
85 #define ACN_PROTOCOL_ID_DMX 0x00000003
86 #define ACN_PROTOCOL_ID_DMX_2 0x00000004
87 #define ACN_PROTOCOL_ID_RPT 0x00000005
88 #define ACN_PROTOCOL_ID_EXTENDED 0x00000008
89 #define ACN_PROTOCOL_ID_BROKER 0x00000009
90 #define ACN_PROTOCOL_ID_LLRP 0x0000000A
91 #define ACN_PROTOCOL_ID_EPT 0x0000000B
92 #define ACN_PROTOCOL_ID_DMX_3 0x50430001
94 #define ACN_ADDR_NULL 0
95 #define ACN_ADDR_IPV4 1
96 #define ACN_ADDR_IPV6 2
97 #define ACN_ADDR_IPPORT 3
99 /* SDT Messages */
100 #define ACN_SDT_VECTOR_UNKNOWN 0
101 #define ACN_SDT_VECTOR_REL_WRAP 1
102 #define ACN_SDT_VECTOR_UNREL_WRAP 2
103 #define ACN_SDT_VECTOR_CHANNEL_PARAMS 3
104 #define ACN_SDT_VECTOR_JOIN 4
105 #define ACN_SDT_VECTOR_JOIN_REFUSE 5
106 #define ACN_SDT_VECTOR_JOIN_ACCEPT 6
107 #define ACN_SDT_VECTOR_LEAVE 7
108 #define ACN_SDT_VECTOR_LEAVING 8
109 #define ACN_SDT_VECTOR_CONNECT 9
110 #define ACN_SDT_VECTOR_CONNECT_ACCEPT 10
111 #define ACN_SDT_VECTOR_CONNECT_REFUSE 11
112 #define ACN_SDT_VECTOR_DISCONNECT 12
113 #define ACN_SDT_VECTOR_DISCONNECTING 13
114 #define ACN_SDT_VECTOR_ACK 14
115 #define ACN_SDT_VECTOR_NAK 15
116 #define ACN_SDT_VECTOR_GET_SESSION 16
117 #define ACN_SDT_VECTOR_SESSIONS 17
119 #define ACN_REFUSE_CODE_NONSPECIFIC 1
120 #define ACN_REFUSE_CODE_ILLEGAL_PARAMS 2
121 #define ACN_REFUSE_CODE_LOW_RESOURCES 3
122 #define ACN_REFUSE_CODE_ALREADY_MEMBER 4
123 #define ACN_REFUSE_CODE_BAD_ADDR_TYPE 5
124 #define ACN_REFUSE_CODE_NO_RECIP_CHAN 6
126 #define ACN_REASON_CODE_NONSPECIFIC 1
127 /*#define ACN_REASON_CODE_ 2 */
128 /*#define ACN_REASON_CODE_ 3 */
129 /*#define ACN_REASON_CODE_ 4 */
130 /*#define ACN_REASON_CODE_ 5 */
131 #define ACN_REASON_CODE_NO_RECIP_CHAN 6
132 #define ACN_REASON_CODE_CHANNEL_EXPIRED 7
133 #define ACN_REASON_CODE_LOST_SEQUENCE 8
134 #define ACN_REASON_CODE_SATURATED 9
135 #define ACN_REASON_CODE_TRANS_ADDR_CHANGING 10
136 #define ACN_REASON_CODE_ASKED_TO_LEAVE 11
137 #define ACN_REASON_CODE_NO_RECIPIENT 12
139 /* Blob Information */
140 #define ACN_BLOB_FIELD_TYPE1 1
141 #define ACN_BLOB_FIELD_TYPE2 2
142 #define ACN_BLOB_FIELD_TYPE3 3
143 #define ACN_BLOB_FIELD_TYPE4 4
144 #define ACN_BLOB_FIELD_TYPE5 5
145 #define ACN_BLOB_FIELD_TYPE6 6
146 #define ACN_BLOB_FIELD_TYPE7 7
147 #define ACN_BLOB_FIELD_TYPE8 8
148 #define ACN_BLOB_FIELD_TYPE9 9
149 #define ACN_BLOB_FIELD_TYPE10 10
150 #define ACN_BLOB_FIELD_TYPE11 11
151 #define ACN_BLOB_FIELD_TYPE12 12
153 #define ACN_BLOB_RANGE_MID 0
154 #define ACN_BLOB_RANGE_START 1
155 #define ACN_BLOB_RANGE_END 2
156 #define ACN_BLOB_RANGE_SINGLE 3
158 #define ACN_BLOB_IPV4 1
159 #define ACN_BLOB_IPV6 2
160 #define ACN_BLOB_ERROR1 3
161 #define ACN_BLOB_ERROR2 4
162 #define ACN_BLOB_METADATA 5
163 #define ACN_BLOB_METADATA_DEVICES 6
164 #define ACN_BLOB_METADATA_TYPES 7
165 #define ACN_BLOB_TIME1 8
166 #define ACN_BLOB_DIMMER_PROPERTIES 9
167 #define ACN_BLOB_DIMMER_LOAD_PROPERTIES 10
168 #define ACN_BLOB_DIMMING_RACK_PROPERTIES 11
169 #define ACN_BLOB_DIMMING_RACK_STATUS_PROPERTIES 12
170 #define ACN_BLOB_DIMMER_STATUS_PROPERTIES 13
171 #define ACN_BLOB_SET_LEVELS_OPERATION 14
172 #define ACN_BLOB_PRESET_OPERATION 15
173 #define ACN_BLOB_ADVANCED_FEATURES_OPERATION 16
174 #define ACN_BLOB_DIRECT_CONTROL_OPERATION 17
175 #define ACN_BLOB_GENERATE_CONFIG_OPERATION 18
176 #define ACN_BLOB_ERROR3 19
177 #define ACN_BLOB_DIMMER_PROPERTIES2 20
178 #define ACN_BLOB_DIMMER_LOAD_PROPERTIES2 21
179 #define ACN_BLOB_DIMMER_RACK_PROPERTIES2 22
180 #define ACN_BLOB_DIMMER_RACK_STATUS_PROPERTIES2 23
181 #define ACN_BLOB_DIMMER_STATUS_PROPERTIES2 24
182 #define ACN_BLOB_TIME2 25
183 #define ACN_BLOB_RPC 26
184 #define ACN_BLOB_DHCP_CONFIG_SUBNET 27
185 #define ACN_BLOB_DHCP_CONFIG_STATIC_ROUTE 28
186 #define ACN_BLOB_ENERGY_MANAGEMENT 29
187 #define ACN_BLOB_TIME3 30
188 #define ACN_BLOB_ENERGY_COST 31
189 #define ACN_BLOB_SEQUENCE_OPERATIONS 32
190 #define ACN_BLOB_SEQUENCE_STEP_PROPERTIES 33
192 #define ACN_BLOB_PRESET_PROPERTIES 250
194 #define ACN_DMP_VECTOR_UNKNOWN 0
195 #define ACN_DMP_VECTOR_GET_PROPERTY 1
196 #define ACN_DMP_VECTOR_SET_PROPERTY 2
197 #define ACN_DMP_VECTOR_GET_PROPERTY_REPLY 3
198 #define ACN_DMP_VECTOR_EVENT 4
199 #define ACN_DMP_VECTOR_MAP_PROPERTY 5
200 #define ACN_DMP_VECTOR_UNMAP_PROPERTY 6
201 #define ACN_DMP_VECTOR_SUBSCRIBE 7
202 #define ACN_DMP_VECTOR_UNSUBSCRIBE 8
203 #define ACN_DMP_VECTOR_GET_PROPERTY_FAIL 9
204 #define ACN_DMP_VECTOR_SET_PROPERTY_FAIL 10
205 #define ACN_DMP_VECTOR_MAP_PROPERTY_FAIL 11
206 #define ACN_DMP_VECTOR_SUBSCRIBE_ACCEPT 12
207 #define ACN_DMP_VECTOR_SUBSCRIBE_REJECT 13
208 #define ACN_DMP_VECTOR_ALLOCATE_MAP 14
209 #define ACN_DMP_VECTOR_ALLOCATE_MAP_REPLY 15
210 #define ACN_DMP_VECTOR_DEALLOCATE_MAP 16
211 #define ACN_DMP_VECTOR_SYNC_EVENT 17
213 #define ACN_DMP_REASON_CODE_NONSPECIFIC 1
214 #define ACN_DMP_REASON_CODE_NOT_A_PROPERTY 2
215 #define ACN_DMP_REASON_CODE_WRITE_ONLY 3
216 #define ACN_DMP_REASON_CODE_NOT_WRITABLE 4
217 #define ACN_DMP_REASON_CODE_DATA_ERROR 5
218 #define ACN_DMP_REASON_CODE_MAPS_NOT_SUPPORTED 6
219 #define ACN_DMP_REASON_CODE_SPACE_NOT_AVAILABLE 7
220 #define ACN_DMP_REASON_CODE_PROP_NOT_MAPPABLE 8
221 #define ACN_DMP_REASON_CODE_MAP_NOT_ALLOCATED 9
222 #define ACN_DMP_REASON_CODE_SUBSCRIPTION_NOT_SUPPORTED 10
223 #define ACN_DMP_REASON_CODE_NO_SUBSCRIPTIONS_SUPPORTED 11
225 #define ACN_DMX_VECTOR 2
227 #define ACN_DMX_EXT_SYNC_VECTOR 1
228 #define ACN_DMX_EXT_DISCOVERY_VECTOR 2
229 #define ACN_DMX_DISCOVERY_UNIVERSE_LIST_VECTOR 1
231 #define ACN_PREF_DMX_DISPLAY_HEX 0
232 #define ACN_PREF_DMX_DISPLAY_DEC 1
233 #define ACN_PREF_DMX_DISPLAY_PER 2
235 #define ACN_PREF_DMX_DISPLAY_20PL 0
236 #define ACN_PREF_DMX_DISPLAY_16PL 1
239 #define MAGIC_V1 0 /* 1.0 default version */
240 #define MAGIC_COMMAND 1 /* 2.0 command */
241 #define MAGIC_REPLY 2 /* 2.0 reply */
242 #define MAGIC_REPLY_TYPE_3 3 /* 2.0 reply type 3 */
244 #define V1_SWITCH_TO_NET1 1
245 #define V1_SWITCH_TO_NET2 2
246 #define V1_BOOTP 1114467
248 #define V2_CMD_SWITCH_TO_NET1 1
249 #define V2_CMD_SWITCH_TO_NET2 2
250 #define V2_CMD_DOWNLOAD 3
251 #define V2_CMD_SOFTBOOT 4
252 #define V2_CMD_PHYSICAL_BEACON 5
253 #define V2_CMD_NETWORK_BEACON 6
254 #define V2_CMD_SWITCH_TO_ACN 7
255 #define V2_CMD_SWITCH_TO_DYNAMIC_IP 8
256 #define V2_CMD_EXTENDED_NETWORK_BEACON 9
257 #define V2_CMD_IP_CONFIGURATION 10
258 #define V2_CMD_RESTORE_FACTORY_DEFAULT 11
259 #define V2_CMD_PHYSICAL_BEACON_BY_CID 12
260 #define V2_CMD_NET2_DOWNLOAD 110163
262 #define MAGIC_SWITCH_TO_DYNAMIC_MAINTAIN_LEASE 0
263 #define MAGIC_SWITCH_TO_DYNAMIC_RESET_LEASE 1
265 #define MAGIC_DYNAMIC_IP_MAINTAIN_LEASE 0
266 #define MAGIC_DYNAMIC_IP_RESET_LEASE 1
267 #define MAGIC_STATIC_IP 2
269 /* E1.33 Table A-1 Broadcast UID Defines */
270 #define ACN_RPT_ALL_CONTROLLERS 0xFFFCFFFFFFFF
271 #define ACN_RPT_ALL_DEVICES 0xFFFDFFFFFFFF
272 #define ACN_RPT_ALL_MID_DEVICES 0xFFFDmmmmFFFF /*Addresses all Devices with the specific Manufacturer ID 0xmmmm*/
274 /* E1.33 Table A-2 LLRP Constants */
275 #define ACN_LLRP_MULTICAST_IPV4_ADDRESS_REQUEST 239.255.250.133
276 #define ACN_LLRP_MULTICAST_IPV4_ADDRESS_RESPONSE 239.255.250.134
277 #define ACN_LLRP_MULTICAST_IPV6_ADDRESS_REQUEST ff18::85:0:0:85
278 #define ACN_LLRP_MULTICAST_IPV6_ADDRESS_RESPONSE ff18::85:0:0:86
279 #define ACN_LLRP_PORT 5569
280 #define ACN_LLRP_TIMEOUT 2 /*seconds*/
281 #define ACN_LLRP_TARGET_TIMEOUT 500 /*milliseconds*/
282 #define ACN_LLRP_MAX_BACKOFF 1.5 /*seconds*/
283 #define ACN_LLRP_KNOWN_UID_SIZE 200
284 #define ACN_LLRP_BROADCAST_CID FBAD822C-BD0C-4D4C-BDC8-7EABEBC85AFF
286 /* E1.33 Table A-3 Vector Defines for Root Layer PDU */
287 /* (already defined above)
288 * #define ACN_PDU_VECTOR_ROOT_LLRP 0x0000000A
289 * #define ACN_PDU_VECTOR_ROOT_RPT 0x00000005
290 * #define ACN_PDU_VECTOR_ROOT_BROKER 0x00000009
291 * #define ACN_PDU_VECTOR_ROOT_EPT 0x0000000B
294 /* E1.33 Table A-4 LLRP Messages */
295 #define RDMNET_LLRP_VECTOR_PROBE_REQUEST 0x00000001
296 #define RDMNET_LLRP_VECTOR_PROBE_REPLY 0x00000002
297 #define RDMNET_LLRP_VECTOR_RDM_CMD 0x00000003
299 #define RDMNET_LLRP_VECTOR_PROBE_REQUEST_CLIENT_TCP_INACTIVE 0x01
300 #define RDMNET_LLRP_VECTOR_PROBE_REQUEST_BROKERS_ONLY 0x02
302 #define RDMNET_LLRP_VECTOR_RDM_CMD_START_CODE 0xCC
304 /* E1.33 Table A-5 LLRP Probe Request Messages */
305 #define VECTOR_PROBE_REQUEST_DATA 0x01
307 /* E1.33 Table A-6 LLRP Probe Reply Messages */
308 #define VECTOR_PROBE_REPLY_DATA 0x01
310 /* E1.33 Table A-7 Broker Messages */
311 #define RDMNET_BROKER_VECTOR_CONNECT 0x0001
312 #define RDMNET_BROKER_VECTOR_CONNECT_REPLY 0x0002
313 #define RDMNET_BROKER_VECTOR_CLIENT_ENTRY_UPDATE 0x0003
314 #define RDMNET_BROKER_VECTOR_REDIRECT_V4 0x0004
315 #define RDMNET_BROKER_VECTOR_REDIRECT_V6 0x0005
316 #define RDMNET_BROKER_VECTOR_FETCH_CLIENT_LIST 0x0006
317 #define RDMNET_BROKER_VECTOR_CONNECTED_CLIENT_LIST 0x0007
318 #define RDMNET_BROKER_VECTOR_CLIENT_ADD 0x0008
319 #define RDMNET_BROKER_VECTOR_CLIENT_REMOVE 0x0009
320 #define RDMNET_BROKER_VECTOR_CLIENT_ENTRY_CHANGE 0x000A
321 #define RDMNET_BROKER_VECTOR_REQUEST_DYNAMIC_UIDS 0x000B
322 #define RDMNET_BROKER_VECTOR_ASSIGNED_DYNAMIC_UIDS 0x000C
323 #define RDMNET_BROKER_VECTOR_FETCH_DYNAMIC_UID_LIST 0x000D
324 #define RDMNET_BROKER_VECTOR_DISCONNECT 0x000E
325 #define RDMNET_BROKER_VECTOR_NULL 0x000F
327 #define RDMNET_BROKER_VECTOR_CONNECT_INCREMENTAL_UPDATES 0x01
329 /* E1.33 Table A-8 RPT Messages */
330 #define RDMNET_RPT_VECTOR_REQUEST 0x00000001
331 #define RDMNET_RPT_VECTOR_STATUS 0x00000002
332 #define RDMNET_RPT_VECTOR_NOTIFICATION 0x00000003
334 /* E1.33 Table A-9 RPT Request PDUs */
335 #define RDMNET_RPT_VECTOR_REQUEST_RDM_CMD 0x01
337 /* E1.33 Table A-10 RPT Status PDUs */
338 #define RDMNET_RPT_VECTOR_STATUS_UNKNOWN_RPT_UID 0x0001
339 #define RDMNET_RPT_VECTOR_STATUS_RDM_TIMEOUT 0x0002
340 #define RDMNET_RPT_VECTOR_STATUS_RDM_INVALID_RESPONSE 0x0003
341 #define RDMNET_RPT_VECTOR_STATUS_UNKNOWN_RDM_UID 0x0004
342 #define RDMNET_RPT_VECTOR_STATUS_UNKNOWN_ENDPOINT 0x0005
343 #define RDMNET_RPT_VECTOR_STATUS_BROADCAST_COMPLETE 0x0006
344 #define RDMNET_RPT_VECTOR_STATUS_UNKNOWN_VECTOR 0x0007
345 #define RDMNET_RPT_VECTOR_STATUS_INVALID_MESSAGE 0x0008
346 #define RDMNET_RPT_VECTOR_STATUS_INVALID_COMMAND_CLASS 0x0009
348 /* E1.33 Table A-11 RPT Notification PDUs */
349 #define RDMNET_RPT_VECTOR_NOTIFICATION_RDM_CMD 0x01
351 /* E1.33 Table A-12 RDM Command PDUs */
352 #define RDMNET_RPT_VECTOR_RDM_CMD_RD_DATA 0xCC
354 /* E1.33 Table A-13 EPT PDUs */
355 #define RDMNET_EPT_VECTOR_DATA 0x00000001
356 #define RDMNET_EPT_VECTOR_STATUS 0x00000002
358 /* E1.33 Table A-14 EPT Status PDUs */
359 #define RDMNET_EPT_VECTOR_UNKNOWN_CID 0x0001
360 #define RDMNET_EPT_VECTOR_UNKNOWN_VECTOR 0x0002
362 /* E1.33 Table A-15 RDM Parameter IDs (only used in packet-rdm.c) */
364 /* E1.33 Table A-16 RDM NACK Reason Codes (only used in packet-rdm.c) */
366 /* E1.33 Table A-17 Static Config Types for Component Scope Messages (only used in packet-rdm.c) */
368 /* E1.33 Table A-18 Broker States for Broker Status Messages (only used in packet-rdm.c) */
370 /* E1.33 Table A-19 Connection Status Codes for Broker Connect */
371 #define RDMNET_BROKER_CONNECT_OK 0x0000
372 #define RDMNET_BROKER_CONNECT_SCOPE_MISMATCH 0x0001
373 #define RDMNET_BROKER_CONNECT_CAPACITY_EXCEEDED 0x0002
374 #define RDMNET_BROKER_CONNECT_DUPLICATE_UID 0x0003
375 #define RDMNET_BROKER_CONNECT_INVALID_CLIENT_ENTRY 0x0004
376 #define RDMNET_BROKER_CONNECT_INVALID_UID 0x0005
378 /* E1.33 Table A-20 Status Codes for Dynamic UID Mapping*/
379 #define RDMNET_DYNAMIC_UID_STATUS_OK 0x0000
380 #define RDMNET_DYNAMIC_UID_STATUS_INVALID_REQUEST 0x0001
381 #define RDMNET_DYNAMIC_UID_STATUS_UID_NOT_FOUND 0x0002
382 #define RDMNET_DYNAMIC_UID_STATUS_DUPLICATE_RID 0x0003
383 #define RDMNET_DYNAMIC_UID_STATUS_CAPACITY_EXHAUSTED 0x0004
385 /* E1.33 Table A-21 Client Protocol Codes */
386 #define RDMNET_CLIENT_PROTOCOL_RPT 0x00000005
387 #define RDMNET_CLIENT_PROTOCOL_EPT 0x0000000B
389 /* E1.33 Table A-22 RPT Client Type Codes */
390 #define RDMNET_RPT_CLIENT_TYPE_DEVICE 0x00
391 #define RDMNET_RPT_CLIENT_TYPE_CONTROLLER 0x01
393 /* E1.33 Table A-23 LLRP Component Type Codes - LLRP TARGETS */
394 #define RDMNET_LLRP_COMPONENT_TYPE_RPT_DEVICE 0x00 /* Target is a Device */
395 #define RDMNET_LLRP_COMPONENT_TYPE_RPT_CONTROLLER 0x01 /* Target is a Controller */
396 #define RDMNET_LLRP_COMPONENT_TYPE_BROKER 0x02 /* Target is a Broker */
397 #define RDMNET_LLRP_COMPONENT_TYPE_NON_RDMNET 0xFF /* Target does not implement RDMnet other than LLRP */
399 /* E1.33 Table A-24 RPT Client Disconnect Reason Codes */
400 #define RDMNET_RPT_DISCONNECT_SHUTDOWN 0x0000 /* Sent by Components to indicate that they are */
401 /* about to shut down. */
402 #define RDMNET_RPT_DISCONNECT_CAPACITY_EXHAUSTED 0x0001 /* Sent by Components when they do not */
403 /* have the ability to support this connection. */
404 /* Note that a Component must reserve certain */
405 /* resources to be able to send this message */
406 /* when it is in such a state. */
407 #define RDMNET_RPT_DISCONNECT_HARDWARE_FAULT 0x0002 /* Sent by Components which must terminate a */
408 /* connection due to an internal hardware fault */
409 #define RDMNET_RPT_DISCONNECT_SOFTWARE_FAULT 0x0003 /* Sent by Components which must terminate a */
410 /* connection due to a software fault. */
411 #define RDMNET_RPT_DISCONNECT_SOFTWARE_RESET 0x0004 /* Sent by Components which must terminate a */
412 /* connection because of a software reset. */
413 /* This message should not be sent in the case */
414 /* of a reboot, as the Shutdown message */
415 /* is preferred. */
416 #define RDMNET_RPT_DISCONNECT_INCORRECT_SCOPE 0x0005 /* Sent by Brokers that are not on the */
417 /* desired Scope. */
418 #define RDMNET_RPT_DISCONNECT_RPT_RECONFIGURE 0x0006 /* Sent by components which must terminate a */
419 /* connection because they were reconfigured */
420 /* using RPT */
421 #define RDMNET_RPT_DISCONNECT_LLRP_RECONFIGURE 0x0007 /* Sent by Components which must terminate a */
422 /* connection because they were reconfigured */
423 /* using LLRP. */
424 #define RDMNET_RPT_DISCONNECT_USER_RECONFIGURE 0x0008 /* Sent by Components which must terminate a */
425 /* connection because they were reconfigured */
426 /* through some means outside the scope of this */
427 /* standard (i.e. front panel configuration) */
429 typedef struct
431 uint32_t start;
432 uint32_t vector;
433 uint32_t header;
434 uint32_t data;
435 uint32_t data_length;
436 } acn_pdu_offsets;
438 typedef struct
440 uint8_t flags;
441 uint32_t address; /* or first address */
442 uint32_t increment;
443 uint32_t count;
444 uint32_t size;
445 uint32_t data_length;
446 } acn_dmp_adt_type;
449 * See
450 * ANSI BSR E1.17 Architecture for Control Networks
451 * ANSI BSR E1.31
452 * ANSI BSR E1.33 RDMnet
455 #define ACTUAL_ADDRESS 0
456 /* forward reference */
457 static uint32_t acn_add_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, const char *label);
458 static int dissect_acn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
459 static int dissect_rdmnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint32_t data_offset, bool is_udp);
461 /* Global variables */
462 static int proto_acn;
463 static int ett_acn;
464 static int ett_acn_channel_owner_info_block;
465 static int ett_acn_channel_member_info_block;
466 static int ett_acn_channel_parameter;
467 static int ett_acn_address;
468 static int ett_acn_address_type;
469 static int ett_acn_blob;
470 static int ett_acn_pdu_flags;
471 static int ett_acn_dmp_pdu;
472 static int ett_acn_sdt_pdu;
473 static int ett_acn_sdt_client_pdu;
474 static int ett_acn_sdt_base_pdu;
475 static int ett_acn_root_pdu;
477 static int ett_acn_dmx_address;
478 static int ett_acn_dmx_2_options;
479 static int ett_acn_dmx_data_pdu;
480 static int ett_acn_dmx_pdu;
482 static int ett_rdmnet_pdu_flags;
483 static int ett_rdmnet_llrp_base_pdu;
484 static int ett_rdmnet_llrp_probe_request_pdu;
485 static int ett_rdmnet_llrp_probe_request_filter_flags;
486 static int ett_rdmnet_llrp_probe_reply_pdu;
487 static int ett_rdmnet_llrp_rdm_command_pdu;
489 static int ett_rdmnet_broker_base_pdu;
490 static int ett_rdmnet_broker_client_entry_pdu;
491 static int ett_rdmnet_broker_client_entry_manufacturer_protocol_ids;
492 static int ett_rdmnet_broker_connect_connection_flags;
493 static int ett_rdmnet_broker_client_entry_update_connection_flags;
495 static int ett_rdmnet_rpt_base_pdu;
496 static int ett_rdmnet_rpt_request_pdu;
497 static int ett_rdmnet_rpt_status_pdu;
498 static int ett_rdmnet_rpt_notification_pdu;
500 static int ett_rdmnet_ept_base_pdu;
501 static int ett_rdmnet_ept_data_pdu;
502 static int ett_rdmnet_ept_data_vector_pdu;
503 static int ett_rdmnet_ept_status_pdu;
505 static expert_field ei_acn_dmx_discovery_outofseq;
507 /* Register fields */
508 /* In alphabetical order */
509 static int hf_acn_association;
510 static int hf_acn_blob;
511 /* static int hf_acn_blob_dimmer_load_properties2_type; */
512 static int hf_acn_blob_field_length;
513 static int hf_acn_blob_field_type;
514 static int hf_acn_blob_field_value_number;
515 static int hf_acn_blob_field_value_number64;
516 static int hf_acn_blob_field_value_ipv4;
517 static int hf_acn_blob_field_value_ipv6;
518 static int hf_acn_blob_field_value_float;
519 static int hf_acn_blob_field_value_double;
520 static int hf_acn_blob_field_value_guid;
521 static int hf_acn_blob_field_value_string;
522 /* static int hf_acn_blob_metadata_types_type; */
523 static int hf_acn_blob_range_number;
524 /* static int hf_acn_blob_range_start; */
525 static int hf_acn_blob_range_type;
526 static int hf_acn_blob_tree_field_type;
527 static int hf_acn_blob_type;
528 static int hf_acn_blob_version;
529 static int hf_acn_blob_time_zone;
530 static int hf_acn_blob_dst_type;
531 static int hf_acn_blob_dst_start_day;
532 static int hf_acn_blob_dst_stop_day;
533 static int hf_acn_blob_dst_start_locality;
534 static int hf_acn_blob_dst_stop_locality;
535 static int hf_acn_channel_number;
536 static int hf_acn_cid;
537 /* static int hf_acn_client_protocol_id; */
538 static int hf_acn_data;
539 static int hf_acn_data8;
540 static int hf_acn_data16;
541 static int hf_acn_data24;
542 static int hf_acn_data32;
543 /* static int hf_acn_dmp_adt; */ /* address and data type*/
544 static int hf_acn_dmp_adt_a;
545 static int hf_acn_dmp_adt_v;
546 static int hf_acn_dmp_adt_r;
547 static int hf_acn_dmp_adt_d;
548 static int hf_acn_dmp_adt_x;
549 static int hf_acn_dmp_reason_code;
550 static int hf_acn_dmp_vector;
551 static int hf_acn_dmp_actual_address;
552 static int hf_acn_dmp_virtual_address;
553 static int hf_acn_dmp_actual_address_first;
554 static int hf_acn_dmp_virtual_address_first;
555 static int hf_acn_expiry;
556 static int hf_acn_first_member_to_ack;
557 static int hf_acn_first_missed_sequence;
558 static int hf_acn_ip_address_type;
559 static int hf_acn_ipv4;
560 static int hf_acn_ipv6;
561 static int hf_acn_last_member_to_ack;
562 static int hf_acn_last_missed_sequence;
563 static int hf_acn_mak_threshold;
564 static int hf_acn_member_id;
565 static int hf_acn_nak_holdoff;
566 static int hf_acn_nak_max_wait;
567 static int hf_acn_nak_modulus;
568 static int hf_acn_nak_outbound_flag;
569 static int hf_acn_oldest_available_wrapper;
570 static int hf_acn_packet_identifier;
571 static int hf_acn_pdu;
572 static int hf_acn_pdu_flag_d;
573 static int hf_acn_pdu_flag_h;
574 static int hf_acn_pdu_flag_l;
575 static int hf_acn_pdu_flag_v;
576 static int hf_acn_pdu_flags;
577 static int hf_acn_pdu_length;
578 static int hf_acn_port;
579 static int hf_acn_postamble_size;
580 static int hf_acn_preamble_size;
581 static int hf_acn_protocol_id;
582 static int hf_acn_reason_code;
583 static int hf_acn_reciprocal_channel;
584 static int hf_acn_refuse_code;
585 static int hf_acn_reliable_sequence_number;
586 static int hf_acn_adhoc_expiry;
587 /* static int hf_acn_sdt_pdu; */
588 static int hf_acn_sdt_vector;
590 static int hf_acn_dmx_vector;
591 static int hf_acn_dmx_extension_vector;
592 /* static int hf_acn_session_count; */
593 static int hf_acn_total_sequence_number;
594 static int hf_acn_dmx_source_name;
595 static int hf_acn_dmx_priority;
596 static int hf_acn_dmx_2_sync_universe;
597 static int hf_acn_dmx_3_reserved;
598 static int hf_acn_dmx_sequence_number;
599 static int hf_acn_dmx_2_options;
600 static int hf_acn_dmx_2_option_p;
601 static int hf_acn_dmx_2_option_s;
602 static int hf_acn_dmx_2_option_f;
603 static int hf_acn_dmx_universe;
605 static int hf_acn_dmx_start_code;
606 static int hf_acn_dmx_2_first_property_address;
607 static int hf_acn_dmx_increment;
608 static int hf_acn_dmx_count;
609 static int hf_acn_dmx_2_start_code;
610 static int hf_acn_dmx_data;
612 static int hf_acn_postamble_key_fingerprint;
613 static int hf_acn_postamble_seq_type;
614 static int hf_acn_postamble_seq_hi;
615 static int hf_acn_postamble_seq_low;
616 static int hf_acn_postamble_message_digest;
618 static int hf_acn_dmx_discovery_framing_reserved;
619 static int hf_acn_dmx_discovery_page;
620 static int hf_acn_dmx_discovery_last_page;
621 static int hf_acn_dmx_discovery_vector;
622 static int hf_acn_dmx_discovery_universe_list;
624 static int hf_acn_dmx_sync_universe;
625 static int hf_acn_dmx_sync_reserved;
627 /* static int hf_acn_dmx_dmp_vector; */
629 /* Try heuristic ACN decode */
630 static bool global_acn_dmx_enable;
631 static int global_acn_dmx_display_view;
632 static int global_acn_dmx_display_line_format;
633 static bool global_acn_dmx_display_zeros;
634 static bool global_acn_dmx_display_leading_zeros;
636 static int proto_magic;
637 static int ett_magic;
639 /* Register fields */
640 static int hf_magic_protocol_id;
641 static int hf_magic_pdu_subtype;
642 static int hf_magic_major_version;
643 static int hf_magic_minor_version;
645 static int hf_magic_v1command_vals;
647 static int hf_magic_command_vals;
648 static int hf_magic_command_beacon_duration;
649 static int hf_magic_command_tftp;
650 static int hf_magic_command_reset_lease;
651 static int hf_magic_command_cid;
652 static int hf_magic_command_ip_configuration;
653 static int hf_magic_command_ip_address;
654 static int hf_magic_command_subnet_mask;
655 static int hf_magic_command_gateway;
657 static int hf_magic_reply_ip_address;
658 static int hf_magic_reply_subnet_mask;
659 static int hf_magic_reply_gateway;
660 static int hf_magic_reply_tftp;
662 static int hf_magic_reply_version;
663 static int hf_magic_reply_device_type_name;
664 static int hf_magic_reply_default_name;
665 static int hf_magic_reply_user_name;
666 static int hf_magic_reply_cid;
667 static int hf_magic_reply_dcid;
669 static expert_field ei_magic_reply_invalid_type;
672 static int proto_rdmnet;
673 static int ett_rdmnet;
675 /* Register fields */
676 static int hf_rdmnet_cid;
677 static int hf_rdmnet_packet_identifier;
678 static int hf_rdmnet_pdu;
679 static int hf_rdmnet_pdu_flag_d;
680 static int hf_rdmnet_pdu_flag_h;
681 static int hf_rdmnet_pdu_flag_l;
682 static int hf_rdmnet_pdu_flag_v;
683 static int hf_rdmnet_pdu_flags;
684 static int hf_rdmnet_pdu_length;
685 static int hf_rdmnet_postamble_size;
686 static int hf_rdmnet_preamble_size;
687 static int hf_rdmnet_protocol_id;
688 static int hf_rdmnet_tcp_length;
690 static int hf_rdmnet_llrp_vector;
691 static int hf_rdmnet_llrp_destination_cid;
692 static int hf_rdmnet_llrp_transaction_number;
693 static int hf_rdmnet_llrp_probe_request_vector;
694 static int hf_rdmnet_llrp_probe_request_pdu_length;
695 static int hf_rdmnet_llrp_probe_request_lower_uid;
696 static int hf_rdmnet_llrp_probe_request_upper_uid;
697 static int hf_rdmnet_llrp_probe_request_filter;
698 static int hf_rdmnet_llrp_probe_request_filter_client_tcp_inactive;
699 static int hf_rdmnet_llrp_probe_request_filter_brokers_only;
700 static int hf_rdmnet_llrp_probe_request_known_uid;
702 static int hf_rdmnet_llrp_probe_reply_vector;
703 static int hf_rdmnet_llrp_probe_reply_uid;
704 static int hf_rdmnet_llrp_probe_reply_hardware_address;
705 static int hf_rdmnet_llrp_probe_reply_component_type;
706 static int hf_rdmnet_llrp_rdm_command_start_code;
708 static int hf_rdmnet_rpt_vector;
709 static int hf_rdmnet_rpt_source_uid;
710 static int hf_rdmnet_rpt_source_endpoint_id;
711 static int hf_rdmnet_rpt_destination_uid;
712 static int hf_rdmnet_rpt_destination_endpoint_id;
713 static int hf_rdmnet_rpt_sequence_number;
714 static int hf_rdmnet_rpt_reserved;
715 static int hf_rdmnet_rpt_request_vector;
716 static int hf_rdmnet_rpt_request_rdm_command;
717 static int hf_rdmnet_rpt_status_vector;
718 static int hf_rdmnet_rpt_status_unknown_rpt_uid_string;
719 static int hf_rdmnet_rpt_status_rdm_timeout_string;
720 static int hf_rdmnet_rpt_status_rdm_invalid_response_string;
721 static int hf_rdmnet_rpt_status_unknown_rdm_uid_string;
722 static int hf_rdmnet_rpt_status_unknown_endpoint_string;
723 static int hf_rdmnet_rpt_status_broadcast_complete_string;
724 static int hf_rdmnet_rpt_status_unknown_vector_string;
725 static int hf_rdmnet_rpt_notification_vector;
726 static int hf_rdmnet_rpt_notification_rdm_command;
728 static int hf_rdmnet_broker_vector;
729 static int hf_rdmnet_broker_client_protocol_vector;
730 static int hf_rdmnet_broker_client_protocol_cid;
731 static int hf_rdmnet_broker_client_rpt_client_uid;
732 static int hf_rdmnet_broker_client_rpt_client_type;
733 static int hf_rdmnet_broker_client_rpt_binding_cid;
734 static int hf_rdmnet_broker_client_ept_protocol_vector;
735 static int hf_rdmnet_broker_client_ept_protocol_manufacturer_id;
736 static int hf_rdmnet_broker_client_ept_protocol_protocol_id;
737 static int hf_rdmnet_broker_client_ept_protocol_string;
738 static int hf_rdmnet_broker_connect_client_scope;
739 static int hf_rdmnet_broker_connect_e133_version;
740 static int hf_rdmnet_broker_connect_search_domain;
741 static int hf_rdmnet_broker_connect_connection_flags;
742 static int hf_rdmnet_broker_connect_connection_flags_incremental_updates;
743 static int hf_rdmnet_broker_connect_reply_connection_code;
744 static int hf_rdmnet_broker_connect_reply_e133_version;
745 static int hf_rdmnet_broker_connect_reply_broker_uid;
746 static int hf_rdmnet_broker_connect_reply_client_uid;
747 static int hf_rdmnet_broker_client_entry_update_connection_flags;
748 static int hf_rdmnet_broker_client_entry_update_connection_flags_incremental_updates;
749 static int hf_rdmnet_broker_redirect_ipv4_address;
750 static int hf_rdmnet_broker_redirect_ipv4_tcp_port;
751 static int hf_rdmnet_broker_redirect_ipv6_address;
752 static int hf_rdmnet_broker_redirect_ipv6_tcp_port;
753 static int hf_rdmnet_broker_disconnect_reason;
754 static int hf_rdmnet_broker_dynamic_uid_request;
755 static int hf_rdmnet_broker_rid;
756 static int hf_rdmnet_broker_assigned_dynamic_uid;
757 static int hf_rdmnet_broker_assigned_rid;
758 static int hf_rdmnet_broker_assigned_status_code;
759 static int hf_rdmnet_broker_fetch_dynamic_uid;
761 static int hf_rdmnet_ept_vector;
762 static int hf_rdmnet_ept_destination_cid;
763 static int hf_rdmnet_ept_data_pdu_length;
764 static int hf_rdmnet_ept_data_vector;
765 static int hf_rdmnet_ept_data_vector_manufacturer_id;
766 static int hf_rdmnet_ept_data_vector_protocol_id;
767 static int hf_rdmnet_ept_data_opaque_data;
768 static int hf_rdmnet_ept_status_pdu_length;
769 static int hf_rdmnet_ept_status_vector;
770 static int hf_rdmnet_ept_status_unknown_cid;
771 static int hf_rdmnet_ept_status_status_string;
772 static int hf_rdmnet_ept_status_unknown_vector;
773 static int hf_rdmnet_ept_status_vector_string;
775 static const value_string acn_protocol_id_vals[] = {
776 { ACN_PROTOCOL_ID_SDT, "SDT Protocol" },
777 { ACN_PROTOCOL_ID_DMP, "DMP Protocol" },
778 { ACN_PROTOCOL_ID_DMX, "DMX Protocol" },
779 { ACN_PROTOCOL_ID_DMX_2, "Ratified DMX Protocol" },
780 { ACN_PROTOCOL_ID_RPT, "RDM Packet Transport Protocol" },
781 { ACN_PROTOCOL_ID_BROKER, "Broker Protocol" },
782 { ACN_PROTOCOL_ID_LLRP, "Low Level Recovery Protocol" },
783 { ACN_PROTOCOL_ID_EPT, "Extensible Packet Transport Protocol" },
784 { ACN_PROTOCOL_ID_DMX_3, "Pathway Connectivity Secure DMX Protocol" },
785 { ACN_PROTOCOL_ID_EXTENDED, "Protocol Extension" },
786 { 0, NULL },
789 static const value_string acn_dmp_adt_r_vals[] = {
790 { ACN_DMP_ADT_R_RELATIVE, "Relative" },
791 { ACN_DMP_ADT_R_ABSOLUTE, "Absolute" },
792 { 0, NULL },
795 static const value_string acn_dmp_adt_v_vals[] = {
796 { ACN_DMP_ADT_V_ACTUAL, "Actual" },
797 { ACN_DMP_ADT_V_VIRTUAL, "Virtual" },
798 { 0, NULL },
801 static const value_string acn_dmp_adt_d_vals[] = {
802 { ACN_DMP_ADT_D_NS, "Non-range, single data item" },
803 { ACN_DMP_ADT_D_RS, "Range, single data item" },
804 { ACN_DMP_ADT_D_RE, "Range, array of equal size data items" },
805 { ACN_DMP_ADT_D_RM, "Range, series of mixed size data items" },
806 { 0, NULL },
809 static const value_string acn_dmp_adt_a_vals[] = {
810 { ACN_DMP_ADT_A_1, "1 octet" },
811 { ACN_DMP_ADT_A_2, "2 octets" },
812 { ACN_DMP_ADT_A_4, "4 octets" },
813 { ACN_DMP_ADT_A_R, "reserved" },
814 { 0, NULL },
818 static const value_string acn_sdt_vector_vals[] = {
819 { ACN_SDT_VECTOR_UNKNOWN, "Unknown"},
820 { ACN_SDT_VECTOR_REL_WRAP, "Reliable Wrapper"},
821 { ACN_SDT_VECTOR_UNREL_WRAP, "Unreliable Wrapper"},
822 { ACN_SDT_VECTOR_CHANNEL_PARAMS, "Channel Parameters"},
823 { ACN_SDT_VECTOR_JOIN, "Join"},
824 { ACN_SDT_VECTOR_JOIN_REFUSE, "Join Refuse"},
825 { ACN_SDT_VECTOR_JOIN_ACCEPT, "Join Accept"},
826 { ACN_SDT_VECTOR_LEAVE, "Leave"},
827 { ACN_SDT_VECTOR_LEAVING, "Leaving"},
828 { ACN_SDT_VECTOR_CONNECT, "Connect"},
829 { ACN_SDT_VECTOR_CONNECT_ACCEPT, "Connect Accept"},
830 { ACN_SDT_VECTOR_CONNECT_REFUSE, "Connect Refuse"},
831 { ACN_SDT_VECTOR_DISCONNECT, "Disconnect"},
832 { ACN_SDT_VECTOR_DISCONNECTING, "Disconnecting"},
833 { ACN_SDT_VECTOR_ACK, "Ack"},
834 { ACN_SDT_VECTOR_NAK, "Nak"},
835 { ACN_SDT_VECTOR_GET_SESSION, "Get Session"},
836 { ACN_SDT_VECTOR_SESSIONS, "Sessions"},
837 { 0, NULL },
840 static const value_string acn_dmx_vector_vals[] = {
841 { ACN_DMX_VECTOR, "Streaming DMX"},
842 { 0, NULL },
845 static const value_string acn_dmx_extension_vector_vals[] = {
846 { ACN_DMX_EXT_SYNC_VECTOR, "Streaming DMX Sync"},
847 { ACN_DMX_EXT_DISCOVERY_VECTOR, "Streaming DMX Discovery"},
848 { 0, NULL },
851 static const value_string acn_dmx_discovery_vector_vals[] = {
852 { ACN_DMX_DISCOVERY_UNIVERSE_LIST_VECTOR, "Source Universe List"},
853 { 0, NULL },
856 static const value_string acn_blob_advanced_features_operation_field_name[] = {
857 { 1, "Operation Type" },
858 { 2, "Use Controlled Loads" },
859 { 3, "Start Dimmer Address" },
860 { 4, "End Dimmer Address" },
861 { 5, "Space" },
862 { 0, NULL }
865 static const value_string acn_blob_dimmer_load_properties2_field_name[] = {
866 { 1, "System" },
867 { 2, "Processor" },
868 { 3, "Rack" },
869 { 4, "Lug" },
870 { 5, "Module" },
871 { 6, "Station" },
872 { 7, "Port" },
873 { 8, "Subdevice" },
874 { 9, "Space" },
875 { 10, "UDN" },
876 { 11, "Reserved" },
877 { 12, "Is Load Recorded" },
878 { 13, "Output Voltage Step 1" },
879 { 14, "Output Voltage Step 2" },
880 { 15, "Output Voltage Step 3" },
881 { 16, "Output Voltage Step 4" },
882 { 17, "Output Voltage Step 5" },
883 { 18, "Output Voltage Step 6" },
884 { 19, "Output Voltage Step 7" },
885 { 20, "Output Voltage Step 8" },
886 { 21, "Output Voltage Step 9" },
887 { 22, "Output Voltage Step 10" },
888 { 23, "Output Voltage Step 11" },
889 { 24, "Output Voltage Step 12" },
890 { 25, "Output Voltage Step 13" },
891 { 26, "Output Voltage Step 14" },
892 { 27, "Output Voltage Step 15" },
893 { 28, "Output Voltage Step 16" },
894 { 29, "Output Voltage Step 17" },
895 { 30, "Output Voltage Step 18" },
896 { 31, "Output Voltage Step 19" },
897 { 32, "Output Voltage Step 20" },
898 { 33, "Amperage Step 1" },
899 { 34, "Amperage Step 2" },
900 { 35, "Amperage Step 3" },
901 { 36, "Amperage Step 4" },
902 { 37, "Amperage Step 5" },
903 { 38, "Amperage Step 6" },
904 { 39, "Amperage Step 7" },
905 { 40, "Amperage Step 8" },
906 { 41, "Amperage Step 9" },
907 { 42, "Amperage Step 10" },
908 { 43, "Amperage Step 11" },
909 { 44, "Amperage Step 12" },
910 { 45, "Amperage Step 13" },
911 { 46, "Amperage Step 14" },
912 { 47, "Amperage Step 15" },
913 { 48, "Amperage Step 16" },
914 { 49, "Amperage Step 17" },
915 { 50, "Amperage Step 18" },
916 { 51, "Amperage Step 19" },
917 { 52, "Amperage Step 20" },
918 { 53, "Voltage Time Step 1" },
919 { 54, "Voltage Time Step 2" },
920 { 55, "Voltage Time Step 3" },
921 { 56, "Voltage Time Step 4" },
922 { 57, "Voltage Time Step 5" },
923 { 58, "Voltage Time Step 6" },
924 { 59, "Voltage Time Step 7" },
925 { 60, "Voltage Time Step 8" },
926 { 61, "Voltage Time Step 9" },
927 { 62, "Voltage Time Step 10" },
928 { 63, "Voltage Time Step 11" },
929 { 64, "Voltage Time Step 12" },
930 { 65, "Voltage Time Step 13" },
931 { 66, "Voltage Time Step 14" },
932 { 67, "Voltage Time Step 15" },
933 { 68, "Voltage Time Step 16" },
934 { 69, "Voltage Time Step 17" },
935 { 70, "Voltage Time Step 18" },
936 { 71, "Voltage Time Step 19" },
937 { 72, "Voltage Time Step 20" },
938 { 73, "Is Rig Check Recorded" },
939 { 74, "Recorded Level" },
940 { 75, "Recorded Current" },
941 { 0, NULL }
943 static value_string_ext acn_blob_dimmer_load_properties2_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_load_properties2_field_name);
945 static const value_string acn_blob_dimmer_properties2_field_name[] = {
946 { 1, "System" },
947 { 2, "Processor" },
948 { 3, "Rack" },
949 { 4, "Lug" },
950 { 5, "Module" },
951 { 6, "Station" },
952 { 7, "Port" },
953 { 8, "Subdevice" },
954 { 9, "Space" },
955 { 10, "UDN" },
956 { 11, "Reserved" },
957 { 12, "Dimmer Name" },
958 { 13, "Dimmer Module" },
959 { 14, "Dimmer Mode" },
960 { 15, "Dimmer Control" },
961 { 16, "Dimmer Curve" },
962 { 17, "Off Level Percent" },
963 { 18, "On Level Percent" },
964 { 19, "On Time(sec)" },
965 { 20, "Off Time(sec)" },
966 { 21, "Dimmer AF Enabled" },
967 { 22, "Threshold" },
968 { 23, "Min Scale" },
969 { 24, "Unregulated Min Scale" },
970 { 25, "Max Scale" },
971 { 26, "Unregulated Max Scale" },
972 { 27, "Voltage Regulation" },
973 { 28, "Preheat Enable" },
974 { 29, "Preheat Time" },
975 { 30, "DC Output Prevent" },
976 { 31, "Inrush Protect" },
977 { 32, "AF Sensitivity" },
978 { 33, "AF Reaction Time" },
979 { 34, "Scale Load" },
980 { 35, "PTIO" },
981 { 36, "Allow In Preset" },
982 { 37, "Allow In Panic" },
983 { 38, "Allow In Panic DD" },
984 { 39, "Report No Loads" },
985 { 40, "Loads Error Reporting Enabled" },
986 { 41, "New Dimmer Space Number" },
987 { 42, "New Dimmer Number" },
988 { 43, "DMX A Patch" },
989 { 44, "DMX B Patch" },
990 { 45, "sACN Patch" },
991 { 46, "DMX A Patch DD" },
992 { 47, "DMX B Patch DD" },
993 { 48, "sACN Patch DD" },
994 { 49, "DMX A 16-bit Enable" },
995 { 50, "DMX B 16-bit Enable" },
996 { 51, "sACN 16-bit Enable" },
997 { 52, "Dimmer Zone" },
998 { 0, NULL }
1000 static value_string_ext acn_blob_dimmer_properties2_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_properties2_field_name);
1002 static const value_string acn_blob_dimmer_rack_properties2_field_name[] = {
1003 { 1, "System" },
1004 { 2, "Processor" },
1005 { 3, "Rack" },
1006 { 4, "Lug" },
1007 { 5, "Module" },
1008 { 6, "Station" },
1009 { 7, "Port" },
1010 { 8, "Subdevice" },
1011 { 9, "Space" },
1012 { 10, "UDN" },
1013 { 11, "Reserved" },
1014 { 12, "Rack CID" },
1015 { 13, "Rack Number" },
1016 { 14, "Rack Name" },
1017 { 15, "Rack Model" },
1018 { 16, "Rack AF Enable" },
1019 { 17, "Temperature Format" },
1020 { 18, "Data Loss Behavior DMX A" },
1021 { 19, "Data Loss Behavior DMX B" },
1022 { 20, "Data Loss Behavior sACN" },
1023 { 21, "Data Loss Cross/Wait Time DMX A" },
1024 { 22, "Data Loss Cross/Wait Time DMX B" },
1025 { 23, "Data Loss Wait Time sACN" },
1026 { 24, "Data Loss Fade Time DMX A" },
1027 { 25, "Data Loss Fade Time DMX B" },
1028 { 26, "Data Loss Fade Time sACN" },
1029 { 27, "Data Loss Preset DMX A" },
1030 { 28, "Data Loss Preset DMX B" },
1031 { 29, "Data Loss Preset sACN" },
1032 { 30, "Data Port Priority DMX A" },
1033 { 31, "Data Port Priority DMX B" },
1034 { 32, "Data Port Enabled DMX A" },
1035 { 33, "Data Port Enabled DMX B" },
1036 { 34, "Data Port Enabled sACN" },
1037 { 35, "16 Bit Enabled DMX A" },
1038 { 36, "16 Bit Enabled DMX B" },
1039 { 37, "16 Bit Enabled sACN" },
1040 { 38, "Patch From Home Screen" },
1041 { 39, "SCR Off Time" },
1042 { 40, "Time Mode" },
1043 { 41, "Offset from UTC" },
1044 { 42, "Universal Hold Last Look Time" },
1045 { 43, "Reactivate Presets On Boot" },
1046 { 44, "Voltage High Warning Level" },
1047 { 45, "Temperature High Warning Level" },
1048 { 46, "Fan Operation Timing" },
1049 { 47, "Allow Backplane Communication Errors" },
1050 { 48, "Activate Presets on Boot" },
1051 { 49, "SmartLink2 Power Supply Enable" },
1052 { 50, "Remote Record Enable" },
1053 { 51, "System Number" },
1054 { 52, "Architectural Priority" },
1055 { 53, "Data Loss Preset Space DMX A" },
1056 { 54, "Data Loss Preset Space DMX B" },
1057 { 55, "Arch. Off Behavior" },
1058 { 0, NULL }
1060 static value_string_ext acn_blob_dimmer_rack_properties2_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_rack_properties2_field_name);
1062 static const value_string acn_blob_dimmer_rack_status_properties2_field_name[] = {
1063 { 1, "System" },
1064 { 2, "Processor" },
1065 { 3, "Rack" },
1066 { 4, "Lug" },
1067 { 5, "Module" },
1068 { 6, "Station" },
1069 { 7, "Port" },
1070 { 8, "Subdevice" },
1071 { 9, "Space" },
1072 { 10, "UDN" },
1073 { 11, "Reserved" },
1074 { 12, "CPU Temperature" },
1075 { 13, "Time of Last Reboot" },
1076 { 14, "Time Now" },
1077 { 15, "Rack Phasing" },
1078 { 16, "Power Frequency" },
1079 { 17, "Phase A Voltage" },
1080 { 18, "Phase B Voltage" },
1081 { 19, "Phase C Voltage" },
1082 { 20, "DMX A Port Status" },
1083 { 21, "DMX B Port Status" },
1084 { 22, "Active Preset Group IDs" },
1085 { 23, "Active Preset Group ID[0]" },
1086 { 24, "Active Preset Group ID[1]" },
1087 { 25, "Active Preset Group ID[2]" },
1088 { 26, "Active Preset Group ID[3]" },
1089 { 27, "Active Preset Group ID[4]" },
1090 { 28, "Active Preset Group ID[5]" },
1091 { 29, "Active Preset Group ID[6]" },
1092 { 30, "Active Preset Group ID[7]" },
1093 { 31, "Active Preset Group ID[8]" },
1094 { 32, "Active Preset Group ID[9]" },
1095 { 33, "Active Preset Group ID[10]" },
1096 { 34, "Active Preset Group ID[11]" },
1097 { 35, "Active Preset Group ID[12]" },
1098 { 36, "Active Preset Group ID[13]" },
1099 { 37, "Active Preset Group ID[14]" },
1100 { 38, "Active Preset Group ID[15]" },
1101 { 39, "Active Preset Group ID[16]" },
1102 { 40, "Active Preset Group ID[17]" },
1103 { 41, "Active Preset Group ID[18]" },
1104 { 42, "Active Preset Group ID[19]" },
1105 { 43, "Active Preset Group ID[20]" },
1106 { 44, "Active Preset Group ID[21]" },
1107 { 45, "Active Preset Group ID[22]" },
1108 { 46, "Active Preset Group ID[23]" },
1109 { 47, "Active Preset Group ID[24]" },
1110 { 48, "Active Preset Group ID[25]" },
1111 { 49, "Active Preset Group ID[26]" },
1112 { 50, "Active Preset Group ID[27]" },
1113 { 51, "Active Preset Group ID[28]" },
1114 { 52, "Active Preset Group ID[29]" },
1115 { 53, "Active Preset Group ID[30]" },
1116 { 54, "Active Preset Group ID[31]" },
1117 { 55, "Active Preset Group ID[32]" },
1118 { 56, "Active Preset Group ID[33]" },
1119 { 57, "Active Preset Group ID[34]" },
1120 { 58, "Active Preset Group ID[35]" },
1121 { 59, "Active Preset Group ID[36]" },
1122 { 60, "Active Preset Group ID[37]" },
1123 { 61, "Active Preset Group ID[38]" },
1124 { 62, "Active Preset Group ID[39]" },
1125 { 63, "Active Preset Group ID[40]" },
1126 { 64, "Active Preset Group ID[41]" },
1127 { 65, "Active Preset Group ID[42]" },
1128 { 66, "Active Preset Group ID[43]" },
1129 { 67, "Active Preset Group ID[44]" },
1130 { 68, "Active Preset Group ID[45]" },
1131 { 69, "Active Preset Group ID[46]" },
1132 { 70, "Active Preset Group ID[47]" },
1133 { 71, "Active Preset Group ID[48]" },
1134 { 72, "Active Preset Group ID[49]" },
1135 { 73, "Active Preset Group ID[50]" },
1136 { 74, "Active Preset Group ID[51]" },
1137 { 75, "Active Preset Group ID[52]" },
1138 { 76, "Active Preset Group ID[53]" },
1139 { 77, "Active Preset Group ID[54]" },
1140 { 78, "Active Preset Group ID[55]" },
1141 { 79, "Active Preset Group ID[56]" },
1142 { 80, "Active Preset Group ID[57]" },
1143 { 81, "Active Preset Group ID[58]" },
1144 { 82, "Active Preset Group ID[59]" },
1145 { 83, "Active Preset Group ID[60]" },
1146 { 84, "Active Preset Group ID[61]" },
1147 { 85, "Active Preset Group ID[62]" },
1148 { 86, "Active Preset Group ID[63]" },
1149 { 87, "Rack AF State" },
1150 { 88, "Number of Stored Presets for This Rack" },
1151 { 89, "Number of Lugs in This Rack" },
1152 { 90, "DSP Version" },
1153 { 91, "AF Card Version Slot 1" },
1154 { 92, "AF Card Version Slot 2" },
1155 { 93, "AF Card Version Slot 3" },
1156 { 94, "AF Card Version Slot 4" },
1157 { 95, "HCS08 Version" },
1158 { 96, "FPGA Version" },
1159 { 97, "Upload Progress AF Card 1" },
1160 { 98, "Upload Progress AF Card 2" },
1161 { 99, "Upload Progress AF Card 3" },
1162 { 100, "Upload Progress AF Card 4" },
1163 { 0, NULL }
1165 static value_string_ext acn_blob_dimmer_rack_status_properties2_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_rack_status_properties2_field_name);
1167 static const value_string acn_blob_dimmer_status_properties2_field_name[] = {
1168 { 1, "System" },
1169 { 2, "Processor" },
1170 { 3, "Rack" },
1171 { 4, "Lug" },
1172 { 5, "Module" },
1173 { 6, "Station" },
1174 { 7, "Port" },
1175 { 8, "Subdevice" },
1176 { 9, "Space" },
1177 { 10, "UDN" },
1178 { 11, "Reserved" },
1179 { 12, "Source Winning Control" },
1180 { 13, "Priority of Winning Source" },
1181 { 14, "Winning Level" },
1182 { 15, "Winning DMX A Level" },
1183 { 16, "Winning DMX B Level" },
1184 { 17, "Winning sACN Level" },
1185 { 18, "Source Winning Control DD" },
1186 { 19, "Priority of Winning Source DD" },
1187 { 20, "Winning Level DD" },
1188 { 21, "Winning DMX A Level DD" },
1189 { 22, "Winning DMX B Level DD" },
1190 { 23, "Winning DMX sACN Level DD" },
1191 { 24, "Actual Load" },
1192 { 25, "Load Status" },
1193 { 0, NULL }
1195 static value_string_ext acn_blob_dimmer_status_properties2_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_status_properties2_field_name);
1198 static const value_string acn_blob_direct_control_operation_field_name[] = {
1199 { 1, "Space" },
1200 { 2, "Dimmer Number" },
1201 { 3, "DD Side" },
1202 { 4, "Level" },
1203 { 5, "Priority" },
1204 { 0, NULL }
1207 static const value_string acn_blob_error3_field_name[] = {
1208 { 1, "System" },
1209 { 2, "Processor" },
1210 { 3, "Rack" },
1211 { 4, "Lug" },
1212 { 5, "Module" },
1213 { 6, "Station" },
1214 { 7, "Port" },
1215 { 8, "Subdevice" },
1216 { 9, "Space" },
1217 { 10, "UDN" },
1218 { 11, "sACN Address" },
1219 { 12, "Error Type" },
1220 { 13, "Severity" },
1221 { 14, "Timestamp" },
1222 { 15, "Error Text" },
1223 { 0, NULL }
1226 static const value_string acn_blob_field_type_vals[] = {
1227 { ACN_BLOB_FIELD_TYPE1, "1 Byte Signed Integer" },
1228 { ACN_BLOB_FIELD_TYPE2, "2 Bytes Signed Integer" },
1229 { ACN_BLOB_FIELD_TYPE3, "4 Bytes Signed Integer" },
1230 { ACN_BLOB_FIELD_TYPE4, "8 Bytes Signed Integer" },
1231 { ACN_BLOB_FIELD_TYPE5, "1 Byte Unsigned Integer" },
1232 { ACN_BLOB_FIELD_TYPE6, "2 Bytes Unsigned Integer" },
1233 { ACN_BLOB_FIELD_TYPE7, "4 Bytes Unsigned Integer" },
1234 { ACN_BLOB_FIELD_TYPE8, "8 Bytes Unsigned Integer" },
1235 { ACN_BLOB_FIELD_TYPE9, "Float" },
1236 { ACN_BLOB_FIELD_TYPE10, "Double" },
1237 { ACN_BLOB_FIELD_TYPE11, "Variblob" },
1238 { ACN_BLOB_FIELD_TYPE12, "Ignore" },
1239 { 0, NULL }
1242 static const value_string acn_blob_generate_config_operation_field_name[] = {
1243 { 1, "First Dimmer" },
1244 { 2, "Numbering Style" },
1245 { 3, "Use Dimmer Doubling" },
1246 { 4, "Default Module Type" },
1247 { 0, NULL }
1250 static const value_string acn_blob_ip_field_name[] = {
1251 { 1, "IP Address" },
1252 { 2, "Subnet Mask" },
1253 { 3, "Gateway" },
1254 { 0, NULL }
1257 static const value_string acn_blob_error1_field_name[] = {
1258 { 1, "System" },
1259 { 2, "Processor" },
1260 { 3, "Rack" },
1261 { 4, "Lug" },
1262 { 5, "Module" },
1263 { 6, "Station" },
1264 { 7, "Port" },
1265 { 8, "Subdevice" },
1266 /*{9, "Space"}, */
1267 { 9, "UDN" },
1268 { 10, "sACN Address" },
1269 { 11, "Error Type" },
1270 { 12, "Severity" },
1271 { 13, "Timestamp" },
1272 { 14, "Error Text" },
1273 { 0, NULL }
1276 static const value_string acn_blob_error2_field_name[] = {
1277 { 1, "System" },
1278 { 2, "Processor" },
1279 { 3, "Rack" },
1280 { 4, "Lug" },
1281 { 5, "Module" },
1282 { 6, "Station" },
1283 { 7, "Port" },
1284 { 8, "Subdevice" },
1285 { 9, "Space" },
1286 { 10, "UDN" },
1287 { 11, "sACN Address" },
1288 { 12, "Error Type" },
1289 { 13, "Severity" },
1290 { 14, "Timestamp" },
1291 { 15, "Error Text" },
1292 { 0, NULL }
1295 static const value_string acn_blob_metadata_devices_field_name[] = {
1296 { 1, "Device Type" },
1297 { 2, "Identifier Name 1" },
1298 { 3, "Identifier Name 2" },
1299 { 4, "Identifier Name 3" },
1300 { 5, "Identifier Name 4" },
1301 { 0, NULL }
1304 static const value_string acn_blob_metadata_field_name[] = {
1305 { 1, "Device Type" },
1306 { 2, "Metadata Type" },
1307 { 3, "Identifier Name 1" },
1308 { 4, "Identifier Name 2" },
1309 { 5, "Identifier Name 3" },
1310 { 6, "Identifier Name 4" },
1311 { 7, "Metadata 1" },
1312 { 8, "Metadata 2" },
1313 { 9, "Metadata 3" },
1314 { 10, "Metadata 4" },
1315 { 11, "Metadata 5" },
1316 { 12, "Metadata 6" },
1317 { 13, "Metadata 7" },
1318 { 14, "Metadata 8" },
1319 { 15, "Device CID" },
1320 { 0, NULL }
1323 static const value_string acn_blob_metadata_types_field_name[] = {
1324 { 1, "Metadata Type" },
1325 { 2, "Identifier Name 1" },
1326 { 3, "Identifier Name 2" },
1327 { 4, "Identifier Name 3" },
1328 { 5, "Identifier Name 4" },
1329 { 6, "Identifier Name 5" },
1330 { 7, "Identifier Name 6" },
1331 { 8, "Identifier Name 7" },
1332 { 9, "Identifier Name 8" },
1333 { 0, NULL }
1336 static const value_string acn_blob_time1_field_name[] = {
1337 { 1, "Time" },
1338 { 2, "Time Zone Name" },
1339 { 3, "Time Zone Offset Hour" },
1340 { 4, "Time Zone Offset Min" },
1341 { 5, "Time Zone Offset Sec" },
1342 { 6, "DST Name" },
1343 { 7, "Start Month" },
1344 { 8, "Start Week" },
1345 { 9, "Start Day" },
1346 { 10, "End Month" },
1347 { 11, "End Week" },
1348 { 12, "End Day" },
1349 { 13, "Timed Event Update" },
1350 { 0, NULL }
1353 static const value_string acn_blob_dimmer_properties1_field_name[] = {
1354 { 1, "System" },
1355 { 2, "Processor" },
1356 { 3, "Rack" },
1357 { 4, "Lug" },
1358 { 5, "Module" },
1359 { 6, "Station" },
1360 { 7, "Port" },
1361 { 8, "Subdevice" },
1362 { 9, "Space" },
1363 { 10, "UDN" },
1364 { 11, "Reserved" },
1365 { 12, "Dimmer Name" },
1366 { 13, "Dimmer Module" },
1367 { 14, "Dimmer Mode" },
1368 { 15, "Dimmer Control" },
1369 { 16, "Dimmer Curve" },
1370 { 17, "On Level Percent" },
1371 { 18, "Off Level Percent" },
1372 { 19, "On Time(sec)" },
1373 { 20, "Off Time(sec)" },
1374 { 21, "Dimmer AF Enabled" },
1375 { 22, "Threshold" },
1376 { 23, "Min Scale" },
1377 { 24, "Unregulated Min Scale" },
1378 { 25, "Max Scale" },
1379 { 26, "Unregulated Max Scale" },
1380 { 27, "Voltage Regulation" },
1381 { 28, "Preheat Enable" },
1382 { 29, "Preheat Time" },
1383 { 30, "DC Output Prevent" },
1384 { 31, "Inrush Protect" },
1385 { 32, "AF Sensitivity" },
1386 { 33, "AF Reaction Time" },
1387 { 34, "Scale Load" },
1388 { 35, "PTIO" },
1389 { 36, "Allow In Preset" },
1390 { 37, "Allow In Panic" },
1391 { 38, "Allow In Panic DD" },
1392 /*{39, "Loads Reporting Mode"},
1393 {40, "New Dimmer Space Number"}, */
1394 { 39, "Report No Loads Enable" },
1395 { 40, "Loads Error Reporting Enable" },
1396 { 41, "Dimmer Space" },
1397 { 42, "New Dimmer Number" },
1398 { 43, "DMX A Patch" },
1399 { 44, "DMX B Patch" },
1400 { 45, "sACN Patch" },
1401 { 46, "DMX A Patch DD" },
1402 { 47, "DMX B Patch DD" },
1403 { 48, "sACN Patch DD" },
1404 { 0, NULL }
1406 static value_string_ext acn_blob_dimmer_properties1_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_properties1_field_name);
1408 static const value_string acn_blob_dimmer_load_properties1_field_name[] = {
1409 { 1, "System" },
1410 { 2, "Processor" },
1411 { 3, "Rack" },
1412 { 4, "Lug" },
1413 { 5, "Module" },
1414 { 6, "Station" },
1415 { 7, "Port" },
1416 { 8, "Subdevice" },
1417 { 9, "Space" },
1418 { 10, "UDN" },
1419 { 11, "Reserved" },
1420 { 12, "Is Load Recorded" },
1421 { 13, "Output Voltage Step 1" },
1422 { 14, "Output Voltage Step 2" },
1423 { 15, "Output Voltage Step 3" },
1424 { 16, "Output Voltage Step 4" },
1425 { 17, "Output Voltage Step 5" },
1426 { 18, "Output Voltage Step 6" },
1427 { 19, "Output Voltage Step 7" },
1428 { 20, "Output Voltage Step 8" },
1429 { 21, "Output Voltage Step 9" },
1430 { 22, "Output Voltage Step 10" },
1431 { 23, "Output Voltage Step 11" },
1432 { 24, "Output Voltage Step 12" },
1433 { 25, "Output Voltage Step 13" },
1434 { 26, "Output Voltage Step 14" },
1435 { 27, "Output Voltage Step 15" },
1436 { 28, "Output Voltage Step 16" },
1437 { 29, "Output Voltage Step 17" },
1438 { 30, "Output Voltage Step 18" },
1439 { 31, "Output Voltage Step 19" },
1440 { 32, "Output Voltage Step 20" },
1441 { 33, "Amperage Step 1" },
1442 { 34, "Amperage Step 2" },
1443 { 35, "Amperage Step 3" },
1444 { 36, "Amperage Step 4" },
1445 { 37, "Amperage Step 5" },
1446 { 38, "Amperage Step 6" },
1447 { 39, "Amperage Step 7" },
1448 { 40, "Amperage Step 8" },
1449 { 41, "Amperage Step 9" },
1450 { 42, "Amperage Step 10" },
1451 { 43, "Amperage Step 11" },
1452 { 44, "Amperage Step 12" },
1453 { 45, "Amperage Step 13" },
1454 { 46, "Amperage Step 14" },
1455 { 47, "Amperage Step 15" },
1456 { 48, "Amperage Step 16" },
1457 { 49, "Amperage Step 17" },
1458 { 50, "Amperage Step 18" },
1459 { 51, "Amperage Step 19" },
1460 { 52, "Amperage Step 20" },
1461 { 53, "Voltage Time Step 1" },
1462 { 54, "Voltage Time Step 2" },
1463 { 55, "Voltage Time Step 3" },
1464 { 56, "Voltage Time Step 4" },
1465 { 57, "Voltage Time Step 5" },
1466 { 58, "Voltage Time Step 6" },
1467 { 59, "Voltage Time Step 7" },
1468 { 60, "Voltage Time Step 8" },
1469 { 61, "Voltage Time Step 9" },
1470 { 62, "Voltage Time Step 10" },
1471 { 63, "Voltage Time Step 11" },
1472 { 64, "Voltage Time Step 12" },
1473 { 65, "Voltage Time Step 13" },
1474 { 66, "Voltage Time Step 14" },
1475 { 67, "Voltage Time Step 15" },
1476 { 68, "Voltage Time Step 16" },
1477 { 69, "Voltage Time Step 17" },
1478 { 70, "Voltage Time Step 18" },
1479 { 71, "Voltage Time Step 19" },
1480 { 72, "Voltage Time Step 20" },
1481 { 0, NULL }
1483 static value_string_ext acn_blob_dimmer_load_properties1_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_load_properties1_field_name);
1485 static const value_string acn_blob_dimmer_rack_properties1_field_name[] = {
1486 { 1, "System" },
1487 { 2, "Processor" },
1488 { 3, "Rack" },
1489 { 4, "Lug" },
1490 { 5, "Module" },
1491 { 6, "Station" },
1492 { 7, "Port" },
1493 { 8, "Subdevice" },
1494 { 9, "Space" },
1495 { 10, "UDN" },
1496 { 11, "Reserved" },
1497 { 12, "Rack CID" },
1498 { 13, "Rack Number" },
1499 { 14, "Rack Name" },
1500 { 15, "Rack Model" },
1501 { 16, "Rack AF Enable" },
1502 { 17, "Temperature Format" },
1503 { 18, "Data Loss Behavior DMX A" },
1504 { 19, "Data Loss Behavior DMX B" },
1505 { 20, "Data Loss Behavior sACN" },
1506 { 21, "Data Loss Cross/Wait Time DMX A" },
1507 { 22, "Data Loss Cross/Wait Time DMX B" },
1508 { 23, "Data Loss Wait Time sACN" },
1509 { 24, "Data Loss Fade Time DMX A" },
1510 { 25, "Data Loss Fade Time DMX B" },
1511 { 26, "Data Loss Fade Time sACN" },
1512 { 27, "Data Loss Preset DMX A" },
1513 { 28, "Data Loss Preset DMX B" },
1514 { 29, "Data Port Priority DMX A" },
1515 { 30, "Data Port Priority DMX B" },
1516 { 31, "Data Port Enabled DMX A" },
1517 { 32, "Data Port Enabled DMX B" },
1518 { 33, "Data Port Enabled sACN" },
1519 { 34, "16 Bit Enabled DMX A" },
1520 { 35, "16 Bit Enabled DMX B" },
1521 { 36, "16 Bit Enabled sACN" },
1522 { 37, "Patch From Home Screen" },
1523 { 38, "SCR Off Time" },
1524 { 39, "Time Mode" },
1525 { 40, "Offset from UTC" },
1526 { 41, "Universal Hold Last Look Time" },
1527 { 42, "Reactivate Presets On Boot" },
1528 { 43, "Voltage High Warning Level" },
1529 { 44, "Temperature High Warning Level" },
1530 { 45, "Fan Operation Timing" },
1531 { 46, "Allow Backplane Communication Errors" },
1532 { 0, NULL }
1534 static value_string_ext acn_blob_dimmer_rack_properties1_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_rack_properties1_field_name);
1537 static const value_string acn_blob_dimmer_rack_status_properties1_field_name[] = {
1538 { 1, "System" },
1539 { 2, "Processor" },
1540 { 3, "Rack" },
1541 { 4, "Lug" },
1542 { 5, "Module" },
1543 { 6, "Station" },
1544 { 7, "Port" },
1545 { 8, "Subdevice" },
1546 { 9, "Space" },
1547 { 10, "UDN" },
1548 { 11, "Reserved" },
1549 { 12, "CPU Temperature" },
1550 { 13, "Time of Last Reboot" },
1551 { 14, "Time Now" },
1552 { 15, "Rack Phasing" },
1553 { 16, "Power Frequency" },
1554 { 17, "Phase A Voltage" },
1555 { 18, "Phase B Voltage" },
1556 { 19, "Phase C Voltage" },
1557 { 20, "DMX A Port Status" },
1558 { 21, "DMX B Port Status" },
1559 { 22, "Rack AF State" },
1560 { 23, "Number of Stored Presets for This Rack" },
1561 { 24, "Number of Lugs in This Rack" },
1562 { 25, "DSP Version" },
1563 { 26, "AF Card Version Slot 1" },
1564 { 27, "AF Card Version Slot 2" },
1565 { 28, "AF Card Version Slot 3" },
1566 { 29, "AF Card Version Slot 4" },
1567 { 30, "HCS08 Version" },
1568 { 31, "FPGA Version" },
1569 { 32, "Upload Progress AF Card 1" },
1570 { 33, "Upload Progress AF Card 2" },
1571 { 34, "Upload Progress AF Card 3" },
1572 { 35, "Upload Progress AF Card 4" },
1573 { 0, NULL }
1575 static value_string_ext acn_blob_dimmer_rack_status_properties1_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_rack_status_properties1_field_name);
1577 static const value_string acn_blob_dimmer_status_properties1_field_name[] = {
1578 { 1, "System" },
1579 { 2, "Processor" },
1580 { 3, "Rack" },
1581 { 4, "Lug" },
1582 { 5, "Module" },
1583 { 6, "Station" },
1584 { 7, "Port" },
1585 { 8, "Subdevice" },
1586 { 9, "Space" },
1587 { 10, "UDN" },
1588 { 11, "Reserved" },
1589 { 12, "Source Winning Control" },
1590 { 13, "Priority of Winning Source" },
1591 { 14, "Winning Level" },
1592 { 15, "Winning DMX A Level" },
1593 { 16, "Winning DMX B Level" },
1594 { 17, "Winning sACN Level" },
1595 { 18, "Source Winning Control DD" },
1596 { 19, "Priority of Winning Source DD" },
1597 { 20, "Winning Level DD" },
1598 { 21, "Winning DMX A Level DD" },
1599 { 22, "Winning DMX B Level DD" },
1600 { 23, "Winning DMX sACN Level DD" },
1601 { 24, "Actual Load" },
1602 { 0, NULL }
1604 static value_string_ext acn_blob_dimmer_status_properties1_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_dimmer_status_properties1_field_name);
1606 static const value_string acn_blob_preset_operation_field_name[] = {
1607 { 1, "Operation Type" },
1608 { 2, "Preset Number" },
1609 { 3, "Space" },
1610 { 0, NULL }
1613 static const value_string acn_blob_preset_properties_field_name[] = {
1614 { 1, "System" },
1615 { 2, "Processor" },
1616 { 3, "Rack" },
1617 { 4, "Lug" },
1618 { 5, "Module" },
1619 { 6, "Station" },
1620 { 7, "Port" },
1621 { 8, "Subdevice" },
1622 { 9, "Space" },
1623 { 10, "UDN" },
1624 { 11, "Reserved" },
1625 { 12, "Preset Number" },
1626 { 13, "Preset Name" },
1627 { 14, "Fade In Time" },
1628 { 15, "Fade Out Time" },
1629 { 16, "Priority" },
1630 { 17, "Levels" },
1631 { 18, "Level[0]" },
1632 { 19, "Level[1]" },
1633 { 20, "Level[2]" },
1634 { 21, "Level[3]" },
1635 { 22, "Level[4]" },
1636 { 23, "Level[5]" },
1637 { 24, "Level[6]" },
1638 { 25, "Level[7]" },
1639 { 26, "Level[8]" },
1640 { 27, "Level[9]" },
1641 { 28, "Level[10]" },
1642 { 29, "Level[11]" },
1643 { 30, "Level[12]" },
1644 { 31, "Level[13]" },
1645 { 32, "Level[14]" },
1646 { 33, "Level[15]" },
1647 { 34, "Level[16]" },
1648 { 35, "Level[17]" },
1649 { 36, "Level[18]" },
1650 { 37, "Level[19]" },
1651 { 38, "Level[20]" },
1652 { 39, "Level[21]" },
1653 { 40, "Level[22]" },
1654 { 41, "Level[23]" },
1655 { 42, "Level[24]" },
1656 { 43, "Level[25]" },
1657 { 44, "Level[26]" },
1658 { 45, "Level[27]" },
1659 { 46, "Level[28]" },
1660 { 47, "Level[29]" },
1661 { 48, "Level[30]" },
1662 { 49, "Level[31]" },
1663 { 50, "Level[32]" },
1664 { 51, "Level[33]" },
1665 { 52, "Level[34]" },
1666 { 53, "Level[35]" },
1667 { 54, "Level[36]" },
1668 { 55, "Level[37]" },
1669 { 56, "Level[38]" },
1670 { 57, "Level[39]" },
1671 { 58, "Level[40]" },
1672 { 59, "Level[41]" },
1673 { 60, "Level[42]" },
1674 { 61, "Level[43]" },
1675 { 62, "Level[44]" },
1676 { 63, "Level[45]" },
1677 { 64, "Level[46]" },
1678 { 65, "Level[47]" },
1679 { 66, "Level[48]" },
1680 { 67, "Level[49]" },
1681 { 68, "Level[50]" },
1682 { 69, "Level[51]" },
1683 { 70, "Level[52]" },
1684 { 71, "Level[53]" },
1685 { 72, "Level[54]" },
1686 { 73, "Level[55]" },
1687 { 74, "Level[56]" },
1688 { 75, "Level[57]" },
1689 { 76, "Level[58]" },
1690 { 77, "Level[59]" },
1691 { 78, "Level[60]" },
1692 { 79, "Level[61]" },
1693 { 80, "Level[62]" },
1694 { 81, "Level[63]" },
1695 { 82, "Level[64]" },
1696 { 83, "Level[65]" },
1697 { 84, "Level[66]" },
1698 { 85, "Level[67]" },
1699 { 86, "Level[68]" },
1700 { 87, "Level[69]" },
1701 { 88, "Level[70]" },
1702 { 89, "Level[71]" },
1703 { 90, "Level[72]" },
1704 { 91, "Level[73]" },
1705 { 92, "Level[74]" },
1706 { 93, "Level[75]" },
1707 { 94, "Level[76]" },
1708 { 95, "Level[77]" },
1709 { 96, "Level[78]" },
1710 { 97, "Level[79]" },
1711 { 98, "Level[80]" },
1712 { 99, "Level[81]" },
1713 { 100, "Level[82]" },
1714 { 101, "Level[83]" },
1715 { 102, "Level[84]" },
1716 { 103, "Level[85]" },
1717 { 104, "Level[86]" },
1718 { 105, "Level[87]" },
1719 { 106, "Level[88]" },
1720 { 107, "Level[89]" },
1721 { 108, "Level[90]" },
1722 { 109, "Level[91]" },
1723 { 110, "Level[92]" },
1724 { 111, "Level[93]" },
1725 { 112, "Level[94]" },
1726 { 113, "Level[95]" },
1727 { 114, "Level[96]" },
1728 { 115, "Level[97]" },
1729 { 116, "Level[98]" },
1730 { 117, "Level[99]" },
1731 { 118, "Level[100]" },
1732 { 119, "Level[101]" },
1733 { 120, "Level[102]" },
1734 { 121, "Level[103]" },
1735 { 122, "Level[104]" },
1736 { 123, "Level[105]" },
1737 { 124, "Level[106]" },
1738 { 125, "Level[107]" },
1739 { 126, "Level[108]" },
1740 { 127, "Level[109]" },
1741 { 128, "Level[110]" },
1742 { 129, "Level[111]" },
1743 { 130, "Level[112]" },
1744 { 131, "Level[113]" },
1745 { 132, "Level[114]" },
1746 { 133, "Level[115]" },
1747 { 134, "Level[116]" },
1748 { 135, "Level[117]" },
1749 { 136, "Level[118]" },
1750 { 137, "Level[119]" },
1751 { 138, "Level[120]" },
1752 { 139, "Level[121]" },
1753 { 140, "Level[122]" },
1754 { 141, "Level[123]" },
1755 { 142, "Level[124]" },
1756 { 143, "Level[125]" },
1757 { 144, "Level[126]" },
1758 { 145, "Level[127]" },
1759 { 146, "Level[128]" },
1760 { 147, "Level[129]" },
1761 { 148, "Level[130]" },
1762 { 149, "Level[131]" },
1763 { 150, "Level[132]" },
1764 { 151, "Level[133]" },
1765 { 152, "Level[134]" },
1766 { 153, "Level[135]" },
1767 { 154, "Level[136]" },
1768 { 155, "Level[137]" },
1769 { 156, "Level[138]" },
1770 { 157, "Level[139]" },
1771 { 158, "Level[140]" },
1772 { 159, "Level[141]" },
1773 { 160, "Level[142]" },
1774 { 161, "Level[143]" },
1775 { 162, "Level[144]" },
1776 { 163, "Level[145]" },
1777 { 164, "Level[146]" },
1778 { 165, "Level[147]" },
1779 { 166, "Level[148]" },
1780 { 167, "Level[149]" },
1781 { 168, "Level[150]" },
1782 { 169, "Level[151]" },
1783 { 170, "Level[152]" },
1784 { 171, "Level[153]" },
1785 { 172, "Level[154]" },
1786 { 173, "Level[155]" },
1787 { 174, "Level[156]" },
1788 { 175, "Level[157]" },
1789 { 176, "Level[158]" },
1790 { 177, "Level[159]" },
1791 { 178, "Level[160]" },
1792 { 179, "Level[161]" },
1793 { 180, "Level[162]" },
1794 { 181, "Level[163]" },
1795 { 182, "Level[164]" },
1796 { 183, "Level[165]" },
1797 { 184, "Level[166]" },
1798 { 185, "Level[167]" },
1799 { 186, "Level[168]" },
1800 { 187, "Level[169]" },
1801 { 188, "Level[170]" },
1802 { 189, "Level[171]" },
1803 { 190, "Level[172]" },
1804 { 191, "Level[173]" },
1805 { 192, "Level[174]" },
1806 { 193, "Level[175]" },
1807 { 194, "Level[176]" },
1808 { 195, "Level[177]" },
1809 { 196, "Level[178]" },
1810 { 197, "Level[179]" },
1811 { 198, "Level[180]" },
1812 { 199, "Level[181]" },
1813 { 200, "Level[182]" },
1814 { 201, "Level[183]" },
1815 { 202, "Level[184]" },
1816 { 203, "Level[185]" },
1817 { 204, "Level[186]" },
1818 { 205, "Level[187]" },
1819 { 206, "Level[188]" },
1820 { 207, "Level[189]" },
1821 { 208, "Level[190]" },
1822 { 209, "Level[191]" },
1823 { 0, NULL }
1825 static value_string_ext acn_blob_preset_properties_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_preset_properties_field_name);
1827 static const value_string acn_blob_range_type_vals[] = {
1828 { ACN_BLOB_RANGE_MID, "Middle range Blob" },
1829 { ACN_BLOB_RANGE_START, "Start range Blob" },
1830 { ACN_BLOB_RANGE_END, "End Range Blob" },
1831 { ACN_BLOB_RANGE_SINGLE, "Single Blob" },
1832 { 0, NULL }
1835 static const value_string acn_blob_set_levels_operation_field_name[] = {
1836 { 1, "Start Dimmer Address" },
1837 { 2, "End Dimmer Address" },
1838 { 3, "DD Side" },
1839 { 4, "Space" },
1840 { 5, "Level" },
1841 { 0, NULL }
1844 static const value_string acn_blob_time2_field_name[] = {
1845 { 1, "Time" },
1846 { 2, "Time Zone Name" },
1847 { 3, "Time Zone Offset Hour" },
1848 { 4, "Time Zone Offset Min" },
1849 { 5, "Time Zone Offset Sec" },
1850 { 6, "DST Name" },
1851 { 7, "Start Month" },
1852 { 8, "Start Week" },
1853 { 9, "Start Day" },
1854 { 10, "End Month" },
1855 { 11, "End Week" },
1856 { 12, "End Day" },
1857 { 13, "Timed Event Update" },
1858 { 14, "Unix Time Zone Environment-compatible Name" },
1859 { 0, NULL }
1862 static const value_string acn_blob_rpc_field_name[] = {
1863 { 1, "Command" },
1864 { 2, "Transaction ID" },
1865 { 3, "Number of Arguments" },
1866 { 4, "Argument" },
1867 { 0, NULL }
1870 static const value_string acn_blob_dhcp_config_subnet_field_name[] = {
1871 { 1, "Command" },
1872 { 2, "Subnet" },
1873 { 3, "Netmask" },
1874 { 4, "Given Next Server" },
1875 { 5, "Given Router" },
1876 { 6, "Given Netmask" },
1877 { 7, "Default Lease Time" },
1878 { 8, "Max Lease Time" },
1879 { 9, "Given Domain Name" },
1880 { 10, "Given DNS Servers" },
1881 { 11, "Given NTP Server" },
1882 { 12, "Given Time Zone Offset Hour" },
1883 { 13, "Given Time Zone Offset Minute" },
1884 { 14, "Given Time Zone Offset Second" },
1885 { 15, "Given Time Zone DST Name" },
1886 { 16, "Given Time Zone Start Month" },
1887 { 17, "Given Time Zone Start Week" },
1888 { 18, "Given Time Zone Start Day" },
1889 { 19, "Given Time Zone End Month" },
1890 { 20, "Given Time Zone End Week" },
1891 { 21, "Given Time Zone End Day" },
1892 { 22, "Given UNIX Timezone Name" },
1893 { 0, NULL }
1896 static const value_string acn_blob_dhcp_config_static_route_field_name[] = {
1897 { 1, "Command" },
1898 { 2, "Subnet" },
1899 { 3, "Netmask" },
1900 { 4, "MAC Address" },
1901 { 5, "Host Name" },
1902 { 6, "Address" },
1903 { 0, NULL }
1906 static const value_string acn_blob_energy_management_field_name[] = {
1907 { 1, "Project ID" },
1908 { 2, "Space" },
1909 { 3, "Circuit Power Count" },
1910 { 4, "Circuit" },
1911 { 5, "Power" },
1912 { 6, "Shed Actual" },
1913 { 7, "Shed Potential" },
1914 { 0, NULL }
1917 static const value_string acn_blob_time3_field_name[] = {
1918 { 1, "Time" },
1919 { 2, "Time Zone Index" },
1920 { 3, "City" },
1921 { 4, "Country" },
1922 { 5, "Longitude" },
1923 { 6, "Latitude" },
1924 { 7, "UTC Offset Hours" },
1925 { 8, "UTC Offset Minutes" },
1926 { 9, "Time Zone Name" },
1927 { 10, "DST Type" },
1928 { 11, "DST Start Month" },
1929 { 12, "DST Start Week" },
1930 { 13, "DST Start Day" },
1931 { 14, "DST Start Hours" },
1932 { 15, "DST Start Minutes" },
1933 { 16, "DST Start Locality" },
1934 { 17, "DST Stop Month" },
1935 { 18, "DST Stop Week" },
1936 { 19, "DST Stop Day" },
1937 { 20, "DST Stop Hours" },
1938 { 21, "DST Stop Minutes" },
1939 { 22, "DST Stop Locality" },
1940 { 23, "Timed Event Update" },
1941 { 0, NULL }
1944 static const value_string acn_blob_time3_time_zone_vals[] = {
1945 { 0, "Aalborg, Denmark - Central European Standard Time : (UTC+01:00)" },
1946 { 1, "Aberdeen, United Kingdom - Greenwich Mean Time : (UTC)" },
1947 { 2, "Abu Dhabi, United Arab Emirates - Gulf Standard Time : (UTC+04:00)" },
1948 { 3, "Abuja, Nigeria - West Africa Time : (UTC+01:00)" },
1949 { 4, "Accra, Ghana - Greenwich Mean Time : (UTC)" },
1950 { 5, "Addis Ababa, Ethiopia - Eastern Africa Standard Time : (UTC+03:00)" },
1951 { 6, "Adelaide, SA, Australia - Australian Central Standard Time : (UTC+09:30)" },
1952 { 7, "Agana, GU, Guam - Chamorro Standard Time : (UTC+10:00)" },
1953 { 8, "Ahmadabad, India - India Standard Time : (UTC+05:30)" },
1954 { 9, "Akita, Japan - Japan Standard Time : (UTC+09:00)" },
1955 { 10, "Akron, OH, USA - Eastern Standard Time : (UTC-05:00)" },
1956 { 11, "Albuquerque, NM, USA - Mountain Standard Time : (UTC-07:00)" },
1957 { 12, "Alexandria, VA, USA - Eastern Standard Time : (UTC-05:00)" },
1958 { 13, "Algiers, Algeria - Central European Standard Time : (UTC+01:00)" },
1959 { 14, "Allentown, PA, USA - Eastern Standard Time : (UTC-05:00)" },
1960 { 15, "Almaty, Kazakhstan - Alma-Ata Time : (UTC+06:00)" },
1961 { 16, "Amman, Jordan - Arabia Standard Time : (UTC+03:00)" },
1962 { 17, "Amsterdam, Netherlands - Central European Standard Time : (UTC+01:00)" },
1963 { 18, "Anaheim, CA, USA - Pacific Standard Time : (UTC-08:00)" },
1964 { 19, "Anchorage, AK, USA - Alaska Standard Time : (UTC-09:00)" },
1965 { 20, "Andorra la Vella, Andorra - Central European Standard Time : (UTC+01:00)" },
1966 { 21, "Angers, France - Central European Standard Time : (UTC+01:00)" },
1967 { 22, "Ankara, Turkey - Eastern European Standard Time : (UTC+02:00)" },
1968 { 23, "Ann Arbor, MI, USA - Eastern Standard Time : (UTC-05:00)" },
1969 { 24, "Antananarivo, Madagascar - Eastern Africa Standard Time : (UTC+03:00)" },
1970 { 25, "Antwerp, Belgium - Central European Standard Time : (UTC+01:00)" },
1971 { 26, "Apia, Samoa - West Samoa Time : (UTC+14:00)" },
1972 { 27, "Ashgabat, Turkmenistan - Turkmenistan Time : (UTC+05:00)" },
1973 { 28, "Asmara, Eritrea - Eastern Africa Standard Time : (UTC+03:00)" },
1974 { 29, "Athens, Greece - Eastern European Standard Time : (UTC+02:00)" },
1975 { 30, "Atlanta, GA, USA - Eastern Standard Time : (UTC-05:00)" },
1976 { 31, "Auckland, New Zealand - New Zealand Standard Time : (UTC+12:00)" },
1977 { 32, "Austin, TX, USA - Central Standard Time : (UTC-06:00)" },
1978 { 33, "Badajoz, Spain - Central European Standard Time : (UTC+01:00)" },
1979 { 34, "Baghdad, Iraq - Arabia Standard Time : (UTC+03:00)" },
1980 { 35, "Bakersfield, CA, USA - Pacific Standard Time : (UTC-08:00)" },
1981 { 36, "Baku, Azerbaijan - Azerbaijan Time : (UTC+04:00)" },
1982 { 37, "Baltimore, MD, USA - Eastern Standard Time : (UTC-05:00)" },
1983 { 38, "Bamako, Mali - Greenwich Mean Time : (UTC)" },
1984 { 39, "Bandar Seri Begawan, Brunei - Brunei Darussalam Time : (UTC+08:00)" },
1985 { 40, "Bangalore, India - India Standard Time : (UTC+05:30)" },
1986 { 41, "Bangkok, Thailand - Indochina Time : (UTC+07:00)" },
1987 { 42, "Bangui, Central African Republic - West Africa Time : (UTC+01:00)" },
1988 { 43, "Banjul, Gambia - Greenwich Mean Time : (UTC)" },
1989 { 44, "Barcelona, Spain - Central European Standard Time : (UTC+01:00)" },
1990 { 45, "Bari, Italy - Central European Standard Time : (UTC+01:00)" },
1991 { 46, "Baton Rouge, LA, USA - Central Standard Time : (UTC-06:00)" },
1992 { 47, "Beaumont, TX, USA - Central Standard Time : (UTC-06:00)" },
1993 { 48, "Beijing, China - China Standard Time : (UTC+08:00)" },
1994 { 49, "Beirut, Lebanon - Eastern European Standard Time : (UTC+02:00)" },
1995 { 50, "Belem, Brazil - Brasilia Time : (UTC-03:00)" },
1996 { 51, "Belfast, United Kingdom - Greenwich Mean Time : (UTC)" },
1997 { 52, "Belgrade, Serbia - Central European Standard Time : (UTC+01:00)" },
1998 { 53, "Belmopan, Belize - Central Standard Time : (UTC-06:00)" },
1999 { 54, "Belo Horizonte, Brazil - Brasilia Time : (UTC-03:00)" },
2000 { 55, "Bergen, Norway - Central European Standard Time : (UTC+01:00)" },
2001 { 56, "Berkeley, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2002 { 57, "Berlin, Germany - Central European Standard Time : (UTC+01:00)" },
2003 { 58, "Bern, Switzerland - Central European Standard Time : (UTC+01:00)" },
2004 { 59, "Birmingham, AL, USA - Central Standard Time : (UTC-06:00)" },
2005 { 60, "Birmingham, United Kingdom - Greenwich Mean Time : (UTC)" },
2006 { 61, "Bishkek, Kyrgyzstan - Kyrgyzstan Time : (UTC+06:00)" },
2007 { 62, "Bissau, Guinea-Bissau - Greenwich Mean Time : (UTC)" },
2008 { 63, "Boise, ID, USA - Mountain Standard Time : (UTC-07:00)" },
2009 { 64, "Bologna, Italy - Central European Standard Time : (UTC+01:00)" },
2010 { 65, "Bonn, Germany - Central European Standard Time : (UTC+01:00)" },
2011 { 66, "Bordeaux, France - Central European Standard Time : (UTC+01:00)" },
2012 { 67, "Boston, MA, USA - Eastern Standard Time : (UTC-05:00)" },
2013 { 68, "Bournemouth, United Kingdom - Greenwich Mean Time : (UTC)" },
2014 { 69, "Brasilia, Brazil - Brasilia Time : (UTC-03:00)" },
2015 { 70, "Bratislava, Slovakia - Central European Standard Time : (UTC+01:00)" },
2016 { 71, "Brazzaville, Republic of the Congo - West Africa Time : (UTC+01:00)" },
2017 { 72, "Bremen, Germany - Central European Standard Time : (UTC+01:00)" },
2018 { 73, "Brest, France - Central European Standard Time : (UTC+01:00)" },
2019 { 74, "Bridgeport, CT, USA - Eastern Standard Time : (UTC-05:00)" },
2020 { 75, "Bridgetown, Barbados - Atlantic Standard Time : (UTC-04:00)" },
2021 { 76, "Brisbane, QLD, Australia - Australian Eastern Standard Time : (UTC+10:00)" },
2022 { 77, "Brno, Czech Republic - Central European Standard Time : (UTC+01:00)" },
2023 { 78, "Brussels, Belgium - Central European Standard Time : (UTC+01:00)" },
2024 { 79, "Bucharest, Romania - Eastern European Standard Time : (UTC+02:00)" },
2025 { 80, "Budapest, Hungary - Central European Standard Time : (UTC+01:00)" },
2026 { 81, "Buenos Aires, Argentina - Argentina Time : (UTC-03:00)" },
2027 { 82, "Buffalo, NY, USA - Eastern Standard Time : (UTC-05:00)" },
2028 { 83, "Bujumbura, Burundi - South Africa Standard Time : (UTC+02:00)" },
2029 { 84, "Cagliari, Italy - Central European Standard Time : (UTC+01:00)" },
2030 { 85, "Cairo, Egypt - Eastern European Standard Time : (UTC+02:00)" },
2031 { 86, "Calgary, AB, Canada - Mountain Standard Time : (UTC-07:00)" },
2032 { 87, "Cali, Colombia - Colombia Time : (UTC-05:00)" },
2033 { 88, "Canberra, Australia - Australian Eastern Standard Time : (UTC+10:00)" },
2034 { 89, "Cape Town, South Africa - South Africa Standard Time : (UTC+02:00)" },
2035 { 90, "Caracas, Venezuela - Venezuelan Standard Time : (UTC-04:30)" },
2036 { 91, "Cardiff, United Kingdom - Greenwich Mean Time : (UTC)" },
2037 { 92, "Cedar Rapids, IA, USA - Central Standard Time : (UTC-06:00)" },
2038 { 93, "Charlotte, NC, USA - Eastern Standard Time : (UTC-05:00)" },
2039 { 94, "Charlottetown, PE, Canada - Atlantic Standard Time : (UTC-04:00)" },
2040 { 95, "Chatham Islands, Chatham Islands, New Zealand - Chatham Island Standard Time : (UTC+12:45)" },
2041 { 96, "Chengdu, China - China Standard Time : (UTC+08:00)" },
2042 { 97, "Chennai, India - India Standard Time : (UTC+05:30)" },
2043 { 98, "Chiba, Japan - Japan Standard Time : (UTC+09:00)" },
2044 { 99, "Chicago, IL, USA - Central Standard Time : (UTC-06:00)" },
2045 { 100, "Chisinau, Moldova - Eastern European Standard Time : (UTC+02:00)" },
2046 { 101, "Chongqing, China - China Standard Time : (UTC+08:00)" },
2047 { 102, "Cincinnati, OH, USA - Eastern Standard Time : (UTC-05:00)" },
2048 { 103, "Cleveland, OH, USA - Eastern Standard Time : (UTC-05:00)" },
2049 { 104, "Colorado Springs, CO, USA - Mountain Standard Time : (UTC-07:00)" },
2050 { 105, "Columbus, GA, USA - Eastern Standard Time : (UTC-05:00)" },
2051 { 106, "Columbus, OH, USA - Eastern Standard Time : (UTC-05:00)" },
2052 { 107, "Conakry, Guinea - Greenwich Mean Time : (UTC)" },
2053 { 108, "Copenhagen, Denmark - Central European Standard Time : (UTC+01:00)" },
2054 { 109, "Cork, Ireland - Greenwich Mean Time : (UTC)" },
2055 { 110, "Corpus Christi, TX, USA - Central Standard Time : (UTC-06:00)" },
2056 { 111, "Curitiba, Brazil - Brasilia Time : (UTC-03:00)" },
2057 { 112, "Dakar, Senegal - Greenwich Mean Time : (UTC)" },
2058 { 113, "Dallas, TX, USA - Central Standard Time : (UTC-06:00)" },
2059 { 114, "Damascus, Syria - Eastern European Standard Time : (UTC+02:00)" },
2060 { 115, "Dar es Salaam, Tanzania - Eastern Africa Standard Time : (UTC+03:00)" },
2061 { 116, "Darwin, NT, Australia - Australian Central Standard Time : (UTC+09:30)" },
2062 { 117, "Dayton, OH, USA - Eastern Standard Time : (UTC-05:00)" },
2063 { 118, "Delhi, India - India Standard Time : (UTC+05:30)" },
2064 { 119, "Denver, CO, USA - Mountain Standard Time : (UTC-07:00)" },
2065 { 120, "Des Moines, IA, USA - Central Standard Time : (UTC-06:00)" },
2066 { 121, "Detroit, MI, USA - Eastern Standard Time : (UTC-05:00)" },
2067 { 122, "Dhaka, Bangladesh - Central Asia Standard Time : (UTC+06:00)" },
2068 { 123, "Dijon, France - Romance Standard Time : (UTC+01:00)" },
2069 { 124, "Djibouti, Djibouti - Eastern Africa Standard Time : (UTC+03:00)" },
2070 { 125, "Doha, Qatar - Arabia Standard Time : (UTC+03:00)" },
2071 { 126, "Dortmund, Germany - Central European Standard Time : (UTC+01:00)" },
2072 { 127, "Dresden, Germany - Central European Standard Time : (UTC+01:00)" },
2073 { 128, "Dublin, Ireland - Greenwich Mean Time : (UTC)" },
2074 { 129, "Dushanbe, Tajikistan - Tajikistan Time : (UTC+05:00)" },
2075 { 130, "Dusseldorf, Germany - Central European Standard Time : (UTC+01:00)" },
2076 { 131, "Edinburgh, United Kingdom - Greenwich Mean Time : (UTC)" },
2077 { 132, "Edmonton, AB, Canada - Mountain Standard Time : (UTC-07:00)" },
2078 { 133, "El Paso, TX, USA - Mountain Standard Time : (UTC-07:00)" },
2079 { 134, "Erfurt, Germany - Central European Standard Time : (UTC+01:00)" },
2080 { 135, "Eucla, WA, Australia - Australian Central Western Standard Time : (UTC+08:45)" },
2081 { 136, "Eugene, OR, USA - Pacific Standard Time : (UTC-08:00)" },
2082 { 137, "Evansville, IN, USA - Eastern Standard Time : (UTC-05:00)" },
2083 { 138, "Florence, Italy - Central European Standard Time : (UTC+01:00)" },
2084 { 139, "Fort Defiance, AZ, USA - Mountain Standard Time : (UTC-07:00)" },
2085 { 140, "Fort Lauderdale, FL, USA - Eastern Standard Time : (UTC-05:00)" },
2086 { 141, "Fort Wayne, IN, USA - Eastern Standard Time : (UTC-05:00)" },
2087 { 142, "Fort Worth, TX, USA - Central Standard Time : (UTC-06:00)" },
2088 { 143, "Fortaleza, Brazil - Brasilia Time : (UTC-03:00)" },
2089 { 144, "Frankfurt, Germany - Central European Standard Time : (UTC+01:00)" },
2090 { 145, "Freetown, Sierra Leone - Greenwich Mean Time : (UTC)" },
2091 { 146, "Freiburg, Germany - Central European Standard Time : (UTC+01:00)" },
2092 { 147, "Fremont, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2093 { 148, "Fresno, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2094 { 149, "Fukuoka, Japan - Japan Standard Time : (UTC+09:00)" },
2095 { 150, "Gaborone, Botswana - Central Africa Time : (UTC+02:00)" },
2096 { 151, "Galway, Ireland - Greenwich Mean Time : (UTC)" },
2097 { 152, "Geneva, Switzerland - Central European Standard Time : (UTC+01:00)" },
2098 { 153, "Genova, Italy - Central European Standard Time : (UTC+01:00)" },
2099 { 154, "George Town, Cayman Islands - Eastern Standard Time : (UTC-05:00)" },
2100 { 155, "Georgetown, Guyana - Guyana Time : (UTC-04:00)" },
2101 { 156, "Glasgow, United Kingdom - Greenwich Mean Time : (UTC)" },
2102 { 157, "Glendale, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2103 { 158, "Granada, Spain - Central European Standard Time : (UTC+01:00)" },
2104 { 159, "Grand Rapids, MI, USA - Eastern Standard Time : (UTC-05:00)" },
2105 { 160, "Guadalajara, Mexico - Central Standard Time : (UTC-06:00)" },
2106 { 161, "Guangzhou, China - China Standard Time : (UTC+08:00)" },
2107 { 162, "Guatemala City, Guatemala - Central Standard Time : (UTC-06:00)" },
2108 { 163, "Haikou, China - China Standard Time : (UTC+08:00)" },
2109 { 164, "Halifax, NS, Canada - Atlantic Standard Time : (UTC-04:00)" },
2110 { 165, "Hamburg, Germany - Central European Standard Time : (UTC+01:00)" },
2111 { 166, "Hamilton, Bermuda - Atlantic Standard Time : (UTC-04:00)" },
2112 { 167, "Hannover, Germany - Central European Standard Time : (UTC+01:00)" },
2113 { 168, "Hanoi, Vietnam - Indochina Time : (UTC+07:00)" },
2114 { 169, "Harare, Zimbabwe - Central Africa Time : (UTC+02:00)" },
2115 { 170, "Harbin, China - China Standard Time : (UTC+08:00)" },
2116 { 171, "Hartford, CT, USA - Eastern Standard Time : (UTC-05:00)" },
2117 { 172, "Havana, Cuba - Cuba Standard Time : (UTC-05:00)" },
2118 { 173, "Helsinki, Finland - Eastern European Standard Time : (UTC+02:00)" },
2119 { 174, "Hiroshima, Japan - Japan Standard Time : (UTC+09:00)" },
2120 { 175, "Hobart, TAS, Australia - Australian Eastern Standard Time : (UTC+10:00)" },
2121 { 176, "Hong Kong SAR, China - China Standard Time : (UTC+08:00)" },
2122 { 177, "Honiara, Solomon Islands - Solomon Islands Time : (UTC+11:00)" },
2123 { 178, "Honolulu, HI, USA - Hawaii-Aleutian Standard Time : (UTC-10:00)" },
2124 { 179, "Houston, TX, USA - Central Standard Time : (UTC-06:00)" },
2125 { 180, "Hull, PQ, Canada - Eastern Standard Time : (UTC-05:00)" },
2126 { 181, "Huntsville, AL, USA - Central Standard Time : (UTC-06:00)" },
2127 { 182, "Indianapolis, IN, USA - Eastern Standard Time : (UTC-05:00)" },
2128 { 183, "Irkutsk, Russia - Irkutsk Time : (UTC+08:00)" },
2129 { 184, "Islamabad, Pakistan - Pakistan Standard Time : (UTC+05:00)" },
2130 { 185, "Istanbul, Turkey - Eastern European Standard Time : (UTC+02:00)" },
2131 { 186, "Jackson, MS, USA - Central Standard Time : (UTC-06:00)" },
2132 { 187, "Jacksonville, FL, USA - Eastern Standard Time : (UTC-05:00)" },
2133 { 188, "Jakarta, Indonesia - Western Indonesian Time : (UTC+07:00)" },
2134 { 189, "Jerusalem, Israel - Israel Standard Time : (UTC+02:00)" },
2135 { 190, "Kabul, Afghanistan - Afghanistan Standard Time : (UTC+04:30)" },
2136 { 191, "Kampala, Uganda - Eastern Africa Standard Time : (UTC+03:00)" },
2137 { 192, "Kanazawa, Japan - Japan Standard Time : (UTC+09:00)" },
2138 { 193, "Kansas City, KS, USA - Central Standard Time : (UTC-06:00)" },
2139 { 194, "Kansas City, MO, USA - Central Standard Time : (UTC-06:00)" },
2140 { 195, "Karachi, Pakistan - Pakistan Standard Time : (UTC+05:00)" },
2141 { 196, "Kathmandu, Nepal - Nepal Standard Time : (UTC+05:45)" },
2142 { 197, "Kelowna, BC, Canada - Pacific Standard Time : (UTC-08:00)" },
2143 { 198, "Khartoum, Sudan - Eastern Africa Standard Time : (UTC+03:00)" },
2144 { 199, "Kiev, Ukraine - Eastern European Standard Time : (UTC+02:00)" },
2145 { 200, "Kigali, Rwanda - Central Africa Time : (UTC+02:00)" },
2146 { 201, "Kingston, Jamaica - Eastern Standard Time : (UTC-05:00)" },
2147 { 202, "Kingston, Norfolk Island - Norfolk Time : (UTC+11:30)" },
2148 { 203, "Kinshasa, Democratic Republic of the Congo - West Africa Time : (UTC+01:00)" },
2149 { 204, "Kiritimati, Christmas Island, Kiribati - Line Islands Time : (UTC+14:00)" },
2150 { 205, "Knoxville, TN, USA - Eastern Standard Time : (UTC-05:00)" },
2151 { 206, "Kobe, Japan - Japan Standard Time : (UTC+09:00)" },
2152 { 207, "Kochi, Japan - Japan Standard Time : (UTC+09:00)" },
2153 { 208, "Kolkata (Calcutta), India - India Standard Time : (UTC+05:30)" },
2154 { 209, "Krasnoyarsk, Russia - Krasnoyarsk Time : (UTC+07:00)" },
2155 { 210, "Kuala Lumpur, Malaysia - Singapore Standard Time : (UTC+08:00)" },
2156 { 211, "Kuwait, Kuwait - Arabia Standard Time : (UTC+03:00)" },
2157 { 212, "Kwangju, Korea - Korea Standard Time : (UTC+09:00)" },
2158 { 213, "Kyoto, Japan - Japan Standard Time : (UTC+09:00)" },
2159 { 214, "La Paz, Bolivia - Bolivia Time : (UTC-04:00)" },
2160 { 215, "Lansing, MI, USA - Eastern Standard Time : (UTC-05:00)" },
2161 { 216, "Laredo, TX, USA - Central Standard Time : (UTC-06:00)" },
2162 { 217, "Las Vegas, NV, USA - Pacific Standard Time : (UTC-08:00)" },
2163 { 218, "Leipzig, Germany - Central European Standard Time : (UTC+01:00)" },
2164 { 219, "Lexington, KY, USA - Eastern Standard Time : (UTC-05:00)" },
2165 { 220, "Lhasa, China - China Standard Time : (UTC+08:00)" },
2166 { 221, "Libreville, Gabon - West Africa Time : (UTC+01:00)" },
2167 { 222, "Lille, France - Central European Standard Time : (UTC+01:00)" },
2168 { 223, "Lilongwe, Malawi - Central Africa Time : (UTC+02:00)" },
2169 { 224, "Lima, Peru - Peru Time : (UTC-05:00)" },
2170 { 225, "Limerick, Ireland - Greenwich Mean Time : (UTC)" },
2171 { 226, "Limoges, France - Central European Standard Time : (UTC+01:00)" },
2172 { 227, "Lincoln, NE, USA - Central Standard Time : (UTC-06:00)" },
2173 { 228, "Lisbon, Portugal - Greenwich Mean Time : (UTC)" },
2174 { 229, "Little Rock, AR, USA - Central Standard Time : (UTC-06:00)" },
2175 { 230, "Liverpool, United Kingdom - Greenwich Mean Time : (UTC)" },
2176 { 231, "Ljubljana, Slovenia - Central European Standard Time : (UTC+01:00)" },
2177 { 232, "London, United Kingdom - Greenwich Mean Time : (UTC)" },
2178 { 233, "Londonderry, United Kingdom - Greenwich Mean Time : (UTC)" },
2179 { 234, "Long Beach, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2180 { 235, "Lord Howe Island, Lord Howe Island, Australia - Lord Howe Standard Time : (UTC+10:30)" },
2181 { 236, "Los Angeles, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2182 { 237, "Louisville, KY, USA - Eastern Standard Time : (UTC-05:00)" },
2183 { 238, "Luanda, Angola - West Africa Time : (UTC+01:00)" },
2184 { 239, "Lubbock, TX, USA - Central Standard Time : (UTC-06:00)" },
2185 { 240, "Lusaka, Zambia - Central Africa Time : (UTC+02:00)" },
2186 { 241, "Luxembourg, Luxembourg - Central European Standard Time : (UTC+01:00)" },
2187 { 242, "Lyon, France - Central European Standard Time : (UTC+01:00)" },
2188 { 243, "Madison, WI, USA - Central Standard Time : (UTC-06:00)" },
2189 { 244, "Madrid, Spain - Central European Standard Time : (UTC+01:00)" },
2190 { 245, "Malabo, Equatorial Guinea - West Africa Time : (UTC+01:00)" },
2191 { 246, "Malaga, Spain - Central European Standard Time : (UTC+01:00)" },
2192 { 247, "Managua, Nicaragua - Central Standard Time : (UTC-06:00)" },
2193 { 248, "Manama, Bahrain - Arabia Standard Time : (UTC+03:00)" },
2194 { 249, "Manaus, Brazil - Amazon Time : (UTC-04:00)" },
2195 { 250, "Manchester, United Kingdom - Greenwich Mean Time : (UTC)" },
2196 { 251, "Manila, Philippines - Philippine Time : (UTC+08:00)" },
2197 { 252, "Maputo, Mozambique - Central Africa Time : (UTC+02:00)" },
2198 { 253, "Maracaibo, Venezuela - Venezuelan Standard Time : (UTC-04:30)" },
2199 { 254, "Marseille, France - Central European Standard Time : (UTC+01:00)" },
2200 { 255, "Maseru, Lesotho - South Africa Standard Time : (UTC+02:00)" },
2201 { 256, "Masqat, Oman - Gulf Standard Time : (UTC+04:00)" },
2202 { 257, "Mbabane, Swaziland - South Africa Standard Time : (UTC+02:00)" },
2203 { 258, "Medellin, Colombia - Colombia Time : (UTC-05:00)" },
2204 { 259, "Melbourne, VIC, Australia - Australian Eastern Standard Time : (UTC+10:00)" },
2205 { 260, "Memphis, TN, USA - Central Standard Time : (UTC-06:00)" },
2206 { 261, "Metz, France - Central European Standard Time : (UTC+01:00)" },
2207 { 262, "Mexico City, Mexico - Central Standard Time : (UTC-06:00)" },
2208 { 263, "Miami, FL, USA - Eastern Standard Time : (UTC-05:00)" },
2209 { 264, "Milan, Italy - Central European Standard Time : (UTC+01:00)" },
2210 { 265, "Milwaukee, WI, USA - Central Standard Time : (UTC-06:00)" },
2211 { 266, "Minneapolis, MN, USA - Central Standard Time : (UTC-06:00)" },
2212 { 267, "Minsk, Belarus - Further-Eastern European Time : (UTC+03:00)" },
2213 { 268, "Mobile, AL, USA - Central Standard Time : (UTC-06:00)" },
2214 { 269, "Mogadishu, Somalia - Eastern Africa Standard Time : (UTC+03:00)" },
2215 { 270, "Monaco, Monaco - Central European Standard Time : (UTC+01:00)" },
2216 { 271, "Monrovia, Liberia - Greenwich Mean Time : (UTC)" },
2217 { 272, "Monterrey, Mexico - Central Standard Time : (UTC-06:00)" },
2218 { 273, "Montevideo, Uruguay - Uruguay Time : (UTC-03:00)" },
2219 { 274, "Montreal, PQ, Canada - Eastern Standard Time : (UTC-05:00)" },
2220 { 275, "Morioka, Japan - Japan Standard Time : (UTC+09:00)" },
2221 { 276, "Moscow, Russia - Moscow Standard Time : (UTC+03:00)" },
2222 { 277, "Mumbai, India - India Standard Time : (UTC+05:30)" },
2223 { 278, "Munich, Germany - Central European Standard Time : (UTC+01:00)" },
2224 { 279, "Murmansk, Russia - Moscow Standard Time : (UTC+03:00)" },
2225 { 280, "N'Djamena, Chad - West Africa Time : (UTC+01:00)" },
2226 { 281, "Nagano, Japan - Japan Standard Time : (UTC+09:00)" },
2227 { 282, "Nagasaki, Japan - Japan Standard Time : (UTC+09:00)" },
2228 { 283, "Nagoya, Japan - Japan Standard Time : (UTC+09:00)" },
2229 { 284, "Nairobi, Kenya - Eastern Africa Standard Time : (UTC+03:00)" },
2230 { 285, "Nanjing, China - China Standard Time : (UTC+08:00)" },
2231 { 286, "Naples, Italy - Central European Standard Time : (UTC+01:00)" },
2232 { 287, "Nashville, TN, USA - Central Standard Time : (UTC-06:00)" },
2233 { 288, "Nassau, Bahamas - Eastern Standard Time : (UTC-05:00)" },
2234 { 289, "New Orleans, LA, USA - Central Standard Time : (UTC-06:00)" },
2235 { 290, "New York, NY, USA - Eastern Standard Time : (UTC-05:00)" },
2236 { 291, "Newark, NJ, USA - Eastern Standard Time : (UTC-05:00)" },
2237 { 292, "Niamey, Niger - West Africa Time : (UTC+01:00)" },
2238 { 293, "Nicosia, Cyprus - Eastern European Standard Time : (UTC+02:00)" },
2239 { 294, "Norwich, United Kingdom - Greenwich Mean Time : (UTC)" },
2240 { 295, "Nouakchott, Mauritania - Greenwich Mean Time : (UTC)" },
2241 { 296, "Novosibirsk, Russia - Novosibirsk Time : (UTC+06:00)" },
2242 { 297, "Nuku'alofa, Tonga - Tonga Standard Time : (UTC+13:00)" },
2243 { 298, "Nuuk, Greenland - West Greenland Time : (UTC-03;00)" },
2244 { 299, "Oakland, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2245 { 300, "Oklahoma City, OK, USA - Central Standard Time : (UTC-06:00)" },
2246 { 301, "Omaha, NE, USA - Central Standard Time : (UTC-06:00)" },
2247 { 302, "Orlando, FL, USA - Eastern Standard Time : (UTC-05:00)" },
2248 { 303, "Osaka, Japan - Japan Standard Time : (UTC+09:00)" },
2249 { 304, "Oshawa, ON, Canada - Eastern Standard Time : (UTC-05:00)" },
2250 { 305, "Oslo, Norway - Central European Standard Time : (UTC+01:00)" },
2251 { 306, "Ottawa, ON, Canada - Eastern Standard Time : (UTC-05:00)" },
2252 { 307, "Ouagadougou, Burkina Faso - Greenwich Mean Time : (UTC)" },
2253 { 308, "Overland Park, KS, USA - Central Standard Time : (UTC-06:00)" },
2254 { 309, "Oviedo, Spain - Central European Standard Time : (UTC+01:00)" },
2255 { 310, "Palermo, Italy - Central European Standard Time : (UTC+01:00)" },
2256 { 311, "Palma de Mallorca, Spain - Central European Standard Time : (UTC+01:00)" },
2257 { 312, "Panama City, Panama - Eastern Standard Time : (UTC-05:00)" },
2258 { 313, "Paramaribo, Surinam - Suriname Time : (UTC-03:00)" },
2259 { 314, "Paris, France - Central European Standard Time : (UTC+01:00)" },
2260 { 315, "Pasadena, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2261 { 316, "Pasadena, TX, USA - Central Standard Time : (UTC-06:00)" },
2262 { 317, "Peoria, IL, USA - Central Standard Time : (UTC-06:00)" },
2263 { 318, "Perth, WA, Australia - Australia Western Standard Time : (UTC+08:00)" },
2264 { 319, "Perugia, Italy - Central European Standard Time : (UTC+01:00)" },
2265 { 320, "Philadelphia, PA, USA - Eastern Standard Time : (UTC-05:00)" },
2266 { 321, "Phnom Penh, Cambodia - Indochina Time : (UTC+07:00)" },
2267 { 322, "Phoenix, AZ, USA - Mountain Standard Time : (UTC-07:00)" },
2268 { 323, "Pisa, Italy - Central European Standard Time : (UTC+01:00)" },
2269 { 324, "Pittsburgh, PA, USA - Eastern Standard Time : (UTC-05:00)" },
2270 { 325, "Plymouth, United Kingdom - Greenwich Mean Time : (UTC)" },
2271 { 326, "Port Louis, Mauritius - Mauritius Time : (UTC+04:00)" },
2272 { 327, "Port Moresby, Papua New Guinea - Papua New Guinea Time : (UTC+10:00)" },
2273 { 328, "Port-au-Prince, Haiti - Eastern Standard Time : (UTC-05:00)" },
2274 { 329, "Port-of-Spain, Trinidad and Tobago - Atlantic Standard Time : (UTC-04:00)" },
2275 { 330, "Portland, OR, USA - Pacific Standard Time : (UTC-08:00)" },
2276 { 331, "Porto Alegre, Brazil - Brasilia Time : (UTC-03:00)" },
2277 { 332, "Porto, Portugal - Western European Time : (UTC)" },
2278 { 333, "Porto-Novo, Benin - West Africa Time : (UTC+01:00)" },
2279 { 334, "Prague, Czech Republic - Central European Standard Time : (UTC+01:00)" },
2280 { 335, "Praia, Cape Verde - Cape Verde Time : (UTC-01:00)" },
2281 { 336, "Pretoria, South Africa - South Africa Standard Time : (UTC+02:00)" },
2282 { 337, "Providence, RI, USA - Eastern Standard Time : (UTC-05:00)" },
2283 { 338, "Puebla de Zaragoza, Mexico - Eastern Standard Time : (UTC-05:00)" },
2284 { 339, "Pusan, Korea - Korea Standard Time : (UTC+09:00)" },
2285 { 340, "Pyongyang, North Korea - Korea Standard Time : (UTC+09:00)" },
2286 { 341, "Quebec City, PQ, Canada - Eastern Standard Time : (UTC-05:00)" },
2287 { 342, "Quito, Ecuador - Ecuador Time : (UTC-05:00)" },
2288 { 343, "Rabat, Morocco - Western European Time : (UTC)" },
2289 { 344, "Raleigh, NC, USA - Eastern Standard Time : (UTC-05:00)" },
2290 { 345, "Recife, Brazil - Brasilia Time : (UTC-03:00)" },
2291 { 346, "Redmond, WA, USA - Pacific Standard Time : (UTC-08:00)" },
2292 { 347, "Reggio Calabria, Italy - Central European Standard Time : (UTC+01:00)" },
2293 { 348, "Regina, SK, Canada - Central Standard Time : (UTC-06:00)" },
2294 { 349, "Richmond, VA, USA - Eastern Standard Time : (UTC-05:00)" },
2295 { 350, "Riga, Latvia - Eastern European Standard Time : (UTC+02:00)" },
2296 { 351, "Rio de Janeiro, Brazil - Brasilia Time : (UTC-03:00)" },
2297 { 352, "Riyadh, Saudi Arabia - Arabia Standard Time : (UTC+03:00)" },
2298 { 353, "Rockford, IL, USA - Central Standard Time : (UTC-06:00)" },
2299 { 354, "Rome, Italy - Central European Standard Time : (UTC+01:00)" },
2300 { 355, "Roseau, Dominica - Atlantic Standard Time : (UTC-04:00)" },
2301 { 356, "Roswell, NM, USA - Mountain Standard Time : (UTC-07:00)" },
2302 { 357, "Rouen, France - Central European Standard Time : (UTC+01:00)" },
2303 { 358, "Sacramento, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2304 { 359, "Saint John, NB, Canada - Atlantic Standard Time : (UTC-04:00)" },
2305 { 360, "Saint Louis, MO, USA - Central Standard Time : (UTC-06:00)" },
2306 { 361, "Saint Paul, MN, USA - Central Standard Time : (UTC-06:00)" },
2307 { 362, "Salt Lake City, UT, USA - Mountain Standard Time : (UTC-07:00)" },
2308 { 363, "Salvador, Brazil - Brasilia Time : (UTC-03:00)" },
2309 { 364, "Salzburg, Austria - Central European Standard Time : (UTC+01:00)" },
2310 { 365, "San Antonio, TX, USA - Central Standard Time : (UTC-06:00)" },
2311 { 366, "San Bernardino, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2312 { 367, "San Diego, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2313 { 368, "San Francisco, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2314 { 369, "San Jose, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2315 { 370, "San Salvador, El Salvador - Central Standard Time : (UTC-06:00)" },
2316 { 371, "Sana'a, Yemen - Arabia Standard Time : (UTC+03:00)" },
2317 { 372, "Santa Ana, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2318 { 373, "Santa Rosa, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2319 { 374, "Santander, Spain - Central European Standard Time : (UTC+01:00)" },
2320 { 375, "Santiago, Chile - Chile Standard Time : (UTC-04:00)" },
2321 { 376, "Santo Domingo, Dominican Republic - Atlantic Standard Time : (UTC-04:00)" },
2322 { 377, "Sao Paulo, Brazil - Brasilia Time : (UTC-03:00)" },
2323 { 378, "Sapporo, Japan - Japan Standard Time : (UTC+09:00)" },
2324 { 379, "Sarajevo, Bosnia and Herzegovina - Central European Standard Time : (UTC+01:00)" },
2325 { 380, "Saskatoon, SK, Canada - Central Standard Time : (UTC-06:00)" },
2326 { 381, "Savannah, GA, USA - Eastern Standard Time : (UTC-05:00)" },
2327 { 382, "Seattle, WA, USA - Pacific Standard Time : (UTC-08:00)" },
2328 { 383, "Sendai, Japan - Japan Standard Time : (UTC+09:00)" },
2329 { 384, "Seoul, Korea - Korea Standard Time : (UTC+09:00)" },
2330 { 385, "Sevilla, Spain - Central European Standard Time : (UTC+01:00)" },
2331 { 386, "Shanghai, China - China Standard Time : (UTC+08:00)" },
2332 { 387, "Shreveport, LA, USA - Central Standard Time : (UTC-06:00)" },
2333 { 388, "Simi Valley, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2334 { 389, "Singapore, Singapore - Singapore Standard Time : (UTC+08:00)" },
2335 { 390, "Sioux Falls, SD, USA - Central Standard Time : (UTC-06:00)" },
2336 { 391, "Skopje, F.Y.R.O. Macedonia - Central European Standard Time : (UTC+01:00)" },
2337 { 392, "Sofia, Bulgaria - Eastern European Standard Time : (UTC+02:00)" },
2338 { 393, "South Bend, IN, USA - Eastern Standard Time : (UTC-05:00)" },
2339 { 394, "Spokane, WA, USA - Pacific Standard Time : (UTC-08:00)" },
2340 { 395, "Springfield, IL, USA - Central Standard Time : (UTC-06:00)" },
2341 { 396, "Springfield, MA, USA - Eastern Standard Time : (UTC-05:00)" },
2342 { 397, "Springfield, MO, USA - Central Standard Time : (UTC-06:00)" },
2343 { 398, "Sri Jayawardenepura, Sri Lanka - India Standard Time : (UTC+05:30)" },
2344 { 399, "St. Catharines, ON, Canada - Eastern Standard Time : (UTC-05:00)" },
2345 { 400, "St. John's, NF, Canada - Newfoundland Standard Time : (UTC-03:30)" },
2346 { 401, "St. Petersburg, FL, USA - Eastern Standard Time : (UTC-05:00)" },
2347 { 402, "St. Petersburg, Russia - Moscow Standard Time : (UTC+03:00)" },
2348 { 403, "Stockholm, Sweden - Central European Standard Time : (UTC+01:00)" },
2349 { 404, "Stockton, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2350 { 405, "Strasbourg, France - Central European Standard Time : (UTC+01:00)" },
2351 { 406, "Stuttgart, Germany - Central European Standard Time : (UTC+01:00)" },
2352 { 407, "Sucre, Bolivia - Bolivia Time : (UTC-04:00)" },
2353 { 408, "Sunnyvale, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2354 { 409, "Suva, Fiji Islands - Fiji Standard Time : (UTC+12:00)" },
2355 { 410, "Sydney, NSW, Australia - Australian Eastern Standard Time : (UTC+10:00)" },
2356 { 411, "Syracuse, NY, USA - Eastern Standard Time : (UTC-05:00)" },
2357 { 412, "T'bilisi, Georgia - Georgia Standard Time : (UTC+04:00)" },
2358 { 413, "Taejon, Korea - Korea Standard Time : (UTC+09:00)" },
2359 { 414, "Taiohae, Marquesas Islands, French Polynesia - Marquesas Time : (UTC-9:30)" },
2360 { 415, "Taipei, Taiwan - China Standard Time : (UTC+08:00)" },
2361 { 416, "Tallinn, Estonia - Eastern European Standard Time : (UTC+02:00)" },
2362 { 417, "Tampa, FL, USA - Eastern Standard Time : (UTC-05:00)" },
2363 { 418, "Taranto, Italy - Central European Standard Time : (UTC+01:00)" },
2364 { 419, "Tashkent, Uzbekistan - Uzbekistan Time : (UTC+05:00)" },
2365 { 420, "Tegucigalpa, Honduras - Central Standard Time : (UTC-06:00)" },
2366 { 421, "Tehran, Iran - Iran Standard Time : (UTC+03:30)" },
2367 { 422, "Tel Aviv, Israel - Israel Standard Time : (UTC+02:00)" },
2368 { 423, "The Hague, Netherlands - Central European Standard Time : (UTC+01:00)" },
2369 { 424, "Thimphu, Bhutan - Bhutan Time : (UTC+06:00)" },
2370 { 425, "Thunder Bay, ON, Canada - Eastern Standard Time : (UTC-05:00)" },
2371 { 426, "Tirana, Albania - Central European Standard Time : (UTC+01:00)" },
2372 { 427, "Tokyo, Japan - Japan Standard Time : (UTC+09:00)" },
2373 { 428, "Toledo, OH, USA - Eastern Standard Time : (UTC-05:00)" },
2374 { 429, "Torino, Italy - Central European Standard Time : (UTC+01:00)" },
2375 { 430, "Toronto, ON, Canada - Eastern Standard Time : (UTC-05:00)" },
2376 { 431, "Torrance, CA, USA - Pacific Standard Time : (UTC-08:00)" },
2377 { 432, "Toulouse, France - Central European Standard Time : (UTC+01:00)" },
2378 { 433, "Tripoli, Libya - Eastern European Standard Time : (UTC+02:00)" },
2379 { 434, "Tucson, AZ, USA - Mountain Standard Time : (UTC-07:00)" },
2380 { 435, "Tulsa, OK, USA - Central Standard Time : (UTC-06:00)" },
2381 { 436, "Tunis, Tunisia - West Africa Time : (UTC+01:00)" },
2382 { 437, "Ulaanbaatar, Mongolia - Ulaanbaatar Time : (UTC+08:00)" },
2383 { 438, "Urumqi, China - China Standard Time : (UTC+08:00)" },
2384 { 439, "Vaduz, Liechtenstein - Central European Standard Time : (UTC+01:00)" },
2385 { 440, "Valencia, Spain - Central European Standard Time : (UTC+01:00)" },
2386 { 441, "Valletta, Malta - Central European Standard Time : (UTC+01:00)" },
2387 { 442, "Vancouver, BC, Canada - Pacific Standard Time : (UTC-08:00)" },
2388 { 443, "Vatican City, Vatican City - Central European Standard Time : (UTC+01:00)" },
2389 { 444, "Venice, Italy - Central European Standard Time : (UTC+01:00)" },
2390 { 445, "Veracruz, Mexico - Central Standard Time : (UTC-06:00)" },
2391 { 446, "Victoria, Seychelles - Seychelles Time : (UTC+04:00)" },
2392 { 447, "Vienna, Austria - Central European Standard Time : (UTC+01:00)" },
2393 { 448, "Vientiane, Laos - Indochina Time : (UTC+07:00)" },
2394 { 449, "Vilnius, Lithuania - Eastern European Standard Time : (UTC+02:00)" },
2395 { 450, "Vladivostok, Russia - Vladivostok Standard Time : (UTC+10:00)" },
2396 { 451, "Volgograd, Russia - Moscow Standard Time : (UTC+03:00)" },
2397 { 452, "Waco, TX, USA - Central Standard Time : (UTC-06:00)" },
2398 { 453, "Warsaw, Poland - Central European Standard Time : (UTC+01:00)" },
2399 { 454, "Washington, DC, USA - Eastern Standard Time : (UTC-05:00)" },
2400 { 455, "Wellington, New Zealand - New Zealand Standard Time : (UTC+12:00)" },
2401 { 456, "Whitehorse, YT, Canada - Pacific Standard Time : (UTC-08:00)" },
2402 { 457, "Windhoek, Namibia - West Africa Time : (UTC+01:00)" },
2403 { 458, "Winnipeg, MB, Canada - Central Standard Time : (UTC-06:00)" },
2404 { 459, "Wuhan, China - China Standard Time : (UTC+08:00)" },
2405 { 460, "Xian, China - China Standard Time : (UTC+08:00)" },
2406 { 461, "Yakutsk, Russia - Yakutsk Standard Time : (UTC+09:00)" },
2407 { 462, "Yangon, Myanmar - Myanmar Standard Time : (UTC+06:30)" },
2408 { 463, "Yekaterinburg, Russia - Yekaterinburg Standard Time : (UTC+05:00)" },
2409 { 464, "Yellowknife, NT, Canada - Mountain Standard Time : (UTC-07:00)" },
2410 { 465, "Yerevan, Armenia - Armenia Time : (UTC+04:00)" },
2411 { 466, "Yokohama, Japan - Japan Standard Time : (UTC+09:00)" },
2412 { 467, "Zagreb, Croatia - Central European Standard Time : (UTC+01:00)" },
2413 { 468, "Zaragoza, Spain - Central European Standard Time : (UTC+01:00)" },
2414 { 469, "Zurich, Switzerland - Central European Standard Time : (UTC+01:00)" },
2415 { 0, NULL }
2418 static const value_string acn_blob_time3_dst_vals[] = {
2419 { 0, "DST US" },
2420 { 1, "DST Europe" },
2421 { 2, "DST Funky" },
2422 { 3, "DST None" },
2423 { 0, NULL }
2426 static const value_string acn_blob_time3_month_vals[] = {
2427 { 0, "None" },
2428 { 1, "January" },
2429 { 2, "February" },
2430 { 3, "March" },
2431 { 4, "April" },
2432 { 5, "May" },
2433 { 6, "June" },
2434 { 7, "July" },
2435 { 8, "August" },
2436 { 9, "September" },
2437 { 10, "October" },
2438 { 11, "November" },
2439 { 12, "December" },
2440 { 0, NULL }
2443 static const value_string acn_blob_time3_week_vals[] = {
2444 { 0, "None" },
2445 { 1, "First" },
2446 { 2, "Second" },
2447 { 3, "Third" },
2448 { 4, "Fourth" },
2449 { 5, "Last" },
2450 { 0, NULL }
2453 static const value_string acn_blob_time3_day_vals[] = {
2454 { 0, "Sunday" },
2455 { 1, "Monday" },
2456 { 2, "Tuesday" },
2457 { 3, "Wednesday" },
2458 { 4, "Thursday" },
2459 { 5, "Friday" },
2460 { 6, "Saturday" },
2461 { 0, NULL }
2464 static const value_string acn_blob_time3_locality_vals[] = {
2465 { 0, "LOCAL" },
2466 { 1, "UTC" },
2467 { 0, NULL }
2470 static const value_string acn_blob_energy_cost_field_name[] = {
2471 { 1, "Month" },
2472 { 2, "Day" },
2473 { 3, "Cost per Hour" },
2474 { 0, NULL }
2477 static const value_string acn_blob_sequence_operation_field_name[] = {
2478 { 1, "Operation Type" },
2479 { 2, "Space" },
2480 { 3, "Sequence Number" },
2481 { 4, "Step Number" },
2482 { 0, NULL }
2485 static const value_string acn_blob_sequence_step_properties_field_name[] = {
2486 { 1, "System" },
2487 { 2, "Processor" },
2488 { 3, "Rack" },
2489 { 4, "Lug" },
2490 { 5, "Module" },
2491 { 6, "Station" },
2492 { 7, "Port" },
2493 { 8, "Subdevice" },
2494 { 9, "Space" },
2495 { 10, "UDN" },
2496 { 11, "Reserved" },
2497 { 12, "Sequence Number" },
2498 { 13, "Step Number" },
2499 { 14, "Fade Time" },
2500 { 15, "Hold Time" },
2501 { 16, "Level[0]" },
2502 { 17, "Level[1]" },
2503 { 18, "Level[2]" },
2504 { 19, "Level[3]" },
2505 { 20, "Level[4]" },
2506 { 21, "Level[5]" },
2507 { 22, "Level[6]" },
2508 { 23, "Level[7]" },
2509 { 24, "Level[8]" },
2510 { 25, "Level[9]" },
2511 { 26, "Level[10]" },
2512 { 27, "Level[11]" },
2513 { 28, "Level[12]" },
2514 { 29, "Level[13]" },
2515 { 30, "Level[14]" },
2516 { 31, "Level[15]" },
2517 { 32, "Level[16]" },
2518 { 33, "Level[17]" },
2519 { 34, "Level[18]" },
2520 { 35, "Level[19]" },
2521 { 36, "Level[20]" },
2522 { 37, "Level[21]" },
2523 { 38, "Level[22]" },
2524 { 39, "Level[23]" },
2525 { 40, "Level[24]" },
2526 { 41, "Level[25]" },
2527 { 42, "Level[26]" },
2528 { 43, "Level[27]" },
2529 { 44, "Level[28]" },
2530 { 45, "Level[29]" },
2531 { 46, "Level[30]" },
2532 { 47, "Level[31]" },
2533 { 48, "Level[32]" },
2534 { 49, "Level[33]" },
2535 { 50, "Level[34]" },
2536 { 51, "Level[35]" },
2537 { 52, "Level[36]" },
2538 { 53, "Level[37]" },
2539 { 54, "Level[38]" },
2540 { 55, "Level[39]" },
2541 { 56, "Level[40]" },
2542 { 57, "Level[41]" },
2543 { 58, "Level[42]" },
2544 { 59, "Level[43]" },
2545 { 60, "Level[44]" },
2546 { 61, "Level[45]" },
2547 { 62, "Level[46]" },
2548 { 63, "Level[47]" },
2549 { 64, "Level[48]" },
2550 { 65, "Level[49]" },
2551 { 66, "Level[50]" },
2552 { 67, "Level[51]" },
2553 { 68, "Level[52]" },
2554 { 69, "Level[53]" },
2555 { 70, "Level[54]" },
2556 { 71, "Level[55]" },
2557 { 72, "Level[56]" },
2558 { 73, "Level[57]" },
2559 { 74, "Level[58]" },
2560 { 75, "Level[59]" },
2561 { 76, "Level[60]" },
2562 { 77, "Level[61]" },
2563 { 78, "Level[62]" },
2564 { 79, "Level[63]" },
2565 { 80, "Level[64]" },
2566 { 81, "Level[65]" },
2567 { 82, "Level[66]" },
2568 { 83, "Level[67]" },
2569 { 84, "Level[68]" },
2570 { 85, "Level[69]" },
2571 { 86, "Level[70]" },
2572 { 87, "Level[71]" },
2573 { 88, "Level[72]" },
2574 { 89, "Level[73]" },
2575 { 90, "Level[74]" },
2576 { 91, "Level[75]" },
2577 { 92, "Level[76]" },
2578 { 93, "Level[77]" },
2579 { 94, "Level[78]" },
2580 { 95, "Level[79]" },
2581 { 96, "Level[80]" },
2582 { 97, "Level[81]" },
2583 { 98, "Level[82]" },
2584 { 99, "Level[83]" },
2585 { 100, "Level[84]" },
2586 { 101, "Level[85]" },
2587 { 102, "Level[86]" },
2588 { 103, "Level[87]" },
2589 { 104, "Level[88]" },
2590 { 105, "Level[89]" },
2591 { 106, "Level[90]" },
2592 { 107, "Level[91]" },
2593 { 108, "Level[92]" },
2594 { 109, "Level[93]" },
2595 { 110, "Level[94]" },
2596 { 111, "Level[95]" },
2597 { 112, "Level[96]" },
2598 { 113, "Level[97]" },
2599 { 114, "Level[98]" },
2600 { 115, "Level[99]" },
2601 { 116, "Level[100]" },
2602 { 117, "Level[101]" },
2603 { 118, "Level[102]" },
2604 { 119, "Level[103]" },
2605 { 120, "Level[104]" },
2606 { 121, "Level[105]" },
2607 { 122, "Level[106]" },
2608 { 123, "Level[107]" },
2609 { 124, "Level[108]" },
2610 { 125, "Level[109]" },
2611 { 126, "Level[110]" },
2612 { 127, "Level[111]" },
2613 { 128, "Level[112]" },
2614 { 129, "Level[113]" },
2615 { 130, "Level[114]" },
2616 { 131, "Level[115]" },
2617 { 132, "Level[116]" },
2618 { 133, "Level[117]" },
2619 { 134, "Level[118]" },
2620 { 135, "Level[119]" },
2621 { 136, "Level[120]" },
2622 { 137, "Level[121]" },
2623 { 138, "Level[122]" },
2624 { 139, "Level[123]" },
2625 { 140, "Level[124]" },
2626 { 141, "Level[125]" },
2627 { 142, "Level[126]" },
2628 { 143, "Level[127]" },
2629 { 144, "Level[128]" },
2630 { 145, "Level[129]" },
2631 { 146, "Level[130]" },
2632 { 147, "Level[131]" },
2633 { 148, "Level[132]" },
2634 { 149, "Level[133]" },
2635 { 150, "Level[134]" },
2636 { 151, "Level[135]" },
2637 { 152, "Level[136]" },
2638 { 153, "Level[137]" },
2639 { 154, "Level[138]" },
2640 { 155, "Level[139]" },
2641 { 156, "Level[140]" },
2642 { 157, "Level[141]" },
2643 { 158, "Level[142]" },
2644 { 159, "Level[143]" },
2645 { 160, "Level[144]" },
2646 { 161, "Level[145]" },
2647 { 162, "Level[146]" },
2648 { 163, "Level[147]" },
2649 { 164, "Level[148]" },
2650 { 165, "Level[149]" },
2651 { 166, "Level[150]" },
2652 { 167, "Level[151]" },
2653 { 168, "Level[152]" },
2654 { 169, "Level[153]" },
2655 { 170, "Level[154]" },
2656 { 171, "Level[155]" },
2657 { 172, "Level[156]" },
2658 { 173, "Level[157]" },
2659 { 174, "Level[158]" },
2660 { 175, "Level[159]" },
2661 { 176, "Level[160]" },
2662 { 177, "Level[161]" },
2663 { 178, "Level[162]" },
2664 { 179, "Level[163]" },
2665 { 180, "Level[164]" },
2666 { 181, "Level[165]" },
2667 { 182, "Level[166]" },
2668 { 183, "Level[167]" },
2669 { 184, "Level[168]" },
2670 { 185, "Level[169]" },
2671 { 186, "Level[170]" },
2672 { 187, "Level[171]" },
2673 { 188, "Level[172]" },
2674 { 189, "Level[173]" },
2675 { 190, "Level[174]" },
2676 { 191, "Level[175]" },
2677 { 192, "Level[176]" },
2678 { 193, "Level[177]" },
2679 { 194, "Level[178]" },
2680 { 195, "Level[179]" },
2681 { 196, "Level[180]" },
2682 { 197, "Level[181]" },
2683 { 198, "Level[182]" },
2684 { 199, "Level[183]" },
2685 { 200, "Level[184]" },
2686 { 201, "Level[185]" },
2687 { 202, "Level[186]" },
2688 { 203, "Level[187]" },
2689 { 204, "Level[188]" },
2690 { 205, "Level[189]" },
2691 { 206, "Level[190]" },
2692 { 207, "Level[191]" },
2693 { 0, NULL }
2695 static value_string_ext acn_blob_sequence_step_properties_field_name_ext = VALUE_STRING_EXT_INIT(acn_blob_sequence_step_properties_field_name);
2697 static const value_string acn_blob_type_vals[] = {
2698 { ACN_BLOB_IPV4, "IPv4 Blob" },
2699 { ACN_BLOB_IPV6, "IPv6 Blob" },
2700 { ACN_BLOB_ERROR1, "Error Blob v1" },
2701 { ACN_BLOB_ERROR2, "Error Blob v2" },
2702 { ACN_BLOB_METADATA, "Metadata" },
2703 { ACN_BLOB_METADATA_DEVICES, "Metadata Devices" },
2704 { ACN_BLOB_METADATA_TYPES, "Metadata Types" },
2705 { ACN_BLOB_TIME1, "Time Blob (deprecated 1)" },
2706 { ACN_BLOB_DIMMER_PROPERTIES, "Dimmer Properties Blob v1" },
2707 { ACN_BLOB_DIMMER_LOAD_PROPERTIES, "Dimmer Load Properties Blob v1" },
2708 { ACN_BLOB_DIMMING_RACK_PROPERTIES, "Dimming Rack Properties Blob v1" },
2709 { ACN_BLOB_DIMMING_RACK_STATUS_PROPERTIES, "Dimming Rack Status Properties Blob v1" },
2710 { ACN_BLOB_DIMMER_STATUS_PROPERTIES, "Dimmer Status Properties Blob v1" },
2711 { ACN_BLOB_SET_LEVELS_OPERATION, "Set Levels Operation Blob" },
2712 { ACN_BLOB_PRESET_OPERATION, "Preset Operation Blob" },
2713 { ACN_BLOB_ADVANCED_FEATURES_OPERATION, "Advanced Features Operation Blob" },
2714 { ACN_BLOB_DIRECT_CONTROL_OPERATION, "Direct Control Operation Blob" },
2715 { ACN_BLOB_GENERATE_CONFIG_OPERATION, "Generate Config Operation Blob" },
2716 { ACN_BLOB_ERROR3, "Error Blob v3" },
2717 { ACN_BLOB_DIMMER_PROPERTIES2, "Dimmer Properties Blob v2" },
2718 { ACN_BLOB_DIMMER_LOAD_PROPERTIES2, "Dimmer Load Properties Blob v2" },
2719 { ACN_BLOB_DIMMER_RACK_PROPERTIES2, "Dimming Rack Properties Blob v2" },
2720 { ACN_BLOB_DIMMER_RACK_STATUS_PROPERTIES2, "Dimming Rack Status Properties Blob v2" },
2721 { ACN_BLOB_DIMMER_STATUS_PROPERTIES2, "Dimmer Status Properties Blob v2" },
2722 { ACN_BLOB_TIME2, "Time Blob (deprecated 2)" },
2723 { ACN_BLOB_RPC, "RPC Blob" },
2724 { ACN_BLOB_DHCP_CONFIG_SUBNET, "DHCP Config Subnet Blob" },
2725 { ACN_BLOB_DHCP_CONFIG_STATIC_ROUTE, "DHCP Config Static Route Blob" },
2726 { ACN_BLOB_ENERGY_MANAGEMENT, "Energy Management Blob" },
2727 { ACN_BLOB_PRESET_PROPERTIES, "Preset Properties Blob" },
2728 { ACN_BLOB_TIME3, "Time Blob v2" },
2729 { ACN_BLOB_ENERGY_COST, "Energy Cost Blob" },
2730 { ACN_BLOB_SEQUENCE_OPERATIONS, "Sequence Operations Blob" },
2731 { ACN_BLOB_SEQUENCE_STEP_PROPERTIES, "Sequence Step Properties Blob" },
2732 { 0, NULL }
2735 static const value_string acn_dmp_vector_vals[] = {
2736 { ACN_DMP_VECTOR_UNKNOWN, "Unknown"},
2737 { ACN_DMP_VECTOR_GET_PROPERTY, "Get Property"},
2738 { ACN_DMP_VECTOR_SET_PROPERTY, "Set Property"},
2739 { ACN_DMP_VECTOR_GET_PROPERTY_REPLY, "Get property reply"},
2740 { ACN_DMP_VECTOR_EVENT, "Event"},
2741 { ACN_DMP_VECTOR_MAP_PROPERTY, "Map Property"},
2742 { ACN_DMP_VECTOR_UNMAP_PROPERTY, "Unmap Property"},
2743 { ACN_DMP_VECTOR_SUBSCRIBE, "Subscribe"},
2744 { ACN_DMP_VECTOR_UNSUBSCRIBE, "Unsubscribe"},
2745 { ACN_DMP_VECTOR_GET_PROPERTY_FAIL, "Get Property Fail"},
2746 { ACN_DMP_VECTOR_SET_PROPERTY_FAIL, "Set Property Fail"},
2747 { ACN_DMP_VECTOR_MAP_PROPERTY_FAIL, "Map Property Fail"},
2748 { ACN_DMP_VECTOR_SUBSCRIBE_ACCEPT, "Subscribe Accept"},
2749 { ACN_DMP_VECTOR_SUBSCRIBE_REJECT, "Subscribe Reject"},
2750 { ACN_DMP_VECTOR_ALLOCATE_MAP, "Allocate Map"},
2751 { ACN_DMP_VECTOR_ALLOCATE_MAP_REPLY, "Allocate Map Reply"},
2752 { ACN_DMP_VECTOR_DEALLOCATE_MAP, "Deallocate Map" },
2753 { ACN_DMP_VECTOR_SYNC_EVENT, "Sync Event" },
2754 { 0, NULL },
2757 static const value_string acn_ip_address_type_vals[] = {
2758 { ACN_ADDR_NULL, "Null"},
2759 { ACN_ADDR_IPV4, "IPv4"},
2760 { ACN_ADDR_IPV6, "IPv6"},
2761 { ACN_ADDR_IPPORT, "Port"},
2762 { 0, NULL },
2765 static const value_string acn_refuse_code_vals[] = {
2766 { ACN_REFUSE_CODE_NONSPECIFIC, "Nonspecific" },
2767 { ACN_REFUSE_CODE_ILLEGAL_PARAMS, "Illegal Parameters" },
2768 { ACN_REFUSE_CODE_LOW_RESOURCES, "Low Resources" },
2769 { ACN_REFUSE_CODE_ALREADY_MEMBER, "Already Member" },
2770 { ACN_REFUSE_CODE_BAD_ADDR_TYPE, "Bad Address Type" },
2771 { ACN_REFUSE_CODE_NO_RECIP_CHAN, "No Reciprocal Channel" },
2772 { 0, NULL },
2775 static const value_string acn_reason_code_vals[] = {
2776 { ACN_REASON_CODE_NONSPECIFIC, "Nonspecific" },
2777 { ACN_REASON_CODE_NO_RECIP_CHAN, "No Reciprocal Channel" },
2778 { ACN_REASON_CODE_CHANNEL_EXPIRED, "Channel Expired" },
2779 { ACN_REASON_CODE_LOST_SEQUENCE, "Lost Sequence" },
2780 { ACN_REASON_CODE_SATURATED, "Saturated" },
2781 { ACN_REASON_CODE_TRANS_ADDR_CHANGING, "Transport Address Changing" },
2782 { ACN_REASON_CODE_ASKED_TO_LEAVE, "Asked to Leave" },
2783 { ACN_REASON_CODE_NO_RECIPIENT, "No Recipient"},
2784 { 0, NULL },
2787 static const value_string acn_dmp_reason_code_vals[] = {
2788 { ACN_DMP_REASON_CODE_NONSPECIFIC, "Nonspecific" },
2789 { ACN_DMP_REASON_CODE_NOT_A_PROPERTY, "Not a Property" },
2790 { ACN_DMP_REASON_CODE_WRITE_ONLY, "Write Only" },
2791 { ACN_DMP_REASON_CODE_NOT_WRITABLE, "Not Writable" },
2792 { ACN_DMP_REASON_CODE_DATA_ERROR, "Data Error" },
2793 { ACN_DMP_REASON_CODE_MAPS_NOT_SUPPORTED, "Maps not Supported" },
2794 { ACN_DMP_REASON_CODE_SPACE_NOT_AVAILABLE, "Space not Available" },
2795 { ACN_DMP_REASON_CODE_PROP_NOT_MAPPABLE, "Property not Mappable"},
2796 { ACN_DMP_REASON_CODE_MAP_NOT_ALLOCATED, "Map not Allocated"},
2797 { ACN_DMP_REASON_CODE_SUBSCRIPTION_NOT_SUPPORTED, "Subscription not Supported"},
2798 { ACN_DMP_REASON_CODE_NO_SUBSCRIPTIONS_SUPPORTED, "No Subscriptions Supported"},
2799 { 0, NULL },
2802 static const enum_val_t dmx_display_view[] = {
2803 { "hex" , "Hex ", ACN_PREF_DMX_DISPLAY_HEX },
2804 { "decimal", "Decimal", ACN_PREF_DMX_DISPLAY_DEC },
2805 { "percent", "Percent", ACN_PREF_DMX_DISPLAY_PER },
2806 { NULL, NULL, 0 }
2809 static const enum_val_t dmx_display_line_format[] = {
2810 { "20", "20 per line", ACN_PREF_DMX_DISPLAY_20PL },
2811 { "16", "16 per line", ACN_PREF_DMX_DISPLAY_16PL },
2812 { NULL, NULL, 0 }
2816 static const value_string magic_pdu_subtypes[] = {
2817 { MAGIC_V1, "V1" },
2818 { MAGIC_COMMAND, "V2 Command" },
2819 { MAGIC_REPLY, "V2 Reply" },
2820 { MAGIC_REPLY_TYPE_3, "V2 Reply Type 3" },
2821 { 0, NULL }
2824 static const value_string magic_v1command_vals[] = {
2825 { V1_SWITCH_TO_NET1, "Switch to Net1" },
2826 { V1_SWITCH_TO_NET2, "Switch to Net2" },
2827 { V1_BOOTP, "bootp" },
2828 { 0, NULL }
2831 static const value_string magic_command_vals[] = {
2832 { V2_CMD_SWITCH_TO_NET1, "Switch to Net1 mode" },
2833 { V2_CMD_SWITCH_TO_NET2, "Switch to Net2 mode" },
2834 { V2_CMD_DOWNLOAD, "Code download" },
2835 { V2_CMD_SOFTBOOT, "Soft reboot" },
2836 { V2_CMD_PHYSICAL_BEACON, "Physical beacon" },
2837 { V2_CMD_NETWORK_BEACON, "Network beacon" },
2838 { V2_CMD_SWITCH_TO_ACN, "Switch to ACN mode" },
2839 { V2_CMD_SWITCH_TO_DYNAMIC_IP, "Switch to dynamic IP address configuration" },
2840 { V2_CMD_EXTENDED_NETWORK_BEACON, "Extended network beacon" },
2841 { V2_CMD_IP_CONFIGURATION, "IP configuration" },
2842 { V2_CMD_RESTORE_FACTORY_DEFAULT, "Restore factory default" },
2843 { V2_CMD_PHYSICAL_BEACON_BY_CID, "Physical beacon by CID" },
2844 { V2_CMD_NET2_DOWNLOAD, "NET2 code download and reboot" },
2845 { 0, NULL }
2848 static const value_string magic_reset_lease_vals[] = {
2849 { MAGIC_SWITCH_TO_DYNAMIC_MAINTAIN_LEASE, "Maintain lease" },
2850 { MAGIC_SWITCH_TO_DYNAMIC_RESET_LEASE, "Reset lease" },
2851 { 0, NULL }
2854 static const value_string magic_ip_configuration_vals[] = {
2855 { MAGIC_DYNAMIC_IP_MAINTAIN_LEASE, "Dynamic IP, maintain lease" },
2856 { MAGIC_DYNAMIC_IP_RESET_LEASE, "Dynamic IP, reset lease" },
2857 { MAGIC_STATIC_IP, "Static IP" },
2858 { 0, NULL }
2861 static const value_string security_seq_type_vals[] = {
2862 { 0, "Time (ms since epoch)" },
2863 { 1, "Volatile" },
2864 { 2, "Non-volatile" },
2865 { 0, NULL }
2868 static const value_string rdmnet_llrp_vector_vals[] = {
2869 { RDMNET_LLRP_VECTOR_PROBE_REQUEST, "LLRP probe request" },
2870 { RDMNET_LLRP_VECTOR_PROBE_REPLY, "LLRP probe reply" },
2871 { RDMNET_LLRP_VECTOR_RDM_CMD, "LLRP RDM command" },
2872 { 0, NULL }
2875 static const value_string rdmnet_llrp_probe_request_vals[] = {
2876 { VECTOR_PROBE_REQUEST_DATA, "Vector probe request data" },
2877 { 0, NULL }
2880 static const value_string rdmnet_llrp_probe_reply_vals[] = {
2881 { VECTOR_PROBE_REPLY_DATA, "Vector probe reply data" },
2882 { 0, NULL }
2885 static const value_string rdmnet_llrp_probe_reply_component_type_vals[] = {
2886 { RDMNET_LLRP_COMPONENT_TYPE_RPT_DEVICE, "Device target" },
2887 { RDMNET_LLRP_COMPONENT_TYPE_RPT_CONTROLLER, "Controller target" },
2888 { RDMNET_LLRP_COMPONENT_TYPE_BROKER, "Broker target" },
2889 { RDMNET_LLRP_COMPONENT_TYPE_NON_RDMNET, "Non RDMnet target" },
2890 { 0, NULL }
2893 static const value_string rdmnet_llrp_rdm_command_start_code_vals[] = {
2894 { RDMNET_LLRP_VECTOR_RDM_CMD_START_CODE, "RDM Start Code" },
2895 { 0, NULL }
2898 static const value_string rdmnet_broker_disconnect_reason_vals[] = {
2899 { RDMNET_RPT_DISCONNECT_SHUTDOWN, "Component shut down" },
2900 { RDMNET_RPT_DISCONNECT_CAPACITY_EXHAUSTED, "Component capacity exhausted" },
2901 { RDMNET_RPT_DISCONNECT_HARDWARE_FAULT, "Component hardware fault" },
2902 { RDMNET_RPT_DISCONNECT_SOFTWARE_FAULT, "Component software fault" },
2903 { RDMNET_RPT_DISCONNECT_SOFTWARE_RESET, "Component software reset" },
2904 { RDMNET_RPT_DISCONNECT_INCORRECT_SCOPE, "Broker incorrect scope" },
2905 { RDMNET_RPT_DISCONNECT_LLRP_RECONFIGURE, "Component reconfigured by LLRP" },
2906 { RDMNET_RPT_DISCONNECT_RPT_RECONFIGURE, "Component reconfigured by RPT" },
2907 { RDMNET_RPT_DISCONNECT_USER_RECONFIGURE, "Component reconfigured by user" },
2908 { 0, NULL }
2911 static const value_string rdmnet_rpt_vector_vals[] = {
2912 { RDMNET_RPT_VECTOR_REQUEST, "Request" },
2913 { RDMNET_RPT_VECTOR_STATUS, "Status" },
2914 { RDMNET_RPT_VECTOR_NOTIFICATION, "Notification" },
2915 { 0, NULL }
2918 static const value_string rdmnet_rpt_request_vals[] = {
2919 { RDMNET_RPT_VECTOR_REQUEST_RDM_CMD, "RDM Command" },
2920 { 0, NULL }
2923 static const value_string rdmnet_rpt_status_vector_vals[] = {
2924 { RDMNET_RPT_VECTOR_STATUS_UNKNOWN_RPT_UID, "Unknown RPT UID" },
2925 { RDMNET_RPT_VECTOR_STATUS_RDM_TIMEOUT, "RDM Timeout" },
2926 { RDMNET_RPT_VECTOR_STATUS_RDM_INVALID_RESPONSE, "Invalid RDM Response" },
2927 { RDMNET_RPT_VECTOR_STATUS_UNKNOWN_RDM_UID, "Unknown RDM UID" },
2928 { RDMNET_RPT_VECTOR_STATUS_UNKNOWN_ENDPOINT, "Unknown Endpoint" },
2929 { RDMNET_RPT_VECTOR_STATUS_BROADCAST_COMPLETE, "Broadcast Complete" },
2930 { RDMNET_RPT_VECTOR_STATUS_UNKNOWN_VECTOR, "Unknown Vector" },
2931 { RDMNET_RPT_VECTOR_STATUS_INVALID_MESSAGE, "Invalid Message" },
2932 { RDMNET_RPT_VECTOR_STATUS_INVALID_COMMAND_CLASS, "Invalid Command Class" },
2933 { 0, NULL }
2936 static const value_string rdmnet_rpt_notification_vals[] = {
2937 { RDMNET_RPT_VECTOR_NOTIFICATION_RDM_CMD, "RDM Command" },
2938 { 0, NULL }
2941 static const value_string rdmnet_rpt_request_rdm_command_start_code_vals[] = {
2942 { RDMNET_RPT_VECTOR_RDM_CMD_RD_DATA, "RDM Start Code" },
2943 { 0, NULL }
2946 static const value_string rdmnet_broker_vector_vals[] = {
2947 { RDMNET_BROKER_VECTOR_FETCH_CLIENT_LIST, "Fetch client list" },
2948 { RDMNET_BROKER_VECTOR_CONNECTED_CLIENT_LIST, "Connected client list" },
2949 { RDMNET_BROKER_VECTOR_CLIENT_ADD, "Add client" },
2950 { RDMNET_BROKER_VECTOR_CLIENT_REMOVE, "Remove client" },
2951 { RDMNET_BROKER_VECTOR_CLIENT_ENTRY_CHANGE, "Change client entry" },
2952 { RDMNET_BROKER_VECTOR_CONNECT, "Connect" },
2953 { RDMNET_BROKER_VECTOR_CONNECT_REPLY, "Connect reply" },
2954 { RDMNET_BROKER_VECTOR_CLIENT_ENTRY_UPDATE, "Update client entry" },
2955 { RDMNET_BROKER_VECTOR_REDIRECT_V4, "Redirect IP v4" },
2956 { RDMNET_BROKER_VECTOR_REDIRECT_V6, "Redirect IP v6" },
2957 { RDMNET_BROKER_VECTOR_DISCONNECT, "Disconnect" },
2958 { RDMNET_BROKER_VECTOR_NULL, "Null" },
2959 { RDMNET_BROKER_VECTOR_REQUEST_DYNAMIC_UIDS, "Request Dynamic UIDs" },
2960 { RDMNET_BROKER_VECTOR_ASSIGNED_DYNAMIC_UIDS, "Assigned Dynamic UIDs" },
2961 { RDMNET_BROKER_VECTOR_FETCH_DYNAMIC_UID_LIST, "Fetch dynamic UID List" },
2962 { 0, NULL }
2965 static const value_string rdmnet_broker_status_code_vals[] = {
2966 { RDMNET_BROKER_CONNECT_OK, "Ok" },
2967 { RDMNET_BROKER_CONNECT_SCOPE_MISMATCH, "Scope mismatch" },
2968 { RDMNET_BROKER_CONNECT_CAPACITY_EXCEEDED, "Capacity exceeded" },
2969 { RDMNET_BROKER_CONNECT_DUPLICATE_UID, "Duplicate UID" },
2970 { RDMNET_BROKER_CONNECT_INVALID_CLIENT_ENTRY, "Invalid client entry" },
2971 { RDMNET_BROKER_CONNECT_INVALID_UID, "Invalid UID" },
2972 { 0, NULL }
2975 static const value_string dynamic_uid_mapping_status_code_vals[] = {
2976 { RDMNET_DYNAMIC_UID_STATUS_OK, "Dynamic UID Status Ok" },
2977 { RDMNET_DYNAMIC_UID_STATUS_INVALID_REQUEST, "Dynamic UID Status Invalid Request" },
2978 { RDMNET_DYNAMIC_UID_STATUS_UID_NOT_FOUND, "Dynamic UID Status UID Not Found" },
2979 { RDMNET_DYNAMIC_UID_STATUS_DUPLICATE_RID, "Dynamic UID Status Duplicate RID" },
2980 { RDMNET_DYNAMIC_UID_STATUS_CAPACITY_EXHAUSTED, "Dynamic UID Status Capacity Exhausted" },
2981 { 0, NULL }
2984 static const value_string broker_client_protocol_vals[] = {
2985 { RDMNET_CLIENT_PROTOCOL_RPT, "Client Protocol RPT" },
2986 { RDMNET_CLIENT_PROTOCOL_EPT, "Client Protocol EPT" },
2987 { 0, NULL }
2990 static const value_string broker_client_rpt_client_type_vals[] = {
2991 { RDMNET_RPT_CLIENT_TYPE_DEVICE, "Device" },
2992 { RDMNET_RPT_CLIENT_TYPE_CONTROLLER, "Controller" },
2993 { 0, NULL }
2996 static const value_string rdmnet_ept_vector_vals[] = {
2997 { RDMNET_EPT_VECTOR_DATA, "Data" },
2998 { RDMNET_EPT_VECTOR_STATUS, "Status" },
2999 { 0, NULL }
3002 static dissector_handle_t rdm_handle;
3004 /******************************************************************************/
3005 /* Test to see if it is a Magic Bullet Packet */
3006 static bool
3007 is_magic(tvbuff_t *tvb)
3009 static const uint8_t magic_protocol_id = 15;
3011 if (tvb_get_uint8(tvb, 0) == magic_protocol_id)
3012 return true;
3014 return false;
3017 /******************************************************************************/
3018 /* Dissect Magic Bullet */
3019 static int
3020 dissect_magic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3022 uint8_t pdu_subtype;
3023 int offset = 0;
3024 const char *pdu_subtype_string;
3025 proto_tree *ti, *subtype_item;
3026 proto_tree *magic_tree;
3027 uint32_t command;
3028 int32_t str_len;
3029 uint32_t major, minor, patch, aud, crit, build;
3030 char *buffer;
3032 /* Set the protocol column */
3033 col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAGIC");
3035 /* Create our tree */
3036 ti = proto_tree_add_item(tree, proto_magic, tvb, offset, -1, ENC_NA);
3037 magic_tree = proto_item_add_subtree(ti, ett_magic);
3039 /* Protocol ID */
3040 proto_tree_add_item(magic_tree, hf_magic_protocol_id, tvb, offset, 1, ENC_BIG_ENDIAN);
3041 offset++;
3043 /* PDU Type */
3044 pdu_subtype = tvb_get_uint8(tvb, offset);
3045 pdu_subtype_string = val_to_str(pdu_subtype, magic_pdu_subtypes, "Unknown (0x%02x)");
3047 /* Adjust info column */
3048 col_clear(pinfo->cinfo, COL_INFO);
3049 col_add_fstr(pinfo->cinfo, COL_INFO, "MAGIC - %s", pdu_subtype_string);
3051 /* Append subtype description */
3052 proto_item_append_text(ti, ": %s", pdu_subtype_string);
3054 subtype_item = proto_tree_add_item(magic_tree, hf_magic_pdu_subtype, tvb, offset, 1, ENC_BIG_ENDIAN);
3055 offset++;
3056 proto_tree_add_item(magic_tree, hf_magic_major_version, tvb, offset, 1, ENC_BIG_ENDIAN);
3057 offset++;
3058 proto_tree_add_item(magic_tree, hf_magic_minor_version, tvb, offset, 1, ENC_BIG_ENDIAN);
3059 offset++;
3061 switch (pdu_subtype) {
3062 case MAGIC_V1:
3063 proto_tree_add_item(magic_tree, hf_magic_v1command_vals, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3064 offset += 4;
3065 break;
3067 case MAGIC_COMMAND:
3068 /* note, v2 is big-endian */
3069 proto_tree_add_item_ret_uint(magic_tree, hf_magic_command_vals, tvb, offset, 4, ENC_BIG_ENDIAN, &command);
3070 offset += 4;
3071 /* deal with variable parameter */
3072 switch (command) {
3073 case V2_CMD_DOWNLOAD:
3074 proto_tree_add_item(magic_tree, hf_magic_command_tftp, tvb, offset, 4, ENC_BIG_ENDIAN);
3075 offset += 4;
3076 break;
3077 case V2_CMD_PHYSICAL_BEACON:
3078 proto_tree_add_item(magic_tree, hf_magic_command_beacon_duration, tvb, offset, 4, ENC_BIG_ENDIAN);
3079 offset += 4;
3080 break;
3081 case V2_CMD_NETWORK_BEACON:
3082 proto_tree_add_item(magic_tree, hf_magic_command_beacon_duration, tvb, offset, 4, ENC_BIG_ENDIAN);
3083 offset += 4;
3084 break;
3085 case V2_CMD_SWITCH_TO_DYNAMIC_IP:
3086 proto_tree_add_item(magic_tree, hf_magic_command_reset_lease, tvb, offset, 4, ENC_BIG_ENDIAN);
3087 offset += 4;
3088 break;
3089 case V2_CMD_EXTENDED_NETWORK_BEACON:
3090 proto_tree_add_item(magic_tree, hf_magic_command_beacon_duration, tvb, offset, 4, ENC_BIG_ENDIAN);
3091 offset += 4;
3092 break;
3093 case V2_CMD_IP_CONFIGURATION:
3094 proto_tree_add_item(magic_tree, hf_magic_command_cid, tvb, offset, 16, ENC_BIG_ENDIAN);
3095 offset += 16;
3096 proto_tree_add_item(magic_tree, hf_magic_command_ip_configuration, tvb, offset, 4, ENC_BIG_ENDIAN);
3097 offset += 4;
3098 proto_tree_add_item(magic_tree, hf_magic_command_ip_address, tvb, offset, 4, ENC_BIG_ENDIAN);
3099 offset += 4;
3100 proto_tree_add_item(magic_tree, hf_magic_command_subnet_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
3101 offset += 4;
3102 proto_tree_add_item(magic_tree, hf_magic_command_gateway, tvb, offset, 4, ENC_BIG_ENDIAN);
3103 offset += 4;
3104 break;
3105 case V2_CMD_RESTORE_FACTORY_DEFAULT:
3106 proto_tree_add_item(magic_tree, hf_magic_command_cid, tvb, offset, 16, ENC_BIG_ENDIAN);
3107 offset += 16;
3108 break;
3109 case V2_CMD_PHYSICAL_BEACON_BY_CID:
3110 proto_tree_add_item(magic_tree, hf_magic_command_cid, tvb, offset, 16, ENC_BIG_ENDIAN);
3111 offset += 16;
3112 proto_tree_add_item(magic_tree, hf_magic_command_beacon_duration, tvb, offset, 4, ENC_BIG_ENDIAN);
3113 offset += 4;
3114 break;
3115 /* case V2_CMD_SOFTBOOT: */
3116 /* case V2_CMD_SWITCH_TO_NET1: */
3117 /* case V2_CMD_SWITCH_TO_NET2: */
3118 /* case V2_CMD_SWITCH_TO_ACN: */
3119 /* case V2_CMD_NET2_DOWNLOAD: */
3121 break;
3123 case MAGIC_REPLY:
3124 /* note, v2 is big-endian */
3125 proto_tree_add_item(magic_tree, hf_magic_reply_ip_address, tvb, offset, 4, ENC_BIG_ENDIAN);
3126 offset += 4;
3127 proto_tree_add_item(magic_tree, hf_magic_reply_subnet_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
3128 offset += 4;
3129 proto_tree_add_item(magic_tree, hf_magic_reply_gateway, tvb, offset, 4, ENC_BIG_ENDIAN);
3130 offset += 4;
3131 proto_tree_add_item(magic_tree, hf_magic_reply_tftp, tvb, offset, 4, ENC_BIG_ENDIAN);
3132 offset += 4;
3134 /* encoded and display version */
3135 major = tvb_get_uint8(tvb, offset++);
3136 minor = tvb_get_uint8(tvb, offset++);
3137 patch = tvb_get_uint8(tvb, offset++);
3138 aud = tvb_get_uint8(tvb, offset++);
3139 crit = tvb_get_uint8(tvb, offset++);
3140 build = tvb_get_ntohs(tvb, offset);
3141 offset += 2;
3143 offset -= 7;
3144 buffer = wmem_strdup_printf(pinfo->pool, "%d.%d.%d.%d.%d.%d", major, minor, patch, aud, crit, build);
3145 proto_tree_add_string(magic_tree, hf_magic_reply_version, tvb, offset, 7, buffer);
3146 offset += 7;
3148 /* Device Type Name string */
3149 proto_tree_add_item_ret_length(magic_tree, hf_magic_reply_device_type_name, tvb, offset, 1, ENC_NA|ENC_ASCII, &str_len);
3150 offset += str_len;
3152 /* Default Name string */
3153 proto_tree_add_item_ret_length(magic_tree, hf_magic_reply_default_name, tvb, offset, 1, ENC_NA|ENC_ASCII, &str_len);
3154 offset += str_len;
3156 /* User Name string */
3157 proto_tree_add_item_ret_length(magic_tree, hf_magic_reply_user_name, tvb, offset, 1, ENC_NA|ENC_ASCII, &str_len);
3158 offset += str_len;
3159 break;
3161 case MAGIC_REPLY_TYPE_3:
3162 command = tvb_get_ntohl(tvb, offset);
3163 proto_tree_add_item(magic_tree, hf_magic_command_vals, tvb, offset, 4, ENC_BIG_ENDIAN);
3164 offset += 4;
3165 proto_tree_add_item(magic_tree, hf_magic_reply_ip_address, tvb, offset, 4, ENC_BIG_ENDIAN);
3166 offset += 4;
3167 proto_tree_add_item(magic_tree, hf_magic_reply_subnet_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
3168 offset += 4;
3169 proto_tree_add_item(magic_tree, hf_magic_reply_gateway, tvb, offset, 4, ENC_BIG_ENDIAN);
3170 offset += 4;
3171 proto_tree_add_item(magic_tree, hf_magic_reply_tftp, tvb, offset, 4, ENC_BIG_ENDIAN);
3172 offset += 4;
3173 proto_tree_add_item(magic_tree, hf_magic_reply_cid, tvb, offset, 16, ENC_BIG_ENDIAN);
3174 offset += 16;
3175 proto_tree_add_item(magic_tree, hf_magic_reply_dcid, tvb, offset, 16, ENC_BIG_ENDIAN);
3176 offset += 16;
3178 /* encoded and display version */
3179 major = tvb_get_uint8(tvb, offset++);
3180 minor = tvb_get_uint8(tvb, offset++);
3181 patch = tvb_get_uint8(tvb, offset++);
3182 aud = tvb_get_uint8(tvb, offset++);
3183 crit = tvb_get_uint8(tvb, offset++);
3184 build = tvb_get_ntohs(tvb, offset);
3185 offset += 2;
3187 offset -= 7;
3188 buffer = wmem_strdup_printf(pinfo->pool, "%d.%d.%d.%d.%d.%d", major, minor, patch, aud, crit, build);
3189 proto_tree_add_string(magic_tree, hf_magic_reply_version, tvb, offset, 7, buffer);
3190 offset += 7;
3192 /* Device Type Name string */
3193 proto_tree_add_item_ret_length(magic_tree, hf_magic_reply_device_type_name, tvb, offset, 1, ENC_NA|ENC_ASCII, &str_len);
3194 offset += str_len;
3196 /* Default Name string */
3197 proto_tree_add_item_ret_length(magic_tree, hf_magic_reply_default_name, tvb, offset, 1, ENC_NA|ENC_ASCII, &str_len);
3198 offset += str_len;
3200 /* User Name string */
3201 proto_tree_add_item_ret_length(magic_tree, hf_magic_reply_user_name, tvb, offset, 1, ENC_NA|ENC_ASCII, &str_len);
3202 offset += str_len;
3203 break;
3205 default:
3206 expert_add_info(pinfo, subtype_item, &ei_magic_reply_invalid_type);
3207 offset = tvb_captured_length(tvb);
3209 return offset;
3212 /******************************************************************************/
3213 /* Test to see if it is an ACN or an RDMnet Packet over UDP */
3214 static bool
3215 is_acn_or_rdmnet_over_udp(tvbuff_t *tvb, uint32_t *protocol_id)
3217 static const char acn_packet_id[] = "ASC-E1.17\0\0\0"; /* must be 12 bytes */
3218 uint32_t offset;
3219 uint8_t pdu_flags;
3221 if (tvb_captured_length(tvb) < (4+sizeof(acn_packet_id) + 6))
3222 return false;
3224 /* Check the bytes in octets 4 - 16 */
3225 if (tvb_memeql(tvb, 4, (const uint8_t*)acn_packet_id, sizeof(acn_packet_id)-1) != 0)
3226 return false;
3228 offset = 16;
3229 pdu_flags = tvb_get_uint8(tvb, offset) & 0xf0;
3230 if (pdu_flags & ACN_PDU_FLAG_L) {
3231 /* length bit is set: there are three length bytes */
3232 offset += 3;
3234 else {
3235 /* length bit is clear: there are two length bytes */
3236 offset += 2;
3239 *protocol_id = tvb_get_ntohl(tvb, offset);
3240 return true;
3243 /******************************************************************************/
3244 /* Test to see if it is an RDMnet Packet over TCP */
3245 static bool
3246 is_rdmnet_over_tcp(tvbuff_t *tvb)
3248 static const char acn_packet_id[] = "ASC-E1.17\0\0\0"; /* must be 12 bytes */
3249 uint32_t offset;
3250 uint32_t protocol_id;
3251 uint8_t pdu_flags;
3253 if (tvb_captured_length(tvb) < (4+sizeof(acn_packet_id))) {
3254 return false;
3257 /* Check the bytes in octets 0 - 12 */
3258 if (tvb_memeql(tvb, 0, (const uint8_t*)acn_packet_id, sizeof(acn_packet_id)-1) != 0) {
3259 return false;
3262 offset = 16;
3263 pdu_flags = tvb_get_uint8(tvb, offset) & 0xf0;
3264 if (pdu_flags & ACN_PDU_FLAG_L) {
3265 /* length bit is set: there are three length bytes */
3266 offset += 3;
3267 } else {
3268 /* length bit is clear: there are two length bytes */
3269 offset += 2;
3272 protocol_id = tvb_get_ntohl(tvb, offset);
3273 if ((protocol_id == ACN_PROTOCOL_ID_BROKER) ||
3274 (protocol_id == ACN_PROTOCOL_ID_RPT) ||
3275 (protocol_id == ACN_PROTOCOL_ID_EPT)) {
3276 return true;
3279 return false;
3282 /******************************************************************************/
3283 /* Test to see if it is an ACN Packet */
3284 static bool
3285 is_acn(tvbuff_t *tvb)
3287 uint32_t protocol_id;
3289 if (is_acn_or_rdmnet_over_udp(tvb, &protocol_id)) {
3290 if ((protocol_id == ACN_PROTOCOL_ID_DMX) ||
3291 (protocol_id == ACN_PROTOCOL_ID_DMX_2) ||
3292 (protocol_id == ACN_PROTOCOL_ID_DMX_3) ||
3293 (protocol_id == ACN_PROTOCOL_ID_SDT) ||
3294 (protocol_id == ACN_PROTOCOL_ID_EXTENDED))
3295 return true;
3298 return false;
3301 /******************************************************************************/
3302 /* Test to see if it is an ACN Packet */
3303 static bool
3304 is_rdmnet_over_udp(tvbuff_t *tvb)
3306 uint32_t protocol_id;
3308 if (is_acn_or_rdmnet_over_udp(tvb, &protocol_id) && (protocol_id == ACN_PROTOCOL_ID_LLRP)) {
3309 return true;
3312 return false;
3316 /******************************************************************************/
3317 /* Heuristic dissector */
3318 static bool
3319 dissect_acn_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
3321 /* This is a heuristic dissector, which means we get all the UDP
3322 * traffic not sent to a known dissector and not claimed by
3323 * a heuristic dissector called before us!
3326 if (is_acn(tvb)) {
3327 dissect_acn(tvb, pinfo, tree, data);
3328 return true;
3331 if (is_magic(tvb)) {
3332 dissect_magic(tvb, pinfo, tree);
3333 return true;
3336 /* abort if it is NOT an ACN or Magic Bullet packet */
3337 return false;
3341 /******************************************************************************/
3342 /* Heuristic dissector */
3343 static bool
3344 dissect_rdmnet_over_udp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
3346 if (!is_rdmnet_over_udp(tvb)) {
3347 return false;
3350 dissect_rdmnet(tvb, pinfo, tree, 0, 1);
3351 return true;
3354 #define RDMNET_TCP_FRAME_HEADER_LENGTH 16
3356 static int
3357 dissect_one_rdmnet_over_tcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
3359 if (!is_rdmnet_over_tcp(tvb)) {
3360 return 0;
3363 dissect_rdmnet(tvb, pinfo, tree, 0, 0);
3364 return tvb_captured_length(tvb);
3368 static unsigned
3369 get_rdmnet_tcp_message_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
3371 return (unsigned)tvb_get_ntohl(tvb, offset + 12) + 16;
3374 static int
3375 dissect_rdmnet_over_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
3377 tcp_dissect_pdus(tvb, pinfo, tree, true, RDMNET_TCP_FRAME_HEADER_LENGTH,
3378 get_rdmnet_tcp_message_length, dissect_one_rdmnet_over_tcp_message, data);
3379 return tvb_captured_length(tvb);
3383 /******************************************************************************/
3384 /* Heuristic dissector */
3385 static bool
3386 dissect_rdmnet_over_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
3388 if (!is_rdmnet_over_tcp(tvb)) {
3389 return false;
3392 dissect_rdmnet_over_tcp(tvb, pinfo, tree, data);
3393 return true;
3397 /******************************************************************************/
3398 /* Adds tree branch for channel owner info block */
3399 static uint32_t
3400 acn_add_channel_owner_info_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
3402 proto_item *pi;
3403 proto_tree *this_tree;
3404 uint32_t session_count;
3405 uint32_t x;
3407 this_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_acn_channel_owner_info_block, NULL,
3408 "Channel Owner Info Block");
3410 proto_tree_add_item(this_tree, hf_acn_member_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3411 offset += 2;
3412 proto_tree_add_item(this_tree, hf_acn_channel_number, tvb, offset, 2, ENC_BIG_ENDIAN);
3413 offset += 2;
3414 offset = acn_add_address(tvb, pinfo, this_tree, offset, "Destination Address:");
3415 offset = acn_add_address(tvb, pinfo, this_tree, offset, "Source Address:");
3417 session_count = tvb_get_ntohs(tvb, offset);
3418 for (x=0; x<session_count; x++) {
3419 pi = proto_tree_add_item(this_tree, hf_acn_protocol_id, tvb, offset, 4, ENC_BIG_ENDIAN);
3420 proto_item_append_text(pi, " #%d", x+1);
3421 offset += 4;
3423 return offset;
3426 /******************************************************************************/
3427 /* Adds tree branch for channel member info block */
3428 static uint32_t
3429 acn_add_channel_member_info_block(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
3431 proto_item *pi;
3432 proto_tree *this_tree;
3433 uint32_t session_count;
3434 uint32_t x;
3436 this_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_acn_channel_member_info_block,
3437 NULL, "Channel Member Info Block");
3439 proto_tree_add_item(this_tree, hf_acn_member_id, tvb, offset, 2, ENC_BIG_ENDIAN);
3440 offset += 2;
3441 proto_tree_add_item(this_tree, hf_acn_cid, tvb, offset, 16, ENC_BIG_ENDIAN);
3442 offset += 16;
3443 proto_tree_add_item(this_tree, hf_acn_channel_number, tvb, offset, 2, ENC_BIG_ENDIAN);
3444 offset += 2;
3445 offset = acn_add_address(tvb, pinfo, this_tree, offset, "Destination Address:");
3446 offset = acn_add_address(tvb, pinfo, this_tree, offset, "Source Address:");
3447 proto_tree_add_item(this_tree, hf_acn_reciprocal_channel, tvb, offset, 2, ENC_BIG_ENDIAN);
3448 offset += 2;
3450 session_count = tvb_get_ntohs(tvb, offset);
3451 for (x=0; x<session_count; x++) {
3452 pi = proto_tree_add_item(this_tree, hf_acn_protocol_id, tvb, offset, 4, ENC_BIG_ENDIAN);
3453 proto_item_append_text(pi, " #%d", x+1);
3454 offset += 4;
3456 return offset;
3460 /******************************************************************************/
3461 /* Add labeled expiry */
3462 static uint32_t
3463 acn_add_expiry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, int hf)
3465 proto_tree_add_item(tree, hf, tvb, offset, 1, ENC_NA);
3466 offset += 1;
3467 return offset;
3471 /******************************************************************************/
3472 /* Adds tree branch for channel parameters */
3473 static uint32_t
3474 acn_add_channel_parameter(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
3476 proto_tree *param_tree;
3478 param_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_acn_channel_parameter,
3479 NULL, "Channel Parameter Block");
3480 proto_tree_add_item(param_tree, hf_acn_expiry, tvb, offset, 1, ENC_BIG_ENDIAN);
3481 offset += 1;
3482 proto_tree_add_item(param_tree, hf_acn_nak_outbound_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
3483 offset += 1;
3484 proto_tree_add_item(param_tree, hf_acn_nak_holdoff, tvb, offset, 2, ENC_BIG_ENDIAN);
3485 offset += 2;
3486 proto_tree_add_item(param_tree, hf_acn_nak_modulus, tvb, offset, 2, ENC_BIG_ENDIAN);
3487 offset += 2;
3488 proto_tree_add_item(param_tree, hf_acn_nak_max_wait, tvb, offset, 2, ENC_BIG_ENDIAN);
3489 offset += 2;
3490 return offset; /* bytes used */
3494 /******************************************************************************/
3495 /* Add an address tree */
3496 static uint32_t
3497 acn_add_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, const char *label)
3499 proto_item *pi;
3500 proto_tree *addr_tree = NULL;
3501 uint8_t ip_address_type;
3502 uint32_t port;
3504 /* Get type */
3505 ip_address_type = tvb_get_uint8(tvb, offset);
3507 switch (ip_address_type) {
3508 case ACN_ADDR_NULL:
3509 proto_tree_add_item(tree, hf_acn_ip_address_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3510 offset += 1;
3511 break;
3512 case ACN_ADDR_IPV4:
3513 /* Build tree and add type*/
3514 addr_tree = proto_tree_add_subtree(tree, tvb, offset, 7, ett_acn_address, &pi, label);
3515 proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3516 offset += 1;
3517 /* Add port */
3518 port = tvb_get_ntohs(tvb, offset);
3519 proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, ENC_BIG_ENDIAN);
3520 offset += 2;
3521 /* Add Address */
3522 proto_tree_add_item(addr_tree, hf_acn_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
3523 /* Append port and address to tree item */
3524 proto_item_append_text(pi, " %s, Port %d", tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset), port);
3525 offset += 4;
3526 break;
3527 case ACN_ADDR_IPV6:
3528 /* Build tree and add type*/
3529 addr_tree = proto_tree_add_subtree(tree, tvb, offset, 19, ett_acn_address, &pi, label);
3530 proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3531 offset += 1;
3532 /* Add port */
3533 port = tvb_get_ntohs(tvb, offset);
3534 proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, ENC_BIG_ENDIAN);
3535 offset += 2;
3536 /* Add Address */
3537 proto_tree_add_item(addr_tree, hf_acn_ipv6, tvb, offset, 16, ENC_NA);
3538 /* Append port and address to tree item */
3539 proto_item_append_text(pi, " %s, Port %d", tvb_address_to_str(pinfo->pool, tvb, AT_IPv6, offset), port);
3540 offset += 16;
3541 break;
3542 case ACN_ADDR_IPPORT:
3543 /* Build tree and add type*/
3544 addr_tree = proto_tree_add_subtree(tree, tvb, offset, 3, ett_acn_address, &pi, label);
3545 proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3546 offset += 1;
3547 /* Add port */
3548 port = tvb_get_ntohs(tvb, offset);
3549 proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, ENC_BIG_ENDIAN);
3550 /* Append port to tree item */
3551 proto_item_append_text(pi, " Port %d", port);
3552 offset += 2;
3553 break;
3555 return offset;
3558 /******************************************************************************/
3559 /* Adds tree branch for address type */
3560 static uint32_t
3561 acn_add_dmp_address_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, acn_dmp_adt_type *adt)
3563 proto_tree *this_tree;
3564 uint8_t D;
3565 const char *name;
3567 /* header contains address and data type */
3568 adt->flags = tvb_get_uint8(tvb, offset);
3570 D = ACN_DMP_ADT_EXTRACT_D(adt->flags);
3571 name = val_to_str(D, acn_dmp_adt_d_vals, "not valid (%d)");
3572 this_tree = proto_tree_add_subtree_format(tree, tvb, offset, 1, ett_acn_address_type,
3573 NULL, "Address and Data Type: %s", name);
3575 proto_tree_add_uint(this_tree, hf_acn_dmp_adt_v, tvb, offset, 1, adt->flags);
3576 proto_tree_add_uint(this_tree, hf_acn_dmp_adt_r, tvb, offset, 1, adt->flags);
3577 proto_tree_add_uint(this_tree, hf_acn_dmp_adt_d, tvb, offset, 1, adt->flags);
3578 proto_tree_add_uint(this_tree, hf_acn_dmp_adt_x, tvb, offset, 1, adt->flags);
3579 proto_tree_add_uint(this_tree, hf_acn_dmp_adt_a, tvb, offset, 1, adt->flags);
3580 offset += 1;
3582 return offset; /* bytes used */
3585 /******************************************************************************/
3586 /* Add an dmp address */
3587 static uint32_t
3588 acn_add_dmp_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, acn_dmp_adt_type *adt)
3590 int32_t start_offset;
3591 int32_t bytes_used;
3592 uint8_t D, A;
3594 start_offset = offset;
3596 D = ACN_DMP_ADT_EXTRACT_D(adt->flags);
3597 A = ACN_DMP_ADT_EXTRACT_A(adt->flags);
3599 switch (D) {
3600 case ACN_DMP_ADT_D_NS: /* Non-range address, Single data item */
3601 adt->increment = 1;
3602 adt->count = 1;
3603 switch (A) { /* address */
3604 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
3605 adt->address = tvb_get_uint8(tvb, offset);
3606 offset += 1;
3607 bytes_used = 1;
3608 break;
3609 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
3610 adt->address = tvb_get_ntohs(tvb, offset);
3611 offset += 2;
3612 bytes_used = 2;
3613 break;
3614 case ACN_DMP_ADT_A_4: /* Four octet address, (range: one octet address, increment, and count). */
3615 adt->address = tvb_get_ntohl(tvb, offset);
3616 offset += 4;
3617 bytes_used = 4;
3618 break;
3619 default: /* and ACN_DMP_ADT_A_R (Four octet address, (range: four octet address, increment, and count)*/
3620 return offset;
3621 } /* of switch (A) */
3623 if (adt->flags & ACN_DMP_ADT_FLAG_V) {
3624 proto_tree_add_uint(tree, hf_acn_dmp_virtual_address, tvb, start_offset, bytes_used, adt->address);
3625 } else {
3626 proto_tree_add_uint(tree, hf_acn_dmp_actual_address, tvb, start_offset, bytes_used, adt->address);
3628 break;
3630 case ACN_DMP_ADT_D_RS: /* Range address, Single data item */
3631 switch (A) {
3632 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
3633 adt->address = tvb_get_uint8(tvb, offset);
3634 offset += 1;
3635 adt->increment = tvb_get_uint8(tvb, offset);
3636 offset += 1;
3637 adt->count = tvb_get_uint8(tvb, offset);
3638 offset += 1;
3639 bytes_used = 3;
3640 break;
3641 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
3642 adt->address = tvb_get_ntohs(tvb, offset);
3643 offset += 2;
3644 adt->increment = tvb_get_ntohs(tvb, offset);
3645 offset += 2;
3646 adt->count = tvb_get_ntohs(tvb, offset);
3647 offset += 2;
3648 bytes_used = 6;
3649 break;
3650 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
3651 adt->address = tvb_get_ntohl(tvb, offset);
3652 offset += 4;
3653 adt->increment = tvb_get_ntohl(tvb, offset);
3654 offset += 4;
3655 adt->count = tvb_get_ntohl(tvb, offset);
3656 offset += 4;
3657 bytes_used = 12;
3658 break;
3659 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
3660 return offset;
3661 } /* of switch (A) */
3663 if (adt->flags & ACN_DMP_ADT_FLAG_V) {
3664 proto_tree_add_uint_format_value(tree, hf_acn_dmp_virtual_address_first, tvb, start_offset, bytes_used,
3665 adt->address, "0x%X, inc: %d, count: %d",
3666 adt->address, adt->increment, adt->count);
3667 } else {
3668 proto_tree_add_uint_format_value(tree, hf_acn_dmp_actual_address_first, tvb, start_offset, bytes_used,
3669 adt->address, "0x%X, inc: %d, count: %d",
3670 adt->address, adt->increment, adt->count);
3672 break;
3674 case ACN_DMP_ADT_D_RE: /* Range address, Array of equal size data items */
3675 switch (A) {
3676 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
3677 adt->address = tvb_get_uint8(tvb, offset);
3678 offset += 1;
3679 adt->increment = tvb_get_uint8(tvb, offset);
3680 offset += 1;
3681 adt->count = tvb_get_uint8(tvb, offset);
3682 offset += 1;
3683 bytes_used = 3;
3684 break;
3685 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
3686 adt->address = tvb_get_ntohs(tvb, offset);
3687 offset += 2;
3688 adt->increment = tvb_get_ntohs(tvb, offset);
3689 offset += 2;
3690 adt->count = tvb_get_ntohs(tvb, offset);
3691 offset += 2;
3692 bytes_used = 6;
3693 break;
3694 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
3695 adt->address = tvb_get_ntohl(tvb, offset);
3696 offset += 4;
3697 adt->increment = tvb_get_ntohl(tvb, offset);
3698 offset += 4;
3699 adt->count = tvb_get_ntohl(tvb, offset);
3700 offset += 4;
3701 bytes_used = 12;
3702 break;
3703 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
3704 return offset;
3705 } /* of switch (A) */
3707 if (adt->flags & ACN_DMP_ADT_FLAG_V) {
3708 proto_tree_add_uint_format_value(tree, hf_acn_dmp_virtual_address_first, tvb, start_offset, bytes_used,
3709 adt->address, "0x%X, inc: %d, count: %d",
3710 adt->address, adt->increment, adt->count);
3711 } else {
3712 proto_tree_add_uint_format_value(tree, hf_acn_dmp_actual_address_first, tvb, start_offset, bytes_used,
3713 adt->address, "0x%X, inc: %d, count: %d",
3714 adt->address, adt->increment, adt->count);
3716 break;
3718 case ACN_DMP_ADT_D_RM: /* Range address, Series of mixed size data items */
3719 switch (A) {
3720 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
3721 adt->address = tvb_get_uint8(tvb, offset);
3722 offset += 1;
3723 adt->increment = tvb_get_uint8(tvb, offset);
3724 offset += 1;
3725 adt->count = tvb_get_uint8(tvb, offset);
3726 offset += 1;
3727 bytes_used = 3;
3728 break;
3729 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
3730 adt->address = tvb_get_ntohs(tvb, offset);
3731 offset += 2;
3732 adt->increment = tvb_get_ntohs(tvb, offset);
3733 offset += 2;
3734 adt->count = tvb_get_ntohs(tvb, offset);
3735 offset += 2;
3736 bytes_used = 6;
3737 break;
3738 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
3739 adt->address = tvb_get_ntohl(tvb, offset);
3740 offset += 4;
3741 adt->increment = tvb_get_ntohl(tvb, offset);
3742 offset += 4;
3743 adt->count = tvb_get_ntohl(tvb, offset);
3744 offset += 4;
3745 bytes_used = 12;
3746 break;
3747 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
3748 return offset;
3749 } /* of switch (A) */
3751 if (adt->flags & ACN_DMP_ADT_FLAG_V) {
3752 proto_tree_add_uint_format_value(tree, hf_acn_dmp_virtual_address_first, tvb, start_offset, bytes_used,
3753 adt->address, "0x%X, inc: %d, count: %d",
3754 adt->address, adt->increment, adt->count);
3755 } else {
3756 proto_tree_add_uint_format_value(tree, hf_acn_dmp_actual_address_first, tvb, start_offset, bytes_used,
3757 adt->address, "0x%X, inc: %d, count: %d",
3758 adt->address, adt->increment, adt->count);
3760 break;
3761 } /* of switch (D) */
3763 return offset;
3767 /*******************************************************************************/
3768 /* Display DMP Data */
3769 static uint32_t
3770 acn_add_dmp_data(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, acn_dmp_adt_type *adt)
3772 uint8_t D, A;
3773 uint32_t data_size;
3774 uint32_t data_value;
3775 uint32_t data_address;
3776 uint32_t x,y;
3777 char *buffer;
3778 wmem_strbuf_t *default_buffer;
3779 proto_item *ti;
3780 uint32_t ok_to_process = false;
3782 /* We would like to rip through Property Address-Data pairs */
3783 /* but since we don't now how many there are nor how big the data size is, */
3784 /* it not possible. So, we just show the whole thing as a block of date! */
3785 /* */
3786 /* There are a few exceptions however */
3787 /* 1) if the address type is ACN_DMP_ADT_D_NS or ACN_DMP_ADT_D_RS and */
3788 /* or ACN_DMP_ADT_D_RE */
3789 /* then number of bytes is <= count + 4. Each value is at least one byte */
3790 /* and another address/data pair is at least 4 bytes so if the remaining */
3791 /* bytes is less than the count plus 4 then the remaining data */
3792 /* must be all data */
3793 /* */
3794 /* 2) if the address type is ACN_DMP_ADT_D_RE and the number of bytes */
3795 /* equals the number of bytes in remaining in the pdu then there is */
3796 /* a 1 to one match */
3798 D = ACN_DMP_ADT_EXTRACT_D(adt->flags);
3799 switch (D) {
3800 case ACN_DMP_ADT_D_NS:
3801 case ACN_DMP_ADT_D_RS:
3802 if (adt->data_length <= adt->count + 4) {
3803 ok_to_process = true;
3805 break;
3806 case ACN_DMP_ADT_D_RE:
3807 if (adt->count == 0) {
3808 break;
3810 if (adt->data_length <= adt->count + 4) {
3811 ok_to_process = true;
3813 break;
3816 if (!ok_to_process) {
3817 data_size = adt->data_length;
3818 ti = proto_tree_add_item(tree, hf_acn_data, tvb, offset, data_size, ENC_NA);
3819 offset += data_size;
3820 proto_item_set_text(ti, "Data and more Address-Data Pairs (further dissection not possible)");
3821 return offset;
3824 A = ACN_DMP_ADT_EXTRACT_A(adt->flags);
3826 switch (D) {
3827 case ACN_DMP_ADT_D_NS: /* Non-range address, Single data item */
3828 /* calculate data size */
3829 data_size = adt->data_length;
3830 data_address = adt->address;
3832 switch (A) {
3833 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
3834 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%2.2X ->", data_address);
3835 break;
3836 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
3837 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%4.4X ->", data_address);
3838 break;
3839 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
3840 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%8.8X ->", data_address);
3841 break;
3842 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
3843 offset += data_size;
3844 return offset;
3847 switch (data_size) {
3848 case 1:
3849 data_value = tvb_get_uint8(tvb, offset);
3850 proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value);
3851 break;
3852 case 2:
3853 data_value = tvb_get_ntohs(tvb, offset);
3854 proto_tree_add_uint_format(tree, hf_acn_data16, tvb, offset, 2, data_value, "%s %4.4X", buffer, data_value);
3855 break;
3856 case 3:
3857 data_value = tvb_get_ntoh24(tvb, offset);
3858 proto_tree_add_uint_format(tree, hf_acn_data24, tvb, offset, 3, data_value, "%s %6.6X", buffer, data_value);
3859 break;
3860 case 4:
3861 data_value = tvb_get_ntohl(tvb, offset);
3862 proto_tree_add_uint_format(tree, hf_acn_data32, tvb, offset, 4, data_value, "%s %8.8X", buffer, data_value);
3863 break;
3864 default:
3865 default_buffer = wmem_strbuf_new(pinfo->pool, "");
3866 /* build string of values */
3867 for (y=0; y<20 && y<data_size; y++) {
3868 data_value = tvb_get_uint8(tvb, offset+y);
3869 wmem_strbuf_append_printf(default_buffer, " %2.2X", data_value);
3871 /* add the item */
3872 ti = proto_tree_add_item(tree, hf_acn_data, tvb, offset, data_size, ENC_NA);
3873 offset += data_size;
3874 /* change the text */
3875 proto_item_set_text(ti, "%s", wmem_strbuf_get_str(default_buffer));
3876 break;
3877 } /* of switch (data_size) */
3878 offset += data_size;
3879 break;
3881 case ACN_DMP_ADT_D_RS: /* Range address, Single data item */
3882 /* calculate data size */
3883 data_size = adt->data_length;
3884 data_address = adt->address;
3886 for (x=0; x<adt->count; x++) {
3887 switch (A) {
3888 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
3889 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%2.2X ->", data_address);
3890 break;
3891 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
3892 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%4.4X ->", data_address);
3893 break;
3894 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
3895 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%8.8X ->", data_address);
3896 break;
3897 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
3898 return offset;
3901 switch (data_size) {
3902 case 1:
3903 data_value = tvb_get_uint8(tvb, offset);
3904 proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value);
3905 break;
3906 case 2:
3907 data_value = tvb_get_ntohs(tvb, offset);
3908 proto_tree_add_uint_format(tree, hf_acn_data16, tvb, offset, 2, data_value, "%s %4.4X", buffer, data_value);
3909 break;
3910 case 3:
3911 data_value = tvb_get_ntoh24(tvb, offset);
3912 proto_tree_add_uint_format(tree, hf_acn_data24, tvb, offset, 3, data_value, "%s %6.6X", buffer, data_value);
3913 break;
3914 case 4:
3915 data_value = tvb_get_ntohl(tvb, offset);
3916 proto_tree_add_uint_format(tree, hf_acn_data32, tvb, offset, 4, data_value, "%s %8.8X", buffer, data_value);
3917 break;
3918 default:
3919 /* build string of values */
3920 default_buffer = wmem_strbuf_new(pinfo->pool, "");
3921 for (y=0; y<20 && y<data_size; y++) {
3922 data_value = tvb_get_uint8(tvb, offset+y);
3923 wmem_strbuf_append_printf(default_buffer, " %2.2X", data_value);
3925 /* add the item */
3926 ti = proto_tree_add_item(tree, hf_acn_data, tvb, offset, data_size, ENC_NA);
3927 /* change the text */
3928 proto_item_set_text(ti, "%s", wmem_strbuf_get_str(default_buffer));
3929 break;
3930 } /* of switch (data_size) */
3931 data_address += adt->increment;
3932 } /* of (x=0;x<adt->count;x++) */
3933 offset += data_size;
3934 break;
3936 case ACN_DMP_ADT_D_RE: /* Range address, Array of equal size data items */
3937 /* calculate data size */
3938 data_size = adt->data_length / adt->count;
3939 data_address = adt->address;
3941 for (x=0; x<adt->count; x++) {
3942 switch (A) {
3943 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
3944 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%2.2X ->", data_address);
3945 break;
3946 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
3947 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%4.4X ->", data_address);
3948 break;
3949 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
3950 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%8.8X ->", data_address);
3951 break;
3952 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
3953 return offset;
3956 switch (data_size) {
3957 case 1:
3958 data_value = tvb_get_uint8(tvb, offset);
3959 proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %2.2X", buffer, data_value);
3960 break;
3961 case 2:
3962 data_value = tvb_get_ntohs(tvb, offset);
3963 proto_tree_add_uint_format(tree, hf_acn_data16, tvb, offset, 2, data_value, "%s %4.4X", buffer, data_value);
3964 break;
3965 case 3:
3966 data_value = tvb_get_ntoh24(tvb, offset);
3967 proto_tree_add_uint_format(tree, hf_acn_data24, tvb, offset, 3, data_value, "%s %6.6X", buffer, data_value);
3968 break;
3969 case 4:
3970 data_value = tvb_get_ntohl(tvb, offset);
3971 proto_tree_add_uint_format(tree, hf_acn_data32, tvb, offset, 4, data_value, "%s %8.8X", buffer, data_value);
3972 break;
3973 default:
3974 /* build string of values */
3975 default_buffer = wmem_strbuf_new(pinfo->pool, "");
3976 for (y=0; y<20 && y<data_size; y++) {
3977 data_value = tvb_get_uint8(tvb, offset+y);
3978 wmem_strbuf_append_printf(default_buffer, " %2.2X", data_value);
3980 /* add the item */
3981 ti = proto_tree_add_item(tree, hf_acn_data, tvb, offset, data_size, ENC_NA);
3982 /* change the text */
3983 proto_item_set_text(ti, "%s", wmem_strbuf_get_str(default_buffer));
3984 break;
3985 } /* of switch (data_size) */
3987 offset += data_size;
3988 data_address += adt->increment;
3989 } /* of (x=0;x<adt->count;x++) */
3990 break;
3992 case ACN_DMP_ADT_D_RM: /* Range address, Series of mixed size data items */
3993 data_size = adt->data_length;
3994 ti = proto_tree_add_item(tree, hf_acn_data, tvb, offset, data_size, ENC_NA);
3995 offset += data_size;
3996 /* change the text */
3997 proto_item_set_text(ti, "Mixed size data items");
3998 break;
3999 } /* of switch (D) */
4000 return offset;
4003 /*******************************************************************************/
4004 /* Display DMP Reason codes */
4005 static uint32_t
4006 acn_add_dmp_reason_codes(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, acn_dmp_adt_type *adt)
4008 uint8_t D, A;
4009 uint32_t data_value;
4010 uint32_t data_address;
4011 uint32_t x;
4013 char *buffer;
4014 const char *name;
4016 D = ACN_DMP_ADT_EXTRACT_D(adt->flags);
4017 A = ACN_DMP_ADT_EXTRACT_A(adt->flags);
4018 switch (D) {
4019 case ACN_DMP_ADT_D_NS: /* Non-range address, Single data item */
4020 data_address = adt->address;
4021 switch (A) {
4022 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
4023 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%2.2X ->", data_address);
4024 break;
4025 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
4026 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%4.4X ->", data_address);
4027 break;
4028 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
4029 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%8.8X ->", data_address);
4030 break;
4031 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
4032 return offset;
4035 /* Get reason */
4036 data_value = tvb_get_uint8(tvb, offset);
4037 name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)");
4038 proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %s", buffer, name);
4039 offset += 1;
4040 break;
4042 case ACN_DMP_ADT_D_RS: /* Range address, Single data item */
4043 data_address = adt->address;
4044 for (x=0; x<adt->count; x++) {
4045 switch (A) {
4046 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
4047 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%2.2X ->", data_address);
4048 break;
4049 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
4050 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%4.4X ->", data_address);
4051 break;
4052 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
4053 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%8.8X ->", data_address);
4054 break;
4055 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
4056 return offset;
4059 /* Get reason */
4060 data_value = tvb_get_uint8(tvb, offset);
4061 name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)");
4062 proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %s", buffer, name);
4064 data_address += adt->increment;
4065 } /* of (x=0;x<adt->count;x++) */
4066 offset += 1;
4067 break;
4069 case ACN_DMP_ADT_D_RE: /* Range address, Array of equal size data items */
4070 case ACN_DMP_ADT_D_RM: /* Range address, Series of mixed size data items */
4071 data_address = adt->address;
4072 for (x=0; x<adt->count; x++) {
4073 switch (A) {
4074 case ACN_DMP_ADT_A_1: /* One octet address, (range: one octet address, increment, and count). */
4075 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%2.2X ->", data_address);
4076 break;
4077 case ACN_DMP_ADT_A_2: /* Two octet address, (range: two octet address, increment, and count). */
4078 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%4.4X ->", data_address);
4079 break;
4080 case ACN_DMP_ADT_A_4: /* Four octet address, (range: four octet address, increment, and count). */
4081 buffer = wmem_strdup_printf(pinfo->pool, "Addr 0x%8.8X ->", data_address);
4082 break;
4083 default: /* and ACN_DMP_ADT_A_R, this reserved....so it has no meaning yet */
4084 return offset;
4086 /* Get reason */
4087 data_value = tvb_get_uint8(tvb, offset);
4088 name = val_to_str(data_value, acn_dmp_reason_code_vals, "reason not valid (%d)");
4089 proto_tree_add_uint_format(tree, hf_acn_data8, tvb, offset, 1, data_value, "%s %s", buffer, name);
4090 data_address += adt->increment;
4091 offset += 1;
4092 } /* of (x=0;x<adt->count;x++) */
4093 break;
4094 } /* of switch (D) */
4095 return offset;
4098 /******************************************************************************/
4099 /* Get Field Type Parameters */
4100 static void
4101 get_field_type_parameters(tvbuff_t *tvb, int blob_offset, uint8_t field_type, uint8_t *field_length, uint8_t *blob_offset1, uint8_t *blob_offset2, uint8_t *blob_offset3)
4103 /* Switch Over Field Type to Determine Data */
4104 switch (field_type) {
4105 case ACN_BLOB_FIELD_TYPE1:
4106 case ACN_BLOB_FIELD_TYPE5:
4107 /* Set field length and blob_offsets to use */
4108 *field_length = 1;
4109 *blob_offset1 = 0;
4110 *blob_offset2 = 1;
4111 *blob_offset3 = *field_length;
4112 break;
4113 case ACN_BLOB_FIELD_TYPE2:
4114 case ACN_BLOB_FIELD_TYPE6:
4115 /* Set field length and blob_offsets to use */
4116 *field_length = 2;
4117 *blob_offset1 = 0;
4118 *blob_offset2 = 1;
4119 *blob_offset3 = *field_length;
4120 break;
4121 case ACN_BLOB_FIELD_TYPE3:
4122 case ACN_BLOB_FIELD_TYPE7:
4123 /* Set field length and blob_offsets to use */
4124 *field_length = 4;
4125 *blob_offset1 = 0;
4126 *blob_offset2 = 1;
4127 *blob_offset3 = *field_length;
4128 break;
4129 case ACN_BLOB_FIELD_TYPE4:
4130 case ACN_BLOB_FIELD_TYPE8:
4131 /* Set field length and blob_offsets to use */
4132 *field_length = 8;
4133 *blob_offset1 = 0;
4134 *blob_offset2 = 1;
4135 *blob_offset3 = *field_length;
4136 break;
4137 case ACN_BLOB_FIELD_TYPE9:
4138 /* float */
4139 /* Set field length and blob_offsets to use */
4140 *field_length = 4;
4141 *blob_offset1 = 0;
4142 *blob_offset2 = 1;
4143 *blob_offset3 = *field_length;
4144 break;
4145 case ACN_BLOB_FIELD_TYPE10:
4146 /* double */
4147 /* Set field length and blob_offsets to use */
4148 *field_length = 8;
4149 *blob_offset1 = 0;
4150 *blob_offset2 = 1;
4151 *blob_offset3 = *field_length;
4152 break;
4153 case ACN_BLOB_FIELD_TYPE11:
4154 /* Set field length and blob_offsets to use */
4155 *field_length = tvb_get_uint8(tvb, blob_offset + 2);
4156 *blob_offset1 = 2;
4157 *blob_offset2 = 1;
4158 *blob_offset3 = (*field_length) - 2;
4159 break;
4160 case ACN_BLOB_FIELD_TYPE12:
4161 /* Set field length and blob_offsets to use for ignores */
4162 *field_length = 0;
4163 *blob_offset1 = 0;
4164 *blob_offset2 = 0;
4165 *blob_offset3 = 1;
4166 break;
4167 default:
4168 /* Set field length and blob_offsets to use for unknowns */
4169 *field_length = 0;
4170 *blob_offset1 = 0;
4171 *blob_offset2 = 0;
4172 *blob_offset3 = 1;
4176 /******************************************************************************/
4177 /* Get Field Name */
4178 static const char *
4179 get_field_name(uint8_t blob_type, uint16_t field_number)
4181 uint16_t temp_field_number;
4182 const char *field_name;
4184 /*Find the field sub tree name depending on the blob type.*/
4185 switch (blob_type) {
4186 case ACN_BLOB_IPV4:
4187 case ACN_BLOB_IPV6:
4188 field_name = val_to_str(field_number, acn_blob_ip_field_name, "not valid (%d)");
4189 break;
4190 case ACN_BLOB_ERROR1:
4191 field_name = val_to_str(field_number, acn_blob_error1_field_name, "not valid (%d)");
4192 break;
4193 case ACN_BLOB_ERROR2:
4194 field_name = val_to_str(field_number, acn_blob_error2_field_name, "not valid (%d)");
4195 break;
4196 case ACN_BLOB_METADATA:
4197 field_name = val_to_str(field_number, acn_blob_metadata_field_name, "not valid (%d)");
4198 break;
4199 case ACN_BLOB_METADATA_DEVICES:
4200 field_name = val_to_str(field_number, acn_blob_metadata_devices_field_name, "not valid (%d)");
4201 break;
4202 case ACN_BLOB_METADATA_TYPES:
4203 field_name = val_to_str(field_number, acn_blob_metadata_types_field_name, "not valid (%d)");
4204 break;
4205 case ACN_BLOB_TIME1:
4206 field_name = val_to_str(field_number, acn_blob_time1_field_name, "not valid (%d)");
4207 break;
4208 case ACN_BLOB_DIMMER_PROPERTIES:
4209 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_properties1_field_name_ext, "not valid (%d)");
4210 break;
4211 case ACN_BLOB_DIMMER_LOAD_PROPERTIES:
4212 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_load_properties1_field_name_ext, "not valid (%d)");
4213 break;
4214 case ACN_BLOB_DIMMING_RACK_PROPERTIES:
4215 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_rack_properties1_field_name_ext, "not valid (%d)");
4216 break;
4217 case ACN_BLOB_DIMMING_RACK_STATUS_PROPERTIES:
4218 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_rack_status_properties1_field_name_ext, "not valid (%d)");
4219 break;
4220 case ACN_BLOB_DIMMER_STATUS_PROPERTIES:
4221 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_status_properties1_field_name_ext, "not valid (%d)");
4222 break;
4223 case ACN_BLOB_SET_LEVELS_OPERATION:
4224 field_name = val_to_str(field_number, acn_blob_set_levels_operation_field_name, "not valid (%d)");
4225 break;
4226 case ACN_BLOB_PRESET_OPERATION:
4227 field_name = val_to_str(field_number, acn_blob_preset_operation_field_name, "not valid (%d)");
4228 break;
4229 case ACN_BLOB_ADVANCED_FEATURES_OPERATION:
4230 field_name = val_to_str(field_number, acn_blob_advanced_features_operation_field_name, "not valid (%d)");
4231 break;
4232 case ACN_BLOB_DIRECT_CONTROL_OPERATION:
4233 field_name = val_to_str(field_number, acn_blob_direct_control_operation_field_name, "not valid (%d)");
4234 break;
4235 case ACN_BLOB_GENERATE_CONFIG_OPERATION:
4236 field_name = val_to_str(field_number, acn_blob_generate_config_operation_field_name, "not valid (%d)");
4237 break;
4238 case ACN_BLOB_ERROR3:
4239 field_name = val_to_str(field_number, acn_blob_error3_field_name, "not valid (%d)");
4240 break;
4241 case ACN_BLOB_DIMMER_PROPERTIES2:
4242 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_properties2_field_name_ext, "not valid (%d)");
4243 break;
4244 case ACN_BLOB_DIMMER_LOAD_PROPERTIES2:
4245 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_load_properties2_field_name_ext, "not valid (%d)");
4246 break;
4247 case ACN_BLOB_DIMMER_RACK_PROPERTIES2:
4248 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_rack_properties2_field_name_ext, "not valid (%d)");
4249 break;
4250 case ACN_BLOB_DIMMER_RACK_STATUS_PROPERTIES2:
4251 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_rack_status_properties2_field_name_ext, "not valid (%d)");
4252 break;
4253 case ACN_BLOB_DIMMER_STATUS_PROPERTIES2:
4254 field_name = val_to_str_ext(field_number, &acn_blob_dimmer_status_properties2_field_name_ext, "not valid (%d)");
4255 break;
4256 case ACN_BLOB_TIME2:
4257 field_name = val_to_str(field_number, acn_blob_time2_field_name, "not valid (%d)");
4258 break;
4259 case ACN_BLOB_RPC:
4261 temp_field_number = field_number;
4262 /* field names 4 repeats: 1, 2, 3, 4, 4, 4, ... */
4263 if (temp_field_number > 3)
4264 temp_field_number = 4;
4265 field_name = val_to_str(temp_field_number, acn_blob_rpc_field_name, "not valid (%d)");
4267 break;
4268 case ACN_BLOB_DHCP_CONFIG_SUBNET:
4269 field_name = val_to_str(field_number, acn_blob_dhcp_config_subnet_field_name, "not valid (%d)");
4270 break;
4271 case ACN_BLOB_DHCP_CONFIG_STATIC_ROUTE:
4272 field_name = val_to_str(field_number, acn_blob_dhcp_config_static_route_field_name, "not valid (%d)");
4273 break;
4274 case ACN_BLOB_ENERGY_MANAGEMENT:
4276 temp_field_number = field_number;
4277 /* field names 4 through 7 repeat: 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, ... */
4278 if (temp_field_number > 3)
4279 temp_field_number = (field_number % 4) + 4;
4280 field_name = val_to_str(temp_field_number, acn_blob_energy_management_field_name, "not valid (%d)");
4282 break;
4283 case ACN_BLOB_PRESET_PROPERTIES:
4284 field_name = val_to_str_ext(field_number, &acn_blob_preset_properties_field_name_ext, "not valid (%d)");
4285 break;
4286 case ACN_BLOB_TIME3:
4287 field_name = val_to_str(field_number, acn_blob_time3_field_name, "not valid (%d)");
4288 break;
4289 case ACN_BLOB_ENERGY_COST:
4290 field_name = val_to_str(field_number, acn_blob_energy_cost_field_name, "not valid (%d)");
4291 break;
4292 case ACN_BLOB_SEQUENCE_OPERATIONS:
4293 field_name = val_to_str(field_number, acn_blob_sequence_operation_field_name, "not valid (%d)");
4294 break;
4295 case ACN_BLOB_SEQUENCE_STEP_PROPERTIES:
4296 field_name = val_to_str_ext(field_number, &acn_blob_sequence_step_properties_field_name_ext, "not valid (%d)");
4297 break;
4298 default:
4299 field_name = "Unknown field";
4300 break;
4303 return field_name;
4306 /******************************************************************************/
4307 /* Display Blob Field Value */
4308 static void
4309 display_blob_field_value(tvbuff_t *tvb, proto_tree *field_tree, uint16_t field_number, uint8_t blob_type, uint8_t field_type, uint8_t field_length, int blob_offset, uint8_t blob_offset3, int display_variblob_as_CID)
4311 int8_t field_value8;
4312 int32_t field_value32;
4313 const char *field_string;
4314 proto_item *ti;
4316 /* Add field value to field sub tree */
4317 if (field_type == ACN_BLOB_FIELD_TYPE12) {
4318 /* "ignore" always takes priority */
4319 proto_tree_add_string(field_tree, hf_acn_blob_field_value_string, tvb, blob_offset, field_length, "Ignore");
4321 else if (blob_type == ACN_BLOB_IPV4) {
4322 proto_tree_add_item(field_tree, hf_acn_blob_field_value_ipv4, tvb, blob_offset, field_length-2, ENC_BIG_ENDIAN);
4324 else if (blob_type == ACN_BLOB_IPV6) {
4325 proto_tree_add_item(field_tree, hf_acn_blob_field_value_ipv6, tvb, blob_offset, field_length-2, ENC_NA);
4327 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 2)) {
4328 /* time zone index */
4329 field_value32 = (int32_t)(tvb_get_ntohl(tvb, blob_offset));
4330 if (field_value32 == -1) {
4331 field_string = "Field Value: Custom";
4333 else {
4334 field_string = val_to_str(field_value32, acn_blob_time3_time_zone_vals, "not valid (%d)");
4336 proto_tree_add_int_format(field_tree, hf_acn_blob_time_zone, tvb, blob_offset, 4, field_value32, "%s", field_string);
4338 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 10)) {
4339 /* DST type */
4340 field_value8 = tvb_get_uint8(tvb, blob_offset);
4341 field_string = val_to_str(field_value8, acn_blob_time3_dst_vals, "not valid (%d)");
4342 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string);
4344 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 11)) {
4345 /* DST on month */
4346 field_value8 = tvb_get_uint8(tvb, blob_offset);
4347 field_string = val_to_str(field_value8, acn_blob_time3_month_vals, "not valid (%d)");
4348 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string);
4350 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 12)) {
4351 /* DST on week */
4352 field_value8 = tvb_get_uint8(tvb, blob_offset);
4353 field_string = val_to_str(field_value8, acn_blob_time3_week_vals, "not valid (%d)");
4354 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string);
4356 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 13)) {
4357 /* DST start day */
4358 field_value8 = tvb_get_uint8(tvb, blob_offset);
4359 field_string = val_to_str(field_value8, acn_blob_time3_day_vals, "not valid (%d)");
4360 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_start_day, tvb, blob_offset, 1, field_value8, "%s", field_string);
4362 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 16)) {
4363 /* DST start locality */
4364 field_value8 = tvb_get_uint8(tvb, blob_offset);
4365 field_string = val_to_str(field_value8, acn_blob_time3_locality_vals, "not valid (%d)");
4366 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_start_locality, tvb, blob_offset, 1, field_value8, "%s", field_string);
4368 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 17)) {
4369 /* DST off month */
4370 field_value8 = tvb_get_uint8(tvb, blob_offset);
4371 field_string = val_to_str(field_value8, acn_blob_time3_month_vals, "not valid (%d)");
4372 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string);
4374 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 18)) {
4375 /* DST off week */
4376 field_value8 = tvb_get_uint8(tvb, blob_offset);
4377 field_string = val_to_str(field_value8, acn_blob_time3_week_vals, "not valid (%d)");
4378 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_type, tvb, blob_offset, 1, field_value8, "%s", field_string);
4380 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 19)) {
4381 /* DST stop day */
4382 field_value8 = tvb_get_uint8(tvb, blob_offset);
4383 field_string = val_to_str(field_value8, acn_blob_time3_day_vals, "not valid (%d)");
4384 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_stop_day, tvb, blob_offset, 1, field_value8, "%s", field_string);
4386 else if ((blob_type == ACN_BLOB_TIME3) && (field_number == 22)) {
4387 /* DST stop locality */
4388 field_value8 = tvb_get_uint8(tvb, blob_offset);
4389 field_string = val_to_str(field_value8, acn_blob_time3_locality_vals, "not valid (%d)");
4390 proto_tree_add_uint_format(field_tree, hf_acn_blob_dst_stop_locality, tvb, blob_offset, 1, field_value8, "%s", field_string);
4392 else {
4393 switch (field_type) {
4394 case ACN_BLOB_FIELD_TYPE1:
4395 /* Need special code to display signed data */
4396 ti = proto_tree_add_item(field_tree, hf_acn_blob_field_value_number, tvb, blob_offset, 1, ENC_BIG_ENDIAN);
4397 proto_item_set_len(ti, blob_offset3);
4398 break;
4399 case ACN_BLOB_FIELD_TYPE2:
4400 /* Need special code to display signed data */
4401 ti = proto_tree_add_item(field_tree, hf_acn_blob_field_value_number, tvb, blob_offset, 2, ENC_BIG_ENDIAN);
4402 proto_item_set_len(ti, blob_offset3);
4403 break;
4404 case ACN_BLOB_FIELD_TYPE3:
4405 /* Need special code to display signed data */
4406 ti = proto_tree_add_item(field_tree, hf_acn_blob_field_value_number, tvb, blob_offset, 3, ENC_BIG_ENDIAN);
4407 proto_item_set_len(ti, blob_offset3);
4408 break;
4409 case ACN_BLOB_FIELD_TYPE4:
4410 /* Need special code to display signed data */
4411 ti = proto_tree_add_item(field_tree, hf_acn_blob_field_value_number64, tvb, blob_offset, 8, ENC_BIG_ENDIAN);
4412 proto_item_set_len(ti, blob_offset3);
4413 break;
4414 case ACN_BLOB_FIELD_TYPE9:
4415 /* float */
4416 proto_tree_add_item(field_tree, hf_acn_blob_field_value_float, tvb, blob_offset, field_length, ENC_BIG_ENDIAN);
4417 break;
4418 case ACN_BLOB_FIELD_TYPE10:
4419 /* double */
4420 proto_tree_add_item(field_tree, hf_acn_blob_field_value_double, tvb, blob_offset, field_length, ENC_BIG_ENDIAN);
4421 break;
4422 case ACN_BLOB_FIELD_TYPE11:
4423 if (blob_offset3 == 0) {
4424 proto_tree_add_string(field_tree, hf_acn_blob_field_value_string, tvb, blob_offset, 0, "<none>");
4426 else if (display_variblob_as_CID) {
4427 proto_tree_add_item(field_tree, hf_acn_blob_field_value_guid, tvb, blob_offset, field_length, ENC_BIG_ENDIAN);
4429 else {
4430 proto_tree_add_item(field_tree, hf_acn_blob_field_value_string, tvb, blob_offset, blob_offset3, ENC_UTF_8 | ENC_NA);
4432 break;
4433 /* "ignore", handled above */
4434 /* case ACN_BLOB_FIELD_TYPE12: */
4435 /* proto_tree_add_string(field_tree, hf_acn_blob_field_value_string, tvb, blob_offset, field_length, "Field Value: Ignore"); */
4436 /* break; */
4437 default:
4438 proto_tree_add_item(field_tree, hf_acn_blob_field_value_number, tvb, blob_offset, blob_offset3, ENC_BIG_ENDIAN);
4439 break;
4444 /******************************************************************************/
4445 /* Display Blob Field */
4446 static void
4447 display_blob_field(tvbuff_t *tvb, proto_tree *blob_tree, uint8_t blob_type, int *blob_offset, uint16_t *field_number, int display_variblob_as_CID)
4449 uint8_t field_type;
4450 uint8_t field_length;
4451 uint8_t blob_offset1;
4452 uint8_t blob_offset2;
4453 uint8_t blob_offset3;
4454 uint16_t temp_field_number;
4456 proto_item *fi;
4457 proto_tree *field_tree = NULL;
4458 proto_item *ti;
4460 const char *field_name;
4462 if ((blob_type == ACN_BLOB_ENERGY_MANAGEMENT) && (*field_number > 3)) {
4463 /* an exception to blob field rules: no "type" subfield, no "length" subfield */
4465 /* field names 4 through 7 repeat: 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, ... */
4466 temp_field_number = (*field_number % 4) + 4;
4468 switch (temp_field_number) {
4469 case 4:
4470 /* uint2 */
4471 field_length = 2;
4472 blob_offset3 = 2;
4473 field_name = get_field_name(blob_type, temp_field_number);
4475 /* Create Sub Tree for Field Type*/
4476 fi = proto_tree_add_item(blob_tree, hf_acn_blob_tree_field_type, tvb, *blob_offset, field_length, ENC_NA);
4477 field_tree = proto_item_add_subtree(fi, ett_acn_blob);
4479 /* Add the Field Name Found to Sub Tree */
4480 proto_item_append_text(fi, ": %s", field_name);
4482 ti = proto_tree_add_item(field_tree, hf_acn_blob_field_value_number, tvb, *blob_offset, 2, ENC_BIG_ENDIAN);
4483 proto_item_set_len(ti, blob_offset3);
4484 break;
4485 case 5:
4486 case 6:
4487 case 7:
4488 /* uint4 */
4489 field_length = 4;
4490 blob_offset3 = 4;
4491 field_name = get_field_name(blob_type, temp_field_number);
4493 /* Create Sub Tree for Field Type*/
4494 fi = proto_tree_add_item(blob_tree, hf_acn_blob_tree_field_type, tvb, *blob_offset, field_length, ENC_NA);
4495 field_tree = proto_item_add_subtree(fi, ett_acn_blob);
4497 /* Add the Field Name Found to Sub Tree */
4498 proto_item_append_text(fi, ": %s", field_name);
4499 ti = proto_tree_add_item(field_tree, hf_acn_blob_field_value_number, tvb, *blob_offset, 4, ENC_BIG_ENDIAN);
4500 proto_item_set_len(ti, blob_offset3);
4501 break;
4504 else {
4505 /* Get field type*/
4506 field_type = tvb_get_uint8(tvb, *blob_offset);
4507 get_field_type_parameters(tvb, *blob_offset, field_type, &field_length, &blob_offset1, &blob_offset2, &blob_offset3);
4508 field_name = get_field_name(blob_type, *field_number);
4510 /* Create Sub Tree for Field Type*/
4511 fi = proto_tree_add_item(blob_tree, hf_acn_blob_tree_field_type, tvb, *blob_offset, field_length + 1, ENC_NA);
4512 field_tree = proto_item_add_subtree(fi, ett_acn_blob);
4514 /* Add the Field Name Found to Sub Tree */
4515 proto_item_append_text(fi, ": %s", field_name);
4517 /* Add field type to field sub tree */
4518 proto_tree_add_uint(field_tree, hf_acn_blob_field_type, tvb, *blob_offset, 1, field_type);
4519 *blob_offset += blob_offset1;
4521 /* Add field length to field sub tree */
4522 proto_tree_add_uint(field_tree, hf_acn_blob_field_length, tvb, *blob_offset, 1, field_length);
4523 *blob_offset += blob_offset2;
4525 display_blob_field_value(tvb, field_tree, *field_number, blob_type, field_type, field_length, *blob_offset, blob_offset3, display_variblob_as_CID);
4528 *blob_offset += blob_offset3;
4529 *field_number += 1;
4532 /******************************************************************************/
4533 /* Dissect Blob Metadata */
4534 static uint32_t
4535 dissect_acn_blob_metadata(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, int end_offset)
4537 uint8_t blob_type = ACN_BLOB_METADATA;
4538 uint16_t field_number = 1;
4539 bool display_variblob_as_CID;
4541 /* Loop though dissecting fields until the end is reached */
4542 while (blob_offset < end_offset) {
4543 if (field_number == 15) {
4545 display_variblob_as_CID = 1;
4547 else {
4548 display_variblob_as_CID = 0;
4552 display_blob_field(tvb, blob_tree, blob_type, &blob_offset, &field_number, display_variblob_as_CID);
4554 return 0;
4557 /******************************************************************************/
4558 /* Dissect Blob Preset Properties */
4559 static uint32_t
4560 dissect_acn_blob_preset_properties(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, int end_offset)
4562 uint8_t blob_type = ACN_BLOB_PRESET_PROPERTIES;
4563 uint8_t field_type;
4564 uint8_t field_length;
4565 uint8_t blob_offset1;
4566 uint8_t blob_offset2;
4567 uint8_t blob_offset3;
4568 uint8_t sub_blob_index;
4569 uint16_t field_number = 1;
4570 uint8_t max_sub_blobs = 192;
4571 proto_item *fi;
4572 proto_tree *sub_blob_tree = NULL;
4573 const char *field_name;
4575 /* Loop though dissecting fields until the end is reached */
4576 while (blob_offset < end_offset) {
4577 if (field_number == 17) {
4578 /* Create subtree for "Levels" */
4579 field_type = tvb_get_uint8(tvb, blob_offset);
4580 get_field_type_parameters(tvb, blob_offset, field_type, &field_length, &blob_offset1, &blob_offset2, &blob_offset3);
4582 field_name = get_field_name(blob_type, field_number);
4583 field_number += 1;
4585 /* Create Sub Tree for Field Type */
4586 fi = proto_tree_add_item(blob_tree, hf_acn_blob_tree_field_type, tvb, blob_offset, (field_length + 1) * max_sub_blobs, ENC_NA);
4587 sub_blob_tree = proto_item_add_subtree(fi, ett_acn_blob);
4589 proto_item_append_text(fi, ": %s", field_name);
4590 sub_blob_index = 0;
4592 while ((sub_blob_index < max_sub_blobs) && (blob_offset < end_offset)) {
4593 display_blob_field(tvb, sub_blob_tree, blob_type, &blob_offset, &field_number, 0);
4595 sub_blob_index += 1;
4600 else {
4601 display_blob_field(tvb, blob_tree, blob_type, &blob_offset, &field_number, 0);
4605 return 0;
4608 /******************************************************************************/
4609 /* Dissect Blob Dimming Rack Properties v2 */
4610 static uint32_t
4611 dissect_acn_blob_dimming_rack_properties_v2(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, int end_offset)
4613 uint8_t blob_type = ACN_BLOB_DIMMER_RACK_PROPERTIES2;
4614 uint16_t field_number = 1;
4615 bool display_variblob_as_CID;
4617 /* Loop though dissecting fields until the end is reached */
4618 while (blob_offset < end_offset) {
4619 if (field_number == 12) {
4621 display_variblob_as_CID = 1;
4624 else {
4626 display_variblob_as_CID = 0;
4630 display_blob_field(tvb, blob_tree, blob_type, &blob_offset, &field_number, display_variblob_as_CID);
4632 return 0;
4635 /******************************************************************************/
4636 /* Dissect Blob Dimming Rack Status Properties v2 */
4637 static uint32_t
4638 dissect_acn_blob_dimming_rack_status_properties_v2(tvbuff_t *tvb, proto_tree *blob_tree, int blob_offset, int end_offset)
4640 uint8_t blob_type;
4641 uint8_t field_type;
4642 uint8_t field_length;
4643 uint8_t blob_offset1;
4644 uint8_t blob_offset2;
4645 uint8_t blob_offset3;
4646 uint8_t sub_blob_index;
4647 uint16_t field_number;
4649 int number_of_sub_blobs;
4651 proto_item *fi;
4652 proto_tree *sub_blob_tree = NULL;
4654 const char *field_name;
4656 /*First Assignments*/
4657 blob_type = ACN_BLOB_DIMMER_RACK_STATUS_PROPERTIES2;
4658 field_number = 1;
4659 number_of_sub_blobs = 64;
4661 /* Loop though dissecting fields until the end is reached */
4662 while (blob_offset < end_offset) {
4663 if (field_number == 22) {
4664 /* Create subtree for "Active Preset Group IDs" */
4665 field_type = tvb_get_uint8(tvb, blob_offset);
4666 get_field_type_parameters(tvb, blob_offset, field_type, &field_length, &blob_offset1, &blob_offset2, &blob_offset3);
4668 field_name = get_field_name(blob_type, field_number);
4669 field_number += 1;
4671 /* Create Sub Tree for Field Type */
4672 fi = proto_tree_add_item(blob_tree, hf_acn_blob_tree_field_type, tvb, blob_offset, (field_length + 1) * number_of_sub_blobs, ENC_NA);
4673 sub_blob_tree = proto_item_add_subtree(fi, ett_acn_blob);
4675 proto_item_append_text(fi, ": %s", field_name);
4677 sub_blob_index = 0;
4679 while ((sub_blob_index < number_of_sub_blobs) && (blob_offset < end_offset)) {
4680 display_blob_field(tvb, sub_blob_tree, blob_type, &blob_offset, &field_number, 0);
4682 sub_blob_index += 1;
4688 else {
4689 display_blob_field(tvb, blob_tree, blob_type, &blob_offset, &field_number, 0);
4693 return 0;
4696 /******************************************************************************/
4697 /* Get Blob Type From Fields
4698 Both "Dimmer Properties v2" and "Preset Properties" ended up with blob type 20 */
4699 static uint8_t
4700 get_blob_type_from_fields(tvbuff_t *tvb, int blob_offset, int end_offset)
4702 uint8_t field_type;
4703 uint8_t field_length;
4704 uint8_t blob_offset1;
4705 uint8_t blob_offset2;
4706 uint8_t blob_offset3;
4707 uint16_t field_number = 1;
4709 while (blob_offset < end_offset) {
4710 field_type = tvb_get_uint8(tvb, blob_offset);
4711 if (field_number == 12) {
4712 if (field_type == ACN_BLOB_FIELD_TYPE11) {
4713 /* string: dimmer name field */
4714 return ACN_BLOB_DIMMER_PROPERTIES2;
4716 /* number: preset number field */
4717 return ACN_BLOB_PRESET_PROPERTIES;
4719 get_field_type_parameters(tvb, blob_offset, field_type, &field_length, &blob_offset1, &blob_offset2, &blob_offset3);
4720 blob_offset += blob_offset2 + blob_offset3;
4721 field_number += 1;
4724 return ACN_BLOB_DIMMER_PROPERTIES2;
4727 /******************************************************************************/
4728 /* Dissect Blob */
4729 static uint32_t
4730 dissect_acn_blob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pdu_tree, int blob_offset, int end_offset)
4732 /* Declarations for blobs*/
4733 uint8_t blob_type;
4734 uint16_t field_number = 1;
4735 proto_item *bi;
4736 proto_tree *blob_tree = NULL;
4737 const char *blob_name;
4738 /* const char *range_type; */
4740 /* Add blob to tree */
4741 bi = proto_tree_add_item(pdu_tree, hf_acn_blob, tvb, blob_offset, end_offset, ENC_NA);
4742 blob_tree = proto_item_add_subtree(bi, 0);
4743 end_offset = blob_offset + end_offset;
4744 blob_offset += 4;
4746 /* Add Blob version item to tree */
4747 proto_tree_add_item(blob_tree, hf_acn_blob_version, tvb, blob_offset, 1, ENC_BIG_ENDIAN);
4748 blob_offset += 1;
4750 /* Add Blob Start and End Range Info */
4751 proto_tree_add_item(blob_tree, hf_acn_blob_range_type, tvb, blob_offset, 1, ENC_BIG_ENDIAN);
4752 /* range_type = val_to_str(range, acn_blob_range_type_vals, "not valid (%d)"); */
4753 blob_offset += 1;
4755 /* Add Blob Range Number */
4756 proto_tree_add_item(blob_tree, hf_acn_blob_range_number, tvb, blob_offset, 1, ENC_BIG_ENDIAN);
4757 blob_offset += 1;
4759 /* Add Blob Meta-Type */
4760 blob_type = tvb_get_uint8(tvb, blob_offset);
4761 if (blob_type == ACN_BLOB_DIMMER_PROPERTIES2) {
4762 /* Dimmer Properties v2 and Preset Properties have the same 'type' value (20) */
4763 blob_type = get_blob_type_from_fields(tvb, blob_offset + 1, end_offset);
4766 proto_tree_add_uint(blob_tree, hf_acn_blob_type, tvb, blob_offset, 1, blob_type);
4768 blob_name = val_to_str(blob_type, acn_blob_type_vals, "not valid (%d)");
4769 proto_item_append_text(bi, ": %s", blob_name);
4770 blob_offset += 1;
4772 if (blob_type == ACN_BLOB_METADATA) {
4773 return dissect_acn_blob_metadata(tvb, blob_tree, blob_offset, end_offset);
4775 if (blob_type == ACN_BLOB_PRESET_PROPERTIES) {
4776 return dissect_acn_blob_preset_properties(tvb, blob_tree, blob_offset, end_offset);
4778 if (blob_type == ACN_BLOB_DIMMER_RACK_PROPERTIES2) {
4779 return dissect_acn_blob_dimming_rack_properties_v2(tvb, blob_tree, blob_offset, end_offset);
4781 if (blob_type == ACN_BLOB_DIMMER_RACK_STATUS_PROPERTIES2) {
4782 return dissect_acn_blob_dimming_rack_status_properties_v2(tvb, blob_tree, blob_offset, end_offset);
4785 /* Loop though dissecting fields until the end is reached */
4786 while (blob_offset < end_offset) {
4787 display_blob_field(tvb, blob_tree, blob_type, &blob_offset, &field_number, 0);
4789 return 0;
4792 /******************************************************************************/
4793 /* Dissect PDU L bit flag */
4794 static void
4795 dissect_pdu_bit_flag_l(tvbuff_t *tvb, int *offset, uint8_t *pdu_flags, uint32_t *pdu_length, uint32_t *pdu_flvh_length)
4797 uint8_t octet;
4798 uint32_t length1;
4799 uint32_t length2;
4800 uint32_t length3;
4802 /* get PDU flags and length flag */
4803 octet = tvb_get_uint8(tvb, (*offset)++);
4804 *pdu_flags = octet & 0xf0;
4805 length1 = octet & 0x0f; /* bottom 4 bits only */
4806 length2 = tvb_get_uint8(tvb, (*offset)++);
4808 /* if length flag is set, then we have a 20 bit length else we have a 12 bit */
4809 /* flvh = flags, length, vector, header */
4810 if (*pdu_flags & ACN_PDU_FLAG_L) {
4811 length3 = tvb_get_uint8(tvb, *offset);
4812 *offset += 1;
4813 *pdu_length = length3 | (length2 << 8) | (length1 << 16);
4814 *pdu_flvh_length = 3;
4815 } else {
4816 *pdu_length = length2 | (length1 << 8);
4817 *pdu_flvh_length = 2;
4821 /******************************************************************************/
4822 /* Dissect PDU V bit flag */
4823 static void
4824 dissect_pdu_bit_flag_v(int *offset, uint8_t pdu_flags, uint32_t *vector_offset, acn_pdu_offsets *last_pdu_offsets, uint32_t *pdu_flvh_length, uint8_t increment)
4826 /* Set vector offset */
4827 if (pdu_flags & ACN_PDU_FLAG_V) {
4828 /* use new values */
4829 *vector_offset = *offset;
4830 last_pdu_offsets->vector = *offset;
4831 *offset += increment;
4832 *pdu_flvh_length += increment;
4833 } else {
4834 /* use last values */
4835 *vector_offset = last_pdu_offsets->vector;
4839 /******************************************************************************/
4840 /* Dissect PDU H bit flag */
4841 static void
4842 dissect_pdu_bit_flag_h(int *offset, uint8_t pdu_flags, uint32_t *header_offset, acn_pdu_offsets *last_pdu_offsets, uint32_t *pdu_flvh_length, uint8_t increment)
4844 /* Set header offset */
4845 if (pdu_flags & ACN_PDU_FLAG_H) {
4846 /* use new values */
4847 *header_offset = *offset;
4848 last_pdu_offsets->header = *offset;
4849 *offset += increment;
4850 *pdu_flvh_length += increment;
4851 } else {
4852 /* use last values */
4853 *header_offset = last_pdu_offsets->header;
4857 /******************************************************************************/
4858 /* Dissect PDU D bit flag */
4859 static void
4860 dissect_pdu_bit_flag_d(int offset, uint8_t pdu_flags, uint32_t pdu_length, uint32_t *data_offset, uint32_t *data_length, acn_pdu_offsets *last_pdu_offsets, uint32_t pdu_flvh_length, bool set_last_value_length)
4862 /* Adjust data */
4863 if (pdu_flags & ACN_PDU_FLAG_D) {
4864 /* use new values */
4865 *data_offset = offset;
4866 *data_length = pdu_length - pdu_flvh_length;
4867 last_pdu_offsets->data = offset;
4868 last_pdu_offsets->data_length = *data_length;
4869 } else {
4870 /* use last values */
4871 *data_offset = last_pdu_offsets->data;
4872 if (set_last_value_length) {
4873 *data_length = last_pdu_offsets->data_length;
4878 /******************************************************************************/
4879 /* Add flag and flag tree */
4880 static void
4881 begin_dissect_acn_pdu(proto_tree **pdu_tree, tvbuff_t *tvb, proto_item **ti, proto_tree *tree, uint32_t *pdu_start, int *offset, uint8_t *pdu_flags, uint32_t *pdu_length, uint32_t *pdu_flvh_length, int ett_base_pdu, bool is_acn)
4883 proto_item *pi;
4884 proto_tree *flag_tree;
4886 /* save start of pdu block */
4887 *pdu_start = *offset;
4889 dissect_pdu_bit_flag_l(tvb, offset, pdu_flags, pdu_length, pdu_flvh_length);
4890 /* offset should now be pointing to vector (if one exists) */
4892 /* add pdu item and tree */
4893 if (is_acn) {
4894 *ti = proto_tree_add_item(tree, hf_acn_pdu, tvb, *pdu_start, *pdu_length, ENC_NA);
4895 } else {
4896 *ti = proto_tree_add_item(tree, hf_rdmnet_pdu, tvb, *pdu_start, *pdu_length, ENC_NA);
4898 *pdu_tree = proto_item_add_subtree(*ti, ett_base_pdu);
4900 /* add flag item and tree */
4901 if (is_acn) {
4902 pi = proto_tree_add_uint(*pdu_tree, hf_acn_pdu_flags, tvb, *pdu_start, 1, *pdu_flags);
4903 flag_tree = proto_item_add_subtree(pi, ett_acn_pdu_flags);
4904 proto_tree_add_item(flag_tree, hf_acn_pdu_flag_l, tvb, *pdu_start, 1, ENC_BIG_ENDIAN);
4905 proto_tree_add_item(flag_tree, hf_acn_pdu_flag_v, tvb, *pdu_start, 1, ENC_BIG_ENDIAN);
4906 proto_tree_add_item(flag_tree, hf_acn_pdu_flag_h, tvb, *pdu_start, 1, ENC_BIG_ENDIAN);
4907 proto_tree_add_item(flag_tree, hf_acn_pdu_flag_d, tvb, *pdu_start, 1, ENC_BIG_ENDIAN);
4909 else {
4910 pi = proto_tree_add_uint(*pdu_tree, hf_rdmnet_pdu_flags, tvb, *pdu_start, 1, *pdu_flags);
4911 flag_tree = proto_item_add_subtree(pi, ett_rdmnet_pdu_flags);
4912 proto_tree_add_item(flag_tree, hf_rdmnet_pdu_flag_l, tvb, *pdu_start, 1, ENC_BIG_ENDIAN);
4913 proto_tree_add_item(flag_tree, hf_rdmnet_pdu_flag_v, tvb, *pdu_start, 1, ENC_BIG_ENDIAN);
4914 proto_tree_add_item(flag_tree, hf_rdmnet_pdu_flag_h, tvb, *pdu_start, 1, ENC_BIG_ENDIAN);
4915 proto_tree_add_item(flag_tree, hf_rdmnet_pdu_flag_d, tvb, *pdu_start, 1, ENC_BIG_ENDIAN);
4919 /******************************************************************************/
4920 /* Dissect wrapped SDT PDU */
4921 static uint32_t
4922 dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
4924 /* common to all pdu */
4925 bool blob_exists = 0;
4926 uint8_t pdu_flags;
4927 uint32_t pdu_start;
4928 uint32_t pdu_length;
4929 uint32_t pdu_flvh_length; /* flags, length, vector, header */
4930 uint8_t D;
4931 uint32_t vector_offset;
4932 uint32_t header_offset;
4933 uint32_t data_offset;
4934 uint32_t old_offset;
4935 uint32_t end_offset;
4936 uint32_t data_length;
4937 uint32_t address_count;
4938 uint32_t blob_offset;
4939 uint32_t blob_end_offset = 0;
4941 proto_item *ti;
4942 proto_tree *pdu_tree = NULL;
4944 /* this pdu */
4945 const char *name;
4946 acn_dmp_adt_type adt = {0,0,0,0,0,0};
4947 acn_dmp_adt_type adt2 = {0,0,0,0,0,0};
4948 uint32_t vector;
4950 begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_dmp_pdu, 1);
4952 /* Add PDU Length item */
4953 proto_tree_add_uint(pdu_tree, hf_acn_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
4955 dissect_pdu_bit_flag_v(&offset, pdu_flags, &vector_offset, last_pdu_offsets, &pdu_flvh_length, 1);
4956 /* offset should now be pointing to header (if one exists) */
4958 /* Add Vector item */
4959 vector = tvb_get_uint8(tvb, vector_offset);
4960 proto_tree_add_uint(pdu_tree, hf_acn_dmp_vector, tvb, vector_offset, 1, vector);
4962 /* Add Vector item to tree*/
4963 name = val_to_str(vector, acn_dmp_vector_vals, "not valid (%d)");
4964 proto_item_append_text(ti, ": ");
4965 proto_item_append_text(ti, "%s", name);
4967 dissect_pdu_bit_flag_h(&offset, pdu_flags, &header_offset, last_pdu_offsets, &pdu_flvh_length, 1);
4968 /* offset should now be pointing to data (if one exists) */
4970 /* header contains address and data type */
4971 acn_add_dmp_address_type(tvb, pinfo, pdu_tree, header_offset, &adt);
4973 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 1);
4974 end_offset = data_offset + data_length;
4976 /* Check if blob exists, find beginning offset */
4977 blob_offset = data_offset;
4978 blob_exists = 0;
4979 while ((blob_offset < (end_offset - 4)) && (blob_exists != 1)) {
4980 if (tvb_get_ntohl(tvb, blob_offset) == 0x426c6f62) {
4981 /* 0x426c6f62 == "Blob" */
4982 blob_exists = 1;
4983 break;
4985 blob_offset += 1;
4988 /* Fix the end_offset for finding Address-Data pair if blob exists*/
4989 if (blob_exists == 1) {
4990 blob_end_offset = end_offset - blob_offset;
4991 end_offset = blob_offset;
4992 data_length = blob_offset - data_offset;
4995 switch (vector) {
4996 case ACN_DMP_VECTOR_UNKNOWN:
4997 break;
4998 case ACN_DMP_VECTOR_GET_PROPERTY:
4999 /* Rip through property address */
5000 while (data_offset < end_offset) {
5001 old_offset = data_offset;
5002 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5003 if (old_offset == data_offset) break;
5005 break;
5006 case ACN_DMP_VECTOR_SET_PROPERTY:
5007 /* Rip through Property Address-Data pairs */
5008 /* But, in reality, this generally won't work as we have know way of */
5009 /* calculating the next Address-Data pair */
5010 while (data_offset < end_offset) {
5011 old_offset = data_offset;
5012 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5013 if (old_offset == data_offset) break;
5015 adt.data_length = data_length - (data_offset - old_offset);
5016 old_offset = data_offset;
5017 data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
5018 if (old_offset == data_offset) break;
5020 break;
5021 case ACN_DMP_VECTOR_GET_PROPERTY_REPLY:
5022 /* Rip through Property Address-Data pairs */
5023 /* But, in reality, this generally won't work as we have know way of */
5024 /* calculating the next Address-Data pair */
5025 while (data_offset < end_offset) {
5026 old_offset = data_offset;
5027 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5028 if (old_offset == data_offset) break;
5030 adt.data_length = data_length - (data_offset - old_offset);
5031 old_offset = data_offset;
5032 data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
5033 if (old_offset == data_offset) break;
5035 break;
5036 case ACN_DMP_VECTOR_EVENT:
5037 case ACN_DMP_VECTOR_SYNC_EVENT:
5038 /* Rip through Property Address-Data pairs */
5039 /* But, in reality, this generally won't work as we have know way of */
5040 /* calculating the next Address-Data pair */
5041 while (data_offset < end_offset) {
5042 old_offset = data_offset;
5043 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5044 if (old_offset == data_offset) break;
5046 adt.data_length = data_length - (data_offset - old_offset);
5047 old_offset = data_offset;
5048 data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
5049 if (old_offset == data_offset) break;
5051 break;
5052 case ACN_DMP_VECTOR_MAP_PROPERTY:
5053 /* Virtual Address type */
5054 data_offset = acn_add_dmp_address_type(tvb, pinfo, pdu_tree, data_offset, &adt2);
5055 /* Rip through Actual-Virtual Address Pairs */
5056 while (data_offset < end_offset) {
5057 /* actual */
5058 old_offset = data_offset;
5059 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5060 if (old_offset == data_offset) break;
5061 D = ACN_DMP_ADT_EXTRACT_D(adt.flags);
5062 switch (D) {
5063 case ACN_DMP_ADT_D_NS:
5064 address_count = 1;
5065 break;
5066 case ACN_DMP_ADT_D_RS:
5067 address_count = 1;
5068 break;
5069 case ACN_DMP_ADT_D_RE:
5070 address_count = adt.count;
5071 break;
5072 /*case ACN_DMP_ADT_D_RM: */
5073 default:
5074 /* OUCH */
5075 return pdu_start + pdu_length;
5078 /* virtual */
5079 while (address_count > 0) {
5080 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt2);
5081 address_count--;
5084 break;
5085 case ACN_DMP_VECTOR_UNMAP_PROPERTY:
5086 /* Rip through Actual Property Address */
5087 while (data_offset < end_offset) {
5088 old_offset = data_offset;
5089 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5090 if (old_offset == data_offset) break;
5092 break;
5093 case ACN_DMP_VECTOR_SUBSCRIBE:
5094 /* Rip through Property Address */
5095 while (data_offset < end_offset) {
5096 old_offset = data_offset;
5097 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5098 if (old_offset == data_offset) break;
5100 break;
5101 case ACN_DMP_VECTOR_UNSUBSCRIBE:
5102 /* Rip through Property Address */
5103 while (data_offset < end_offset) {
5104 old_offset = data_offset;
5105 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5106 if (old_offset == data_offset) break;
5108 break;
5109 case ACN_DMP_VECTOR_GET_PROPERTY_FAIL:
5110 /* Rip through Address-Reason Code Pairs */
5111 while (data_offset < end_offset) {
5112 old_offset = data_offset;
5113 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5114 if (old_offset == data_offset) break;
5116 adt.data_length = data_length - (data_offset - old_offset);
5117 old_offset = data_offset;
5118 data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
5119 if (old_offset == data_offset) break;
5121 break;
5122 case ACN_DMP_VECTOR_SET_PROPERTY_FAIL:
5123 /* Rip through Address-Reason Code Pairs */
5124 while (data_offset < end_offset) {
5125 old_offset = data_offset;
5126 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5127 if (old_offset == data_offset) break;
5129 adt.data_length = data_length - (data_offset - old_offset);
5130 old_offset = data_offset;
5131 data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
5132 if (old_offset == data_offset) break;
5134 break;
5135 case ACN_DMP_VECTOR_MAP_PROPERTY_FAIL:
5136 /* Rip through Address-Reason Code Pairs */
5137 while (data_offset < end_offset) {
5138 old_offset = data_offset;
5139 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5140 if (old_offset == data_offset) break;
5142 adt.data_length = data_length - (data_offset - old_offset);
5143 old_offset = data_offset;
5144 data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
5145 if (old_offset == data_offset) break;
5147 break;
5148 case ACN_DMP_VECTOR_SUBSCRIBE_ACCEPT:
5149 /* Rip through Property Addresses */
5150 while (data_offset < end_offset) {
5151 old_offset = data_offset;
5152 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5153 if (old_offset == data_offset) break;
5155 break;
5156 case ACN_DMP_VECTOR_SUBSCRIBE_REJECT:
5157 /* Rip through Address-Reason Code Pairs */
5158 while (data_offset < end_offset) {
5159 old_offset = data_offset;
5160 data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
5161 if (old_offset == data_offset) break;
5163 adt.data_length = data_length - (data_offset - old_offset);
5164 old_offset = data_offset;
5165 data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
5166 if (old_offset == data_offset) break;
5168 break;
5169 case ACN_DMP_VECTOR_ALLOCATE_MAP:
5170 /* No data for this */
5171 break;
5172 case ACN_DMP_VECTOR_ALLOCATE_MAP_REPLY:
5173 /* Single reason code */
5174 proto_tree_add_item(pdu_tree, hf_acn_dmp_reason_code, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5175 /* data_offset += 1; */
5176 case ACN_DMP_VECTOR_DEALLOCATE_MAP:
5177 /* No data for this */
5178 break;
5181 /* If blob exists, call function to dissect blob*/
5182 if (blob_exists == 1) {
5183 dissect_acn_blob(tvb, pinfo, pdu_tree, blob_offset, blob_end_offset);
5186 return pdu_start + pdu_length;
5190 /******************************************************************************/
5191 /* Dissect wrapped SDT PDU */
5192 static uint32_t
5193 dissect_acn_sdt_wrapped_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
5195 /* common to all pdu */
5196 uint8_t pdu_flags;
5197 uint32_t pdu_start;
5198 uint32_t pdu_length;
5199 uint32_t pdu_flvh_length; /* flags, length, vector, header */
5200 uint32_t vector_offset;
5201 uint32_t data_offset;
5202 uint32_t data_length;
5204 proto_item *ti;
5205 proto_tree *pdu_tree = NULL;
5207 /* this pdu */
5208 const char *name;
5209 uint32_t vector;
5211 begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_sdt_pdu, 1);
5213 /* Add PDU Length item */
5214 proto_tree_add_uint(pdu_tree, hf_acn_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
5216 dissect_pdu_bit_flag_v(&offset, pdu_flags, &vector_offset, last_pdu_offsets, &pdu_flvh_length, 1);
5217 /* offset should now be pointing to header (if one exists) */
5219 /* Add Vector item */
5220 vector = tvb_get_uint8(tvb, vector_offset);
5221 proto_tree_add_uint(pdu_tree, hf_acn_sdt_vector, tvb, vector_offset, 1, vector);
5223 /* Add Vector item to tree*/
5224 name = val_to_str(vector, acn_sdt_vector_vals, "not valid (%d)");
5225 proto_item_append_text(ti, ": ");
5226 proto_item_append_text(ti, "%s", name);
5228 /* NO HEADER DATA ON THESE* (at least so far) */
5230 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
5232 switch (vector) {
5233 case ACN_SDT_VECTOR_ACK:
5234 proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5235 /*data_offset += 4;*/
5236 break;
5237 case ACN_SDT_VECTOR_CHANNEL_PARAMS:
5238 data_offset = acn_add_channel_parameter(tvb, pinfo, pdu_tree, data_offset);
5239 data_offset = acn_add_address(tvb, pinfo, pdu_tree, data_offset, "Ad-hoc Address:");
5240 /*data_offset =*/ acn_add_expiry(tvb, pinfo, pdu_tree, data_offset, hf_acn_adhoc_expiry);
5241 break;
5242 case ACN_SDT_VECTOR_LEAVE:
5243 /* nothing more */
5244 break;
5245 case ACN_SDT_VECTOR_CONNECT:
5246 /* Protocol ID item */
5247 proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5248 /*data_offset += 4;*/
5249 break;
5250 case ACN_SDT_VECTOR_CONNECT_ACCEPT:
5251 /* Protocol ID item */
5252 proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5253 /*data_offset += 4;*/
5254 break;
5255 case ACN_SDT_VECTOR_CONNECT_REFUSE:
5256 /* Protocol ID item */
5257 proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5258 data_offset += 4;
5259 proto_tree_add_item(pdu_tree, hf_acn_refuse_code, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5260 /*data_offset += 1;*/
5261 break;
5262 case ACN_SDT_VECTOR_DISCONNECT:
5263 /* Protocol ID item */
5264 proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5265 /*data_offset += 4;*/
5266 break;
5267 case ACN_SDT_VECTOR_DISCONNECTING:
5268 /* Protocol ID item */
5269 proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5270 data_offset += 4;
5271 proto_tree_add_item(pdu_tree, hf_acn_reason_code, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5272 /*data_offset += 1;*/
5273 break;
5277 return pdu_start + pdu_length;
5281 /******************************************************************************/
5282 /* Dissect SDT Client PDU */
5283 static uint32_t
5284 dissect_acn_sdt_client_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
5286 /* common to all pdu */
5287 uint8_t pdu_flags;
5288 uint32_t pdu_start;
5289 uint32_t pdu_length;
5290 uint32_t pdu_flvh_length; /* flags, length, vector, header */
5291 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
5292 uint32_t vector_offset;
5293 uint32_t header_offset;
5294 uint32_t data_offset;
5295 uint32_t data_length;
5296 uint32_t old_offset;
5297 uint32_t end_offset;
5299 proto_item *ti;
5300 proto_tree *pdu_tree = NULL;
5302 /* this pdu */
5303 const char *name;
5304 uint32_t member_id;
5305 uint32_t protocol_id;
5306 uint16_t association;
5308 begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_sdt_client_pdu, 1);
5310 /* Add PDU Length item */
5311 proto_tree_add_uint(pdu_tree, hf_acn_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
5313 dissect_pdu_bit_flag_v(&offset, pdu_flags, &vector_offset, last_pdu_offsets, &pdu_flvh_length, 2);
5314 /* offset should now be pointing to header (if one exists) */
5316 /* add Member ID item */
5317 member_id = tvb_get_ntohs(tvb, vector_offset);
5318 proto_tree_add_uint(pdu_tree, hf_acn_member_id, tvb, vector_offset, 2, member_id);
5320 dissect_pdu_bit_flag_h(&offset, pdu_flags, &header_offset, last_pdu_offsets, &pdu_flvh_length, 6);
5321 /* offset should now be pointing to data (if one exists) */
5323 /* add Protocol ID item (Header)*/
5324 protocol_id = tvb_get_ntohl(tvb, header_offset);
5325 proto_tree_add_uint(pdu_tree, hf_acn_protocol_id, tvb, header_offset, 4, protocol_id);
5326 header_offset += 4;
5328 /* Add protocol to tree*/
5329 name = val_to_str(protocol_id, acn_protocol_id_vals, "id not valid (%d)");
5330 proto_item_append_text(ti, ": ");
5331 proto_item_append_text(ti, "%s", name);
5333 /* add association item */
5334 association = tvb_get_ntohs(tvb, header_offset);
5335 proto_tree_add_uint(pdu_tree, hf_acn_association, tvb, header_offset, 2, association);
5336 /*header_offset += 2;*/
5338 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 1);
5339 end_offset = data_offset + data_length;
5341 switch (protocol_id) {
5342 case ACN_PROTOCOL_ID_SDT:
5343 while (data_offset < end_offset) {
5344 old_offset = data_offset;
5345 data_offset = dissect_acn_sdt_wrapped_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
5346 if (old_offset == data_offset) break;
5348 break;
5349 case ACN_PROTOCOL_ID_DMP:
5350 while (data_offset < end_offset) {
5351 old_offset = data_offset;
5352 data_offset = dissect_acn_dmp_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
5353 if (data_offset == old_offset) break;
5355 break;
5357 return pdu_start + pdu_length;
5361 /******************************************************************************/
5362 /* level to string (ascii) */
5363 /* level : 8 bit value */
5364 /* string : pointer to buffer to fill */
5365 /* leading_char: character to buffer left of digits */
5366 /* min_char : minimum number of characters (for filling, not including space)*/
5367 /* show_zero: show zeros or dots */
5368 /* also adds a space to right end */
5369 /* */
5370 /* returns end of string */
5371 /* faster than printf() */
5372 static char *
5373 ltos(uint8_t level, char *string, uint8_t base, char leading_char, uint8_t min_chars, bool show_zero)
5375 uint8_t i;
5376 /* verify base */
5377 if (base < 2 || base > 16) {
5378 *string = '\0';
5379 return string;
5381 /* deal with zeros */
5382 if ((level == 0) && (!show_zero)) {
5383 for (i=0; i<min_chars; i++) {
5384 string[i] = '.';
5386 string[i++] = ' ';
5387 string[i] = '\0';
5388 return string+i;
5391 i = 0;
5392 /* do our convert, comes out backwards! */
5393 do {
5394 string[i++] = "0123456789ABCDEF"[level % base];
5395 } while ((level /= base) > 0);
5397 /* expand to needed character */
5398 for (; i<min_chars; i++) {
5399 string[i] = leading_char;
5401 /* terminate */
5402 string[i] = '\0';
5404 /* now reverse (and correct) the order */
5405 g_strreverse(string);
5407 /* add a space at the end (ok it's at the start but it will be at the end)*/
5408 string[i++] = ' ';
5409 string[i] = '\0';
5410 return string+i;
5414 /******************************************************************************/
5415 /* Dissect DMX data PDU */
5416 #define BUFFER_SIZE 128
5417 static uint32_t
5418 dissect_acn_dmx_data_pdu(uint32_t protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
5420 /* common to all pdu */
5421 uint8_t pdu_flags;
5422 uint32_t pdu_start;
5423 uint32_t pdu_length;
5424 uint32_t pdu_flvh_length; /* flags, length, vector, header */
5425 uint32_t vector_offset;
5426 uint32_t data_offset;
5427 uint32_t end_offset;
5428 uint32_t data_length;
5429 uint32_t header_offset;
5430 uint32_t total_cnt;
5431 uint32_t item_cnt;
5433 proto_item *ti;
5434 proto_tree *pdu_tree;
5436 /* this pdu */
5437 acn_dmp_adt_type adt = {0,0,0,0,0,0};
5438 const char *name;
5439 uint32_t vector;
5440 char *buffer;
5441 char *buf_ptr;
5442 unsigned x;
5443 uint8_t level;
5444 uint8_t min_char;
5445 uint8_t base;
5446 char leading_char;
5447 unsigned perline;
5448 unsigned halfline;
5449 uint16_t dmx_count;
5450 uint16_t dmx_start_code;
5451 uint16_t info_start_code;
5452 uint8_t dmx_2_start_code;
5454 buffer = (char*)wmem_alloc(pinfo->pool, BUFFER_SIZE);
5455 buffer[0] = '\0';
5457 begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_dmx_data_pdu, 1);
5459 /* Add PDU Length item */
5460 proto_tree_add_uint(pdu_tree, hf_acn_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
5462 dissect_pdu_bit_flag_v(&offset, pdu_flags, &vector_offset, last_pdu_offsets, &pdu_flvh_length, 1);
5463 /* offset should now be pointing to header (if one exists) */
5465 /* Add Vector item */
5466 vector = tvb_get_uint8(tvb, vector_offset);
5467 proto_tree_add_uint(pdu_tree, hf_acn_dmp_vector, tvb, vector_offset, 1, vector);
5469 /* Add Vector item to tree*/
5470 name = val_to_str(vector, acn_dmp_vector_vals, "not valid (%d)");
5471 proto_item_append_text(ti, ": ");
5472 proto_item_append_text(ti, "%s", name);
5474 dissect_pdu_bit_flag_h(&offset, pdu_flags, &header_offset, last_pdu_offsets, &pdu_flvh_length, 1);
5475 /* offset should now be pointing to data (if one exists) */
5477 /* process based on vector */
5478 acn_add_dmp_address_type(tvb, pinfo, pdu_tree, header_offset, &adt);
5480 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 1);
5481 end_offset = data_offset + data_length;
5483 switch (vector) {
5484 case ACN_DMP_VECTOR_SET_PROPERTY:
5485 dmx_start_code = tvb_get_ntohs(tvb, data_offset);
5486 if (protocol_id == ACN_PROTOCOL_ID_DMX_2 || protocol_id == ACN_PROTOCOL_ID_DMX_3) {
5487 proto_tree_add_item(pdu_tree, hf_acn_dmx_2_first_property_address, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5488 } else {
5489 proto_tree_add_item(pdu_tree, hf_acn_dmx_start_code, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5491 data_offset += 2;
5492 proto_tree_add_item(pdu_tree, hf_acn_dmx_increment, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5493 data_offset += 2;
5494 dmx_count = tvb_get_ntohs(tvb, data_offset);
5495 proto_tree_add_item(pdu_tree, hf_acn_dmx_count, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5496 data_offset += 2;
5498 if (protocol_id == ACN_PROTOCOL_ID_DMX_2 || protocol_id == ACN_PROTOCOL_ID_DMX_3) {
5499 dmx_2_start_code = (uint8_t)tvb_get_ntohs(tvb, data_offset - 1);
5500 proto_tree_add_item(pdu_tree, hf_acn_dmx_2_start_code, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5501 data_offset += 1;
5502 dmx_count -= 1;
5505 buf_ptr = buffer;
5507 switch (global_acn_dmx_display_line_format) {
5508 case ACN_PREF_DMX_DISPLAY_16PL:
5509 perline = 16;
5510 halfline = 8;
5511 break;
5512 default:
5513 perline = 20;
5514 halfline = 10;
5517 /* values base on display mode */
5518 switch ((unsigned)global_acn_dmx_display_view) {
5519 case ACN_PREF_DMX_DISPLAY_HEX:
5520 min_char = 2;
5521 base = 16;
5522 break;
5523 /* case ACN_PREF_DMX_DISPLAY_PER: */
5524 default:
5525 min_char = 3;
5526 base = 10;
5529 /* do we display leading zeros */
5530 if (global_acn_dmx_display_leading_zeros) {
5531 leading_char = '0';
5532 } else {
5533 leading_char = ' ';
5535 /* add a snippet to info (this may be slow) */
5536 if (protocol_id == ACN_PROTOCOL_ID_DMX_2 || protocol_id == ACN_PROTOCOL_ID_DMX_3) {
5537 info_start_code = dmx_2_start_code;
5539 else {
5540 info_start_code = dmx_start_code;
5542 col_append_fstr(pinfo->cinfo,COL_INFO, ", Sc %02x, [%02x %02x %02x %02x %02x %02x...]",
5543 info_start_code,
5544 tvb_get_uint8(tvb, data_offset),
5545 tvb_get_uint8(tvb, data_offset+1),
5546 tvb_get_uint8(tvb, data_offset+2),
5547 tvb_get_uint8(tvb, data_offset+3),
5548 tvb_get_uint8(tvb, data_offset+4),
5549 tvb_get_uint8(tvb, data_offset+5));
5551 /* add a header line */
5552 *buf_ptr++ = ' ';
5553 *buf_ptr++ = ' ';
5554 *buf_ptr++ = ' ';
5555 for (x=0; x<perline; x++) {
5556 buf_ptr = ltos((uint8_t)(x+1), buf_ptr, 10, ' ', min_char, false);
5557 if ((x+1)==halfline) {
5558 *buf_ptr++ = '|';
5559 *buf_ptr++ = ' ';
5562 *buf_ptr = '\0';
5563 proto_tree_add_string(pdu_tree, hf_acn_dmx_data, tvb, data_offset, dmx_count, buffer);
5565 /* start our line */
5566 snprintf(buffer, BUFFER_SIZE, "001-%03d: ", perline);
5567 buf_ptr = buffer + 9;
5569 total_cnt = 0;
5570 item_cnt = 0;
5571 for (x=data_offset; x<end_offset; x++) {
5572 level = tvb_get_uint8(tvb, x);
5573 if (global_acn_dmx_display_view == ACN_PREF_DMX_DISPLAY_PER) {
5574 if ((level > 0) && (level < 3)) {
5575 level = 1;
5576 } else {
5577 level = level * 100 / 255;
5580 buf_ptr = ltos(level, buf_ptr, base, leading_char, min_char, global_acn_dmx_display_zeros);
5581 total_cnt++;
5582 item_cnt++;
5584 if (item_cnt == perline || x == (end_offset-1)) {
5585 /* add leader... */
5586 proto_tree_add_string_format(pdu_tree, hf_acn_dmx_data, tvb, data_offset, item_cnt, buffer, "%s", buffer);
5587 data_offset += perline;
5588 snprintf(buffer, BUFFER_SIZE, "%03d-%03d: ",total_cnt, total_cnt+perline);
5589 buf_ptr = buffer + 9;
5590 item_cnt = 0;
5591 } else {
5592 /* add separator character */
5593 if (item_cnt == halfline) {
5594 *buf_ptr++ = '|';
5595 *buf_ptr++ = ' ';
5596 *buf_ptr = '\0';
5600 /* NOTE:
5601 address data type (fixed at 0xA2)
5602 start code - 1 byte, reserved (should be 0)
5603 - 1 byte, start code (0x255)
5604 - 2 bytes, packet offset (should be 0000)
5605 address increment - 4 bytes (ignore)
5606 number of dmx values - 4 bytes (0-512)
5607 dmx values 0-512 bytes (data)
5610 break;
5612 return pdu_start + pdu_length;
5615 /******************************************************************************/
5616 /* Dissect Common Base PDU */
5617 static void
5618 dissect_acn_common_base_pdu(tvbuff_t *tvb, proto_tree *tree, int *offset, acn_pdu_offsets *last_pdu_offsets, uint8_t *pdu_flags, uint32_t *pdu_start, uint32_t *pdu_length, uint32_t *pdu_flvh_length, uint32_t *vector_offset, proto_item **ti, proto_tree **pdu_tree, int ett_base_pdu, uint8_t v_flag_increment, bool is_acn)
5620 begin_dissect_acn_pdu(pdu_tree, tvb, ti, tree, pdu_start, offset, pdu_flags, pdu_length, pdu_flvh_length, ett_base_pdu, is_acn);
5622 /* Add PDU Length item */
5623 if (is_acn) {
5624 proto_tree_add_uint(*pdu_tree, hf_acn_pdu_length, tvb, *pdu_start, *pdu_flvh_length, *pdu_length);
5625 } else {
5626 proto_tree_add_uint(*pdu_tree, hf_rdmnet_pdu_length, tvb, *pdu_start, *pdu_flvh_length, *pdu_length);
5629 dissect_pdu_bit_flag_v(offset, *pdu_flags, vector_offset, last_pdu_offsets, pdu_flvh_length, v_flag_increment);
5630 /* offset should now be pointing to header (if one exists) */
5633 /******************************************************************************/
5634 /* Dissect sACN Discovery PDU*/
5635 #define DMX_UNIV_LIST_MAX_DIGITS 5
5636 #define DMX_UNIV_LIST_MAX_ITEMS_PER_LINE 16
5637 #define DMX_UNIV_LIST_BUF_SIZE (DMX_UNIV_LIST_MAX_DIGITS + 1) * DMX_UNIV_LIST_MAX_ITEMS_PER_LINE + 1
5638 static uint32_t
5639 dissect_acn_dmx_discovery_pdu(uint32_t protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
5641 /* common to all pdu */
5642 uint8_t pdu_flags;
5643 uint32_t pdu_start;
5644 uint32_t pdu_length;
5645 uint32_t pdu_flvh_length; /* flags, length, vector, header */
5646 uint32_t vector_offset;
5647 uint32_t data_offset;
5648 uint32_t end_offset;
5649 uint32_t data_length;
5650 uint32_t item_cnt;
5652 proto_item *ti;
5653 proto_tree *pdu_tree;
5655 /* this pdu */
5656 const char *name;
5657 uint32_t vector;
5658 char *buffer;
5659 char *buf_ptr;
5660 unsigned x;
5661 uint16_t universe;
5662 uint16_t last_universe;
5664 uint32_t page;
5665 uint32_t lastpage;
5666 uint32_t current_universe_idx;
5667 uint32_t bytes_printed;
5668 bool warned_unorder_once;
5670 (void)protocol_id;
5671 warned_unorder_once = false;
5673 buffer = (char*)wmem_alloc(pinfo->pool, DMX_UNIV_LIST_BUF_SIZE);
5674 buffer[0] = '\0';
5676 data_length = 0;
5678 //discovery pdu
5679 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_acn_dmx_pdu, 4, 1);
5680 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
5681 end_offset = data_offset + data_length;
5683 /* Add Vector item */
5684 vector = tvb_get_ntohl(tvb, vector_offset);
5685 proto_tree_add_item(ti, hf_acn_dmx_discovery_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
5687 /* Add Vector item to tree*/
5688 name = val_to_str(vector, acn_dmx_discovery_vector_vals, "not valid (%d)");
5689 proto_item_append_text(ti, ": %s", name);
5691 page = tvb_get_uint8(tvb, data_offset);
5692 proto_tree_add_item(ti, hf_acn_dmx_discovery_page, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5693 data_offset += 1;
5695 lastpage = tvb_get_uint8(tvb, data_offset);
5696 proto_tree_add_item(ti, hf_acn_dmx_discovery_last_page, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5697 data_offset += 1;
5699 switch (vector) {
5700 case ACN_DMX_DISCOVERY_UNIVERSE_LIST_VECTOR:
5701 buf_ptr = buffer;
5703 /* add a snippet to info (this may be slow) */
5704 col_append_fstr(pinfo->cinfo,COL_INFO, ",[Universe Page %u/%u: ", page+1, lastpage+1);
5705 current_universe_idx = 0;
5706 while(data_offset + (sizeof(uint16_t)*current_universe_idx) != end_offset && current_universe_idx < 6)
5708 col_append_fstr(pinfo->cinfo,COL_INFO, "%u ", tvb_get_uint16(tvb, data_offset + (sizeof(uint16_t)*current_universe_idx), ENC_BIG_ENDIAN));
5709 ++current_universe_idx;
5711 if(data_offset + (sizeof(uint16_t)*current_universe_idx) != end_offset)
5712 col_append_str(pinfo->cinfo,COL_INFO, "...");
5713 else if(current_universe_idx == 0)
5714 col_append_str(pinfo->cinfo,COL_INFO, "none");
5716 col_append_str(pinfo->cinfo,COL_INFO, "]");
5718 proto_tree_add_string(pdu_tree, hf_acn_dmx_discovery_universe_list, tvb, data_offset, end_offset-data_offset, "");
5720 item_cnt = 0;
5721 last_universe = 0;
5722 for (x=data_offset; x<end_offset; x+=2) {
5723 universe = tvb_get_uint16(tvb, x, ENC_BIG_ENDIAN);
5725 if(!warned_unorder_once && last_universe > universe)
5727 expert_add_info(pinfo, pdu_tree, &ei_acn_dmx_discovery_outofseq);
5728 warned_unorder_once = true;
5730 bytes_printed = snprintf(buf_ptr, DMX_UNIV_LIST_BUF_SIZE, "%*u ", DMX_UNIV_LIST_MAX_DIGITS /*max 5 digits (1-63999), align right*/, universe);
5731 if(bytes_printed > 0)
5732 buf_ptr += bytes_printed;
5734 item_cnt++;
5735 if((item_cnt % DMX_UNIV_LIST_MAX_ITEMS_PER_LINE) == 0 || x+2 >= end_offset)
5737 proto_tree_add_string_format(pdu_tree, hf_acn_dmx_discovery_universe_list, tvb, data_offset, item_cnt*2, buffer, "%s", buffer);
5738 data_offset += item_cnt * 2;
5739 item_cnt = 0;
5741 buf_ptr = buffer;
5744 last_universe = universe;
5747 break;
5749 return pdu_start + pdu_length;
5752 /******************************************************************************/
5753 /* Dissect DMX Base PDU */
5754 static uint32_t
5755 dissect_acn_dmx_extension_base_pdu(uint32_t protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
5757 (void)protocol_id;
5758 (void)pinfo;
5759 /* common to all pdu */
5760 uint8_t pdu_flags;
5761 uint32_t pdu_start;
5762 uint32_t pdu_length;
5763 uint32_t pdu_flvh_length; /* flags, length, vector, header */
5764 uint32_t vector_offset;
5765 uint32_t data_offset;
5766 uint32_t data_length;
5768 proto_item *ti;
5769 proto_tree *pdu_tree;
5771 /* this pdu */
5772 const char *name;
5773 uint32_t vector;
5775 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_acn_dmx_pdu, 4, 1);
5777 /* Add Vector item */
5778 vector = tvb_get_ntohl(tvb, vector_offset);
5779 proto_tree_add_item(pdu_tree, hf_acn_dmx_extension_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
5781 /* Add Vector item to tree*/
5782 name = val_to_str(vector, acn_dmx_extension_vector_vals, "not valid (%d)");
5783 proto_item_append_text(ti, ": %s", name);
5785 ///* NO HEADER DATA ON THESE* (at least so far) */
5787 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
5789 ///* process based on vector */
5790 switch (vector) {
5791 case ACN_DMX_EXT_DISCOVERY_VECTOR:
5792 proto_tree_add_item(pdu_tree, hf_acn_dmx_source_name, tvb, data_offset, 64, ENC_UTF_8);
5793 data_offset += 64;
5795 proto_tree_add_item(pdu_tree, hf_acn_dmx_discovery_framing_reserved, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5796 data_offset += 4;
5798 dissect_acn_dmx_discovery_pdu(protocol_id, tvb, pinfo, pdu_tree, data_offset, last_pdu_offsets);
5800 break;
5802 case ACN_DMX_EXT_SYNC_VECTOR:
5803 proto_tree_add_item(ti, hf_acn_dmx_sequence_number, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5804 data_offset += 1;
5806 proto_tree_add_item(ti, hf_acn_dmx_sync_universe, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5807 data_offset += 2;
5809 proto_tree_add_item(ti, hf_acn_dmx_sync_reserved, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5810 data_offset += 2;
5811 break;
5813 default:
5814 break;
5816 return pdu_start + pdu_length;
5819 /******************************************************************************/
5820 /* Dissect DMX Base PDU */
5821 static uint32_t
5822 dissect_acn_dmx_base_pdu(uint32_t protocol_id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
5824 /* common to all pdu */
5825 uint8_t pdu_flags;
5826 uint32_t pdu_start;
5827 uint32_t pdu_length;
5828 uint32_t pdu_flvh_length; /* flags, length, vector, header */
5829 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
5830 uint8_t option_flags;
5831 uint32_t vector_offset;
5832 uint32_t data_offset;
5833 uint32_t data_length;
5835 proto_item *ti, *pi;
5836 proto_tree *pdu_tree;
5837 proto_tree *flag_tree;
5839 /* this pdu */
5840 const char *name;
5841 uint32_t vector;
5843 uint32_t universe;
5844 uint32_t priority;
5845 uint32_t sequence;
5847 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_acn_dmx_pdu, 4, 1);
5849 /* Add Vector item */
5850 vector = tvb_get_ntohl(tvb, vector_offset);
5851 proto_tree_add_item(pdu_tree, hf_acn_dmx_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
5852 /* vector_offset +=4; */
5854 /* Add Vector item to tree*/
5855 name = val_to_str(vector, acn_dmx_vector_vals, "not valid (%d)");
5856 proto_item_append_text(ti, ": %s", name);
5858 /* NO HEADER DATA ON THESE* (at least so far) */
5860 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
5862 /* process based on vector */
5863 switch (vector) {
5864 case ACN_DMP_VECTOR_SET_PROPERTY:
5865 if (protocol_id == ACN_PROTOCOL_ID_DMX_2 || protocol_id == ACN_PROTOCOL_ID_DMX_3) {
5866 proto_tree_add_item(pdu_tree, hf_acn_dmx_source_name, tvb, data_offset, 64, ENC_UTF_8);
5867 data_offset += 64;
5868 } else {
5869 proto_tree_add_item(pdu_tree, hf_acn_dmx_source_name, tvb, data_offset, 32, ENC_UTF_8);
5870 data_offset += 32;
5873 priority = tvb_get_uint8(tvb, data_offset);
5874 proto_tree_add_item(pdu_tree, hf_acn_dmx_priority, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5875 data_offset += 1;
5877 if (protocol_id == ACN_PROTOCOL_ID_DMX_2) {
5878 proto_tree_add_item(pdu_tree, hf_acn_dmx_2_sync_universe, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5879 data_offset += 2;
5881 else if (protocol_id == ACN_PROTOCOL_ID_DMX_3) {
5882 //it is not clear if ssacn uses sync universes or not, leaving this as reserved (previous behavior)
5883 proto_tree_add_item(pdu_tree, hf_acn_dmx_3_reserved, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5884 data_offset += 2;
5887 sequence = tvb_get_uint8(tvb, data_offset);
5888 proto_tree_add_item(pdu_tree, hf_acn_dmx_sequence_number, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5889 data_offset += 1;
5891 if (protocol_id == ACN_PROTOCOL_ID_DMX_2 || protocol_id == ACN_PROTOCOL_ID_DMX_3) {
5892 option_flags = tvb_get_uint8(tvb, data_offset);
5893 pi = proto_tree_add_uint(pdu_tree, hf_acn_dmx_2_options, tvb, data_offset, 1, option_flags);
5894 flag_tree = proto_item_add_subtree(pi, ett_acn_dmx_2_options);
5895 proto_tree_add_item(flag_tree, hf_acn_dmx_2_option_p, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5896 proto_tree_add_item(flag_tree, hf_acn_dmx_2_option_s, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5897 proto_tree_add_item(flag_tree, hf_acn_dmx_2_option_f, tvb, data_offset, 1, ENC_BIG_ENDIAN);
5898 data_offset += 1;
5901 universe = tvb_get_ntohs(tvb, data_offset);
5902 proto_tree_add_item(pdu_tree, hf_acn_dmx_universe, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5903 data_offset += 2;
5905 /* add universe to info */
5906 col_append_fstr(pinfo->cinfo,COL_INFO, ", Universe %d, Seq %3d", universe, sequence );
5907 proto_item_append_text(ti, ", Universe: %d, Priority: %d", universe, priority);
5909 /*data_offset =*/ dissect_acn_dmx_data_pdu(protocol_id, tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
5911 break;
5913 return pdu_start + pdu_length;
5916 /******************************************************************************/
5917 /* Dissect SDT Base PDU */
5918 static uint32_t
5919 dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
5921 /* common to all pdu */
5922 uint8_t pdu_flags;
5923 uint32_t pdu_start;
5924 uint32_t pdu_length;
5925 uint32_t pdu_flvh_length; /* flags, length, vector, header */
5926 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
5927 uint32_t vector_offset;
5928 uint32_t data_offset;
5929 uint32_t end_offset;
5930 uint32_t old_offset;
5931 uint32_t data_length;
5933 proto_item *ti, *pi;
5934 proto_tree *pdu_tree;
5936 /* this pdu */
5937 const char *name;
5938 uint32_t vector;
5939 uint32_t member_id;
5941 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_acn_sdt_base_pdu, 1, 1);
5943 /* Add Vector item */
5944 vector = tvb_get_uint8(tvb, vector_offset);
5945 proto_tree_add_uint(pdu_tree, hf_acn_sdt_vector, tvb, vector_offset, 1, vector);
5947 /* Add Vector item to tree*/
5948 name = val_to_str(vector, acn_sdt_vector_vals, "not valid (%d)");
5949 proto_item_append_text(ti, ": %s", name);
5950 /* proto_item_append_text(ti, "%s", name); */
5952 /* NO HEADER DATA ON THESE* (at least so far) */
5954 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 1);
5955 end_offset = data_offset + data_length;
5957 /* process based on vector */
5958 switch (vector) {
5959 case ACN_SDT_VECTOR_UNKNOWN:
5960 break;
5961 case ACN_SDT_VECTOR_REL_WRAP:
5962 case ACN_SDT_VECTOR_UNREL_WRAP:
5963 proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5964 data_offset += 2;
5965 proto_tree_add_item(pdu_tree, hf_acn_total_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5966 data_offset += 4;
5967 proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5968 data_offset += 4;
5969 proto_tree_add_item(pdu_tree, hf_acn_oldest_available_wrapper, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5970 data_offset += 4;
5971 proto_tree_add_item(pdu_tree, hf_acn_first_member_to_ack, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5972 data_offset += 2;
5973 proto_tree_add_item(pdu_tree, hf_acn_last_member_to_ack, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5974 data_offset += 2;
5975 proto_tree_add_item(pdu_tree, hf_acn_mak_threshold, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5976 data_offset += 2;
5978 while (data_offset < end_offset) {
5979 old_offset = data_offset;
5980 data_offset = dissect_acn_sdt_client_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
5981 if (data_offset == old_offset) break;
5983 break;
5984 case ACN_SDT_VECTOR_CHANNEL_PARAMS:
5985 break;
5986 case ACN_SDT_VECTOR_JOIN:
5987 proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, ENC_BIG_ENDIAN);
5988 data_offset += 16;
5989 proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5990 data_offset += 2;
5991 proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5992 data_offset += 2;
5993 proto_tree_add_item(pdu_tree, hf_acn_reciprocal_channel, tvb, data_offset, 2, ENC_BIG_ENDIAN);
5994 data_offset += 2;
5995 proto_tree_add_item(pdu_tree, hf_acn_total_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5996 data_offset += 4;
5997 proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
5998 data_offset += 4;
5999 data_offset = acn_add_address(tvb, pinfo, pdu_tree, data_offset, "Destination Address:");
6000 data_offset = acn_add_channel_parameter(tvb, pinfo, pdu_tree, data_offset);
6001 /*data_offset =*/ acn_add_expiry(tvb, pinfo, pdu_tree, data_offset, hf_acn_adhoc_expiry);
6002 break;
6003 case ACN_SDT_VECTOR_JOIN_REFUSE:
6004 pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, ENC_BIG_ENDIAN);
6005 data_offset += 16;
6006 proto_item_append_text(pi, "(Leader)");
6007 proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6008 data_offset += 2;
6009 proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6010 data_offset += 2;
6011 proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
6012 data_offset += 4;
6013 proto_tree_add_item(pdu_tree, hf_acn_refuse_code, tvb, data_offset, 1, ENC_BIG_ENDIAN);
6014 /*data_offset ++;*/
6015 break;
6016 case ACN_SDT_VECTOR_JOIN_ACCEPT:
6017 pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, ENC_BIG_ENDIAN);
6018 data_offset += 16;
6019 proto_item_append_text(pi, "(Leader)");
6020 proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6021 data_offset += 2;
6022 proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6023 data_offset += 2;
6024 proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
6025 data_offset += 4;
6026 proto_tree_add_item(pdu_tree, hf_acn_reciprocal_channel, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6027 /*data_offset += 2;*/
6028 break;
6029 case ACN_SDT_VECTOR_LEAVE:
6030 break;
6031 case ACN_SDT_VECTOR_LEAVING:
6032 pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, ENC_BIG_ENDIAN);
6033 data_offset += 16;
6034 proto_item_append_text(pi, "(Leader)");
6035 proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6036 data_offset += 2;
6037 proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6038 data_offset += 2;
6039 proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
6040 data_offset += 4;
6041 proto_tree_add_item(pdu_tree, hf_acn_reason_code, tvb, data_offset, 1, ENC_BIG_ENDIAN);
6042 /* offset += 1; */
6043 break;
6044 case ACN_SDT_VECTOR_CONNECT:
6045 break;
6046 case ACN_SDT_VECTOR_CONNECT_ACCEPT:
6047 break;
6048 case ACN_SDT_VECTOR_CONNECT_REFUSE:
6049 break;
6050 case ACN_SDT_VECTOR_DISCONNECT:
6051 break;
6052 case ACN_SDT_VECTOR_DISCONNECTING:
6053 break;
6054 case ACN_SDT_VECTOR_ACK:
6055 break;
6056 case ACN_SDT_VECTOR_NAK:
6057 pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, ENC_BIG_ENDIAN);
6058 data_offset += 16;
6059 proto_item_append_text(pi, "(Leader)");
6060 proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6061 data_offset += 2;
6062 proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6063 data_offset += 2;
6064 proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
6065 data_offset += 4;
6066 proto_tree_add_item(pdu_tree, hf_acn_first_missed_sequence, tvb, data_offset, 4, ENC_BIG_ENDIAN);
6067 data_offset += 4;
6068 proto_tree_add_item(pdu_tree, hf_acn_last_missed_sequence, tvb, data_offset, 4, ENC_BIG_ENDIAN);
6069 /*data_offset += 4;*/
6070 break;
6071 case ACN_SDT_VECTOR_GET_SESSION:
6072 proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, ENC_BIG_ENDIAN);
6073 /*data_offset += 16;*/
6074 break;
6075 case ACN_SDT_VECTOR_SESSIONS:
6076 member_id = tvb_get_ntohs(tvb, data_offset);
6077 switch (member_id) {
6078 case 0:
6079 /*data_offset =*/ acn_add_channel_owner_info_block(tvb, pinfo, pdu_tree, data_offset);
6080 break;
6081 case 1:
6082 /*data_offset =*/ acn_add_channel_member_info_block(tvb, pinfo, pdu_tree, data_offset);
6083 break;
6085 break;
6088 return pdu_start + pdu_length;
6092 /******************************************************************************/
6093 /* Dissect LLRP Probe Request PDU */
6094 static uint32_t
6095 dissect_llrp_probe_request_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6097 /* common to all pdu */
6098 uint8_t pdu_flags;
6099 uint8_t vector;
6100 uint8_t filter_flags;
6101 uint32_t pdu_start;
6102 uint32_t pdu_length;
6103 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6104 uint32_t data_offset;
6105 uint32_t end_offset;
6107 proto_item *ti, *pi;
6108 proto_tree *flag_tree;
6109 proto_tree *pdu_tree;
6111 begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_rdmnet_llrp_probe_request_pdu, 0);
6113 /* Add PDU Length item */
6114 proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_request_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
6116 dissect_pdu_bit_flag_v(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 2);
6117 /* offset should now be pointing to header (if one exists) */
6119 /* add vector item */
6120 vector = tvb_get_uint8(tvb, data_offset);
6121 proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_request_vector, tvb, data_offset, 1, vector);
6123 dissect_pdu_bit_flag_h(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 6);
6124 data_offset -= 1;
6125 /* offset should now be pointing to data (if one exists) */
6127 /* lower uid */
6128 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_probe_request_lower_uid, tvb, data_offset, 6, ENC_NA);
6129 data_offset += 6;
6131 /* upper uid */
6132 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_probe_request_upper_uid, tvb, data_offset, 6, ENC_NA);
6133 data_offset += 6;
6135 /* filter */
6136 filter_flags = tvb_get_uint8(tvb, data_offset);
6137 filter_flags = filter_flags & 0x03;
6138 pi = proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_request_filter, tvb, data_offset, 1, filter_flags);
6139 flag_tree = proto_item_add_subtree(pi, ett_rdmnet_llrp_probe_request_filter_flags);
6140 proto_tree_add_item(flag_tree, hf_rdmnet_llrp_probe_request_filter_brokers_only, tvb, data_offset, 1, ENC_BIG_ENDIAN);
6141 proto_tree_add_item(flag_tree, hf_rdmnet_llrp_probe_request_filter_client_tcp_inactive, tvb, data_offset, 2, ENC_BIG_ENDIAN);
6142 data_offset += 2;
6144 /* known uids */
6145 end_offset = pdu_start + pdu_length;
6146 while (data_offset + 6 <= end_offset) {
6147 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_probe_request_known_uid, tvb, data_offset, 6, ENC_NA);
6148 data_offset += 6;
6151 return pdu_start + pdu_length;
6155 /******************************************************************************/
6156 /* Dissect LLRP Probe Reply PDU */
6157 static uint32_t
6158 dissect_llrp_probe_reply_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6160 /* common to all pdu */
6161 uint8_t pdu_flags;
6162 uint8_t vector;
6163 uint32_t pdu_start;
6164 uint32_t pdu_length;
6165 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6166 uint32_t data_offset;
6168 proto_item *ti;
6169 proto_tree *pdu_tree;
6171 begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_rdmnet_llrp_probe_reply_pdu, 0);
6173 /* Add PDU Length item */
6174 proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_request_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
6176 dissect_pdu_bit_flag_v(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 2);
6177 /* offset should now be pointing to header (if one exists) */
6179 /* add vector item */
6180 vector = tvb_get_uint8(tvb, data_offset);
6181 proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_reply_vector, tvb, data_offset, 1, vector);
6183 dissect_pdu_bit_flag_h(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 6);
6184 data_offset -= 1;
6185 /* offset should now be pointing to data (if one exists) */
6187 /* uid */
6188 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_probe_reply_uid, tvb, data_offset, 6, ENC_NA);
6189 data_offset += 6;
6191 /* hardware address */
6192 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_probe_reply_hardware_address, tvb, data_offset, 6, ENC_NA);
6193 data_offset += 6;
6195 /* component type */
6196 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_probe_reply_component_type, tvb, data_offset, 1, ENC_BIG_ENDIAN);
6198 return pdu_start + pdu_length;
6202 /******************************************************************************/
6203 /* Dissect RDM Command */
6204 static uint32_t
6205 dissect_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree, uint32_t data_offset, uint32_t length)
6207 bool save_info;
6208 bool save_protocol;
6209 uint32_t data_end;
6210 tvbuff_t *next_tvb;
6212 save_info = col_get_writable(pinfo->cinfo, COL_INFO);
6213 save_protocol = col_get_writable(pinfo->cinfo, COL_PROTOCOL);
6214 col_set_writable(pinfo->cinfo, COL_INFO, false);
6215 col_set_writable(pinfo->cinfo, COL_PROTOCOL, false);
6217 data_end = data_offset + length;
6218 next_tvb = tvb_new_subset_length(tvb, data_offset, length);
6219 call_dissector(rdm_handle, next_tvb, pinfo, pdu_tree);
6221 col_set_writable(pinfo->cinfo, COL_INFO, save_info);
6222 col_set_writable(pinfo->cinfo, COL_PROTOCOL, save_protocol);
6224 return data_end;
6228 /******************************************************************************/
6229 /* Dissect LLRP RDM Command PDU */
6230 static uint32_t
6231 dissect_llrp_rdm_command_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6233 /* common to all pdu */
6234 uint8_t pdu_flags;
6235 uint8_t vector;
6236 uint32_t pdu_start;
6237 uint32_t pdu_length;
6238 uint32_t pdu_end;
6239 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6240 uint32_t data_offset;
6242 proto_item *ti;
6243 proto_tree *pdu_tree;
6245 /* this pdu */
6246 const char *name;
6248 begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_rdmnet_llrp_rdm_command_pdu, 0);
6250 /* Add PDU Length item */
6251 proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_probe_request_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
6253 dissect_pdu_bit_flag_v(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 2);
6254 /* offset should now be pointing to header (if one exists) */
6256 /* add vector item */
6257 vector = tvb_get_uint8(tvb, data_offset);
6258 proto_tree_add_uint(pdu_tree, hf_rdmnet_llrp_rdm_command_start_code, tvb, data_offset, 1, vector);
6260 /* Add Vector item to tree */
6261 name = val_to_str(vector, rdmnet_llrp_rdm_command_start_code_vals, "unknown (%d)");
6262 proto_item_append_text(ti, ": %s", name);
6264 dissect_pdu_bit_flag_h(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 6);
6265 data_offset -= 1;
6266 /* offset should now be pointing to data (if one exists) */
6268 pdu_end = pdu_start + pdu_length;
6269 dissect_rdm_command(tvb, pinfo, pdu_tree, data_offset, (pdu_length-4));
6271 return pdu_end;
6275 /******************************************************************************/
6276 /* Dissect LLRP Base PDU */
6277 static uint32_t
6278 dissect_acn_llrp_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6280 uint8_t pdu_flags;
6281 uint32_t pdu_start;
6282 uint32_t pdu_length;
6283 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6284 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
6285 uint32_t vector_offset;
6286 uint32_t data_offset;
6287 uint32_t data_length;
6288 e_guid_t guid;
6290 proto_item *ti;
6291 proto_tree *pdu_tree;
6293 /* this pdu */
6294 const char *name;
6295 uint32_t vector;
6297 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_llrp_base_pdu, 1, 0);
6299 /* Add Vector item */
6300 vector = tvb_get_ntohl(tvb, vector_offset);
6301 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
6303 /* Add Vector item to tree */
6304 name = val_to_str(vector, rdmnet_llrp_vector_vals, "unknown (%d)");
6305 proto_item_append_text(ti, ": %s", name);
6307 /* NO HEADER DATA ON THESE* (at least so far) */
6309 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6310 data_offset += 3;
6312 /* get destination (CID) 16 bytes */
6313 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_destination_cid, tvb, data_offset, 16, ENC_BIG_ENDIAN);
6314 tvb_get_guid(tvb, data_offset, &guid, ENC_BIG_ENDIAN);
6315 proto_item_append_text(ti, ", Dest: %s", guid_to_str(pinfo->pool, &guid));
6316 data_offset += 16;
6318 /* transaction number (4 bytes) */
6319 proto_tree_add_item(pdu_tree, hf_rdmnet_llrp_transaction_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
6320 data_offset += 4;
6322 /* process based on vector */
6323 switch (vector) {
6324 case RDMNET_LLRP_VECTOR_PROBE_REQUEST:
6325 dissect_llrp_probe_request_pdu(tvb, pdu_tree, data_offset, &pdu_offsets);
6326 break;
6327 case RDMNET_LLRP_VECTOR_PROBE_REPLY:
6328 dissect_llrp_probe_reply_pdu(tvb, pdu_tree, data_offset, &pdu_offsets);
6329 break;
6330 case RDMNET_LLRP_VECTOR_RDM_CMD:
6331 dissect_llrp_rdm_command_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
6332 break;
6335 return pdu_start + pdu_length;
6339 /******************************************************************************/
6340 /* Dissect Broker Client Entry PDU */
6341 static uint32_t
6342 dissect_broker_client_entry_pdu(tvbuff_t *tvb, proto_tree *tree, uint32_t offset, acn_pdu_offsets *last_pdu_offsets)
6344 uint8_t pdu_flags;
6345 uint32_t pdu_start;
6346 uint32_t pdu_length;
6347 uint32_t pdu_end;
6348 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6349 uint32_t vector_offset;
6350 uint32_t data_offset;
6351 uint32_t data_length;
6353 proto_item *ti;
6354 proto_item *ti2;
6355 proto_tree *pdu_tree;
6356 proto_tree *pdu_tree2;
6358 /* this pdu */
6359 const char *name;
6360 uint32_t vector;
6362 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_broker_client_entry_pdu, 1, 0);
6363 pdu_end = pdu_start + pdu_length;
6365 /* Add Vector item */
6366 vector = tvb_get_ntohl(tvb, vector_offset);
6367 proto_tree_add_item(pdu_tree, hf_rdmnet_broker_client_protocol_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
6369 /* Add Vector item to tree */
6370 name = val_to_str(vector, broker_client_protocol_vals, "unknown (%d)");
6371 proto_item_append_text(ti, ": %s", name);
6373 /* NO HEADER DATA ON THESE* (at least so far) */
6375 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6376 data_offset += 3;
6378 /* client protocol cid */
6379 proto_tree_add_item(pdu_tree, hf_rdmnet_broker_client_protocol_cid, tvb, data_offset, 16, ENC_NA);
6380 data_offset += 16;
6382 /* process based on vector */
6383 switch (vector) {
6384 case RDMNET_CLIENT_PROTOCOL_RPT:
6385 /* client uid */
6386 proto_tree_add_item(pdu_tree, hf_rdmnet_broker_client_rpt_client_uid, tvb, data_offset, 6, ENC_NA);
6387 data_offset += 6;
6389 /* client type */
6390 proto_tree_add_item(pdu_tree, hf_rdmnet_broker_client_rpt_client_type, tvb, data_offset, 1, ENC_BIG_ENDIAN);
6391 data_offset += 1;
6393 /* binding cid */
6394 proto_tree_add_item(pdu_tree, hf_rdmnet_broker_client_rpt_binding_cid, tvb, data_offset, 16, ENC_NA);
6395 data_offset += 16;
6396 break;
6397 case RDMNET_CLIENT_PROTOCOL_EPT:
6398 while (offset + 36 < pdu_end) {
6399 /* protocol vector (manufacturer id + protocol id) */
6400 ti2 = proto_tree_add_item(pdu_tree, hf_rdmnet_broker_client_ept_protocol_vector, tvb, data_offset, 4, ENC_NA);
6401 pdu_tree2 = proto_item_add_subtree(ti2, ett_rdmnet_broker_client_entry_manufacturer_protocol_ids);
6402 proto_tree_add_item(pdu_tree2, hf_rdmnet_broker_client_ept_protocol_manufacturer_id, tvb, 0, 2, ENC_BIG_ENDIAN);
6403 proto_tree_add_item(pdu_tree2, hf_rdmnet_broker_client_ept_protocol_protocol_id, tvb, 2, 2, ENC_BIG_ENDIAN);
6404 offset += 4;
6406 /* protocol string */
6407 proto_tree_add_item(pdu_tree, hf_rdmnet_broker_client_ept_protocol_string, tvb, data_offset, 32, ENC_ASCII);
6408 data_offset += 32;
6410 break;
6413 return pdu_end;
6417 /******************************************************************************/
6418 /* Dissect Broker Connect */
6419 static uint32_t
6420 dissect_broker_connect(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, uint32_t pdu_end)
6422 uint8_t connection_flags;
6423 proto_item *pi;
6424 proto_tree *flag_tree;
6426 /* client scope */
6427 proto_tree_add_item(tree, hf_rdmnet_broker_connect_client_scope, tvb, offset, 63, ENC_ASCII);
6428 offset += 63;
6430 /* e133 version */
6431 proto_tree_add_item(tree, hf_rdmnet_broker_connect_e133_version, tvb, offset, 2, ENC_BIG_ENDIAN);
6432 offset += 2;
6434 /* search domain */
6435 proto_tree_add_item(tree, hf_rdmnet_broker_connect_search_domain, tvb, offset, 231, ENC_ASCII);
6436 offset += 231;
6438 /* connection flags */
6439 connection_flags = tvb_get_uint8(tvb, offset);
6440 connection_flags = connection_flags & 0x01;
6441 pi = proto_tree_add_uint(tree, hf_rdmnet_broker_connect_connection_flags, tvb, offset, 1, connection_flags);
6442 flag_tree = proto_item_add_subtree(pi, ett_rdmnet_broker_connect_connection_flags);
6443 proto_tree_add_item(flag_tree, hf_rdmnet_broker_connect_connection_flags_incremental_updates, tvb, offset, 1, ENC_BIG_ENDIAN);
6444 offset += 1;
6446 /* client_entry_pdu */
6447 dissect_broker_client_entry_pdu(tvb, tree, offset, last_pdu_offsets);
6449 return pdu_end;
6453 /******************************************************************************/
6454 /* Dissect Broker Connect Reply */
6455 static uint32_t
6456 dissect_broker_connect_reply(tvbuff_t *tvb, proto_tree *tree, int offset)
6458 /* connection code */
6459 proto_tree_add_item(tree, hf_rdmnet_broker_connect_reply_connection_code, tvb, offset, 2, ENC_BIG_ENDIAN);
6460 offset += 2;
6462 /* e133 version */
6463 proto_tree_add_item(tree, hf_rdmnet_broker_connect_reply_e133_version, tvb, offset, 2, ENC_BIG_ENDIAN);
6464 offset += 2;
6466 /* broker uid */
6467 proto_tree_add_item(tree, hf_rdmnet_broker_connect_reply_broker_uid, tvb, offset, 6, ENC_NA);
6468 offset += 6;
6470 /* client uid */
6471 proto_tree_add_item(tree, hf_rdmnet_broker_connect_reply_client_uid, tvb, offset, 6, ENC_NA);
6473 return 0;
6477 /******************************************************************************/
6478 /* Dissect Broker Client Entry Update */
6479 static uint32_t
6480 dissect_broker_client_entry_update(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, uint32_t pdu_end)
6482 uint8_t connection_flags;
6484 proto_item *pi;
6485 proto_tree *flag_tree;
6487 /* connection flags */
6488 connection_flags = tvb_get_uint8(tvb, offset);
6489 connection_flags = connection_flags & 0x01;
6490 pi = proto_tree_add_uint(tree, hf_rdmnet_broker_client_entry_update_connection_flags, tvb, offset, 1, connection_flags);
6491 flag_tree = proto_item_add_subtree(pi, ett_rdmnet_broker_client_entry_update_connection_flags);
6492 proto_tree_add_item(flag_tree, hf_rdmnet_broker_client_entry_update_connection_flags_incremental_updates, tvb, offset, 1, ENC_BIG_ENDIAN);
6493 offset += 1;
6495 /* client_entry_pdu */
6496 dissect_broker_client_entry_pdu(tvb, tree, offset, last_pdu_offsets);
6498 return pdu_end;
6502 /******************************************************************************/
6503 /* Dissect Broker Redirect V4 */
6504 static uint32_t
6505 dissect_broker_redirect_v4(tvbuff_t *tvb, proto_tree *tree, int offset)
6507 /* ipv4 address */
6508 proto_tree_add_item(tree, hf_rdmnet_broker_redirect_ipv4_address, tvb, offset, 4, ENC_BIG_ENDIAN);
6509 offset += 4;
6511 /* tcp port */
6512 proto_tree_add_item(tree, hf_rdmnet_broker_redirect_ipv4_tcp_port, tvb, offset, 2, ENC_BIG_ENDIAN);
6514 return 0;
6518 /******************************************************************************/
6519 /* Dissect Broker Redirect V6 */
6520 static uint32_t
6521 dissect_broker_redirect_v6(tvbuff_t *tvb, proto_tree *tree, int offset)
6523 /* ipv6 address */
6524 proto_tree_add_item(tree, hf_rdmnet_broker_redirect_ipv6_address, tvb, offset, 16, ENC_NA);
6525 offset += 16;
6527 /* tcp port */
6528 proto_tree_add_item(tree, hf_rdmnet_broker_redirect_ipv6_tcp_port, tvb, offset, 2, ENC_BIG_ENDIAN);
6530 return 0;
6534 /******************************************************************************/
6535 /* Dissect Broker Disconnect */
6536 static uint32_t
6537 dissect_broker_disconnect(tvbuff_t *tvb, proto_tree *tree, int offset)
6539 /* disconnect reason */
6540 proto_tree_add_item(tree, hf_rdmnet_broker_disconnect_reason, tvb, offset, 2, ENC_BIG_ENDIAN);
6542 return 0;
6546 /******************************************************************************/
6547 /* Dissect Broker Request Dynamic UIDs */
6548 static uint32_t
6549 dissect_broker_request_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, uint32_t offset, uint32_t pdu_end)
6551 /* packed list of dynamic uid request (6 bytes) and rid (16 bytes) */
6552 while (offset + 22 < pdu_end) {
6553 /* dynamic uid request (6 bytes) */
6554 proto_tree_add_item(tree, hf_rdmnet_broker_dynamic_uid_request, tvb, offset, 6, ENC_NA);
6555 offset += 6;
6557 /* rid (16 bytes) */
6558 proto_tree_add_item(tree, hf_rdmnet_broker_rid, tvb, offset, 16, ENC_NA);
6559 offset += 16;
6562 return 0;
6566 /******************************************************************************/
6567 /* Dissect Broker Assigned Dynamic UIDs */
6568 static uint32_t
6569 dissect_broker_assigned_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, uint32_t offset, uint32_t pdu_end)
6571 /* packed list of dynamic uid request (6 bytes), rid (16 bytes), and status_code (2 bytes) */
6572 while (offset + 24 < pdu_end) {
6573 /* dynamic uid request (6 bytes) */
6574 proto_tree_add_item(tree, hf_rdmnet_broker_assigned_dynamic_uid, tvb, offset, 6, ENC_NA);
6575 offset += 6;
6577 /* rid (16 bytes) */
6578 proto_tree_add_item(tree, hf_rdmnet_broker_assigned_rid, tvb, offset, 16, ENC_NA);
6579 offset += 16;
6581 /* status code (2 bytes) */
6582 proto_tree_add_item(tree, hf_rdmnet_broker_assigned_status_code, tvb, offset, 2, ENC_NA);
6583 offset += 2;
6586 return 0;
6590 /******************************************************************************/
6591 /* Dissect Broker Fetch Dynamic UIDs */
6592 static uint32_t
6593 dissect_broker_fetch_dynamic_uids(tvbuff_t *tvb, proto_tree *tree, uint32_t offset, uint32_t pdu_end)
6595 /* packed list of dynamic uid request (6 bytes) */
6596 while (offset + 6 < pdu_end) {
6597 /* dynamic uid request (6 bytes) */
6598 proto_tree_add_item(tree, hf_rdmnet_broker_fetch_dynamic_uid, tvb, offset, 6, ENC_NA);
6599 offset += 6;
6602 return 0;
6606 /******************************************************************************/
6607 /* Dissect Broker Base PDU */
6608 static uint32_t
6609 dissect_acn_broker_base_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6611 uint8_t pdu_flags;
6612 uint32_t pdu_start;
6613 uint32_t pdu_length;
6614 uint32_t pdu_end;
6615 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6616 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
6617 uint32_t vector_offset;
6618 uint32_t data_offset;
6619 uint32_t old_offset;
6620 uint32_t end_offset;
6621 uint32_t data_length;
6623 proto_item *ti;
6624 proto_tree *pdu_tree;
6626 /* this pdu */
6627 const char *name;
6628 uint16_t vector;
6630 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_broker_base_pdu, 1, 0);
6631 pdu_end = pdu_start + pdu_length;
6633 /* Add Vector item */
6634 vector = tvb_get_ntohs(tvb, vector_offset);
6635 proto_tree_add_item(pdu_tree, hf_rdmnet_broker_vector, tvb, vector_offset, 2, ENC_BIG_ENDIAN);
6637 /* Add Vector item to tree */
6638 name = val_to_str(vector, rdmnet_broker_vector_vals, "unknown (%d)");
6639 proto_item_append_text(ti, ": %s", name);
6641 /* NO HEADER DATA ON THESE* (at least so far) */
6643 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6644 data_offset += 1;
6646 /* process based on vector */
6647 switch (vector) {
6648 case RDMNET_BROKER_VECTOR_FETCH_CLIENT_LIST:
6649 case RDMNET_BROKER_VECTOR_NULL:
6650 /* no data */
6651 break;
6652 case RDMNET_BROKER_VECTOR_CONNECTED_CLIENT_LIST:
6653 case RDMNET_BROKER_VECTOR_CLIENT_ADD:
6654 case RDMNET_BROKER_VECTOR_CLIENT_REMOVE:
6655 case RDMNET_BROKER_VECTOR_CLIENT_ENTRY_CHANGE:
6656 end_offset = pdu_start + pdu_length;
6657 while (data_offset < end_offset) {
6658 old_offset = data_offset;
6659 data_offset = dissect_broker_client_entry_pdu(tvb, pdu_tree, data_offset, &pdu_offsets);
6660 if (data_offset == old_offset) break;
6662 break;
6663 case RDMNET_BROKER_VECTOR_CONNECT:
6664 dissect_broker_connect(tvb, pdu_tree, data_offset, &pdu_offsets, pdu_end);
6665 break;
6666 case RDMNET_BROKER_VECTOR_CONNECT_REPLY:
6667 dissect_broker_connect_reply(tvb, pdu_tree, data_offset);
6668 break;
6669 case RDMNET_BROKER_VECTOR_CLIENT_ENTRY_UPDATE:
6670 dissect_broker_client_entry_update(tvb, pdu_tree, data_offset, &pdu_offsets, pdu_end);
6671 break;
6672 case RDMNET_BROKER_VECTOR_REDIRECT_V4:
6673 dissect_broker_redirect_v4(tvb, pdu_tree, data_offset);
6674 break;
6675 case RDMNET_BROKER_VECTOR_REDIRECT_V6:
6676 dissect_broker_redirect_v6(tvb, pdu_tree, data_offset);
6677 break;
6678 case RDMNET_BROKER_VECTOR_DISCONNECT:
6679 dissect_broker_disconnect(tvb, pdu_tree, data_offset);
6680 break;
6681 case RDMNET_BROKER_VECTOR_REQUEST_DYNAMIC_UIDS:
6682 dissect_broker_request_dynamic_uids(tvb, pdu_tree, data_offset, pdu_end);
6683 break;
6684 case RDMNET_BROKER_VECTOR_ASSIGNED_DYNAMIC_UIDS:
6685 dissect_broker_assigned_dynamic_uids(tvb, pdu_tree, data_offset, pdu_end);
6686 break;
6687 case RDMNET_BROKER_VECTOR_FETCH_DYNAMIC_UID_LIST:
6688 dissect_broker_fetch_dynamic_uids(tvb, pdu_tree, data_offset, pdu_end);
6689 break;
6692 return pdu_start + pdu_length;
6696 /******************************************************************************/
6697 /* Dissect RPT Request RDM Command */
6698 static uint32_t
6699 dissect_rpt_request_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6701 uint8_t pdu_flags;
6702 uint32_t pdu_start;
6703 uint32_t pdu_length;
6704 uint32_t pdu_end;
6705 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6706 uint32_t vector_offset;
6707 uint32_t data_offset;
6708 uint32_t data_length;
6710 proto_item *ti;
6711 proto_tree *pdu_tree;
6713 /* this pdu */
6714 const char *name;
6715 uint8_t vector;
6717 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_request_pdu, 1, 0);
6719 /* Add Vector item */
6720 vector = tvb_get_uint8(tvb, vector_offset);
6721 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_request_rdm_command, tvb, vector_offset, 1, ENC_BIG_ENDIAN);
6723 /* Add Vector item to tree */
6724 name = val_to_str(vector, rdmnet_rpt_request_rdm_command_start_code_vals, "unknown (%d)");
6725 proto_item_append_text(ti, ": %s", name);
6727 /* NO HEADER DATA ON THESE* (at least so far) */
6729 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6730 /* data_offset += 3; */
6732 pdu_end = pdu_start + pdu_length;
6733 dissect_rdm_command(tvb, pinfo, pdu_tree, data_offset, (pdu_length-4));
6735 return pdu_end;
6739 /******************************************************************************/
6740 /* Dissect RPT Request */
6741 static uint32_t
6742 dissect_rpt_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6744 uint8_t pdu_flags;
6745 uint32_t pdu_start;
6746 uint32_t pdu_length;
6747 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6748 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
6749 uint32_t vector_offset;
6750 uint32_t data_offset;
6751 uint32_t data_length;
6753 proto_item *ti;
6754 proto_tree *pdu_tree;
6756 /* this pdu */
6757 const char *name;
6758 uint32_t vector;
6760 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_request_pdu, 1, 0);
6762 /* Add Vector item */
6763 vector = tvb_get_ntohl(tvb, vector_offset);
6764 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_request_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
6766 /* Add Vector item to tree */
6767 name = val_to_str(vector, rdmnet_rpt_request_vals, "unknown (%d)");
6768 proto_item_append_text(ti, ": %s", name);
6770 /* NO HEADER DATA ON THESE* (at least so far) */
6772 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6773 data_offset += 3;
6775 /* rdm command */
6776 dissect_rpt_request_rdm_command(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
6778 return 0;
6782 /******************************************************************************/
6783 /* Dissect RPT Status */
6784 static uint32_t
6785 dissect_rpt_status(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6787 uint8_t pdu_flags;
6788 uint32_t pdu_start;
6789 uint32_t pdu_length;
6790 uint32_t pdu_end;
6791 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6792 uint32_t vector_offset;
6793 uint32_t data_offset;
6794 uint32_t data_length;
6796 proto_item *ti;
6797 proto_tree *pdu_tree;
6799 /* this pdu */
6800 const char *name;
6801 uint16_t vector;
6803 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_status_pdu, 1, 0);
6805 /* Add Vector item */
6806 vector = tvb_get_ntohs(tvb, vector_offset);
6807 proto_item_append_text(ti, ", vector = %u", vector);
6808 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_status_vector, tvb, vector_offset, 2, ENC_BIG_ENDIAN);
6810 /* Add Vector item to tree */
6811 name = val_to_str(vector, rdmnet_rpt_status_vector_vals, "unknown (%d)");
6812 proto_item_append_text(ti, ": %s", name);
6814 /* NO HEADER DATA ON THESE* (at least so far) */
6816 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6817 data_offset += 3;
6819 pdu_end = pdu_start + pdu_length;
6820 switch (vector) {
6821 case RDMNET_RPT_VECTOR_STATUS_UNKNOWN_RPT_UID:
6822 if (pdu_end > data_offset) {
6823 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_status_unknown_rpt_uid_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
6825 break;
6826 case RDMNET_RPT_VECTOR_STATUS_RDM_TIMEOUT:
6827 if (pdu_end > data_offset) {
6828 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_status_rdm_timeout_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
6830 break;
6831 case RDMNET_RPT_VECTOR_STATUS_RDM_INVALID_RESPONSE:
6832 if (pdu_end > data_offset) {
6833 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_status_rdm_invalid_response_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
6835 break;
6836 case RDMNET_RPT_VECTOR_STATUS_UNKNOWN_RDM_UID:
6837 if (pdu_end > data_offset) {
6838 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_status_unknown_rdm_uid_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
6840 break;
6841 case RDMNET_RPT_VECTOR_STATUS_UNKNOWN_ENDPOINT:
6842 if (pdu_end > data_offset) {
6843 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_status_unknown_endpoint_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
6845 break;
6846 case RDMNET_RPT_VECTOR_STATUS_BROADCAST_COMPLETE:
6847 if (pdu_end > data_offset) {
6848 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_status_broadcast_complete_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
6850 break;
6851 case RDMNET_RPT_VECTOR_STATUS_UNKNOWN_VECTOR:
6852 if (pdu_end > data_offset) {
6853 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_status_unknown_vector_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
6855 break;
6856 case RDMNET_RPT_VECTOR_STATUS_INVALID_MESSAGE:
6857 case RDMNET_RPT_VECTOR_STATUS_INVALID_COMMAND_CLASS:
6858 /* no data */
6859 break;
6862 return pdu_start + pdu_length;
6866 /******************************************************************************/
6867 /* Dissect RPT Notification RDM Command */
6868 static uint32_t
6869 dissect_rpt_notification_rdm_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6871 uint8_t pdu_flags;
6872 uint32_t pdu_start;
6873 uint32_t pdu_length;
6874 uint32_t pdu_end;
6875 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6876 uint32_t vector_offset;
6877 uint32_t data_offset;
6878 uint32_t data_length;
6880 proto_item *ti;
6881 proto_tree *pdu_tree;
6883 /* this pdu */
6884 const char *name;
6885 uint8_t vector;
6887 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_request_pdu, 1, 0);
6889 /* Add Vector item */
6890 vector = tvb_get_uint8(tvb, vector_offset);
6891 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_notification_rdm_command, tvb, vector_offset, 1, ENC_BIG_ENDIAN);
6893 /* Add Vector item to tree */
6894 name = val_to_str(vector, rdmnet_rpt_request_rdm_command_start_code_vals, "unknown (%d)");
6895 proto_item_append_text(ti, ": %s", name);
6897 /* NO HEADER DATA ON THESE* (at least so far) */
6899 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6900 /* data_offset += 3; */
6902 pdu_end = pdu_start + pdu_length;
6903 dissect_rdm_command(tvb, pinfo, pdu_tree, data_offset, (pdu_length-4));
6905 return pdu_end;
6909 /******************************************************************************/
6910 /* Dissect RPT Notification */
6911 static uint32_t
6912 dissect_rpt_notification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6914 uint8_t pdu_flags;
6915 uint32_t pdu_start;
6916 uint32_t pdu_length;
6917 uint32_t pdu_end;
6918 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6919 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
6920 uint32_t vector_offset;
6921 uint32_t data_offset;
6922 uint32_t data_length;
6923 uint32_t old_offset;
6925 proto_item *ti;
6926 proto_tree *pdu_tree;
6928 /* this pdu */
6929 const char *name;
6930 uint32_t vector;
6932 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_notification_pdu, 1, 0);
6934 /* Add Vector item */
6935 vector = tvb_get_ntohl(tvb, vector_offset);
6936 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_notification_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
6938 /* Add Vector item to tree "RDM Command" */
6939 name = val_to_str(vector, rdmnet_rpt_notification_vals, "unknown (%d)");
6940 proto_item_append_text(ti, ": %s", name);
6942 /* NO HEADER DATA ON THESE* (at least so far) */
6944 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6945 data_offset += 3;
6947 /* rdm command */
6948 pdu_end = pdu_start + pdu_length;
6949 while (data_offset < pdu_end) {
6950 old_offset = data_offset;
6951 data_offset = dissect_rpt_notification_rdm_command(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
6952 if (data_offset == old_offset) break;
6955 return pdu_end;
6959 /******************************************************************************/
6960 /* Dissect RPT Base PDU */
6961 static uint32_t
6962 dissect_acn_rpt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
6964 uint8_t pdu_flags;
6965 uint32_t pdu_start;
6966 uint32_t pdu_length;
6967 uint32_t pdu_flvh_length; /* flags, length, vector, header */
6968 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
6969 uint32_t vector_offset;
6970 uint32_t data_offset;
6971 uint32_t data_length;
6973 proto_item *ti;
6974 proto_tree *pdu_tree;
6976 /* this pdu */
6977 const char *name;
6978 uint32_t vector;
6980 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_rpt_base_pdu, 1, 0);
6982 /* Add Vector item */
6983 vector = tvb_get_ntohl(tvb, vector_offset);
6984 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
6986 /* Add Vector item to tree */
6987 name = val_to_str(vector, rdmnet_rpt_vector_vals, "unknown (%d)");
6988 proto_item_append_text(ti, ": %s", name);
6990 /* NO HEADER DATA ON THESE* (at least so far) */
6992 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
6993 data_offset += 3;
6995 /* source uid (6 bytes) */
6996 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_source_uid, tvb, data_offset, 6, ENC_NA);
6997 data_offset += 6;
6999 /* source endpoint id (2 bytes) */
7000 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_source_endpoint_id, tvb, data_offset, 2, ENC_BIG_ENDIAN);
7001 data_offset += 2;
7003 /* destination uid (6 bytes) */
7004 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_destination_uid, tvb, data_offset, 6, ENC_NA);
7005 data_offset += 6;
7007 /* destination endpoint id (2 bytes) */
7008 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_destination_endpoint_id, tvb, data_offset, 2, ENC_BIG_ENDIAN);
7009 data_offset += 2;
7011 /* sequence number (4 bytes) */
7012 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_sequence_number, tvb, data_offset, 4, ENC_BIG_ENDIAN);
7013 data_offset += 4;
7015 /* reserved (1 byte) */
7016 proto_tree_add_item(pdu_tree, hf_rdmnet_rpt_reserved, tvb, data_offset, 1, ENC_BIG_ENDIAN);
7017 data_offset += 1;
7019 /* process based on vector */
7020 switch (vector) {
7021 case RDMNET_RPT_VECTOR_REQUEST:
7022 dissect_rpt_request(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
7023 break;
7024 case RDMNET_RPT_VECTOR_STATUS:
7025 dissect_rpt_status(tvb, pdu_tree, data_offset, &pdu_offsets);
7026 break;
7027 case RDMNET_RPT_VECTOR_NOTIFICATION:
7028 dissect_rpt_notification(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
7029 break;
7032 return pdu_start + pdu_length;
7036 /******************************************************************************/
7037 /* Dissect EPT Data */
7038 static uint32_t
7039 dissect_ept_data(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
7041 uint8_t pdu_flags;
7042 uint32_t pdu_start;
7043 uint32_t pdu_length;
7044 uint32_t pdu_end;
7045 uint32_t pdu_flvh_length; /* flags, length, vector, header */
7046 uint32_t vector_offset;
7047 uint32_t data_offset;
7049 proto_item *ti;
7050 proto_item *ti2;
7051 proto_tree *pdu_tree;
7052 proto_tree *pdu_tree2;
7054 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_ept_data_pdu, 1, 0);
7056 /* Add PDU Length item */
7057 proto_tree_add_uint(pdu_tree, hf_rdmnet_ept_data_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
7059 dissect_pdu_bit_flag_v(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 2);
7060 /* offset should now be pointing to header (if one exists) */
7062 /* esta manufacturer id + protocol id (4 bytes) */
7063 ti2 = proto_tree_add_item(pdu_tree, hf_rdmnet_ept_data_vector, tvb, data_offset, 4, ENC_BIG_ENDIAN);
7064 pdu_tree2 = proto_item_add_subtree(ti2, ett_rdmnet_ept_data_vector_pdu);
7065 proto_tree_add_item(pdu_tree2, hf_rdmnet_ept_data_vector_manufacturer_id, tvb, 0, 2, ENC_BIG_ENDIAN);
7066 proto_tree_add_item(pdu_tree2, hf_rdmnet_ept_data_vector_protocol_id, tvb, 2, 2, ENC_BIG_ENDIAN);
7067 data_offset += 4;
7069 /* opaque data */
7070 pdu_end = pdu_start + pdu_length;
7071 proto_tree_add_item(pdu_tree, hf_rdmnet_ept_data_opaque_data, tvb, data_offset, (pdu_end - data_offset), ENC_NA);
7073 return pdu_start + pdu_length;
7077 /******************************************************************************/
7078 /* Dissect EPT Status */
7079 static uint32_t
7080 dissect_ept_status(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
7082 uint8_t pdu_flags;
7083 uint16_t vector;
7084 uint32_t pdu_start;
7085 uint32_t pdu_length;
7086 uint32_t pdu_end;
7087 uint32_t pdu_flvh_length; /* flags, length, vector, header */
7088 uint32_t vector_offset;
7089 uint32_t data_offset;
7091 proto_item *ti;
7092 proto_tree *pdu_tree;
7094 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_ept_status_pdu, 1, 0);
7096 /* Add PDU Length item */
7097 proto_tree_add_uint(pdu_tree, hf_rdmnet_ept_status_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
7099 dissect_pdu_bit_flag_v(&offset, pdu_flags, &data_offset, last_pdu_offsets, &pdu_flvh_length, 2);
7100 /* offset should now be pointing to header (if one exists) */
7102 vector = tvb_get_ntohs(tvb, data_offset);
7103 proto_tree_add_item(pdu_tree, hf_rdmnet_ept_status_vector, tvb, data_offset, 2, ENC_NA);
7104 data_offset += 2;
7106 /* process based on vector */
7107 switch (vector) {
7108 case RDMNET_EPT_VECTOR_UNKNOWN_CID:
7109 /* unknown cid (16 bytes) */
7110 proto_tree_add_item(pdu_tree, hf_rdmnet_ept_status_unknown_cid, tvb, data_offset, 16, ENC_NA);
7111 data_offset += 16;
7113 /* status string */
7114 pdu_end = pdu_start + pdu_length;
7115 proto_tree_add_item(pdu_tree, hf_rdmnet_ept_status_status_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
7116 break;
7117 case RDMNET_EPT_VECTOR_UNKNOWN_VECTOR:
7118 /* unknown cid (4 bytes) */
7119 proto_tree_add_item(pdu_tree, hf_rdmnet_ept_status_unknown_vector, tvb, data_offset, 4, ENC_NA);
7120 data_offset += 4;
7122 /* vector string */
7123 pdu_end = pdu_start + pdu_length;
7124 proto_tree_add_item(pdu_tree, hf_rdmnet_ept_status_vector_string, tvb, data_offset, (pdu_end - data_offset), ENC_ASCII);
7125 break;
7128 return pdu_start + pdu_length;
7132 /******************************************************************************/
7133 /* Dissect EPT Base PDU */
7134 static uint32_t
7135 dissect_acn_ept_base_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets)
7137 uint8_t pdu_flags;
7138 uint32_t pdu_start;
7139 uint32_t pdu_length;
7140 uint32_t pdu_flvh_length; /* flags, length, vector, header */
7141 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
7142 uint32_t vector_offset;
7143 uint32_t data_offset;
7144 uint32_t data_length;
7146 proto_item *ti;
7147 proto_tree *pdu_tree;
7149 /* this pdu */
7150 const char *name;
7151 uint32_t vector;
7153 dissect_acn_common_base_pdu(tvb, tree, &offset, last_pdu_offsets, &pdu_flags, &pdu_start, &pdu_length, &pdu_flvh_length, &vector_offset, &ti, &pdu_tree, ett_rdmnet_ept_base_pdu, 1, 0);
7155 /* Add Vector item */
7156 vector = tvb_get_ntohl(tvb, vector_offset);
7157 proto_tree_add_item(pdu_tree, hf_rdmnet_ept_vector, tvb, vector_offset, 4, ENC_BIG_ENDIAN);
7159 /* Add Vector item to tree */
7160 name = val_to_str(vector, rdmnet_ept_vector_vals, "unknown (%d)");
7161 proto_item_append_text(ti, ": %s", name);
7163 /* NO HEADER DATA ON THESE* (at least so far) */
7165 dissect_pdu_bit_flag_d(offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, pdu_flvh_length, 0);
7166 data_offset += 3;
7168 /* destination cid (16 bytes) */
7169 proto_tree_add_item(pdu_tree, hf_rdmnet_ept_destination_cid, tvb, data_offset, 16, ENC_NA);
7170 data_offset += 16;
7172 /* process based on vector */
7173 switch (vector) {
7174 case RDMNET_EPT_VECTOR_DATA:
7175 dissect_ept_data(tvb, pdu_tree, data_offset, &pdu_offsets);
7176 break;
7177 case RDMNET_EPT_VECTOR_STATUS:
7178 dissect_ept_status(tvb, pdu_tree, data_offset, &pdu_offsets);
7179 break;
7182 return pdu_start + pdu_length;
7185 /******************************************************************************/
7186 /* Dissect Root PDU */
7187 static uint32_t
7188 dissect_acn_root_pdu_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree, proto_item *ti, const char *title, int *offset, uint8_t pdu_flags, uint32_t pdu_length, uint32_t *data_offset, uint32_t *data_length, acn_pdu_offsets *last_pdu_offsets, bool add_cid_to_info, uint32_t *pdu_flvh_length, bool is_acn)
7190 uint32_t header_offset;
7191 e_guid_t guid;
7193 /* Adjust header */
7194 proto_item_append_text(ti, "%s", title);
7196 dissect_pdu_bit_flag_h(offset, pdu_flags, &header_offset, last_pdu_offsets, pdu_flvh_length, 16);
7197 /* offset should now be pointing to data (if one exists) */
7199 /* get Header (CID) 16 bytes */
7200 tvb_get_guid(tvb, header_offset, &guid, ENC_BIG_ENDIAN);
7201 proto_item_append_text(ti, ", Src: %s", guid_to_str(pinfo->pool, &guid));
7203 if (add_cid_to_info) {
7204 /* add cid to info */
7205 col_add_fstr(pinfo->cinfo, COL_INFO, "CID %s", guid_to_str(pinfo->pool, &guid));
7208 if (is_acn) {
7209 proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, header_offset, 16, ENC_BIG_ENDIAN);
7210 } else {
7211 proto_tree_add_item(pdu_tree, hf_rdmnet_cid, tvb, header_offset, 16, ENC_BIG_ENDIAN);
7213 /* header_offset += 16; */
7215 dissect_pdu_bit_flag_d(*offset, pdu_flags, pdu_length, data_offset, data_length, last_pdu_offsets, *pdu_flvh_length, 1);
7217 return (*data_offset) + (*data_length);
7220 /******************************************************************************/
7221 /* Dissect Root PDU */
7222 static uint32_t
7223 dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, acn_pdu_offsets *last_pdu_offsets, bool is_acn)
7225 /* common to all pdu */
7226 uint8_t pdu_flags;
7227 uint32_t pdu_start;
7228 uint32_t pdu_length;
7229 uint32_t pdu_flvh_length; /* flags, length, vector, header */
7230 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
7231 uint32_t vector_offset;
7232 uint32_t data_offset;
7233 uint32_t end_offset;
7234 uint32_t old_offset;
7235 uint32_t data_length;
7237 proto_item *ti;
7238 proto_tree *pdu_tree;
7240 /* this pdu */
7241 uint32_t protocol_id;
7243 begin_dissect_acn_pdu(&pdu_tree, tvb, &ti, tree, &pdu_start, &offset, &pdu_flags, &pdu_length, &pdu_flvh_length, ett_acn_root_pdu, is_acn);
7245 /* Add PDU Length item */
7246 if (is_acn) {
7247 proto_tree_add_uint(pdu_tree, hf_acn_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
7248 } else {
7249 proto_tree_add_uint(pdu_tree, hf_rdmnet_pdu_length, tvb, pdu_start, pdu_flvh_length, pdu_length);
7252 dissect_pdu_bit_flag_v(&offset, pdu_flags, &vector_offset, last_pdu_offsets, &pdu_flvh_length, 4);
7253 /* offset should now be pointing to header (if one exists) */
7255 /* Get Protocol ID (vector) */
7256 protocol_id = tvb_get_ntohl(tvb, vector_offset);
7257 if (is_acn) {
7258 proto_tree_add_uint(pdu_tree, hf_acn_protocol_id, tvb, vector_offset, 4, protocol_id);
7259 } else {
7260 proto_tree_add_uint(pdu_tree, hf_rdmnet_protocol_id, tvb, vector_offset, 4, protocol_id);
7263 /* process based on protocol_id */
7264 switch (protocol_id) {
7265 case ACN_PROTOCOL_ID_DMX:
7266 case ACN_PROTOCOL_ID_DMX_2:
7267 case ACN_PROTOCOL_ID_DMX_3:
7268 if (global_acn_dmx_enable) {
7269 end_offset = dissect_acn_root_pdu_header(tvb, pinfo, pdu_tree, ti, ": Root DMX", &offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, 1, &pdu_flvh_length, 1);
7271 /* adjust for what we used */
7272 while (data_offset < end_offset) {
7273 old_offset = data_offset;
7274 data_offset = dissect_acn_dmx_base_pdu(protocol_id, tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
7275 if (data_offset == old_offset) break;
7278 break;
7279 case ACN_PROTOCOL_ID_EXTENDED:
7280 end_offset = dissect_acn_root_pdu_header(tvb, pinfo, pdu_tree, ti, ": Root DMX Extension", &offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, 1, &pdu_flvh_length, 1);
7282 /* adjust for what we used */
7283 while (data_offset < end_offset) {
7284 old_offset = data_offset;
7285 data_offset = dissect_acn_dmx_extension_base_pdu(protocol_id, tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
7286 if (data_offset == old_offset) break;
7288 break;
7289 case ACN_PROTOCOL_ID_SDT:
7290 end_offset = dissect_acn_root_pdu_header(tvb, pinfo, pdu_tree, ti, ": Root SDT", &offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, 0, &pdu_flvh_length, 1);
7292 /* adjust for what we used */
7293 while (data_offset < end_offset) {
7294 old_offset = data_offset;
7295 data_offset = dissect_acn_sdt_base_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
7296 if (data_offset == old_offset) break;
7298 break;
7299 case ACN_PROTOCOL_ID_RPT:
7300 end_offset = dissect_acn_root_pdu_header(tvb, pinfo, pdu_tree, ti, ": Root RPT", &offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, 0, &pdu_flvh_length, 0);
7302 /* adjust for what we used */
7303 while (data_offset < end_offset) {
7304 old_offset = data_offset;
7305 data_offset = dissect_acn_rpt_base_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
7306 if (data_offset == old_offset) break;
7308 break;
7309 case ACN_PROTOCOL_ID_BROKER:
7310 end_offset = dissect_acn_root_pdu_header(tvb, pinfo, pdu_tree, ti, ": Root Broker", &offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, 0, &pdu_flvh_length, 0);
7312 /* adjust for what we used */
7313 while (data_offset < end_offset) {
7314 old_offset = data_offset;
7315 data_offset = dissect_acn_broker_base_pdu(tvb, pdu_tree, data_offset, &pdu_offsets);
7316 if (data_offset == old_offset) break;
7318 break;
7319 case ACN_PROTOCOL_ID_LLRP:
7320 end_offset = dissect_acn_root_pdu_header(tvb, pinfo, pdu_tree, ti, ": Root LLRP", &offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, 0, &pdu_flvh_length, 0);
7322 /* adjust for what we used */
7323 while (data_offset < end_offset) {
7324 old_offset = data_offset;
7325 data_offset = dissect_acn_llrp_base_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
7326 if (data_offset == old_offset) break;
7328 break;
7329 case ACN_PROTOCOL_ID_EPT:
7330 end_offset = dissect_acn_root_pdu_header(tvb, pinfo, pdu_tree, ti, ": Root EPT", &offset, pdu_flags, pdu_length, &data_offset, &data_length, last_pdu_offsets, 0, &pdu_flvh_length, 0);
7332 /* adjust for what we used */
7333 while (data_offset < end_offset) {
7334 old_offset = data_offset;
7335 data_offset = dissect_acn_ept_base_pdu(tvb, pdu_tree, data_offset, &pdu_offsets);
7336 if (data_offset == old_offset) break;
7338 break;
7341 return pdu_start + pdu_length;
7344 /******************************************************************************/
7345 /* Dissect ACN */
7346 static int
7347 dissect_acn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
7349 proto_item *ti;
7350 proto_tree *acn_tree;
7351 uint32_t data_offset = 0;
7352 uint32_t old_offset;
7353 uint32_t end_offset;
7354 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
7355 uint16_t postamble_size;
7357 /* if (!is_acn(tvb)) { */
7358 /* return 0; */
7359 /* } */
7361 /* Set the protocol column */
7362 col_set_str(pinfo->cinfo, COL_PROTOCOL, "ACN");
7363 col_add_fstr(pinfo->cinfo, COL_INFO, "ACN [Src Port: %d, Dst Port: %d]", pinfo->srcport, pinfo->destport );
7365 ti = proto_tree_add_item(tree, proto_acn, tvb, 0, -1, ENC_NA);
7366 acn_tree = proto_item_add_subtree(ti, ett_acn);
7368 /* add preamble, postamble and ACN Packet ID */
7369 proto_tree_add_item(acn_tree, hf_acn_preamble_size, tvb, data_offset, 2, ENC_BIG_ENDIAN);
7370 data_offset += 2;
7371 postamble_size = tvb_get_uint16(tvb, data_offset, ENC_BIG_ENDIAN);
7372 proto_tree_add_item(acn_tree, hf_acn_postamble_size, tvb, data_offset, 2, ENC_BIG_ENDIAN);
7373 data_offset += 2;
7374 proto_tree_add_item(acn_tree, hf_acn_packet_identifier, tvb, data_offset, 12, ENC_UTF_8 | ENC_NA);
7375 data_offset += 12;
7377 /* one past the last data byte, not including the postamble */
7378 end_offset = data_offset + tvb_reported_length_remaining(tvb, data_offset);
7379 while (data_offset < end_offset - postamble_size) {
7380 old_offset = data_offset;
7381 data_offset = dissect_acn_root_pdu(tvb, pinfo, acn_tree, data_offset, &pdu_offsets, 1);
7382 if (data_offset == old_offset) return tvb_reported_length(tvb);
7384 /* one past the last postamble byte */
7385 while (data_offset < end_offset) {
7386 proto_tree_add_item(acn_tree, hf_acn_postamble_key_fingerprint, tvb, data_offset, 4, ENC_NA);
7387 data_offset += 4;
7388 proto_tree_add_item(acn_tree, hf_acn_postamble_seq_type, tvb, data_offset, 1, ENC_NA);
7389 data_offset += 1;
7390 proto_tree_add_item(acn_tree, hf_acn_postamble_seq_hi, tvb, data_offset, 3, ENC_BIG_ENDIAN);
7391 data_offset += 3;
7392 proto_tree_add_item(acn_tree, hf_acn_postamble_seq_low, tvb, data_offset, 4, ENC_BIG_ENDIAN);
7393 data_offset += 4;
7394 proto_tree_add_item(acn_tree, hf_acn_postamble_message_digest, tvb, data_offset, 16, ENC_NA);
7395 data_offset += 16;
7397 return tvb_reported_length(tvb);
7400 /******************************************************************************/
7401 /* Dissect RDMnet */
7402 static int
7403 dissect_rdmnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint32_t data_offset, bool is_udp)
7405 proto_item *ti;
7406 proto_tree *rdmnet_tree;
7407 /* uint32_t data_offset = 0; */
7408 uint32_t old_offset;
7409 uint32_t end_offset;
7410 uint32_t pdu_length;
7411 acn_pdu_offsets pdu_offsets = {0,0,0,0,0};
7413 /* Set the protocol column */
7414 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RDMnet");
7415 col_add_fstr(pinfo->cinfo, COL_INFO, "RDMnet [Src Port: %d, Dst Port: %d]", pinfo->srcport, pinfo->destport );
7417 if (is_udp) {
7418 ti = proto_tree_add_item(tree, proto_rdmnet, tvb, data_offset, -1, ENC_NA);
7419 } else {
7420 pdu_length = tvb_get_ntohl(tvb, 12) + 16;
7421 ti = proto_tree_add_item(tree, proto_rdmnet, tvb, data_offset, pdu_length, ENC_NA);
7423 rdmnet_tree = proto_item_add_subtree(ti, ett_rdmnet);
7425 if (is_udp) {
7426 /* UDP only: preamble and postamble */
7427 proto_tree_add_item(rdmnet_tree, hf_rdmnet_preamble_size, tvb, data_offset, 2, ENC_BIG_ENDIAN);
7428 data_offset += 2;
7429 proto_tree_add_item(rdmnet_tree, hf_rdmnet_postamble_size, tvb, data_offset, 2, ENC_BIG_ENDIAN);
7430 data_offset += 2;
7432 /* add ACN Packet ID */
7433 proto_tree_add_item(rdmnet_tree, hf_rdmnet_packet_identifier, tvb, data_offset, 12, ENC_UTF_8 | ENC_NA);
7434 data_offset += 12;
7436 pdu_length = 0;
7437 if (!is_udp) {
7438 /* TCP only: data length (may be less than packet length) */
7439 proto_tree_add_item(rdmnet_tree, hf_rdmnet_tcp_length, tvb, data_offset, 4, ENC_BIG_ENDIAN);
7440 pdu_length = tvb_get_ntohl(tvb, data_offset);
7441 data_offset += 4;
7444 /* one past the last byte */
7445 if (is_udp) {
7446 end_offset = data_offset + tvb_reported_length_remaining(tvb, data_offset);
7447 } else {
7448 end_offset = data_offset + pdu_length;
7450 while (data_offset < end_offset) {
7451 old_offset = data_offset;
7452 data_offset = dissect_acn_root_pdu(tvb, pinfo, rdmnet_tree, data_offset, &pdu_offsets, 0);
7453 if (data_offset == old_offset) break;
7456 return end_offset;
7459 /******************************************************************************/
7460 /* Register protocol */
7461 void
7462 proto_register_acn(void)
7464 static hf_register_info hf[] = {
7465 /**************************************************************************/
7466 /* In alphabetical order */
7467 /* Address Type */
7468 /* PDU flags*/
7469 { &hf_acn_ip_address_type,
7470 { "Addr Type", "acn.ip_address_type",
7471 FT_UINT8, BASE_DEC, VALS(acn_ip_address_type_vals), 0x0,
7472 NULL, HFILL }
7474 /* Association */
7475 { &hf_acn_association,
7476 { "Association", "acn.association",
7477 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7478 NULL, HFILL }
7480 /* Blob */
7481 { &hf_acn_blob,
7482 { "Blob", "acn.blob",
7483 FT_NONE, BASE_NONE, NULL, 0x0,
7484 NULL, HFILL }
7486 #if 0
7487 /* Blob Dimmer Load Properties 2 Type */
7488 { &hf_acn_blob_dimmer_load_properties2_type,
7489 { "Blob Field", "acn.blob_dimmer_load_properties2_type",
7490 FT_NONE, BASE_NONE, NULL, 0x0,
7491 NULL, HFILL }
7493 #endif
7494 /* Blob Field Length */
7495 { &hf_acn_blob_field_length,
7496 { "Field Length", "acn.blob_field_length",
7497 FT_UINT8, BASE_DEC, NULL, 0x0,
7498 NULL, HFILL }
7500 /* Blob Field Type */
7501 { &hf_acn_blob_field_type,
7502 { "Field Type", "acn.blob_field_type",
7503 FT_UINT8, BASE_DEC, VALS(acn_blob_field_type_vals), 0x0,
7504 NULL, HFILL }
7506 /* Blob Field Value Number */
7507 { &hf_acn_blob_field_value_number,
7508 { "Field Value", "acn.blob_field_value_number",
7509 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
7510 NULL, HFILL }
7512 { &hf_acn_blob_field_value_number64,
7513 { "Field Value", "acn.blob_field_value_number64",
7514 FT_UINT64, BASE_DEC_HEX, NULL, 0x0,
7515 NULL, HFILL }
7517 { &hf_acn_blob_field_value_float,
7518 { "Field Value", "acn.blob_field_value_float",
7519 FT_FLOAT, BASE_NONE, NULL, 0x0,
7520 NULL, HFILL }
7522 { &hf_acn_blob_field_value_double,
7523 { "Field Value", "acn.blob_field_value_double",
7524 FT_DOUBLE, BASE_NONE, NULL, 0x0,
7525 NULL, HFILL }
7527 { &hf_acn_blob_field_value_guid,
7528 { "Field Value", "acn.blob_field_value_guid",
7529 FT_GUID, BASE_NONE, NULL, 0x0,
7530 NULL, HFILL }
7533 /* Blob Field Value String*/
7534 { &hf_acn_blob_field_value_string,
7535 { "Field Value", "acn.blob_field_value_string",
7536 FT_STRING, BASE_NONE, NULL, 0x0,
7537 NULL, HFILL }
7539 /* Blob Field Value IPV4 */
7540 { &hf_acn_blob_field_value_ipv4,
7541 { "Field Value", "acn.blob_field_value_ipv4",
7542 FT_IPv4, BASE_NONE, NULL, 0x0,
7543 NULL, HFILL }
7545 /* Blob Field Value IPV6 */
7546 { &hf_acn_blob_field_value_ipv6,
7547 { "Field Value", "acn.blob_field_value_ipv6",
7548 FT_IPv6, BASE_NONE, NULL, 0x0,
7549 NULL, HFILL }
7551 /* Blob Metadata Device Type */
7552 { &hf_acn_blob_tree_field_type,
7553 { "Blob Field", "acn.blob_tree_field_type",
7554 FT_NONE, BASE_NONE, NULL, 0x0,
7555 NULL, HFILL }
7557 #if 0
7558 /* Blob Metadata Types Type */
7559 { &hf_acn_blob_metadata_types_type,
7560 { "Blob Field", "acn.blob_metadata_types_type",
7561 FT_NONE, BASE_NONE, NULL, 0x0,
7562 NULL, HFILL }
7564 #endif
7565 /* Blob Range Number */
7566 { &hf_acn_blob_range_number,
7567 { "Blob Range Number", "acn.blob_range_number",
7568 FT_UINT8, BASE_DEC, NULL, 0x0,
7569 NULL, HFILL }
7571 /* Blob Range Type */
7572 { &hf_acn_blob_range_type,
7573 { "Blob Range Type", "acn.blob_range_type",
7574 FT_UINT8, BASE_HEX, VALS(acn_blob_range_type_vals), 0x0,
7575 NULL, HFILL }
7577 #if 0
7578 /* Blob Range Start */
7579 { &hf_acn_blob_range_start,
7580 { "Blob Range Start", "acn.blob_range_start",
7581 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
7582 NULL, HFILL }
7584 #endif
7585 /* Blob Type */
7586 { &hf_acn_blob_type,
7587 { "Blob Type", "acn.blob_type",
7588 FT_UINT8, BASE_DEC, VALS(acn_blob_type_vals), 0x0,
7589 NULL, HFILL }
7591 /* Blob Version */
7592 { &hf_acn_blob_version,
7593 { "Blob Version", "acn.blob_version",
7594 FT_UINT8, BASE_DEC, NULL, 0x0,
7595 NULL, HFILL }
7597 { &hf_acn_blob_time_zone,
7598 { "Time Zone", "acn.blob_time_zone",
7599 FT_INT32, BASE_DEC, NULL, 0x0,
7600 NULL, HFILL }
7602 { &hf_acn_blob_dst_type,
7603 { "DST Type", "acn.blob_dst_type",
7604 FT_UINT8, BASE_DEC, NULL, 0x0,
7605 NULL, HFILL }
7607 { &hf_acn_blob_dst_start_day,
7608 { "DST Start Day", "acn.blob_dst_start_day",
7609 FT_UINT8, BASE_DEC, NULL, 0x0,
7610 NULL, HFILL }
7612 { &hf_acn_blob_dst_stop_day,
7613 { "DST Stop Day", "acn.blob_dst_stop_day",
7614 FT_UINT8, BASE_DEC, NULL, 0x0,
7615 NULL, HFILL }
7617 { &hf_acn_blob_dst_start_locality,
7618 { "DST Start Locality", "acn.blob_dst_start_locality",
7619 FT_UINT8, BASE_DEC, NULL, 0x0,
7620 NULL, HFILL }
7622 { &hf_acn_blob_dst_stop_locality,
7623 { "DST Stop Locality", "acn.blob_dst_stop_locality",
7624 FT_UINT8, BASE_DEC, NULL, 0x0,
7625 NULL, HFILL }
7627 /* Channel Number */
7628 { &hf_acn_channel_number,
7629 { "Channel Number", "acn.channel_number",
7630 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7631 NULL, HFILL }
7633 /* CID */
7634 { &hf_acn_cid,
7635 { "CID", "acn.cid",
7636 FT_GUID, BASE_NONE, NULL, 0x0,
7637 NULL, HFILL }
7639 /* Client Protocol ID */
7640 #if 0
7641 { &hf_acn_client_protocol_id,
7642 { "Client Protocol ID", "acn.client_protocol_id",
7643 FT_UINT32, BASE_DEC, VALS(acn_protocol_id_vals), 0x0,
7644 NULL, HFILL }
7646 #endif
7647 /* DMP data */
7648 { &hf_acn_data,
7649 { "Data", "acn.dmp_data",
7650 FT_BYTES, BASE_NONE, NULL, 0x0,
7651 NULL, HFILL }
7653 { &hf_acn_data8,
7654 { "Addr", "acn.dmp_data8",
7655 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
7656 "Data8", HFILL }
7658 { &hf_acn_data16,
7659 { "Addr", "acn.dmp_data16",
7660 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7661 "Data16", HFILL }
7663 { &hf_acn_data24,
7664 { "Addr", "acn.dmp_data24",
7665 FT_UINT24, BASE_DEC_HEX, NULL, 0x0,
7666 "Data24", HFILL }
7668 { &hf_acn_data32,
7669 { "Addr", "acn.dmp_data32",
7670 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
7671 "Data32", HFILL }
7674 /* DMP Address type*/
7675 #if 0
7676 { &hf_acn_dmp_adt,
7677 { "Address and Data Type", "acn.dmp_adt",
7678 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
7679 NULL, HFILL }
7681 #endif
7682 { &hf_acn_dmp_adt_a,
7683 { "Size", "acn.dmp_adt_a",
7684 FT_UINT8, BASE_DEC, VALS(acn_dmp_adt_a_vals), 0x03,
7685 NULL, HFILL }
7687 { &hf_acn_dmp_adt_d,
7688 { "Data Type", "acn.dmp_adt_d",
7689 FT_UINT8, BASE_DEC, VALS(acn_dmp_adt_d_vals), 0x30,
7690 NULL, HFILL }
7692 { &hf_acn_dmp_adt_r,
7693 { "Relative", "acn.dmp_adt_r",
7694 FT_UINT8, BASE_DEC, VALS(acn_dmp_adt_r_vals), 0x40,
7695 NULL, HFILL }
7697 { &hf_acn_dmp_adt_v,
7698 { "Virtual", "acn.dmp_adt_v",
7699 FT_UINT8, BASE_DEC, VALS(acn_dmp_adt_v_vals), 0x80,
7700 NULL, HFILL }
7702 { &hf_acn_dmp_adt_x,
7703 { "Reserved", "acn.dmp_adt_x",
7704 FT_UINT8, BASE_DEC, NULL, 0x0c,
7705 NULL, HFILL }
7708 /* DMP Reason Code */
7709 { &hf_acn_dmp_reason_code,
7710 { "Reason Code", "acn.dmp_reason_code",
7711 FT_UINT8, BASE_DEC, VALS(acn_dmp_reason_code_vals), 0x0,
7712 NULL, HFILL }
7715 /* DMP Vector */
7716 { &hf_acn_dmp_vector,
7717 { "DMP Vector", "acn.dmp_vector",
7718 FT_UINT8, BASE_DEC, VALS(acn_dmp_vector_vals), 0x0,
7719 NULL, HFILL }
7722 { &hf_acn_dmp_actual_address,
7723 { "Actual Address", "acn.dmp_actual_address",
7724 FT_UINT32, BASE_HEX, NULL, 0x0,
7725 NULL, HFILL }
7728 { &hf_acn_dmp_virtual_address,
7729 { "Virtual Address", "acn.dmp_virtual_address",
7730 FT_UINT32, BASE_HEX, NULL, 0x0,
7731 NULL, HFILL }
7734 { &hf_acn_dmp_actual_address_first,
7735 { "Actual Address First", "acn.dmp_actual_address_first",
7736 FT_UINT32, BASE_HEX, NULL, 0x0,
7737 NULL, HFILL }
7740 { &hf_acn_dmp_virtual_address_first,
7741 { "Virtual Address First", "acn.dmp_virtual_address_first",
7742 FT_UINT32, BASE_HEX, NULL, 0x0,
7743 NULL, HFILL }
7746 /* Expiry */
7747 { &hf_acn_expiry,
7748 { "Expiry", "acn.expiry",
7749 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7750 NULL, HFILL }
7752 /* First Member to ACK */
7753 { &hf_acn_first_member_to_ack,
7754 { "First Member to ACK", "acn.first_member_to_ack",
7755 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7756 NULL, HFILL }
7758 /* First Missed Sequence */
7759 { &hf_acn_first_missed_sequence,
7760 { "First Missed Sequence", "acn.first_missed_sequence",
7761 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
7762 NULL, HFILL }
7764 /* IPV4 */
7765 { &hf_acn_ipv4,
7766 { "IPV4", "acn.ipv4",
7767 FT_IPv4, BASE_NONE, NULL, 0x0,
7768 NULL, HFILL }
7770 /* IPV6 */
7771 { &hf_acn_ipv6,
7772 { "IPV6", "acn.ipv6",
7773 FT_IPv6, BASE_NONE, NULL, 0x0,
7774 NULL, HFILL }
7776 /* Last Member to ACK */
7777 { &hf_acn_last_member_to_ack,
7778 { "Last Member to ACK", "acn.last_member_to_ack",
7779 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7780 NULL, HFILL }
7782 /* Last Missed Sequence */
7783 { &hf_acn_last_missed_sequence,
7784 { "Last Missed Sequence", "acn.last_missed_sequence",
7785 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
7786 NULL, HFILL }
7788 /* MAK threshold */
7789 { &hf_acn_mak_threshold,
7790 { "MAK Threshold", "acn.mak_threshold",
7791 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7792 NULL, HFILL }
7794 /* Member ID */
7795 { &hf_acn_member_id,
7796 { "Member ID", "acn.member_id",
7797 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7798 NULL, HFILL }
7800 /* NAK Holdoff */
7801 { &hf_acn_nak_holdoff,
7802 { "NAK holdoff (ms)", "acn.nak_holdoff",
7803 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7804 NULL, HFILL }
7806 /* NAK Max Wait */
7807 { &hf_acn_nak_max_wait,
7808 { "NAK Max Wait (ms)", "acn.nak_max_wait",
7809 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7810 NULL, HFILL }
7812 /* NAK Modulus */
7813 { &hf_acn_nak_modulus,
7814 { "NAK Modulus", "acn.nak_modulus",
7815 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7816 NULL, HFILL }
7818 /* NAK Outbound Flag */
7819 { &hf_acn_nak_outbound_flag,
7820 { "NAK Outbound Flag", "acn.nak_outbound_flag",
7821 FT_BOOLEAN, 8, NULL, 0x80,
7822 NULL, HFILL }
7824 /* Oldest Available Wrapper */
7825 { &hf_acn_oldest_available_wrapper,
7826 { "Oldest Available Wrapper", "acn.oldest_available_wrapper",
7827 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
7828 NULL, HFILL }
7830 /* Preamble Size */
7831 { &hf_acn_preamble_size,
7832 { "Size of preamble", "acn.preamble_size",
7833 FT_UINT16, BASE_DEC, NULL, 0x0,
7834 "Preamble size in bytes", HFILL }
7836 /* Packet Identifier */
7837 { &hf_acn_packet_identifier,
7838 { "Packet Identifier", "acn.packet_identifier",
7839 FT_STRING, BASE_NONE, NULL, 0x0,
7840 NULL, HFILL }
7842 /* PDU */
7843 { &hf_acn_pdu,
7844 { "PDU", "acn.pdu",
7845 FT_NONE, BASE_NONE, NULL, 0x0,
7846 NULL, HFILL }
7848 /* PDU flags*/
7849 { &hf_acn_pdu_flags,
7850 { "Flags", "acn.pdu.flags",
7851 FT_UINT8, BASE_HEX, NULL, 0x0,
7852 "PDU Flags", HFILL }
7854 { &hf_acn_pdu_flag_d,
7855 { "Data", "acn.pdu.flag_d",
7856 FT_BOOLEAN, 8, NULL, ACN_PDU_FLAG_D,
7857 "Data flag", HFILL }
7859 { &hf_acn_pdu_flag_h,
7860 { "Header", "acn.pdu.flag_h",
7861 FT_BOOLEAN, 8, NULL, ACN_PDU_FLAG_H,
7862 "Header flag", HFILL }
7864 { &hf_acn_pdu_flag_l,
7865 { "Length", "acn.pdu.flag_l",
7866 FT_BOOLEAN, 8, NULL, ACN_PDU_FLAG_L,
7867 "Length flag", HFILL }
7869 { &hf_acn_pdu_flag_v,
7870 { "Vector", "acn.pdu.flag_v",
7871 FT_BOOLEAN, 8, NULL, ACN_PDU_FLAG_V,
7872 "Vector flag", HFILL }
7874 /* PDU Length */
7875 { &hf_acn_pdu_length,
7876 { "Length", "acn.pdu.length",
7877 FT_UINT32, BASE_DEC, NULL, 0x0,
7878 "PDU Length", HFILL }
7880 /* Port */
7881 { &hf_acn_port,
7882 { "Port", "acn.port",
7883 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7884 NULL, HFILL }
7886 /* Postamble Size */
7887 { &hf_acn_postamble_size,
7888 { "Size of postamble", "acn.postamble_size",
7889 FT_UINT16, BASE_DEC, NULL, 0x0,
7890 "Postamble size in bytes", HFILL }
7892 /* Protocol ID */
7893 { &hf_acn_protocol_id,
7894 { "Protocol ID", "acn.protocol_id",
7895 FT_UINT32, BASE_DEC, VALS(acn_protocol_id_vals), 0x0,
7896 NULL, HFILL }
7898 /* Reason Code */
7899 { &hf_acn_reason_code,
7900 { "Reason Code", "acn.reason_code",
7901 FT_UINT8, BASE_DEC, VALS(acn_reason_code_vals), 0x0,
7902 NULL, HFILL }
7904 /* Reciprocal Channel */
7905 { &hf_acn_reciprocal_channel,
7906 { "Reciprocal Channel Number", "acn.reciprocal_channel",
7907 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
7908 NULL, HFILL }
7910 /* Refuse Code */
7911 { &hf_acn_refuse_code,
7912 { "Refuse Code", "acn.refuse_code",
7913 FT_UINT8, BASE_DEC, VALS(acn_refuse_code_vals), 0x0,
7914 NULL, HFILL }
7916 /* Reliable Sequence Number */
7917 { &hf_acn_reliable_sequence_number,
7918 { "Reliable Sequence Number", "acn.reliable_sequence_number",
7919 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
7920 NULL, HFILL }
7922 /* Ad-hoc Expiry */
7923 { &hf_acn_adhoc_expiry,
7924 { "Ad-hoc Expiry", "acn.adhoc_expiry",
7925 FT_UINT8, BASE_DEC, NULL, 0x0,
7926 NULL, HFILL }
7928 /* SDT Vector */
7929 { &hf_acn_sdt_vector,
7930 { "SDT Vector", "acn.sdt_vector",
7931 FT_UINT8, BASE_DEC, VALS(acn_sdt_vector_vals), 0x0,
7932 NULL, HFILL }
7935 /* DMX Vector */
7936 { &hf_acn_dmx_vector,
7937 { "Vector", "acn.dmx_vector",
7938 FT_UINT32, BASE_DEC, VALS(acn_dmx_vector_vals), 0x0,
7939 "DMX Vector", HFILL }
7941 /* DMX Source Name */
7942 { &hf_acn_dmx_source_name,
7943 { "Source", "acn.dmx.source_name",
7944 FT_STRING, BASE_NONE, NULL, 0x0,
7945 "DMX Source Name", HFILL }
7948 /* DMX priority */
7949 { &hf_acn_dmx_priority,
7950 { "Priority", "acn.dmx.priority",
7951 FT_UINT8, BASE_DEC, NULL, 0x0,
7952 "DMX Priority", HFILL }
7955 /* DMX 2 sync universe*/
7956 { &hf_acn_dmx_2_sync_universe,
7957 { "Sync Universe", "acn.dmx.sync",
7958 FT_UINT16, BASE_DEC, NULL, 0x0,
7959 NULL, HFILL }
7962 /* DMX 3 reserved */
7963 { &hf_acn_dmx_3_reserved,
7964 { "Reserved", "acn.dmx.reserved",
7965 FT_UINT16, BASE_DEC, NULL, 0x0,
7966 "DMX Reserved", HFILL }
7969 /* DMX Sequence number */
7970 { &hf_acn_dmx_sequence_number,
7971 { "Seq No", "acn.dmx.seq_number",
7972 FT_UINT8, BASE_DEC, NULL, 0x0,
7973 "DMX Sequence Number", HFILL }
7976 /* DMX 2 options */
7977 { &hf_acn_dmx_2_options,
7978 { "Options", "acn.dmx.options",
7979 FT_UINT8, BASE_DEC, NULL, 0x0,
7980 "DMX Options", HFILL }
7983 { &hf_acn_dmx_2_option_p,
7984 { "Preview Data", "acn.dmx.option_p",
7985 FT_BOOLEAN, 8, NULL, ACN_DMX_OPTION_P,
7986 "Preview Data flag", HFILL }
7989 { &hf_acn_dmx_2_option_s,
7990 { "Stream Terminated", "acn.dmx.option_s",
7991 FT_BOOLEAN, 8, NULL, ACN_DMX_OPTION_S,
7992 "Stream Terminated flag", HFILL }
7995 { &hf_acn_dmx_2_option_f,
7996 { "Force Synchronization", "acn.dmx.option_sync",
7997 FT_BOOLEAN, 8, NULL, ACN_DMX_OPTION_F,
7998 "Force Synchronization flag", HFILL }
8001 /* DMX Universe */
8002 { &hf_acn_dmx_universe,
8003 { "Universe", "acn.dmx.universe",
8004 FT_UINT16, BASE_DEC, NULL, 0x0,
8005 "DMX Universe", HFILL }
8008 /* DMX Start Code */
8009 { &hf_acn_dmx_start_code,
8010 { "Start Code", "acn.dmx.start_code",
8011 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
8012 "DMX Start Code", HFILL }
8015 /* DMX 2 First Property Address */
8016 { &hf_acn_dmx_2_first_property_address,
8017 { "First Property Address", "acn.dmx.first_property_address",
8018 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
8019 "DMX First Property Address", HFILL }
8022 /* DMX Address Increment */
8023 { &hf_acn_dmx_increment,
8024 { "Increment", "acn.dmx.increment",
8025 FT_UINT16, BASE_DEC, NULL, 0x0,
8026 "DMX Increment", HFILL }
8029 /* DMX Packet Count */
8030 { &hf_acn_dmx_count,
8031 { "Count", "acn.dmx.count",
8032 FT_UINT16, BASE_DEC, NULL, 0x0,
8033 "DMX Count", HFILL }
8036 /* DMX 2 Start Code */
8037 { &hf_acn_dmx_2_start_code,
8038 { "Start Code", "acn.dmx.start_code2",
8039 FT_UINT8, BASE_DEC_HEX, NULL, 0x0,
8040 "DMX Start Code", HFILL }
8043 /* DMX Extension Vector */
8044 { &hf_acn_dmx_extension_vector,
8045 { "Vector", "acn.dmx.extension.vector",
8046 FT_UINT32, BASE_DEC, VALS(acn_dmx_extension_vector_vals), 0x0,
8047 NULL, HFILL }
8049 { &hf_acn_dmx_discovery_vector,
8050 { "Vector", "acn.dmx.discovery.vector",
8051 FT_UINT32, BASE_DEC, VALS(acn_dmx_discovery_vector_vals), 0x0,
8052 "DMX Extension Discovery Vector", HFILL }
8054 { &hf_acn_dmx_discovery_universe_list,
8055 { "Universe List", "acn.dmx.discovery.list",
8056 FT_STRING, BASE_NONE, NULL, 0x0,
8057 "DMX Extension Discovery Universe List", HFILL }
8060 /* DMX Discovery Pages */
8061 { &hf_acn_dmx_discovery_page,
8062 { "Page", "acn.dmx.discovery.page",
8063 FT_UINT32, BASE_DEC, NULL, 0x0,
8064 "DMX Extension Discovery Page", HFILL }
8067 { &hf_acn_dmx_discovery_last_page,
8068 { "Last Page", "acn.dmx.discovery.last_page",
8069 FT_UINT32, BASE_DEC, NULL, 0x0,
8070 "DMX Extension Discovery Last Page", HFILL }
8073 { &hf_acn_dmx_discovery_framing_reserved,
8074 { "Reserved", "acn.dmx.discovery.reserved",
8075 FT_UINT32, BASE_DEC, NULL, 0x0,
8076 NULL, HFILL }
8079 { &hf_acn_dmx_sync_universe,
8080 { "Sync Universe", "acn.dmx.sync.universe",
8081 FT_UINT16, BASE_DEC, NULL, 0x0,
8082 NULL, HFILL }
8085 { &hf_acn_dmx_sync_reserved,
8086 { "Reserved", "acn.dmx.sync.reserved",
8087 FT_UINT16, BASE_DEC, NULL, 0x0,
8088 NULL, HFILL }
8092 * If you want the pretty-printed data in the field, for filtering
8093 * purposes, you have to make it an FT_STRING.
8095 * If you want the raw data in the field, for filtering purposes,
8096 * you have to make it an FT_BYTES *AND* use "proto_tree_add_bytes_format()"
8097 * to put the pretty-printed data into the display but not the field.
8099 { &hf_acn_dmx_data,
8100 { "Data", "acn.dmx.data",
8101 FT_STRING, BASE_NONE, NULL, 0x0,
8102 NULL, HFILL }
8105 /* Session Count */
8106 #if 0
8107 { &hf_acn_session_count,
8108 { "Session Count", "acn.session_count",
8109 FT_UINT16, BASE_DEC_HEX, NULL, 0x0,
8110 NULL, HFILL }
8112 #endif
8113 /* Total Sequence Number */
8114 { &hf_acn_total_sequence_number,
8115 { "Total Sequence Number", "acn.total_sequence_number",
8116 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
8117 NULL, HFILL }
8121 static hf_register_info magic_hf[] = {
8122 /* Protocol ID */
8123 { &hf_magic_protocol_id,
8124 { "Protocol ID", "magic.protocol_id",
8125 FT_UINT8, BASE_DEC, NULL, 0x0,
8126 NULL, HFILL }
8129 /* PDU Type */
8130 { &hf_magic_pdu_subtype,
8131 { "PDU type", "magic.type",
8132 FT_UINT8, BASE_DEC, VALS(magic_pdu_subtypes), 0x0,
8133 NULL, HFILL },
8136 /* Major Version */
8137 { &hf_magic_major_version,
8138 { "Major Version", "magic.major_version",
8139 FT_UINT8, BASE_DEC, NULL, 0x0,
8140 NULL, HFILL }
8143 /* Minor Version */
8144 { &hf_magic_minor_version,
8145 { "Minor Version", "magic.minor_version",
8146 FT_UINT8, BASE_DEC, NULL, 0x0,
8147 NULL, HFILL }
8150 /* V1 Command */
8151 { &hf_magic_v1command_vals,
8152 { "Command", "magic.v1_command",
8153 FT_UINT32, BASE_DEC, VALS(magic_v1command_vals), 0x0,
8154 NULL, HFILL }
8157 /* V2 Command */
8158 { &hf_magic_command_vals,
8159 { "Command", "magic.command",
8160 FT_UINT32, BASE_DEC, VALS(magic_command_vals), 0x0,
8161 NULL, HFILL }
8164 /* Beacon Duration */
8165 { &hf_magic_command_beacon_duration,
8166 { "Duration", "magic.beacon_duration",
8167 FT_UINT32, BASE_DEC, NULL, 0x0,
8168 "Beacon Duration", HFILL }
8171 /* TFTP */
8172 { &hf_magic_command_tftp,
8173 { "TFTP IP", "magic.tftp",
8174 FT_IPv4, BASE_NONE, NULL, 0x0,
8175 "IP of TFTP server", HFILL }
8178 /* Reset Lease */
8179 { &hf_magic_command_reset_lease,
8180 { "Reset Lease", "magic.reset_lease",
8181 FT_UINT32, BASE_DEC, VALS(magic_reset_lease_vals), 0x0,
8182 NULL, HFILL }
8185 /* CID */
8186 { &hf_magic_command_cid,
8187 { "CID", "magic.cid",
8188 FT_GUID, BASE_NONE, NULL, 0x0,
8189 NULL, HFILL }
8192 /* Command IP Configuration */
8193 { &hf_magic_command_ip_configuration,
8194 { "IP Configuration", "magic.ip_configuration",
8195 FT_UINT32, BASE_DEC, VALS(magic_ip_configuration_vals), 0x0,
8196 NULL, HFILL }
8199 /* Command IP Address */
8200 { &hf_magic_command_ip_address,
8201 { "IP Address", "magic.ip_address",
8202 FT_IPv4, BASE_NONE, NULL, 0x0,
8203 NULL, HFILL }
8206 /* Command Subnet Mask */
8207 { &hf_magic_command_subnet_mask,
8208 { "Subnet Mask", "magic.subnet_mask",
8209 FT_IPv4, BASE_NONE, NULL, 0x0,
8210 NULL, HFILL }
8213 /* Command Gateway */
8214 { &hf_magic_command_gateway,
8215 { "Gateway", "magic.gateway",
8216 FT_IPv4, BASE_NONE, NULL, 0x0,
8217 NULL, HFILL }
8220 /* Reply IP Address */
8221 { &hf_magic_reply_ip_address,
8222 { "IP", "magic.reply.ip_address",
8223 FT_IPv4, BASE_NONE, NULL, 0x0,
8224 "Local IP Address", HFILL }
8227 /* Reply Subnet Mask */
8228 { &hf_magic_reply_subnet_mask,
8229 { "Subnet Mask", "magic.reply.subnet_mask",
8230 FT_IPv4, BASE_NONE, NULL, 0x0,
8231 "Local Subnet Mask", HFILL }
8234 /* Reply Gateway */
8235 { &hf_magic_reply_gateway,
8236 { "Gateway", "magic.reply.gateway",
8237 FT_IPv4, BASE_NONE, NULL, 0x0,
8238 "Local Gateway", HFILL }
8241 /* Reply TFTP */
8242 { &hf_magic_reply_tftp,
8243 { "TFTP IP", "magic.reply.tftp",
8244 FT_IPv4, BASE_NONE, NULL, 0x0,
8245 "IP of TFTP server", HFILL }
8248 /* Reply Version */
8249 { &hf_magic_reply_version,
8250 { "Reply Version", "magic.reply.version",
8251 FT_STRING, BASE_NONE, NULL, 0x0,
8252 NULL, HFILL }
8255 /* Reply Device Type Name */
8256 { &hf_magic_reply_device_type_name,
8257 { "Device Type Name", "magic.reply.device_type_name",
8258 FT_UINT_STRING, BASE_NONE, NULL, 0x0,
8259 "Reply Device Type Name", HFILL }
8262 /* Reply Default Name */
8263 { &hf_magic_reply_default_name,
8264 { "Default Name", "magic.reply.default_name",
8265 FT_UINT_STRING, BASE_NONE, NULL, 0x0,
8266 "Reply Default Name", HFILL }
8269 /* Reply User Name */
8270 { &hf_magic_reply_user_name,
8271 { "User Name", "magic.reply.user_name",
8272 FT_UINT_STRING, BASE_NONE, NULL, 0x0,
8273 "Reply User Name", HFILL }
8276 /* CID */
8277 { &hf_magic_reply_cid,
8278 { "CID", "magic.reply.cid",
8279 FT_GUID, BASE_NONE, NULL, 0x0,
8280 "Reply CID", HFILL }
8283 /* DCID */
8284 { &hf_magic_reply_dcid,
8285 { "DCID", "magic.reply.dcid",
8286 FT_GUID, BASE_NONE, NULL, 0x0,
8287 "Reply DCID", HFILL }
8290 /* Key Fingerprint */
8291 { &hf_acn_postamble_key_fingerprint,
8292 { "Key Fingerprint", "acn.security.key_fingerprint",
8293 FT_BYTES, BASE_NONE, NULL, 0x0,
8294 "Security Key Fingerprint", HFILL }
8297 /* Sequence type */
8298 { &hf_acn_postamble_seq_type,
8299 { "Sequence Type", "acn.security.seq_type",
8300 FT_UINT8, BASE_DEC, VALS(security_seq_type_vals), 0x0,
8301 "Security Sequence Type", HFILL }
8304 /* Sequence High */
8305 { &hf_acn_postamble_seq_hi,
8306 { "Sequence High", "acn.security.seq_hi",
8307 FT_UINT24, BASE_HEX, NULL, 0x0,
8308 "Security Sequence High", HFILL }
8311 /* Sequence Low */
8312 { &hf_acn_postamble_seq_low,
8313 { "Sequence Low", "acn.security.seq_low",
8314 FT_UINT32, BASE_HEX, NULL, 0x0,
8315 "Security Sequence Low", HFILL }
8318 /* Message Digest */
8319 { &hf_acn_postamble_message_digest,
8320 { "Message Digest", "acn.security.digest",
8321 FT_BYTES, BASE_NONE, NULL, 0x0,
8322 "Security Message Digest", HFILL }
8326 static hf_register_info rdmnet_hf[] = {
8327 /* CID */
8328 { &hf_rdmnet_cid,
8329 { "CID", "rdmnet.cid",
8330 FT_GUID, BASE_NONE, NULL, 0x0,
8331 NULL, HFILL }
8333 /* Packet Identifier */
8334 { &hf_rdmnet_packet_identifier,
8335 { "Packet Identifier", "rdmnet.packet_identifier",
8336 FT_STRING, BASE_NONE, NULL, 0x0,
8337 NULL, HFILL }
8339 /* PDU */
8340 { &hf_rdmnet_pdu,
8341 { "PDU", "rdmnet.pdu",
8342 FT_NONE, BASE_NONE, NULL, 0x0,
8343 NULL, HFILL }
8345 /* PDU flags*/
8346 { &hf_rdmnet_pdu_flags,
8347 { "Flags", "rdmnet.pdu.flags",
8348 FT_UINT8, BASE_HEX, NULL, 0x0,
8349 "PDU Flags", HFILL }
8351 { &hf_rdmnet_pdu_flag_d,
8352 { "Data", "rdmnet.pdu.flag_d",
8353 FT_BOOLEAN, 8, NULL, ACN_PDU_FLAG_D,
8354 "Data flag", HFILL }
8356 { &hf_rdmnet_pdu_flag_h,
8357 { "Header", "rdmnet.pdu.flag_h",
8358 FT_BOOLEAN, 8, NULL, ACN_PDU_FLAG_H,
8359 "Header flag", HFILL }
8361 { &hf_rdmnet_pdu_flag_l,
8362 { "Length", "rdmnet.pdu.flag_l",
8363 FT_BOOLEAN, 8, NULL, ACN_PDU_FLAG_L,
8364 "Length flag", HFILL }
8366 { &hf_rdmnet_pdu_flag_v,
8367 { "Vector", "rdmnet.pdu.flag_v",
8368 FT_BOOLEAN, 8, NULL, ACN_PDU_FLAG_V,
8369 "Vector flag", HFILL }
8371 /* PDU Length */
8372 { &hf_rdmnet_pdu_length,
8373 { "Length", "rdmnet.pdu.length",
8374 FT_UINT32, BASE_DEC, NULL, 0x0,
8375 "PDU Length", HFILL }
8377 /* Postamble Size */
8378 { &hf_rdmnet_postamble_size,
8379 { "Size of postamble", "rdmnet.postamble_size",
8380 FT_UINT16, BASE_DEC, NULL, 0x0,
8381 "Postamble size in bytes", HFILL }
8383 /* Preamble Size */
8384 { &hf_rdmnet_preamble_size,
8385 { "Size of preamble", "rdmnet.preamble_size",
8386 FT_UINT16, BASE_DEC, NULL, 0x0,
8387 "Preamble size in bytes", HFILL }
8389 /* Protocol ID */
8390 { &hf_rdmnet_protocol_id,
8391 { "Protocol ID", "rdmnet.protocol_id",
8392 FT_UINT32, BASE_DEC, VALS(acn_protocol_id_vals), 0x0,
8393 NULL, HFILL }
8395 /* Postamble Size */
8396 { &hf_rdmnet_tcp_length,
8397 { "Data length", "rdmnet.tcp_length",
8398 FT_UINT32, BASE_DEC, NULL, 0x0,
8399 "TCP data size in bytes", HFILL }
8401 /* LLRP Vector */
8402 { &hf_rdmnet_llrp_vector,
8403 { "LLRP Vector", "rdmnet.llrp_vector",
8404 FT_UINT32, BASE_DEC, VALS(rdmnet_llrp_vector_vals), 0x0,
8405 NULL, HFILL }
8407 /* LLRP Destination CID */
8408 { &hf_rdmnet_llrp_destination_cid,
8409 { "CID", "rdmnet.llrp.destination_cid",
8410 FT_GUID, BASE_NONE, NULL, 0x0,
8411 NULL, HFILL }
8413 /* LLRP Transaction Number */
8414 { &hf_rdmnet_llrp_transaction_number,
8415 { "Transaction Number", "rdmnet.llrp.transaction_number",
8416 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
8417 NULL, HFILL }
8419 /* LLRP Probe Request PDU Length */
8420 { &hf_rdmnet_llrp_probe_request_pdu_length,
8421 { "Length", "rdmnet.llrp.probe_request.pdu.length",
8422 FT_UINT24, BASE_DEC, NULL, 0x0,
8423 "PDU Length", HFILL }
8425 /* LLRP Probe Request Vector */
8426 { &hf_rdmnet_llrp_probe_request_vector,
8427 { "LLRP Vector", "rdmnet.llrp.probe_request_vector",
8428 FT_UINT8, BASE_DEC, VALS(rdmnet_llrp_probe_request_vals), 0x0,
8429 NULL, HFILL }
8431 /* LLRP Probe Request Lower UID */
8432 { &hf_rdmnet_llrp_probe_request_lower_uid,
8433 { "Lower UID", "rdmnet.llrp.probe_request.lower_uid",
8434 FT_BYTES, SEP_SPACE, NULL, 0x0,
8435 NULL, HFILL }
8437 /* LLRP Probe Request Upper UID */
8438 { &hf_rdmnet_llrp_probe_request_upper_uid,
8439 { "Upper UID", "rdmnet.llrp.probe_request.upper_uid",
8440 FT_BYTES, SEP_SPACE, NULL, 0x0,
8441 NULL, HFILL }
8443 /* LLRP Probe Request Filter */
8444 { &hf_rdmnet_llrp_probe_request_filter,
8445 { "Filter", "rdmnet.llrp.probe_request.filter",
8446 FT_UINT16, BASE_HEX, NULL, 0x0,
8447 NULL, HFILL }
8449 { &hf_rdmnet_llrp_probe_request_filter_brokers_only,
8450 { "Brokers Only", "rdmnet.llrp.probe_request.filter_brokers_only",
8451 FT_BOOLEAN, 8, NULL, RDMNET_LLRP_VECTOR_PROBE_REQUEST_BROKERS_ONLY,
8452 "Brokers only flag", HFILL }
8454 { &hf_rdmnet_llrp_probe_request_filter_client_tcp_inactive,
8455 { "Client TCP Inactive", "rdmnet.llrp.probe_request.filter_client_tcp_inactive",
8456 FT_BOOLEAN, 8, NULL, RDMNET_LLRP_VECTOR_PROBE_REQUEST_CLIENT_TCP_INACTIVE,
8457 "Client TCP inactive flag", HFILL }
8459 /* LLRP Probe Request Unknown UID */
8460 { &hf_rdmnet_llrp_probe_request_known_uid,
8461 { "Known UID", "rdmnet.llrp.probe_request.known_uid",
8462 FT_BYTES, SEP_SPACE, NULL, 0x0,
8463 NULL, HFILL }
8465 /* LLRP Probe Reply Vector */
8466 { &hf_rdmnet_llrp_probe_reply_vector,
8467 { "LLRP Vector", "rdmnet.llrp.probe_reply_vector",
8468 FT_UINT8, BASE_DEC, VALS(rdmnet_llrp_probe_reply_vals), 0x0,
8469 NULL, HFILL }
8471 /* LLRP Probe Reply UID */
8472 { &hf_rdmnet_llrp_probe_reply_uid,
8473 { "UID", "rdmnet.llrp.probe_reply.uid",
8474 FT_BYTES, SEP_SPACE, NULL, 0x0,
8475 NULL, HFILL }
8477 /* LLRP Probe Reply Hardware Address */
8478 { &hf_rdmnet_llrp_probe_reply_hardware_address,
8479 { "Hardware Address", "rdmnet.llrp.probe_reply.hardware_address",
8480 FT_BYTES, SEP_COLON, NULL, 0x0,
8481 NULL, HFILL }
8483 /* LLRP Probe Reply Component Type */
8484 { &hf_rdmnet_llrp_probe_reply_component_type,
8485 { "Component Type", "rdmnet.llrp.probe_reply.component_type",
8486 FT_UINT8, BASE_DEC, VALS(rdmnet_llrp_probe_reply_component_type_vals), 0x0,
8487 NULL, HFILL }
8489 /* LLRP RDM Command Start Code */
8490 { &hf_rdmnet_llrp_rdm_command_start_code,
8491 { "RDM Command", "rdmnet.llrp.rdm_command.start_code",
8492 FT_UINT8, BASE_DEC, VALS(rdmnet_llrp_rdm_command_start_code_vals), 0x0,
8493 NULL, HFILL }
8495 /* RPT Vector */
8496 { &hf_rdmnet_rpt_vector,
8497 { "RPT Vector", "rdmnet.rpt_vector",
8498 FT_UINT32, BASE_DEC, VALS(rdmnet_rpt_vector_vals), 0x0,
8499 NULL, HFILL }
8501 /* RPT Source UID */
8502 { &hf_rdmnet_rpt_source_uid,
8503 { "Source UID", "rdmnet.rpt.source_uid",
8504 FT_BYTES, SEP_SPACE, NULL, 0x0,
8505 NULL, HFILL }
8507 /* RPT Source Endpoint ID */
8508 { &hf_rdmnet_rpt_source_endpoint_id,
8509 { "Source Endpoint ID", "rdmnet.rpt.source_endpoint_id",
8510 FT_UINT16, BASE_DEC, NULL, 0x0,
8511 NULL, HFILL }
8513 /* RPT Destination UID */
8514 { &hf_rdmnet_rpt_destination_uid,
8515 { "Destination UID", "rdmnet.rpt.destination_uid",
8516 FT_BYTES, SEP_SPACE, NULL, 0x0,
8517 NULL, HFILL }
8519 /* RPT Destination Endpoint ID */
8520 { &hf_rdmnet_rpt_destination_endpoint_id,
8521 { "Destination Endpoint ID", "rdmnet.rpt.destination_endpoint_id",
8522 FT_UINT16, BASE_DEC, NULL, 0x0,
8523 NULL, HFILL }
8525 /* RPT Sequence Number */
8526 { &hf_rdmnet_rpt_sequence_number,
8527 { "Sequence Number", "rdmnet.rpt.sequence_number",
8528 FT_UINT32, BASE_DEC, NULL, 0x0,
8529 NULL, HFILL }
8531 /* RPT Reserved */
8532 { &hf_rdmnet_rpt_reserved,
8533 { "Reserved", "rdmnet.rpt.reserved",
8534 FT_UINT8, BASE_DEC, NULL, 0x0,
8535 NULL, HFILL }
8537 /* RPT Request Vector */
8538 { &hf_rdmnet_rpt_request_vector,
8539 { "RPT Request Vector", "rdmnet.rpt.request_vector",
8540 FT_UINT32, BASE_DEC, VALS(rdmnet_rpt_request_vals), 0x0,
8541 NULL, HFILL }
8543 /* RPT Request RDM Command */
8544 { &hf_rdmnet_rpt_request_rdm_command,
8545 { "RDM Command", "rdmnet.rpt.request.rdm_command",
8546 FT_UINT8, BASE_DEC, VALS(rdmnet_rpt_request_rdm_command_start_code_vals), 0x0,
8547 NULL, HFILL }
8549 /* RPT Status Vector */
8550 { &hf_rdmnet_rpt_status_vector,
8551 { "Status Vector", "rdmnet.rpt.status.vector",
8552 FT_UINT16, BASE_DEC, VALS(rdmnet_rpt_status_vector_vals), 0x0,
8553 NULL, HFILL }
8555 /* RPT Status Unknown RPT UID String */
8556 { &hf_rdmnet_rpt_status_unknown_rpt_uid_string,
8557 { "Status", "rdmnet.rpt.status.unknown_rpt_uid_string",
8558 FT_STRING, BASE_NONE, NULL, 0x0,
8559 NULL, HFILL }
8561 /* RPT Status RDM Timeout String */
8562 { &hf_rdmnet_rpt_status_rdm_timeout_string,
8563 { "Status", "rdmnet.rpt.status.rdm_timeout_string",
8564 FT_STRING, BASE_NONE, NULL, 0x0,
8565 NULL, HFILL }
8567 /* RPT Status Invalid RDM Response String */
8568 { &hf_rdmnet_rpt_status_rdm_invalid_response_string,
8569 { "Status", "rdmnet.rpt.status.invalid_rdm_response_string",
8570 FT_STRING, BASE_NONE, NULL, 0x0,
8571 NULL, HFILL }
8573 /* RPT Status Unknown RDM UID String */
8574 { &hf_rdmnet_rpt_status_unknown_rdm_uid_string,
8575 { "Status", "rdmnet.rpt.status.unknown_rdm_uid_string",
8576 FT_STRING, BASE_NONE, NULL, 0x0,
8577 NULL, HFILL }
8579 /* RPT Status Unknown Endpoint String */
8580 { &hf_rdmnet_rpt_status_unknown_endpoint_string,
8581 { "Status", "rdmnet.rpt.status.unknown_endpoint_string",
8582 FT_STRING, BASE_NONE, NULL, 0x0,
8583 NULL, HFILL }
8585 /* RPT Status Broadcast Complete String */
8586 { &hf_rdmnet_rpt_status_broadcast_complete_string,
8587 { "Status", "rdmnet.rpt.status.broadcast_complete_string",
8588 FT_STRING, BASE_NONE, NULL, 0x0,
8589 NULL, HFILL }
8591 /* RPT Status Unknown Vector String */
8592 { &hf_rdmnet_rpt_status_unknown_vector_string,
8593 { "Status", "rdmnet.rpt.status.unknown_vector_string",
8594 FT_STRING, BASE_NONE, NULL, 0x0,
8595 NULL, HFILL }
8597 /* RPT Notification Vector */
8598 { &hf_rdmnet_rpt_notification_vector,
8599 { "RPT Notification Vector", "rdmnet.rpt.notification_vector",
8600 FT_UINT32, BASE_DEC, VALS(rdmnet_rpt_notification_vals), 0x0,
8601 NULL, HFILL }
8603 /* RPT Notification RDM Command */
8604 { &hf_rdmnet_rpt_notification_rdm_command,
8605 { "RDM Command", "rdmnet.rpt.notification.rdm_command",
8606 FT_UINT8, BASE_DEC, VALS(rdmnet_rpt_request_rdm_command_start_code_vals), 0x0,
8607 NULL, HFILL }
8609 /* Broker Vector */
8610 { &hf_rdmnet_broker_vector,
8611 { "Broker Vector", "rdmnet.broker_vector",
8612 FT_UINT16, BASE_DEC, VALS(rdmnet_broker_vector_vals), 0x0,
8613 NULL, HFILL }
8615 /* Broker Client Protocol Vector */
8616 { &hf_rdmnet_broker_client_protocol_vector,
8617 { "Client Protocol", "rdmnet.broker_client_protocol_vector",
8618 FT_UINT32, BASE_DEC, VALS(broker_client_protocol_vals), 0x0,
8619 NULL, HFILL }
8621 /* Broker Client Protocol CID */
8622 { &hf_rdmnet_broker_client_protocol_cid,
8623 { "Client CID", "rdmnet.broker_client_cid",
8624 FT_BYTES, SEP_SPACE, NULL, 0x0,
8625 NULL, HFILL }
8627 /* Broker Client RPT Client UID */
8628 { &hf_rdmnet_broker_client_rpt_client_uid,
8629 { "Client UID", "rdmnet.broker_client_rpt_client_uid",
8630 FT_BYTES, SEP_SPACE, NULL, 0x0,
8631 NULL, HFILL }
8633 /* Broker Client RPT Client Type */
8634 { &hf_rdmnet_broker_client_rpt_client_type,
8635 { "RPT client type", "rdmnet.broker_client_rpt_client_type",
8636 FT_UINT8, BASE_DEC, VALS(broker_client_rpt_client_type_vals), 0x0,
8637 NULL, HFILL }
8639 /* Broker Client RPT Binding CID */
8640 { &hf_rdmnet_broker_client_rpt_binding_cid,
8641 { "Binding CID", "rdmnet.broker_client_rpt_binding_cid",
8642 FT_BYTES, SEP_SPACE, NULL, 0x0,
8643 NULL, HFILL }
8645 /* Broker Client EPT Protocol Vector */
8646 { &hf_rdmnet_broker_client_ept_protocol_vector,
8647 { "Protocol Vector", "rdmnet.broker_client_ept_vector",
8648 FT_BYTES, SEP_SPACE, NULL, 0x0,
8649 NULL, HFILL }
8651 /* Broker Client EPT Manufacturer ID */
8652 { &hf_rdmnet_broker_client_ept_protocol_manufacturer_id,
8653 { "Manufacturer ID", "rdmnet.broker_client_ept_manufacturer_id",
8654 FT_UINT16, BASE_HEX, NULL, 0x0,
8655 NULL, HFILL }
8657 /* Broker Client EPT Protocol ID */
8658 { &hf_rdmnet_broker_client_ept_protocol_protocol_id,
8659 { "Protocol ID", "rdmnet.broker_client_ept_protocol_id",
8660 FT_UINT16, BASE_HEX, NULL, 0x0,
8661 NULL, HFILL }
8663 /* Broker Client EPT Protocol String */
8664 { &hf_rdmnet_broker_client_ept_protocol_string,
8665 { "Protocol String", "rdmnet.broker_client_ept_protocol_string",
8666 FT_STRING, BASE_NONE, NULL, 0x0,
8667 NULL, HFILL }
8669 /* Broker Connect Scope */
8670 { &hf_rdmnet_broker_connect_client_scope,
8671 { "Client Scope", "rdmnet.broker.connect.client_scope",
8672 FT_STRING, BASE_NONE, NULL, 0x0,
8673 NULL, HFILL }
8675 /* Broker Connect E1.33 Version */
8676 { &hf_rdmnet_broker_connect_e133_version,
8677 { "E1.33 Version", "rdmnet.broker.connect.e133_version",
8678 FT_UINT16, BASE_DEC, NULL, 0x0,
8679 NULL, HFILL }
8681 /* Broker Connect Search Domain */
8682 { &hf_rdmnet_broker_connect_search_domain,
8683 { "Search Domain", "rdmnet.broker.connect.search_domain",
8684 FT_STRING, BASE_NONE, NULL, 0x0,
8685 NULL, HFILL }
8687 /* Broker Connect Connection Flags */
8688 { &hf_rdmnet_broker_connect_connection_flags,
8689 { "Flags", "rdmnet.broker.connect.flags",
8690 FT_UINT8, BASE_HEX, NULL, 0x0,
8691 "Connection Flags", HFILL }
8693 { &hf_rdmnet_broker_connect_connection_flags_incremental_updates,
8694 { "Incremental Updates", "rdmnet.broker.connect.flags_incremental_updates",
8695 FT_BOOLEAN, 8, NULL, RDMNET_BROKER_VECTOR_CONNECT_INCREMENTAL_UPDATES,
8696 "Incremental updates flag", HFILL }
8698 /* Broker Connect Reply Connection Code */
8699 { &hf_rdmnet_broker_connect_reply_connection_code,
8700 { "Connection Code", "rdmnet.broker.connect_reply.connection_code",
8701 FT_UINT16, BASE_DEC, VALS(rdmnet_broker_status_code_vals), 0x0,
8702 NULL, HFILL }
8704 /* Broker Connect Reply E1.33 Version */
8705 { &hf_rdmnet_broker_connect_reply_e133_version,
8706 { "E1.33 Version", "rdmnet.broker.connect_reply.e133_version",
8707 FT_UINT16, BASE_DEC, NULL, 0x0,
8708 NULL, HFILL }
8710 /* Broker Connect Reply Broker UID */
8711 { &hf_rdmnet_broker_connect_reply_broker_uid,
8712 { "Broker UID", "rdmnet.broker.connect_reply.broker_uid",
8713 FT_BYTES, SEP_SPACE, NULL, 0x0,
8714 NULL, HFILL }
8716 /* Broker Connect Reply Client UID */
8717 { &hf_rdmnet_broker_connect_reply_client_uid,
8718 { "Client UID", "rdmnet.broker.connect_reply.client_uid",
8719 FT_BYTES, SEP_SPACE, NULL, 0x0,
8720 NULL, HFILL }
8722 /* Broker Client Entry Update Connection Flags */
8723 { &hf_rdmnet_broker_client_entry_update_connection_flags,
8724 { "Flags", "rdmnet.broker.client_entry_update.flags",
8725 FT_UINT8, BASE_HEX, NULL, 0x0,
8726 "Connection Flags", HFILL }
8728 { &hf_rdmnet_broker_client_entry_update_connection_flags_incremental_updates,
8729 { "Incremental Updates", "rdmnet.broker.client_entry_update.flags_incremental_updates",
8730 FT_BOOLEAN, 8, NULL, RDMNET_BROKER_VECTOR_CONNECT_INCREMENTAL_UPDATES,
8731 "Incremental updates flag", HFILL }
8733 /* Broker Redirect IPv4 Address */
8734 { &hf_rdmnet_broker_redirect_ipv4_address,
8735 { "IPv4 Address", "rdmnet.broker.redirect_ipv4.ipv4_address",
8736 FT_IPv4, BASE_NONE, NULL, 0x0,
8737 "Redirect IPv4 address", HFILL }
8739 /* Broker Redirect IPv4 TCP Port */
8740 { &hf_rdmnet_broker_redirect_ipv4_tcp_port,
8741 { "IPv4 TCP Port", "rdmnet.broker.redirect_ipv4.tcp_port",
8742 FT_UINT16, BASE_DEC, NULL, 0x0,
8743 "Redirect IPv4 TCP port", HFILL }
8745 /* Broker Redirect IPv6 Address. TODO: is filter correct here? */
8746 { &hf_rdmnet_broker_redirect_ipv6_address,
8747 { "IPv6 Address", "rdmnet.broker.redirect_ipv6.ipv4_address",
8748 FT_IPv6, BASE_NONE, NULL, 0x0,
8749 "Redirect IPv6 address", HFILL }
8751 /* Broker Redirect IPv6 TCP Port */
8752 { &hf_rdmnet_broker_redirect_ipv6_tcp_port,
8753 { "TCP Port", "rdmnet.broker.redirect_ipv6.tcp_port",
8754 FT_UINT16, BASE_DEC, NULL, 0x0,
8755 "Redirect IPv6 TCP port", HFILL }
8757 /* Broker Disconnect Reason */
8758 { &hf_rdmnet_broker_disconnect_reason,
8759 { "Reason", "rdmnet.broker.disconnect.reason",
8760 FT_UINT16, BASE_DEC, VALS(rdmnet_broker_disconnect_reason_vals), 0x0,
8761 "Disconnect reason", HFILL }
8763 /* Broker Dynamic UID Request */
8764 { &hf_rdmnet_broker_dynamic_uid_request,
8765 { "Dynamic UID Request", "rdmnet.broker.request_dynamic_uids.dynamic_uid_request",
8766 FT_BYTES, SEP_DOT, NULL, 0x0,
8767 NULL, HFILL }
8769 /* Broker RID */
8770 { &hf_rdmnet_broker_rid,
8771 { "RID", "rdmnet.broker.request_dynamic_uids.rid",
8772 FT_BYTES, SEP_DOT, NULL, 0x0,
8773 NULL, HFILL }
8775 /* Broker Assigned Dynamic UID */
8776 { &hf_rdmnet_broker_assigned_dynamic_uid,
8777 { "Dynamic UID Request", "rdmnet.broker.assigned_dynamic_uids.dynamic_uid",
8778 FT_BYTES, SEP_DOT, NULL, 0x0,
8779 NULL, HFILL }
8781 /* Broker Assigned RID */
8782 { &hf_rdmnet_broker_assigned_rid,
8783 { "RID", "rdmnet.broker.assigned_dynamic_uids.rid",
8784 FT_BYTES, SEP_DOT, NULL, 0x0,
8785 NULL, HFILL }
8787 /* Broker_Assigned Status Code */
8788 { &hf_rdmnet_broker_assigned_status_code,
8789 { "Status Code", "rdmnet.broker.assigned_dynamic_uids.status_code",
8790 FT_UINT16, BASE_DEC, VALS(dynamic_uid_mapping_status_code_vals), 0x0,
8791 NULL, HFILL }
8793 /* Broker Fetch Dynamic UID */
8794 { &hf_rdmnet_broker_fetch_dynamic_uid,
8795 { "Dynamic UID", "rdmnet.broker.fetch_dynamic_uids.dynamic_uid",
8796 FT_BYTES, SEP_DOT, NULL, 0x0,
8797 NULL, HFILL }
8799 /* EPT Vector */
8800 { &hf_rdmnet_ept_vector,
8801 { "EPT Vector", "rdmnet.ept_vector",
8802 FT_UINT32, BASE_DEC, VALS(rdmnet_ept_vector_vals), 0x0,
8803 NULL, HFILL }
8805 /* EPT Destination CID */
8806 { &hf_rdmnet_ept_destination_cid,
8807 { "Destination CID", "rdmnet.ept.destination_cid",
8808 FT_BYTES, SEP_SPACE, NULL, 0x0,
8809 NULL, HFILL }
8811 /* EPT Data PDU Length */
8812 { &hf_rdmnet_ept_data_pdu_length,
8813 { "Length", "rdmnet.ept.data.pdu.length",
8814 FT_UINT24, BASE_DEC, NULL, 0x0,
8815 "PDU Length", HFILL }
8817 /* EPT Data Vector */
8818 { &hf_rdmnet_ept_data_vector,
8819 { "Vector", "rdmnet.ept.data.vector",
8820 FT_UINT32, BASE_HEX, NULL, 0x0,
8821 "Data vector", HFILL }
8823 /* EPT Data Vector Manufacturer ID */
8824 { &hf_rdmnet_ept_data_vector_manufacturer_id,
8825 { "Manufac. ID", "rdmnet.ept.data.vector.manufacturer_id",
8826 FT_UINT16, BASE_HEX, NULL, 0x0,
8827 "Manufacturer id", HFILL }
8829 /* EPT Data Vector Protocol ID */
8830 { &hf_rdmnet_ept_data_vector_protocol_id,
8831 { "Protocol", "rdmnet.ept.data.vector.protocol_id",
8832 FT_UINT16, BASE_HEX, NULL, 0x0,
8833 "Protocol id", HFILL }
8835 /* EPT Data Opaque Data */
8836 { &hf_rdmnet_ept_data_opaque_data,
8837 { "Data", "rdmnet.ept.data.opaque_data",
8838 FT_BYTES, SEP_SPACE, NULL, 0x0,
8839 NULL, HFILL }
8841 /* EPT Status PDU Length */
8842 { &hf_rdmnet_ept_status_pdu_length,
8843 { "Length", "rdmnet.ept.status.pdu.length",
8844 FT_UINT24, BASE_DEC, NULL, 0x0,
8845 "PDU Length", HFILL }
8847 /* EPT Status Unknown CID */
8848 { &hf_rdmnet_ept_status_unknown_cid,
8849 { "Unknown CID", "rdmnet.ept.status.unknown_cid",
8850 FT_BYTES, SEP_SPACE, NULL, 0x0,
8851 NULL, HFILL }
8853 /* EPT Status Status String */
8854 { &hf_rdmnet_ept_status_status_string,
8855 { "Status String", "rdmnet.ept.status.status_string",
8856 FT_STRING, BASE_NONE, NULL, 0x0,
8857 NULL, HFILL }
8859 /* EPT Status Vector */
8860 { &hf_rdmnet_ept_status_vector,
8861 { "Unknown Vector", "rdmnet.ept.status.vector",
8862 FT_BYTES, SEP_SPACE, NULL, 0x0,
8863 NULL, HFILL }
8865 /* EPT Status Unknown Vector */
8866 { &hf_rdmnet_ept_status_unknown_vector,
8867 { "Unknown Vector", "rdmnet.ept.status.unknown_vector",
8868 FT_BYTES, SEP_SPACE, NULL, 0x0,
8869 NULL, HFILL }
8871 /* EPT Status Vector String */
8872 { &hf_rdmnet_ept_status_vector_string,
8873 { "Vector String", "rdmnet.ept.status.vector_string",
8874 FT_STRING, BASE_NONE, NULL, 0x0,
8875 NULL, HFILL }
8879 /* Setup protocol subtree array */
8880 static int *ett[] = {
8881 &ett_acn,
8882 &ett_acn_channel_owner_info_block,
8883 &ett_acn_channel_member_info_block,
8884 &ett_acn_channel_parameter,
8885 &ett_acn_address,
8886 &ett_acn_address_type,
8887 &ett_acn_pdu_flags,
8888 &ett_acn_dmp_pdu,
8889 &ett_acn_sdt_pdu,
8890 &ett_acn_sdt_client_pdu,
8891 &ett_acn_sdt_base_pdu,
8892 &ett_acn_root_pdu,
8893 &ett_acn_dmx_address,
8894 &ett_acn_dmx_2_options,
8895 &ett_acn_dmx_data_pdu,
8896 &ett_acn_dmx_pdu,
8897 &ett_acn_blob
8900 /* Setup protocol subtree array */
8901 static int *magic_ett[] = {
8902 &ett_magic
8905 /* Setup protocol subtree array */
8906 static int *rdmnet_ett[] = {
8907 &ett_rdmnet,
8908 &ett_rdmnet_pdu_flags,
8909 &ett_rdmnet_llrp_base_pdu,
8910 &ett_rdmnet_llrp_probe_request_pdu,
8911 &ett_rdmnet_llrp_probe_request_filter_flags,
8912 &ett_rdmnet_llrp_probe_reply_pdu,
8913 &ett_rdmnet_llrp_rdm_command_pdu,
8914 &ett_rdmnet_rpt_base_pdu,
8915 &ett_rdmnet_rpt_request_pdu,
8916 &ett_rdmnet_rpt_status_pdu,
8917 &ett_rdmnet_rpt_notification_pdu,
8918 &ett_rdmnet_broker_base_pdu,
8919 &ett_rdmnet_broker_client_entry_pdu,
8920 &ett_rdmnet_broker_client_entry_manufacturer_protocol_ids,
8921 &ett_rdmnet_broker_connect_connection_flags,
8922 &ett_rdmnet_broker_client_entry_update_connection_flags,
8923 &ett_rdmnet_ept_base_pdu,
8924 &ett_rdmnet_ept_data_pdu,
8925 &ett_rdmnet_ept_data_vector_pdu,
8926 &ett_rdmnet_ept_status_pdu
8929 static ei_register_info ei[] = {
8930 { &ei_magic_reply_invalid_type, { "magic.reply.invalid_type", PI_PROTOCOL, PI_WARN, "Invalid type", EXPFILL }},
8931 { &ei_acn_dmx_discovery_outofseq, { "acn.dmx.discovery.out_of_order_universes", PI_PROTOCOL, PI_WARN, "Universe list is unordered, E1.31 Sec. 8.5 requires sorted lists", EXPFILL }},
8934 module_t *acn_module;
8935 expert_module_t* expert_acn;
8937 proto_acn = proto_register_protocol("Architecture for Control Networks", "ACN", "acn");
8939 proto_magic = proto_register_protocol("Magic Bullet", "MAGIC", "magic");
8941 proto_rdmnet = proto_register_protocol("RDMnet", "RDMnet", "rdmnet");
8943 proto_register_field_array(proto_acn, hf, array_length(hf));
8944 proto_register_subtree_array(ett, array_length(ett));
8946 acn_module = prefs_register_protocol(proto_acn, NULL);
8947 prefs_register_obsolete_preference(acn_module, "heuristic_acn");
8949 prefs_register_bool_preference(acn_module, "dmx_enable",
8950 "Streaming DMX",
8951 "Enable Streaming DMX extension dissector (ANSI BSR E1.31)",
8952 &global_acn_dmx_enable);
8954 prefs_register_enum_preference(acn_module, "dmx_display_view",
8955 "DMX, display format",
8956 "Display format",
8957 &global_acn_dmx_display_view,
8958 dmx_display_view,
8959 true);
8961 prefs_register_bool_preference(acn_module, "dmx_display_zeros",
8962 "DMX, display zeros",
8963 "Display zeros instead of dots",
8964 &global_acn_dmx_display_zeros);
8966 prefs_register_bool_preference(acn_module, "dmx_display_leading_zeros",
8967 "DMX, display leading zeros",
8968 "Display leading zeros on levels",
8969 &global_acn_dmx_display_leading_zeros);
8971 prefs_register_enum_preference(acn_module, "dmx_display_line_format",
8972 "DMX, display line format",
8973 "Display line format",
8974 &global_acn_dmx_display_line_format,
8975 dmx_display_line_format,
8976 true);
8978 proto_register_field_array(proto_magic, magic_hf, array_length(magic_hf));
8979 proto_register_subtree_array(magic_ett, array_length(magic_ett));
8980 expert_acn = expert_register_protocol(proto_magic);
8981 expert_register_field_array(expert_acn, ei, array_length(ei));
8983 proto_register_field_array(proto_rdmnet, rdmnet_hf, array_length(rdmnet_hf));
8984 proto_register_subtree_array(rdmnet_ett, array_length(rdmnet_ett));
8986 acn_handle = register_dissector("acn", dissect_acn, proto_acn);
8990 /******************************************************************************/
8991 /* Register handoff */
8992 void
8993 proto_reg_handoff_acn(void)
8995 dissector_add_for_decode_as_with_preference("udp.port", acn_handle);
8997 rdm_handle = find_dissector_add_dependency("rdm", proto_acn);
8999 heur_dissector_add("udp", dissect_acn_heur, "ACN over UDP", "acn", proto_acn, HEURISTIC_DISABLE);
9000 heur_dissector_add("udp", dissect_rdmnet_over_udp_heur, "RDMnet over UDP (LLRP)", "rdmnet_udp", proto_acn, HEURISTIC_DISABLE);
9001 heur_dissector_add("tcp", dissect_rdmnet_over_tcp_heur, "RDMnet over TCP (Broker, RPT, EPT)", "rdmnet_tcp", proto_acn, HEURISTIC_DISABLE);
9005 * Editor modelines
9007 * Local Variables:
9008 * c-basic-offset: 2
9009 * tab-width: 8
9010 * indent-tabs-mode: nil
9011 * End:
9013 * ex: set shiftwidth=2 tabstop=8 expandtab:
9014 * :indentSize=2:tabSize=8:noTabs=true: