2 * Routines for AIA GigE Vision (TM) Control Protocol dissection
3 * Copyright 2012, AIA <www.visiononline.org> All rights reserved
5 * GigE Vision (TM): GigE Vision a standard developed under the sponsorship of the AIA for
6 * the benefit of the machine vision industry. GVCP stands for GigE Vision (TM) Control
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
18 #include <epan/packet.h>
19 #include <epan/conversation.h>
21 #define GVCP_MIN_PACKET_SIZE ( 8 )
22 #define GVCP_MAX_STREAM_CHANNEL_COUNT ( 512 )
25 header fields to show the relations between
26 request and response as well as the response time
28 static int hf_gvcp_response_in = -1;
29 static int hf_gvcp_response_to = -1;
32 structure to hold info to remember between the requests and responses
34 typedef struct _gvcp_transaction_t {
37 wmem_array_t *addr_list;
41 wmem_array_t* gvcp_trans_array;
44 structure to hold persistent info for each conversation
46 typedef struct _gvcp_conv_info_t {
48 guint32 extended_bootstrap_address[GVCP_MAX_STREAM_CHANNEL_COUNT];
52 Bootstrap registers addresses
55 #define GVCP_VERSION (0x00000000)
56 #define GVCP_DEVICE_MODE (0x00000004)
57 #define GVCP_DEVICE_MAC_HIGH_0 (0x00000008)
58 #define GVCP_DEVICE_MAC_LOW_0 (0x0000000C)
59 #define GVCP_SUPPORTED_IP_CONFIGURATION_0 (0x00000010)
60 #define GVCP_CURIPCFG_0 (0x00000014)
61 #define GVCP_CURRENT_IP_ADDRESS_0 (0x00000024)
62 #define GVCP_CURRENT_SUBNET_MASK_0 (0x00000034)
63 #define GVCP_CURRENT_DEFAULT_GATEWAY_0 (0x00000044)
64 #define GVCP_MANUFACTURER_NAME (0x00000048)
65 #define GVCP_MODEL_NAME (0x00000068)
66 #define GVCP_DEVICE_VERSION (0x00000088)
67 #define GVCP_MANUFACTURER_INFO (0x000000A8)
68 #define GVCP_SERIAL_NUMBER (0x000000d8)
69 #define GVCP_USER_DEFINED_NAME (0x000000E8)
70 #define GVCP_FIRST_URL (0x00000200)
71 #define GVCP_SECOND_URL (0x00000400)
72 #define GVCP_NUMBER_OF_NETWORK_INTERFACES (0x00000600)
73 #define GVCP_PERSISTENT_IP_ADDRESS_0 (0x0000064C)
74 #define GVCP_PERSISTENT_SUBNET_MASK_0 (0x0000065C)
75 #define GVCP_PERSISTENT_DEFAULT_GATEWAY_0 (0x0000066C)
76 #define GVCP_LINK_SPEED_0 (0x00000670)
77 #define GVCP_DEVICE_MAC_HIGH_1 (0x00000680)
78 #define GVCP_DEVICE_MAC_LOW_1 (0x00000684)
79 #define GVCP_SUPPORTED_IP_CONFIGURATION_1 (0x00000688)
80 #define GVCP_CURIPCFG_1 (0x0000068C)
81 #define GVCP_CURRENT_IP_ADDRESS_1 (0x0000069C)
82 #define GVCP_CURRENT_SUBNET_MASK_1 (0x000006AC)
83 #define GVCP_CURRENT_DEFAULT_GATEWAY_1 (0x000006BC)
84 #define GVCP_PERSISTENT_IP_ADDRESS_1 (0x000006CC)
85 #define GVCP_PERSISTENT_SUBNET_MASK_1 (0x000006DC)
86 #define GVCP_PERSISTENT_DEFAULT_GATEWAY_1 (0x000006EC)
87 #define GVCP_LINK_SPEED_1 (0x000006F0)
88 #define GVCP_DEVICE_MAC_HIGH_2 (0x00000700)
89 #define GVCP_DEVICE_MAC_LOW_2 (0x00000704)
90 #define GVCP_SUPPORTED_IP_CONFIGURATION_2 (0x00000708)
91 #define GVCP_CURIPCFG_2 (0x0000070C)
92 #define GVCP_CURRENT_IP_ADDRESS_2 (0x0000071C)
93 #define GVCP_CURRENT_SUBNET_MASK_2 (0x0000072C)
94 #define GVCP_CURRENT_DEFAULT_GATEWAY_2 (0x0000073C)
95 #define GVCP_PERSISTENT_IP_ADDRESS_2 (0x0000074C)
96 #define GVCP_PERSISTENT_SUBNET_MASK_2 (0x0000075C)
97 #define GVCP_PERSISTENT_DEFAULT_GATEWAY_2 (0x0000076C)
98 #define GVCP_LINK_SPEED_2 (0x00000770)
99 #define GVCP_DEVICE_MAC_HIGH_3 (0x00000780)
100 #define GVCP_DEVICE_MAC_LOW_3 (0x00000784)
101 #define GVCP_SUPPORTED_IP_CONFIGURATION_3 (0x00000788)
102 #define GVCP_CURIPCFG_3 (0x0000078C)
103 #define GVCP_CURRENT_IP_ADDRESS_3 (0x0000079C)
104 #define GVCP_CURRENT_SUBNET_MASK_3 (0x000007AC)
105 #define GVCP_CURRENT_DEFAULT_GATEWAY_3 (0x000007BC)
106 #define GVCP_PERSISTENT_IP_ADDRESS_3 (0x000007CC)
107 #define GVCP_PERSISTENT_SUBNET_MASK_3 (0x000007DC)
108 #define GVCP_PERSISTENT_DEFAULT_GATEWAY_3 (0x000007EC)
109 #define GVCP_LINK_SPEED_3 (0x000007F0)
110 #define GVCP_NUMBER_OF_MESSAGE_CHANNELS (0x00000900)
111 #define GVCP_NUMBER_OF_STREAM_CHANNELS (0x00000904)
112 #define GVCP_NUMBER_OF_ACTION_SIGNALS (0x00000908)
113 #define GVCP_ACTION_DEVICE_KEY (0x0000090C)
114 #define GVCP_NUMBER_OF_ACTIVE_LINKS (0x00000910)
115 #define GVCP_SC_CAPS (0x0000092C)
116 #define GVCP_MESSAGE_CHANNEL_CAPS (0x00000930)
117 #define GVCP_CAPABILITY (0x00000934)
118 #define GVCP_HEARTBEAT_TIMEOUT (0x00000938)
119 #define GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH (0x0000093C)
120 #define GVCP_TIMESTAMP_TICK_FREQUENCY_LOW (0x00000940)
121 #define GVCP_TIMESTAMP_CONTROL (0x00000944)
122 #define GVCP_TIMESTAMP_VALUE_HIGH (0x00000948)
123 #define GVCP_TIMESTAMP_VALUE_LOW (0x0000094C)
124 #define GVCP_DISCOVERY_ACK_DELAY (0x00000950)
125 #define GVCP_CONFIGURATION (0x00000954)
126 #define GVCP_PENDING_TIMEOUT (0x00000958)
127 #define GVCP_CONTROL_SWITCHOVER_KEY (0x0000095C)
128 #define GVCP_GVSCP_CONFIGURATION (0x00000960)
129 #define GVCP_PHYSICAL_LINK_CAPABILITY (0x00000964)
130 #define GVCP_PHYSICAL_LINK_CONFIGURATION (0x00000968)
131 #define GVCP_IEEE_1588_STATUS (0x0000096C)
132 #define GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE (0x00000970)
133 #define GVCP_IEEE_1588_EXTENDED_CAPABILITY (0x00000974)
134 #define GVCP_IEEE_1588_SUPPORTED_PROFILES (0x00000978)
135 #define GVCP_IEEE_1588_SELECTED_PROFILE (0x0000097C)
136 #define GVCP_CCP (0x00000A00)
137 #define GVCP_PRIMARY_APPLICATION_PORT (0x00000A04)
138 #define GVCP_PRIMARY_APPLICATION_IP_ADDRESS (0x00000A14)
139 #define GVCP_MC_DESTINATION_PORT (0x00000B00)
140 #define GVCP_MC_DESTINATION_ADDRESS (0x00000B10)
141 #define GVCP_MC_TIMEOUT (0x00000B14)
142 #define GVCP_MC_RETRY_COUNT (0x00000B18)
143 #define GVCP_MC_SOURCE_PORT (0x00000B1C)
144 #define GVCP_MC_CONFIGURATION (0x00000B20) /* GEV 2.2 */
145 #define GVCP_MANIFEST_TABLE (0x00009000)
147 #define GVCP_SC_DESTINATION_PORT(I) (0x0d00+(0x40*I))
148 #define GVCP_SC_PACKET_SIZE(I) (0x0d04+(0x40*I))
149 #define GVCP_SC_PACKET_DELAY(I) (0x0d08+(0x40*I))
150 #define GVCP_SC_DESTINATION_ADDRESS(I) (0x0d18+(0x40*I))
151 #define GVCP_SC_SOURCE_PORT(I) (0x0d1C+(0x40*I))
152 #define GVCP_SC_CAPABILITY(I) (0x0d20+(0x40*I))
153 #define GVCP_SC_CONFIGURATION(I) (0x0d24+(0x40*I))
154 #define GVCP_SC_ZONE(I) (0x0d28+(0x40*I))
155 #define GVCP_SC_ZONE_DIRECTION(I) (0x0d2C+(0x40*I))
156 #define GVCP_SC_MAX_PACKET_COUNT(I) (0x0d30+(0x40*I)) /* GEV 2.2 */
157 #define GVCP_SC_MAX_BLOCK_SIZE_HIGH(I) (0x0d34+(0x40*I)) /* GEV 2.2 */
158 #define GVCP_SC_MAX_BLOCK_SIZE_LOW(I) (0x0d38+(0x40*I)) /* GEV 2.2 */
159 #define GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(I) (0x0d3C+(0x40*I)) /* GEV 2.2 */
161 /* Real address: GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(I) + the values defined here */
162 #define GVCP_SC_GENDC_DESCRIPTOR_ADDRESS ( 0x0000 ) /* GEV 2.2 */
163 #define GVCP_SC_GENDC_DESCRIPTOR_SIZE ( 0x0004 ) /* GEV 2.2 */
164 #define GVCP_SC_GENDC_FLOW_MAPPING_TABLE_ADDRESS ( 0x0008 ) /* GEV 2.2 */
165 #define GVCP_SC_GENDC_FLOW_MAPPING_TABLE_SIZE ( 0x000C ) /* GEV 2.2 */
166 #define GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS_LAST ( 0x000C )
168 #define GVCP_ACTION_GROUP_KEY(I) (0x9800+(0x10*I))
169 #define GVCP_ACTION_GROUP_MASK(I) (0x9804+(0x10*I))
173 Command and acknowledge IDs
176 #define GVCP_DISCOVERY_CMD (0x0002)
177 #define GVCP_DISCOVERY_ACK (0x0003)
178 #define GVCP_FORCEIP_CMD (0x0004)
179 #define GVCP_FORCEIP_ACK (0x0005)
180 #define GVCP_PACKETRESEND_CMD (0x0040)
181 #define GVCP_PACKETRESEND_ACK (0x0041)
182 #define GVCP_READREG_CMD (0x0080)
183 #define GVCP_READREG_ACK (0x0081)
184 #define GVCP_WRITEREG_CMD (0x0082)
185 #define GVCP_WRITEREG_ACK (0x0083)
186 #define GVCP_READMEM_CMD (0x0084)
187 #define GVCP_READMEM_ACK (0x0085)
188 #define GVCP_WRITEMEM_CMD (0x0086)
189 #define GVCP_WRITEMEM_ACK (0x0087)
190 #define GVCP_PENDING_ACK (0x0089)
191 #define GVCP_EVENT_CMD (0x00C0)
192 #define GVCP_EVENT_ACK (0x00C1)
193 #define GVCP_EVENTDATA_CMD (0x00C2)
194 #define GVCP_EVENTDATA_ACK (0x00C3)
195 #define GVCP_ACTION_CMD (0x0100)
196 #define GVCP_ACTION_ACK (0x0101)
203 #define GEV_STATUS_SUCCESS (0x0000)
204 #define GEV_STATUS_PACKET_RESEND (0x0100)
205 #define GEV_STATUS_NOT_IMPLEMENTED (0x8001)
206 #define GEV_STATUS_INVALID_PARAMETER (0x8002)
207 #define GEV_STATUS_INVALID_ADDRESS (0x8003)
208 #define GEV_STATUS_WRITE_PROTECT (0x8004)
209 #define GEV_STATUS_BAD_ALIGNMENT (0x8005)
210 #define GEV_STATUS_ACCESS_DENIED (0x8006)
211 #define GEV_STATUS_BUSY (0x8007)
212 #define GEV_STATUS_LOCAL_PROBLEM (0x8008) /* deprecated */
213 #define GEV_STATUS_MSG_MISMATCH (0x8009) /* deprecated */
214 #define GEV_STATUS_INVALID_PROTOCOL (0x800A) /* deprecated */
215 #define GEV_STATUS_NO_MSG (0x800B) /* deprecated */
216 #define GEV_STATUS_PACKET_UNAVAILABLE (0x800C)
217 #define GEV_STATUS_DATA_OVERRUN (0x800D)
218 #define GEV_STATUS_INVALID_HEADER (0x800E)
219 #define GEV_STATUS_WRONG_CONFIG (0x800F) /* deprecated */
220 #define GEV_STATUS_PACKET_NOT_YET_AVAILABLE (0x8010)
221 #define GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY (0x8011)
222 #define GEV_STATUS_PACKET_REMOVED_FROM_MEMORY (0x8012)
223 #define GEV_STATUS_NO_REF_TIME (0x8013) /* GEV 2.0 */
224 #define GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE (0x8014) /* GEV 2.0 */
225 #define GEV_STATUS_OVERFLOW (0x8015) /* GEV 2.0 */
226 #define GEV_STATUS_ACTION_LATE (0x8016) /* GEV 2.0 */
227 #define GEV_STATUS_LEADER_TRAILER_OVERFLOW (0x8017) /* GEV 2.1 */
228 #define GEV_STATUS_ERROR (0x8FFF)
235 #define GEV_DEVICEMODE_TRANSMITTER (0x00 )
236 #define GEV_DEVICEMODE_RECEIVER (0x01)
237 #define GEV_DEVICEMODE_TRANSCEIVER (0x02)
238 #define GEV_DEVICEMODE_PERIPHERAL (0x03)
245 #define GEV_EVENT_TRIGGER (0x0002) /* deprecated */
246 #define GEV_EVENT_START_OF_EXPOSURE (0x0003) /* deprecated */
247 #define GEV_EVENT_END_OF_EXPOSURE (0x0004) /* deprecated */
248 #define GEV_EVENT_START_OF_TRANSFER (0x0005) /* deprecated */
249 #define GEV_EVENT_END_OF_TRANSFER (0x0006) /* deprecated */
250 #define GEV_EVENT_PRIMARY_APP_SWITCH (0x0007)
251 #define GEV_EVENT_EVENT_LINK_SPEED_CHANGE (0x0008)
252 #define GEV_EVENT_ACTION_LATE (0x0009)
253 #define GEV_EVENT_ERROR_001 (0x8001)
260 #define GEV_LINKCONFIG_SINGLELINK (0x00)
261 #define GEV_LINKCONFIG_MULTIPLELINKS (0x01)
262 #define GEV_LINKCONFIG_STATICLAG (0x02)
263 #define GEV_LINKCONFIG_DYNAMICLAG (0x03)
266 void proto_register_gvcp(void);
267 void proto_reg_handoff_gvcp(void);
269 /* Define the gvcp proto */
270 static int proto_gvcp = -1;
271 static int global_gvcp_port = 3956;
273 static int hf_gvcp_custom_register_addr = -1;
274 static int hf_gvcp_custom_memory_addr = -1;
277 \brief IDs used for bootstrap dissection
280 static int hf_gvcp_message_key_code = -1;
281 static int hf_gvcp_flag = -1;
282 static int hf_gvcp_acknowledge_required_flag = -1;
283 static int hf_gvcp_allow_broadcast_acknowledge_flag = -1;
284 static int hf_gvcp_command = -1;
285 static int hf_gvcp_length = -1;
286 static int hf_gvcp_request_id = -1;
287 static int hf_gvcp_status = -1;
288 static int hf_gvcp_acknowledge = -1;
289 static int hf_gvcp_spec_version_major = -1;
290 static int hf_gvcp_spec_version_minor = -1;
291 static int hf_gvcp_devicemodediscovery = -1;
292 static int hf_gvcp_device_mac_address = -1;
293 static int hf_gvcp_ip_config_persistent_ip = -1;
294 static int hf_gvcp_ip_config_dhcp = -1;
295 static int hf_gvcp_ip_config_lla = -1;
296 static int hf_gvcp_current_IP = -1;
297 static int hf_gvcp_current_subnet_mask = -1;
298 static int hf_gvcp_current_default_gateway = -1;
299 static int hf_gvcp_manufacturer_name = -1;
300 static int hf_gvcp_model_name = -1;
301 static int hf_gvcp_device_version = -1;
302 static int hf_gvcp_manufacturer_specific_info = -1;
303 static int hf_gvcp_serial_number = -1;
304 static int hf_gvcp_user_defined_name = -1;
305 static int hf_gvcp_first_xml_device_description_file = -1;
306 static int hf_gvcp_second_xml_device_description_file = -1;
307 static int hf_gvcp_readregcmd_bootstrap_register = -1;
308 static int hf_gvcp_writeregcmd_bootstrap_register = -1;
309 static int hf_gvcp_writeregcmd_data = -1;
310 static int hf_gvcp_writeregcmd_data_index = -1;
311 static int hf_gvcp_readmemcmd_address = -1;
312 static int hf_gvcp_readmemcmd_bootstrap_register = -1;
313 static int hf_gvcp_readmemcmd_count = -1;
314 static int hf_gvcp_writememcmd_data = -1;
315 static int hf_gvcp_writememcmd_data_index = -1;
316 static int hf_gvcp_forceip_mac_address = -1;
317 static int hf_gvcp_forceip_static_IP = -1;
318 static int hf_gvcp_forceip_static_subnet_mask = -1;
319 static int hf_gvcp_forceip_static_default_gateway = -1;
320 static int hf_gvcp_resendcmd_stream_channel_index = -1;
321 static int hf_gvcp_resendcmd_block_id = -1;
322 static int hf_gvcp_resendcmd_first_packet_id = -1;
323 static int hf_gvcp_resendcmd_last_packet_id = -1;
324 static int hf_gvcp_eventcmd_id = -1;
325 static int hf_gvcp_eventcmd_error_id = -1;
326 static int hf_gvcp_eventcmd_extid_length = -1;
327 static int hf_gvcp_eventcmd_device_specific_id = -1;
328 static int hf_gvcp_eventcmd_stream_channel_index = -1;
329 static int hf_gvcp_eventcmd_block_id = -1;
330 static int hf_gvcp_eventcmd_timestamp = -1;
331 static int hf_gvcp_eventcmd_data = -1;
332 static int hf_gvcp_actioncmd_device_key = -1;
333 static int hf_gvcp_actioncmd_group_key = -1;
334 static int hf_gvcp_actioncmd_group_mask = -1;
335 static int hf_gvcp_time_to_completion = -1;
336 static int hf_gvcp_devicemode_endianness = -1;
337 static int hf_gvcp_devicemode_deviceclass = -1;
338 static int hf_gvcp_devicemode_characterset = -1;
339 static int hf_gvcp_machigh = -1;
340 static int hf_gvcp_maclow = -1;
341 static int hf_gvcp_persistent_ip = -1;
342 static int hf_gvcp_persistent_subnet = -1;
343 static int hf_gvcp_persistent_gateway = -1;
344 static int hf_gvcp_link_speed = -1;
345 static int hf_gvcp_number_message_channels = -1;
346 static int hf_gvcp_number_stream_channels = -1;
347 static int hf_gvcp_number_action_signals = -1;
348 static int hf_gvcp_capability_user_defined = -1;
349 static int hf_gvcp_capability_serial_number = -1;
350 static int hf_gvcp_capability_heartbeat_disable = -1;
351 static int hf_gvcp_capability_link_speed = -1;
352 static int hf_gvcp_capability_extended_status_code_v1_1 = -1;
353 static int hf_gvcp_capability_ccp_application_portip = -1;
354 static int hf_gvcp_capability_manifest_table = -1;
355 static int hf_gvcp_capability_test_data = -1;
356 static int hf_gvcp_capability_discovery_ACK_delay = -1;
357 static int hf_gvcp_capability_writable_discovery_ACK_delay = -1;
358 static int hf_gvcp_capability_primary_application_switchover = -1;
359 static int hf_gvcp_capability_unconditional_action_command = -1;
360 static int hf_gvcp_capability_pending = -1;
361 static int hf_gvcp_capability_evendata = -1;
362 static int hf_gvcp_capability_event = -1;
363 static int hf_gvcp_capability_packetresend = -1;
364 static int hf_gvcp_capability_writemem = -1;
365 static int hf_gvcp_capability_concatenation = -1;
366 static int hf_gvcp_heartbeat = -1;
367 static int hf_gvcp_high_timestamp_frequency = -1;
368 static int hf_gvcp_low_timestamp_frequency = -1;
369 static int hf_gvcp_high_timestamp_value = -1;
370 static int hf_gvcp_low_timestamp_value = -1;
371 static int hf_gvcp_discovery_ACK_delay = -1;
372 static int hf_gvcp_configuration_pending_ack_enable = -1;
373 static int hf_gvcp_configuration_heartbeat_disable = -1;
374 static int hf_gvcp_pending_timeout_max_execution = -1;
375 static int hf_gvcp_control_switchover_key_register = -1;
376 static int hf_gvcp_control_switchover_key = -1;
377 static int hf_gvcp_control_switchover_en = -1;
378 static int hf_gvcp_control_access = -1;
379 static int hf_gvcp_exclusive_access = -1;
380 static int hf_gvcp_primary_application_host_port = -1;
381 static int hf_gvcp_primary_application_ip_address = -1;
382 static int hf_gvcp_network_interface_index = -1;
383 static int hf_gvcp_host_port = -1;
384 static int hf_gvcp_channel_destination_ip = -1;
385 static int hf_gvcp_message_channel_transmission_timeout = -1;
386 static int hf_gvcp_message_channel_retry_count = -1;
387 static int hf_gvcp_message_channel_source_port = -1;
388 static int hf_gvcp_sc_host_port = -1;
389 static int hf_gvcp_sc_ni_index = -1;
390 static int hf_gvcp_sc_direction = -1;
391 static int hf_gvcp_sc_fire_test_packet = -1;
392 static int hf_gvcp_sc_do_not_fragment = -1;
393 static int hf_gvcp_sc_pixel_endianness = -1;
394 static int hf_gvcp_sc_packet_size = -1;
395 static int hf_gvcp_sc_packet_delay = -1;
396 static int hf_gvcp_sc_destination_ip = -1;
397 static int hf_gvcp_sc_source_port = -1;
398 static int hf_gvcp_sc_big_little_endian_supported = -1;
399 static int hf_gvcp_sc_ip_reassembly_supported = -1;
400 static int hf_gvcp_sc_unconditional_streaming_supported = -1;
401 static int hf_gvcp_sc_extended_chunk_data_supported = -1;
402 static int hf_gvcp_sc_unconditional_streaming_enabled = -1;
403 static int hf_gvcp_configuration_extended_status_codes_enable_v1_1 = -1;
404 static int hf_gvcp_sc_extended_chunk_data_enabled = -1;
405 static int hf_gvcp_action_group_key = -1;
406 static int hf_gvcp_action_group_mask = -1;
407 static int hf_gvcp_timestamp_control_latch = -1;
408 static int hf_gvcp_timestamp_control_reset = -1;
409 static int hf_gvcp_payloaddata = -1;
410 static int hf_gvcp_number_interfaces = -1;
411 static int hf_gvcp_supportedipconfig = -1;
412 static int hf_gvcp_currentipconfig = -1;
413 static int hf_gvcp_spec_version = -1;
415 /* Added for 2.0 support */
416 static int hf_gvcp_devicemode_current_link_configuration_v2_0 = -1;
417 static int hf_gvcp_ip_config_can_handle_pause_frames_v2_0 = -1;
418 static int hf_gvcp_ip_config_can_generate_pause_frames_v2_0 = -1;
419 static int hf_gvcp_number_of_active_links_v2_0 = -1;
420 static int hf_gvcp_sccaps_scspx_register_supported = -1;
421 static int hf_gvcp_sccaps_legacy_16bit_blockid_supported_v2_0 = -1;
422 static int hf_gvcp_mcsp_supported = -1;
423 static int hf_gvcp_capability_1588_v2_0 = -1;
424 static int hf_gvcp_capability_extended_status_code_v2_0 = -1;
425 static int hf_gvcp_capability_scheduled_action_command_v2_0 = -1;
426 static int hf_gvcp_capability_action_command = -1;
427 static int hf_gvcp_configuration_1588_enable_v2_0 = -1;
428 static int hf_gvcp_configuration_extended_status_codes_enable_v2_0 = -1;
429 static int hf_gvcp_configuration_unconditional_action_command_enable_v2_0 = -1;
430 static int hf_gvcp_gvsp_configuration_64bit_blockid_enable_v2_0 = -1;
431 static int hf_gvcp_link_dlag_v2_0 = -1;
432 static int hf_gvcp_link_slag_v2_0 = -1;
433 static int hf_gvcp_link_ml_v2_0 = -1;
434 static int hf_gvcp_link_sl_v2_0 = -1;
435 static int hf_gvcp_ieee1588_clock_status_v2_0 = -1;
436 static int hf_gvcp_scheduled_action_command_queue_size_v2_0 = -1;
437 static int hf_gvcp_sc_multizone_supported_v2_0 = -1;
438 static int hf_gvcp_sc_packet_resend_destination_option_supported_v2_0 = -1;
439 static int hf_gvcp_sc_packet_resend_all_in_transmission_supported_v2_0 = -1;
440 static int hf_gvcp_sc_packet_resend_destination_option_enabled_v2_0 = -1;
441 static int hf_gvcp_sc_packet_resend_all_in_transmission_enabled_v2_0 = -1;
442 static int hf_gvcp_sc_additional_zones_v2_0 = -1;
443 static int hf_gvcp_sc_zone0_direction_v2_0 = -1;
444 static int hf_gvcp_sc_zone1_direction_v2_0 = -1;
445 static int hf_gvcp_sc_zone2_direction_v2_0 = -1;
446 static int hf_gvcp_sc_zone3_direction_v2_0 = -1;
447 static int hf_gvcp_sc_zone4_direction_v2_0 = -1;
448 static int hf_gvcp_sc_zone5_direction_v2_0 = -1;
449 static int hf_gvcp_sc_zone6_direction_v2_0 = -1;
450 static int hf_gvcp_sc_zone7_direction_v2_0 = -1;
451 static int hf_gvcp_sc_zone8_direction_v2_0 = -1;
452 static int hf_gvcp_sc_zone9_direction_v2_0 = -1;
453 static int hf_gvcp_sc_zone10_direction_v2_0 = -1;
454 static int hf_gvcp_sc_zone11_direction_v2_0 = -1;
455 static int hf_gvcp_sc_zone12_direction_v2_0 = -1;
456 static int hf_gvcp_sc_zone13_direction_v2_0 = -1;
457 static int hf_gvcp_sc_zone14_direction_v2_0 = -1;
458 static int hf_gvcp_sc_zone15_direction_v2_0 = -1;
459 static int hf_gvcp_sc_zone16_direction_v2_0 = -1;
460 static int hf_gvcp_sc_zone17_direction_v2_0 = -1;
461 static int hf_gvcp_sc_zone18_direction_v2_0 = -1;
462 static int hf_gvcp_sc_zone19_direction_v2_0 = -1;
463 static int hf_gvcp_sc_zone20_direction_v2_0 = -1;
464 static int hf_gvcp_sc_zone21_direction_v2_0 = -1;
465 static int hf_gvcp_sc_zone22_direction_v2_0 = -1;
466 static int hf_gvcp_sc_zone23_direction_v2_0 = -1;
467 static int hf_gvcp_sc_zone24_direction_v2_0 = -1;
468 static int hf_gvcp_sc_zone25_direction_v2_0 = -1;
469 static int hf_gvcp_sc_zone26_direction_v2_0 = -1;
470 static int hf_gvcp_sc_zone27_direction_v2_0 = -1;
471 static int hf_gvcp_sc_zone28_direction_v2_0 = -1;
472 static int hf_gvcp_sc_zone29_direction_v2_0 = -1;
473 static int hf_gvcp_sc_zone30_direction_v2_0 = -1;
474 static int hf_gvcp_sc_zone31_direction_v2_0 = -1;
475 static int hf_gvcp_scheduledactioncommand_flag_v2_0 = -1;
476 static int hf_gvcp_64bitid_flag_v2_0 = -1;
477 static int hf_gvcp_resendcmd_extended_block_id_v2_0 = -1;
478 static int hf_gvcp_resendcmd_extended_first_packet_id_v2_0 = -1;
479 static int hf_gvcp_resendcmd_extended_last_packet_id_v2_0 = -1;
480 static int hf_gvcp_actioncmd_time_v2_0 = -1;
481 static int hf_gvcp_eventcmd_block_id_64bit_v2_0 = -1;
483 /* Added for 2.1 support */
484 static int hf_gvcp_selected_ieee1588_profile_v2_1 = -1;
485 static int hf_gvcp_capability_ieee1588_extended_capabilities_v2_1 = -1;
486 static int hf_gvcp_ieee1588_profile_registers_present_v2_1 = -1;
487 static int hf_gvcp_ieee1588_ptp_profile_supported_v2_1 = -1;
488 static int hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1 = -1;
489 static int hf_gvcp_sc_multi_part_supported_v2_1 = -1;
490 static int hf_gvcp_sc_large_leader_trailer_supported_v2_1 = -1;
491 static int hf_gvcp_sc_multi_part_enabled_v2_1 = -1;
492 static int hf_gvcp_sc_large_leader_trailer_enabled_v2_1 = -1;
494 /* Added for 2.2 support */
495 static int hf_gvcp_sccaps_scmbsx_supported_v2_2 = -1;
496 static int hf_gvcp_sccaps_scebax_supported_v2_2 = -1;
497 static int hf_gvcp_mcc_supported_v2_2 = -1;
498 static int hf_gvcp_mcec_supported_v2_2 = -1;
499 static int hf_gvcp_mcec_enabled_v2_2 = -1;
500 static int hf_gvcp_sc_scmpcx_supported_v2_2 = -1;
501 static int hf_gvcp_sc_gendc_supported_v2_2 = -1;
502 static int hf_gvcp_sc_gendc_enabled_v2_2 = -1;
503 static int hf_gvcp_sc_max_packet_count_v2_2 = -1;
504 static int hf_gvcp_sc_max_block_size_high_v2_2 = -1;
505 static int hf_gvcp_sc_max_block_size_low_v2_2 = -1;
506 static int hf_gvcp_sc_extended_registers_address_v2_2 = -1;
507 static int hf_gvcp_sc_gendc_descriptor_address_v2_2 = -1;
508 static int hf_gvcp_sc_gendc_descriptor_size_v2_2 = -1;
509 static int hf_gvcp_sc_gendc_flow_mapping_table_address_v2_2 = -1;
510 static int hf_gvcp_sc_gendc_flow_mapping_table_size_v2_2 = -1;
511 static int hf_gvcp_readregcmd_extended_bootstrap_register = -1;
512 static int hf_gvcp_writeregcmd_extended_bootstrap_register = -1;
514 /* Generated from convert_proto_tree_add_text.pl */
515 static int hf_gvcp_custom_register_value = -1;
516 static int hf_gvcp_custom_read_register_addr = -1;
517 static int hf_gvcp_readmemcmd_data_read = -1;
518 static int hf_gvcp_custom_read_register_value = -1;
519 static int hf_gvcp_manifest_table = -1;
520 static int hf_gvcp_reserved_bit = -1;
522 /*Define the tree for gvcp*/
523 static int ett_gvcp = -1;
524 static int ett_gvcp_cmd = -1;
525 static int ett_gvcp_flags = -1;
526 static int ett_gvcp_ack = -1;
527 static int ett_gvcp_payload_cmd = -1;
528 static int ett_gvcp_payload_ack = -1;
529 static int ett_gvcp_payload_cmd_subtree = -1;
530 static int ett_gvcp_payload_ack_subtree = -1;
531 static int ett_gvcp_bootstrap_fields = -1;
533 static dissector_handle_t gvcp_handle;
534 static dissector_handle_t gvsp_handle;
537 static const value_string devicemodenames_class[] = {
538 { GEV_DEVICEMODE_TRANSMITTER, "Transmitter" },
539 { GEV_DEVICEMODE_RECEIVER, "Receiver" },
540 { GEV_DEVICEMODE_TRANSCEIVER, "Transceiver" },
541 { GEV_DEVICEMODE_PERIPHERAL, "Peripheral" },
545 /*Current Link Configuration*/
546 static const value_string linkconfiguration_class[] = {
547 { GEV_LINKCONFIG_SINGLELINK, "Single Link" },
548 { GEV_LINKCONFIG_MULTIPLELINKS, "Multiple Links" },
549 { GEV_LINKCONFIG_STATICLAG, "Static LAG" },
550 { GEV_LINKCONFIG_DYNAMICLAG, "Dynamic LAG" },
554 static const value_string devicemodenames_characterset[] = {
555 { 0x01, "UTF-8 Character Set" },
556 { 0x00, "Reserved" },
560 static const value_string commandnames[] = {
561 { GVCP_DISCOVERY_CMD, "DISCOVERY_CMD" },
562 { GVCP_FORCEIP_CMD, "FORCEIP_CMD" },
563 { GVCP_PACKETRESEND_CMD, "PACKETRESEND_CMD" },
564 { GVCP_READREG_CMD, "READREG_CMD" },
565 { GVCP_WRITEREG_CMD, "WRITEREG_CMD" },
566 { GVCP_READMEM_CMD, "READMEM_CMD" },
567 { GVCP_WRITEMEM_CMD, "WRITEMEM_CMD" },
568 { GVCP_EVENT_CMD, "EVENT_CMD" },
569 { GVCP_EVENTDATA_CMD, "EVENTDATA_CMD" },
570 { GVCP_ACTION_CMD, "ACTION_CMD" },
574 static const value_string acknowledgenames[] = {
575 { GVCP_DISCOVERY_ACK, "DISCOVERY_ACK" },
576 { GVCP_FORCEIP_ACK, "FORCEIP_ACK" },
577 { GVCP_PACKETRESEND_ACK, "PACKETRESEND_ACK" },
578 { GVCP_READREG_ACK, "READREG_ACK" },
579 { GVCP_WRITEREG_ACK, "WRITEREG_ACK" },
580 { GVCP_READMEM_ACK, "READMEM_ACK" },
581 { GVCP_WRITEMEM_ACK, "WRITEMEM_ACK" },
582 { GVCP_PENDING_ACK, "PENDING_ACK" },
583 { GVCP_EVENT_ACK, "EVENT_ACK" },
584 { GVCP_EVENTDATA_ACK, "EVENTDATA_ACK" },
585 { GVCP_ACTION_ACK, "ACTION_ACK" },
589 static const value_string eventidnames[] = {
590 { GEV_EVENT_TRIGGER, "GEV_EVENT_TRIGGER (deprecated)" },
591 { GEV_EVENT_START_OF_EXPOSURE, "GEV_EVENT_START_OF_EXPOSURE (deprecated)" },
592 { GEV_EVENT_END_OF_EXPOSURE, "GEV_EVENT_END_OF_EXPOSURE (deprecated)" },
593 { GEV_EVENT_START_OF_TRANSFER, "GEV_EVENT_START_OF_TRANSFER (deprecated)" },
594 { GEV_EVENT_END_OF_TRANSFER, "GEV_EVENT_END_OF_TRANSFER (deprecated)" },
595 { GEV_EVENT_PRIMARY_APP_SWITCH, "GEV_EVENT_PRIMARY_APP_SWITCH" },
596 { GEV_EVENT_EVENT_LINK_SPEED_CHANGE, "GEV_EVENT_EVENT_LINK_SPEED_CHANGE" },
597 { GEV_EVENT_ACTION_LATE, "GEV_EVENT_ACTION_LATE" },
598 { GEV_EVENT_ERROR_001, "GEV_EVENT_ERROR_001" },
602 static const value_string statusnames[] = {
603 { GEV_STATUS_SUCCESS, "GEV_STATUS_SUCCESS" },
604 { GEV_STATUS_PACKET_RESEND, "GEV_STATUS_PACKET_RESEND" },
605 { GEV_STATUS_NOT_IMPLEMENTED, "GEV_STATUS_NOT_IMPLEMENTED" },
606 { GEV_STATUS_INVALID_PARAMETER, "GEV_STATUS_INVALID_PARAMETER" },
607 { GEV_STATUS_INVALID_ADDRESS, "GEV_STATUS_INVALID_ADDRESS" },
608 { GEV_STATUS_WRITE_PROTECT, "GEV_STATUS_WRITE_PROTECT" },
609 { GEV_STATUS_BAD_ALIGNMENT, "GEV_STATUS_BAD_ALIGNMENT" },
610 { GEV_STATUS_ACCESS_DENIED, "GEV_STATUS_ACCESS_DENIED" },
611 { GEV_STATUS_BUSY, "GEV_STATUS_BUSY" },
612 { GEV_STATUS_LOCAL_PROBLEM, "GEV_STATUS_LOCAL_PROBLEM (deprecated)" },
613 { GEV_STATUS_MSG_MISMATCH, "GEV_STATUS_MSG_MISMATCH (deprecated)" },
614 { GEV_STATUS_INVALID_PROTOCOL, "GEV_STATUS_INVALID_PROTOCOL (deprecated)" },
615 { GEV_STATUS_NO_MSG, "GEV_STATUS_NO_MSG (deprecated)" },
616 { GEV_STATUS_PACKET_UNAVAILABLE, "GEV_STATUS_PACKET_UNAVAILABLE" },
617 { GEV_STATUS_DATA_OVERRUN, "GEV_STATUS_DATA_OVERRUN" },
618 { GEV_STATUS_INVALID_HEADER, "GEV_STATUS_INVALID_HEADER" },
619 { GEV_STATUS_WRONG_CONFIG, "GEV_STATUS_WRONG_CONFIG (deprecated)" },
620 { GEV_STATUS_PACKET_NOT_YET_AVAILABLE, "GEV_STATUS_PACKET_NOT_YET_AVAILABLE" },
621 { GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY" },
622 { GEV_STATUS_PACKET_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_REMOVED_FROM_MEMORY" },
623 { GEV_STATUS_NO_REF_TIME, "GEV_STATUS_NO_REF_TIME" },
624 { GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE, "GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE" },
625 { GEV_STATUS_OVERFLOW, "GEV_STATUS_OVERFLOW" },
626 { GEV_STATUS_ACTION_LATE, "GEV_STATUS_ACTION_LATE" },
627 { GEV_STATUS_LEADER_TRAILER_OVERFLOW, "GEV_STATUS_LEADER_TRAILER_OVERFLOW" },
628 { GEV_STATUS_ERROR, "GEV_STATUS_ERROR" },
632 static const value_string statusnames_short[] = {
633 { GEV_STATUS_SUCCESS, "" },
634 { GEV_STATUS_PACKET_RESEND, "(Packet Resend) " },
635 { GEV_STATUS_NOT_IMPLEMENTED, "(Not Implemented) " },
636 { GEV_STATUS_INVALID_PARAMETER, "(Invalid Parameter) " },
637 { GEV_STATUS_INVALID_ADDRESS, "(Invalid Address) " },
638 { GEV_STATUS_WRITE_PROTECT, "(Write Protect) " },
639 { GEV_STATUS_BAD_ALIGNMENT, "(Bad Alignment) " },
640 { GEV_STATUS_ACCESS_DENIED, "(Access Denied) " },
641 { GEV_STATUS_BUSY, "(Busy) " },
642 { GEV_STATUS_LOCAL_PROBLEM, "(Local Problem) " },
643 { GEV_STATUS_MSG_MISMATCH, "(Message Mismatch) " },
644 { GEV_STATUS_INVALID_PROTOCOL, "(Invalid Protocol) " },
645 { GEV_STATUS_NO_MSG, "(No Message) " },
646 { GEV_STATUS_PACKET_UNAVAILABLE, "(Packet Unavailable) " },
647 { GEV_STATUS_DATA_OVERRUN, "(Data Overrun) " },
648 { GEV_STATUS_INVALID_HEADER, "(Invalid Header) " },
649 { GEV_STATUS_WRONG_CONFIG, "(Wrong Configuration) " },
650 { GEV_STATUS_PACKET_NOT_YET_AVAILABLE, "(Packet not yet available) " },
651 { GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "(Packet and previous removed from memory) " },
652 { GEV_STATUS_PACKET_REMOVED_FROM_MEMORY, "(Packet removed from memory) " },
653 { GEV_STATUS_NO_REF_TIME, "(No reference time)" },
654 { GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE, "(Packet temp. unavailable)" },
655 { GEV_STATUS_OVERFLOW, "(overflow)" },
656 { GEV_STATUS_ACTION_LATE, "(Action late)" },
657 { GEV_STATUS_LEADER_TRAILER_OVERFLOW, "(Leader/Trailer overflow)" },
658 { GEV_STATUS_ERROR, "(Error) " },
662 static const true_false_string directionnames = {
667 static const true_false_string zonedirectionnames = {
673 brief Register name to address mappings
676 const value_string bootstrapregisternames[] = {
677 { GVCP_VERSION, "[Version]" },
678 { GVCP_DEVICE_MODE, "[Device Mode]" },
679 { GVCP_DEVICE_MAC_HIGH_0, "[Device MAC address High (Net #0)]" },
680 { GVCP_DEVICE_MAC_LOW_0, "[Device MAC address Low (Net #0)]" },
681 { GVCP_SUPPORTED_IP_CONFIGURATION_0, "[Supported IP Configuration (Net #0)]" },
682 { GVCP_CURIPCFG_0, "[Current IP Configuration (Net #0)]" },
683 { GVCP_CURRENT_IP_ADDRESS_0, "[Current IP Address (Net #0)]" },
684 { GVCP_CURRENT_SUBNET_MASK_0, "[Current Subnet Mask (Net #0)]" },
685 { GVCP_CURRENT_DEFAULT_GATEWAY_0, "[Current Default Gateway (Net #0)]" },
686 { GVCP_MANUFACTURER_NAME, "[Manufacturer Name]" },
687 { GVCP_MODEL_NAME, "[Model Name]" },
688 { GVCP_DEVICE_VERSION, "[Device Version]" },
689 { GVCP_MANUFACTURER_INFO, "[Manufacturer Specific Information]" },
690 { GVCP_SERIAL_NUMBER, "[Serial Number]" },
691 { GVCP_USER_DEFINED_NAME, "[User-defined Name]" },
692 { GVCP_FIRST_URL, "[First Choice of URL for XML device description file]" },
693 { GVCP_SECOND_URL, "[Second Choice of URL for XML device description file]" },
694 { GVCP_NUMBER_OF_NETWORK_INTERFACES, "[Number of network interfaces]" },
695 { GVCP_PERSISTENT_IP_ADDRESS_0, "[Persistent IP address (Net #0)]" },
696 { GVCP_PERSISTENT_SUBNET_MASK_0, "[Persistent subnet mask (Net #0)]" },
697 { GVCP_PERSISTENT_DEFAULT_GATEWAY_0, "[Persistent default gateway (Net# 0)]" },
698 { GVCP_LINK_SPEED_0, "[Link Speed (Net #0)]" },
699 { GVCP_DEVICE_MAC_HIGH_1, "[Device MAC address High (Net #1)]" },
700 { GVCP_DEVICE_MAC_LOW_1, "[Device MAC address Low (Net #1)]" },
701 { GVCP_SUPPORTED_IP_CONFIGURATION_1, "[Supported IP Configuration (Net #1)]" },
702 { GVCP_CURIPCFG_1, "[Current IP Configuration (Net #1)]" },
703 { GVCP_CURRENT_IP_ADDRESS_1, "[Current IP Address (Net #1)]" },
704 { GVCP_CURRENT_SUBNET_MASK_1, "[Current Subnet Mask (Net #1)]" },
705 { GVCP_CURRENT_DEFAULT_GATEWAY_1, "[Current Default Gateway (Net #1)]" },
706 { GVCP_PERSISTENT_IP_ADDRESS_1, "[Persistent IP address (Net #1)]" },
707 { GVCP_PERSISTENT_SUBNET_MASK_1, "[Persistent subnet mask (Net#1)]" },
708 { GVCP_PERSISTENT_DEFAULT_GATEWAY_1, "[Persistent default gateway (Net #1)]" },
709 { GVCP_LINK_SPEED_1, "[Link Speed (Net #1)]" },
710 { GVCP_DEVICE_MAC_HIGH_2, "[Device MAC address High (Net #2)]" },
711 { GVCP_DEVICE_MAC_LOW_2, "[Device MAC address Low (Net #2)]" },
712 { GVCP_SUPPORTED_IP_CONFIGURATION_2, "[Supported IP Configuration (Net #2)]" },
713 { GVCP_CURIPCFG_2, "[Current IP Configuration (Net #2)]" },
714 { GVCP_CURRENT_IP_ADDRESS_2, "[Current IP Address (Net #2)]" },
715 { GVCP_CURRENT_SUBNET_MASK_2, "[Current Subnet Mask (Net #2)]" },
716 { GVCP_CURRENT_DEFAULT_GATEWAY_2, "[Current Default Gateway (Net #2)]" },
717 { GVCP_PERSISTENT_IP_ADDRESS_2, "[Persistent IP address (Net #2)]" },
718 { GVCP_PERSISTENT_SUBNET_MASK_2, "[Persistent subnet mask (Net #2)]" },
719 { GVCP_PERSISTENT_DEFAULT_GATEWAY_2, "[Persistent default gateway (Net #2)]" },
720 { GVCP_LINK_SPEED_2, "[Link Speed (Net #2)]" },
721 { GVCP_DEVICE_MAC_HIGH_3, "[Device MAC address High (Net #3)]" },
722 { GVCP_DEVICE_MAC_LOW_3, "[Device MAC address Low (Net #3)]" },
723 { GVCP_SUPPORTED_IP_CONFIGURATION_3, "[Supported IP Configuration (Net #3)]" },
724 { GVCP_CURIPCFG_3, "[Current IP Configuration (Net #3)]" },
725 { GVCP_CURRENT_IP_ADDRESS_3, "[Current IP Address (Net #3)]" },
726 { GVCP_CURRENT_SUBNET_MASK_3, "[Current Subnet Mask (Net #3)]" },
727 { GVCP_CURRENT_DEFAULT_GATEWAY_3, "[Current Default Gateway (Net #3)]" },
728 { GVCP_PERSISTENT_IP_ADDRESS_3, "[Persistent IP address (Net #3)]" },
729 { GVCP_PERSISTENT_SUBNET_MASK_3, "[Persistent subnet mask (Net #3)]" },
730 { GVCP_PERSISTENT_DEFAULT_GATEWAY_3, "[Persistent default gateway (Net #3)]" },
731 { GVCP_LINK_SPEED_3, "[Link Speed (Net #3)]" },
732 { GVCP_NUMBER_OF_MESSAGE_CHANNELS, "[Number of Message Channels]" },
733 { GVCP_NUMBER_OF_STREAM_CHANNELS, "[Number of Stream Channels]" },
734 { GVCP_NUMBER_OF_ACTION_SIGNALS, "[Number of Action Signals]" },
735 { GVCP_ACTION_DEVICE_KEY, "[Action Device Key]" },
736 { GVCP_SC_CAPS, "[Stream channels Capability]" },
737 { GVCP_MESSAGE_CHANNEL_CAPS, "[Message channel Capability]" },
738 { GVCP_CAPABILITY, "[GVCP Capability]" },
739 { GVCP_HEARTBEAT_TIMEOUT, "[Heartbeat timeout]" },
740 { GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH, "[Timestamp tick frequency - High]" },
741 { GVCP_TIMESTAMP_TICK_FREQUENCY_LOW, "[Timestamp tick frequency - Low]" },
742 { GVCP_TIMESTAMP_CONTROL, "[Timestamp control]" },
743 { GVCP_TIMESTAMP_VALUE_HIGH, "[Timestamp value (latched) - High]" },
744 { GVCP_TIMESTAMP_VALUE_LOW, "[Timestamp value (latched) - Low]" },
745 { GVCP_DISCOVERY_ACK_DELAY, "[Discovery ACK delay]" },
746 { GVCP_CONFIGURATION, "[GVCP Configuration]" },
747 { GVCP_PENDING_TIMEOUT, "[Pending Timeout]" },
748 { GVCP_CONTROL_SWITCHOVER_KEY, "[Control switchover key]" },
749 { GVCP_GVSCP_CONFIGURATION, "[GVSP Configuration]" },
750 { GVCP_PHYSICAL_LINK_CAPABILITY, "[Physical link capability]" },
751 { GVCP_PHYSICAL_LINK_CONFIGURATION, "[Physical link configuration]" },
752 { GVCP_IEEE_1588_STATUS, "[IEEE1588 status]" },
753 { GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE, "[Scheduled action command queue size]" },
754 { GVCP_IEEE_1588_EXTENDED_CAPABILITY, "[IEEE1588 extended capabilities]" },
755 { GVCP_IEEE_1588_SUPPORTED_PROFILES, "[IEEE1588 supported profiles]" },
756 { GVCP_IEEE_1588_SELECTED_PROFILE, "[IEEE1588 selected profile]" },
757 { GVCP_CCP, "[CCP (Control Channel Privilege)]" },
758 { GVCP_PRIMARY_APPLICATION_PORT, "[Primary Application Port]" },
759 { GVCP_PRIMARY_APPLICATION_IP_ADDRESS, "[Primary Application IP address]" },
760 { GVCP_MC_DESTINATION_PORT, "[MCP (Message Channel Port)]" },
761 { GVCP_MC_DESTINATION_ADDRESS, "[MCDA (Message Channel Destination Address)]" },
762 { GVCP_MC_TIMEOUT, "[MCTT (Message Channel Transmission Timeout in ms)]" },
763 { GVCP_MC_RETRY_COUNT, "[MCRC (Message Channel Retry Count)]" },
764 { GVCP_MC_SOURCE_PORT, "[MCSP (Message Channel Source Port)]" },
765 { GVCP_MC_CONFIGURATION, "[MCC (Message Channel Configuration)]" }, /* GEV 2.2 */
766 { GVCP_SC_DESTINATION_PORT(0), "[SCP0 (Stream Channel #0 Port)]" },
767 { GVCP_SC_PACKET_SIZE(0), "[SCPS0 (Stream Channel #0 Packet Size)]" },
768 { GVCP_SC_PACKET_DELAY(0), "[SCPD0 (Stream Channel #0 Packet Delay)]" },
769 { GVCP_SC_DESTINATION_ADDRESS(0), "[SCDA0 (Stream Channel #0 Destination Address)]" },
770 { GVCP_SC_SOURCE_PORT(0), "[SCSP0 (Stream Channel #0 Source Port)]" },
771 { GVCP_SC_CAPABILITY(0), "[SCC0 (Stream Channel #0 Capability)]" },
772 { GVCP_SC_CONFIGURATION(0), "[SCCONF0 (Stream Channel #0 Configuration)]" },
773 { GVCP_SC_ZONE(0), "[SCZ0 (Stream Channel Zone #0)]" },
774 { GVCP_SC_ZONE_DIRECTION(0), "[SCZD0 (Stream Channel Zone Direction #0)]" },
775 { GVCP_SC_MAX_PACKET_COUNT(0), "[SCMPC0 (Stream Channel Max Packet Count #0)]" },
776 { GVCP_SC_MAX_BLOCK_SIZE_HIGH(0), "[SCMBSL0 (Stream Channel Max Block Size (High) #0)]" },
777 { GVCP_SC_MAX_BLOCK_SIZE_LOW(0), "[SCMBSH0 (Stream Channel Max Block Size (Low) #0)]" },
778 { GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(0), "SCEBA0 (Stream Channel Extended Bootstrap Address #0)]" },
779 { GVCP_SC_DESTINATION_PORT(1), "[SCP1 (Stream Channel #1 Port)]" },
780 { GVCP_SC_PACKET_SIZE(1), "[SCPS1 (Stream Channel #1 Packet Size)]" },
781 { GVCP_SC_PACKET_DELAY(1), "[SCPD1 (Stream Channel #1 Packet Delay)]" },
782 { GVCP_SC_DESTINATION_ADDRESS(1), "[SCDA1 (Stream Channel #1 Destination Address)]" },
783 { GVCP_SC_SOURCE_PORT(1), "[SCSP1 (Stream Channel #1 Source Port)]" },
784 { GVCP_SC_CAPABILITY(1), "[SCC1 (Stream Channel #1 Capability)]" },
785 { GVCP_SC_CONFIGURATION(1), "[SCCONF1 (Stream Channel #1 Configuration)]" },
786 { GVCP_SC_ZONE(1), "[SCZ1 (Stream Channel Zone #1)]" },
787 { GVCP_SC_ZONE_DIRECTION(1), "[SCZD1 (Stream Channel Zone Direction #1)]" },
788 { GVCP_SC_MAX_PACKET_COUNT(1), "[SCMPC1 (Stream Channel Max Packet Count #1)]" },
789 { GVCP_SC_MAX_BLOCK_SIZE_HIGH(1), "[SCMBSL1 (Stream Channel Max Block Size (High) #1)]" },
790 { GVCP_SC_MAX_BLOCK_SIZE_LOW(1), "[SCMBSH1 (Stream Channel Max Block Size (Low) #1)]" },
791 { GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(1), "SCEBA1 (Stream Channel Extended Bootstrap Address #1)]" },
792 { GVCP_SC_DESTINATION_PORT(2), "[SCP2 (Stream Channel #2 Port)]" },
793 { GVCP_SC_PACKET_SIZE(2), "[SCPS2 (Stream Channel #2 Packet Size)]" },
794 { GVCP_SC_PACKET_DELAY(2), "[SCPD2 (Stream Channel #2 Packet Delay)]" },
795 { GVCP_SC_DESTINATION_ADDRESS(2), "[SCDA2 (Stream Channel #2 Destination Address)]" },
796 { GVCP_SC_SOURCE_PORT(2), "[SCSP2 (Stream Channel #2 Source Port)]" },
797 { GVCP_SC_CAPABILITY(2), "[SCC2 (Stream Channel #2 Capability)]" },
798 { GVCP_SC_CONFIGURATION(2), "[SCCONF2 (Stream Channel #2 Configuration)]" },
799 { GVCP_SC_ZONE(2), "[SCZ2 (Stream Channel Zone #2)]" },
800 { GVCP_SC_ZONE_DIRECTION(2), "[SCZD2 (Stream Channel Zone Direction #2)]" },
801 { GVCP_SC_MAX_PACKET_COUNT(2), "[SCMPC2 (Stream Channel Max Packet Count #2)]" },
802 { GVCP_SC_MAX_BLOCK_SIZE_HIGH(2), "[SCMBSL2 (Stream Channel Max Block Size (High) #2)]" },
803 { GVCP_SC_MAX_BLOCK_SIZE_LOW(2), "[SCMBSH2 (Stream Channel Max Block Size (Low) #2)]" },
804 { GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(2), "SCEBA2 (Stream Channel Extended Bootstrap Address #2)]" },
805 { GVCP_SC_DESTINATION_PORT(3), "[SCP3 (Stream Channel #3 Port)]" },
806 { GVCP_SC_PACKET_SIZE(3), "[SCPS3 (Stream Channel #3 Packet Size)]" },
807 { GVCP_SC_PACKET_DELAY(3), "[SCPD3 (Stream Channel #3 Packet Delay)]" },
808 { GVCP_SC_DESTINATION_ADDRESS(3), "[SCDA3 (Stream Channel #3 Destination Address)]" },
809 { GVCP_SC_SOURCE_PORT(3), "[SCSP3 (Stream Channel #3 Source Port)]" },
810 { GVCP_SC_CAPABILITY(3), "[SCC3 (Stream Channel #3 Capability)]" },
811 { GVCP_SC_CONFIGURATION(3), "[SCCONF3 (Stream Channel #3 Configuration)]" },
812 { GVCP_SC_ZONE(3), "[SCZ3 (Stream Channel Zone #3)]" },
813 { GVCP_SC_ZONE_DIRECTION(3), "[SCZD3 (Stream Channel Zone Direction #3)]" },
814 { GVCP_SC_MAX_PACKET_COUNT(3), "[SCMPC3 (Stream Channel Max Packet Count #3)]" },
815 { GVCP_SC_MAX_BLOCK_SIZE_HIGH(3), "[SCMBSL3 (Stream Channel Max Block Size (High) #3)]" },
816 { GVCP_SC_MAX_BLOCK_SIZE_LOW(3), "[SCMBSH3 (Stream Channel Max Block Size (Low) #3)]" },
817 { GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(3), "SCEBA3 (Stream Channel Extended Bootstrap Address #3)]" },
818 { GVCP_MANIFEST_TABLE, "[Manifest Table]" },
819 { GVCP_ACTION_GROUP_KEY(0), "[Action Group Key #0]" },
820 { GVCP_ACTION_GROUP_MASK(0), "[Action Group Mask #0]" },
821 { GVCP_ACTION_GROUP_KEY(1), "[Action Group Key #1]" },
822 { GVCP_ACTION_GROUP_MASK(1), "[Action Group Mask #1]" },
823 { GVCP_ACTION_GROUP_KEY(2), "[Action Group Key #2]" },
824 { GVCP_ACTION_GROUP_MASK(2), "[Action Group Mask #2]" },
825 { GVCP_ACTION_GROUP_KEY(3), "[Action Group Key #3]" },
826 { GVCP_ACTION_GROUP_MASK(3), "[Action Group Mask #3]" },
827 { GVCP_ACTION_GROUP_KEY(4), "[Action Group Key #4]" },
828 { GVCP_ACTION_GROUP_MASK(4), "[Action Group Mask #4]" },
829 { GVCP_ACTION_GROUP_KEY(5), "[Action Group Key #5]" },
830 { GVCP_ACTION_GROUP_MASK(5), "[Action Group Mask #5]" },
831 { GVCP_ACTION_GROUP_KEY(6), "[Action Group Key #6]" },
832 { GVCP_ACTION_GROUP_MASK(6), "[Action Group Mask #6]" },
833 { GVCP_ACTION_GROUP_KEY(7), "[Action Group Key #7]" },
834 { GVCP_ACTION_GROUP_MASK(7), "[Action Group Mask #7]" },
835 { GVCP_ACTION_GROUP_KEY(8), "[Action Group Key #8]" },
836 { GVCP_ACTION_GROUP_MASK(8), "[Action Group Mask #8]" },
837 { GVCP_ACTION_GROUP_KEY(9), "[Action Group Key #9]" },
838 { GVCP_ACTION_GROUP_MASK(9), "[Action Group Mask #9]" },
844 brief Extended Register name to address mappings
848 const value_string extendedbootstrapregisternames[] = {
849 { GVCP_SC_GENDC_DESCRIPTOR_ADDRESS, "[GenDC Descriptor Address]" },
850 { GVCP_SC_GENDC_DESCRIPTOR_SIZE, "[GenDC Descriptor Size]" },
851 { GVCP_SC_GENDC_FLOW_MAPPING_TABLE_ADDRESS, "[GenDC Flow Mapping Table Address]" },
852 { GVCP_SC_GENDC_FLOW_MAPPING_TABLE_SIZE, "[GenDC Flow Mapping Table Size]" },
858 \brief Check is the current register access is into one of the extended stream channel registers
861 static gboolean is_extended_bootstrap_address(gvcp_conv_info_t *gvcp_info, guint32 addr, guint32* extended_bootstrap_address_offset)
863 gint stream_channel_count = 0;
864 for (stream_channel_count = 0; stream_channel_count < GVCP_MAX_STREAM_CHANNEL_COUNT; stream_channel_count++)
866 if ((gvcp_info->extended_bootstrap_address[stream_channel_count] != 0) &&
867 (addr >= gvcp_info->extended_bootstrap_address[stream_channel_count]) &&
868 (addr <= (gvcp_info->extended_bootstrap_address[stream_channel_count] + GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS_LAST)))
870 if (extended_bootstrap_address_offset)
872 *extended_bootstrap_address_offset = gvcp_info->extended_bootstrap_address[stream_channel_count];
882 \brief Returns a register name based on its address
885 static const gchar* get_register_name_from_address(guint32 addr, gvcp_conv_info_t *gvcp_info, gboolean* is_custom_register)
887 const gchar* address_string = NULL;
889 if (is_custom_register != NULL)
891 *is_custom_register = FALSE;
894 address_string = try_val_to_str(addr, bootstrapregisternames);
897 guint32 extended_bootstrap_address_offset = 0;
898 if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset))
900 address_string = try_val_to_str(addr - extended_bootstrap_address_offset, extendedbootstrapregisternames);
905 address_string = wmem_strdup_printf(wmem_packet_scope(), "[Addr:0x%08X]", addr);
906 if (is_custom_register != NULL)
908 *is_custom_register = TRUE;
913 return address_string;
918 \brief Attempts to dissect a bootstrap register
921 static int dissect_register(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gint offset, gint length)
926 proto_tree_add_item(branch, hf_gvcp_spec_version_major, tvb, offset, 4, ENC_BIG_ENDIAN);
927 proto_tree_add_item(branch, hf_gvcp_spec_version_minor, tvb, offset, 4, ENC_BIG_ENDIAN);
930 case GVCP_DEVICE_MODE:
931 proto_tree_add_item(branch, hf_gvcp_devicemode_endianness, tvb, offset, 4, ENC_BIG_ENDIAN);
932 proto_tree_add_item(branch, hf_gvcp_devicemode_deviceclass, tvb, offset, 4, ENC_BIG_ENDIAN);
933 proto_tree_add_item(branch, hf_gvcp_devicemode_current_link_configuration_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
934 proto_tree_add_item(branch, hf_gvcp_devicemode_characterset, tvb, offset, 4, ENC_BIG_ENDIAN);
937 case GVCP_DEVICE_MAC_HIGH_0:
938 case GVCP_DEVICE_MAC_HIGH_1:
939 case GVCP_DEVICE_MAC_HIGH_2:
940 case GVCP_DEVICE_MAC_HIGH_3:
941 proto_tree_add_item(branch, hf_gvcp_machigh, tvb, offset, 4, ENC_BIG_ENDIAN);
944 case GVCP_DEVICE_MAC_LOW_0:
945 case GVCP_DEVICE_MAC_LOW_1:
946 case GVCP_DEVICE_MAC_LOW_2:
947 case GVCP_DEVICE_MAC_LOW_3:
948 proto_tree_add_item(branch, hf_gvcp_maclow, tvb, offset, 4, ENC_BIG_ENDIAN);
951 case GVCP_SUPPORTED_IP_CONFIGURATION_0:
952 case GVCP_SUPPORTED_IP_CONFIGURATION_1:
953 case GVCP_SUPPORTED_IP_CONFIGURATION_2:
954 case GVCP_SUPPORTED_IP_CONFIGURATION_3:
955 proto_tree_add_item(branch, hf_gvcp_ip_config_can_handle_pause_frames_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
956 proto_tree_add_item(branch, hf_gvcp_ip_config_can_generate_pause_frames_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
957 proto_tree_add_item(branch, hf_gvcp_ip_config_lla, tvb, offset, 4, ENC_BIG_ENDIAN);
958 proto_tree_add_item(branch, hf_gvcp_ip_config_dhcp, tvb, offset, 4, ENC_BIG_ENDIAN);
959 proto_tree_add_item(branch, hf_gvcp_ip_config_persistent_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
962 case GVCP_CURIPCFG_0:
963 case GVCP_CURIPCFG_1:
964 case GVCP_CURIPCFG_2:
965 case GVCP_CURIPCFG_3:
966 proto_tree_add_item(branch, hf_gvcp_ip_config_can_handle_pause_frames_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
967 proto_tree_add_item(branch, hf_gvcp_ip_config_can_generate_pause_frames_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
968 proto_tree_add_item(branch, hf_gvcp_ip_config_lla, tvb, offset, 4, ENC_BIG_ENDIAN);
969 proto_tree_add_item(branch, hf_gvcp_ip_config_dhcp, tvb, offset, 4, ENC_BIG_ENDIAN);
970 proto_tree_add_item(branch, hf_gvcp_ip_config_persistent_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
973 case GVCP_CURRENT_IP_ADDRESS_0:
974 case GVCP_CURRENT_IP_ADDRESS_1:
975 case GVCP_CURRENT_IP_ADDRESS_2:
976 case GVCP_CURRENT_IP_ADDRESS_3:
977 proto_tree_add_item(branch, hf_gvcp_current_IP, tvb, offset, 4, ENC_BIG_ENDIAN);
980 case GVCP_CURRENT_SUBNET_MASK_0:
981 case GVCP_CURRENT_SUBNET_MASK_1:
982 case GVCP_CURRENT_SUBNET_MASK_2:
983 case GVCP_CURRENT_SUBNET_MASK_3:
984 proto_tree_add_item(branch, hf_gvcp_current_subnet_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
987 case GVCP_CURRENT_DEFAULT_GATEWAY_0:
988 case GVCP_CURRENT_DEFAULT_GATEWAY_1:
989 case GVCP_CURRENT_DEFAULT_GATEWAY_2:
990 case GVCP_CURRENT_DEFAULT_GATEWAY_3:
991 proto_tree_add_item(branch, hf_gvcp_current_default_gateway, tvb, offset, 4, ENC_BIG_ENDIAN);
994 case GVCP_MANUFACTURER_NAME:
995 proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */
998 case GVCP_MODEL_NAME:
999 proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */
1002 case GVCP_DEVICE_VERSION:
1003 proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */
1006 case GVCP_MANUFACTURER_INFO:
1007 proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */
1010 case GVCP_SERIAL_NUMBER:
1011 proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */
1014 case GVCP_USER_DEFINED_NAME:
1015 proto_tree_add_item(branch, hf_gvcp_user_defined_name, tvb, offset, 4, ENC_ASCII|ENC_NA); /*? */
1018 case GVCP_FIRST_URL:
1019 proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */
1022 case GVCP_SECOND_URL:
1023 proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */
1026 case GVCP_NUMBER_OF_NETWORK_INTERFACES:
1027 proto_tree_add_item(branch, hf_gvcp_number_interfaces, tvb, offset, 4, ENC_BIG_ENDIAN);
1030 case GVCP_PERSISTENT_IP_ADDRESS_0:
1031 case GVCP_PERSISTENT_IP_ADDRESS_1:
1032 case GVCP_PERSISTENT_IP_ADDRESS_2:
1033 case GVCP_PERSISTENT_IP_ADDRESS_3:
1034 proto_tree_add_item(branch, hf_gvcp_persistent_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
1037 case GVCP_PERSISTENT_SUBNET_MASK_0:
1038 case GVCP_PERSISTENT_SUBNET_MASK_1:
1039 case GVCP_PERSISTENT_SUBNET_MASK_2:
1040 case GVCP_PERSISTENT_SUBNET_MASK_3:
1041 proto_tree_add_item(branch, hf_gvcp_persistent_subnet, tvb, offset, 4, ENC_BIG_ENDIAN);
1044 case GVCP_PERSISTENT_DEFAULT_GATEWAY_0:
1045 case GVCP_PERSISTENT_DEFAULT_GATEWAY_1:
1046 case GVCP_PERSISTENT_DEFAULT_GATEWAY_2:
1047 case GVCP_PERSISTENT_DEFAULT_GATEWAY_3:
1048 proto_tree_add_item(branch, hf_gvcp_persistent_gateway, tvb, offset, 4, ENC_BIG_ENDIAN);
1051 case GVCP_LINK_SPEED_0:
1052 case GVCP_LINK_SPEED_1:
1053 case GVCP_LINK_SPEED_2:
1054 case GVCP_LINK_SPEED_3:
1055 proto_tree_add_item(branch, hf_gvcp_link_speed, tvb, offset, 4, ENC_BIG_ENDIAN);
1058 case GVCP_NUMBER_OF_MESSAGE_CHANNELS:
1059 proto_tree_add_item(branch, hf_gvcp_number_message_channels, tvb, offset, 4, ENC_BIG_ENDIAN);
1062 case GVCP_NUMBER_OF_STREAM_CHANNELS:
1063 proto_tree_add_item(branch, hf_gvcp_number_stream_channels, tvb, offset, 4, ENC_BIG_ENDIAN);
1066 case GVCP_NUMBER_OF_ACTION_SIGNALS:
1067 proto_tree_add_item(branch, hf_gvcp_number_action_signals, tvb, offset, 4, ENC_BIG_ENDIAN);
1070 case GVCP_ACTION_DEVICE_KEY:
1071 proto_tree_add_item(branch, hf_gvcp_writeregcmd_data, tvb, offset, 4, ENC_BIG_ENDIAN); /*? */
1074 case GVCP_NUMBER_OF_ACTIVE_LINKS:
1075 proto_tree_add_item(branch, hf_gvcp_number_of_active_links_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1079 proto_tree_add_item(branch, hf_gvcp_sccaps_scspx_register_supported, tvb, offset, 4, ENC_BIG_ENDIAN);
1080 proto_tree_add_item(branch, hf_gvcp_sccaps_legacy_16bit_blockid_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1081 proto_tree_add_item(branch, hf_gvcp_sccaps_scmbsx_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1082 proto_tree_add_item(branch, hf_gvcp_sccaps_scebax_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1085 case GVCP_MESSAGE_CHANNEL_CAPS:
1086 proto_tree_add_item(branch, hf_gvcp_mcsp_supported, tvb, offset, 4, ENC_BIG_ENDIAN);
1087 proto_tree_add_item(branch, hf_gvcp_mcc_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1088 proto_tree_add_item(branch, hf_gvcp_mcec_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1091 case GVCP_CAPABILITY:
1092 proto_tree_add_item(branch, hf_gvcp_capability_user_defined, tvb, offset, 4, ENC_BIG_ENDIAN);
1093 proto_tree_add_item(branch, hf_gvcp_capability_serial_number, tvb, offset, 4, ENC_BIG_ENDIAN);
1094 proto_tree_add_item(branch, hf_gvcp_capability_heartbeat_disable, tvb, offset, 4, ENC_BIG_ENDIAN);
1095 proto_tree_add_item(branch, hf_gvcp_capability_link_speed, tvb, offset, 4, ENC_BIG_ENDIAN);
1096 proto_tree_add_item(branch, hf_gvcp_capability_ccp_application_portip, tvb, offset, 4, ENC_BIG_ENDIAN);
1097 proto_tree_add_item(branch, hf_gvcp_capability_manifest_table, tvb, offset, 4, ENC_BIG_ENDIAN);
1098 proto_tree_add_item(branch, hf_gvcp_capability_test_data, tvb, offset, 4, ENC_BIG_ENDIAN);
1099 proto_tree_add_item(branch, hf_gvcp_capability_discovery_ACK_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
1100 proto_tree_add_item(branch, hf_gvcp_capability_writable_discovery_ACK_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
1101 proto_tree_add_item(branch, hf_gvcp_capability_extended_status_code_v1_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1102 proto_tree_add_item(branch, hf_gvcp_capability_primary_application_switchover, tvb, offset, 4, ENC_BIG_ENDIAN);
1103 proto_tree_add_item(branch, hf_gvcp_capability_unconditional_action_command, tvb, offset, 4, ENC_BIG_ENDIAN);
1104 proto_tree_add_item(branch, hf_gvcp_capability_1588_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1105 proto_tree_add_item(branch, hf_gvcp_capability_extended_status_code_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1106 proto_tree_add_item(branch, hf_gvcp_capability_scheduled_action_command_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1107 proto_tree_add_item(branch, hf_gvcp_capability_ieee1588_extended_capabilities_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1108 proto_tree_add_item(branch, hf_gvcp_capability_action_command, tvb, offset, 4, ENC_BIG_ENDIAN);
1109 proto_tree_add_item(branch, hf_gvcp_capability_pending, tvb, offset, 4, ENC_BIG_ENDIAN);
1110 proto_tree_add_item(branch, hf_gvcp_capability_evendata, tvb, offset, 4, ENC_BIG_ENDIAN);
1111 proto_tree_add_item(branch, hf_gvcp_capability_event, tvb, offset, 4, ENC_BIG_ENDIAN);
1112 proto_tree_add_item(branch, hf_gvcp_capability_packetresend, tvb, offset, 4, ENC_BIG_ENDIAN);
1113 proto_tree_add_item(branch, hf_gvcp_capability_writemem, tvb, offset, 4, ENC_BIG_ENDIAN);
1114 proto_tree_add_item(branch, hf_gvcp_capability_concatenation, tvb, offset, 4, ENC_BIG_ENDIAN);
1117 case GVCP_HEARTBEAT_TIMEOUT:
1118 proto_tree_add_item(branch, hf_gvcp_heartbeat, tvb, offset, 4, ENC_BIG_ENDIAN);
1121 case GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH:
1122 proto_tree_add_item(branch, hf_gvcp_high_timestamp_frequency, tvb, offset, 4, ENC_BIG_ENDIAN);
1125 case GVCP_TIMESTAMP_TICK_FREQUENCY_LOW:
1126 proto_tree_add_item(branch, hf_gvcp_low_timestamp_frequency, tvb, offset, 4, ENC_BIG_ENDIAN);
1129 case GVCP_TIMESTAMP_CONTROL:
1130 proto_tree_add_item(branch, hf_gvcp_timestamp_control_latch, tvb, offset, 4, ENC_BIG_ENDIAN);
1131 proto_tree_add_item(branch, hf_gvcp_timestamp_control_reset, tvb, offset, 4, ENC_BIG_ENDIAN);
1134 case GVCP_TIMESTAMP_VALUE_HIGH:
1135 proto_tree_add_item(branch, hf_gvcp_high_timestamp_value, tvb, offset, 4, ENC_BIG_ENDIAN);
1138 case GVCP_TIMESTAMP_VALUE_LOW:
1139 proto_tree_add_item(branch, hf_gvcp_low_timestamp_value, tvb, offset, 4, ENC_BIG_ENDIAN);
1142 case GVCP_DISCOVERY_ACK_DELAY:
1143 proto_tree_add_item(branch, hf_gvcp_discovery_ACK_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
1146 case GVCP_CONFIGURATION:
1147 proto_tree_add_item(branch, hf_gvcp_configuration_1588_enable_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1148 proto_tree_add_item(branch, hf_gvcp_configuration_extended_status_codes_enable_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1149 proto_tree_add_item(branch, hf_gvcp_configuration_unconditional_action_command_enable_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1150 proto_tree_add_item(branch, hf_gvcp_configuration_extended_status_codes_enable_v1_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1151 proto_tree_add_item(branch, hf_gvcp_configuration_pending_ack_enable, tvb, offset, 4, ENC_BIG_ENDIAN);
1152 proto_tree_add_item(branch, hf_gvcp_configuration_heartbeat_disable, tvb, offset, 4, ENC_BIG_ENDIAN);
1155 case GVCP_PENDING_TIMEOUT:
1156 proto_tree_add_item(branch, hf_gvcp_pending_timeout_max_execution, tvb, offset, 4, ENC_BIG_ENDIAN);
1159 case GVCP_CONTROL_SWITCHOVER_KEY:
1160 proto_tree_add_item(branch, hf_gvcp_control_switchover_key_register, tvb, offset, 4, ENC_BIG_ENDIAN);
1163 case GVCP_GVSCP_CONFIGURATION:
1164 proto_tree_add_item(branch, hf_gvcp_gvsp_configuration_64bit_blockid_enable_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1167 case GVCP_PHYSICAL_LINK_CAPABILITY:
1168 proto_tree_add_item(branch, hf_gvcp_link_dlag_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1169 proto_tree_add_item(branch, hf_gvcp_link_slag_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1170 proto_tree_add_item(branch, hf_gvcp_link_ml_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1171 proto_tree_add_item(branch, hf_gvcp_link_sl_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1174 case GVCP_PHYSICAL_LINK_CONFIGURATION:
1175 proto_tree_add_item(branch, hf_gvcp_link_dlag_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1176 proto_tree_add_item(branch, hf_gvcp_link_slag_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1177 proto_tree_add_item(branch, hf_gvcp_link_ml_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1178 proto_tree_add_item(branch, hf_gvcp_link_sl_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1181 case GVCP_IEEE_1588_STATUS:
1182 proto_tree_add_item(branch, hf_gvcp_ieee1588_clock_status_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1185 case GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE:
1186 proto_tree_add_item(branch, hf_gvcp_scheduled_action_command_queue_size_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1189 case GVCP_IEEE_1588_EXTENDED_CAPABILITY:
1190 proto_tree_add_item(branch, hf_gvcp_ieee1588_profile_registers_present_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1193 case GVCP_IEEE_1588_SUPPORTED_PROFILES:
1194 proto_tree_add_item(branch, hf_gvcp_ieee1588_ptp_profile_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1195 proto_tree_add_item(branch, hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1198 case GVCP_IEEE_1588_SELECTED_PROFILE:
1199 proto_tree_add_item(branch, hf_gvcp_selected_ieee1588_profile_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1203 proto_tree_add_item(branch, hf_gvcp_control_switchover_key, tvb, offset, 4, ENC_BIG_ENDIAN);
1204 proto_tree_add_item(branch, hf_gvcp_control_switchover_en, tvb, offset, 4, ENC_BIG_ENDIAN);
1205 proto_tree_add_item(branch, hf_gvcp_control_access, tvb, offset, 4, ENC_BIG_ENDIAN);
1206 proto_tree_add_item(branch, hf_gvcp_exclusive_access, tvb, offset, 4, ENC_BIG_ENDIAN);
1209 case GVCP_PRIMARY_APPLICATION_PORT:
1210 proto_tree_add_item(branch, hf_gvcp_primary_application_host_port, tvb, offset, 4, ENC_BIG_ENDIAN);
1213 case GVCP_PRIMARY_APPLICATION_IP_ADDRESS:
1214 proto_tree_add_item(branch, hf_gvcp_primary_application_ip_address, tvb, offset, 4, ENC_BIG_ENDIAN);
1217 case GVCP_MC_DESTINATION_PORT:
1218 proto_tree_add_item(branch, hf_gvcp_network_interface_index, tvb, offset, 4, ENC_BIG_ENDIAN);
1219 proto_tree_add_item(branch, hf_gvcp_host_port, tvb, offset, 4, ENC_BIG_ENDIAN);
1222 case GVCP_MC_DESTINATION_ADDRESS:
1223 proto_tree_add_item(branch, hf_gvcp_channel_destination_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
1226 case GVCP_MC_TIMEOUT:
1227 proto_tree_add_item(branch, hf_gvcp_message_channel_transmission_timeout, tvb, offset, 4, ENC_BIG_ENDIAN);
1230 case GVCP_MC_RETRY_COUNT:
1231 proto_tree_add_item(branch, hf_gvcp_message_channel_retry_count, tvb, offset, 4, ENC_BIG_ENDIAN);
1234 case GVCP_MC_SOURCE_PORT:
1235 proto_tree_add_item(branch, hf_gvcp_message_channel_source_port, tvb, offset, 4, ENC_BIG_ENDIAN);
1238 case GVCP_MC_CONFIGURATION:
1239 proto_tree_add_item(branch, hf_gvcp_mcec_enabled_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1242 case GVCP_SC_DESTINATION_PORT(0):
1243 case GVCP_SC_DESTINATION_PORT(1):
1244 case GVCP_SC_DESTINATION_PORT(2):
1245 case GVCP_SC_DESTINATION_PORT(3):
1246 proto_tree_add_item(branch, hf_gvcp_sc_direction, tvb, offset, 4, ENC_BIG_ENDIAN);
1247 proto_tree_add_item(branch, hf_gvcp_sc_ni_index, tvb, offset, 4, ENC_BIG_ENDIAN);
1248 proto_tree_add_item(branch, hf_gvcp_sc_host_port, tvb, offset, 4, ENC_BIG_ENDIAN);
1251 case GVCP_SC_PACKET_SIZE(0):
1252 case GVCP_SC_PACKET_SIZE(1):
1253 case GVCP_SC_PACKET_SIZE(2):
1254 case GVCP_SC_PACKET_SIZE(3):
1255 proto_tree_add_item(branch, hf_gvcp_sc_fire_test_packet, tvb, offset, 4, ENC_BIG_ENDIAN);
1256 proto_tree_add_item(branch, hf_gvcp_sc_do_not_fragment, tvb, offset, 4, ENC_BIG_ENDIAN);
1257 proto_tree_add_item(branch, hf_gvcp_sc_pixel_endianness, tvb, offset, 4, ENC_BIG_ENDIAN);
1258 proto_tree_add_item(branch, hf_gvcp_sc_packet_size, tvb, offset, 4, ENC_BIG_ENDIAN);
1261 case GVCP_SC_PACKET_DELAY(0):
1262 case GVCP_SC_PACKET_DELAY(1):
1263 case GVCP_SC_PACKET_DELAY(2):
1264 case GVCP_SC_PACKET_DELAY(3):
1265 proto_tree_add_item(branch, hf_gvcp_sc_packet_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
1268 case GVCP_SC_DESTINATION_ADDRESS(0):
1269 case GVCP_SC_DESTINATION_ADDRESS(1):
1270 case GVCP_SC_DESTINATION_ADDRESS(2):
1271 case GVCP_SC_DESTINATION_ADDRESS(3):
1274 value = tvb_get_letohl(tvb, offset);
1275 proto_tree_add_ipv4(branch, hf_gvcp_sc_destination_ip, tvb, offset, 4, value);
1279 case GVCP_SC_SOURCE_PORT(0):
1280 case GVCP_SC_SOURCE_PORT(1):
1281 case GVCP_SC_SOURCE_PORT(2):
1282 case GVCP_SC_SOURCE_PORT(3):
1283 proto_tree_add_item(branch, hf_gvcp_sc_source_port, tvb, offset, 4, ENC_BIG_ENDIAN);
1286 case GVCP_SC_CAPABILITY(0):
1287 case GVCP_SC_CAPABILITY(1):
1288 case GVCP_SC_CAPABILITY(2):
1289 case GVCP_SC_CAPABILITY(3):
1290 proto_tree_add_item(branch, hf_gvcp_sc_big_little_endian_supported, tvb, offset, 4, ENC_BIG_ENDIAN);
1291 proto_tree_add_item(branch, hf_gvcp_sc_ip_reassembly_supported, tvb, offset, 4, ENC_BIG_ENDIAN);
1292 proto_tree_add_item(branch, hf_gvcp_sc_scmpcx_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1293 proto_tree_add_item(branch, hf_gvcp_sc_gendc_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1294 proto_tree_add_item(branch, hf_gvcp_sc_multi_part_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1295 proto_tree_add_item(branch, hf_gvcp_sc_large_leader_trailer_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1296 proto_tree_add_item(branch, hf_gvcp_sc_multizone_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1297 proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_destination_option_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1298 proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_all_in_transmission_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1299 proto_tree_add_item(branch, hf_gvcp_sc_unconditional_streaming_supported, tvb, offset, 4, ENC_BIG_ENDIAN);
1300 proto_tree_add_item(branch, hf_gvcp_sc_extended_chunk_data_supported, tvb, offset, 4, ENC_BIG_ENDIAN);
1303 case GVCP_SC_CONFIGURATION(0):
1304 case GVCP_SC_CONFIGURATION(1):
1305 case GVCP_SC_CONFIGURATION(2):
1306 case GVCP_SC_CONFIGURATION(3):
1307 proto_tree_add_item(branch, hf_gvcp_sc_gendc_enabled_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1308 proto_tree_add_item(branch, hf_gvcp_sc_multi_part_enabled_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1309 proto_tree_add_item(branch, hf_gvcp_sc_large_leader_trailer_enabled_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
1310 proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_destination_option_enabled_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1311 proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_all_in_transmission_enabled_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1312 proto_tree_add_item(branch, hf_gvcp_sc_unconditional_streaming_enabled, tvb, offset, 4, ENC_BIG_ENDIAN);
1313 proto_tree_add_item(branch, hf_gvcp_sc_extended_chunk_data_enabled, tvb, offset, 4, ENC_BIG_ENDIAN);
1316 case GVCP_SC_ZONE(0):
1317 case GVCP_SC_ZONE(1):
1318 case GVCP_SC_ZONE(2):
1319 case GVCP_SC_ZONE(3):
1320 proto_tree_add_item(branch, hf_gvcp_sc_additional_zones_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1323 case GVCP_SC_ZONE_DIRECTION(0):
1324 case GVCP_SC_ZONE_DIRECTION(1):
1325 case GVCP_SC_ZONE_DIRECTION(2):
1326 case GVCP_SC_ZONE_DIRECTION(3):
1327 proto_tree_add_item(branch, hf_gvcp_sc_zone0_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1328 proto_tree_add_item(branch, hf_gvcp_sc_zone1_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1329 proto_tree_add_item(branch, hf_gvcp_sc_zone2_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1330 proto_tree_add_item(branch, hf_gvcp_sc_zone3_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1331 proto_tree_add_item(branch, hf_gvcp_sc_zone4_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1332 proto_tree_add_item(branch, hf_gvcp_sc_zone5_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1333 proto_tree_add_item(branch, hf_gvcp_sc_zone6_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1334 proto_tree_add_item(branch, hf_gvcp_sc_zone7_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1335 proto_tree_add_item(branch, hf_gvcp_sc_zone8_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1336 proto_tree_add_item(branch, hf_gvcp_sc_zone9_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1337 proto_tree_add_item(branch, hf_gvcp_sc_zone10_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1338 proto_tree_add_item(branch, hf_gvcp_sc_zone11_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1339 proto_tree_add_item(branch, hf_gvcp_sc_zone12_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1340 proto_tree_add_item(branch, hf_gvcp_sc_zone13_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1341 proto_tree_add_item(branch, hf_gvcp_sc_zone14_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1342 proto_tree_add_item(branch, hf_gvcp_sc_zone15_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1343 proto_tree_add_item(branch, hf_gvcp_sc_zone16_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1344 proto_tree_add_item(branch, hf_gvcp_sc_zone17_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1345 proto_tree_add_item(branch, hf_gvcp_sc_zone18_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1346 proto_tree_add_item(branch, hf_gvcp_sc_zone19_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1347 proto_tree_add_item(branch, hf_gvcp_sc_zone20_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1348 proto_tree_add_item(branch, hf_gvcp_sc_zone21_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1349 proto_tree_add_item(branch, hf_gvcp_sc_zone22_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1350 proto_tree_add_item(branch, hf_gvcp_sc_zone23_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1351 proto_tree_add_item(branch, hf_gvcp_sc_zone24_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1352 proto_tree_add_item(branch, hf_gvcp_sc_zone25_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1353 proto_tree_add_item(branch, hf_gvcp_sc_zone26_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1354 proto_tree_add_item(branch, hf_gvcp_sc_zone27_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1355 proto_tree_add_item(branch, hf_gvcp_sc_zone28_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1356 proto_tree_add_item(branch, hf_gvcp_sc_zone29_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1357 proto_tree_add_item(branch, hf_gvcp_sc_zone30_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1358 proto_tree_add_item(branch, hf_gvcp_sc_zone31_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
1361 case GVCP_SC_MAX_PACKET_COUNT(0):
1362 case GVCP_SC_MAX_PACKET_COUNT(1):
1363 case GVCP_SC_MAX_PACKET_COUNT(2):
1364 case GVCP_SC_MAX_PACKET_COUNT(3):
1365 proto_tree_add_item(branch, hf_gvcp_sc_max_packet_count_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1368 case GVCP_SC_MAX_BLOCK_SIZE_HIGH(0):
1369 case GVCP_SC_MAX_BLOCK_SIZE_HIGH(1):
1370 case GVCP_SC_MAX_BLOCK_SIZE_HIGH(2):
1371 case GVCP_SC_MAX_BLOCK_SIZE_HIGH(3):
1372 proto_tree_add_item(branch, hf_gvcp_sc_max_block_size_high_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1375 case GVCP_SC_MAX_BLOCK_SIZE_LOW(0):
1376 case GVCP_SC_MAX_BLOCK_SIZE_LOW(1):
1377 case GVCP_SC_MAX_BLOCK_SIZE_LOW(2):
1378 case GVCP_SC_MAX_BLOCK_SIZE_LOW(3):
1379 proto_tree_add_item(branch, hf_gvcp_sc_max_block_size_low_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1382 case GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(0):
1383 case GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(1):
1384 case GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(2):
1385 case GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(3):
1386 proto_tree_add_item(branch, hf_gvcp_sc_extended_registers_address_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1390 case GVCP_MANIFEST_TABLE:
1391 proto_tree_add_item(branch, hf_gvcp_manifest_table, tvb, 0, length, ENC_NA);
1394 case GVCP_ACTION_GROUP_KEY(0):
1395 case GVCP_ACTION_GROUP_KEY(1):
1396 case GVCP_ACTION_GROUP_KEY(2):
1397 case GVCP_ACTION_GROUP_KEY(3):
1398 case GVCP_ACTION_GROUP_KEY(4):
1399 case GVCP_ACTION_GROUP_KEY(5):
1400 case GVCP_ACTION_GROUP_KEY(6):
1401 case GVCP_ACTION_GROUP_KEY(7):
1402 case GVCP_ACTION_GROUP_KEY(8):
1403 case GVCP_ACTION_GROUP_KEY(9):
1404 proto_tree_add_item(branch, hf_gvcp_action_group_key, tvb, offset, 4, ENC_BIG_ENDIAN);
1407 case GVCP_ACTION_GROUP_MASK(0):
1408 case GVCP_ACTION_GROUP_MASK(1):
1409 case GVCP_ACTION_GROUP_MASK(2):
1410 case GVCP_ACTION_GROUP_MASK(3):
1411 case GVCP_ACTION_GROUP_MASK(4):
1412 case GVCP_ACTION_GROUP_MASK(5):
1413 case GVCP_ACTION_GROUP_MASK(6):
1414 case GVCP_ACTION_GROUP_MASK(7):
1415 case GVCP_ACTION_GROUP_MASK(8):
1416 case GVCP_ACTION_GROUP_MASK(9):
1417 proto_tree_add_item(branch, hf_gvcp_action_group_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
1428 \brief Attempts to dissect an extended bootstrap register
1431 static int dissect_extended_bootstrap_register(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gint offset, gint length _U_)
1435 case GVCP_SC_GENDC_DESCRIPTOR_ADDRESS:
1436 proto_tree_add_item(branch, hf_gvcp_sc_gendc_descriptor_address_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1438 case GVCP_SC_GENDC_DESCRIPTOR_SIZE:
1439 proto_tree_add_item(branch, hf_gvcp_sc_gendc_descriptor_size_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1441 case GVCP_SC_GENDC_FLOW_MAPPING_TABLE_ADDRESS:
1442 proto_tree_add_item(branch, hf_gvcp_sc_gendc_flow_mapping_table_address_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1444 case GVCP_SC_GENDC_FLOW_MAPPING_TABLE_SIZE:
1445 proto_tree_add_item(branch, hf_gvcp_sc_gendc_flow_mapping_table_size_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN);
1456 /* Attempts to dissect a bootstrap register (readmem context) */
1457 static int dissect_register_data(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gint offset, gint length)
1461 case GVCP_MANUFACTURER_NAME:
1464 proto_tree_add_item(branch, hf_gvcp_manufacturer_name, tvb, offset, -1, ENC_ASCII|ENC_NA);
1468 case GVCP_MODEL_NAME:
1471 proto_tree_add_item(branch, hf_gvcp_model_name, tvb, offset, -1, ENC_ASCII|ENC_NA);
1475 case GVCP_DEVICE_VERSION:
1478 proto_tree_add_item(branch, hf_gvcp_device_version, tvb, offset, -1, ENC_ASCII|ENC_NA);
1482 case GVCP_MANUFACTURER_INFO:
1485 proto_tree_add_item(branch, hf_gvcp_manufacturer_specific_info, tvb, offset, -1, ENC_ASCII|ENC_NA);
1489 case GVCP_SERIAL_NUMBER:
1492 proto_tree_add_item(branch, hf_gvcp_serial_number, tvb, offset, -1, ENC_ASCII|ENC_NA);
1496 case GVCP_USER_DEFINED_NAME:
1499 proto_tree_add_item(branch, hf_gvcp_user_defined_name, tvb, offset, -1, ENC_ASCII|ENC_NA);
1503 case GVCP_FIRST_URL:
1506 proto_tree_add_item(branch, hf_gvcp_first_xml_device_description_file, tvb, offset, -1, ENC_ASCII|ENC_NA);
1510 case GVCP_SECOND_URL:
1513 proto_tree_add_item(branch, hf_gvcp_second_xml_device_description_file, tvb, offset, -1, ENC_ASCII|ENC_NA);
1526 \brief DISSECT: Force IP command
1529 static void dissect_forceip_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint startoffset, gint length)
1531 const gint mac_offset = startoffset + 2;
1532 const gint ip_offset = startoffset + 20;
1533 const gint mask_offset = startoffset + 36;
1534 const gint gateway_offset = startoffset + 52;
1536 if (gvcp_telegram_tree != NULL)
1538 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length,
1539 ett_gvcp_payload_cmd, NULL, "FORCEIP_CMD Options");
1541 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_forceip_mac_address, tvb, mac_offset, 6, ENC_NA);
1542 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_forceip_static_IP, tvb, ip_offset, 4, ENC_BIG_ENDIAN);
1543 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_forceip_static_subnet_mask, tvb, mask_offset, 4, ENC_BIG_ENDIAN);
1544 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_forceip_static_default_gateway, tvb, gateway_offset, 4, ENC_BIG_ENDIAN);
1550 \brief DISSECT: Packet resend command
1553 static void dissect_packetresend_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length, int extendedblockid)
1556 guint64 block_id = 0;
1557 guint32 first_packet = 0;
1558 guint32 last_packet = 0;
1559 gint offset = startoffset;
1561 /* Get block ID to generate summary - supports 16 and 64 bits */
1562 if (extendedblockid == 0)
1564 block_id = tvb_get_ntohs(tvb, offset + 2);
1570 highid = tvb_get_ntohl(tvb, offset + 12);
1571 lowid = tvb_get_ntohl(tvb, offset + 16);
1573 block_id = lowid | (highid << 32);
1576 /* Get first and last packet IDs for summary - supports 24 and 32 bits */
1577 if (extendedblockid == 0)
1579 /* in GEV1.2 and prior we use only 24 bit packet IDs */
1580 first_packet = tvb_get_ntohl(tvb, offset + 4) & 0x00FFFFFF;
1581 last_packet = tvb_get_ntohl(tvb, offset + 8) & 0x00FFFFFF;
1585 first_packet = tvb_get_ntohl(tvb, offset + 4);
1586 last_packet = tvb_get_ntohl(tvb, offset + 8);
1589 col_append_fstr(pinfo->cinfo, COL_INFO, "Block %" G_GINT64_MODIFIER "u, Packets %d->%d", (gint64)block_id, first_packet, last_packet);
1591 if (gvcp_telegram_tree != NULL)
1593 /* Command header/tree */
1594 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length,
1595 ett_gvcp_payload_cmd, NULL, "PACKETRESEND_CMD Values");
1597 /* Stream channel */
1598 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_stream_channel_index, tvb, offset, 2, ENC_BIG_ENDIAN);
1600 /* First, last packet IDs - supports 24 and 32 bits */
1601 if (extendedblockid == 0)
1603 /* Block ID (16 bits) only if extended block ID disabled */
1604 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_block_id, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
1605 /* in GEV1.2 and prior we use only 24 bit packet IDs */
1606 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_first_packet_id, tvb, offset + 5, 3, ENC_BIG_ENDIAN);
1607 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_last_packet_id, tvb, offset + 9, 3, ENC_BIG_ENDIAN);
1611 /* Extended block ID (64 bits) only if enabled (from GVCP header flags) */
1612 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_extended_block_id_v2_0, tvb, offset + 12, 8, ENC_BIG_ENDIAN);
1613 /* Extended packed ID (32 bits) only if enabled */
1614 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_extended_first_packet_id_v2_0, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
1615 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_extended_last_packet_id_v2_0, tvb, offset + 8, 4, ENC_BIG_ENDIAN);
1622 \brief DISSECT: Read register command
1625 static void dissect_readreg_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t* gvcp_trans)
1627 proto_item *item = NULL;
1629 const gchar* address_string = NULL;
1630 gboolean is_custom_register = FALSE;
1631 gint offset = startoffset;
1633 gint num_registers = length / 4;
1635 addr = tvb_get_ntohl(tvb, offset);
1636 address_string = get_register_name_from_address(addr, gvcp_info, &is_custom_register);
1638 if (num_registers > 1)
1640 col_append_fstr(pinfo->cinfo, COL_INFO, "[Multiple Register Read Command]");
1644 col_append_str(pinfo->cinfo, COL_INFO, address_string);
1647 if (!pinfo->fd->visited)
1649 gvcp_trans->addr_list = wmem_array_new(wmem_file_scope(), sizeof(guint32));
1652 /* Subtree Initialization for Payload Data: READREG_CMD */
1653 if (gvcp_telegram_tree != NULL)
1655 if (num_registers > 1)
1657 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length,
1658 ett_gvcp_payload_cmd, &item, "READREG_CMD Address List");
1662 for (i = 0; i < num_registers; i++)
1664 /* For block read register request, address gets re-initialized here in the for loop */
1665 addr = tvb_get_ntohl(tvb, offset);
1667 if (gvcp_trans && (!pinfo->fd->visited))
1669 wmem_array_append_one(gvcp_trans->addr_list, addr);
1672 if (gvcp_telegram_tree != NULL)
1674 if (try_val_to_str(addr, bootstrapregisternames) != NULL)
1676 /* Use known bootstrap register */
1677 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readregcmd_bootstrap_register, tvb, offset, 4, ENC_BIG_ENDIAN);
1681 guint32 extended_bootstrap_address_offset = 0;
1682 if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset))
1684 dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, 4);
1688 /* Insert data as generic register */
1689 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_register_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
1691 /* Use generic register name */
1692 proto_item_append_text(item, " [Unknown Register]");
1702 \brief DISSECT: Write register command
1705 static void dissect_writereg_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t* gvcp_trans)
1707 gint offset = startoffset;
1709 proto_item *item = NULL;
1712 const gchar *address_string = NULL;
1713 gboolean is_custom_register = FALSE;
1714 gint num_registers = length / 8; /* divide by 8 because we are counting register-value pairs */
1715 proto_tree *subtree = NULL;
1719 gvcp_trans->addr_count = num_registers;
1722 addr = tvb_get_ntohl(tvb, offset); /* first register address to be read from WRITEREG_CMD */
1723 value = tvb_get_ntohl(tvb, offset+4);
1724 address_string = get_register_name_from_address(addr, gvcp_info, &is_custom_register);
1726 /* Automatically learn stream port. Dissect as external GVSP. */
1727 if ((addr == GVCP_SC_DESTINATION_PORT(0)) ||
1728 (addr == GVCP_SC_DESTINATION_PORT(1)) ||
1729 (addr == GVCP_SC_DESTINATION_PORT(2)) ||
1730 (addr == GVCP_SC_DESTINATION_PORT(3)))
1732 /* For now we simply (always) add ports. Maybe we should remove when the dissector gets unloaded? */
1733 dissector_add_uint("udp.port", value, gvsp_handle);
1736 /* Automatically learn messaging channel port. Dissect as GVCP. */
1737 if (addr == GVCP_MC_DESTINATION_PORT)
1739 /* XXX For now we simply (always) add ports. Maybe we should remove when the dissector gets unloaded? */
1740 dissector_add_uint("udp.port", value, gvcp_handle);
1743 if (num_registers > 1)
1745 col_append_fstr(pinfo->cinfo, COL_INFO, "[Multiple Register Write Command]");
1749 col_append_fstr(pinfo->cinfo, COL_INFO, "%s Value=0x%08X", address_string, value);
1752 if (gvcp_telegram_tree != NULL)
1754 if (num_registers > 1)
1756 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length,
1757 ett_gvcp_payload_cmd, &item, "WRITEREG_CMD Address List");
1760 for (i = 0; i < num_registers; i++)
1762 /* For block write register request, address gets re-initialized here in the for loop */
1763 addr = tvb_get_ntohl(tvb, offset);
1765 if (try_val_to_str(addr, bootstrapregisternames) != NULL)
1767 /* Read the WRITEREG_CMD requested register address */
1768 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writeregcmd_bootstrap_register, tvb, offset, 4, ENC_BIG_ENDIAN);
1769 subtree = proto_item_add_subtree(item, ett_gvcp_payload_cmd_subtree);
1771 /* Skip 32bit to dissect the value to be written to the specified address */
1774 /* Read the value to be written to the specified register address */
1775 dissect_register(addr, subtree, tvb, offset, 4);
1779 guint32 extended_bootstrap_address_offset = 0;
1780 if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset))
1782 /* Read the WRITEREG_CMD requested register address */
1783 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writeregcmd_extended_bootstrap_register, tvb, offset, 4, ENC_BIG_ENDIAN);
1784 subtree = proto_item_add_subtree(item, ett_gvcp_payload_cmd_subtree);
1786 /* Skip 32bit to dissect the value to be written to the specified address */
1789 /* Read the value to be written to the specified register address */
1790 dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, subtree, tvb, offset, 4);
1794 proto_tree* temp_tree = NULL;
1796 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_register_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
1799 temp_tree = proto_item_add_subtree(item, ett_gvcp_payload_cmd_subtree);
1800 proto_tree_add_item(temp_tree, hf_gvcp_custom_register_value, tvb, offset, 4, ENC_BIG_ENDIAN);
1810 \brief DISSECT: Read memory command
1813 static void dissect_readmem_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gvcp_conv_info_t *gvcp_info)
1817 gint offset = startoffset;
1819 addr = tvb_get_ntohl(tvb, offset);
1820 count = tvb_get_ntohs(tvb, offset + 6); /* Number of bytes to read from memory */
1822 col_append_fstr(pinfo->cinfo, COL_INFO, " (0x%08X (%d) bytes)", addr, count);
1824 if (gvcp_telegram_tree != NULL)
1826 proto_item *item = NULL;
1828 if (try_val_to_str(addr, bootstrapregisternames) != NULL)
1830 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readmemcmd_bootstrap_register, tvb, offset, 4, ENC_BIG_ENDIAN);
1834 guint32 extended_bootstrap_address_offset = 0;
1835 if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset))
1837 dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, 4);
1841 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_memory_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
1842 proto_item_append_text(item, " [Unknown Register]");
1845 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readmemcmd_count, tvb, (offset + 6), 2, ENC_BIG_ENDIAN);
1851 \brief DISSECT: Write memory command
1854 static void dissect_writemem_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t* gvcp_trans)
1856 const gchar* address_string = NULL;
1857 gboolean is_custom_register = FALSE;
1860 addr = tvb_get_ntohl(tvb, startoffset);
1861 address_string = get_register_name_from_address(addr, gvcp_info, &is_custom_register);
1863 /* fill in Info column in Wireshark GUI */
1864 col_append_fstr(pinfo->cinfo, COL_INFO, "%s: %d bytes", address_string, (length - 4));
1866 if (gvcp_trans && (!pinfo->fd->visited))
1868 gvcp_trans->addr_list = wmem_array_new(wmem_file_scope(), sizeof(guint32));
1869 wmem_array_append_one(gvcp_trans->addr_list, addr);
1872 if (gvcp_telegram_tree != NULL)
1876 offset = startoffset + 4;
1877 byte_count = (length - 4);
1879 if (gvcp_trans && (gvcp_trans->rep_frame))
1881 proto_item *item = NULL;
1882 item = proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_response_in, tvb, 0, 0, gvcp_trans->rep_frame);
1883 proto_item_set_generated(item);
1886 if (try_val_to_str(addr, bootstrapregisternames) != NULL)
1888 dissect_register_data(addr, gvcp_telegram_tree, tvb, offset, byte_count);
1892 guint32 extended_bootstrap_address_offset = 0;
1893 if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset))
1895 dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, byte_count);
1899 /* Generic, unknown value */
1900 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writememcmd_data, tvb, offset, byte_count, ENC_NA);
1908 \brief DISSECT: Event command
1911 static void dissect_event_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length, gint extendedblockids)
1915 offset = startoffset;
1918 eventid = tvb_get_ntohs(tvb, offset + 2);
1920 /* fill in Info column in Wireshark GUI */
1921 col_append_fstr(pinfo->cinfo, COL_INFO, "[ID: 0x%04X]", eventid);
1923 if (gvcp_telegram_tree != NULL)
1926 gint event_count = 0;
1928 /* Compute event count based on data length */
1929 if (extendedblockids == 0)
1931 /* No enhanced block id */
1932 event_count = length / 16;
1936 /* Enhanced block id adds */
1937 event_count = length / 24;
1940 if (event_count > 1)
1942 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, offset, length,
1943 ett_gvcp_payload_cmd, NULL, "EVENT_CMD Event List");
1947 for (i = 0; i < event_count; i++)
1952 eventid = tvb_get_ntohs(tvb, offset);
1954 /* Use range to determine type of event */
1955 if ((eventid >= 0x0000) && (eventid <= 0x8000))
1958 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1960 else if ((eventid >= 0x8001) && (eventid <= 0x8FFF))
1963 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_error_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1965 else if ((eventid >= 0x9000) && (eventid <= 0xFFFF))
1967 /* Device specific */
1968 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_device_specific_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1972 /* Stream channel (possibly) associated with event */
1973 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_stream_channel_index, tvb, offset, 2, ENC_BIG_ENDIAN);
1976 if (extendedblockids == 0)
1978 /* Block id (16 bit) associated with event */
1979 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id, tvb, offset, 2, ENC_BIG_ENDIAN);
1985 /* Block id (64 bit) only if reported by gvcp flag */
1986 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id_64bit_v2_0, tvb, offset, 8, ENC_BIG_ENDIAN);
1990 /* Timestamp (64 bit) associated with event */
1991 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_timestamp, tvb, offset, 8, ENC_BIG_ENDIAN);
1999 \brief DISSECT: Event data command
2002 static void dissect_eventdata_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint extendedblockids)
2006 gint data_length = 0;
2007 offset = startoffset;
2009 while (tvb_captured_length_remaining(tvb, offset) > 12) /* At least enough bytes for and GEV 1.2 EVENTDATA_CMD with one byte of payload? */
2012 eventid = tvb_get_ntohs(tvb, offset + 2);
2014 /* fill in Info column in Wireshark GUI */
2015 col_append_fstr(pinfo->cinfo, COL_INFO, "[ID: 0x%04X]", eventid);
2017 if (gvcp_telegram_tree != NULL)
2019 /* If extended ID, then we have event_size here (2.1) */
2020 if (extendedblockids)
2022 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_extid_length, tvb, offset, 2, ENC_BIG_ENDIAN);
2023 data_length = tvb_get_ntohs(tvb, offset); // We get the data length here
2026 /* skip reserved field */
2029 /* Use range to determine type of event */
2030 if ((eventid >= 0x0000) && (eventid <= 0x8000))
2033 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2035 else if ((eventid >= 0x8001) && (eventid <= 0x8FFF))
2038 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_error_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2040 else if ((eventid >= 0x9000) && (eventid <= 0xFFFF))
2042 /* Device specific */
2043 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_device_specific_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2047 /* Stream channel (possibly) associated with event */
2048 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_stream_channel_index, tvb, offset, 2, ENC_BIG_ENDIAN);
2051 if (extendedblockids == 0)
2053 /* Block id (16 bit) associated with event */
2054 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2060 /* Block id (64 bit) only if reported by gvcp flag */
2061 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id_64bit_v2_0, tvb, offset, 8, ENC_BIG_ENDIAN);
2065 /* Timestamp (64 bit) associated with event */
2066 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_timestamp, tvb, offset, 8, ENC_BIG_ENDIAN);
2069 if (extendedblockids)
2071 if (data_length > 24)
2074 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_data, tvb, offset, data_length - 24, ENC_NA);
2075 offset += data_length - 24;
2081 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_data, tvb, offset, -1, ENC_NA);
2090 \brief DISSECT: Action command
2093 static void dissect_action_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint startoffset, gint scheduledactioncommand)
2095 if (gvcp_telegram_tree != NULL)
2098 offset = startoffset;
2101 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_actioncmd_device_key, tvb, offset, 4, ENC_BIG_ENDIAN);
2104 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_actioncmd_group_key, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
2107 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_actioncmd_group_mask, tvb, offset + 8, 4, ENC_BIG_ENDIAN);
2109 if (scheduledactioncommand != 0)
2111 /* 64 bits timestamp (optional) if gvcp header flag is set */
2112 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_actioncmd_time_v2_0, tvb, offset + 12, 8, ENC_BIG_ENDIAN);
2119 \brief DISSECT: Discovery acknowledge
2122 static void dissect_discovery_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length)
2124 proto_item *item = NULL;
2126 const guint8* string_manufacturer_name = NULL;
2127 const guint8* string_serial_number = NULL;
2128 gint string_length = 0;
2129 proto_tree *tree = NULL;
2131 offset = startoffset;
2132 string_manufacturer_name = tvb_get_const_stringz(tvb, 80, &string_length);
2133 string_serial_number = tvb_get_const_stringz(tvb, 224, &string_length);
2135 col_append_fstr(pinfo->cinfo, COL_INFO, "(%s, %s)",string_manufacturer_name, string_serial_number);
2137 if (gvcp_telegram_tree != NULL)
2139 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, offset, length,
2140 ett_gvcp_payload_cmd, NULL, "DISCOVERY_ACK Payload");
2143 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_spec_version, tvb, offset, 4, ENC_BIG_ENDIAN);
2144 tree = proto_item_add_subtree(item, ett_gvcp_bootstrap_fields);
2145 dissect_register(GVCP_VERSION, tree, tvb, offset, 4 );
2148 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_devicemodediscovery, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
2149 tree = proto_item_add_subtree(item, ett_gvcp_bootstrap_fields);
2150 dissect_register(GVCP_DEVICE_MODE, tree, tvb, offset + 4, 4 );
2153 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_device_mac_address, tvb, offset + 10, 6, ENC_NA);
2155 /* Supported IP configuration */
2156 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_supportedipconfig, tvb, offset + 16, 4, ENC_BIG_ENDIAN);
2157 tree = proto_item_add_subtree(item, ett_gvcp_bootstrap_fields);
2158 dissect_register(GVCP_SUPPORTED_IP_CONFIGURATION_0, tree, tvb, offset + 16, 4);
2160 /* Current IP configuration */
2161 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_currentipconfig, tvb, offset + 20, 4, ENC_BIG_ENDIAN);
2162 tree = proto_item_add_subtree(item, ett_gvcp_bootstrap_fields);
2163 dissect_register(GVCP_CURIPCFG_0, tree, tvb, offset + 20, 4);
2165 /* Current IP address */
2166 dissect_register(GVCP_CURRENT_IP_ADDRESS_0, gvcp_telegram_tree, tvb, offset + 36, 4);
2168 /* Current subnet mask */
2169 dissect_register(GVCP_CURRENT_SUBNET_MASK_0, gvcp_telegram_tree, tvb, offset + 52, 4);
2171 /* Current default gateway */
2172 dissect_register(GVCP_CURRENT_DEFAULT_GATEWAY_0, gvcp_telegram_tree, tvb, offset + 68, 4);
2174 /* Manufacturer name */
2175 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_manufacturer_name, tvb, offset + 72, -1, ENC_ASCII|ENC_NA);
2178 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_model_name, tvb, offset + 104, -1, ENC_ASCII|ENC_NA);
2180 /* Device version */
2181 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_device_version, tvb, offset + 136, -1, ENC_ASCII|ENC_NA);
2183 /* Manufacturer specific information */
2184 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_manufacturer_specific_info, tvb, offset + 168, -1, ENC_ASCII|ENC_NA);
2187 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_serial_number, tvb, offset + 216, -1, ENC_ASCII|ENC_NA);
2189 /* User defined name */
2190 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_user_defined_name, tvb, offset + 232, -1, ENC_ASCII|ENC_NA);
2195 \brief DISSECT: Read register acknowledge
2198 static void dissect_readreg_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t *gvcp_trans)
2201 gboolean is_custom_register = FALSE;
2202 const gchar* address_string = NULL;
2203 guint num_registers;
2205 gboolean valid_trans = FALSE;
2206 guint addr_list_size = 0;
2208 offset = startoffset;
2209 num_registers = length / 4;
2211 if (gvcp_trans && gvcp_trans->addr_list)
2214 addr_list_size = wmem_array_get_count(gvcp_trans->addr_list);
2217 if (num_registers > 1)
2219 col_append_fstr(pinfo->cinfo, COL_INFO, "[Multiple ReadReg Ack]");
2225 if (addr_list_size > 0)
2227 address_string = get_register_name_from_address(*((guint32*)wmem_array_index(gvcp_trans->addr_list, 0)), gvcp_info, &is_custom_register);
2232 col_append_fstr(pinfo->cinfo, COL_INFO, "%s Value=0x%08X", address_string, tvb_get_ntohl(tvb, offset));
2236 col_append_str(pinfo->cinfo, COL_INFO, address_string);
2241 if (gvcp_telegram_tree != NULL)
2243 /* Subtree initialization for Payload Data: READREG_ACK */
2244 if (num_registers > 1)
2246 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, offset, length,
2247 ett_gvcp_payload_ack, NULL, "Register Value List");
2250 for (i = 0; i < num_registers; i++)
2252 guint32 curr_register = 0;
2254 if (valid_trans && i < addr_list_size)
2256 gint stream_channel_count = 0;
2257 curr_register = *((guint32*)wmem_array_index(gvcp_trans->addr_list, i));
2258 address_string = get_register_name_from_address(curr_register, gvcp_info, &is_custom_register);
2259 for (; stream_channel_count < GVCP_MAX_STREAM_CHANNEL_COUNT; stream_channel_count++)
2261 if (curr_register == (guint32)GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(stream_channel_count))
2263 gvcp_info->extended_bootstrap_address[stream_channel_count] = tvb_get_ntohl(tvb, offset);
2268 if (!is_custom_register) /* bootstrap register */
2270 guint32 extended_bootstrap_address_offset = 0;
2271 if (is_extended_bootstrap_address(gvcp_info, curr_register, &extended_bootstrap_address_offset))
2273 proto_tree_add_uint_format_value(gvcp_telegram_tree, hf_gvcp_readregcmd_extended_bootstrap_register, tvb, offset, 4, curr_register, "%s (0x%08X)", address_string, curr_register);
2274 dissect_extended_bootstrap_register(curr_register - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, length);
2278 proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_readregcmd_bootstrap_register, tvb, 0, 4, curr_register);
2279 dissect_register(curr_register, gvcp_telegram_tree, tvb, offset, length);
2284 proto_tree_add_uint_format_value(gvcp_telegram_tree, hf_gvcp_custom_read_register_addr, tvb, offset, 4, curr_register, "%s (0x%08X)", address_string, curr_register);
2285 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_read_register_value, tvb, offset, 4, ENC_BIG_ENDIAN);
2290 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_register_value, tvb, offset, 4, ENC_BIG_ENDIAN);
2300 \brief DISSECT: Write register acknowledge
2303 static void dissect_writereg_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gvcp_transaction_t* gvcp_trans)
2305 proto_item *item = NULL;
2306 guint16 ack_index = 0;
2308 if (gvcp_telegram_tree != NULL)
2310 item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writeregcmd_data_index, tvb, (startoffset + 2), 2, ENC_BIG_ENDIAN);
2313 ack_index = tvb_get_ntohs(tvb, 10);
2317 gint num_registers = 0;
2319 num_registers = gvcp_trans->addr_count;
2320 if (num_registers > 1)
2322 col_append_fstr(pinfo->cinfo, COL_INFO, "[Multiple WriteReg Ack] (%d/%d) %s ", ack_index, num_registers, (ack_index == num_registers ? "(Success)" : "(Failed)"));
2326 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", (ack_index == num_registers ? "(Success)" : "(Failed)"));
2329 if (gvcp_telegram_tree != NULL)
2331 proto_item_append_text(item, " %s", (ack_index == num_registers ? "(Success)" : "(Failed)"));
2336 col_append_str(pinfo->cinfo, COL_INFO, "[Cannot find requesting packet]");
2342 \brief DISSECT: Read memory acknowledge
2345 static void dissect_readmem_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length, gvcp_conv_info_t *gvcp_info)
2348 const gchar *address_string = NULL;
2349 gboolean is_custom_register = FALSE;
2351 addr = tvb_get_ntohl(tvb, startoffset);
2352 address_string = get_register_name_from_address(addr, gvcp_info, &is_custom_register);
2354 /* Fill in Wireshark GUI Info column */
2355 col_append_str(pinfo->cinfo, COL_INFO, address_string);
2357 if (gvcp_telegram_tree != NULL)
2359 gint stream_channel_count = 0;
2362 offset = startoffset + 4;
2363 byte_count = (length - 4);
2365 for (stream_channel_count = 0; stream_channel_count < GVCP_MAX_STREAM_CHANNEL_COUNT; stream_channel_count++)
2367 if (startoffset == GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(stream_channel_count))
2369 gvcp_info->extended_bootstrap_address[stream_channel_count] = tvb_get_ntohl(tvb, offset);
2374 /* Bootstrap register known address */
2375 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readmemcmd_address, tvb, startoffset, 4, ENC_BIG_ENDIAN);
2377 if (try_val_to_str(addr, bootstrapregisternames) != NULL)
2379 dissect_register_data(addr, gvcp_telegram_tree, tvb, offset, byte_count);
2383 guint32 extended_bootstrap_address_offset = 0;
2384 if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset))
2386 dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, byte_count);
2390 /* Generic, unknown value */
2391 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readmemcmd_data_read, tvb, offset, byte_count, ENC_NA);
2399 \brief DISSECT: Write memory acknowledge
2402 static void dissect_writemem_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, gint startoffset, gint length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t* gvcp_trans)
2404 if (gvcp_trans && gvcp_trans->addr_list)
2406 if (wmem_array_get_count(gvcp_trans->addr_list) > 0)
2408 const gchar *address_string = NULL;
2409 address_string = get_register_name_from_address((*((guint32*)wmem_array_index(gvcp_trans->addr_list, 0))), gvcp_info, NULL);
2410 col_append_str(pinfo->cinfo, COL_INFO, address_string);
2414 if (gvcp_telegram_tree != NULL)
2418 if (gvcp_trans && gvcp_trans->req_frame)
2420 item = proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_response_to, tvb, 0, 0, gvcp_trans->req_frame);
2421 proto_item_set_generated(item);
2424 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length,
2425 ett_gvcp_payload_cmd, NULL, "Payload Data: WRITEMEM_ACK");
2426 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writememcmd_data_index, tvb, (startoffset +2), 2, ENC_BIG_ENDIAN);
2432 \brief DISSECT: Pending acknowledge
2435 static void dissect_pending_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint startoffset, gint length)
2437 if (gvcp_telegram_tree != NULL)
2439 gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length,
2440 ett_gvcp_payload_cmd, NULL, "Payload Data: PENDING_ACK");
2441 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_time_to_completion, tvb, (startoffset + 2), 2, ENC_BIG_ENDIAN);
2447 \brief Point of entry of all GVCP packet dissection
2450 static int dissect_gvcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
2453 proto_tree *gvcp_tree = NULL;
2454 proto_tree *gvcp_tree_flag = NULL;
2455 proto_tree *gvcp_telegram_tree = NULL;
2456 gint data_length = 0;
2458 const gchar* command_string = NULL;
2461 gint extendedblockids = -1;
2462 gint scheduledactioncommand = -1;
2464 const gchar* ack_string = NULL;
2465 gint request_id = 0;
2467 proto_item *ti = NULL;
2468 proto_item *item = NULL;
2469 conversation_t *conversation = 0;
2470 gvcp_conv_info_t *gvcp_info = 0;
2471 gvcp_transaction_t *gvcp_trans = 0;
2473 if (tvb_captured_length(tvb) < GVCP_MIN_PACKET_SIZE)
2478 /* check for valid key/ack code */
2479 key_code = (gchar) tvb_get_guint8(tvb, offset);
2480 ack_code = tvb_get_ntohs(tvb, offset+2);
2481 ack_string = try_val_to_str(ack_code, acknowledgenames);
2483 if ((key_code != 0x42) && !ack_string)
2488 /* Set the protocol column */
2489 col_set_str(pinfo->cinfo, COL_PROTOCOL, "GVCP");
2491 /* Clear out stuff in the info column */
2492 col_clear(pinfo->cinfo, COL_INFO);
2494 /* Adds "Gigabit-Ethernet Control Protocol" heading to protocol tree */
2495 /* We will add fields to this using the gvcp_tree pointer */
2496 ti = proto_tree_add_item(tree, proto_gvcp, tvb, offset, -1, ENC_NA);
2497 gvcp_tree = proto_item_add_subtree(ti, ett_gvcp);
2499 /* Is this a command message? */
2500 if (key_code == 0x42)
2502 command = tvb_get_ntohs(tvb, offset+2);
2503 command_string = val_to_str(command, commandnames,"Unknown Command (0x%x)");
2505 /* Add the Command name string to the Info column */
2506 col_append_fstr(pinfo->cinfo, COL_INFO, "> %s ", command_string);
2508 gvcp_tree = proto_tree_add_subtree_format(gvcp_tree, tvb, offset, 8,
2509 ett_gvcp_cmd, NULL, "Command Header: %s", command_string);
2511 /* Add the message key code: */
2512 proto_tree_add_item(gvcp_tree, hf_gvcp_message_key_code, tvb, offset, 1, ENC_BIG_ENDIAN);
2516 flags = (gchar) tvb_get_guint8(tvb, offset);
2517 item = proto_tree_add_item(gvcp_tree, hf_gvcp_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
2518 gvcp_tree_flag = proto_item_add_subtree(item, ett_gvcp_flags);
2519 if (command == GVCP_ACTION_CMD)
2521 proto_tree_add_item(gvcp_tree_flag, hf_gvcp_scheduledactioncommand_flag_v2_0, tvb, offset, 1, ENC_BIG_ENDIAN);
2522 scheduledactioncommand = (flags & 0x80);
2524 if ((command == GVCP_EVENTDATA_CMD) ||
2525 (command == GVCP_EVENT_CMD) ||
2526 (command == GVCP_PACKETRESEND_CMD))
2528 proto_tree_add_item(gvcp_tree_flag, hf_gvcp_64bitid_flag_v2_0, tvb, offset, 1, ENC_BIG_ENDIAN);
2529 flags = (gchar) tvb_get_guint8(tvb, offset );
2530 extendedblockids = (flags & 0x10);
2532 if ((command == GVCP_DISCOVERY_CMD) ||
2533 (command == GVCP_FORCEIP_CMD))
2535 proto_tree_add_item(gvcp_tree_flag, hf_gvcp_allow_broadcast_acknowledge_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
2537 proto_tree_add_item(gvcp_tree_flag, hf_gvcp_acknowledge_required_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
2541 /* Add the command */
2542 proto_tree_add_item(gvcp_tree, hf_gvcp_command, tvb, offset, 2, ENC_BIG_ENDIAN);
2545 else /* ... or else it is an acknowledge */
2547 status = tvb_get_ntohs(tvb, offset);
2548 col_append_fstr(pinfo->cinfo, COL_INFO, "< %s %s",
2549 ack_string, val_to_str(status, statusnames_short, "Unknown status (0x%04X)"));
2551 gvcp_tree = proto_tree_add_subtree_format(gvcp_tree, tvb, offset+2, tvb_captured_length(tvb)-2,
2552 ett_gvcp_ack, NULL, "Acknowledge Header: %s", ack_string);
2554 /* Add the status: */
2555 proto_tree_add_item(gvcp_tree, hf_gvcp_status, tvb, offset, 2, ENC_BIG_ENDIAN);
2558 /* Add the acknowledge */
2559 proto_tree_add_item(gvcp_tree, hf_gvcp_acknowledge, tvb, offset, 2, ENC_BIG_ENDIAN);
2564 /* Parse the second part of both the command and the acknowledge header:
2566 -------- -------- -------- --------
2567 | status | acknowledge |
2568 -------- -------- -------- --------
2570 -------- -------- -------- --------
2573 Number of valid data bytes in this message, not including this header. This
2574 represents the number of bytes of payload appended after this header */
2575 proto_tree_add_item(gvcp_tree, hf_gvcp_length, tvb, offset, 2, ENC_BIG_ENDIAN);
2576 data_length = tvb_get_ntohs(tvb, offset);
2579 /* Add the request ID */
2580 proto_tree_add_item(gvcp_tree, hf_gvcp_request_id, tvb, offset, 2, ENC_BIG_ENDIAN);
2581 request_id = tvb_get_ntohs(tvb, offset);
2584 conversation = find_or_create_conversation(pinfo);
2586 gvcp_info = (gvcp_conv_info_t*)conversation_get_proto_data(conversation, proto_gvcp);
2589 gint stream_channel_count = 0;
2590 gvcp_info = (gvcp_conv_info_t*)wmem_alloc(wmem_file_scope(), sizeof(gvcp_conv_info_t));
2591 gvcp_info->pdus = wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal);
2592 for (; stream_channel_count < GVCP_MAX_STREAM_CHANNEL_COUNT; stream_channel_count++)
2594 gvcp_info->extended_bootstrap_address[stream_channel_count] = 0;
2596 conversation_add_proto_data(conversation, proto_gvcp, gvcp_info);
2599 if (!pinfo->fd->visited)
2601 if (key_code == 0x42)
2603 /* This is a request */
2604 gvcp_trans = (gvcp_transaction_t*)wmem_alloc(wmem_packet_scope(), sizeof(gvcp_transaction_t));
2605 gvcp_trans->req_frame = pinfo->num;
2606 gvcp_trans->rep_frame = 0;
2607 gvcp_trans->addr_list = 0;
2608 gvcp_trans->addr_count = 0;
2612 if (ack_string && ( ack_code != GVCP_PENDING_ACK ) )
2614 /* this is a response, so update trans info with ack's frame number */
2615 /* get list of transactions for given request id */
2616 gvcp_trans_array = (wmem_array_t*)wmem_map_lookup(gvcp_info->pdus, GUINT_TO_POINTER(request_id));
2617 if (gvcp_trans_array)
2620 guint array_size = wmem_array_get_count(gvcp_trans_array);
2621 for (i = array_size-1; i >= 0; i--)
2623 gvcp_trans = (gvcp_transaction_t*)wmem_array_index(gvcp_trans_array, i);
2625 if (gvcp_trans && (gvcp_trans->req_frame < pinfo->num))
2627 if (gvcp_trans->rep_frame != 0)
2633 gvcp_trans->rep_frame = pinfo->num;
2647 gvcp_trans_array = (wmem_array_t*)wmem_map_lookup(gvcp_info->pdus, GUINT_TO_POINTER(request_id));
2649 if (gvcp_trans_array)
2652 guint array_size = wmem_array_get_count(gvcp_trans_array);
2654 for (i = 0; i < array_size; ++i)
2656 gvcp_trans = (gvcp_transaction_t*)wmem_array_index(gvcp_trans_array, i);
2657 if (gvcp_trans && (pinfo->num == gvcp_trans->req_frame || pinfo->num == gvcp_trans->rep_frame))
2669 gvcp_trans = wmem_new0(wmem_packet_scope(), gvcp_transaction_t);
2672 /* Add telegram subtree */
2673 gvcp_telegram_tree = proto_item_add_subtree(gvcp_tree, ett_gvcp);
2675 /* Is this a command? */
2676 if (key_code == 0x42)
2678 if (gvcp_telegram_tree != NULL)
2680 if (gvcp_trans->rep_frame)
2682 item = proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_response_in, tvb, 0, 0, gvcp_trans->rep_frame);
2683 proto_item_set_generated(item);
2689 case GVCP_FORCEIP_CMD:
2690 dissect_forceip_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length);
2693 case GVCP_PACKETRESEND_CMD:
2694 dissect_packetresend_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, extendedblockids);
2697 case GVCP_READREG_CMD:
2698 dissect_readreg_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans);
2701 case GVCP_WRITEREG_CMD:
2702 dissect_writereg_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans);
2705 case GVCP_READMEM_CMD:
2706 dissect_readmem_cmd(gvcp_telegram_tree, tvb, pinfo, offset, gvcp_info);
2709 case GVCP_WRITEMEM_CMD:
2710 dissect_writemem_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans);
2713 case GVCP_EVENT_CMD:
2714 dissect_event_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, extendedblockids);
2717 case GVCP_EVENTDATA_CMD:
2718 dissect_eventdata_cmd(gvcp_telegram_tree, tvb, pinfo, offset, extendedblockids);
2721 case GVCP_ACTION_CMD:
2722 dissect_action_cmd(gvcp_telegram_tree, tvb, pinfo, offset, scheduledactioncommand);
2725 case GVCP_DISCOVERY_CMD:
2730 if (!pinfo->fd->visited)
2732 if (key_code == 0x42)
2734 gvcp_trans_array = (wmem_array_t*)wmem_map_lookup(gvcp_info->pdus, GUINT_TO_POINTER(request_id));
2736 if(gvcp_trans_array)
2738 wmem_array_append(gvcp_trans_array, gvcp_trans, 1);
2742 gvcp_trans_array = wmem_array_new(wmem_file_scope(), sizeof(gvcp_transaction_t));
2743 wmem_array_append(gvcp_trans_array, gvcp_trans, 1);
2744 wmem_map_insert(gvcp_info->pdus, GUINT_TO_POINTER(request_id), (void *)gvcp_trans_array);
2751 if (gvcp_telegram_tree != NULL)
2753 if (gvcp_trans->req_frame)
2755 item = proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_response_to, tvb, 0, 0, gvcp_trans->req_frame);
2756 proto_item_set_generated(item);
2762 case GVCP_DISCOVERY_ACK:
2763 dissect_discovery_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length);
2766 case GVCP_READREG_ACK:
2767 dissect_readreg_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans);
2770 case GVCP_WRITEREG_ACK:
2771 dissect_writereg_ack(gvcp_telegram_tree, tvb, pinfo, offset, gvcp_trans);
2774 case GVCP_READMEM_ACK:
2775 dissect_readmem_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info);
2778 case GVCP_WRITEMEM_ACK:
2779 dissect_writemem_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans);
2782 case GVCP_PENDING_ACK:
2783 dissect_pending_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length);
2786 case GVCP_FORCEIP_ACK:
2788 case GVCP_PACKETRESEND_ACK:
2789 case GVCP_EVENT_ACK:
2790 case GVCP_EVENTDATA_ACK:
2791 case GVCP_ACTION_ACK:
2793 proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_payloaddata, tvb, offset, data_length, ENC_NA);
2797 return tvb_captured_length(tvb);
2800 void proto_register_gvcp(void)
2803 \brief Structures for register dissection
2806 static hf_register_info hf[] =
2808 /* Common GVCP data */
2810 { &hf_gvcp_message_key_code,
2811 { "Message Key Code", "gvcp.message_key_code",
2812 FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
2816 { "Flags", "gvcp.cmd.flags",
2817 FT_UINT8, BASE_HEX, NULL, 0x0,
2820 { &hf_gvcp_acknowledge_required_flag,
2821 { "Acknowledge Required", "gvcp.cmd.flag.acq_required",
2822 FT_BOOLEAN, 8, NULL, 0x01,
2825 { &hf_gvcp_scheduledactioncommand_flag_v2_0,
2826 { "Scheduled Action Command", "gvcp.cmd.flag.scheduledactioncommand",
2827 FT_BOOLEAN, 8, NULL, 0x80,
2830 { &hf_gvcp_64bitid_flag_v2_0,
2831 { "64 bit ID", "gvcp.cmd.flag.64bitid",
2832 FT_BOOLEAN, 8, NULL, 0x10,
2835 { &hf_gvcp_allow_broadcast_acknowledge_flag,
2836 { "Allow Broadcast Acknowledge", "gvcp.cmd.flag.allowbroadcastacq",
2837 FT_BOOLEAN, 8, NULL, 0x10,
2841 { "Command", "gvcp.cmd.command",
2842 FT_UINT16, BASE_HEX, VALS(commandnames), 0x0,
2846 { "Payload Length", "gvcp.cmd.payloadlength",
2847 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2850 { &hf_gvcp_request_id,
2851 { "Request ID", "gvcp.cmd.req_id",
2852 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2855 { &hf_gvcp_payloaddata,
2856 { "Payload Data", "gvcp.cmd.payloaddata",
2857 FT_BYTES, BASE_NONE, NULL, 0x0,
2861 { "Status", "gvcp.cmd.status",
2862 FT_UINT16, BASE_HEX, VALS(statusnames), 0x0,
2865 { &hf_gvcp_acknowledge,
2866 { "Acknowledge", "gvcp.ack",
2867 FT_UINT16, BASE_HEX, VALS(acknowledgenames), 0x0,
2870 { &hf_gvcp_devicemodediscovery,
2871 { "Device Mode", "gvcp.ack.discovery.devicemode",
2872 FT_UINT32, BASE_HEX, NULL, 0x0,
2877 { &hf_gvcp_forceip_mac_address,
2878 { "MAC Address", "gvcp.cmd.forceip.macaddress",
2879 FT_ETHER, BASE_NONE, NULL, 0x0,
2882 { &hf_gvcp_forceip_static_IP,
2883 { "IP address", "gvcp.cmd.forceip.ip",
2884 FT_IPv4, BASE_NONE, NULL, 0x0,
2887 { &hf_gvcp_forceip_static_subnet_mask,
2888 { "Subnet Mask", "gvcp.cmd.forceip.subnetmask",
2889 FT_IPv4, BASE_NONE, NULL, 0x0,
2892 { &hf_gvcp_forceip_static_default_gateway,
2893 { "Default Gateway", "gvcp.cmd.forceip.defaultgateway",
2894 FT_IPv4, BASE_NONE, NULL, 0x0,
2897 /* Discovery specific */
2899 { &hf_gvcp_device_mac_address,
2900 { "Device MAC Address", "gvcp.cmd.discovery.devicemacaddress",
2901 FT_ETHER, BASE_NONE, NULL, 0x0,
2905 { &hf_gvcp_readregcmd_bootstrap_register,
2906 { "Bootstrap Register", "gvcp.cmd.readreg.bootstrapregister",
2907 FT_UINT32, BASE_HEX_DEC, VALS(bootstrapregisternames), 0x0,
2910 { &hf_gvcp_readregcmd_extended_bootstrap_register,
2911 { "Extended Bootstrap Register", "gvcp.cmd.readreg.extendedbootstrapregister",
2912 FT_UINT32, BASE_HEX_DEC, VALS(extendedbootstrapregisternames), 0x0,
2915 /* Write register */
2917 { &hf_gvcp_writeregcmd_data,
2918 { "DataX", "gvcp.cmd.writereg.data",
2919 FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
2922 { &hf_gvcp_writeregcmd_bootstrap_register,
2923 { "Bootstrap Register", "gvcp.cmd.writereg.bootstrapregister",
2924 FT_UINT32, BASE_HEX_DEC, VALS(bootstrapregisternames), 0x0,
2927 { &hf_gvcp_writeregcmd_extended_bootstrap_register,
2928 { "Extended Bootstrap Register", "gvcp.cmd.writereg.extendedbootstrapregister",
2929 FT_UINT32, BASE_HEX_DEC, VALS(extendedbootstrapregisternames), 0x0,
2932 { &hf_gvcp_writeregcmd_data_index,
2933 { "Data Index", "gvcp.cmd.writereg.dataindex",
2934 FT_UINT16, BASE_HEX, NULL, 0x0,
2939 { &hf_gvcp_readmemcmd_address,
2940 { "Register Address", "gvcp.cmd.readmem.address",
2941 FT_UINT32, BASE_HEX, NULL, 0x0,
2944 { &hf_gvcp_readmemcmd_bootstrap_register,
2945 { "Memory Bootstrap Register", "gvcp.cmd.readmem.bootstrapregister",
2946 FT_UINT32, BASE_HEX_DEC, VALS(bootstrapregisternames), 0x0,
2949 { &hf_gvcp_readmemcmd_count,
2950 { "Count", "gvcp.cmd.readmem.count",
2951 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2956 { &hf_gvcp_writememcmd_data,
2957 { "DataY", "gvcp.cmd.writemem.data",
2958 FT_BYTES, BASE_NONE, NULL, 0x0,
2961 { &hf_gvcp_writememcmd_data_index,
2962 { "Data Index", "gvcp.cmd.writemem.dataindex",
2963 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2966 /* Resend request */
2968 { &hf_gvcp_resendcmd_stream_channel_index,
2969 { "Resend Stream Channel Index", "gvcp.cmd.resend.streamchannelindex",
2970 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2973 { &hf_gvcp_resendcmd_block_id,
2974 { "Resend Block ID 16 bits", "gvcp.cmd.resend.blockid",
2975 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2978 { &hf_gvcp_resendcmd_first_packet_id,
2979 { "Resend First Packet ID 24 bits", "gvcp.cmd.resend.firstpacketid",
2980 FT_UINT24, BASE_HEX_DEC, NULL, 0x0,
2983 { &hf_gvcp_resendcmd_last_packet_id,
2984 { "Resend Last Packet ID 24 bits", "gvcp.cmd.resend.lastpacketid",
2985 FT_UINT24, BASE_HEX_DEC, NULL, 0x0,
2988 { &hf_gvcp_resendcmd_extended_block_id_v2_0,
2989 { "Resend Block ID 64 bits", "gvcp.cmd.resend.extendedblockid",
2990 FT_UINT64, BASE_HEX_DEC, NULL, 0x0,
2993 { &hf_gvcp_resendcmd_extended_first_packet_id_v2_0,
2994 { "Resend First Packet ID 32 bits", "gvcp.cmd.resend.firstpacketid",
2995 FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
2998 { &hf_gvcp_resendcmd_extended_last_packet_id_v2_0,
2999 { "Resend Last Packet ID 32 bits", "gvcp.cmd.resend.lastpacketid",
3000 FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
3005 { &hf_gvcp_eventcmd_id,
3006 { "ID", "gvcp.cmd.event.id",
3007 FT_UINT16, BASE_HEX_DEC, VALS(eventidnames), 0x0,
3010 { &hf_gvcp_eventcmd_error_id,
3011 { "Error ID", "gvcp.cmd.event.errorid",
3012 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
3015 { &hf_gvcp_eventcmd_extid_length,
3016 { "Event Size", "gvcp.cmd.event.eventsize",
3017 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
3020 { &hf_gvcp_eventcmd_device_specific_id,
3021 { "Device Specific ID", "gvcp.cmd.event.devicespecificid",
3022 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
3025 { &hf_gvcp_eventcmd_stream_channel_index,
3026 { "Stream Channel Index", "gvcp.cmd.event.streamchannelindex",
3027 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
3030 { &hf_gvcp_eventcmd_block_id,
3031 { "Block ID (16 bit)", "gvcp.cmd.event.blockid",
3032 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
3035 { &hf_gvcp_eventcmd_timestamp,
3036 { "Timestamp", "gvcp.cmd.event.timestamp",
3037 FT_UINT64, BASE_HEX_DEC, NULL, 0x0,
3040 { &hf_gvcp_eventcmd_block_id_64bit_v2_0,
3041 { "Block ID 64 bit", "gvcp.event_timestamp",
3042 FT_UINT64, BASE_HEX_DEC, NULL, 0x0,
3047 { &hf_gvcp_eventcmd_data,
3048 { "Event Data", "gvcp.cmd.eventdata.data",
3049 FT_BYTES, BASE_NONE, NULL, 0x0,
3054 { &hf_gvcp_actioncmd_device_key,
3055 { "Action Device Key", "gvcp.cmd.action.devicekey",
3056 FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
3059 { &hf_gvcp_actioncmd_group_key,
3060 { "Action Group Key", "gvcp.cmd.action.groupkey",
3061 FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
3064 { &hf_gvcp_actioncmd_group_mask,
3065 { "Action Group Mask", "gvcp.cmd.action.groupmask",
3066 FT_UINT32, BASE_HEX_DEC, NULL, 0xFFFFFFFF,
3069 { &hf_gvcp_actioncmd_time_v2_0,
3070 { "Action Scheduled Time", "gvcp.cmd.action.time",
3071 FT_UINT64, BASE_HEX_DEC, NULL, 0x0,
3074 /* Pending acknowledge */
3076 { &hf_gvcp_time_to_completion,
3077 { "Time to completion", "gvcp.ack.pendingack.timetocompletion",
3078 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
3083 { &hf_gvcp_spec_version_major,
3084 { "Version Major", "gvcp.bootstrap.specversion.major",
3085 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
3088 { &hf_gvcp_spec_version_minor,
3089 { "Version Minor", "gvcp.bootstrap.specversion.minor",
3090 FT_UINT32, BASE_HEX, NULL, 0x0000FFFF,
3093 { &hf_gvcp_spec_version,
3094 { "Spec Version", "gvcp.bootstrap.specversion",
3095 FT_UINT32, BASE_HEX, NULL, 0,
3098 /* GVCP_devicemode */
3100 { &hf_gvcp_devicemode_endianness,
3101 { "Endianness", "gvcp.bootstrap.devicemode.endianness",
3102 FT_BOOLEAN, 32, NULL, 0x80000000,
3106 { &hf_gvcp_devicemode_deviceclass,
3107 { "Device Class", "gvcp.bootstrap.devicemode.deviceclass",
3108 FT_UINT32, BASE_HEX, VALS(devicemodenames_class), 0x70000000,
3112 { &hf_gvcp_devicemode_current_link_configuration_v2_0,
3113 { "Current Link Configuration", "gvcp.bootstrap.devicemode.currentlinkconfiguration",
3114 FT_UINT32, BASE_HEX, VALS(linkconfiguration_class), 0x03000000,
3118 {& hf_gvcp_devicemode_characterset,
3119 { "Character Set", "gvcp.bootstrap.devicemode.characterset",
3120 FT_UINT32, BASE_HEX, VALS(devicemodenames_characterset), 0x0000000F,
3124 /* GVCP_MAC_HIGH_0, 1, 2, 3 */
3127 { "MAC High", "gvcp.bootstrap.machigh",
3128 FT_UINT32, BASE_HEX, NULL, 0x0000FFFF,
3132 /* GVCP_MAC_LOW_0, 1, 2, 3 */
3135 { "MAC Low", "gvcp.bootstrap.maclow",
3136 FT_UINT32, BASE_HEX, NULL, 0,
3140 /* GVCP_SUPPORTED_IP_CONFIGURATION_0, 1, 2, 3 */
3141 /* GVCP_CURIPCFG_0, 1, 2, 3 */
3143 { &hf_gvcp_ip_config_can_handle_pause_frames_v2_0,
3144 { "IP Config Can Handle Pause Frames", "gvcp.bootstrap.ipconfig.canhandlepauseframes",
3145 FT_BOOLEAN, 32, NULL, 0x80000000,
3148 { &hf_gvcp_ip_config_can_generate_pause_frames_v2_0,
3149 { "Can Generate Pause Frames", "gvcp.bootstrap.ipconfig.cangeneratepauseframes",
3150 FT_BOOLEAN, 32, NULL, 0x40000000,
3153 { &hf_gvcp_ip_config_lla,
3154 { "LLA", "gvcp.bootstrap.ipconfig.lla",
3155 FT_BOOLEAN, 32, NULL, 0x00000004,
3158 { &hf_gvcp_ip_config_dhcp,
3159 { "DHCP", "gvcp.bootstrap.ipconfig.dhcp",
3160 FT_BOOLEAN, 32, NULL, 0x00000002,
3163 { &hf_gvcp_ip_config_persistent_ip,
3164 { "Persistent IP", "gvcp.bootstrap.ipconfig.persistentip",
3165 FT_BOOLEAN, 32, NULL, 0x00000001,
3168 { &hf_gvcp_supportedipconfig,
3169 { "Supported IP Configuration", "gvcp.bootstrap.supportedipconfig",
3170 FT_UINT32, BASE_HEX, NULL, 0,
3174 { &hf_gvcp_currentipconfig,
3175 { "Current IP Configuration", "gvcp.bootstrap.currentipconfig",
3176 FT_UINT32, BASE_HEX, NULL, 0,
3180 /* GVCP_CURRENT_IP_ADDRESS_0, 1, 2, 3 */
3182 { &hf_gvcp_current_IP,
3183 { "Current IP", "gvcp.bootstrap.currentip",
3184 FT_IPv4, BASE_NONE, NULL, 0x0,
3187 /* GVCP_CURRENT_SUBNET_MASK_0, 1, 2, 3 */
3189 { &hf_gvcp_current_subnet_mask,
3190 { "Subnet Mask", "gvcp.bootstrap.currentsubnetmask",
3191 FT_IPv4, BASE_NONE, NULL, 0x0,
3194 /* GVCP_CURRENT_DEFAULT_GATEWAY_0, 1, 2, 3 */
3196 { &hf_gvcp_current_default_gateway,
3197 { "Default Gateway", "gvcp.bootstrap.currentdefaultgateway",
3198 FT_IPv4, BASE_NONE, NULL, 0x0,
3201 /* GVCP_MANUFACTURER_NAME */
3203 { &hf_gvcp_manufacturer_name,
3204 { "Manufacturer Name", "gvcp.bootstrap.manufacturername",
3205 FT_STRINGZ, BASE_NONE, NULL, 0x0,
3208 /* GVCP_MODEL_NAME */
3210 { &hf_gvcp_model_name,
3211 { "Model Name", "gvcp.bootstrap.modelname",
3212 FT_STRINGZ, BASE_NONE, NULL, 0x0,
3215 /* GVCP_DEVICE_VERSION */
3217 { &hf_gvcp_device_version,
3218 { "Device Version", "gvcp.bootstrap.deviceversion",
3219 FT_STRINGZ, BASE_NONE, NULL, 0x0,
3222 /* GVCP_MANUFACTURER_INFO */
3224 { &hf_gvcp_manufacturer_specific_info,
3225 { "Manufacturer Specific Info", "gvcp.bootstrap.manufacturerspecificinfo",
3226 FT_STRINGZ, BASE_NONE, NULL, 0x0,
3229 /* GVCP_SERIAL_NUMBER */
3231 { &hf_gvcp_serial_number,
3232 { "Serial Number", "gvcp.bootstrap.serialnumber",
3233 FT_STRINGZ, BASE_NONE, NULL, 0x0,
3236 /* GVCP_USER_DEFINED_NAME */
3238 { &hf_gvcp_user_defined_name,
3239 { "User-defined Name", "gvcp.bootstrap.userdefinedname",
3240 FT_STRINGZ, BASE_NONE, NULL, 0x0,
3243 /* GVCP_FIRST_URL */
3245 { &hf_gvcp_first_xml_device_description_file,
3246 { "First URL", "gvcp.bootstrap.firsturl",
3247 FT_STRINGZ, BASE_NONE, NULL, 0x0,
3250 /* GVCP_SECOND_URL */
3252 { &hf_gvcp_second_xml_device_description_file,
3253 { "Second URL", "gvcp.bootstrap.secondurl",
3254 FT_STRINGZ, BASE_NONE, NULL, 0x0,
3257 /* GVCP_NUMBER_OF_NETWORK_INTERFACES */
3259 {& hf_gvcp_number_interfaces,
3260 { "Number of Network Interfaces", "gvcp.bootstrap.numberofnetworminterfaces",
3261 FT_UINT32, BASE_DEC, NULL, 0x0,
3265 /* GVCP_PERSISTENT_IP_ADDRESS_0, 1, 2, 3 */
3267 {& hf_gvcp_persistent_ip,
3268 { "Persistent IP", "gvcp.bootstrap.persistentip",
3269 FT_IPv4, BASE_NONE, NULL, 0x0,
3273 /* GVCP_PERSISTENT_SUBNET_MASK_0, 1, 2, 3 */
3275 {& hf_gvcp_persistent_subnet,
3276 { "Persistent Subnet Mask", "gvcp.bootstrap.persistentsubnetmask",
3277 FT_IPv4, BASE_NONE, NULL, 0x0,
3281 /* GVCP_PERSISTENT_DEFAULT_GATEWAY_0, 1, 2, 3 */
3283 {& hf_gvcp_persistent_gateway,
3284 { "Persistent GateWay", "gvcp.bootstrap.persistentgateway",
3285 FT_IPv4, BASE_NONE, NULL, 0x0,
3289 /* GVCP_LINK_SPEED_0, 1, 2, 3 */
3291 {& hf_gvcp_link_speed,
3292 { "Link Speed (in Mbs)", "gvcp.bootstrap.linkspeed",
3293 FT_UINT32, BASE_DEC, NULL, 0x0,
3297 /* GVCP_NUMBER_OF_MESSAGE_CHANNELS */
3299 {& hf_gvcp_number_message_channels,
3300 { "Number of Message Channels", "gvcp.bootstrap.numberofmessagechannels",
3301 FT_UINT32, BASE_DEC, NULL, 0x0,
3305 /* GVCP_NUMBER_OF_STREAM_CHANNELS */
3307 {& hf_gvcp_number_stream_channels,
3308 { "Number of Stream Channels", "gvcp.bootstrap.numberofstreamchannels",
3309 FT_UINT32, BASE_DEC, NULL, 0x0,
3313 /* GVCP_NUMBER_OF_ACTION_SIGNALS */
3315 {& hf_gvcp_number_action_signals,
3316 { "Number of Action Signals", "gvcp.bootstrap.numberofactionsignals",
3317 FT_UINT32, BASE_DEC, NULL, 0x0,
3321 /* GVCP_NUMBER_OF_ACTIVE_LINKS */
3323 {& hf_gvcp_number_of_active_links_v2_0,
3324 { "Number of Active Links", "gvcp.bootstrap.numberofactivelinks",
3325 FT_UINT32, BASE_DEC, NULL, 0x0000000F,
3329 /* GVCP_IEEE_1588_SELECTED_PROFILE */
3331 {& hf_gvcp_selected_ieee1588_profile_v2_1,
3332 { "IEEE 1588 Selected Profile", "gvcp.bootstrap.ieee1588selectedprofile",
3333 FT_UINT32, BASE_DEC, NULL, 0x0000001F,
3339 {& hf_gvcp_sccaps_scspx_register_supported,
3340 { "SCSPx Register Supported", "gvcp.bootstrap.sccaps.scspxregistersupported",
3341 FT_BOOLEAN, 32, NULL, 0x80000000,
3345 {& hf_gvcp_sccaps_legacy_16bit_blockid_supported_v2_0,
3346 { "16 bit Block ID Supported", "gvcp.bootstrap.sccaps.16bitblockidsupported",
3347 FT_BOOLEAN, 32, NULL, 0x40000000,
3351 { &hf_gvcp_sccaps_scmbsx_supported_v2_2,
3352 { "Stream Channel Max. Block Size Supported", "gvcp.bootstrap.sccaps.scmbssupported",
3353 FT_BOOLEAN, 32, NULL, 0x20000000,
3357 { &hf_gvcp_sccaps_scebax_supported_v2_2,
3358 { "Stream Channel Extended Bootstrap Address Supported", "gvcp.bootstrap.sccaps.scebasupported",
3359 FT_BOOLEAN, 32, NULL, 0x10000000,
3363 /* GVCP_MESSAGE_CHANNEL_CAPS */
3365 {& hf_gvcp_mcsp_supported,
3366 { "MCSP Supported", "gvcp.bootstrap.mccaps.mcspsupported",
3367 FT_BOOLEAN, 32, NULL, 0x80000000,
3371 { &hf_gvcp_mcc_supported_v2_2,
3372 { "MCC Supported", "gvcp.bootstrap.mccaps.mccsupported",
3373 FT_BOOLEAN, 32, NULL, 0x40000000,
3377 { &hf_gvcp_mcec_supported_v2_2,
3378 { "MCEC Supported", "gvcp.bootstrap.mccaps.mcecsupported",
3379 FT_BOOLEAN, 32, NULL, 0x20000000,
3383 /* GVCP_IEEE_1588_EXTENDED_CAPABILITY */
3385 {& hf_gvcp_ieee1588_profile_registers_present_v2_1,
3386 { "IEEE 1588 Profile Registers Present", "gvcp.bootstrap.ieee1588extendedcapabilities.profileregisterspresent",
3387 FT_BOOLEAN, 32, NULL, 0x80000000,
3391 /* GVCP_IEEE_1588_SUPPORTED_PROFILES */
3393 {& hf_gvcp_ieee1588_ptp_profile_supported_v2_1,
3394 { "IEEE 1588 PTP Profile Supported", "gvcp.bootstrap.ieee1588supportedprofiles.ptp",
3395 FT_BOOLEAN, 32, NULL, 0x80000000,
3399 {& hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1,
3400 { "IEEE 1588 802.1as Profile Supported", "gvcp.bootstrap.ieee1588supportedprofiles.802dot1as",
3401 FT_BOOLEAN, 32, NULL, 0x40000000,
3405 /* GVCP_CAPABILITY */
3407 {& hf_gvcp_capability_user_defined,
3408 { "User Defined Name Supported", "gvcp.bootstrap.capability.userdefined",
3409 FT_BOOLEAN, 32, NULL, 0x80000000,
3413 {& hf_gvcp_capability_serial_number,
3414 { "Serial Number Supported", "gvcp.bootstrap.capability.serialnumber",
3415 FT_BOOLEAN, 32, NULL, 0x40000000,
3419 {& hf_gvcp_capability_heartbeat_disable,
3420 { "Heartbeat Disable Supported", "gvcp.bootstrap.capability.heartbeatdisabled",
3421 FT_BOOLEAN, 32, NULL, 0x20000000,
3425 {& hf_gvcp_capability_link_speed,
3426 { "Link Speed Supported", "gvcp.bootstrap.capability.linkspeed",
3427 FT_BOOLEAN, 32, NULL, 0x10000000,
3431 {& hf_gvcp_capability_ccp_application_portip,
3432 { "CCP Application Port/IP Supported", "gvcp.bootstrap.capability.ccpapplicationportip",
3433 FT_BOOLEAN, 32, NULL, 0x08000000,
3437 {& hf_gvcp_capability_manifest_table,
3438 { "Manifest Table Supported", "gvcp.bootstrap.capability.manifesttable",
3439 FT_BOOLEAN, 32, NULL, 0x04000000,
3443 {& hf_gvcp_capability_test_data,
3444 { "Test Data Supported", "gvcp.bootstrap.capability.testdata",
3445 FT_BOOLEAN, 32, NULL, 0x02000000,
3449 {& hf_gvcp_capability_discovery_ACK_delay,
3450 { "Discovery ACK Delay Supported", "gvcp.bootstrap.capability.discoveryackdelay",
3451 FT_BOOLEAN, 32, NULL, 0x01000000,
3455 {& hf_gvcp_capability_writable_discovery_ACK_delay,
3456 { "Writable Discovery ACK Delay Supported", "gvcp.bootstrap.capability.writablediscoveryackdelay",
3457 FT_BOOLEAN, 32, NULL, 0x00800000,
3461 {& hf_gvcp_capability_extended_status_code_v1_1,
3462 { "Extended Status Code Supported (v1.1)", "gvcp.bootstrap.capability.extendedstatuscodesupportedv1_1",
3463 FT_BOOLEAN, 32, NULL, 0x00400000,
3467 {& hf_gvcp_capability_primary_application_switchover,
3468 { "Primary Application Switchover Supported", "gvcp.bootstrap.capability.primaryapplicationswitchover",
3469 FT_BOOLEAN, 32, NULL, 0x00200000,
3473 {& hf_gvcp_capability_unconditional_action_command,
3474 { "Unconditional Action Command Supported", "gvcp.bootstrap.capability.unconditionalactioncommand",
3475 FT_BOOLEAN, 32, NULL, 0x00100000,
3479 {& hf_gvcp_capability_1588_v2_0,
3480 { "Capability 1588", "gvcp.bootstrap.capability.ieee1588",
3481 FT_BOOLEAN, 32, NULL, 0x00080000,
3485 {& hf_gvcp_capability_extended_status_code_v2_0,
3486 { "Status Code", "gvcp.bootstrap.capability.pendingextendedstatuscodev2_0",
3487 FT_BOOLEAN, 32, NULL, 0x00040000,
3491 {& hf_gvcp_capability_scheduled_action_command_v2_0,
3492 { "Scheduled Action Command", "gvcp.bootstrap.capability.scheduledactioncommand",
3493 FT_BOOLEAN, 32, NULL, 0x00020000,
3497 {& hf_gvcp_capability_ieee1588_extended_capabilities_v2_1,
3498 { "IEEE1588 Extended Capabilities", "gvcp.bootstrap.capability.ieee1588extendedcapabilities",
3499 FT_BOOLEAN, 32, NULL, 0x00010000,
3503 {& hf_gvcp_capability_action_command,
3504 { "Action Command", "gvcp.bootstrap.capability.actioncommand",
3505 FT_BOOLEAN, 32, NULL, 0x00000040,
3509 {& hf_gvcp_capability_pending,
3510 { "Pending ACK Supported", "gvcp.bootstrap.capability.pendingack",
3511 FT_BOOLEAN, 32, NULL, 0x00000020,
3515 {& hf_gvcp_capability_evendata,
3516 { "Event Data Supported", "gvcp.bootstrap.capability.eventdata",
3517 FT_BOOLEAN, 32, NULL, 0x00000010,
3521 {& hf_gvcp_capability_event,
3522 { "Event Signal Supported", "gvcp.bootstrap.capability.eventsignal",
3523 FT_BOOLEAN, 32, NULL, 0x00000008,
3527 {& hf_gvcp_capability_packetresend,
3528 { "Packet Resend CMD Supported", "gvcp.bootstrap.capability.packetresendcmd",
3529 FT_BOOLEAN, 32, NULL, 0x00000004,
3533 {& hf_gvcp_capability_writemem,
3534 { "WRITEMEM Supported", "gvcp.bootstrap.capability.writemem",
3535 FT_BOOLEAN, 32, NULL, 0x00000002,
3539 {& hf_gvcp_capability_concatenation,
3540 { "Concatenation Supported", "gvcp.bootstrap.capability.concatenation",
3541 FT_BOOLEAN, 32, NULL, 0x00000001,
3545 /* GVCP_HEARTBEAT_TIMEOUT */
3547 {& hf_gvcp_heartbeat,
3548 { "Heartbeat Timeout (in ms)", "gvcp.bootstrap.heartbeattimeout",
3549 FT_UINT32, BASE_DEC, NULL, 0x0,
3553 /* GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH */
3555 {& hf_gvcp_high_timestamp_frequency,
3556 { "Timestamp Tick High Frequency (in Hz)", "gvcp.bootstrap.timestamptickfrequencyhigh",
3557 FT_UINT32, BASE_DEC, NULL, 0x0,
3561 /* GVCP_TIMESTAMP_TICK_FREQUENCY_LOW */
3563 {& hf_gvcp_low_timestamp_frequency,
3564 { "Timestamp Tick Low Frequency (in Hz)", "gvcp.bootstrap.timestamptickfrequencylow",
3565 FT_UINT32, BASE_DEC, NULL, 0x0,
3569 /* GVCP_TIMESTAMP_CONTROL */
3571 {& hf_gvcp_timestamp_control_latch,
3572 { "Timestamp Control Latch", "gvcp.bootstrap.timestampcontrol.latch",
3573 FT_BOOLEAN, 32, NULL, 0x00000002,
3577 {& hf_gvcp_timestamp_control_reset,
3578 { "Timestamp Control Reset", "gvcp.bootstrap.timestampcontrol.reset",
3579 FT_BOOLEAN, 32, NULL, 0x00000001,
3583 /* GVCP_TIMESTAMP_VALUE_HIGH */
3585 {& hf_gvcp_high_timestamp_value,
3586 { "Timestamp Value High", "gvcp.bootstrap.timestampvaluehigh",
3587 FT_UINT32, BASE_DEC, NULL, 0x0,
3591 /* GVCP_TIMESTAMP_VALUE_LOW */
3593 {& hf_gvcp_low_timestamp_value,
3594 { "Timestamp Value Low", "gvcp.bootstrap.timestampvaluelow",
3595 FT_UINT32, BASE_DEC, NULL, 0x0,
3599 /* GVCP_DISCOVERY_ACK_DELAY */
3601 {& hf_gvcp_discovery_ACK_delay,
3602 { "Discovery ACK Delay (in ms)", "gvcp.bootstrap.discoveryackdelay",
3603 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
3607 /* GVCP_CONFIGURATION */
3609 {& hf_gvcp_configuration_1588_enable_v2_0,
3610 { "IEEE 1588 Enable", "gvcp.bootstrap.config.ieee1588enable",
3611 FT_BOOLEAN, 32, NULL, 0x00080000,
3615 {& hf_gvcp_configuration_extended_status_codes_enable_v2_0,
3616 { "Status Codes v2.0 Enable", "gvcp.bootstrap.config.statuscodesv2_0enable",
3617 FT_BOOLEAN, 32, NULL, 0x00040000,
3621 {& hf_gvcp_configuration_unconditional_action_command_enable_v2_0,
3622 { "Unconditional Action Command Enable", "gvcp.bootstrap.config.unconditionalactioncommandenable",
3623 FT_BOOLEAN, 32, NULL, 0x00000008,
3627 {& hf_gvcp_configuration_extended_status_codes_enable_v1_1,
3628 { "Status Codes v1.1 Enable", "gvcp.bootstrap.config.statuscodesv1_1enable",
3629 FT_BOOLEAN, 32, NULL, 0x00000004,
3633 {& hf_gvcp_configuration_pending_ack_enable,
3634 { "Pending_ACK Enable", "gvcp.bootstrap.config.pendingackenable",
3635 FT_BOOLEAN, 32, NULL, 0x00000002,
3639 {& hf_gvcp_configuration_heartbeat_disable,
3640 { "Heartbeat Disable", "gvcp.bootstrap.config.heartbeatdisable",
3641 FT_BOOLEAN, 32, NULL, 0x00000001,
3645 /* GVCP_PENDING_TIMEOUT */
3647 {& hf_gvcp_pending_timeout_max_execution,
3648 { "Pending Timeout (in ms)", "gvcp.bootstrap.pending.timeout",
3649 FT_UINT32, BASE_DEC, NULL, 0x0,
3653 /* GVCP_CONTROL_SWITCHOVER_KEY */
3655 {& hf_gvcp_control_switchover_key_register,
3656 { "Control Switchover Key", "gvcp.bootstrap.controlswitchoverkey",
3657 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
3661 /* GVCP_GVSCP_CONFIGURATION */
3663 {& hf_gvcp_gvsp_configuration_64bit_blockid_enable_v2_0,
3664 { "GVSP Configuration 64 bit Block ID", "gvcp.bootstrap.gvcspconfig.64bitblockidenable",
3665 FT_BOOLEAN, 32, NULL, 0x40000000,
3669 /* GVCP_PHYSICAL_LINK_CAPABILITY, GVCP_PHYSICAL_LINK_CONFIGURATION */
3671 {& hf_gvcp_link_dlag_v2_0,
3672 { "Link dLAG", "gvcp.bootstrap.link.dlag",
3673 FT_BOOLEAN, 32, NULL, 0x00000008,
3677 {& hf_gvcp_link_slag_v2_0,
3678 { "Link sLAG", "gvcp.bootstrap.link.slag",
3679 FT_BOOLEAN, 32, NULL, 0x00000004,
3683 {& hf_gvcp_link_ml_v2_0,
3684 { "Link ML", "gvcp.bootstrap.link.ml",
3685 FT_BOOLEAN, 32, NULL, 0x00000002,
3689 {& hf_gvcp_link_sl_v2_0,
3690 { "Link SL", "gvcp.bootstrap.link.sl",
3691 FT_BOOLEAN, 32, NULL, 0x00000001,
3695 /* GVCP_IEEE_1588_STATUS */
3697 {& hf_gvcp_ieee1588_clock_status_v2_0,
3698 { "IEEE 1588 Clock Status", "gvcp.bootstrap.ieee1588.clockstatus",
3699 FT_UINT32, BASE_HEX, NULL, 0x0000000F,
3703 /* GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE */
3705 {& hf_gvcp_scheduled_action_command_queue_size_v2_0,
3706 { "Scheduled Action Command Queue Size", "gvcp.bootstrap.scheduledactioncommandqueuesize",
3707 FT_UINT32, BASE_DEC, NULL, 0,
3713 {& hf_gvcp_control_switchover_key,
3714 { "Control Switchover Key", "gvcp.bootstrap.control.switchoverkey",
3715 FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
3719 {& hf_gvcp_control_switchover_en,
3720 { "Control Switchover Enable", "gvcp.bootstrap.control.switchoverenable",
3721 FT_BOOLEAN, 32, NULL, 0x00000004,
3725 {& hf_gvcp_control_access,
3726 { "Control Access", "gvcp.bootstrap.control.controlaccess",
3727 FT_BOOLEAN, 32, NULL, 0x00000002,
3731 {& hf_gvcp_exclusive_access,
3732 { "Exclusive Access", "gvcp.bootstrap.control.exclusiveaccess",
3733 FT_BOOLEAN, 32, NULL, 0x00000001,
3737 /* GVCP_PRIMARY_APPLICATION_PORT */
3739 {& hf_gvcp_primary_application_host_port,
3740 { "Primary Application Port", "gvcp.bootstrap.primaryapplicationport",
3741 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
3745 /* GVCP_PRIMARY_APPLICATION_IP_ADDRESS */
3747 {& hf_gvcp_primary_application_ip_address,
3748 { "Primary Application IP Address", "gvcp.bootstrap.primaryapplicationipaddress",
3749 FT_IPv4, BASE_NONE, NULL, 0x0,
3753 /* GVCP_MC_DESTINATION_PORT */
3755 {& hf_gvcp_network_interface_index,
3756 { "Network Interface Index", "gvcp.bootstrap.mcp.networkinterfaceindex",
3757 FT_UINT32, BASE_DEC, NULL, 0x000F0000,
3761 {& hf_gvcp_host_port,
3762 { "Host Port", "gvcp.bootstrap.mcp.hostport",
3763 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
3767 /* GVCP_MC_DESTINATION_ADDRESS */
3769 {& hf_gvcp_channel_destination_ip,
3770 { "Destination IP Address", "gvcp.bootstrap.mcda",
3771 FT_IPv4, BASE_NONE, NULL, 0x0,
3775 /* GVCP_MC_TIMEOUT */
3777 {& hf_gvcp_message_channel_transmission_timeout,
3778 { "Transmission Timeout (in ms)", "gvcp.bootstrap.mctt",
3779 FT_UINT32, BASE_DEC, NULL, 0x0,
3783 /* GVCP_MC_RETRY_COUNT */
3785 {& hf_gvcp_message_channel_retry_count,
3786 { "Retry Count", "gvcp.bootstrap.mcrc",
3787 FT_UINT32, BASE_DEC, NULL, 0x0,
3791 /* GVCP_MC_SOURCE_PORT */
3793 {& hf_gvcp_message_channel_source_port,
3794 { "Source Port", "gvcp.bootstrap.mcsp",
3795 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
3799 /* GVCP_MC_CONFIGURATION */
3801 { &hf_gvcp_mcec_enabled_v2_2,
3802 { "MCEC Enabled", "gvcp.bootstrap.mcconfig.mcecenabled",
3803 FT_BOOLEAN, 32, NULL, 0x80000000,
3807 /* GVCP_SC_DESTINATION_PORT(0), 1, 2, 3 */
3809 {& hf_gvcp_sc_direction,
3810 { "Direction", "gvcp.bootstrap.scpx.direction",
3811 FT_BOOLEAN, 32, TFS(&directionnames), 0x80000000,
3815 {& hf_gvcp_sc_ni_index,
3816 { "Network Interface Index", "gvcp.bootstrap.scpx.networkinterfaceindex",
3817 FT_UINT32, BASE_DEC, NULL, 0x000F0000,
3821 {& hf_gvcp_sc_host_port,
3822 { "Host Port", "gvcp.bootstrap.scpx.hostport",
3823 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
3827 /* GVCP_SC_PACKET_SIZE(0), 1, 2, 3 */
3829 {& hf_gvcp_sc_fire_test_packet,
3830 { "Fire Test Packet", "gvcp.bootstrap.scpsx.firetestpacket",
3831 FT_BOOLEAN, 32, NULL, 0x80000000,
3835 {& hf_gvcp_sc_do_not_fragment,
3836 { "Do Not Fragment", "gvcp.bootstrap.scpsx.donotfragment",
3837 FT_BOOLEAN, 32, NULL, 0x40000000,
3841 {& hf_gvcp_sc_pixel_endianness,
3842 { "Pixel Endianness", "gvcp.bootstrap.scpsx.pixelendianness",
3843 FT_BOOLEAN, 32, NULL, 0x20000000,
3847 {& hf_gvcp_sc_packet_size,
3848 { "Packet Size", "gvcp.bootstrap.scpsx.packetsize",
3849 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
3853 /* GVCP_SC_PACKET_DELAY(0), 1, 2, 3 */
3855 {& hf_gvcp_sc_packet_delay,
3856 { "Packet Delay", "gvcp.bootstrap.scpdx",
3857 FT_UINT32, BASE_DEC, NULL, 0x0,
3861 /* GVCP_SC_DESTINATION_ADDRESS(0), 1, 2, 3 */
3863 {& hf_gvcp_sc_destination_ip,
3864 { "Destination Address", "gvcp.bootstrap.scdax",
3865 FT_IPv4, BASE_NONE, NULL, 0x0,
3869 /* GVCP_SC_SOURCE_PORT(0), 1, 2, 3 */
3871 {& hf_gvcp_sc_source_port,
3872 { "Source Port", "gvcp.bootstrap.scspx",
3873 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
3877 /* GVCP_SC_CAPABILITY(0), 1, 2, 3 */
3879 {& hf_gvcp_sc_big_little_endian_supported,
3880 { "Big/Little Endian Supported", "gvcp.bootstrap.sccx.biglittleendiansupported",
3881 FT_BOOLEAN, 32, NULL, 0x80000000,
3885 {& hf_gvcp_sc_ip_reassembly_supported,
3886 { "IP Reassembly Supported", "gvcp.bootstrap.sccx.ipreassemblysupported",
3887 FT_BOOLEAN, 32, NULL, 0x40000000,
3891 { &hf_gvcp_sc_scmpcx_supported_v2_2,
3892 { "Stream Channel Maximum Packet Count Supported", "gvcp.bootstrap.sccx.scmpcxsupported",
3893 FT_BOOLEAN, 32, NULL, 0x00000100,
3897 { &hf_gvcp_sc_gendc_supported_v2_2,
3898 { "GenDC Supported", "gvcp.bootstrap.sccx.gendcsupported",
3899 FT_BOOLEAN, 32, NULL, 0x00000080,
3903 {& hf_gvcp_sc_multi_part_supported_v2_1,
3904 { "Multi-part Supported", "gvcp.bootstrap.sccx.multipartsupported",
3905 FT_BOOLEAN, 32, NULL, 0x00000040,
3909 {& hf_gvcp_sc_large_leader_trailer_supported_v2_1,
3910 { "Large Leader/Trailer Supported", "gvcp.bootstrap.sccx.largeleadertrailersupported",
3911 FT_BOOLEAN, 32, NULL, 0x00000020,
3915 {& hf_gvcp_sc_multizone_supported_v2_0,
3916 { "Multi-zone Supported", "gvcp.bootstrap.sccx.multizonesupported",
3917 FT_BOOLEAN, 32, NULL, 0x00000010,
3921 {& hf_gvcp_sc_packet_resend_destination_option_supported_v2_0,
3922 { "Resend Destination Option Supported", "gvcp.bootstrap.sccx.resenddestinationoptionsupported",
3923 FT_BOOLEAN, 32, NULL, 0x8,
3927 {& hf_gvcp_sc_packet_resend_all_in_transmission_supported_v2_0,
3928 { "All In Transmission Supported", "gvcp.bootstrap.sccx.allintransmissionsupported",
3929 FT_BOOLEAN, 32, NULL, 0x4,
3933 {& hf_gvcp_sc_unconditional_streaming_supported,
3934 { "Unconditional Streaming Supported", "gvcp.bootstrap.sccx.unconditionalstreamingsupported",
3935 FT_BOOLEAN, 32, NULL, 0x2,
3939 {& hf_gvcp_sc_extended_chunk_data_supported,
3940 { "Extended Chunk Data Supported", "gvcp.bootstrap.sccx.extendedchunkdatasupported",
3941 FT_BOOLEAN, 32, NULL, 0x1,
3945 /* GVCP_SC_CONFIGURATION(0), 1, 2, 3 */
3947 { &hf_gvcp_sc_gendc_enabled_v2_2,
3948 { "GenDC Enabled", "gvcp.bootstrap.sccfgx.gendcenabled",
3949 FT_BOOLEAN, 32, NULL, 0x80,
3953 {& hf_gvcp_sc_multi_part_enabled_v2_1,
3954 { "Multi-part Enabled", "gvcp.bootstrap.sccfgx.multipartenabled",
3955 FT_BOOLEAN, 32, NULL, 0x40,
3959 {& hf_gvcp_sc_large_leader_trailer_enabled_v2_1,
3960 { "Large Leader/Trailer Enabled", "gvcp.bootstrap.sccfgx.largeleadertrailerenabled",
3961 FT_BOOLEAN, 32, NULL, 0x20,
3965 {& hf_gvcp_sc_packet_resend_destination_option_enabled_v2_0,
3966 { "Resend Destination Option Enabled", "gvcp.bootstrap.sccfgx.resenddestinationoptionenabled",
3967 FT_BOOLEAN, 32, NULL, 0x8,
3971 {& hf_gvcp_sc_packet_resend_all_in_transmission_enabled_v2_0,
3972 { "All In Transmission Enabled", "gvcp.bootstrap.sccfgx.allintransmissionenabled",
3973 FT_BOOLEAN, 32, NULL, 0x4,
3977 {& hf_gvcp_sc_unconditional_streaming_enabled,
3978 { "Unconditional Streaming Enabled", "gvcp.bootstrap.sccfgx.unconditionalstreamingenabled",
3979 FT_BOOLEAN, 32, NULL, 0x2,
3983 {& hf_gvcp_sc_extended_chunk_data_enabled,
3984 { "Extended Chunk Data Enabled", "gvcp.bootstrap.sccfgx.extendedchunkdataenabled",
3985 FT_BOOLEAN, 32, NULL, 0x1,
3989 /* GVCP_SC_ZONE(0), 1, 2, 3 */
3991 {& hf_gvcp_sc_additional_zones_v2_0,
3992 { "Additional Zones", "gvcp.bootstrap.sczx.additionalzones",
3993 FT_UINT32, BASE_DEC, NULL, 0x0000000F,
3997 /* GVCP_SC_ZONE_DIRECTION(0), 1, 2, 3 */
3999 {& hf_gvcp_sc_zone0_direction_v2_0,
4000 { "Zone 0 Direction", "gvcp.bootstrap.sczdx.zone0direction",
4001 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x80000000,
4005 {& hf_gvcp_sc_zone1_direction_v2_0,
4006 { "Zone 1 Direction", "gvcp.bootstrap.sczdx.zone1direction",
4007 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x40000000,
4011 {& hf_gvcp_sc_zone2_direction_v2_0,
4012 { "Zone 2 Direction", "gvcp.bootstrap.sczdx.zone2direction",
4013 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x20000000,
4017 {& hf_gvcp_sc_zone3_direction_v2_0,
4018 { "Zone 3 Direction", "gvcp.bootstrap.sczdx.zone3direction",
4019 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x10000000,
4023 {& hf_gvcp_sc_zone4_direction_v2_0,
4024 { "Zone 4 Direction", "gvcp.bootstrap.sczdx.zone4direction",
4025 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x08000000,
4029 {& hf_gvcp_sc_zone5_direction_v2_0,
4030 { "Zone 5 Direction", "gvcp.bootstrap.sczdx.zone5direction",
4031 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x04000000,
4035 {& hf_gvcp_sc_zone6_direction_v2_0,
4036 { "Zone 6 Direction", "gvcp.bootstrap.sczdx.zone6direction",
4037 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x02000000,
4041 {& hf_gvcp_sc_zone7_direction_v2_0,
4042 { "Zone 7 Direction", "gvcp.bootstrap.sczdx.zone7direction",
4043 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x01000000,
4047 {& hf_gvcp_sc_zone8_direction_v2_0,
4048 { "Zone 8 Direction", "gvcp.bootstrap.sczdx.zone8direction",
4049 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00800000,
4053 {& hf_gvcp_sc_zone9_direction_v2_0,
4054 { "Zone 9 Direction", "gvcp.bootstrap.sczdx.zone9direction",
4055 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00400000,
4059 {& hf_gvcp_sc_zone10_direction_v2_0,
4060 { "Zone 10 Direction", "gvcp.bootstrap.sczdx.zone10direction",
4061 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00200000,
4065 {& hf_gvcp_sc_zone11_direction_v2_0,
4066 { "Zone 11 Direction", "gvcp.bootstrap.sczdx.zone1direction",
4067 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00100000,
4071 {& hf_gvcp_sc_zone12_direction_v2_0,
4072 { "Zone 12 Direction", "gvcp.bootstrap.sczdx.zone12direction",
4073 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00080000,
4077 {& hf_gvcp_sc_zone13_direction_v2_0,
4078 { "Zone 13 Direction", "gvcp.bootstrap.sczdx.zone13direction",
4079 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00040000,
4083 {& hf_gvcp_sc_zone14_direction_v2_0,
4084 { "Zone 14 Direction", "gvcp.bootstrap.sczdx.zone14direction",
4085 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00020000,
4089 {& hf_gvcp_sc_zone15_direction_v2_0,
4090 { "Zone 15 Direction", "gvcp.bootstrap.sczdx.zone15direction",
4091 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00010000,
4095 {& hf_gvcp_sc_zone16_direction_v2_0,
4096 { "Zone 16 Direction", "gvcp.bootstrap.sczdx.zone16direction",
4097 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00008000,
4101 {& hf_gvcp_sc_zone17_direction_v2_0,
4102 { "Zone 17 Direction", "gvcp.bootstrap.sczdx.zone17direction",
4103 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00004000,
4107 {& hf_gvcp_sc_zone18_direction_v2_0,
4108 { "Zone 18 Direction", "gvcp.bootstrap.sczdx.zone18direction",
4109 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00002000,
4113 {& hf_gvcp_sc_zone19_direction_v2_0,
4114 { "Zone 19 Direction", "gvcp.bootstrap.sczdx.zone19direction",
4115 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00001000,
4119 {& hf_gvcp_sc_zone20_direction_v2_0,
4120 { "Zone 20 Direction", "gvcp.bootstrap.sczdx.zone20direction",
4121 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000800,
4125 {& hf_gvcp_sc_zone21_direction_v2_0,
4126 { "Zone 21 Direction", "gvcp.bootstrap.sczdx.zone21direction",
4127 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000400,
4131 {& hf_gvcp_sc_zone22_direction_v2_0,
4132 { "Zone 22 Direction", "gvcp.bootstrap.sczdx.zone22direction",
4133 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000200,
4137 {& hf_gvcp_sc_zone23_direction_v2_0,
4138 { "Zone 23 Direction", "gvcp.bootstrap.sczdx.zone23direction",
4139 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000100,
4143 {& hf_gvcp_sc_zone24_direction_v2_0,
4144 { "Zone 24 Direction", "gvcp.bootstrap.sczdx.zone24direction",
4145 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000080,
4149 {& hf_gvcp_sc_zone25_direction_v2_0,
4150 { "Zone 25 Direction", "gvcp.bootstrap.sczdx.zone25direction",
4151 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000040,
4155 {& hf_gvcp_sc_zone26_direction_v2_0,
4156 { "Zone 26 Direction", "gvcp.bootstrap.sczdx.zone26direction",
4157 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000020,
4161 {& hf_gvcp_sc_zone27_direction_v2_0,
4162 { "Zone 27 Direction", "gvcp.bootstrap.sczdx.zone27direction",
4163 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000010,
4167 {& hf_gvcp_sc_zone28_direction_v2_0,
4168 { "Zone 28 Direction", "gvcp.bootstrap.sczdx.zone28direction",
4169 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000008,
4173 {& hf_gvcp_sc_zone29_direction_v2_0,
4174 { "Zone 29 Direction", "gvcp.bootstrap.sczdx.zone29direction",
4175 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000004,
4179 {& hf_gvcp_sc_zone30_direction_v2_0,
4180 { "Zone 30 Direction", "gvcp.bootstrap.sczdx.zone30direction",
4181 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000002,
4185 {& hf_gvcp_sc_zone31_direction_v2_0,
4186 { "Zone 31 Direction", "gvcp.bootstrap.sczdx.zone31direction",
4187 FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000001,
4191 /* GVCP_SC_MAX_PACKET_COUNT(0), 1, 2, 3 */
4193 { &hf_gvcp_sc_max_packet_count_v2_2,
4194 { "Max. Packet Count", "gvcp.bootstrap.scmpcx.maxpacketcount",
4195 FT_UINT32, BASE_DEC, NULL, 0x0,
4199 /* GVCP_SC_MAX_BLOCK_SIZE_HIGH(0), 1, 2, 3 */
4201 { &hf_gvcp_sc_max_block_size_high_v2_2,
4202 { "Max. Block Size (High)", "gvcp.bootstrap.maxblocksizehigh",
4203 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
4207 /* GVCP_SC_MAX_BLOCK_SIZE_LOW(0), 1, 2, 3 */
4209 { &hf_gvcp_sc_max_block_size_low_v2_2,
4210 { "Max. Payload Size (Low)", "gvcp.bootstrap.maxblocksizelow",
4211 FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
4215 /* GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(0), 1, 2, 3 */
4217 { &hf_gvcp_sc_extended_registers_address_v2_2,
4218 { "Stream Channel Extended Bootstrap Address", "gvcp.bootstrap.extendedbootstrapaddress",
4219 FT_UINT32, BASE_HEX, NULL, 0x0,
4223 /* GVCP_SC_GENDC_DESCRIPTOR_ADDRESS(0), 1, 2, 3 */
4225 { &hf_gvcp_sc_gendc_descriptor_address_v2_2,
4226 { "Stream Channel GenDC Descriptor Address", "gvcp.bootstrap.gendc.descriptoraddress",
4227 FT_UINT32, BASE_HEX, NULL, 0x0,
4231 /* GVCP_SC_GENDC_DESCRIPTOR_SIZE(0), 1, 2, 3 */
4233 { &hf_gvcp_sc_gendc_descriptor_size_v2_2,
4234 { "Stream Channel GenDC Descriptor Size", "gvcp.bootstrap.gedc.descriptorsize",
4235 FT_UINT32, BASE_HEX, NULL, 0x0,
4239 /* GVCP_SC_GENDC_FLOW_MAPPING_TABLE_ADDRESS(0), 1, 2, 3 */
4241 { &hf_gvcp_sc_gendc_flow_mapping_table_address_v2_2,
4242 { "Stream Channel GenDC Flow Mapping Table Address", "gvcp.bootstrap.gendc.flowmappingtablesize",
4243 FT_UINT32, BASE_HEX, NULL, 0x0,
4247 /* GVCP_SC_GENDC_FLOW_MAPPING_TABLE_SIZE(0), 1, 2, 3 */
4249 { &hf_gvcp_sc_gendc_flow_mapping_table_size_v2_2,
4250 { "Stream Channel GenDC Flow Mapping Table Size", "gvcp.bootstrap.gendc.flowmappingtablesize",
4251 FT_UINT32, BASE_HEX, NULL, 0x0,
4255 /* GVCP_ACTION_GROUP_KEY(0), 1, 2, 3, 4, 5, 6, 7, 8, 9 */
4257 {& hf_gvcp_action_group_key,
4258 { "Action Group Key", "gvcp.bootstrap.actiongroupkey",
4259 FT_UINT32, BASE_DEC, NULL, 0x0,
4263 /* GVCP_ACTION_GROUP_MASK(0), 1, 2, 3, 4, 5, 6, 7, 8, 9 */
4265 {& hf_gvcp_action_group_mask,
4266 { "Action Group Mask", "gvcp.bootstrap.actiongroupmask",
4267 FT_UINT32, BASE_HEX, NULL, 0x0,
4272 { "Latency Value (in us)", "gvcp.bootstrap.latency",
4273 FT_UINT32, BASE_DEC, NULL, 0x0,
4277 {& hf_gvcp_custom_register_addr,
4278 { "Custom Register Address", "gvcp.bootstrap.custom.register.write",
4279 FT_UINT32, BASE_HEX, NULL, 0x0,
4283 {& hf_gvcp_custom_memory_addr,
4284 { "Custom Memory Address", "gvcp.bootstrap.custom.register.write",
4285 FT_UINT32, BASE_HEX, NULL, 0x0,
4289 /* Request/Response tracking */
4290 {& hf_gvcp_response_in,
4291 { "Response In", "gvcp.response_in",
4292 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
4293 "The response to this GVCP request is in this frame", HFILL
4296 {& hf_gvcp_response_to,
4297 { "Request In", "gvcp.response_to",
4298 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
4299 "This is a response to the GVCP request in this frame", HFILL
4302 /* Generated from convert_proto_tree_add_text.pl */
4303 { &hf_gvcp_reserved_bit, { "Reserved Bit", "gvcp.reserved_bit", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4304 { &hf_gvcp_manifest_table, { "Manifest Table", "gvcp.manifest_table", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4305 { &hf_gvcp_custom_register_value, { "Value", "gvcp.bootstrap.custom.register.value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
4306 { &hf_gvcp_custom_read_register_addr, { "Custom Register Address", "gvcp.bootstrap.custom.register.read", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
4307 { &hf_gvcp_custom_read_register_value, { "Custom Register Value", "gvcp.bootstrap.custom.register.read_value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
4308 { &hf_gvcp_readmemcmd_data_read, { "Data read", "gvcp.cmd.readmem.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
4311 static gint *ett[] = {
4316 &ett_gvcp_payload_cmd,
4317 &ett_gvcp_payload_ack,
4318 &ett_gvcp_payload_ack_subtree,
4319 &ett_gvcp_payload_cmd_subtree,
4320 &ett_gvcp_bootstrap_fields
4323 proto_gvcp = proto_register_protocol("GigE Vision Control Protocol", "GVCP", "gvcp");
4325 gvcp_handle = register_dissector("gvcp", dissect_gvcp, proto_gvcp);
4327 proto_register_field_array(proto_gvcp, hf, array_length(hf));
4328 proto_register_subtree_array(ett, array_length(ett));
4331 /* The registration hand-off routing */
4333 void proto_reg_handoff_gvcp(void)
4335 dissector_add_uint("udp.port", global_gvcp_port, gvcp_handle);
4336 gvsp_handle = find_dissector("gvsp");
4340 * Editor modelines - https://www.wireshark.org/tools/modelines.html
4345 * indent-tabs-mode: t
4348 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
4349 * :indentSize=8:tabSize=8:noTabs=false: