/src/wireshark/epan/dissectors/packet-gvcp.c
Line | Count | Source |
1 | | /* packet-gvcp.c |
2 | | * Routines for AIA GigE Vision (TM) Control Protocol dissection |
3 | | * Copyright 2012, AIA <www.visiononline.org> All rights reserved |
4 | | * |
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 |
7 | | * Protocol. |
8 | | * |
9 | | * Wireshark - Network traffic analyzer |
10 | | * By Gerald Combs <gerald@wireshark.org> |
11 | | * Copyright 1998 Gerald Combs |
12 | | * |
13 | | * SPDX-License-Identifier: GPL-2.0-or-later |
14 | | */ |
15 | | |
16 | | #include "config.h" |
17 | | |
18 | | #include <epan/packet.h> |
19 | | #include <epan/conversation.h> |
20 | | #include <epan/tfs.h> |
21 | | |
22 | 27 | #define GVCP_MIN_PACKET_SIZE ( 8 ) |
23 | 58.9k | #define GVCP_MAX_STREAM_CHANNEL_COUNT ( 512 ) |
24 | | |
25 | | /* |
26 | | header fields to show the relations between |
27 | | request and response as well as the response time |
28 | | */ |
29 | | static int hf_gvcp_response_in; |
30 | | static int hf_gvcp_response_to; |
31 | | |
32 | | /* |
33 | | structure to hold info to remember between the requests and responses |
34 | | */ |
35 | | typedef struct _gvcp_transaction_t { |
36 | | uint32_t req_frame; |
37 | | uint32_t rep_frame; |
38 | | wmem_array_t *addr_list; |
39 | | uint32_t addr_count; |
40 | | } gvcp_transaction_t; |
41 | | |
42 | | wmem_array_t* gvcp_trans_array; |
43 | | |
44 | | /* |
45 | | structure to hold persistent info for each conversation |
46 | | */ |
47 | | typedef struct _gvcp_conv_info_t { |
48 | | wmem_map_t *pdus; |
49 | | uint32_t extended_bootstrap_address[GVCP_MAX_STREAM_CHANNEL_COUNT]; |
50 | | } gvcp_conv_info_t; |
51 | | |
52 | | /* |
53 | | Bootstrap registers addresses |
54 | | */ |
55 | | |
56 | 39 | #define GVCP_VERSION (0x00000000) |
57 | 0 | #define GVCP_DEVICE_MODE (0x00000004) |
58 | 0 | #define GVCP_DEVICE_MAC_HIGH_0 (0x00000008) |
59 | 0 | #define GVCP_DEVICE_MAC_LOW_0 (0x0000000C) |
60 | 0 | #define GVCP_SUPPORTED_IP_CONFIGURATION_0 (0x00000010) |
61 | 0 | #define GVCP_CURIPCFG_0 (0x00000014) |
62 | 0 | #define GVCP_CURRENT_IP_ADDRESS_0 (0x00000024) |
63 | 0 | #define GVCP_CURRENT_SUBNET_MASK_0 (0x00000034) |
64 | 0 | #define GVCP_CURRENT_DEFAULT_GATEWAY_0 (0x00000044) |
65 | 0 | #define GVCP_MANUFACTURER_NAME (0x00000048) |
66 | 0 | #define GVCP_MODEL_NAME (0x00000068) |
67 | 0 | #define GVCP_DEVICE_VERSION (0x00000088) |
68 | 0 | #define GVCP_MANUFACTURER_INFO (0x000000A8) |
69 | 0 | #define GVCP_SERIAL_NUMBER (0x000000d8) |
70 | 0 | #define GVCP_USER_DEFINED_NAME (0x000000E8) |
71 | 0 | #define GVCP_FIRST_URL (0x00000200) |
72 | 0 | #define GVCP_SECOND_URL (0x00000400) |
73 | 0 | #define GVCP_NUMBER_OF_NETWORK_INTERFACES (0x00000600) |
74 | 0 | #define GVCP_PERSISTENT_IP_ADDRESS_0 (0x0000064C) |
75 | 0 | #define GVCP_PERSISTENT_SUBNET_MASK_0 (0x0000065C) |
76 | 0 | #define GVCP_PERSISTENT_DEFAULT_GATEWAY_0 (0x0000066C) |
77 | 0 | #define GVCP_LINK_SPEED_0 (0x00000670) |
78 | 0 | #define GVCP_DEVICE_MAC_HIGH_1 (0x00000680) |
79 | 0 | #define GVCP_DEVICE_MAC_LOW_1 (0x00000684) |
80 | 0 | #define GVCP_SUPPORTED_IP_CONFIGURATION_1 (0x00000688) |
81 | 0 | #define GVCP_CURIPCFG_1 (0x0000068C) |
82 | 0 | #define GVCP_CURRENT_IP_ADDRESS_1 (0x0000069C) |
83 | 0 | #define GVCP_CURRENT_SUBNET_MASK_1 (0x000006AC) |
84 | 0 | #define GVCP_CURRENT_DEFAULT_GATEWAY_1 (0x000006BC) |
85 | 0 | #define GVCP_PERSISTENT_IP_ADDRESS_1 (0x000006CC) |
86 | 0 | #define GVCP_PERSISTENT_SUBNET_MASK_1 (0x000006DC) |
87 | 0 | #define GVCP_PERSISTENT_DEFAULT_GATEWAY_1 (0x000006EC) |
88 | 0 | #define GVCP_LINK_SPEED_1 (0x000006F0) |
89 | 1 | #define GVCP_DEVICE_MAC_HIGH_2 (0x00000700) |
90 | 0 | #define GVCP_DEVICE_MAC_LOW_2 (0x00000704) |
91 | 0 | #define GVCP_SUPPORTED_IP_CONFIGURATION_2 (0x00000708) |
92 | 0 | #define GVCP_CURIPCFG_2 (0x0000070C) |
93 | 0 | #define GVCP_CURRENT_IP_ADDRESS_2 (0x0000071C) |
94 | 0 | #define GVCP_CURRENT_SUBNET_MASK_2 (0x0000072C) |
95 | 0 | #define GVCP_CURRENT_DEFAULT_GATEWAY_2 (0x0000073C) |
96 | 0 | #define GVCP_PERSISTENT_IP_ADDRESS_2 (0x0000074C) |
97 | 0 | #define GVCP_PERSISTENT_SUBNET_MASK_2 (0x0000075C) |
98 | 0 | #define GVCP_PERSISTENT_DEFAULT_GATEWAY_2 (0x0000076C) |
99 | 0 | #define GVCP_LINK_SPEED_2 (0x00000770) |
100 | 1 | #define GVCP_DEVICE_MAC_HIGH_3 (0x00000780) |
101 | 0 | #define GVCP_DEVICE_MAC_LOW_3 (0x00000784) |
102 | 0 | #define GVCP_SUPPORTED_IP_CONFIGURATION_3 (0x00000788) |
103 | 0 | #define GVCP_CURIPCFG_3 (0x0000078C) |
104 | 0 | #define GVCP_CURRENT_IP_ADDRESS_3 (0x0000079C) |
105 | 0 | #define GVCP_CURRENT_SUBNET_MASK_3 (0x000007AC) |
106 | 0 | #define GVCP_CURRENT_DEFAULT_GATEWAY_3 (0x000007BC) |
107 | 0 | #define GVCP_PERSISTENT_IP_ADDRESS_3 (0x000007CC) |
108 | 0 | #define GVCP_PERSISTENT_SUBNET_MASK_3 (0x000007DC) |
109 | 0 | #define GVCP_PERSISTENT_DEFAULT_GATEWAY_3 (0x000007EC) |
110 | 0 | #define GVCP_LINK_SPEED_3 (0x000007F0) |
111 | 0 | #define GVCP_NUMBER_OF_MESSAGE_CHANNELS (0x00000900) |
112 | 0 | #define GVCP_NUMBER_OF_STREAM_CHANNELS (0x00000904) |
113 | 0 | #define GVCP_NUMBER_OF_ACTION_SIGNALS (0x00000908) |
114 | 0 | #define GVCP_ACTION_DEVICE_KEY (0x0000090C) |
115 | 0 | #define GVCP_NUMBER_OF_ACTIVE_LINKS (0x00000910) |
116 | 0 | #define GVCP_SC_CAPS (0x0000092C) |
117 | 0 | #define GVCP_MESSAGE_CHANNEL_CAPS (0x00000930) |
118 | 0 | #define GVCP_CAPABILITY (0x00000934) |
119 | 0 | #define GVCP_HEARTBEAT_TIMEOUT (0x00000938) |
120 | 0 | #define GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH (0x0000093C) |
121 | 0 | #define GVCP_TIMESTAMP_TICK_FREQUENCY_LOW (0x00000940) |
122 | 0 | #define GVCP_TIMESTAMP_CONTROL (0x00000944) |
123 | 0 | #define GVCP_TIMESTAMP_VALUE_HIGH (0x00000948) |
124 | 0 | #define GVCP_TIMESTAMP_VALUE_LOW (0x0000094C) |
125 | 0 | #define GVCP_DISCOVERY_ACK_DELAY (0x00000950) |
126 | 0 | #define GVCP_CONFIGURATION (0x00000954) |
127 | 0 | #define GVCP_PENDING_TIMEOUT (0x00000958) |
128 | 0 | #define GVCP_CONTROL_SWITCHOVER_KEY (0x0000095C) |
129 | 0 | #define GVCP_GVSCP_CONFIGURATION (0x00000960) |
130 | 0 | #define GVCP_PHYSICAL_LINK_CAPABILITY (0x00000964) |
131 | 0 | #define GVCP_PHYSICAL_LINK_CONFIGURATION (0x00000968) |
132 | 0 | #define GVCP_IEEE_1588_STATUS (0x0000096C) |
133 | 0 | #define GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE (0x00000970) |
134 | 0 | #define GVCP_IEEE_1588_EXTENDED_CAPABILITY (0x00000974) |
135 | 0 | #define GVCP_IEEE_1588_SUPPORTED_PROFILES (0x00000978) |
136 | 0 | #define GVCP_IEEE_1588_SELECTED_PROFILE (0x0000097C) |
137 | 0 | #define GVCP_CCP (0x00000A00) |
138 | 0 | #define GVCP_PRIMARY_APPLICATION_PORT (0x00000A04) |
139 | 0 | #define GVCP_PRIMARY_APPLICATION_IP_ADDRESS (0x00000A14) |
140 | 5 | #define GVCP_MC_DESTINATION_PORT (0x00000B00) |
141 | 0 | #define GVCP_MC_DESTINATION_ADDRESS (0x00000B10) |
142 | 0 | #define GVCP_MC_TIMEOUT (0x00000B14) |
143 | 0 | #define GVCP_MC_RETRY_COUNT (0x00000B18) |
144 | 0 | #define GVCP_MC_SOURCE_PORT (0x00000B1C) |
145 | 0 | #define GVCP_MC_CONFIGURATION (0x00000B20) /* GEV 2.2 */ |
146 | 0 | #define GVCP_MANIFEST_TABLE (0x00009000) |
147 | | |
148 | 17 | #define GVCP_SC_DESTINATION_PORT(I) (0x0d00+(0x40*I)) |
149 | 0 | #define GVCP_SC_PACKET_SIZE(I) (0x0d04+(0x40*I)) |
150 | 0 | #define GVCP_SC_PACKET_DELAY(I) (0x0d08+(0x40*I)) |
151 | 0 | #define GVCP_SC_DESTINATION_ADDRESS(I) (0x0d18+(0x40*I)) |
152 | 0 | #define GVCP_SC_SOURCE_PORT(I) (0x0d1C+(0x40*I)) |
153 | 0 | #define GVCP_SC_CAPABILITY(I) (0x0d20+(0x40*I)) |
154 | 0 | #define GVCP_SC_CONFIGURATION(I) (0x0d24+(0x40*I)) |
155 | 0 | #define GVCP_SC_ZONE(I) (0x0d28+(0x40*I)) |
156 | 0 | #define GVCP_SC_ZONE_DIRECTION(I) (0x0d2C+(0x40*I)) |
157 | 0 | #define GVCP_SC_MAX_PACKET_COUNT(I) (0x0d30+(0x40*I)) /* GEV 2.2 */ |
158 | 0 | #define GVCP_SC_MAX_BLOCK_SIZE_HIGH(I) (0x0d34+(0x40*I)) /* GEV 2.2 */ |
159 | 0 | #define GVCP_SC_MAX_BLOCK_SIZE_LOW(I) (0x0d38+(0x40*I)) /* GEV 2.2 */ |
160 | 0 | #define GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(I) (0x0d3C+(0x40*I)) /* GEV 2.2 */ |
161 | | |
162 | | /* Real address: GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(I) + the values defined here */ |
163 | 0 | #define GVCP_SC_GENDC_DESCRIPTOR_ADDRESS ( 0x0000 ) /* GEV 2.2 */ |
164 | 0 | #define GVCP_SC_GENDC_DESCRIPTOR_SIZE ( 0x0004 ) /* GEV 2.2 */ |
165 | 0 | #define GVCP_SC_GENDC_FLOW_MAPPING_TABLE_ADDRESS ( 0x0008 ) /* GEV 2.2 */ |
166 | 0 | #define GVCP_SC_GENDC_FLOW_MAPPING_TABLE_SIZE ( 0x000C ) /* GEV 2.2 */ |
167 | 0 | #define GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS_LAST ( 0x000C ) |
168 | | |
169 | 0 | #define GVCP_ACTION_GROUP_KEY(I) (0x9800+(0x10*I)) |
170 | 0 | #define GVCP_ACTION_GROUP_MASK(I) (0x9804+(0x10*I)) |
171 | | |
172 | | |
173 | | /* |
174 | | Command and acknowledge IDs |
175 | | */ |
176 | | |
177 | 18 | #define GVCP_DISCOVERY_CMD (0x0002) |
178 | 0 | #define GVCP_DISCOVERY_ACK (0x0003) |
179 | 18 | #define GVCP_FORCEIP_CMD (0x0004) |
180 | 0 | #define GVCP_FORCEIP_ACK (0x0005) |
181 | 9 | #define GVCP_PACKETRESEND_CMD (0x0040) |
182 | 0 | #define GVCP_PACKETRESEND_ACK (0x0041) |
183 | 2 | #define GVCP_READREG_CMD (0x0080) |
184 | 2 | #define GVCP_READREG_ACK (0x0081) |
185 | 5 | #define GVCP_WRITEREG_CMD (0x0082) |
186 | 0 | #define GVCP_WRITEREG_ACK (0x0083) |
187 | 0 | #define GVCP_READMEM_CMD (0x0084) |
188 | 1 | #define GVCP_READMEM_ACK (0x0085) |
189 | 0 | #define GVCP_WRITEMEM_CMD (0x0086) |
190 | 1 | #define GVCP_WRITEMEM_ACK (0x0087) |
191 | 4 | #define GVCP_PENDING_ACK (0x0089) |
192 | 27 | #define GVCP_EVENT_CMD (0x00C0) |
193 | 0 | #define GVCP_EVENT_ACK (0x00C1) |
194 | 18 | #define GVCP_EVENTDATA_CMD (0x00C2) |
195 | 0 | #define GVCP_EVENTDATA_ACK (0x00C3) |
196 | 18 | #define GVCP_ACTION_CMD (0x0100) |
197 | 0 | #define GVCP_ACTION_ACK (0x0101) |
198 | | |
199 | | |
200 | | /* |
201 | | GVCP statuses |
202 | | */ |
203 | | |
204 | | #define GEV_STATUS_SUCCESS (0x0000) |
205 | | #define GEV_STATUS_PACKET_RESEND (0x0100) |
206 | | #define GEV_STATUS_NOT_IMPLEMENTED (0x8001) |
207 | | #define GEV_STATUS_INVALID_PARAMETER (0x8002) |
208 | | #define GEV_STATUS_INVALID_ADDRESS (0x8003) |
209 | | #define GEV_STATUS_WRITE_PROTECT (0x8004) |
210 | | #define GEV_STATUS_BAD_ALIGNMENT (0x8005) |
211 | | #define GEV_STATUS_ACCESS_DENIED (0x8006) |
212 | | #define GEV_STATUS_BUSY (0x8007) |
213 | | #define GEV_STATUS_LOCAL_PROBLEM (0x8008) /* deprecated */ |
214 | | #define GEV_STATUS_MSG_MISMATCH (0x8009) /* deprecated */ |
215 | | #define GEV_STATUS_INVALID_PROTOCOL (0x800A) /* deprecated */ |
216 | | #define GEV_STATUS_NO_MSG (0x800B) /* deprecated */ |
217 | | #define GEV_STATUS_PACKET_UNAVAILABLE (0x800C) |
218 | | #define GEV_STATUS_DATA_OVERRUN (0x800D) |
219 | | #define GEV_STATUS_INVALID_HEADER (0x800E) |
220 | | #define GEV_STATUS_WRONG_CONFIG (0x800F) /* deprecated */ |
221 | | #define GEV_STATUS_PACKET_NOT_YET_AVAILABLE (0x8010) |
222 | | #define GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY (0x8011) |
223 | | #define GEV_STATUS_PACKET_REMOVED_FROM_MEMORY (0x8012) |
224 | | #define GEV_STATUS_NO_REF_TIME (0x8013) /* GEV 2.0 */ |
225 | | #define GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE (0x8014) /* GEV 2.0 */ |
226 | | #define GEV_STATUS_OVERFLOW (0x8015) /* GEV 2.0 */ |
227 | | #define GEV_STATUS_ACTION_LATE (0x8016) /* GEV 2.0 */ |
228 | | #define GEV_STATUS_LEADER_TRAILER_OVERFLOW (0x8017) /* GEV 2.1 */ |
229 | | #define GEV_STATUS_ERROR (0x8FFF) |
230 | | |
231 | | |
232 | | /* |
233 | | Device modes |
234 | | */ |
235 | | |
236 | | #define GEV_DEVICEMODE_TRANSMITTER (0x00 ) |
237 | | #define GEV_DEVICEMODE_RECEIVER (0x01) |
238 | | #define GEV_DEVICEMODE_TRANSCEIVER (0x02) |
239 | | #define GEV_DEVICEMODE_PERIPHERAL (0x03) |
240 | | |
241 | | |
242 | | /* |
243 | | Event IDs |
244 | | */ |
245 | | |
246 | | #define GEV_EVENT_TRIGGER (0x0002) /* deprecated */ |
247 | | #define GEV_EVENT_START_OF_EXPOSURE (0x0003) /* deprecated */ |
248 | | #define GEV_EVENT_END_OF_EXPOSURE (0x0004) /* deprecated */ |
249 | | #define GEV_EVENT_START_OF_TRANSFER (0x0005) /* deprecated */ |
250 | | #define GEV_EVENT_END_OF_TRANSFER (0x0006) /* deprecated */ |
251 | | #define GEV_EVENT_PRIMARY_APP_SWITCH (0x0007) |
252 | | #define GEV_EVENT_EVENT_LINK_SPEED_CHANGE (0x0008) |
253 | | #define GEV_EVENT_ACTION_LATE (0x0009) |
254 | | #define GEV_EVENT_ERROR_001 (0x8001) |
255 | | |
256 | | |
257 | | /* |
258 | | Link configurations |
259 | | */ |
260 | | |
261 | | #define GEV_LINKCONFIG_SINGLELINK (0x00) |
262 | | #define GEV_LINKCONFIG_MULTIPLELINKS (0x01) |
263 | | #define GEV_LINKCONFIG_STATICLAG (0x02) |
264 | | #define GEV_LINKCONFIG_DYNAMICLAG (0x03) |
265 | | |
266 | | |
267 | | void proto_register_gvcp(void); |
268 | | void proto_reg_handoff_gvcp(void); |
269 | | |
270 | | /* Define the gvcp proto */ |
271 | | static int proto_gvcp; |
272 | | static int global_gvcp_port = 3956; |
273 | | |
274 | | static int hf_gvcp_custom_register_addr; |
275 | | static int hf_gvcp_custom_memory_addr; |
276 | | |
277 | | /* |
278 | | \brief IDs used for bootstrap dissection |
279 | | */ |
280 | | |
281 | | static int hf_gvcp_message_key_code; |
282 | | static int hf_gvcp_flag; |
283 | | static int hf_gvcp_acknowledge_required_flag; |
284 | | static int hf_gvcp_allow_broadcast_acknowledge_flag; |
285 | | static int hf_gvcp_command; |
286 | | static int hf_gvcp_length; |
287 | | static int hf_gvcp_request_id; |
288 | | static int hf_gvcp_status; |
289 | | static int hf_gvcp_acknowledge; |
290 | | static int hf_gvcp_spec_version_major; |
291 | | static int hf_gvcp_spec_version_minor; |
292 | | static int hf_gvcp_devicemodediscovery; |
293 | | static int hf_gvcp_device_mac_address; |
294 | | static int hf_gvcp_ip_config_persistent_ip; |
295 | | static int hf_gvcp_ip_config_dhcp; |
296 | | static int hf_gvcp_ip_config_lla; |
297 | | static int hf_gvcp_current_IP; |
298 | | static int hf_gvcp_current_subnet_mask; |
299 | | static int hf_gvcp_current_default_gateway; |
300 | | static int hf_gvcp_manufacturer_name; |
301 | | static int hf_gvcp_model_name; |
302 | | static int hf_gvcp_device_version; |
303 | | static int hf_gvcp_manufacturer_specific_info; |
304 | | static int hf_gvcp_serial_number; |
305 | | static int hf_gvcp_user_defined_name; |
306 | | static int hf_gvcp_first_xml_device_description_file; |
307 | | static int hf_gvcp_second_xml_device_description_file; |
308 | | static int hf_gvcp_readregcmd_bootstrap_register; |
309 | | static int hf_gvcp_writeregcmd_bootstrap_register; |
310 | | static int hf_gvcp_writeregcmd_data; |
311 | | static int hf_gvcp_writeregcmd_data_index; |
312 | | static int hf_gvcp_readmemcmd_address; |
313 | | static int hf_gvcp_readmemcmd_bootstrap_register; |
314 | | static int hf_gvcp_readmemcmd_count; |
315 | | static int hf_gvcp_writememcmd_data; |
316 | | static int hf_gvcp_writememcmd_data_index; |
317 | | static int hf_gvcp_forceip_mac_address; |
318 | | static int hf_gvcp_forceip_static_IP; |
319 | | static int hf_gvcp_forceip_static_subnet_mask; |
320 | | static int hf_gvcp_forceip_static_default_gateway; |
321 | | static int hf_gvcp_resendcmd_stream_channel_index; |
322 | | static int hf_gvcp_resendcmd_block_id; |
323 | | static int hf_gvcp_resendcmd_first_packet_id; |
324 | | static int hf_gvcp_resendcmd_last_packet_id; |
325 | | static int hf_gvcp_eventcmd_id; |
326 | | static int hf_gvcp_eventcmd_error_id; |
327 | | static int hf_gvcp_eventcmd_extid_length; |
328 | | static int hf_gvcp_eventcmd_device_specific_id; |
329 | | static int hf_gvcp_eventcmd_stream_channel_index; |
330 | | static int hf_gvcp_eventcmd_block_id; |
331 | | static int hf_gvcp_eventcmd_timestamp; |
332 | | static int hf_gvcp_eventcmd_data; |
333 | | static int hf_gvcp_actioncmd_device_key; |
334 | | static int hf_gvcp_actioncmd_group_key; |
335 | | static int hf_gvcp_actioncmd_group_mask; |
336 | | static int hf_gvcp_time_to_completion; |
337 | | static int hf_gvcp_devicemode_endianness; |
338 | | static int hf_gvcp_devicemode_deviceclass; |
339 | | static int hf_gvcp_devicemode_characterset; |
340 | | static int hf_gvcp_machigh; |
341 | | static int hf_gvcp_maclow; |
342 | | static int hf_gvcp_persistent_ip; |
343 | | static int hf_gvcp_persistent_subnet; |
344 | | static int hf_gvcp_persistent_gateway; |
345 | | static int hf_gvcp_link_speed; |
346 | | static int hf_gvcp_number_message_channels; |
347 | | static int hf_gvcp_number_stream_channels; |
348 | | static int hf_gvcp_number_action_signals; |
349 | | static int hf_gvcp_capability_user_defined; |
350 | | static int hf_gvcp_capability_serial_number; |
351 | | static int hf_gvcp_capability_heartbeat_disable; |
352 | | static int hf_gvcp_capability_link_speed; |
353 | | static int hf_gvcp_capability_extended_status_code_v1_1; |
354 | | static int hf_gvcp_capability_ccp_application_portip; |
355 | | static int hf_gvcp_capability_manifest_table; |
356 | | static int hf_gvcp_capability_test_data; |
357 | | static int hf_gvcp_capability_discovery_ACK_delay; |
358 | | static int hf_gvcp_capability_writable_discovery_ACK_delay; |
359 | | static int hf_gvcp_capability_primary_application_switchover; |
360 | | static int hf_gvcp_capability_unconditional_action_command; |
361 | | static int hf_gvcp_capability_pending; |
362 | | static int hf_gvcp_capability_evendata; |
363 | | static int hf_gvcp_capability_event; |
364 | | static int hf_gvcp_capability_packetresend; |
365 | | static int hf_gvcp_capability_writemem; |
366 | | static int hf_gvcp_capability_concatenation; |
367 | | static int hf_gvcp_heartbeat; |
368 | | static int hf_gvcp_high_timestamp_frequency; |
369 | | static int hf_gvcp_low_timestamp_frequency; |
370 | | static int hf_gvcp_high_timestamp_value; |
371 | | static int hf_gvcp_low_timestamp_value; |
372 | | static int hf_gvcp_discovery_ACK_delay; |
373 | | static int hf_gvcp_configuration_pending_ack_enable; |
374 | | static int hf_gvcp_configuration_heartbeat_disable; |
375 | | static int hf_gvcp_pending_timeout_max_execution; |
376 | | static int hf_gvcp_control_switchover_key_register; |
377 | | static int hf_gvcp_control_switchover_key; |
378 | | static int hf_gvcp_control_switchover_en; |
379 | | static int hf_gvcp_control_access; |
380 | | static int hf_gvcp_exclusive_access; |
381 | | static int hf_gvcp_primary_application_host_port; |
382 | | static int hf_gvcp_primary_application_ip_address; |
383 | | static int hf_gvcp_network_interface_index; |
384 | | static int hf_gvcp_host_port; |
385 | | static int hf_gvcp_channel_destination_ip; |
386 | | static int hf_gvcp_message_channel_transmission_timeout; |
387 | | static int hf_gvcp_message_channel_retry_count; |
388 | | static int hf_gvcp_message_channel_source_port; |
389 | | static int hf_gvcp_sc_host_port; |
390 | | static int hf_gvcp_sc_ni_index; |
391 | | static int hf_gvcp_sc_direction; |
392 | | static int hf_gvcp_sc_fire_test_packet; |
393 | | static int hf_gvcp_sc_do_not_fragment; |
394 | | static int hf_gvcp_sc_pixel_endianness; |
395 | | static int hf_gvcp_sc_packet_size; |
396 | | static int hf_gvcp_sc_packet_delay; |
397 | | static int hf_gvcp_sc_destination_ip; |
398 | | static int hf_gvcp_sc_source_port; |
399 | | static int hf_gvcp_sc_big_little_endian_supported; |
400 | | static int hf_gvcp_sc_ip_reassembly_supported; |
401 | | static int hf_gvcp_sc_unconditional_streaming_supported; |
402 | | static int hf_gvcp_sc_extended_chunk_data_supported; |
403 | | static int hf_gvcp_sc_unconditional_streaming_enabled; |
404 | | static int hf_gvcp_configuration_extended_status_codes_enable_v1_1; |
405 | | static int hf_gvcp_sc_extended_chunk_data_enabled; |
406 | | static int hf_gvcp_action_group_key; |
407 | | static int hf_gvcp_action_group_mask; |
408 | | static int hf_gvcp_timestamp_control_latch; |
409 | | static int hf_gvcp_timestamp_control_reset; |
410 | | static int hf_gvcp_payloaddata; |
411 | | static int hf_gvcp_number_interfaces; |
412 | | static int hf_gvcp_supportedipconfig; |
413 | | static int hf_gvcp_currentipconfig; |
414 | | static int hf_gvcp_spec_version; |
415 | | |
416 | | /* Added for 2.0 support */ |
417 | | static int hf_gvcp_devicemode_current_link_configuration_v2_0; |
418 | | static int hf_gvcp_ip_config_can_handle_pause_frames_v2_0; |
419 | | static int hf_gvcp_ip_config_can_generate_pause_frames_v2_0; |
420 | | static int hf_gvcp_number_of_active_links_v2_0; |
421 | | static int hf_gvcp_sccaps_scspx_register_supported; |
422 | | static int hf_gvcp_sccaps_legacy_16bit_blockid_supported_v2_0; |
423 | | static int hf_gvcp_mcsp_supported; |
424 | | static int hf_gvcp_capability_1588_v2_0; |
425 | | static int hf_gvcp_capability_extended_status_code_v2_0; |
426 | | static int hf_gvcp_capability_scheduled_action_command_v2_0; |
427 | | static int hf_gvcp_capability_action_command; |
428 | | static int hf_gvcp_configuration_1588_enable_v2_0; |
429 | | static int hf_gvcp_configuration_extended_status_codes_enable_v2_0; |
430 | | static int hf_gvcp_configuration_unconditional_action_command_enable_v2_0; |
431 | | static int hf_gvcp_gvsp_configuration_64bit_blockid_enable_v2_0; |
432 | | static int hf_gvcp_link_dlag_v2_0; |
433 | | static int hf_gvcp_link_slag_v2_0; |
434 | | static int hf_gvcp_link_ml_v2_0; |
435 | | static int hf_gvcp_link_sl_v2_0; |
436 | | static int hf_gvcp_ieee1588_clock_status_v2_0; |
437 | | static int hf_gvcp_scheduled_action_command_queue_size_v2_0; |
438 | | static int hf_gvcp_sc_multizone_supported_v2_0; |
439 | | static int hf_gvcp_sc_packet_resend_destination_option_supported_v2_0; |
440 | | static int hf_gvcp_sc_packet_resend_all_in_transmission_supported_v2_0; |
441 | | static int hf_gvcp_sc_packet_resend_destination_option_enabled_v2_0; |
442 | | static int hf_gvcp_sc_packet_resend_all_in_transmission_enabled_v2_0; |
443 | | static int hf_gvcp_sc_additional_zones_v2_0; |
444 | | static int hf_gvcp_sc_zone0_direction_v2_0; |
445 | | static int hf_gvcp_sc_zone1_direction_v2_0; |
446 | | static int hf_gvcp_sc_zone2_direction_v2_0; |
447 | | static int hf_gvcp_sc_zone3_direction_v2_0; |
448 | | static int hf_gvcp_sc_zone4_direction_v2_0; |
449 | | static int hf_gvcp_sc_zone5_direction_v2_0; |
450 | | static int hf_gvcp_sc_zone6_direction_v2_0; |
451 | | static int hf_gvcp_sc_zone7_direction_v2_0; |
452 | | static int hf_gvcp_sc_zone8_direction_v2_0; |
453 | | static int hf_gvcp_sc_zone9_direction_v2_0; |
454 | | static int hf_gvcp_sc_zone10_direction_v2_0; |
455 | | static int hf_gvcp_sc_zone11_direction_v2_0; |
456 | | static int hf_gvcp_sc_zone12_direction_v2_0; |
457 | | static int hf_gvcp_sc_zone13_direction_v2_0; |
458 | | static int hf_gvcp_sc_zone14_direction_v2_0; |
459 | | static int hf_gvcp_sc_zone15_direction_v2_0; |
460 | | static int hf_gvcp_sc_zone16_direction_v2_0; |
461 | | static int hf_gvcp_sc_zone17_direction_v2_0; |
462 | | static int hf_gvcp_sc_zone18_direction_v2_0; |
463 | | static int hf_gvcp_sc_zone19_direction_v2_0; |
464 | | static int hf_gvcp_sc_zone20_direction_v2_0; |
465 | | static int hf_gvcp_sc_zone21_direction_v2_0; |
466 | | static int hf_gvcp_sc_zone22_direction_v2_0; |
467 | | static int hf_gvcp_sc_zone23_direction_v2_0; |
468 | | static int hf_gvcp_sc_zone24_direction_v2_0; |
469 | | static int hf_gvcp_sc_zone25_direction_v2_0; |
470 | | static int hf_gvcp_sc_zone26_direction_v2_0; |
471 | | static int hf_gvcp_sc_zone27_direction_v2_0; |
472 | | static int hf_gvcp_sc_zone28_direction_v2_0; |
473 | | static int hf_gvcp_sc_zone29_direction_v2_0; |
474 | | static int hf_gvcp_sc_zone30_direction_v2_0; |
475 | | static int hf_gvcp_sc_zone31_direction_v2_0; |
476 | | static int hf_gvcp_scheduledactioncommand_flag_v2_0; |
477 | | static int hf_gvcp_64bitid_flag_v2_0; |
478 | | static int hf_gvcp_resendcmd_extended_block_id_v2_0; |
479 | | static int hf_gvcp_resendcmd_extended_first_packet_id_v2_0; |
480 | | static int hf_gvcp_resendcmd_extended_last_packet_id_v2_0; |
481 | | static int hf_gvcp_actioncmd_time_v2_0; |
482 | | static int hf_gvcp_eventcmd_block_id_64bit_v2_0; |
483 | | |
484 | | /* Added for 2.1 support */ |
485 | | static int hf_gvcp_selected_ieee1588_profile_v2_1; |
486 | | static int hf_gvcp_capability_ieee1588_extended_capabilities_v2_1; |
487 | | static int hf_gvcp_ieee1588_profile_registers_present_v2_1; |
488 | | static int hf_gvcp_ieee1588_ptp_profile_supported_v2_1; |
489 | | static int hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1; |
490 | | static int hf_gvcp_sc_multi_part_supported_v2_1; |
491 | | static int hf_gvcp_sc_large_leader_trailer_supported_v2_1; |
492 | | static int hf_gvcp_sc_multi_part_enabled_v2_1; |
493 | | static int hf_gvcp_sc_large_leader_trailer_enabled_v2_1; |
494 | | |
495 | | /* Added for 2.2 support */ |
496 | | static int hf_gvcp_sccaps_scmbsx_supported_v2_2; |
497 | | static int hf_gvcp_sccaps_scebax_supported_v2_2; |
498 | | static int hf_gvcp_mccfg_supported_v2_2; |
499 | | static int hf_gvcp_mcec_supported_v2_2; |
500 | | static int hf_gvcp_mcec_enabled_v2_2; |
501 | | static int hf_gvcp_sc_scmpcx_supported_v2_2; |
502 | | static int hf_gvcp_sc_gendc_supported_v2_2; |
503 | | static int hf_gvcp_sc_gendc_enabled_v2_2; |
504 | | static int hf_gvcp_sc_max_packet_count_v2_2; |
505 | | static int hf_gvcp_sc_max_block_size_high_v2_2; |
506 | | static int hf_gvcp_sc_max_block_size_low_v2_2; |
507 | | static int hf_gvcp_sc_extended_registers_address_v2_2; |
508 | | static int hf_gvcp_sc_gendc_descriptor_address_v2_2; |
509 | | static int hf_gvcp_sc_gendc_descriptor_size_v2_2; |
510 | | static int hf_gvcp_sc_gendc_flow_mapping_table_address_v2_2; |
511 | | static int hf_gvcp_sc_gendc_flow_mapping_table_size_v2_2; |
512 | | static int hf_gvcp_readregcmd_extended_bootstrap_register; |
513 | | static int hf_gvcp_writeregcmd_extended_bootstrap_register; |
514 | | |
515 | | /* Generated from convert_proto_tree_add_text.pl */ |
516 | | static int hf_gvcp_custom_register_value; |
517 | | static int hf_gvcp_custom_read_register_addr; |
518 | | static int hf_gvcp_readmemcmd_data_read; |
519 | | static int hf_gvcp_custom_read_register_value; |
520 | | static int hf_gvcp_manifest_table; |
521 | | static int hf_gvcp_reserved_bit; |
522 | | |
523 | | /*Define the tree for gvcp*/ |
524 | | static int ett_gvcp; |
525 | | static int ett_gvcp_cmd; |
526 | | static int ett_gvcp_flags; |
527 | | static int ett_gvcp_ack; |
528 | | static int ett_gvcp_payload_cmd; |
529 | | static int ett_gvcp_payload_ack; |
530 | | static int ett_gvcp_payload_cmd_subtree; |
531 | | static int ett_gvcp_payload_ack_subtree; |
532 | | static int ett_gvcp_bootstrap_fields; |
533 | | |
534 | | static dissector_handle_t gvcp_handle; |
535 | | static dissector_handle_t gvsp_handle; |
536 | | |
537 | | /*Device Mode*/ |
538 | | static const value_string devicemodenames_class[] = { |
539 | | { GEV_DEVICEMODE_TRANSMITTER, "Transmitter" }, |
540 | | { GEV_DEVICEMODE_RECEIVER, "Receiver" }, |
541 | | { GEV_DEVICEMODE_TRANSCEIVER, "Transceiver" }, |
542 | | { GEV_DEVICEMODE_PERIPHERAL, "Peripheral" }, |
543 | | { 0, NULL }, |
544 | | }; |
545 | | |
546 | | /*Current Link Configuration*/ |
547 | | static const value_string linkconfiguration_class[] = { |
548 | | { GEV_LINKCONFIG_SINGLELINK, "Single Link" }, |
549 | | { GEV_LINKCONFIG_MULTIPLELINKS, "Multiple Links" }, |
550 | | { GEV_LINKCONFIG_STATICLAG, "Static LAG" }, |
551 | | { GEV_LINKCONFIG_DYNAMICLAG, "Dynamic LAG" }, |
552 | | { 0, NULL }, |
553 | | }; |
554 | | |
555 | | static const value_string devicemodenames_characterset[] = { |
556 | | { 0x02, "ASCII" }, |
557 | | { 0x01, "UTF-8 Character Set" }, |
558 | | { 0x00, "Reserved" }, |
559 | | { 0, NULL }, |
560 | | }; |
561 | | |
562 | | static const value_string commandnames[] = { |
563 | | { GVCP_DISCOVERY_CMD, "DISCOVERY_CMD" }, |
564 | | { GVCP_FORCEIP_CMD, "FORCEIP_CMD" }, |
565 | | { GVCP_PACKETRESEND_CMD, "PACKETRESEND_CMD" }, |
566 | | { GVCP_READREG_CMD, "READREG_CMD" }, |
567 | | { GVCP_WRITEREG_CMD, "WRITEREG_CMD" }, |
568 | | { GVCP_READMEM_CMD, "READMEM_CMD" }, |
569 | | { GVCP_WRITEMEM_CMD, "WRITEMEM_CMD" }, |
570 | | { GVCP_EVENT_CMD, "EVENT_CMD" }, |
571 | | { GVCP_EVENTDATA_CMD, "EVENTDATA_CMD" }, |
572 | | { GVCP_ACTION_CMD, "ACTION_CMD" }, |
573 | | { 0, NULL } |
574 | | }; |
575 | | |
576 | | static const value_string acknowledgenames[] = { |
577 | | { GVCP_DISCOVERY_ACK, "DISCOVERY_ACK" }, |
578 | | { GVCP_FORCEIP_ACK, "FORCEIP_ACK" }, |
579 | | { GVCP_PACKETRESEND_ACK, "PACKETRESEND_ACK" }, |
580 | | { GVCP_READREG_ACK, "READREG_ACK" }, |
581 | | { GVCP_WRITEREG_ACK, "WRITEREG_ACK" }, |
582 | | { GVCP_READMEM_ACK, "READMEM_ACK" }, |
583 | | { GVCP_WRITEMEM_ACK, "WRITEMEM_ACK" }, |
584 | | { GVCP_PENDING_ACK, "PENDING_ACK" }, |
585 | | { GVCP_EVENT_ACK, "EVENT_ACK" }, |
586 | | { GVCP_EVENTDATA_ACK, "EVENTDATA_ACK" }, |
587 | | { GVCP_ACTION_ACK, "ACTION_ACK" }, |
588 | | { 0, NULL }, |
589 | | }; |
590 | | |
591 | | static const value_string eventidnames[] = { |
592 | | { GEV_EVENT_TRIGGER, "GEV_EVENT_TRIGGER (deprecated)" }, |
593 | | { GEV_EVENT_START_OF_EXPOSURE, "GEV_EVENT_START_OF_EXPOSURE (deprecated)" }, |
594 | | { GEV_EVENT_END_OF_EXPOSURE, "GEV_EVENT_END_OF_EXPOSURE (deprecated)" }, |
595 | | { GEV_EVENT_START_OF_TRANSFER, "GEV_EVENT_START_OF_TRANSFER (deprecated)" }, |
596 | | { GEV_EVENT_END_OF_TRANSFER, "GEV_EVENT_END_OF_TRANSFER (deprecated)" }, |
597 | | { GEV_EVENT_PRIMARY_APP_SWITCH, "GEV_EVENT_PRIMARY_APP_SWITCH" }, |
598 | | { GEV_EVENT_EVENT_LINK_SPEED_CHANGE, "GEV_EVENT_EVENT_LINK_SPEED_CHANGE" }, |
599 | | { GEV_EVENT_ACTION_LATE, "GEV_EVENT_ACTION_LATE" }, |
600 | | { GEV_EVENT_ERROR_001, "GEV_EVENT_ERROR_001" }, |
601 | | { 0, NULL }, |
602 | | }; |
603 | | |
604 | | static const value_string statusnames[] = { |
605 | | { GEV_STATUS_SUCCESS, "GEV_STATUS_SUCCESS" }, |
606 | | { GEV_STATUS_PACKET_RESEND, "GEV_STATUS_PACKET_RESEND" }, |
607 | | { GEV_STATUS_NOT_IMPLEMENTED, "GEV_STATUS_NOT_IMPLEMENTED" }, |
608 | | { GEV_STATUS_INVALID_PARAMETER, "GEV_STATUS_INVALID_PARAMETER" }, |
609 | | { GEV_STATUS_INVALID_ADDRESS, "GEV_STATUS_INVALID_ADDRESS" }, |
610 | | { GEV_STATUS_WRITE_PROTECT, "GEV_STATUS_WRITE_PROTECT" }, |
611 | | { GEV_STATUS_BAD_ALIGNMENT, "GEV_STATUS_BAD_ALIGNMENT" }, |
612 | | { GEV_STATUS_ACCESS_DENIED, "GEV_STATUS_ACCESS_DENIED" }, |
613 | | { GEV_STATUS_BUSY, "GEV_STATUS_BUSY" }, |
614 | | { GEV_STATUS_LOCAL_PROBLEM, "GEV_STATUS_LOCAL_PROBLEM (deprecated)" }, |
615 | | { GEV_STATUS_MSG_MISMATCH, "GEV_STATUS_MSG_MISMATCH (deprecated)" }, |
616 | | { GEV_STATUS_INVALID_PROTOCOL, "GEV_STATUS_INVALID_PROTOCOL (deprecated)" }, |
617 | | { GEV_STATUS_NO_MSG, "GEV_STATUS_NO_MSG (deprecated)" }, |
618 | | { GEV_STATUS_PACKET_UNAVAILABLE, "GEV_STATUS_PACKET_UNAVAILABLE" }, |
619 | | { GEV_STATUS_DATA_OVERRUN, "GEV_STATUS_DATA_OVERRUN" }, |
620 | | { GEV_STATUS_INVALID_HEADER, "GEV_STATUS_INVALID_HEADER" }, |
621 | | { GEV_STATUS_WRONG_CONFIG, "GEV_STATUS_WRONG_CONFIG (deprecated)" }, |
622 | | { GEV_STATUS_PACKET_NOT_YET_AVAILABLE, "GEV_STATUS_PACKET_NOT_YET_AVAILABLE" }, |
623 | | { GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY" }, |
624 | | { GEV_STATUS_PACKET_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_REMOVED_FROM_MEMORY" }, |
625 | | { GEV_STATUS_NO_REF_TIME, "GEV_STATUS_NO_REF_TIME" }, |
626 | | { GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE, "GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE" }, |
627 | | { GEV_STATUS_OVERFLOW, "GEV_STATUS_OVERFLOW" }, |
628 | | { GEV_STATUS_ACTION_LATE, "GEV_STATUS_ACTION_LATE" }, |
629 | | { GEV_STATUS_LEADER_TRAILER_OVERFLOW, "GEV_STATUS_LEADER_TRAILER_OVERFLOW" }, |
630 | | { GEV_STATUS_ERROR, "GEV_STATUS_ERROR" }, |
631 | | { 0, NULL }, |
632 | | }; |
633 | | |
634 | | static const value_string statusnames_short[] = { |
635 | | { GEV_STATUS_SUCCESS, "" }, |
636 | | { GEV_STATUS_PACKET_RESEND, "(Packet Resend) " }, |
637 | | { GEV_STATUS_NOT_IMPLEMENTED, "(Not Implemented) " }, |
638 | | { GEV_STATUS_INVALID_PARAMETER, "(Invalid Parameter) " }, |
639 | | { GEV_STATUS_INVALID_ADDRESS, "(Invalid Address) " }, |
640 | | { GEV_STATUS_WRITE_PROTECT, "(Write Protect) " }, |
641 | | { GEV_STATUS_BAD_ALIGNMENT, "(Bad Alignment) " }, |
642 | | { GEV_STATUS_ACCESS_DENIED, "(Access Denied) " }, |
643 | | { GEV_STATUS_BUSY, "(Busy) " }, |
644 | | { GEV_STATUS_LOCAL_PROBLEM, "(Local Problem) " }, |
645 | | { GEV_STATUS_MSG_MISMATCH, "(Message Mismatch) " }, |
646 | | { GEV_STATUS_INVALID_PROTOCOL, "(Invalid Protocol) " }, |
647 | | { GEV_STATUS_NO_MSG, "(No Message) " }, |
648 | | { GEV_STATUS_PACKET_UNAVAILABLE, "(Packet Unavailable) " }, |
649 | | { GEV_STATUS_DATA_OVERRUN, "(Data Overrun) " }, |
650 | | { GEV_STATUS_INVALID_HEADER, "(Invalid Header) " }, |
651 | | { GEV_STATUS_WRONG_CONFIG, "(Wrong Configuration) " }, |
652 | | { GEV_STATUS_PACKET_NOT_YET_AVAILABLE, "(Packet not yet available) " }, |
653 | | { GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "(Packet and previous removed from memory) " }, |
654 | | { GEV_STATUS_PACKET_REMOVED_FROM_MEMORY, "(Packet removed from memory) " }, |
655 | | { GEV_STATUS_NO_REF_TIME, "(No reference time)" }, |
656 | | { GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE, "(Packet temp. unavailable)" }, |
657 | | { GEV_STATUS_OVERFLOW, "(overflow)" }, |
658 | | { GEV_STATUS_ACTION_LATE, "(Action late)" }, |
659 | | { GEV_STATUS_LEADER_TRAILER_OVERFLOW, "(Leader/Trailer overflow)" }, |
660 | | { GEV_STATUS_ERROR, "(Error) " }, |
661 | | { 0, NULL }, |
662 | | }; |
663 | | |
664 | | static const true_false_string directionnames = { |
665 | | "Receiver", |
666 | | "Transmitter" |
667 | | }; |
668 | | |
669 | | static const true_false_string zonedirectionnames = { |
670 | | "Bottom-Up", |
671 | | "Top-Down" |
672 | | }; |
673 | | |
674 | | /* |
675 | | brief Register name to address mappings |
676 | | */ |
677 | | |
678 | | static const value_string bootstrapregisternames[] = { |
679 | | { GVCP_VERSION, "[Version]" }, |
680 | | { GVCP_DEVICE_MODE, "[Device Mode]" }, |
681 | | { GVCP_DEVICE_MAC_HIGH_0, "[Device MAC address High (Net #0)]" }, |
682 | | { GVCP_DEVICE_MAC_LOW_0, "[Device MAC address Low (Net #0)]" }, |
683 | | { GVCP_SUPPORTED_IP_CONFIGURATION_0, "[Supported IP Configuration (Net #0)]" }, |
684 | | { GVCP_CURIPCFG_0, "[Current IP Configuration (Net #0)]" }, |
685 | | { GVCP_CURRENT_IP_ADDRESS_0, "[Current IP Address (Net #0)]" }, |
686 | | { GVCP_CURRENT_SUBNET_MASK_0, "[Current Subnet Mask (Net #0)]" }, |
687 | | { GVCP_CURRENT_DEFAULT_GATEWAY_0, "[Current Default Gateway (Net #0)]" }, |
688 | | { GVCP_MANUFACTURER_NAME, "[Manufacturer Name]" }, |
689 | | { GVCP_MODEL_NAME, "[Model Name]" }, |
690 | | { GVCP_DEVICE_VERSION, "[Device Version]" }, |
691 | | { GVCP_MANUFACTURER_INFO, "[Manufacturer Specific Information]" }, |
692 | | { GVCP_SERIAL_NUMBER, "[Serial Number]" }, |
693 | | { GVCP_USER_DEFINED_NAME, "[User-defined Name]" }, |
694 | | { GVCP_FIRST_URL, "[First Choice of URL for XML device description file]" }, |
695 | | { GVCP_SECOND_URL, "[Second Choice of URL for XML device description file]" }, |
696 | | { GVCP_NUMBER_OF_NETWORK_INTERFACES, "[Number of network interfaces]" }, |
697 | | { GVCP_PERSISTENT_IP_ADDRESS_0, "[Persistent IP address (Net #0)]" }, |
698 | | { GVCP_PERSISTENT_SUBNET_MASK_0, "[Persistent subnet mask (Net #0)]" }, |
699 | | { GVCP_PERSISTENT_DEFAULT_GATEWAY_0, "[Persistent default gateway (Net# 0)]" }, |
700 | | { GVCP_LINK_SPEED_0, "[Link Speed (Net #0)]" }, |
701 | | { GVCP_DEVICE_MAC_HIGH_1, "[Device MAC address High (Net #1)]" }, |
702 | | { GVCP_DEVICE_MAC_LOW_1, "[Device MAC address Low (Net #1)]" }, |
703 | | { GVCP_SUPPORTED_IP_CONFIGURATION_1, "[Supported IP Configuration (Net #1)]" }, |
704 | | { GVCP_CURIPCFG_1, "[Current IP Configuration (Net #1)]" }, |
705 | | { GVCP_CURRENT_IP_ADDRESS_1, "[Current IP Address (Net #1)]" }, |
706 | | { GVCP_CURRENT_SUBNET_MASK_1, "[Current Subnet Mask (Net #1)]" }, |
707 | | { GVCP_CURRENT_DEFAULT_GATEWAY_1, "[Current Default Gateway (Net #1)]" }, |
708 | | { GVCP_PERSISTENT_IP_ADDRESS_1, "[Persistent IP address (Net #1)]" }, |
709 | | { GVCP_PERSISTENT_SUBNET_MASK_1, "[Persistent subnet mask (Net#1)]" }, |
710 | | { GVCP_PERSISTENT_DEFAULT_GATEWAY_1, "[Persistent default gateway (Net #1)]" }, |
711 | | { GVCP_LINK_SPEED_1, "[Link Speed (Net #1)]" }, |
712 | | { GVCP_DEVICE_MAC_HIGH_2, "[Device MAC address High (Net #2)]" }, |
713 | | { GVCP_DEVICE_MAC_LOW_2, "[Device MAC address Low (Net #2)]" }, |
714 | | { GVCP_SUPPORTED_IP_CONFIGURATION_2, "[Supported IP Configuration (Net #2)]" }, |
715 | | { GVCP_CURIPCFG_2, "[Current IP Configuration (Net #2)]" }, |
716 | | { GVCP_CURRENT_IP_ADDRESS_2, "[Current IP Address (Net #2)]" }, |
717 | | { GVCP_CURRENT_SUBNET_MASK_2, "[Current Subnet Mask (Net #2)]" }, |
718 | | { GVCP_CURRENT_DEFAULT_GATEWAY_2, "[Current Default Gateway (Net #2)]" }, |
719 | | { GVCP_PERSISTENT_IP_ADDRESS_2, "[Persistent IP address (Net #2)]" }, |
720 | | { GVCP_PERSISTENT_SUBNET_MASK_2, "[Persistent subnet mask (Net #2)]" }, |
721 | | { GVCP_PERSISTENT_DEFAULT_GATEWAY_2, "[Persistent default gateway (Net #2)]" }, |
722 | | { GVCP_LINK_SPEED_2, "[Link Speed (Net #2)]" }, |
723 | | { GVCP_DEVICE_MAC_HIGH_3, "[Device MAC address High (Net #3)]" }, |
724 | | { GVCP_DEVICE_MAC_LOW_3, "[Device MAC address Low (Net #3)]" }, |
725 | | { GVCP_SUPPORTED_IP_CONFIGURATION_3, "[Supported IP Configuration (Net #3)]" }, |
726 | | { GVCP_CURIPCFG_3, "[Current IP Configuration (Net #3)]" }, |
727 | | { GVCP_CURRENT_IP_ADDRESS_3, "[Current IP Address (Net #3)]" }, |
728 | | { GVCP_CURRENT_SUBNET_MASK_3, "[Current Subnet Mask (Net #3)]" }, |
729 | | { GVCP_CURRENT_DEFAULT_GATEWAY_3, "[Current Default Gateway (Net #3)]" }, |
730 | | { GVCP_PERSISTENT_IP_ADDRESS_3, "[Persistent IP address (Net #3)]" }, |
731 | | { GVCP_PERSISTENT_SUBNET_MASK_3, "[Persistent subnet mask (Net #3)]" }, |
732 | | { GVCP_PERSISTENT_DEFAULT_GATEWAY_3, "[Persistent default gateway (Net #3)]" }, |
733 | | { GVCP_LINK_SPEED_3, "[Link Speed (Net #3)]" }, |
734 | | { GVCP_NUMBER_OF_MESSAGE_CHANNELS, "[Number of Message Channels]" }, |
735 | | { GVCP_NUMBER_OF_STREAM_CHANNELS, "[Number of Stream Channels]" }, |
736 | | { GVCP_NUMBER_OF_ACTION_SIGNALS, "[Number of Action Signals]" }, |
737 | | { GVCP_ACTION_DEVICE_KEY, "[Action Device Key]" }, |
738 | | { GVCP_SC_CAPS, "[Stream channels Capability]" }, |
739 | | { GVCP_MESSAGE_CHANNEL_CAPS, "[Message channel Capability]" }, |
740 | | { GVCP_CAPABILITY, "[GVCP Capability]" }, |
741 | | { GVCP_HEARTBEAT_TIMEOUT, "[Heartbeat timeout]" }, |
742 | | { GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH, "[Timestamp tick frequency - High]" }, |
743 | | { GVCP_TIMESTAMP_TICK_FREQUENCY_LOW, "[Timestamp tick frequency - Low]" }, |
744 | | { GVCP_TIMESTAMP_CONTROL, "[Timestamp control]" }, |
745 | | { GVCP_TIMESTAMP_VALUE_HIGH, "[Timestamp value (latched) - High]" }, |
746 | | { GVCP_TIMESTAMP_VALUE_LOW, "[Timestamp value (latched) - Low]" }, |
747 | | { GVCP_DISCOVERY_ACK_DELAY, "[Discovery ACK delay]" }, |
748 | | { GVCP_CONFIGURATION, "[GVCP Configuration]" }, |
749 | | { GVCP_PENDING_TIMEOUT, "[Pending Timeout]" }, |
750 | | { GVCP_CONTROL_SWITCHOVER_KEY, "[Control switchover key]" }, |
751 | | { GVCP_GVSCP_CONFIGURATION, "[GVSP Configuration]" }, |
752 | | { GVCP_PHYSICAL_LINK_CAPABILITY, "[Physical link capability]" }, |
753 | | { GVCP_PHYSICAL_LINK_CONFIGURATION, "[Physical link configuration]" }, |
754 | | { GVCP_IEEE_1588_STATUS, "[IEEE1588 status]" }, |
755 | | { GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE, "[Scheduled action command queue size]" }, |
756 | | { GVCP_IEEE_1588_EXTENDED_CAPABILITY, "[IEEE1588 extended capabilities]" }, |
757 | | { GVCP_IEEE_1588_SUPPORTED_PROFILES, "[IEEE1588 supported profiles]" }, |
758 | | { GVCP_IEEE_1588_SELECTED_PROFILE, "[IEEE1588 selected profile]" }, |
759 | | { GVCP_CCP, "[CCP (Control Channel Privilege)]" }, |
760 | | { GVCP_PRIMARY_APPLICATION_PORT, "[Primary Application Port]" }, |
761 | | { GVCP_PRIMARY_APPLICATION_IP_ADDRESS, "[Primary Application IP address]" }, |
762 | | { GVCP_MC_DESTINATION_PORT, "[MCP (Message Channel Port)]" }, |
763 | | { GVCP_MC_DESTINATION_ADDRESS, "[MCDA (Message Channel Destination Address)]" }, |
764 | | { GVCP_MC_TIMEOUT, "[MCTT (Message Channel Transmission Timeout in ms)]" }, |
765 | | { GVCP_MC_RETRY_COUNT, "[MCRC (Message Channel Retry Count)]" }, |
766 | | { GVCP_MC_SOURCE_PORT, "[MCSP (Message Channel Source Port)]" }, |
767 | | { GVCP_MC_CONFIGURATION, "[MCCFG (Message Channel Configuration)]" }, /* GEV 2.2 */ |
768 | | { GVCP_SC_DESTINATION_PORT(0), "[SCP0 (Stream Channel #0 Port)]" }, |
769 | | { GVCP_SC_PACKET_SIZE(0), "[SCPS0 (Stream Channel #0 Packet Size)]" }, |
770 | | { GVCP_SC_PACKET_DELAY(0), "[SCPD0 (Stream Channel #0 Packet Delay)]" }, |
771 | | { GVCP_SC_DESTINATION_ADDRESS(0), "[SCDA0 (Stream Channel #0 Destination Address)]" }, |
772 | | { GVCP_SC_SOURCE_PORT(0), "[SCSP0 (Stream Channel #0 Source Port)]" }, |
773 | | { GVCP_SC_CAPABILITY(0), "[SCC0 (Stream Channel #0 Capability)]" }, |
774 | | { GVCP_SC_CONFIGURATION(0), "[SCCONF0 (Stream Channel #0 Configuration)]" }, |
775 | | { GVCP_SC_ZONE(0), "[SCZ0 (Stream Channel Zone #0)]" }, |
776 | | { GVCP_SC_ZONE_DIRECTION(0), "[SCZD0 (Stream Channel Zone Direction #0)]" }, |
777 | | { GVCP_SC_MAX_PACKET_COUNT(0), "[SCMPC0 (Stream Channel Max Packet Count #0)]" }, |
778 | | { GVCP_SC_MAX_BLOCK_SIZE_HIGH(0), "[SCMBSL0 (Stream Channel Max Block Size (High) #0)]" }, |
779 | | { GVCP_SC_MAX_BLOCK_SIZE_LOW(0), "[SCMBSH0 (Stream Channel Max Block Size (Low) #0)]" }, |
780 | | { GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(0), "SCEBA0 (Stream Channel Extended Bootstrap Address #0)]" }, |
781 | | { GVCP_SC_DESTINATION_PORT(1), "[SCP1 (Stream Channel #1 Port)]" }, |
782 | | { GVCP_SC_PACKET_SIZE(1), "[SCPS1 (Stream Channel #1 Packet Size)]" }, |
783 | | { GVCP_SC_PACKET_DELAY(1), "[SCPD1 (Stream Channel #1 Packet Delay)]" }, |
784 | | { GVCP_SC_DESTINATION_ADDRESS(1), "[SCDA1 (Stream Channel #1 Destination Address)]" }, |
785 | | { GVCP_SC_SOURCE_PORT(1), "[SCSP1 (Stream Channel #1 Source Port)]" }, |
786 | | { GVCP_SC_CAPABILITY(1), "[SCC1 (Stream Channel #1 Capability)]" }, |
787 | | { GVCP_SC_CONFIGURATION(1), "[SCCONF1 (Stream Channel #1 Configuration)]" }, |
788 | | { GVCP_SC_ZONE(1), "[SCZ1 (Stream Channel Zone #1)]" }, |
789 | | { GVCP_SC_ZONE_DIRECTION(1), "[SCZD1 (Stream Channel Zone Direction #1)]" }, |
790 | | { GVCP_SC_MAX_PACKET_COUNT(1), "[SCMPC1 (Stream Channel Max Packet Count #1)]" }, |
791 | | { GVCP_SC_MAX_BLOCK_SIZE_HIGH(1), "[SCMBSL1 (Stream Channel Max Block Size (High) #1)]" }, |
792 | | { GVCP_SC_MAX_BLOCK_SIZE_LOW(1), "[SCMBSH1 (Stream Channel Max Block Size (Low) #1)]" }, |
793 | | { GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(1), "SCEBA1 (Stream Channel Extended Bootstrap Address #1)]" }, |
794 | | { GVCP_SC_DESTINATION_PORT(2), "[SCP2 (Stream Channel #2 Port)]" }, |
795 | | { GVCP_SC_PACKET_SIZE(2), "[SCPS2 (Stream Channel #2 Packet Size)]" }, |
796 | | { GVCP_SC_PACKET_DELAY(2), "[SCPD2 (Stream Channel #2 Packet Delay)]" }, |
797 | | { GVCP_SC_DESTINATION_ADDRESS(2), "[SCDA2 (Stream Channel #2 Destination Address)]" }, |
798 | | { GVCP_SC_SOURCE_PORT(2), "[SCSP2 (Stream Channel #2 Source Port)]" }, |
799 | | { GVCP_SC_CAPABILITY(2), "[SCC2 (Stream Channel #2 Capability)]" }, |
800 | | { GVCP_SC_CONFIGURATION(2), "[SCCONF2 (Stream Channel #2 Configuration)]" }, |
801 | | { GVCP_SC_ZONE(2), "[SCZ2 (Stream Channel Zone #2)]" }, |
802 | | { GVCP_SC_ZONE_DIRECTION(2), "[SCZD2 (Stream Channel Zone Direction #2)]" }, |
803 | | { GVCP_SC_MAX_PACKET_COUNT(2), "[SCMPC2 (Stream Channel Max Packet Count #2)]" }, |
804 | | { GVCP_SC_MAX_BLOCK_SIZE_HIGH(2), "[SCMBSL2 (Stream Channel Max Block Size (High) #2)]" }, |
805 | | { GVCP_SC_MAX_BLOCK_SIZE_LOW(2), "[SCMBSH2 (Stream Channel Max Block Size (Low) #2)]" }, |
806 | | { GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(2), "SCEBA2 (Stream Channel Extended Bootstrap Address #2)]" }, |
807 | | { GVCP_SC_DESTINATION_PORT(3), "[SCP3 (Stream Channel #3 Port)]" }, |
808 | | { GVCP_SC_PACKET_SIZE(3), "[SCPS3 (Stream Channel #3 Packet Size)]" }, |
809 | | { GVCP_SC_PACKET_DELAY(3), "[SCPD3 (Stream Channel #3 Packet Delay)]" }, |
810 | | { GVCP_SC_DESTINATION_ADDRESS(3), "[SCDA3 (Stream Channel #3 Destination Address)]" }, |
811 | | { GVCP_SC_SOURCE_PORT(3), "[SCSP3 (Stream Channel #3 Source Port)]" }, |
812 | | { GVCP_SC_CAPABILITY(3), "[SCC3 (Stream Channel #3 Capability)]" }, |
813 | | { GVCP_SC_CONFIGURATION(3), "[SCCONF3 (Stream Channel #3 Configuration)]" }, |
814 | | { GVCP_SC_ZONE(3), "[SCZ3 (Stream Channel Zone #3)]" }, |
815 | | { GVCP_SC_ZONE_DIRECTION(3), "[SCZD3 (Stream Channel Zone Direction #3)]" }, |
816 | | { GVCP_SC_MAX_PACKET_COUNT(3), "[SCMPC3 (Stream Channel Max Packet Count #3)]" }, |
817 | | { GVCP_SC_MAX_BLOCK_SIZE_HIGH(3), "[SCMBSL3 (Stream Channel Max Block Size (High) #3)]" }, |
818 | | { GVCP_SC_MAX_BLOCK_SIZE_LOW(3), "[SCMBSH3 (Stream Channel Max Block Size (Low) #3)]" }, |
819 | | { GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(3), "SCEBA3 (Stream Channel Extended Bootstrap Address #3)]" }, |
820 | | { GVCP_MANIFEST_TABLE, "[Manifest Table]" }, |
821 | | { GVCP_ACTION_GROUP_KEY(0), "[Action Group Key #0]" }, |
822 | | { GVCP_ACTION_GROUP_MASK(0), "[Action Group Mask #0]" }, |
823 | | { GVCP_ACTION_GROUP_KEY(1), "[Action Group Key #1]" }, |
824 | | { GVCP_ACTION_GROUP_MASK(1), "[Action Group Mask #1]" }, |
825 | | { GVCP_ACTION_GROUP_KEY(2), "[Action Group Key #2]" }, |
826 | | { GVCP_ACTION_GROUP_MASK(2), "[Action Group Mask #2]" }, |
827 | | { GVCP_ACTION_GROUP_KEY(3), "[Action Group Key #3]" }, |
828 | | { GVCP_ACTION_GROUP_MASK(3), "[Action Group Mask #3]" }, |
829 | | { GVCP_ACTION_GROUP_KEY(4), "[Action Group Key #4]" }, |
830 | | { GVCP_ACTION_GROUP_MASK(4), "[Action Group Mask #4]" }, |
831 | | { GVCP_ACTION_GROUP_KEY(5), "[Action Group Key #5]" }, |
832 | | { GVCP_ACTION_GROUP_MASK(5), "[Action Group Mask #5]" }, |
833 | | { GVCP_ACTION_GROUP_KEY(6), "[Action Group Key #6]" }, |
834 | | { GVCP_ACTION_GROUP_MASK(6), "[Action Group Mask #6]" }, |
835 | | { GVCP_ACTION_GROUP_KEY(7), "[Action Group Key #7]" }, |
836 | | { GVCP_ACTION_GROUP_MASK(7), "[Action Group Mask #7]" }, |
837 | | { GVCP_ACTION_GROUP_KEY(8), "[Action Group Key #8]" }, |
838 | | { GVCP_ACTION_GROUP_MASK(8), "[Action Group Mask #8]" }, |
839 | | { GVCP_ACTION_GROUP_KEY(9), "[Action Group Key #9]" }, |
840 | | { GVCP_ACTION_GROUP_MASK(9), "[Action Group Mask #9]" }, |
841 | | { 0, NULL }, |
842 | | }; |
843 | | |
844 | | |
845 | | /* |
846 | | brief Extended Register name to address mappings |
847 | | */ |
848 | | |
849 | | /* GEV 2.2 */ |
850 | | static const value_string extendedbootstrapregisternames[] = { |
851 | | { GVCP_SC_GENDC_DESCRIPTOR_ADDRESS, "[SCGDAx (GenDC Descriptor Address)]" }, |
852 | | { GVCP_SC_GENDC_DESCRIPTOR_SIZE, "[SCGDSx (GenDC Descriptor Size)]" }, |
853 | | { GVCP_SC_GENDC_FLOW_MAPPING_TABLE_ADDRESS, "[SCGFTAx (GenDC Flow Mapping Table Address)]" }, |
854 | | { GVCP_SC_GENDC_FLOW_MAPPING_TABLE_SIZE, "[SCGFTSx (GenDC Flow Mapping Table Size)]" }, |
855 | | { 0, NULL }, |
856 | | }; |
857 | | |
858 | | |
859 | | /* |
860 | | \brief Check is the current register access is into one of the extended stream channel registers |
861 | | */ |
862 | | |
863 | | static bool is_extended_bootstrap_address(gvcp_conv_info_t *gvcp_info, uint32_t addr, uint32_t* extended_bootstrap_address_offset) |
864 | 106 | { |
865 | 106 | int stream_channel_count = 0; |
866 | 54.3k | for (stream_channel_count = 0; stream_channel_count < GVCP_MAX_STREAM_CHANNEL_COUNT; stream_channel_count++) |
867 | 54.2k | { |
868 | 54.2k | if ((gvcp_info->extended_bootstrap_address[stream_channel_count] != 0) && |
869 | 0 | (addr >= gvcp_info->extended_bootstrap_address[stream_channel_count]) && |
870 | 0 | (addr <= (gvcp_info->extended_bootstrap_address[stream_channel_count] + GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS_LAST))) |
871 | 0 | { |
872 | 0 | if (extended_bootstrap_address_offset) |
873 | 0 | { |
874 | 0 | *extended_bootstrap_address_offset = gvcp_info->extended_bootstrap_address[stream_channel_count]; |
875 | 0 | } |
876 | 0 | return true; |
877 | 0 | } |
878 | 54.2k | } |
879 | 106 | return false; |
880 | 106 | } |
881 | | |
882 | | |
883 | | /* |
884 | | \brief Returns a register name based on its address |
885 | | */ |
886 | | |
887 | | static const char* get_register_name_from_address(uint32_t addr, wmem_allocator_t *scope, gvcp_conv_info_t *gvcp_info, bool* is_custom_register) |
888 | 6 | { |
889 | 6 | const char* address_string = NULL; |
890 | | |
891 | 6 | if (is_custom_register != NULL) |
892 | 6 | { |
893 | 6 | *is_custom_register = false; |
894 | 6 | } |
895 | | |
896 | 6 | address_string = try_val_to_str(addr, bootstrapregisternames); |
897 | 6 | if (!address_string) |
898 | 5 | { |
899 | 5 | uint32_t extended_bootstrap_address_offset = 0; |
900 | 5 | if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset)) |
901 | 0 | { |
902 | 0 | address_string = try_val_to_str(addr - extended_bootstrap_address_offset, extendedbootstrapregisternames); |
903 | 0 | } |
904 | | |
905 | 5 | if (!address_string) |
906 | 5 | { |
907 | 5 | address_string = wmem_strdup_printf(scope, "[Addr:0x%08X]", addr); |
908 | 5 | if (is_custom_register != NULL) |
909 | 5 | { |
910 | 5 | *is_custom_register = true; |
911 | 5 | } |
912 | 5 | } |
913 | 5 | } |
914 | | |
915 | 6 | return address_string; |
916 | 6 | } |
917 | | |
918 | | |
919 | | /* |
920 | | \brief Attempts to dissect a bootstrap register |
921 | | */ |
922 | | |
923 | | static int dissect_register(uint32_t addr, proto_tree *branch, tvbuff_t *tvb, int offset, int length) |
924 | 40 | { |
925 | 40 | switch (addr) |
926 | 40 | { |
927 | 39 | case GVCP_VERSION: |
928 | 39 | proto_tree_add_item(branch, hf_gvcp_spec_version_major, tvb, offset, 4, ENC_BIG_ENDIAN); |
929 | 39 | proto_tree_add_item(branch, hf_gvcp_spec_version_minor, tvb, offset, 4, ENC_BIG_ENDIAN); |
930 | 39 | break; |
931 | | |
932 | 0 | case GVCP_DEVICE_MODE: |
933 | 0 | proto_tree_add_item(branch, hf_gvcp_devicemode_endianness, tvb, offset, 4, ENC_BIG_ENDIAN); |
934 | 0 | proto_tree_add_item(branch, hf_gvcp_devicemode_deviceclass, tvb, offset, 4, ENC_BIG_ENDIAN); |
935 | 0 | proto_tree_add_item(branch, hf_gvcp_devicemode_current_link_configuration_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
936 | 0 | proto_tree_add_item(branch, hf_gvcp_devicemode_characterset, tvb, offset, 4, ENC_BIG_ENDIAN); |
937 | 0 | break; |
938 | | |
939 | 0 | case GVCP_DEVICE_MAC_HIGH_0: |
940 | 0 | case GVCP_DEVICE_MAC_HIGH_1: |
941 | 1 | case GVCP_DEVICE_MAC_HIGH_2: |
942 | 1 | case GVCP_DEVICE_MAC_HIGH_3: |
943 | 1 | proto_tree_add_item(branch, hf_gvcp_machigh, tvb, offset, 4, ENC_BIG_ENDIAN); |
944 | 1 | break; |
945 | | |
946 | 0 | case GVCP_DEVICE_MAC_LOW_0: |
947 | 0 | case GVCP_DEVICE_MAC_LOW_1: |
948 | 0 | case GVCP_DEVICE_MAC_LOW_2: |
949 | 0 | case GVCP_DEVICE_MAC_LOW_3: |
950 | 0 | proto_tree_add_item(branch, hf_gvcp_maclow, tvb, offset, 4, ENC_BIG_ENDIAN); |
951 | 0 | break; |
952 | | |
953 | 0 | case GVCP_SUPPORTED_IP_CONFIGURATION_0: |
954 | 0 | case GVCP_SUPPORTED_IP_CONFIGURATION_1: |
955 | 0 | case GVCP_SUPPORTED_IP_CONFIGURATION_2: |
956 | 0 | case GVCP_SUPPORTED_IP_CONFIGURATION_3: |
957 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_can_handle_pause_frames_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
958 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_can_generate_pause_frames_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
959 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_lla, tvb, offset, 4, ENC_BIG_ENDIAN); |
960 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_dhcp, tvb, offset, 4, ENC_BIG_ENDIAN); |
961 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_persistent_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
962 | 0 | break; |
963 | | |
964 | 0 | case GVCP_CURIPCFG_0: |
965 | 0 | case GVCP_CURIPCFG_1: |
966 | 0 | case GVCP_CURIPCFG_2: |
967 | 0 | case GVCP_CURIPCFG_3: |
968 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_can_handle_pause_frames_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
969 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_can_generate_pause_frames_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
970 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_lla, tvb, offset, 4, ENC_BIG_ENDIAN); |
971 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_dhcp, tvb, offset, 4, ENC_BIG_ENDIAN); |
972 | 0 | proto_tree_add_item(branch, hf_gvcp_ip_config_persistent_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
973 | 0 | break; |
974 | | |
975 | 0 | case GVCP_CURRENT_IP_ADDRESS_0: |
976 | 0 | case GVCP_CURRENT_IP_ADDRESS_1: |
977 | 0 | case GVCP_CURRENT_IP_ADDRESS_2: |
978 | 0 | case GVCP_CURRENT_IP_ADDRESS_3: |
979 | 0 | proto_tree_add_item(branch, hf_gvcp_current_IP, tvb, offset, 4, ENC_BIG_ENDIAN); |
980 | 0 | break; |
981 | | |
982 | 0 | case GVCP_CURRENT_SUBNET_MASK_0: |
983 | 0 | case GVCP_CURRENT_SUBNET_MASK_1: |
984 | 0 | case GVCP_CURRENT_SUBNET_MASK_2: |
985 | 0 | case GVCP_CURRENT_SUBNET_MASK_3: |
986 | 0 | proto_tree_add_item(branch, hf_gvcp_current_subnet_mask, tvb, offset, 4, ENC_BIG_ENDIAN); |
987 | 0 | break; |
988 | | |
989 | 0 | case GVCP_CURRENT_DEFAULT_GATEWAY_0: |
990 | 0 | case GVCP_CURRENT_DEFAULT_GATEWAY_1: |
991 | 0 | case GVCP_CURRENT_DEFAULT_GATEWAY_2: |
992 | 0 | case GVCP_CURRENT_DEFAULT_GATEWAY_3: |
993 | 0 | proto_tree_add_item(branch, hf_gvcp_current_default_gateway, tvb, offset, 4, ENC_BIG_ENDIAN); |
994 | 0 | break; |
995 | | |
996 | 0 | case GVCP_MANUFACTURER_NAME: |
997 | 0 | proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */ |
998 | 0 | break; |
999 | | |
1000 | 0 | case GVCP_MODEL_NAME: |
1001 | 0 | proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */ |
1002 | 0 | break; |
1003 | | |
1004 | 0 | case GVCP_DEVICE_VERSION: |
1005 | 0 | proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */ |
1006 | 0 | break; |
1007 | | |
1008 | 0 | case GVCP_MANUFACTURER_INFO: |
1009 | 0 | proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */ |
1010 | 0 | break; |
1011 | | |
1012 | 0 | case GVCP_SERIAL_NUMBER: |
1013 | 0 | proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */ |
1014 | 0 | break; |
1015 | | |
1016 | 0 | case GVCP_USER_DEFINED_NAME: |
1017 | 0 | proto_tree_add_item(branch, hf_gvcp_user_defined_name, tvb, offset, 4, ENC_ASCII); /*? */ |
1018 | 0 | break; |
1019 | | |
1020 | 0 | case GVCP_FIRST_URL: |
1021 | 0 | proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */ |
1022 | 0 | break; |
1023 | | |
1024 | 0 | case GVCP_SECOND_URL: |
1025 | 0 | proto_tree_add_item(branch, hf_gvcp_reserved_bit, tvb, 0, length, ENC_NA); /*? */ |
1026 | 0 | break; |
1027 | | |
1028 | 0 | case GVCP_NUMBER_OF_NETWORK_INTERFACES: |
1029 | 0 | proto_tree_add_item(branch, hf_gvcp_number_interfaces, tvb, offset, 4, ENC_BIG_ENDIAN); |
1030 | 0 | break; |
1031 | | |
1032 | 0 | case GVCP_PERSISTENT_IP_ADDRESS_0: |
1033 | 0 | case GVCP_PERSISTENT_IP_ADDRESS_1: |
1034 | 0 | case GVCP_PERSISTENT_IP_ADDRESS_2: |
1035 | 0 | case GVCP_PERSISTENT_IP_ADDRESS_3: |
1036 | 0 | proto_tree_add_item(branch, hf_gvcp_persistent_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
1037 | 0 | break; |
1038 | | |
1039 | 0 | case GVCP_PERSISTENT_SUBNET_MASK_0: |
1040 | 0 | case GVCP_PERSISTENT_SUBNET_MASK_1: |
1041 | 0 | case GVCP_PERSISTENT_SUBNET_MASK_2: |
1042 | 0 | case GVCP_PERSISTENT_SUBNET_MASK_3: |
1043 | 0 | proto_tree_add_item(branch, hf_gvcp_persistent_subnet, tvb, offset, 4, ENC_BIG_ENDIAN); |
1044 | 0 | break; |
1045 | | |
1046 | 0 | case GVCP_PERSISTENT_DEFAULT_GATEWAY_0: |
1047 | 0 | case GVCP_PERSISTENT_DEFAULT_GATEWAY_1: |
1048 | 0 | case GVCP_PERSISTENT_DEFAULT_GATEWAY_2: |
1049 | 0 | case GVCP_PERSISTENT_DEFAULT_GATEWAY_3: |
1050 | 0 | proto_tree_add_item(branch, hf_gvcp_persistent_gateway, tvb, offset, 4, ENC_BIG_ENDIAN); |
1051 | 0 | break; |
1052 | | |
1053 | 0 | case GVCP_LINK_SPEED_0: |
1054 | 0 | case GVCP_LINK_SPEED_1: |
1055 | 0 | case GVCP_LINK_SPEED_2: |
1056 | 0 | case GVCP_LINK_SPEED_3: |
1057 | 0 | proto_tree_add_item(branch, hf_gvcp_link_speed, tvb, offset, 4, ENC_BIG_ENDIAN); |
1058 | 0 | break; |
1059 | | |
1060 | 0 | case GVCP_NUMBER_OF_MESSAGE_CHANNELS: |
1061 | 0 | proto_tree_add_item(branch, hf_gvcp_number_message_channels, tvb, offset, 4, ENC_BIG_ENDIAN); |
1062 | 0 | break; |
1063 | | |
1064 | 0 | case GVCP_NUMBER_OF_STREAM_CHANNELS: |
1065 | 0 | proto_tree_add_item(branch, hf_gvcp_number_stream_channels, tvb, offset, 4, ENC_BIG_ENDIAN); |
1066 | 0 | break; |
1067 | | |
1068 | 0 | case GVCP_NUMBER_OF_ACTION_SIGNALS: |
1069 | 0 | proto_tree_add_item(branch, hf_gvcp_number_action_signals, tvb, offset, 4, ENC_BIG_ENDIAN); |
1070 | 0 | break; |
1071 | | |
1072 | 0 | case GVCP_ACTION_DEVICE_KEY: |
1073 | 0 | proto_tree_add_item(branch, hf_gvcp_writeregcmd_data, tvb, offset, 4, ENC_BIG_ENDIAN); /*? */ |
1074 | 0 | break; |
1075 | | |
1076 | 0 | case GVCP_NUMBER_OF_ACTIVE_LINKS: |
1077 | 0 | proto_tree_add_item(branch, hf_gvcp_number_of_active_links_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1078 | 0 | break; |
1079 | | |
1080 | 0 | case GVCP_SC_CAPS: |
1081 | 0 | proto_tree_add_item(branch, hf_gvcp_sccaps_scspx_register_supported, tvb, offset, 4, ENC_BIG_ENDIAN); |
1082 | 0 | proto_tree_add_item(branch, hf_gvcp_sccaps_legacy_16bit_blockid_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1083 | 0 | proto_tree_add_item(branch, hf_gvcp_sccaps_scmbsx_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1084 | 0 | proto_tree_add_item(branch, hf_gvcp_sccaps_scebax_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1085 | 0 | break; |
1086 | | |
1087 | 0 | case GVCP_MESSAGE_CHANNEL_CAPS: |
1088 | 0 | proto_tree_add_item(branch, hf_gvcp_mcsp_supported, tvb, offset, 4, ENC_BIG_ENDIAN); |
1089 | 0 | proto_tree_add_item(branch, hf_gvcp_mccfg_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1090 | 0 | proto_tree_add_item(branch, hf_gvcp_mcec_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1091 | 0 | break; |
1092 | | |
1093 | 0 | case GVCP_CAPABILITY: |
1094 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_user_defined, tvb, offset, 4, ENC_BIG_ENDIAN); |
1095 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_serial_number, tvb, offset, 4, ENC_BIG_ENDIAN); |
1096 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_heartbeat_disable, tvb, offset, 4, ENC_BIG_ENDIAN); |
1097 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_link_speed, tvb, offset, 4, ENC_BIG_ENDIAN); |
1098 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_ccp_application_portip, tvb, offset, 4, ENC_BIG_ENDIAN); |
1099 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_manifest_table, tvb, offset, 4, ENC_BIG_ENDIAN); |
1100 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_test_data, tvb, offset, 4, ENC_BIG_ENDIAN); |
1101 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_discovery_ACK_delay, tvb, offset, 4, ENC_BIG_ENDIAN); |
1102 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_writable_discovery_ACK_delay, tvb, offset, 4, ENC_BIG_ENDIAN); |
1103 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_extended_status_code_v1_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1104 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_primary_application_switchover, tvb, offset, 4, ENC_BIG_ENDIAN); |
1105 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_unconditional_action_command, tvb, offset, 4, ENC_BIG_ENDIAN); |
1106 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_1588_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1107 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_extended_status_code_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1108 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_scheduled_action_command_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1109 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_ieee1588_extended_capabilities_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1110 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_action_command, tvb, offset, 4, ENC_BIG_ENDIAN); |
1111 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_pending, tvb, offset, 4, ENC_BIG_ENDIAN); |
1112 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_evendata, tvb, offset, 4, ENC_BIG_ENDIAN); |
1113 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_event, tvb, offset, 4, ENC_BIG_ENDIAN); |
1114 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_packetresend, tvb, offset, 4, ENC_BIG_ENDIAN); |
1115 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_writemem, tvb, offset, 4, ENC_BIG_ENDIAN); |
1116 | 0 | proto_tree_add_item(branch, hf_gvcp_capability_concatenation, tvb, offset, 4, ENC_BIG_ENDIAN); |
1117 | 0 | break; |
1118 | | |
1119 | 0 | case GVCP_HEARTBEAT_TIMEOUT: |
1120 | 0 | proto_tree_add_item(branch, hf_gvcp_heartbeat, tvb, offset, 4, ENC_BIG_ENDIAN); |
1121 | 0 | break; |
1122 | | |
1123 | 0 | case GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH: |
1124 | 0 | proto_tree_add_item(branch, hf_gvcp_high_timestamp_frequency, tvb, offset, 4, ENC_BIG_ENDIAN); |
1125 | 0 | break; |
1126 | | |
1127 | 0 | case GVCP_TIMESTAMP_TICK_FREQUENCY_LOW: |
1128 | 0 | proto_tree_add_item(branch, hf_gvcp_low_timestamp_frequency, tvb, offset, 4, ENC_BIG_ENDIAN); |
1129 | 0 | break; |
1130 | | |
1131 | 0 | case GVCP_TIMESTAMP_CONTROL: |
1132 | 0 | proto_tree_add_item(branch, hf_gvcp_timestamp_control_latch, tvb, offset, 4, ENC_BIG_ENDIAN); |
1133 | 0 | proto_tree_add_item(branch, hf_gvcp_timestamp_control_reset, tvb, offset, 4, ENC_BIG_ENDIAN); |
1134 | 0 | break; |
1135 | | |
1136 | 0 | case GVCP_TIMESTAMP_VALUE_HIGH: |
1137 | 0 | proto_tree_add_item(branch, hf_gvcp_high_timestamp_value, tvb, offset, 4, ENC_BIG_ENDIAN); |
1138 | 0 | break; |
1139 | | |
1140 | 0 | case GVCP_TIMESTAMP_VALUE_LOW: |
1141 | 0 | proto_tree_add_item(branch, hf_gvcp_low_timestamp_value, tvb, offset, 4, ENC_BIG_ENDIAN); |
1142 | 0 | break; |
1143 | | |
1144 | 0 | case GVCP_DISCOVERY_ACK_DELAY: |
1145 | 0 | proto_tree_add_item(branch, hf_gvcp_discovery_ACK_delay, tvb, offset, 4, ENC_BIG_ENDIAN); |
1146 | 0 | break; |
1147 | | |
1148 | 0 | case GVCP_CONFIGURATION: |
1149 | 0 | proto_tree_add_item(branch, hf_gvcp_configuration_1588_enable_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1150 | 0 | proto_tree_add_item(branch, hf_gvcp_configuration_extended_status_codes_enable_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1151 | 0 | proto_tree_add_item(branch, hf_gvcp_configuration_unconditional_action_command_enable_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1152 | 0 | proto_tree_add_item(branch, hf_gvcp_configuration_extended_status_codes_enable_v1_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1153 | 0 | proto_tree_add_item(branch, hf_gvcp_configuration_pending_ack_enable, tvb, offset, 4, ENC_BIG_ENDIAN); |
1154 | 0 | proto_tree_add_item(branch, hf_gvcp_configuration_heartbeat_disable, tvb, offset, 4, ENC_BIG_ENDIAN); |
1155 | 0 | break; |
1156 | | |
1157 | 0 | case GVCP_PENDING_TIMEOUT: |
1158 | 0 | proto_tree_add_item(branch, hf_gvcp_pending_timeout_max_execution, tvb, offset, 4, ENC_BIG_ENDIAN); |
1159 | 0 | break; |
1160 | | |
1161 | 0 | case GVCP_CONTROL_SWITCHOVER_KEY: |
1162 | 0 | proto_tree_add_item(branch, hf_gvcp_control_switchover_key_register, tvb, offset, 4, ENC_BIG_ENDIAN); |
1163 | 0 | break; |
1164 | | |
1165 | 0 | case GVCP_GVSCP_CONFIGURATION: |
1166 | 0 | proto_tree_add_item(branch, hf_gvcp_gvsp_configuration_64bit_blockid_enable_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1167 | 0 | break; |
1168 | | |
1169 | 0 | case GVCP_PHYSICAL_LINK_CAPABILITY: |
1170 | 0 | proto_tree_add_item(branch, hf_gvcp_link_dlag_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1171 | 0 | proto_tree_add_item(branch, hf_gvcp_link_slag_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1172 | 0 | proto_tree_add_item(branch, hf_gvcp_link_ml_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1173 | 0 | proto_tree_add_item(branch, hf_gvcp_link_sl_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1174 | 0 | break; |
1175 | | |
1176 | 0 | case GVCP_PHYSICAL_LINK_CONFIGURATION: |
1177 | 0 | proto_tree_add_item(branch, hf_gvcp_link_dlag_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1178 | 0 | proto_tree_add_item(branch, hf_gvcp_link_slag_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1179 | 0 | proto_tree_add_item(branch, hf_gvcp_link_ml_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1180 | 0 | proto_tree_add_item(branch, hf_gvcp_link_sl_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1181 | 0 | break; |
1182 | | |
1183 | 0 | case GVCP_IEEE_1588_STATUS: |
1184 | 0 | proto_tree_add_item(branch, hf_gvcp_ieee1588_clock_status_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1185 | 0 | break; |
1186 | | |
1187 | 0 | case GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE: |
1188 | 0 | proto_tree_add_item(branch, hf_gvcp_scheduled_action_command_queue_size_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1189 | 0 | break; |
1190 | | |
1191 | 0 | case GVCP_IEEE_1588_EXTENDED_CAPABILITY: |
1192 | 0 | proto_tree_add_item(branch, hf_gvcp_ieee1588_profile_registers_present_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1193 | 0 | break; |
1194 | | |
1195 | 0 | case GVCP_IEEE_1588_SUPPORTED_PROFILES: |
1196 | 0 | proto_tree_add_item(branch, hf_gvcp_ieee1588_ptp_profile_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1197 | 0 | proto_tree_add_item(branch, hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1198 | 0 | break; |
1199 | | |
1200 | 0 | case GVCP_IEEE_1588_SELECTED_PROFILE: |
1201 | 0 | proto_tree_add_item(branch, hf_gvcp_selected_ieee1588_profile_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1202 | 0 | break; |
1203 | | |
1204 | 0 | case GVCP_CCP: |
1205 | 0 | proto_tree_add_item(branch, hf_gvcp_control_switchover_key, tvb, offset, 4, ENC_BIG_ENDIAN); |
1206 | 0 | proto_tree_add_item(branch, hf_gvcp_control_switchover_en, tvb, offset, 4, ENC_BIG_ENDIAN); |
1207 | 0 | proto_tree_add_item(branch, hf_gvcp_control_access, tvb, offset, 4, ENC_BIG_ENDIAN); |
1208 | 0 | proto_tree_add_item(branch, hf_gvcp_exclusive_access, tvb, offset, 4, ENC_BIG_ENDIAN); |
1209 | 0 | break; |
1210 | | |
1211 | 0 | case GVCP_PRIMARY_APPLICATION_PORT: |
1212 | 0 | proto_tree_add_item(branch, hf_gvcp_primary_application_host_port, tvb, offset, 4, ENC_BIG_ENDIAN); |
1213 | 0 | break; |
1214 | | |
1215 | 0 | case GVCP_PRIMARY_APPLICATION_IP_ADDRESS: |
1216 | 0 | proto_tree_add_item(branch, hf_gvcp_primary_application_ip_address, tvb, offset, 4, ENC_BIG_ENDIAN); |
1217 | 0 | break; |
1218 | | |
1219 | 0 | case GVCP_MC_DESTINATION_PORT: |
1220 | 0 | proto_tree_add_item(branch, hf_gvcp_network_interface_index, tvb, offset, 4, ENC_BIG_ENDIAN); |
1221 | 0 | proto_tree_add_item(branch, hf_gvcp_host_port, tvb, offset, 4, ENC_BIG_ENDIAN); |
1222 | 0 | break; |
1223 | | |
1224 | 0 | case GVCP_MC_DESTINATION_ADDRESS: |
1225 | 0 | proto_tree_add_item(branch, hf_gvcp_channel_destination_ip, tvb, offset, 4, ENC_BIG_ENDIAN); |
1226 | 0 | break; |
1227 | | |
1228 | 0 | case GVCP_MC_TIMEOUT: |
1229 | 0 | proto_tree_add_item(branch, hf_gvcp_message_channel_transmission_timeout, tvb, offset, 4, ENC_BIG_ENDIAN); |
1230 | 0 | break; |
1231 | | |
1232 | 0 | case GVCP_MC_RETRY_COUNT: |
1233 | 0 | proto_tree_add_item(branch, hf_gvcp_message_channel_retry_count, tvb, offset, 4, ENC_BIG_ENDIAN); |
1234 | 0 | break; |
1235 | | |
1236 | 0 | case GVCP_MC_SOURCE_PORT: |
1237 | 0 | proto_tree_add_item(branch, hf_gvcp_message_channel_source_port, tvb, offset, 4, ENC_BIG_ENDIAN); |
1238 | 0 | break; |
1239 | | |
1240 | 0 | case GVCP_MC_CONFIGURATION: |
1241 | 0 | proto_tree_add_item(branch, hf_gvcp_mcec_enabled_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1242 | 0 | break; |
1243 | | |
1244 | 0 | case GVCP_SC_DESTINATION_PORT(0): |
1245 | 0 | case GVCP_SC_DESTINATION_PORT(1): |
1246 | 0 | case GVCP_SC_DESTINATION_PORT(2): |
1247 | 0 | case GVCP_SC_DESTINATION_PORT(3): |
1248 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_direction, tvb, offset, 4, ENC_BIG_ENDIAN); |
1249 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_ni_index, tvb, offset, 4, ENC_BIG_ENDIAN); |
1250 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_host_port, tvb, offset, 4, ENC_BIG_ENDIAN); |
1251 | 0 | break; |
1252 | | |
1253 | 0 | case GVCP_SC_PACKET_SIZE(0): |
1254 | 0 | case GVCP_SC_PACKET_SIZE(1): |
1255 | 0 | case GVCP_SC_PACKET_SIZE(2): |
1256 | 0 | case GVCP_SC_PACKET_SIZE(3): |
1257 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_fire_test_packet, tvb, offset, 4, ENC_BIG_ENDIAN); |
1258 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_do_not_fragment, tvb, offset, 4, ENC_BIG_ENDIAN); |
1259 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_pixel_endianness, tvb, offset, 4, ENC_BIG_ENDIAN); |
1260 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_packet_size, tvb, offset, 4, ENC_BIG_ENDIAN); |
1261 | 0 | break; |
1262 | | |
1263 | 0 | case GVCP_SC_PACKET_DELAY(0): |
1264 | 0 | case GVCP_SC_PACKET_DELAY(1): |
1265 | 0 | case GVCP_SC_PACKET_DELAY(2): |
1266 | 0 | case GVCP_SC_PACKET_DELAY(3): |
1267 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_packet_delay, tvb, offset, 4, ENC_BIG_ENDIAN); |
1268 | 0 | break; |
1269 | | |
1270 | 0 | case GVCP_SC_DESTINATION_ADDRESS(0): |
1271 | 0 | case GVCP_SC_DESTINATION_ADDRESS(1): |
1272 | 0 | case GVCP_SC_DESTINATION_ADDRESS(2): |
1273 | 0 | case GVCP_SC_DESTINATION_ADDRESS(3): |
1274 | 0 | { |
1275 | 0 | uint32_t value = 0; |
1276 | 0 | value = tvb_get_letohl(tvb, offset); |
1277 | 0 | proto_tree_add_ipv4(branch, hf_gvcp_sc_destination_ip, tvb, offset, 4, value); |
1278 | 0 | } |
1279 | 0 | break; |
1280 | | |
1281 | 0 | case GVCP_SC_SOURCE_PORT(0): |
1282 | 0 | case GVCP_SC_SOURCE_PORT(1): |
1283 | 0 | case GVCP_SC_SOURCE_PORT(2): |
1284 | 0 | case GVCP_SC_SOURCE_PORT(3): |
1285 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_source_port, tvb, offset, 4, ENC_BIG_ENDIAN); |
1286 | 0 | break; |
1287 | | |
1288 | 0 | case GVCP_SC_CAPABILITY(0): |
1289 | 0 | case GVCP_SC_CAPABILITY(1): |
1290 | 0 | case GVCP_SC_CAPABILITY(2): |
1291 | 0 | case GVCP_SC_CAPABILITY(3): |
1292 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_big_little_endian_supported, tvb, offset, 4, ENC_BIG_ENDIAN); |
1293 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_ip_reassembly_supported, tvb, offset, 4, ENC_BIG_ENDIAN); |
1294 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_scmpcx_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1295 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_gendc_supported_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1296 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_multi_part_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1297 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_large_leader_trailer_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1298 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_multizone_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1299 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_destination_option_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1300 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_all_in_transmission_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1301 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_unconditional_streaming_supported, tvb, offset, 4, ENC_BIG_ENDIAN); |
1302 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_extended_chunk_data_supported, tvb, offset, 4, ENC_BIG_ENDIAN); |
1303 | 0 | break; |
1304 | | |
1305 | 0 | case GVCP_SC_CONFIGURATION(0): |
1306 | 0 | case GVCP_SC_CONFIGURATION(1): |
1307 | 0 | case GVCP_SC_CONFIGURATION(2): |
1308 | 0 | case GVCP_SC_CONFIGURATION(3): |
1309 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_gendc_enabled_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1310 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_multi_part_enabled_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1311 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_large_leader_trailer_enabled_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN); |
1312 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_destination_option_enabled_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1313 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_all_in_transmission_enabled_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1314 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_unconditional_streaming_enabled, tvb, offset, 4, ENC_BIG_ENDIAN); |
1315 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_extended_chunk_data_enabled, tvb, offset, 4, ENC_BIG_ENDIAN); |
1316 | 0 | break; |
1317 | | |
1318 | 0 | case GVCP_SC_ZONE(0): |
1319 | 0 | case GVCP_SC_ZONE(1): |
1320 | 0 | case GVCP_SC_ZONE(2): |
1321 | 0 | case GVCP_SC_ZONE(3): |
1322 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_additional_zones_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1323 | 0 | break; |
1324 | | |
1325 | 0 | case GVCP_SC_ZONE_DIRECTION(0): |
1326 | 0 | case GVCP_SC_ZONE_DIRECTION(1): |
1327 | 0 | case GVCP_SC_ZONE_DIRECTION(2): |
1328 | 0 | case GVCP_SC_ZONE_DIRECTION(3): |
1329 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone0_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1330 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone1_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1331 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone2_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1332 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone3_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1333 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone4_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1334 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone5_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1335 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone6_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1336 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone7_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1337 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone8_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1338 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone9_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1339 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone10_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1340 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone11_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1341 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone12_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1342 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone13_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1343 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone14_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1344 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone15_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1345 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone16_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1346 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone17_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1347 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone18_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1348 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone19_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1349 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone20_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1350 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone21_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1351 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone22_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1352 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone23_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1353 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone24_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1354 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone25_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1355 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone26_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1356 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone27_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1357 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone28_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1358 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone29_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1359 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone30_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1360 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_zone31_direction_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN); |
1361 | 0 | break; |
1362 | | |
1363 | 0 | case GVCP_SC_MAX_PACKET_COUNT(0): |
1364 | 0 | case GVCP_SC_MAX_PACKET_COUNT(1): |
1365 | 0 | case GVCP_SC_MAX_PACKET_COUNT(2): |
1366 | 0 | case GVCP_SC_MAX_PACKET_COUNT(3): |
1367 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_max_packet_count_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1368 | 0 | break; |
1369 | | |
1370 | 0 | case GVCP_SC_MAX_BLOCK_SIZE_HIGH(0): |
1371 | 0 | case GVCP_SC_MAX_BLOCK_SIZE_HIGH(1): |
1372 | 0 | case GVCP_SC_MAX_BLOCK_SIZE_HIGH(2): |
1373 | 0 | case GVCP_SC_MAX_BLOCK_SIZE_HIGH(3): |
1374 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_max_block_size_high_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1375 | 0 | break; |
1376 | | |
1377 | 0 | case GVCP_SC_MAX_BLOCK_SIZE_LOW(0): |
1378 | 0 | case GVCP_SC_MAX_BLOCK_SIZE_LOW(1): |
1379 | 0 | case GVCP_SC_MAX_BLOCK_SIZE_LOW(2): |
1380 | 0 | case GVCP_SC_MAX_BLOCK_SIZE_LOW(3): |
1381 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_max_block_size_low_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1382 | 0 | break; |
1383 | | |
1384 | 0 | case GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(0): |
1385 | 0 | case GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(1): |
1386 | 0 | case GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(2): |
1387 | 0 | case GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(3): |
1388 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_extended_registers_address_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1389 | |
|
1390 | 0 | break; |
1391 | | |
1392 | 0 | case GVCP_MANIFEST_TABLE: |
1393 | 0 | proto_tree_add_item(branch, hf_gvcp_manifest_table, tvb, 0, length, ENC_NA); |
1394 | 0 | break; |
1395 | | |
1396 | 0 | case GVCP_ACTION_GROUP_KEY(0): |
1397 | 0 | case GVCP_ACTION_GROUP_KEY(1): |
1398 | 0 | case GVCP_ACTION_GROUP_KEY(2): |
1399 | 0 | case GVCP_ACTION_GROUP_KEY(3): |
1400 | 0 | case GVCP_ACTION_GROUP_KEY(4): |
1401 | 0 | case GVCP_ACTION_GROUP_KEY(5): |
1402 | 0 | case GVCP_ACTION_GROUP_KEY(6): |
1403 | 0 | case GVCP_ACTION_GROUP_KEY(7): |
1404 | 0 | case GVCP_ACTION_GROUP_KEY(8): |
1405 | 0 | case GVCP_ACTION_GROUP_KEY(9): |
1406 | 0 | proto_tree_add_item(branch, hf_gvcp_action_group_key, tvb, offset, 4, ENC_BIG_ENDIAN); |
1407 | 0 | break; |
1408 | | |
1409 | 0 | case GVCP_ACTION_GROUP_MASK(0): |
1410 | 0 | case GVCP_ACTION_GROUP_MASK(1): |
1411 | 0 | case GVCP_ACTION_GROUP_MASK(2): |
1412 | 0 | case GVCP_ACTION_GROUP_MASK(3): |
1413 | 0 | case GVCP_ACTION_GROUP_MASK(4): |
1414 | 0 | case GVCP_ACTION_GROUP_MASK(5): |
1415 | 0 | case GVCP_ACTION_GROUP_MASK(6): |
1416 | 0 | case GVCP_ACTION_GROUP_MASK(7): |
1417 | 0 | case GVCP_ACTION_GROUP_MASK(8): |
1418 | 0 | case GVCP_ACTION_GROUP_MASK(9): |
1419 | 0 | proto_tree_add_item(branch, hf_gvcp_action_group_mask, tvb, offset, 4, ENC_BIG_ENDIAN); |
1420 | 0 | break; |
1421 | | |
1422 | 0 | default: |
1423 | 0 | return 0; |
1424 | 40 | } |
1425 | | |
1426 | 40 | return 1; |
1427 | 40 | } |
1428 | | |
1429 | | /* |
1430 | | \brief Attempts to dissect an extended bootstrap register |
1431 | | */ |
1432 | | |
1433 | | static int dissect_extended_bootstrap_register(uint32_t addr, proto_tree *branch, tvbuff_t *tvb, int offset, int length _U_) |
1434 | 0 | { |
1435 | 0 | switch (addr) |
1436 | 0 | { |
1437 | 0 | case GVCP_SC_GENDC_DESCRIPTOR_ADDRESS: |
1438 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_gendc_descriptor_address_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1439 | 0 | break; |
1440 | 0 | case GVCP_SC_GENDC_DESCRIPTOR_SIZE: |
1441 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_gendc_descriptor_size_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1442 | 0 | break; |
1443 | 0 | case GVCP_SC_GENDC_FLOW_MAPPING_TABLE_ADDRESS: |
1444 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_gendc_flow_mapping_table_address_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1445 | 0 | break; |
1446 | 0 | case GVCP_SC_GENDC_FLOW_MAPPING_TABLE_SIZE: |
1447 | 0 | proto_tree_add_item(branch, hf_gvcp_sc_gendc_flow_mapping_table_size_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1448 | 0 | break; |
1449 | | |
1450 | 0 | default: |
1451 | 0 | return 0; |
1452 | 0 | } |
1453 | | |
1454 | 0 | return 1; |
1455 | 0 | } |
1456 | | |
1457 | | |
1458 | | /* Attempts to dissect a bootstrap register (readmem context) */ |
1459 | | static int dissect_register_data(uint32_t addr, proto_tree *branch, tvbuff_t *tvb, int offset, int length) |
1460 | 0 | { |
1461 | 0 | switch (addr) |
1462 | 0 | { |
1463 | 0 | case GVCP_MANUFACTURER_NAME: |
1464 | 0 | if (length == 32) |
1465 | 0 | { |
1466 | 0 | proto_tree_add_item(branch, hf_gvcp_manufacturer_name, tvb, offset, -1, ENC_ASCII); |
1467 | 0 | } |
1468 | 0 | break; |
1469 | | |
1470 | 0 | case GVCP_MODEL_NAME: |
1471 | 0 | if (length == 32) |
1472 | 0 | { |
1473 | 0 | proto_tree_add_item(branch, hf_gvcp_model_name, tvb, offset, -1, ENC_ASCII); |
1474 | 0 | } |
1475 | 0 | break; |
1476 | | |
1477 | 0 | case GVCP_DEVICE_VERSION: |
1478 | 0 | if (length == 32) |
1479 | 0 | { |
1480 | 0 | proto_tree_add_item(branch, hf_gvcp_device_version, tvb, offset, -1, ENC_ASCII); |
1481 | 0 | } |
1482 | 0 | break; |
1483 | | |
1484 | 0 | case GVCP_MANUFACTURER_INFO: |
1485 | 0 | if (length == 48) |
1486 | 0 | { |
1487 | 0 | proto_tree_add_item(branch, hf_gvcp_manufacturer_specific_info, tvb, offset, -1, ENC_ASCII); |
1488 | 0 | } |
1489 | 0 | break; |
1490 | | |
1491 | 0 | case GVCP_SERIAL_NUMBER: |
1492 | 0 | if (length == 16) |
1493 | 0 | { |
1494 | 0 | proto_tree_add_item(branch, hf_gvcp_serial_number, tvb, offset, -1, ENC_ASCII); |
1495 | 0 | } |
1496 | 0 | break; |
1497 | | |
1498 | 0 | case GVCP_USER_DEFINED_NAME: |
1499 | 0 | if (length == 16) |
1500 | 0 | { |
1501 | 0 | proto_tree_add_item(branch, hf_gvcp_user_defined_name, tvb, offset, -1, ENC_ASCII); |
1502 | 0 | } |
1503 | 0 | break; |
1504 | | |
1505 | 0 | case GVCP_FIRST_URL: |
1506 | 0 | if (length == 512) |
1507 | 0 | { |
1508 | 0 | proto_tree_add_item(branch, hf_gvcp_first_xml_device_description_file, tvb, offset, -1, ENC_ASCII); |
1509 | 0 | } |
1510 | 0 | break; |
1511 | | |
1512 | 0 | case GVCP_SECOND_URL: |
1513 | 0 | if (length == 512) |
1514 | 0 | { |
1515 | 0 | proto_tree_add_item(branch, hf_gvcp_second_xml_device_description_file, tvb, offset, -1, ENC_ASCII); |
1516 | 0 | } |
1517 | 0 | break; |
1518 | | |
1519 | 0 | default: |
1520 | 0 | return 0; |
1521 | 0 | } |
1522 | | |
1523 | 0 | return 1; |
1524 | 0 | } |
1525 | | |
1526 | | |
1527 | | /* |
1528 | | \brief DISSECT: Force IP command |
1529 | | */ |
1530 | | |
1531 | | static void dissect_forceip_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int startoffset, int length) |
1532 | 0 | { |
1533 | 0 | const int mac_offset = startoffset + 2; |
1534 | 0 | const int ip_offset = startoffset + 20; |
1535 | 0 | const int mask_offset = startoffset + 36; |
1536 | 0 | const int gateway_offset = startoffset + 52; |
1537 | |
|
1538 | 0 | if (gvcp_telegram_tree != NULL) |
1539 | 0 | { |
1540 | 0 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length, |
1541 | 0 | ett_gvcp_payload_cmd, NULL, "FORCEIP_CMD Options"); |
1542 | |
|
1543 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_forceip_mac_address, tvb, mac_offset, 6, ENC_NA); |
1544 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_forceip_static_IP, tvb, ip_offset, 4, ENC_BIG_ENDIAN); |
1545 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_forceip_static_subnet_mask, tvb, mask_offset, 4, ENC_BIG_ENDIAN); |
1546 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_forceip_static_default_gateway, tvb, gateway_offset, 4, ENC_BIG_ENDIAN); |
1547 | 0 | } |
1548 | 0 | } |
1549 | | |
1550 | | |
1551 | | /* |
1552 | | \brief DISSECT: Packet resend command |
1553 | | */ |
1554 | | |
1555 | | static void dissect_packetresend_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, int extendedblockid) |
1556 | 0 | { |
1557 | |
|
1558 | 0 | uint64_t block_id = 0; |
1559 | 0 | uint32_t first_packet = 0; |
1560 | 0 | uint32_t last_packet = 0; |
1561 | 0 | int offset = startoffset; |
1562 | | |
1563 | | /* Get block ID to generate summary - supports 16 and 64 bits */ |
1564 | 0 | if (extendedblockid == 0) |
1565 | 0 | { |
1566 | 0 | block_id = tvb_get_ntohs(tvb, offset + 2); |
1567 | 0 | } |
1568 | 0 | else |
1569 | 0 | { |
1570 | 0 | uint64_t highid; |
1571 | 0 | uint64_t lowid; |
1572 | 0 | highid = tvb_get_ntohl(tvb, offset + 12); |
1573 | 0 | lowid = tvb_get_ntohl(tvb, offset + 16); |
1574 | |
|
1575 | 0 | block_id = lowid | (highid << 32); |
1576 | 0 | } |
1577 | | |
1578 | | /* Get first and last packet IDs for summary - supports 24 and 32 bits */ |
1579 | 0 | if (extendedblockid == 0) |
1580 | 0 | { |
1581 | | /* in GEV1.2 and prior we use only 24 bit packet IDs */ |
1582 | 0 | first_packet = tvb_get_ntohl(tvb, offset + 4) & 0x00FFFFFF; |
1583 | 0 | last_packet = tvb_get_ntohl(tvb, offset + 8) & 0x00FFFFFF; |
1584 | 0 | } |
1585 | 0 | else |
1586 | 0 | { |
1587 | 0 | first_packet = tvb_get_ntohl(tvb, offset + 4); |
1588 | 0 | last_packet = tvb_get_ntohl(tvb, offset + 8); |
1589 | 0 | } |
1590 | |
|
1591 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "Block %" PRIu64 ", Packets %d->%d", (int64_t)block_id, first_packet, last_packet); |
1592 | |
|
1593 | 0 | if (gvcp_telegram_tree != NULL) |
1594 | 0 | { |
1595 | | /* Command header/tree */ |
1596 | 0 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length, |
1597 | 0 | ett_gvcp_payload_cmd, NULL, "PACKETRESEND_CMD Values"); |
1598 | | |
1599 | | /* Stream channel */ |
1600 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_stream_channel_index, tvb, offset, 2, ENC_BIG_ENDIAN); |
1601 | | |
1602 | | /* First, last packet IDs - supports 24 and 32 bits */ |
1603 | 0 | if (extendedblockid == 0) |
1604 | 0 | { |
1605 | | /* Block ID (16 bits) only if extended block ID disabled */ |
1606 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_block_id, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1607 | | /* in GEV1.2 and prior we use only 24 bit packet IDs */ |
1608 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_first_packet_id, tvb, offset + 5, 3, ENC_BIG_ENDIAN); |
1609 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_last_packet_id, tvb, offset + 9, 3, ENC_BIG_ENDIAN); |
1610 | 0 | } |
1611 | 0 | else |
1612 | 0 | { |
1613 | | /* Extended block ID (64 bits) only if enabled (from GVCP header flags) */ |
1614 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_extended_block_id_v2_0, tvb, offset + 12, 8, ENC_BIG_ENDIAN); |
1615 | | /* Extended packed ID (32 bits) only if enabled */ |
1616 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_extended_first_packet_id_v2_0, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
1617 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_resendcmd_extended_last_packet_id_v2_0, tvb, offset + 8, 4, ENC_BIG_ENDIAN); |
1618 | 0 | } |
1619 | 0 | } |
1620 | 0 | } |
1621 | | |
1622 | | |
1623 | | /* |
1624 | | \brief DISSECT: Read register command |
1625 | | */ |
1626 | | |
1627 | | static void dissect_readreg_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t* gvcp_trans) |
1628 | 2 | { |
1629 | 2 | proto_item *item = NULL; |
1630 | 2 | uint32_t addr = 0; |
1631 | 2 | const char* address_string = NULL; |
1632 | 2 | bool is_custom_register = false; |
1633 | 2 | int offset = startoffset; |
1634 | 2 | int i; |
1635 | 2 | int num_registers = length / 4; |
1636 | | |
1637 | 2 | addr = tvb_get_ntohl(tvb, offset); |
1638 | 2 | address_string = get_register_name_from_address(addr, pinfo->pool, gvcp_info, &is_custom_register); |
1639 | | |
1640 | 2 | if (num_registers > 1) |
1641 | 2 | { |
1642 | 2 | col_append_str(pinfo->cinfo, COL_INFO, "[Multiple Register Read Command]"); |
1643 | 2 | } |
1644 | 0 | else |
1645 | 0 | { |
1646 | 0 | col_append_str(pinfo->cinfo, COL_INFO, address_string); |
1647 | 0 | } |
1648 | | |
1649 | 2 | if (!pinfo->fd->visited) |
1650 | 2 | { |
1651 | 2 | gvcp_trans->addr_list = wmem_array_new(wmem_file_scope(), sizeof(uint32_t)); |
1652 | 2 | } |
1653 | | |
1654 | | /* Subtree Initialization for Payload Data: READREG_CMD */ |
1655 | 2 | if (gvcp_telegram_tree != NULL) |
1656 | 2 | { |
1657 | 2 | if (num_registers > 1) |
1658 | 2 | { |
1659 | 2 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length, |
1660 | 2 | ett_gvcp_payload_cmd, &item, "READREG_CMD Address List"); |
1661 | 2 | } |
1662 | 2 | } |
1663 | | |
1664 | 9 | for (i = 0; i < num_registers; i++) |
1665 | 7 | { |
1666 | | /* For block read register request, address gets re-initialized here in the for loop */ |
1667 | 7 | addr = tvb_get_ntohl(tvb, offset); |
1668 | | |
1669 | 7 | if (gvcp_trans && (!pinfo->fd->visited)) |
1670 | 5 | { |
1671 | 5 | wmem_array_append_one(gvcp_trans->addr_list, addr); |
1672 | 5 | } |
1673 | | |
1674 | 7 | if (gvcp_telegram_tree != NULL) |
1675 | 5 | { |
1676 | 5 | if (try_val_to_str(addr, bootstrapregisternames) != NULL) |
1677 | 0 | { |
1678 | | /* Use known bootstrap register */ |
1679 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readregcmd_bootstrap_register, tvb, offset, 4, ENC_BIG_ENDIAN); |
1680 | 0 | } |
1681 | 5 | else |
1682 | 5 | { |
1683 | 5 | uint32_t extended_bootstrap_address_offset = 0; |
1684 | 5 | if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset)) |
1685 | 0 | { |
1686 | 0 | dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, 4); |
1687 | 0 | } |
1688 | 5 | else |
1689 | 5 | { |
1690 | | /* Insert data as generic register */ |
1691 | 5 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_register_addr, tvb, offset, 4, ENC_BIG_ENDIAN); |
1692 | | |
1693 | | /* Use generic register name */ |
1694 | 5 | proto_item_append_text(item, " [Unknown Register]"); |
1695 | 5 | } |
1696 | 5 | } |
1697 | 5 | } |
1698 | 7 | offset +=4; |
1699 | 7 | } |
1700 | 2 | } |
1701 | | |
1702 | | |
1703 | | /* |
1704 | | \brief DISSECT: Write register command |
1705 | | */ |
1706 | | |
1707 | | static void dissect_writereg_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t* gvcp_trans) |
1708 | 5 | { |
1709 | 5 | int offset = startoffset; |
1710 | 5 | int i; |
1711 | 5 | proto_item *item = NULL; |
1712 | 5 | uint32_t addr = 0; |
1713 | 5 | uint32_t value = 0; |
1714 | 5 | const char *address_string = NULL; |
1715 | 5 | bool is_custom_register = false; |
1716 | 5 | int num_registers = length / 8; /* divide by 8 because we are counting register-value pairs */ |
1717 | 5 | proto_tree *subtree = NULL; |
1718 | | |
1719 | 5 | if (gvcp_trans) |
1720 | 5 | { |
1721 | 5 | gvcp_trans->addr_count = num_registers; |
1722 | 5 | } |
1723 | | |
1724 | 5 | addr = tvb_get_ntohl(tvb, offset); /* first register address to be read from WRITEREG_CMD */ |
1725 | 5 | value = tvb_get_ntohl(tvb, offset+4); |
1726 | 5 | address_string = get_register_name_from_address(addr, pinfo->pool, gvcp_info, &is_custom_register); |
1727 | | |
1728 | | /* Automatically learn stream port. Dissect as external GVSP. */ |
1729 | 5 | if ((addr == GVCP_SC_DESTINATION_PORT(0)) || |
1730 | 4 | (addr == GVCP_SC_DESTINATION_PORT(1)) || |
1731 | 4 | (addr == GVCP_SC_DESTINATION_PORT(2)) || |
1732 | 4 | (addr == GVCP_SC_DESTINATION_PORT(3))) |
1733 | 0 | { |
1734 | | /* For now we simply (always) add ports. Maybe we should remove when the dissector gets unloaded? */ |
1735 | 0 | dissector_add_uint("udp.port", value, gvsp_handle); |
1736 | 0 | } |
1737 | | |
1738 | | /* Automatically learn messaging channel port. Dissect as GVCP. */ |
1739 | 5 | if (addr == GVCP_MC_DESTINATION_PORT) |
1740 | 0 | { |
1741 | | /* XXX For now we simply (always) add ports. Maybe we should remove when the dissector gets unloaded? */ |
1742 | 0 | dissector_add_uint("udp.port", value, gvcp_handle); |
1743 | 0 | } |
1744 | | |
1745 | 5 | if (num_registers > 1) |
1746 | 4 | { |
1747 | 4 | col_append_str(pinfo->cinfo, COL_INFO, "[Multiple Register Write Command]"); |
1748 | 4 | } |
1749 | 1 | else |
1750 | 1 | { |
1751 | 1 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s Value=0x%08X", address_string, value); |
1752 | 1 | } |
1753 | | |
1754 | 5 | if (gvcp_telegram_tree != NULL) |
1755 | 4 | { |
1756 | 4 | if (num_registers > 1) |
1757 | 4 | { |
1758 | 4 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length, |
1759 | 4 | ett_gvcp_payload_cmd, &item, "WRITEREG_CMD Address List"); |
1760 | 4 | } |
1761 | | |
1762 | 140 | for (i = 0; i < num_registers; i++) |
1763 | 136 | { |
1764 | | /* For block write register request, address gets re-initialized here in the for loop */ |
1765 | 136 | addr = tvb_get_ntohl(tvb, offset); |
1766 | | |
1767 | 136 | if (try_val_to_str(addr, bootstrapregisternames) != NULL) |
1768 | 40 | { |
1769 | | /* Read the WRITEREG_CMD requested register address */ |
1770 | 40 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writeregcmd_bootstrap_register, tvb, offset, 4, ENC_BIG_ENDIAN); |
1771 | 40 | subtree = proto_item_add_subtree(item, ett_gvcp_payload_cmd_subtree); |
1772 | | |
1773 | | /* Skip 32bit to dissect the value to be written to the specified address */ |
1774 | 40 | offset += 4; |
1775 | | |
1776 | | /* Read the value to be written to the specified register address */ |
1777 | 40 | dissect_register(addr, subtree, tvb, offset, 4); |
1778 | 40 | } |
1779 | 96 | else |
1780 | 96 | { |
1781 | 96 | uint32_t extended_bootstrap_address_offset = 0; |
1782 | 96 | if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset)) |
1783 | 0 | { |
1784 | | /* Read the WRITEREG_CMD requested register address */ |
1785 | 0 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writeregcmd_extended_bootstrap_register, tvb, offset, 4, ENC_BIG_ENDIAN); |
1786 | 0 | subtree = proto_item_add_subtree(item, ett_gvcp_payload_cmd_subtree); |
1787 | | |
1788 | | /* Skip 32bit to dissect the value to be written to the specified address */ |
1789 | 0 | offset += 4; |
1790 | | |
1791 | | /* Read the value to be written to the specified register address */ |
1792 | 0 | dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, subtree, tvb, offset, 4); |
1793 | 0 | } |
1794 | 96 | else |
1795 | 96 | { |
1796 | 96 | proto_tree* temp_tree = NULL; |
1797 | | |
1798 | 96 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_register_addr, tvb, offset, 4, ENC_BIG_ENDIAN); |
1799 | | |
1800 | 96 | offset += 4; |
1801 | 96 | temp_tree = proto_item_add_subtree(item, ett_gvcp_payload_cmd_subtree); |
1802 | 96 | proto_tree_add_item(temp_tree, hf_gvcp_custom_register_value, tvb, offset, 4, ENC_BIG_ENDIAN); |
1803 | 96 | } |
1804 | 96 | } |
1805 | 136 | offset += 4; |
1806 | 136 | } |
1807 | 4 | } |
1808 | 5 | } |
1809 | | |
1810 | | |
1811 | | /* |
1812 | | \brief DISSECT: Read memory command |
1813 | | */ |
1814 | | |
1815 | | static void dissect_readmem_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, gvcp_conv_info_t *gvcp_info) |
1816 | 0 | { |
1817 | 0 | uint32_t addr = 0; |
1818 | 0 | uint16_t count = 0; |
1819 | 0 | int offset = startoffset; |
1820 | |
|
1821 | 0 | addr = tvb_get_ntohl(tvb, offset); |
1822 | 0 | count = tvb_get_ntohs(tvb, offset + 6); /* Number of bytes to read from memory */ |
1823 | |
|
1824 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, " (0x%08X (%d) bytes)", addr, count); |
1825 | |
|
1826 | 0 | if (gvcp_telegram_tree != NULL) |
1827 | 0 | { |
1828 | 0 | proto_item *item = NULL; |
1829 | |
|
1830 | 0 | if (try_val_to_str(addr, bootstrapregisternames) != NULL) |
1831 | 0 | { |
1832 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readmemcmd_bootstrap_register, tvb, offset, 4, ENC_BIG_ENDIAN); |
1833 | 0 | } |
1834 | 0 | else |
1835 | 0 | { |
1836 | 0 | uint32_t extended_bootstrap_address_offset = 0; |
1837 | 0 | if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset)) |
1838 | 0 | { |
1839 | 0 | dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, 4); |
1840 | 0 | } |
1841 | 0 | else |
1842 | 0 | { |
1843 | 0 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_memory_addr, tvb, offset, 4, ENC_BIG_ENDIAN); |
1844 | 0 | proto_item_append_text(item, " [Unknown Register]"); |
1845 | 0 | } |
1846 | 0 | } |
1847 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readmemcmd_count, tvb, (offset + 6), 2, ENC_BIG_ENDIAN); |
1848 | 0 | } |
1849 | 0 | } |
1850 | | |
1851 | | |
1852 | | /* |
1853 | | \brief DISSECT: Write memory command |
1854 | | */ |
1855 | | |
1856 | | static void dissect_writemem_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t* gvcp_trans) |
1857 | 0 | { |
1858 | 0 | const char* address_string = NULL; |
1859 | 0 | bool is_custom_register = false; |
1860 | 0 | uint32_t addr = 0; |
1861 | |
|
1862 | 0 | addr = tvb_get_ntohl(tvb, startoffset); |
1863 | 0 | address_string = get_register_name_from_address(addr, pinfo->pool, gvcp_info, &is_custom_register); |
1864 | | |
1865 | | /* fill in Info column in Wireshark GUI */ |
1866 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s: %d bytes", address_string, (length - 4)); |
1867 | |
|
1868 | 0 | if (gvcp_trans && (!pinfo->fd->visited)) |
1869 | 0 | { |
1870 | 0 | gvcp_trans->addr_list = wmem_array_new(wmem_file_scope(), sizeof(uint32_t)); |
1871 | 0 | wmem_array_append_one(gvcp_trans->addr_list, addr); |
1872 | 0 | } |
1873 | |
|
1874 | 0 | if (gvcp_telegram_tree != NULL) |
1875 | 0 | { |
1876 | 0 | unsigned offset; |
1877 | 0 | unsigned byte_count; |
1878 | 0 | offset = startoffset + 4; |
1879 | 0 | byte_count = (length - 4); |
1880 | |
|
1881 | 0 | if (gvcp_trans && (gvcp_trans->rep_frame)) |
1882 | 0 | { |
1883 | 0 | proto_item *item = NULL; |
1884 | 0 | item = proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_response_in, tvb, 0, 0, gvcp_trans->rep_frame); |
1885 | 0 | proto_item_set_generated(item); |
1886 | 0 | } |
1887 | |
|
1888 | 0 | if (try_val_to_str(addr, bootstrapregisternames) != NULL) |
1889 | 0 | { |
1890 | 0 | dissect_register_data(addr, gvcp_telegram_tree, tvb, offset, byte_count); |
1891 | 0 | } |
1892 | 0 | else |
1893 | 0 | { |
1894 | 0 | uint32_t extended_bootstrap_address_offset = 0; |
1895 | 0 | if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset)) |
1896 | 0 | { |
1897 | 0 | dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, byte_count); |
1898 | 0 | } |
1899 | 0 | else |
1900 | 0 | { |
1901 | | /* Generic, unknown value */ |
1902 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writememcmd_data, tvb, offset, byte_count, ENC_NA); |
1903 | 0 | } |
1904 | 0 | } |
1905 | 0 | } |
1906 | 0 | } |
1907 | | |
1908 | | |
1909 | | /* |
1910 | | \brief DISSECT: Event command |
1911 | | */ |
1912 | | |
1913 | | static void dissect_event_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, int extendedblockids) |
1914 | 9 | { |
1915 | 9 | int32_t eventid; |
1916 | 9 | int offset; |
1917 | 9 | offset = startoffset; |
1918 | | |
1919 | | /* Get event ID */ |
1920 | 9 | eventid = tvb_get_ntohs(tvb, offset + 2); |
1921 | | |
1922 | | /* fill in Info column in Wireshark GUI */ |
1923 | 9 | col_append_fstr(pinfo->cinfo, COL_INFO, "[ID: 0x%04X]", eventid); |
1924 | | |
1925 | 9 | if (gvcp_telegram_tree != NULL) |
1926 | 9 | { |
1927 | 9 | int i; |
1928 | 9 | int event_count = 0; |
1929 | | |
1930 | | /* Compute event count based on data length */ |
1931 | 9 | if (extendedblockids == 0) |
1932 | 0 | { |
1933 | | /* No enhanced block id */ |
1934 | 0 | event_count = length / 16; |
1935 | 0 | } |
1936 | 9 | else |
1937 | 9 | { |
1938 | | /* Enhanced block id adds */ |
1939 | 9 | event_count = length / 24; |
1940 | 9 | } |
1941 | | |
1942 | 9 | if (event_count > 1) |
1943 | 9 | { |
1944 | 9 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, offset, length, |
1945 | 9 | ett_gvcp_payload_cmd, NULL, "EVENT_CMD Event List"); |
1946 | 9 | } |
1947 | | |
1948 | | |
1949 | 142 | for (i = 0; i < event_count; i++) |
1950 | 133 | { |
1951 | 133 | offset += 2; |
1952 | | |
1953 | | /* Get event ID */ |
1954 | 133 | eventid = tvb_get_ntohs(tvb, offset); |
1955 | | |
1956 | | /* Use range to determine type of event */ |
1957 | 133 | if ((eventid >= 0x0000) && (eventid <= 0x8000)) |
1958 | 104 | { |
1959 | | /* Standard ID */ |
1960 | 104 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1961 | 104 | } |
1962 | 29 | else if ((eventid >= 0x8001) && (eventid <= 0x8FFF)) |
1963 | 9 | { |
1964 | | /* Error */ |
1965 | 9 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_error_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1966 | 9 | } |
1967 | 20 | else if ((eventid >= 0x9000) && (eventid <= 0xFFFF)) |
1968 | 19 | { |
1969 | | /* Device specific */ |
1970 | 19 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_device_specific_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1971 | 19 | } |
1972 | 133 | offset += 2; |
1973 | | |
1974 | | /* Stream channel (possibly) associated with event */ |
1975 | 133 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_stream_channel_index, tvb, offset, 2, ENC_BIG_ENDIAN); |
1976 | 133 | offset += 2; |
1977 | | |
1978 | 133 | if (extendedblockids == 0) |
1979 | 0 | { |
1980 | | /* Block id (16 bit) associated with event */ |
1981 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1982 | 0 | offset += 2; |
1983 | 0 | } |
1984 | 133 | else |
1985 | 133 | { |
1986 | 133 | offset += 2; |
1987 | | /* Block id (64 bit) only if reported by gvcp flag */ |
1988 | 133 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id_64bit_v2_0, tvb, offset, 8, ENC_BIG_ENDIAN); |
1989 | 133 | offset += 8; |
1990 | 133 | } |
1991 | | |
1992 | | /* Timestamp (64 bit) associated with event */ |
1993 | 133 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_timestamp, tvb, offset, 8, ENC_BIG_ENDIAN); |
1994 | 133 | offset += 8; |
1995 | 133 | } |
1996 | 9 | } |
1997 | 9 | } |
1998 | | |
1999 | | |
2000 | | /* |
2001 | | \brief DISSECT: Event data command |
2002 | | */ |
2003 | | |
2004 | | static void dissect_eventdata_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int extendedblockids) |
2005 | 0 | { |
2006 | 0 | int32_t eventid; |
2007 | 0 | int offset; |
2008 | 0 | int data_length = 0; |
2009 | 0 | offset = startoffset; |
2010 | |
|
2011 | 0 | 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 | 0 | { |
2013 | | /* Get event ID */ |
2014 | 0 | eventid = tvb_get_ntohs(tvb, offset + 2); |
2015 | | |
2016 | | /* fill in Info column in Wireshark GUI */ |
2017 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "[ID: 0x%04X]", eventid); |
2018 | | |
2019 | | /* If extended ID, then we have event_size here (2.1) */ |
2020 | 0 | if (extendedblockids) |
2021 | 0 | { |
2022 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_extid_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
2023 | 0 | data_length = tvb_get_ntohs(tvb, offset); // We get the data length here |
2024 | 0 | } |
2025 | | |
2026 | | /* skip reserved field */ |
2027 | 0 | offset += 2; |
2028 | | |
2029 | | /* Use range to determine type of event */ |
2030 | 0 | if ((eventid >= 0x0000) && (eventid <= 0x8000)) |
2031 | 0 | { |
2032 | | /* Standard ID */ |
2033 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
2034 | 0 | } |
2035 | 0 | else if ((eventid >= 0x8001) && (eventid <= 0x8FFF)) |
2036 | 0 | { |
2037 | | /* Error */ |
2038 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_error_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
2039 | 0 | } |
2040 | 0 | else if ((eventid >= 0x9000) && (eventid <= 0xFFFF)) |
2041 | 0 | { |
2042 | | /* Device specific */ |
2043 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_device_specific_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
2044 | 0 | } |
2045 | 0 | offset += 2; |
2046 | | |
2047 | | /* Stream channel (possibly) associated with event */ |
2048 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_stream_channel_index, tvb, offset, 2, ENC_BIG_ENDIAN); |
2049 | 0 | offset += 2; |
2050 | |
|
2051 | 0 | if (extendedblockids == 0) |
2052 | 0 | { |
2053 | | /* Block id (16 bit) associated with event */ |
2054 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
2055 | 0 | offset += 2; |
2056 | 0 | } |
2057 | 0 | else |
2058 | 0 | { |
2059 | 0 | offset += 2; |
2060 | | /* Block id (64 bit) only if reported by gvcp flag */ |
2061 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id_64bit_v2_0, tvb, offset, 8, ENC_BIG_ENDIAN); |
2062 | 0 | offset += 8; |
2063 | 0 | } |
2064 | | |
2065 | | /* Timestamp (64 bit) associated with event */ |
2066 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_timestamp, tvb, offset, 8, ENC_BIG_ENDIAN); |
2067 | 0 | offset += 8; |
2068 | |
|
2069 | 0 | if (extendedblockids) |
2070 | 0 | { |
2071 | 0 | if (data_length > 24) |
2072 | 0 | { |
2073 | | /* Data */ |
2074 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_data, tvb, offset, data_length - 24, ENC_NA); |
2075 | 0 | offset += data_length - 24; |
2076 | 0 | } |
2077 | 0 | } |
2078 | 0 | else |
2079 | 0 | { |
2080 | | /* Data */ |
2081 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_data, tvb, offset, -1, ENC_NA); |
2082 | 0 | return; |
2083 | 0 | } |
2084 | 0 | } |
2085 | 0 | } |
2086 | | |
2087 | | |
2088 | | /* |
2089 | | \brief DISSECT: Action command |
2090 | | */ |
2091 | | |
2092 | | static void dissect_action_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int startoffset, int scheduledactioncommand) |
2093 | 0 | { |
2094 | 0 | if (gvcp_telegram_tree != NULL) |
2095 | 0 | { |
2096 | 0 | int offset; |
2097 | 0 | offset = startoffset; |
2098 | | |
2099 | | /* Device key */ |
2100 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_actioncmd_device_key, tvb, offset, 4, ENC_BIG_ENDIAN); |
2101 | | |
2102 | | /* Group key */ |
2103 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_actioncmd_group_key, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
2104 | | |
2105 | | /* Group mask */ |
2106 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_actioncmd_group_mask, tvb, offset + 8, 4, ENC_BIG_ENDIAN); |
2107 | |
|
2108 | 0 | if (scheduledactioncommand != 0) |
2109 | 0 | { |
2110 | | /* 64 bits timestamp (optional) if gvcp header flag is set */ |
2111 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_actioncmd_time_v2_0, tvb, offset + 12, 8, ENC_BIG_ENDIAN); |
2112 | 0 | } |
2113 | 0 | } |
2114 | 0 | } |
2115 | | |
2116 | | |
2117 | | /* |
2118 | | \brief DISSECT: Discovery acknowledge |
2119 | | */ |
2120 | | |
2121 | | static void dissect_discovery_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length) |
2122 | 0 | { |
2123 | 0 | proto_item *item = NULL; |
2124 | 0 | int offset; |
2125 | 0 | const uint8_t* string_manufacturer_name = NULL; |
2126 | 0 | const uint8_t* string_serial_number = NULL; |
2127 | 0 | unsigned string_length = 0; |
2128 | 0 | proto_tree *tree = NULL; |
2129 | |
|
2130 | 0 | offset = startoffset; |
2131 | 0 | string_manufacturer_name = tvb_get_stringz_enc(pinfo->pool, tvb, 80, &string_length, ENC_ASCII); |
2132 | 0 | string_serial_number = tvb_get_stringz_enc(pinfo->pool, tvb, 224, &string_length, ENC_ASCII); |
2133 | |
|
2134 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "(%s, %s)",string_manufacturer_name, string_serial_number); |
2135 | |
|
2136 | 0 | if (gvcp_telegram_tree != NULL) |
2137 | 0 | { |
2138 | 0 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, offset, length, |
2139 | 0 | ett_gvcp_payload_cmd, NULL, "DISCOVERY_ACK Payload"); |
2140 | | |
2141 | | /* Version */ |
2142 | 0 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_spec_version, tvb, offset, 4, ENC_BIG_ENDIAN); |
2143 | 0 | tree = proto_item_add_subtree(item, ett_gvcp_bootstrap_fields); |
2144 | 0 | dissect_register(GVCP_VERSION, tree, tvb, offset, 4 ); |
2145 | | |
2146 | | /* Device mode */ |
2147 | 0 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_devicemodediscovery, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
2148 | 0 | tree = proto_item_add_subtree(item, ett_gvcp_bootstrap_fields); |
2149 | 0 | dissect_register(GVCP_DEVICE_MODE, tree, tvb, offset + 4, 4 ); |
2150 | | |
2151 | | /* MAC address */ |
2152 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_device_mac_address, tvb, offset + 10, 6, ENC_NA); |
2153 | | |
2154 | | /* Supported IP configuration */ |
2155 | 0 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_supportedipconfig, tvb, offset + 16, 4, ENC_BIG_ENDIAN); |
2156 | 0 | tree = proto_item_add_subtree(item, ett_gvcp_bootstrap_fields); |
2157 | 0 | dissect_register(GVCP_SUPPORTED_IP_CONFIGURATION_0, tree, tvb, offset + 16, 4); |
2158 | | |
2159 | | /* Current IP configuration */ |
2160 | 0 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_currentipconfig, tvb, offset + 20, 4, ENC_BIG_ENDIAN); |
2161 | 0 | tree = proto_item_add_subtree(item, ett_gvcp_bootstrap_fields); |
2162 | 0 | dissect_register(GVCP_CURIPCFG_0, tree, tvb, offset + 20, 4); |
2163 | | |
2164 | | /* Current IP address */ |
2165 | 0 | dissect_register(GVCP_CURRENT_IP_ADDRESS_0, gvcp_telegram_tree, tvb, offset + 36, 4); |
2166 | | |
2167 | | /* Current subnet mask */ |
2168 | 0 | dissect_register(GVCP_CURRENT_SUBNET_MASK_0, gvcp_telegram_tree, tvb, offset + 52, 4); |
2169 | | |
2170 | | /* Current default gateway */ |
2171 | 0 | dissect_register(GVCP_CURRENT_DEFAULT_GATEWAY_0, gvcp_telegram_tree, tvb, offset + 68, 4); |
2172 | | |
2173 | | /* Manufacturer name */ |
2174 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_manufacturer_name, tvb, offset + 72, -1, ENC_ASCII); |
2175 | | |
2176 | | /* Model name */ |
2177 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_model_name, tvb, offset + 104, -1, ENC_ASCII); |
2178 | | |
2179 | | /* Device version */ |
2180 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_device_version, tvb, offset + 136, -1, ENC_ASCII); |
2181 | | |
2182 | | /* Manufacturer specific information */ |
2183 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_manufacturer_specific_info, tvb, offset + 168, -1, ENC_ASCII); |
2184 | | |
2185 | | /* Serial number */ |
2186 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_serial_number, tvb, offset + 216, -1, ENC_ASCII); |
2187 | | |
2188 | | /* User defined name */ |
2189 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_user_defined_name, tvb, offset + 232, -1, ENC_ASCII); |
2190 | 0 | } |
2191 | 0 | } |
2192 | | |
2193 | | /* |
2194 | | \brief DISSECT: Read register acknowledge |
2195 | | */ |
2196 | | |
2197 | | static void dissect_readreg_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t *gvcp_trans) |
2198 | 2 | { |
2199 | 2 | unsigned i; |
2200 | 2 | bool is_custom_register = false; |
2201 | 2 | const char* address_string = NULL; |
2202 | 2 | unsigned num_registers; |
2203 | 2 | int offset; |
2204 | 2 | bool valid_trans = false; |
2205 | 2 | unsigned addr_list_size = 0; |
2206 | | |
2207 | 2 | offset = startoffset; |
2208 | 2 | num_registers = length / 4; |
2209 | | |
2210 | 2 | if (gvcp_trans && gvcp_trans->addr_list) |
2211 | 0 | { |
2212 | 0 | valid_trans = true; |
2213 | 0 | addr_list_size = wmem_array_get_count(gvcp_trans->addr_list); |
2214 | 0 | } |
2215 | | |
2216 | 2 | if (num_registers > 1) |
2217 | 2 | { |
2218 | 2 | col_append_str(pinfo->cinfo, COL_INFO, "[Multiple ReadReg Ack]"); |
2219 | 2 | } |
2220 | 0 | else |
2221 | 0 | { |
2222 | 0 | if (valid_trans) |
2223 | 0 | { |
2224 | 0 | if (addr_list_size > 0) |
2225 | 0 | { |
2226 | 0 | address_string = get_register_name_from_address(*((uint32_t*)wmem_array_index(gvcp_trans->addr_list, 0)), pinfo->pool, gvcp_info, &is_custom_register); |
2227 | 0 | col_append_str(pinfo->cinfo, COL_INFO, address_string); |
2228 | 0 | } |
2229 | |
|
2230 | 0 | if (num_registers) |
2231 | 0 | { |
2232 | 0 | col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "Value=0x%08X", tvb_get_ntohl(tvb, offset)); |
2233 | 0 | } |
2234 | 0 | } |
2235 | 0 | } |
2236 | | |
2237 | 2 | if (gvcp_telegram_tree != NULL) |
2238 | 2 | { |
2239 | | /* Subtree initialization for Payload Data: READREG_ACK */ |
2240 | 2 | if (num_registers > 1) |
2241 | 2 | { |
2242 | 2 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, offset, length, |
2243 | 2 | ett_gvcp_payload_ack, NULL, "Register Value List"); |
2244 | 2 | } |
2245 | | |
2246 | 10 | for (i = 0; i < num_registers; i++) |
2247 | 8 | { |
2248 | 8 | uint32_t curr_register = 0; |
2249 | | |
2250 | 8 | if (valid_trans && i < addr_list_size) |
2251 | 0 | { |
2252 | 0 | int stream_channel_count = 0; |
2253 | 0 | curr_register = *((uint32_t*)wmem_array_index(gvcp_trans->addr_list, i)); |
2254 | 0 | address_string = get_register_name_from_address(curr_register, pinfo->pool, gvcp_info, &is_custom_register); |
2255 | 0 | for (; stream_channel_count < GVCP_MAX_STREAM_CHANNEL_COUNT; stream_channel_count++) |
2256 | 0 | { |
2257 | 0 | if (curr_register == (uint32_t)GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(stream_channel_count)) |
2258 | 0 | { |
2259 | 0 | gvcp_info->extended_bootstrap_address[stream_channel_count] = tvb_get_ntohl(tvb, offset); |
2260 | 0 | break; |
2261 | 0 | } |
2262 | 0 | } |
2263 | |
|
2264 | 0 | if (!is_custom_register) /* bootstrap register */ |
2265 | 0 | { |
2266 | 0 | uint32_t extended_bootstrap_address_offset = 0; |
2267 | 0 | if (is_extended_bootstrap_address(gvcp_info, curr_register, &extended_bootstrap_address_offset)) |
2268 | 0 | { |
2269 | 0 | 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); |
2270 | 0 | dissect_extended_bootstrap_register(curr_register - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, length); |
2271 | 0 | } |
2272 | 0 | else |
2273 | 0 | { |
2274 | 0 | proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_readregcmd_bootstrap_register, tvb, 0, 4, curr_register); |
2275 | 0 | dissect_register(curr_register, gvcp_telegram_tree, tvb, offset, length); |
2276 | 0 | } |
2277 | 0 | } |
2278 | 0 | else |
2279 | 0 | { |
2280 | 0 | 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); |
2281 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_read_register_value, tvb, offset, 4, ENC_BIG_ENDIAN); |
2282 | 0 | } |
2283 | 0 | } |
2284 | 8 | else |
2285 | 8 | { |
2286 | 8 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_custom_register_value, tvb, offset, 4, ENC_BIG_ENDIAN); |
2287 | 8 | } |
2288 | | |
2289 | 8 | offset += 4; |
2290 | 8 | } |
2291 | 2 | } |
2292 | 2 | } |
2293 | | |
2294 | | |
2295 | | /* |
2296 | | \brief DISSECT: Write register acknowledge |
2297 | | */ |
2298 | | |
2299 | | static void dissect_writereg_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, gvcp_transaction_t* gvcp_trans) |
2300 | 0 | { |
2301 | 0 | proto_item *item = NULL; |
2302 | 0 | uint16_t ack_index = 0; |
2303 | |
|
2304 | 0 | if (gvcp_telegram_tree != NULL) |
2305 | 0 | { |
2306 | 0 | item = proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writeregcmd_data_index, tvb, (startoffset + 2), 2, ENC_BIG_ENDIAN); |
2307 | 0 | } |
2308 | |
|
2309 | 0 | ack_index = tvb_get_ntohs(tvb, 10); |
2310 | |
|
2311 | 0 | if (gvcp_trans) |
2312 | 0 | { |
2313 | 0 | int num_registers = 0; |
2314 | |
|
2315 | 0 | num_registers = gvcp_trans->addr_count; |
2316 | 0 | if (num_registers > 1) |
2317 | 0 | { |
2318 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "[Multiple WriteReg Ack] (%d/%d) %s ", ack_index, num_registers, (ack_index == num_registers ? "(Success)" : "(Failed)")); |
2319 | 0 | } |
2320 | 0 | else |
2321 | 0 | { |
2322 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", (ack_index == num_registers ? "(Success)" : "(Failed)")); |
2323 | 0 | } |
2324 | |
|
2325 | 0 | if (gvcp_telegram_tree != NULL) |
2326 | 0 | { |
2327 | 0 | proto_item_append_text(item, " %s", (ack_index == num_registers ? "(Success)" : "(Failed)")); |
2328 | 0 | } |
2329 | 0 | } |
2330 | 0 | else |
2331 | 0 | { |
2332 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "[Cannot find requesting packet]"); |
2333 | 0 | } |
2334 | 0 | } |
2335 | | |
2336 | | |
2337 | | /* |
2338 | | \brief DISSECT: Read memory acknowledge |
2339 | | */ |
2340 | | |
2341 | | static void dissect_readmem_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, gvcp_conv_info_t *gvcp_info) |
2342 | 1 | { |
2343 | 1 | if (length > 0) |
2344 | 0 | { |
2345 | 0 | uint32_t addr = 0; |
2346 | 0 | const char *address_string = NULL; |
2347 | 0 | bool is_custom_register = false; |
2348 | |
|
2349 | 0 | addr = tvb_get_ntohl(tvb, startoffset); |
2350 | 0 | address_string = get_register_name_from_address(addr, pinfo->pool, gvcp_info, &is_custom_register); |
2351 | | |
2352 | | /* Fill in Wireshark GUI Info column */ |
2353 | 0 | col_append_str(pinfo->cinfo, COL_INFO, address_string); |
2354 | |
|
2355 | 0 | if (gvcp_telegram_tree != NULL) |
2356 | 0 | { |
2357 | 0 | int stream_channel_count = 0; |
2358 | 0 | unsigned offset; |
2359 | 0 | unsigned byte_count; |
2360 | 0 | offset = startoffset + 4; |
2361 | 0 | byte_count = (length - 4); |
2362 | |
|
2363 | 0 | for (stream_channel_count = 0; stream_channel_count < GVCP_MAX_STREAM_CHANNEL_COUNT; stream_channel_count++) |
2364 | 0 | { |
2365 | 0 | if (startoffset == GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(stream_channel_count)) |
2366 | 0 | { |
2367 | 0 | gvcp_info->extended_bootstrap_address[stream_channel_count] = tvb_get_ntohl(tvb, offset); |
2368 | 0 | break; |
2369 | 0 | } |
2370 | 0 | } |
2371 | | |
2372 | | /* Bootstrap register known address */ |
2373 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readmemcmd_address, tvb, startoffset, 4, ENC_BIG_ENDIAN); |
2374 | |
|
2375 | 0 | if (try_val_to_str(addr, bootstrapregisternames) != NULL) |
2376 | 0 | { |
2377 | 0 | dissect_register_data(addr, gvcp_telegram_tree, tvb, offset, byte_count); |
2378 | 0 | } |
2379 | 0 | else |
2380 | 0 | { |
2381 | 0 | uint32_t extended_bootstrap_address_offset = 0; |
2382 | 0 | if (is_extended_bootstrap_address(gvcp_info, addr, &extended_bootstrap_address_offset)) |
2383 | 0 | { |
2384 | 0 | dissect_extended_bootstrap_register(addr - extended_bootstrap_address_offset, gvcp_telegram_tree, tvb, offset, byte_count); |
2385 | 0 | } |
2386 | 0 | else |
2387 | 0 | { |
2388 | | /* Generic, unknown value */ |
2389 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_readmemcmd_data_read, tvb, offset, byte_count, ENC_NA); |
2390 | 0 | } |
2391 | 0 | } |
2392 | 0 | } |
2393 | 0 | } |
2394 | 1 | } |
2395 | | |
2396 | | |
2397 | | /* |
2398 | | \brief DISSECT: Write memory acknowledge |
2399 | | */ |
2400 | | |
2401 | | static void dissect_writemem_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, gvcp_conv_info_t *gvcp_info, gvcp_transaction_t* gvcp_trans) |
2402 | 1 | { |
2403 | 1 | if (gvcp_trans && gvcp_trans->addr_list) |
2404 | 0 | { |
2405 | 0 | if (wmem_array_get_count(gvcp_trans->addr_list) > 0) |
2406 | 0 | { |
2407 | 0 | const char *address_string = NULL; |
2408 | 0 | address_string = get_register_name_from_address((*((uint32_t*)wmem_array_index(gvcp_trans->addr_list, 0))), pinfo->pool, gvcp_info, NULL); |
2409 | 0 | col_append_str(pinfo->cinfo, COL_INFO, address_string); |
2410 | 0 | } |
2411 | 0 | } |
2412 | | |
2413 | 1 | if (gvcp_telegram_tree != NULL) |
2414 | 1 | { |
2415 | 1 | if (gvcp_trans && gvcp_trans->req_frame) |
2416 | 0 | { |
2417 | 0 | proto_item *item = proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_response_to, tvb, 0, 0, gvcp_trans->req_frame); |
2418 | 0 | proto_item_set_generated(item); |
2419 | 0 | } |
2420 | | |
2421 | 1 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length, |
2422 | 1 | ett_gvcp_payload_cmd, NULL, "Payload Data: WRITEMEM_ACK"); |
2423 | 1 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_writememcmd_data_index, tvb, (startoffset +2), 2, ENC_BIG_ENDIAN); |
2424 | 1 | } |
2425 | 1 | } |
2426 | | |
2427 | | |
2428 | | /* |
2429 | | \brief DISSECT: Pending acknowledge |
2430 | | */ |
2431 | | |
2432 | | static void dissect_pending_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int startoffset, int length) |
2433 | 0 | { |
2434 | 0 | if (gvcp_telegram_tree != NULL) |
2435 | 0 | { |
2436 | 0 | gvcp_telegram_tree = proto_tree_add_subtree(gvcp_telegram_tree, tvb, startoffset, length, |
2437 | 0 | ett_gvcp_payload_cmd, NULL, "Payload Data: PENDING_ACK"); |
2438 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_time_to_completion, tvb, (startoffset + 2), 2, ENC_BIG_ENDIAN); |
2439 | 0 | } |
2440 | 0 | } |
2441 | | |
2442 | | |
2443 | | /* |
2444 | | \brief Point of entry of all GVCP packet dissection |
2445 | | */ |
2446 | | |
2447 | | static int dissect_gvcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) |
2448 | 27 | { |
2449 | 27 | int offset = 0; |
2450 | 27 | proto_tree *gvcp_tree = NULL; |
2451 | 27 | proto_tree *gvcp_tree_flag = NULL; |
2452 | 27 | proto_tree *gvcp_telegram_tree = NULL; |
2453 | 27 | int data_length = 0; |
2454 | 27 | int command = -1; |
2455 | 27 | const char* command_string = NULL; |
2456 | 27 | int flags = -1; |
2457 | 27 | int extendedblockids = -1; |
2458 | 27 | int scheduledactioncommand = -1; |
2459 | 27 | int ack_code = -1; |
2460 | 27 | const char* ack_string = NULL; |
2461 | 27 | uint32_t request_id = 0; |
2462 | 27 | char key_code = 0; |
2463 | 27 | proto_item *ti = NULL; |
2464 | 27 | proto_item *item = NULL; |
2465 | 27 | conversation_t *conversation = 0; |
2466 | 27 | gvcp_conv_info_t *gvcp_info = 0; |
2467 | 27 | gvcp_transaction_t *gvcp_trans = 0; |
2468 | | |
2469 | 27 | if (tvb_captured_length(tvb) < GVCP_MIN_PACKET_SIZE) |
2470 | 1 | { |
2471 | 1 | return 0; |
2472 | 1 | } |
2473 | | |
2474 | | /* check for valid key/ack code */ |
2475 | 26 | key_code = (char) tvb_get_uint8(tvb, offset); |
2476 | 26 | ack_code = tvb_get_ntohs(tvb, offset+2); |
2477 | 26 | ack_string = try_val_to_str(ack_code, acknowledgenames); |
2478 | | |
2479 | 26 | if ((key_code != 0x42) && !ack_string) |
2480 | 4 | { |
2481 | 4 | return 0; |
2482 | 4 | } |
2483 | | |
2484 | | /* Set the protocol column */ |
2485 | 22 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "GVCP"); |
2486 | | |
2487 | | /* Clear out stuff in the info column */ |
2488 | 22 | col_clear(pinfo->cinfo, COL_INFO); |
2489 | | |
2490 | | /* Adds "Gigabit-Ethernet Control Protocol" heading to protocol tree */ |
2491 | | /* We will add fields to this using the gvcp_tree pointer */ |
2492 | 22 | ti = proto_tree_add_item(tree, proto_gvcp, tvb, offset, -1, ENC_NA); |
2493 | 22 | gvcp_tree = proto_item_add_subtree(ti, ett_gvcp); |
2494 | | |
2495 | | /* Is this a command message? */ |
2496 | 22 | if (key_code == 0x42) |
2497 | 18 | { |
2498 | 18 | command = tvb_get_ntohs(tvb, offset+2); |
2499 | 18 | command_string = val_to_str(pinfo->pool, command, commandnames,"Unknown Command (0x%x)"); |
2500 | | |
2501 | | /* Add the Command name string to the Info column */ |
2502 | 18 | col_append_fstr(pinfo->cinfo, COL_INFO, "> %s ", command_string); |
2503 | | |
2504 | 18 | gvcp_tree = proto_tree_add_subtree_format(gvcp_tree, tvb, offset, 8, |
2505 | 18 | ett_gvcp_cmd, NULL, "Command Header: %s", command_string); |
2506 | | |
2507 | | /* Add the message key code: */ |
2508 | 18 | proto_tree_add_item(gvcp_tree, hf_gvcp_message_key_code, tvb, offset, 1, ENC_BIG_ENDIAN); |
2509 | 18 | offset++; |
2510 | | |
2511 | | /* Add the flags */ |
2512 | 18 | flags = (char) tvb_get_uint8(tvb, offset); |
2513 | 18 | item = proto_tree_add_item(gvcp_tree, hf_gvcp_flag, tvb, offset, 1, ENC_BIG_ENDIAN); |
2514 | 18 | gvcp_tree_flag = proto_item_add_subtree(item, ett_gvcp_flags); |
2515 | 18 | if (command == GVCP_ACTION_CMD) |
2516 | 0 | { |
2517 | 0 | proto_tree_add_item(gvcp_tree_flag, hf_gvcp_scheduledactioncommand_flag_v2_0, tvb, offset, 1, ENC_BIG_ENDIAN); |
2518 | 0 | scheduledactioncommand = (flags & 0x80); |
2519 | 0 | } |
2520 | 18 | if ((command == GVCP_EVENTDATA_CMD) || |
2521 | 18 | (command == GVCP_EVENT_CMD) || |
2522 | 9 | (command == GVCP_PACKETRESEND_CMD)) |
2523 | 9 | { |
2524 | 9 | proto_tree_add_item(gvcp_tree_flag, hf_gvcp_64bitid_flag_v2_0, tvb, offset, 1, ENC_BIG_ENDIAN); |
2525 | 9 | flags = (char) tvb_get_uint8(tvb, offset ); |
2526 | 9 | extendedblockids = (flags & 0x10); |
2527 | 9 | } |
2528 | 18 | if ((command == GVCP_DISCOVERY_CMD) || |
2529 | 18 | (command == GVCP_FORCEIP_CMD)) |
2530 | 0 | { |
2531 | 0 | proto_tree_add_item(gvcp_tree_flag, hf_gvcp_allow_broadcast_acknowledge_flag, tvb, offset, 1, ENC_BIG_ENDIAN); |
2532 | 0 | } |
2533 | 18 | proto_tree_add_item(gvcp_tree_flag, hf_gvcp_acknowledge_required_flag, tvb, offset, 1, ENC_BIG_ENDIAN); |
2534 | | |
2535 | 18 | offset++; |
2536 | | |
2537 | | /* Add the command */ |
2538 | 18 | proto_tree_add_item(gvcp_tree, hf_gvcp_command, tvb, offset, 2, ENC_BIG_ENDIAN); |
2539 | 18 | offset += 2; |
2540 | 18 | } |
2541 | 4 | else /* ... or else it is an acknowledge */ |
2542 | 4 | { |
2543 | 4 | int status = tvb_get_ntohs(tvb, offset); |
2544 | 4 | col_append_fstr(pinfo->cinfo, COL_INFO, "< %s %s", |
2545 | 4 | ack_string, val_to_str(pinfo->pool, status, statusnames_short, "Unknown status (0x%04X)")); |
2546 | | |
2547 | 4 | gvcp_tree = proto_tree_add_subtree_format(gvcp_tree, tvb, offset+2, tvb_captured_length(tvb)-2, |
2548 | 4 | ett_gvcp_ack, NULL, "Acknowledge Header: %s", ack_string); |
2549 | | |
2550 | | /* Add the status: */ |
2551 | 4 | proto_tree_add_item(gvcp_tree, hf_gvcp_status, tvb, offset, 2, ENC_BIG_ENDIAN); |
2552 | 4 | offset += 2; |
2553 | | |
2554 | | /* Add the acknowledge */ |
2555 | 4 | proto_tree_add_item(gvcp_tree, hf_gvcp_acknowledge, tvb, offset, 2, ENC_BIG_ENDIAN); |
2556 | | |
2557 | 4 | offset += 2; |
2558 | 4 | } |
2559 | | |
2560 | | /* Parse the second part of both the command and the acknowledge header: |
2561 | | 0 15 16 31 |
2562 | | -------- -------- -------- -------- |
2563 | | | status | acknowledge | |
2564 | | -------- -------- -------- -------- |
2565 | | | length | req_id | |
2566 | | -------- -------- -------- -------- |
2567 | | |
2568 | | Add the data length |
2569 | | Number of valid data bytes in this message, not including this header. This |
2570 | | represents the number of bytes of payload appended after this header */ |
2571 | 22 | proto_tree_add_item(gvcp_tree, hf_gvcp_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
2572 | 22 | data_length = tvb_get_ntohs(tvb, offset); |
2573 | 22 | offset += 2; |
2574 | | |
2575 | | /* Add the request ID */ |
2576 | 22 | proto_tree_add_item_ret_uint(gvcp_tree, hf_gvcp_request_id, tvb, offset, 2, ENC_BIG_ENDIAN, &request_id); |
2577 | 22 | offset += 2; |
2578 | | |
2579 | 22 | conversation = find_or_create_conversation(pinfo); |
2580 | | |
2581 | 22 | gvcp_info = (gvcp_conv_info_t*)conversation_get_proto_data(conversation, proto_gvcp); |
2582 | 22 | if (!gvcp_info) |
2583 | 9 | { |
2584 | 9 | int stream_channel_count = 0; |
2585 | 9 | gvcp_info = wmem_new(wmem_file_scope(), gvcp_conv_info_t); |
2586 | 9 | gvcp_info->pdus = wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal); |
2587 | 4.61k | for (; stream_channel_count < GVCP_MAX_STREAM_CHANNEL_COUNT; stream_channel_count++) |
2588 | 4.60k | { |
2589 | 4.60k | gvcp_info->extended_bootstrap_address[stream_channel_count] = 0; |
2590 | 4.60k | } |
2591 | 9 | conversation_add_proto_data(conversation, proto_gvcp, gvcp_info); |
2592 | 9 | } |
2593 | | |
2594 | 22 | if (!pinfo->fd->visited) |
2595 | 22 | { |
2596 | 22 | if (key_code == 0x42) |
2597 | 18 | { |
2598 | | /* This is a request */ |
2599 | 18 | gvcp_trans = wmem_new(pinfo->pool, gvcp_transaction_t); |
2600 | 18 | gvcp_trans->req_frame = pinfo->num; |
2601 | 18 | gvcp_trans->rep_frame = 0; |
2602 | 18 | gvcp_trans->addr_list = 0; |
2603 | 18 | gvcp_trans->addr_count = 0; |
2604 | 18 | } |
2605 | 4 | else |
2606 | 4 | { |
2607 | 4 | if (ack_string && ( ack_code != GVCP_PENDING_ACK ) ) |
2608 | 4 | { |
2609 | | /* this is a response, so update trans info with ack's frame number */ |
2610 | | /* get list of transactions for given request id */ |
2611 | 4 | gvcp_trans_array = (wmem_array_t*)wmem_map_lookup(gvcp_info->pdus, GUINT_TO_POINTER(request_id)); |
2612 | 4 | if (gvcp_trans_array) |
2613 | 0 | { |
2614 | 0 | int i; |
2615 | 0 | unsigned array_size = wmem_array_get_count(gvcp_trans_array); |
2616 | 0 | for (i = array_size-1; i >= 0; i--) |
2617 | 0 | { |
2618 | 0 | gvcp_trans = (gvcp_transaction_t*)wmem_array_index(gvcp_trans_array, i); |
2619 | |
|
2620 | 0 | if (gvcp_trans && (gvcp_trans->req_frame < pinfo->num)) |
2621 | 0 | { |
2622 | 0 | if (gvcp_trans->rep_frame != 0) |
2623 | 0 | { |
2624 | 0 | gvcp_trans = 0; |
2625 | 0 | } |
2626 | 0 | else |
2627 | 0 | { |
2628 | 0 | gvcp_trans->rep_frame = pinfo->num; |
2629 | 0 | } |
2630 | |
|
2631 | 0 | break; |
2632 | 0 | } |
2633 | 0 | gvcp_trans = 0; |
2634 | 0 | } |
2635 | 0 | } |
2636 | 4 | } |
2637 | 4 | } |
2638 | 22 | } |
2639 | 0 | else |
2640 | 0 | { |
2641 | 0 | gvcp_trans = 0; |
2642 | 0 | gvcp_trans_array = (wmem_array_t*)wmem_map_lookup(gvcp_info->pdus, GUINT_TO_POINTER(request_id)); |
2643 | |
|
2644 | 0 | if (gvcp_trans_array) |
2645 | 0 | { |
2646 | 0 | unsigned i; |
2647 | 0 | unsigned array_size = wmem_array_get_count(gvcp_trans_array); |
2648 | |
|
2649 | 0 | for (i = 0; i < array_size; ++i) |
2650 | 0 | { |
2651 | 0 | gvcp_trans = (gvcp_transaction_t*)wmem_array_index(gvcp_trans_array, i); |
2652 | 0 | if (gvcp_trans && (pinfo->num == gvcp_trans->req_frame || pinfo->num == gvcp_trans->rep_frame)) |
2653 | 0 | { |
2654 | 0 | break; |
2655 | 0 | } |
2656 | | |
2657 | 0 | gvcp_trans = 0; |
2658 | 0 | } |
2659 | 0 | } |
2660 | 0 | } |
2661 | | |
2662 | 22 | if (!gvcp_trans) |
2663 | 4 | { |
2664 | 4 | gvcp_trans = wmem_new0(pinfo->pool, gvcp_transaction_t); |
2665 | 4 | } |
2666 | | |
2667 | | /* Add telegram subtree */ |
2668 | 22 | gvcp_telegram_tree = proto_item_add_subtree(gvcp_tree, ett_gvcp); |
2669 | | |
2670 | | /* Is this a command? */ |
2671 | 22 | if (key_code == 0x42) |
2672 | 18 | { |
2673 | 18 | if (gvcp_telegram_tree != NULL) |
2674 | 18 | { |
2675 | 18 | if (gvcp_trans->rep_frame) |
2676 | 0 | { |
2677 | 0 | item = proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_response_in, tvb, 0, 0, gvcp_trans->rep_frame); |
2678 | 0 | proto_item_set_generated(item); |
2679 | 0 | } |
2680 | 18 | } |
2681 | | |
2682 | 18 | switch (command) |
2683 | 18 | { |
2684 | 0 | case GVCP_FORCEIP_CMD: |
2685 | 0 | dissect_forceip_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length); |
2686 | 0 | break; |
2687 | | |
2688 | 0 | case GVCP_PACKETRESEND_CMD: |
2689 | 0 | dissect_packetresend_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, extendedblockids); |
2690 | 0 | break; |
2691 | | |
2692 | 2 | case GVCP_READREG_CMD: |
2693 | 2 | dissect_readreg_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans); |
2694 | 2 | break; |
2695 | | |
2696 | 5 | case GVCP_WRITEREG_CMD: |
2697 | 5 | dissect_writereg_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans); |
2698 | 5 | break; |
2699 | | |
2700 | 0 | case GVCP_READMEM_CMD: |
2701 | 0 | dissect_readmem_cmd(gvcp_telegram_tree, tvb, pinfo, offset, gvcp_info); |
2702 | 0 | break; |
2703 | | |
2704 | 0 | case GVCP_WRITEMEM_CMD: |
2705 | 0 | dissect_writemem_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans); |
2706 | 0 | break; |
2707 | | |
2708 | 9 | case GVCP_EVENT_CMD: |
2709 | 9 | dissect_event_cmd(gvcp_telegram_tree, tvb, pinfo, offset, data_length, extendedblockids); |
2710 | 9 | break; |
2711 | | |
2712 | 0 | case GVCP_EVENTDATA_CMD: |
2713 | 0 | dissect_eventdata_cmd(gvcp_telegram_tree, tvb, pinfo, offset, extendedblockids); |
2714 | 0 | break; |
2715 | | |
2716 | 0 | case GVCP_ACTION_CMD: |
2717 | 0 | dissect_action_cmd(gvcp_telegram_tree, tvb, pinfo, offset, scheduledactioncommand); |
2718 | 0 | break; |
2719 | | |
2720 | 0 | case GVCP_DISCOVERY_CMD: |
2721 | 2 | default: |
2722 | 2 | break; |
2723 | 18 | } |
2724 | | |
2725 | 2 | if (!pinfo->fd->visited) |
2726 | 2 | { |
2727 | 2 | if (key_code == 0x42) |
2728 | 2 | { |
2729 | 2 | gvcp_trans_array = (wmem_array_t*)wmem_map_lookup(gvcp_info->pdus, GUINT_TO_POINTER(request_id)); |
2730 | | |
2731 | 2 | if(gvcp_trans_array) |
2732 | 0 | { |
2733 | 0 | wmem_array_append(gvcp_trans_array, gvcp_trans, 1); |
2734 | 0 | } |
2735 | 2 | else |
2736 | 2 | { |
2737 | 2 | gvcp_trans_array = wmem_array_new(wmem_file_scope(), sizeof(gvcp_transaction_t)); |
2738 | 2 | wmem_array_append(gvcp_trans_array, gvcp_trans, 1); |
2739 | 2 | wmem_map_insert(gvcp_info->pdus, GUINT_TO_POINTER(request_id), (void *)gvcp_trans_array); |
2740 | 2 | } |
2741 | 2 | } |
2742 | 2 | } |
2743 | 2 | } |
2744 | 4 | else |
2745 | 4 | { |
2746 | 4 | if (gvcp_telegram_tree != NULL) |
2747 | 4 | { |
2748 | 4 | if (gvcp_trans->req_frame) |
2749 | 0 | { |
2750 | 0 | item = proto_tree_add_uint(gvcp_telegram_tree, hf_gvcp_response_to, tvb, 0, 0, gvcp_trans->req_frame); |
2751 | 0 | proto_item_set_generated(item); |
2752 | 0 | } |
2753 | 4 | } |
2754 | | |
2755 | 4 | switch (ack_code) |
2756 | 4 | { |
2757 | 0 | case GVCP_DISCOVERY_ACK: |
2758 | 0 | dissect_discovery_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length); |
2759 | 0 | break; |
2760 | | |
2761 | 2 | case GVCP_READREG_ACK: |
2762 | 2 | dissect_readreg_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans); |
2763 | 2 | break; |
2764 | | |
2765 | 0 | case GVCP_WRITEREG_ACK: |
2766 | 0 | dissect_writereg_ack(gvcp_telegram_tree, tvb, pinfo, offset, gvcp_trans); |
2767 | 0 | break; |
2768 | | |
2769 | 1 | case GVCP_READMEM_ACK: |
2770 | 1 | dissect_readmem_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info); |
2771 | 1 | break; |
2772 | | |
2773 | 1 | case GVCP_WRITEMEM_ACK: |
2774 | 1 | dissect_writemem_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length, gvcp_info, gvcp_trans); |
2775 | 1 | break; |
2776 | | |
2777 | 0 | case GVCP_PENDING_ACK: |
2778 | 0 | dissect_pending_ack(gvcp_telegram_tree, tvb, pinfo, offset, data_length); |
2779 | 0 | break; |
2780 | | |
2781 | 0 | case GVCP_FORCEIP_ACK: |
2782 | 0 | break; |
2783 | 0 | case GVCP_PACKETRESEND_ACK: |
2784 | 0 | case GVCP_EVENT_ACK: |
2785 | 0 | case GVCP_EVENTDATA_ACK: |
2786 | 0 | case GVCP_ACTION_ACK: |
2787 | 0 | default: |
2788 | 0 | proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_payloaddata, tvb, offset, data_length, ENC_NA); |
2789 | 0 | break; |
2790 | 4 | } |
2791 | 4 | } |
2792 | 4 | return tvb_captured_length(tvb); |
2793 | 22 | } |
2794 | | |
2795 | | void proto_register_gvcp(void) |
2796 | 15 | { |
2797 | | /* |
2798 | | \brief Structures for register dissection |
2799 | | */ |
2800 | | |
2801 | 15 | static hf_register_info hf[] = |
2802 | 15 | { |
2803 | | /* Common GVCP data */ |
2804 | | |
2805 | 15 | { &hf_gvcp_message_key_code, |
2806 | 15 | { "Message Key Code", "gvcp.message_key_code", |
2807 | 15 | FT_UINT8, BASE_HEX_DEC, NULL, 0x0, |
2808 | 15 | NULL, HFILL }}, |
2809 | | |
2810 | 15 | { &hf_gvcp_flag, |
2811 | 15 | { "Flags", "gvcp.cmd.flags", |
2812 | 15 | FT_UINT8, BASE_HEX, NULL, 0x0, |
2813 | 15 | NULL, HFILL }}, |
2814 | | |
2815 | 15 | { &hf_gvcp_acknowledge_required_flag, |
2816 | 15 | { "Acknowledge Required", "gvcp.cmd.flag.acq_required", |
2817 | 15 | FT_BOOLEAN, 8, NULL, 0x01, |
2818 | 15 | NULL, HFILL }}, |
2819 | | |
2820 | 15 | { &hf_gvcp_scheduledactioncommand_flag_v2_0, |
2821 | 15 | { "Scheduled Action Command", "gvcp.cmd.flag.scheduledactioncommand", |
2822 | 15 | FT_BOOLEAN, 8, NULL, 0x80, |
2823 | 15 | NULL, HFILL }}, |
2824 | | |
2825 | 15 | { &hf_gvcp_64bitid_flag_v2_0, |
2826 | 15 | { "64 bit ID", "gvcp.cmd.flag.64bitid", |
2827 | 15 | FT_BOOLEAN, 8, NULL, 0x10, |
2828 | 15 | NULL, HFILL }}, |
2829 | | |
2830 | 15 | { &hf_gvcp_allow_broadcast_acknowledge_flag, |
2831 | 15 | { "Allow Broadcast Acknowledge", "gvcp.cmd.flag.allowbroadcastacq", |
2832 | 15 | FT_BOOLEAN, 8, NULL, 0x10, |
2833 | 15 | NULL, HFILL }}, |
2834 | | |
2835 | 15 | { &hf_gvcp_command, |
2836 | 15 | { "Command", "gvcp.cmd.command", |
2837 | 15 | FT_UINT16, BASE_HEX, VALS(commandnames), 0x0, |
2838 | 15 | NULL, HFILL }}, |
2839 | | |
2840 | 15 | { &hf_gvcp_length, |
2841 | 15 | { "Payload Length", "gvcp.cmd.payloadlength", |
2842 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
2843 | 15 | NULL, HFILL }}, |
2844 | | |
2845 | 15 | { &hf_gvcp_request_id, |
2846 | 15 | { "Request ID", "gvcp.cmd.req_id", |
2847 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
2848 | 15 | NULL, HFILL }}, |
2849 | | |
2850 | 15 | { &hf_gvcp_payloaddata, |
2851 | 15 | { "Payload Data", "gvcp.cmd.payloaddata", |
2852 | 15 | FT_BYTES, BASE_NONE, NULL, 0x0, |
2853 | 15 | NULL, HFILL }}, |
2854 | | |
2855 | 15 | { &hf_gvcp_status, |
2856 | 15 | { "Status", "gvcp.cmd.status", |
2857 | 15 | FT_UINT16, BASE_HEX, VALS(statusnames), 0x0, |
2858 | 15 | NULL, HFILL }}, |
2859 | | |
2860 | 15 | { &hf_gvcp_acknowledge, |
2861 | 15 | { "Acknowledge", "gvcp.ack", |
2862 | 15 | FT_UINT16, BASE_HEX, VALS(acknowledgenames), 0x0, |
2863 | 15 | NULL, HFILL }}, |
2864 | | |
2865 | 15 | { &hf_gvcp_devicemodediscovery, |
2866 | 15 | { "Device Mode", "gvcp.ack.discovery.devicemode", |
2867 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
2868 | 15 | NULL, HFILL }}, |
2869 | | |
2870 | | /* Force IP */ |
2871 | | |
2872 | 15 | { &hf_gvcp_forceip_mac_address, |
2873 | 15 | { "MAC Address", "gvcp.cmd.forceip.macaddress", |
2874 | 15 | FT_ETHER, BASE_NONE, NULL, 0x0, |
2875 | 15 | NULL, HFILL }}, |
2876 | | |
2877 | 15 | { &hf_gvcp_forceip_static_IP, |
2878 | 15 | { "IP address", "gvcp.cmd.forceip.ip", |
2879 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
2880 | 15 | NULL, HFILL }}, |
2881 | | |
2882 | 15 | { &hf_gvcp_forceip_static_subnet_mask, |
2883 | 15 | { "Subnet Mask", "gvcp.cmd.forceip.subnetmask", |
2884 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
2885 | 15 | NULL, HFILL }}, |
2886 | | |
2887 | 15 | { &hf_gvcp_forceip_static_default_gateway, |
2888 | 15 | { "Default Gateway", "gvcp.cmd.forceip.defaultgateway", |
2889 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
2890 | 15 | NULL, HFILL }}, |
2891 | | |
2892 | | /* Discovery specific */ |
2893 | | |
2894 | 15 | { &hf_gvcp_device_mac_address, |
2895 | 15 | { "Device MAC Address", "gvcp.cmd.discovery.devicemacaddress", |
2896 | 15 | FT_ETHER, BASE_NONE, NULL, 0x0, |
2897 | 15 | NULL, HFILL }}, |
2898 | | |
2899 | | /* Read register */ |
2900 | 15 | { &hf_gvcp_readregcmd_bootstrap_register, |
2901 | 15 | { "Bootstrap Register", "gvcp.cmd.readreg.bootstrapregister", |
2902 | 15 | FT_UINT32, BASE_HEX_DEC, VALS(bootstrapregisternames), 0x0, |
2903 | 15 | NULL, HFILL }}, |
2904 | | |
2905 | 15 | { &hf_gvcp_readregcmd_extended_bootstrap_register, |
2906 | 15 | { "Extended Bootstrap Register", "gvcp.cmd.readreg.extendedbootstrapregister", |
2907 | 15 | FT_UINT32, BASE_HEX_DEC, VALS(extendedbootstrapregisternames), 0x0, |
2908 | 15 | NULL, HFILL } }, |
2909 | | |
2910 | | /* Write register */ |
2911 | | |
2912 | 15 | { &hf_gvcp_writeregcmd_data, |
2913 | 15 | { "DataX", "gvcp.cmd.writereg.data", |
2914 | 15 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
2915 | 15 | NULL, HFILL }}, |
2916 | | |
2917 | 15 | { &hf_gvcp_writeregcmd_bootstrap_register, |
2918 | 15 | { "Bootstrap Register", "gvcp.cmd.writereg.bootstrapregister", |
2919 | 15 | FT_UINT32, BASE_HEX_DEC, VALS(bootstrapregisternames), 0x0, |
2920 | 15 | NULL, HFILL }}, |
2921 | | |
2922 | 15 | { &hf_gvcp_writeregcmd_extended_bootstrap_register, |
2923 | 15 | { "Extended Bootstrap Register", "gvcp.cmd.writereg.extendedbootstrapregister", |
2924 | 15 | FT_UINT32, BASE_HEX_DEC, VALS(extendedbootstrapregisternames), 0x0, |
2925 | 15 | NULL, HFILL } }, |
2926 | | |
2927 | 15 | { &hf_gvcp_writeregcmd_data_index, |
2928 | 15 | { "Data Index", "gvcp.cmd.writereg.dataindex", |
2929 | 15 | FT_UINT16, BASE_HEX, NULL, 0x0, |
2930 | 15 | NULL, HFILL }}, |
2931 | | |
2932 | | /* Read memory */ |
2933 | | |
2934 | 15 | { &hf_gvcp_readmemcmd_address, |
2935 | 15 | { "Register Address", "gvcp.cmd.readmem.address", |
2936 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
2937 | 15 | NULL, HFILL }}, |
2938 | | |
2939 | 15 | { &hf_gvcp_readmemcmd_bootstrap_register, |
2940 | 15 | { "Memory Bootstrap Register", "gvcp.cmd.readmem.bootstrapregister", |
2941 | 15 | FT_UINT32, BASE_HEX_DEC, VALS(bootstrapregisternames), 0x0, |
2942 | 15 | NULL, HFILL }}, |
2943 | | |
2944 | 15 | { &hf_gvcp_readmemcmd_count, |
2945 | 15 | { "Count", "gvcp.cmd.readmem.count", |
2946 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
2947 | 15 | NULL, HFILL }}, |
2948 | | |
2949 | | /* Write memory */ |
2950 | | |
2951 | 15 | { &hf_gvcp_writememcmd_data, |
2952 | 15 | { "DataY", "gvcp.cmd.writemem.data", |
2953 | 15 | FT_BYTES, BASE_NONE, NULL, 0x0, |
2954 | 15 | NULL, HFILL }}, |
2955 | | |
2956 | 15 | { &hf_gvcp_writememcmd_data_index, |
2957 | 15 | { "Data Index", "gvcp.cmd.writemem.dataindex", |
2958 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
2959 | 15 | NULL, HFILL }}, |
2960 | | |
2961 | | /* Resend request */ |
2962 | | |
2963 | 15 | { &hf_gvcp_resendcmd_stream_channel_index, |
2964 | 15 | { "Resend Stream Channel Index", "gvcp.cmd.resend.streamchannelindex", |
2965 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
2966 | 15 | NULL, HFILL }}, |
2967 | | |
2968 | 15 | { &hf_gvcp_resendcmd_block_id, |
2969 | 15 | { "Resend Block ID 16 bits", "gvcp.cmd.resend.blockid", |
2970 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
2971 | 15 | NULL, HFILL }}, |
2972 | | |
2973 | 15 | { &hf_gvcp_resendcmd_first_packet_id, |
2974 | 15 | { "Resend First Packet ID 24 bits", "gvcp.cmd.resend.firstpacketid", |
2975 | 15 | FT_UINT24, BASE_HEX_DEC, NULL, 0x0, |
2976 | 15 | NULL, HFILL }}, |
2977 | | |
2978 | 15 | { &hf_gvcp_resendcmd_last_packet_id, |
2979 | 15 | { "Resend Last Packet ID 24 bits", "gvcp.cmd.resend.lastpacketid", |
2980 | 15 | FT_UINT24, BASE_HEX_DEC, NULL, 0x0, |
2981 | 15 | NULL, HFILL }}, |
2982 | | |
2983 | 15 | { &hf_gvcp_resendcmd_extended_block_id_v2_0, |
2984 | 15 | { "Resend Block ID 64 bits", "gvcp.cmd.resend.extendedblockid", |
2985 | 15 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
2986 | 15 | NULL, HFILL }}, |
2987 | | |
2988 | 15 | { &hf_gvcp_resendcmd_extended_first_packet_id_v2_0, |
2989 | 15 | { "Resend First Packet ID 32 bits", "gvcp.cmd.resend.firstpacketid", |
2990 | 15 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
2991 | 15 | NULL, HFILL }}, |
2992 | | |
2993 | 15 | { &hf_gvcp_resendcmd_extended_last_packet_id_v2_0, |
2994 | 15 | { "Resend Last Packet ID 32 bits", "gvcp.cmd.resend.lastpacketid", |
2995 | 15 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
2996 | 15 | NULL, HFILL }}, |
2997 | | |
2998 | | /* Event */ |
2999 | | |
3000 | 15 | { &hf_gvcp_eventcmd_id, |
3001 | 15 | { "ID", "gvcp.cmd.event.id", |
3002 | 15 | FT_UINT16, BASE_HEX_DEC, VALS(eventidnames), 0x0, |
3003 | 15 | NULL, HFILL }}, |
3004 | | |
3005 | 15 | { &hf_gvcp_eventcmd_error_id, |
3006 | 15 | { "Error ID", "gvcp.cmd.event.errorid", |
3007 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
3008 | 15 | NULL, HFILL }}, |
3009 | | |
3010 | 15 | { &hf_gvcp_eventcmd_extid_length, |
3011 | 15 | { "Event Size", "gvcp.cmd.event.eventsize", |
3012 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
3013 | 15 | NULL, HFILL }}, |
3014 | | |
3015 | 15 | { &hf_gvcp_eventcmd_device_specific_id, |
3016 | 15 | { "Device Specific ID", "gvcp.cmd.event.devicespecificid", |
3017 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
3018 | 15 | NULL, HFILL }}, |
3019 | | |
3020 | 15 | { &hf_gvcp_eventcmd_stream_channel_index, |
3021 | 15 | { "Stream Channel Index", "gvcp.cmd.event.streamchannelindex", |
3022 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
3023 | 15 | NULL, HFILL }}, |
3024 | | |
3025 | 15 | { &hf_gvcp_eventcmd_block_id, |
3026 | 15 | { "Block ID (16 bit)", "gvcp.cmd.event.blockid", |
3027 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
3028 | 15 | NULL, HFILL }}, |
3029 | | |
3030 | 15 | { &hf_gvcp_eventcmd_timestamp, |
3031 | 15 | { "Timestamp", "gvcp.cmd.event.timestamp", |
3032 | 15 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3033 | 15 | NULL, HFILL }}, |
3034 | | |
3035 | 15 | { &hf_gvcp_eventcmd_block_id_64bit_v2_0, |
3036 | 15 | { "Block ID 64 bit", "gvcp.event_timestamp", |
3037 | 15 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3038 | 15 | NULL, HFILL }}, |
3039 | | |
3040 | | /* Event data */ |
3041 | | |
3042 | 15 | { &hf_gvcp_eventcmd_data, |
3043 | 15 | { "Event Data", "gvcp.cmd.eventdata.data", |
3044 | 15 | FT_BYTES, BASE_NONE, NULL, 0x0, |
3045 | 15 | NULL, HFILL }}, |
3046 | | |
3047 | | /* Action */ |
3048 | | |
3049 | 15 | { &hf_gvcp_actioncmd_device_key, |
3050 | 15 | { "Action Device Key", "gvcp.cmd.action.devicekey", |
3051 | 15 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3052 | 15 | NULL, HFILL }}, |
3053 | | |
3054 | 15 | { &hf_gvcp_actioncmd_group_key, |
3055 | 15 | { "Action Group Key", "gvcp.cmd.action.groupkey", |
3056 | 15 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3057 | 15 | NULL, HFILL }}, |
3058 | | |
3059 | 15 | { &hf_gvcp_actioncmd_group_mask, |
3060 | 15 | { "Action Group Mask", "gvcp.cmd.action.groupmask", |
3061 | 15 | FT_UINT32, BASE_HEX_DEC, NULL, 0xFFFFFFFF, |
3062 | 15 | NULL, HFILL }}, |
3063 | | |
3064 | 15 | { &hf_gvcp_actioncmd_time_v2_0, |
3065 | 15 | { "Action Scheduled Time", "gvcp.cmd.action.time", |
3066 | 15 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3067 | 15 | NULL, HFILL }}, |
3068 | | |
3069 | | /* Pending acknowledge */ |
3070 | | |
3071 | 15 | { &hf_gvcp_time_to_completion, |
3072 | 15 | { "Time to completion", "gvcp.ack.pendingack.timetocompletion", |
3073 | 15 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
3074 | 15 | NULL, HFILL }}, |
3075 | | |
3076 | | /* GVCP_VERSION */ |
3077 | | |
3078 | 15 | { &hf_gvcp_spec_version_major, |
3079 | 15 | { "Version Major", "gvcp.bootstrap.specversion.major", |
3080 | 15 | FT_UINT32, BASE_HEX, NULL, 0xFFFF0000, |
3081 | 15 | NULL, HFILL }}, |
3082 | | |
3083 | 15 | { &hf_gvcp_spec_version_minor, |
3084 | 15 | { "Version Minor", "gvcp.bootstrap.specversion.minor", |
3085 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0000FFFF, |
3086 | 15 | NULL, HFILL }}, |
3087 | | |
3088 | 15 | { &hf_gvcp_spec_version, |
3089 | 15 | { "Spec Version", "gvcp.bootstrap.specversion", |
3090 | 15 | FT_UINT32, BASE_HEX, NULL, 0, |
3091 | 15 | NULL, HFILL }}, |
3092 | | |
3093 | | /* GVCP_devicemode */ |
3094 | | |
3095 | 15 | { &hf_gvcp_devicemode_endianness, |
3096 | 15 | { "Endianness", "gvcp.bootstrap.devicemode.endianness", |
3097 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3098 | 15 | NULL, HFILL |
3099 | 15 | }}, |
3100 | | |
3101 | 15 | { &hf_gvcp_devicemode_deviceclass, |
3102 | 15 | { "Device Class", "gvcp.bootstrap.devicemode.deviceclass", |
3103 | 15 | FT_UINT32, BASE_HEX, VALS(devicemodenames_class), 0x70000000, |
3104 | 15 | NULL, HFILL |
3105 | 15 | }}, |
3106 | | |
3107 | 15 | { &hf_gvcp_devicemode_current_link_configuration_v2_0, |
3108 | 15 | { "Current Link Configuration", "gvcp.bootstrap.devicemode.currentlinkconfiguration", |
3109 | 15 | FT_UINT32, BASE_HEX, VALS(linkconfiguration_class), 0x03000000, |
3110 | 15 | NULL, HFILL |
3111 | 15 | }}, |
3112 | | |
3113 | 15 | { &hf_gvcp_devicemode_characterset, |
3114 | 15 | { "Character Set", "gvcp.bootstrap.devicemode.characterset", |
3115 | 15 | FT_UINT32, BASE_HEX, VALS(devicemodenames_characterset), 0x0000000F, |
3116 | 15 | NULL, HFILL |
3117 | 15 | }}, |
3118 | | |
3119 | | /* GVCP_MAC_HIGH_0, 1, 2, 3 */ |
3120 | | |
3121 | 15 | { &hf_gvcp_machigh, |
3122 | 15 | { "MAC High", "gvcp.bootstrap.machigh", |
3123 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0000FFFF, |
3124 | 15 | NULL, HFILL |
3125 | 15 | }}, |
3126 | | |
3127 | | /* GVCP_MAC_LOW_0, 1, 2, 3 */ |
3128 | | |
3129 | 15 | { &hf_gvcp_maclow, |
3130 | 15 | { "MAC Low", "gvcp.bootstrap.maclow", |
3131 | 15 | FT_UINT32, BASE_HEX, NULL, 0, |
3132 | 15 | NULL, HFILL |
3133 | 15 | }}, |
3134 | | |
3135 | | /* GVCP_SUPPORTED_IP_CONFIGURATION_0, 1, 2, 3 */ |
3136 | | /* GVCP_CURIPCFG_0, 1, 2, 3 */ |
3137 | | |
3138 | 15 | { &hf_gvcp_ip_config_can_handle_pause_frames_v2_0, |
3139 | 15 | { "IP Config Can Handle Pause Frames", "gvcp.bootstrap.ipconfig.canhandlepauseframes", |
3140 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3141 | 15 | NULL, HFILL }}, |
3142 | | |
3143 | 15 | { &hf_gvcp_ip_config_can_generate_pause_frames_v2_0, |
3144 | 15 | { "Can Generate Pause Frames", "gvcp.bootstrap.ipconfig.cangeneratepauseframes", |
3145 | 15 | FT_BOOLEAN, 32, NULL, 0x40000000, |
3146 | 15 | NULL, HFILL }}, |
3147 | | |
3148 | 15 | { &hf_gvcp_ip_config_lla, |
3149 | 15 | { "LLA", "gvcp.bootstrap.ipconfig.lla", |
3150 | 15 | FT_BOOLEAN, 32, NULL, 0x00000004, |
3151 | 15 | NULL, HFILL }}, |
3152 | | |
3153 | 15 | { &hf_gvcp_ip_config_dhcp, |
3154 | 15 | { "DHCP", "gvcp.bootstrap.ipconfig.dhcp", |
3155 | 15 | FT_BOOLEAN, 32, NULL, 0x00000002, |
3156 | 15 | NULL, HFILL }}, |
3157 | | |
3158 | 15 | { &hf_gvcp_ip_config_persistent_ip, |
3159 | 15 | { "Persistent IP", "gvcp.bootstrap.ipconfig.persistentip", |
3160 | 15 | FT_BOOLEAN, 32, NULL, 0x00000001, |
3161 | 15 | NULL, HFILL }}, |
3162 | | |
3163 | 15 | { &hf_gvcp_supportedipconfig, |
3164 | 15 | { "Supported IP Configuration", "gvcp.bootstrap.supportedipconfig", |
3165 | 15 | FT_UINT32, BASE_HEX, NULL, 0, |
3166 | 15 | NULL, HFILL |
3167 | 15 | }}, |
3168 | | |
3169 | 15 | { &hf_gvcp_currentipconfig, |
3170 | 15 | { "Current IP Configuration", "gvcp.bootstrap.currentipconfig", |
3171 | 15 | FT_UINT32, BASE_HEX, NULL, 0, |
3172 | 15 | NULL, HFILL |
3173 | 15 | }}, |
3174 | | |
3175 | | /* GVCP_CURRENT_IP_ADDRESS_0, 1, 2, 3 */ |
3176 | | |
3177 | 15 | { &hf_gvcp_current_IP, |
3178 | 15 | { "Current IP", "gvcp.bootstrap.currentip", |
3179 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3180 | 15 | NULL, HFILL }}, |
3181 | | |
3182 | | /* GVCP_CURRENT_SUBNET_MASK_0, 1, 2, 3 */ |
3183 | | |
3184 | 15 | { &hf_gvcp_current_subnet_mask, |
3185 | 15 | { "Subnet Mask", "gvcp.bootstrap.currentsubnetmask", |
3186 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3187 | 15 | NULL, HFILL }}, |
3188 | | |
3189 | | /* GVCP_CURRENT_DEFAULT_GATEWAY_0, 1, 2, 3 */ |
3190 | | |
3191 | 15 | { &hf_gvcp_current_default_gateway, |
3192 | 15 | { "Default Gateway", "gvcp.bootstrap.currentdefaultgateway", |
3193 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3194 | 15 | NULL, HFILL }}, |
3195 | | |
3196 | | /* GVCP_MANUFACTURER_NAME */ |
3197 | | |
3198 | 15 | { &hf_gvcp_manufacturer_name, |
3199 | 15 | { "Manufacturer Name", "gvcp.bootstrap.manufacturername", |
3200 | 15 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
3201 | 15 | NULL, HFILL }}, |
3202 | | |
3203 | | /* GVCP_MODEL_NAME */ |
3204 | | |
3205 | 15 | { &hf_gvcp_model_name, |
3206 | 15 | { "Model Name", "gvcp.bootstrap.modelname", |
3207 | 15 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
3208 | 15 | NULL, HFILL }}, |
3209 | | |
3210 | | /* GVCP_DEVICE_VERSION */ |
3211 | | |
3212 | 15 | { &hf_gvcp_device_version, |
3213 | 15 | { "Device Version", "gvcp.bootstrap.deviceversion", |
3214 | 15 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
3215 | 15 | NULL, HFILL }}, |
3216 | | |
3217 | | /* GVCP_MANUFACTURER_INFO */ |
3218 | | |
3219 | 15 | { &hf_gvcp_manufacturer_specific_info, |
3220 | 15 | { "Manufacturer Specific Info", "gvcp.bootstrap.manufacturerspecificinfo", |
3221 | 15 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
3222 | 15 | NULL, HFILL }}, |
3223 | | |
3224 | | /* GVCP_SERIAL_NUMBER */ |
3225 | | |
3226 | 15 | { &hf_gvcp_serial_number, |
3227 | 15 | { "Serial Number", "gvcp.bootstrap.serialnumber", |
3228 | 15 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
3229 | 15 | NULL, HFILL }}, |
3230 | | |
3231 | | /* GVCP_USER_DEFINED_NAME */ |
3232 | | |
3233 | 15 | { &hf_gvcp_user_defined_name, |
3234 | 15 | { "User-defined Name", "gvcp.bootstrap.userdefinedname", |
3235 | 15 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
3236 | 15 | NULL, HFILL }}, |
3237 | | |
3238 | | /* GVCP_FIRST_URL */ |
3239 | | |
3240 | 15 | { &hf_gvcp_first_xml_device_description_file, |
3241 | 15 | { "First URL", "gvcp.bootstrap.firsturl", |
3242 | 15 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
3243 | 15 | NULL, HFILL }}, |
3244 | | |
3245 | | /* GVCP_SECOND_URL */ |
3246 | | |
3247 | 15 | { &hf_gvcp_second_xml_device_description_file, |
3248 | 15 | { "Second URL", "gvcp.bootstrap.secondurl", |
3249 | 15 | FT_STRINGZ, BASE_NONE, NULL, 0x0, |
3250 | 15 | NULL, HFILL }}, |
3251 | | |
3252 | | /* GVCP_NUMBER_OF_NETWORK_INTERFACES */ |
3253 | | |
3254 | 15 | { &hf_gvcp_number_interfaces, |
3255 | 15 | { "Number of Network Interfaces", "gvcp.bootstrap.numberofnetworminterfaces", |
3256 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3257 | 15 | NULL, HFILL |
3258 | 15 | }}, |
3259 | | |
3260 | | /* GVCP_PERSISTENT_IP_ADDRESS_0, 1, 2, 3 */ |
3261 | | |
3262 | 15 | { &hf_gvcp_persistent_ip, |
3263 | 15 | { "Persistent IP", "gvcp.bootstrap.persistentip", |
3264 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3265 | 15 | NULL, HFILL |
3266 | 15 | }}, |
3267 | | |
3268 | | /* GVCP_PERSISTENT_SUBNET_MASK_0, 1, 2, 3 */ |
3269 | | |
3270 | 15 | { &hf_gvcp_persistent_subnet, |
3271 | 15 | { "Persistent Subnet Mask", "gvcp.bootstrap.persistentsubnetmask", |
3272 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3273 | 15 | NULL, HFILL |
3274 | 15 | }}, |
3275 | | |
3276 | | /* GVCP_PERSISTENT_DEFAULT_GATEWAY_0, 1, 2, 3 */ |
3277 | | |
3278 | 15 | { &hf_gvcp_persistent_gateway, |
3279 | 15 | { "Persistent GateWay", "gvcp.bootstrap.persistentgateway", |
3280 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3281 | 15 | NULL, HFILL |
3282 | 15 | }}, |
3283 | | |
3284 | | /* GVCP_LINK_SPEED_0, 1, 2, 3 */ |
3285 | | |
3286 | 15 | { &hf_gvcp_link_speed, |
3287 | 15 | { "Link Speed (in Mbs)", "gvcp.bootstrap.linkspeed", |
3288 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3289 | 15 | NULL, HFILL |
3290 | 15 | }}, |
3291 | | |
3292 | | /* GVCP_NUMBER_OF_MESSAGE_CHANNELS */ |
3293 | | |
3294 | 15 | { &hf_gvcp_number_message_channels, |
3295 | 15 | { "Number of Message Channels", "gvcp.bootstrap.numberofmessagechannels", |
3296 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3297 | 15 | NULL, HFILL |
3298 | 15 | }}, |
3299 | | |
3300 | | /* GVCP_NUMBER_OF_STREAM_CHANNELS */ |
3301 | | |
3302 | 15 | { &hf_gvcp_number_stream_channels, |
3303 | 15 | { "Number of Stream Channels", "gvcp.bootstrap.numberofstreamchannels", |
3304 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3305 | 15 | NULL, HFILL |
3306 | 15 | }}, |
3307 | | |
3308 | | /* GVCP_NUMBER_OF_ACTION_SIGNALS */ |
3309 | | |
3310 | 15 | { &hf_gvcp_number_action_signals, |
3311 | 15 | { "Number of Action Signals", "gvcp.bootstrap.numberofactionsignals", |
3312 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3313 | 15 | NULL, HFILL |
3314 | 15 | }}, |
3315 | | |
3316 | | /* GVCP_NUMBER_OF_ACTIVE_LINKS */ |
3317 | | |
3318 | 15 | { &hf_gvcp_number_of_active_links_v2_0, |
3319 | 15 | { "Number of Active Links", "gvcp.bootstrap.numberofactivelinks", |
3320 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000000F, |
3321 | 15 | NULL, HFILL |
3322 | 15 | }}, |
3323 | | |
3324 | | /* GVCP_IEEE_1588_SELECTED_PROFILE */ |
3325 | | |
3326 | 15 | { &hf_gvcp_selected_ieee1588_profile_v2_1, |
3327 | 15 | { "IEEE 1588 Selected Profile", "gvcp.bootstrap.ieee1588selectedprofile", |
3328 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000001F, |
3329 | 15 | NULL, HFILL |
3330 | 15 | }}, |
3331 | | |
3332 | | /* GVCP_SC_CAPS */ |
3333 | | |
3334 | 15 | { &hf_gvcp_sccaps_scspx_register_supported, |
3335 | 15 | { "SCSPx Register Supported", "gvcp.bootstrap.sccaps.scspxregistersupported", |
3336 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3337 | 15 | NULL, HFILL |
3338 | 15 | }}, |
3339 | | |
3340 | 15 | { &hf_gvcp_sccaps_legacy_16bit_blockid_supported_v2_0, |
3341 | 15 | { "16 bit Block ID Supported", "gvcp.bootstrap.sccaps.16bitblockidsupported", |
3342 | 15 | FT_BOOLEAN, 32, NULL, 0x40000000, |
3343 | 15 | NULL, HFILL |
3344 | 15 | }}, |
3345 | | |
3346 | 15 | { &hf_gvcp_sccaps_scmbsx_supported_v2_2, |
3347 | 15 | { "Stream Channel Max. Block Size Supported", "gvcp.bootstrap.sccaps.scmbssupported", |
3348 | 15 | FT_BOOLEAN, 32, NULL, 0x20000000, |
3349 | 15 | NULL, HFILL |
3350 | 15 | } }, |
3351 | | |
3352 | 15 | { &hf_gvcp_sccaps_scebax_supported_v2_2, |
3353 | 15 | { "Stream Channel Extended Bootstrap Address Supported", "gvcp.bootstrap.sccaps.scebasupported", |
3354 | 15 | FT_BOOLEAN, 32, NULL, 0x10000000, |
3355 | 15 | NULL, HFILL |
3356 | 15 | } }, |
3357 | | |
3358 | | /* GVCP_MESSAGE_CHANNEL_CAPS */ |
3359 | | |
3360 | 15 | { &hf_gvcp_mcsp_supported, |
3361 | 15 | { "MCSP Supported", "gvcp.bootstrap.mccaps.mcspsupported", |
3362 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3363 | 15 | NULL, HFILL |
3364 | 15 | }}, |
3365 | | |
3366 | 15 | { &hf_gvcp_mccfg_supported_v2_2, |
3367 | 15 | { "MCCFG Supported", "gvcp.bootstrap.mccaps.mccfgsupported", |
3368 | 15 | FT_BOOLEAN, 32, NULL, 0x40000000, |
3369 | 15 | NULL, HFILL |
3370 | 15 | } }, |
3371 | | |
3372 | 15 | { &hf_gvcp_mcec_supported_v2_2, |
3373 | 15 | { "MCEC Supported", "gvcp.bootstrap.mccaps.mcecsupported", |
3374 | 15 | FT_BOOLEAN, 32, NULL, 0x20000000, |
3375 | 15 | NULL, HFILL |
3376 | 15 | } }, |
3377 | | |
3378 | | /* GVCP_IEEE_1588_EXTENDED_CAPABILITY */ |
3379 | | |
3380 | 15 | { &hf_gvcp_ieee1588_profile_registers_present_v2_1, |
3381 | 15 | { "IEEE 1588 Profile Registers Present", "gvcp.bootstrap.ieee1588extendedcapabilities.profileregisterspresent", |
3382 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3383 | 15 | NULL, HFILL |
3384 | 15 | }}, |
3385 | | |
3386 | | /* GVCP_IEEE_1588_SUPPORTED_PROFILES */ |
3387 | | |
3388 | 15 | { &hf_gvcp_ieee1588_ptp_profile_supported_v2_1, |
3389 | 15 | { "IEEE 1588 PTP Profile Supported", "gvcp.bootstrap.ieee1588supportedprofiles.ptp", |
3390 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3391 | 15 | NULL, HFILL |
3392 | 15 | }}, |
3393 | | |
3394 | 15 | { &hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1, |
3395 | 15 | { "IEEE 1588 802.1as Profile Supported", "gvcp.bootstrap.ieee1588supportedprofiles.802dot1as", |
3396 | 15 | FT_BOOLEAN, 32, NULL, 0x40000000, |
3397 | 15 | NULL, HFILL |
3398 | 15 | }}, |
3399 | | |
3400 | | /* GVCP_CAPABILITY */ |
3401 | | |
3402 | 15 | { &hf_gvcp_capability_user_defined, |
3403 | 15 | { "User Defined Name Supported", "gvcp.bootstrap.capability.userdefined", |
3404 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3405 | 15 | NULL, HFILL |
3406 | 15 | }}, |
3407 | | |
3408 | 15 | { &hf_gvcp_capability_serial_number, |
3409 | 15 | { "Serial Number Supported", "gvcp.bootstrap.capability.serialnumber", |
3410 | 15 | FT_BOOLEAN, 32, NULL, 0x40000000, |
3411 | 15 | NULL, HFILL |
3412 | 15 | }}, |
3413 | | |
3414 | 15 | { &hf_gvcp_capability_heartbeat_disable, |
3415 | 15 | { "Heartbeat Disable Supported", "gvcp.bootstrap.capability.heartbeatdisabled", |
3416 | 15 | FT_BOOLEAN, 32, NULL, 0x20000000, |
3417 | 15 | NULL, HFILL |
3418 | 15 | }}, |
3419 | | |
3420 | 15 | { &hf_gvcp_capability_link_speed, |
3421 | 15 | { "Link Speed Supported", "gvcp.bootstrap.capability.linkspeed", |
3422 | 15 | FT_BOOLEAN, 32, NULL, 0x10000000, |
3423 | 15 | NULL, HFILL |
3424 | 15 | }}, |
3425 | | |
3426 | 15 | { &hf_gvcp_capability_ccp_application_portip, |
3427 | 15 | { "CCP Application Port/IP Supported", "gvcp.bootstrap.capability.ccpapplicationportip", |
3428 | 15 | FT_BOOLEAN, 32, NULL, 0x08000000, |
3429 | 15 | NULL, HFILL |
3430 | 15 | }}, |
3431 | | |
3432 | 15 | { &hf_gvcp_capability_manifest_table, |
3433 | 15 | { "Manifest Table Supported", "gvcp.bootstrap.capability.manifesttable", |
3434 | 15 | FT_BOOLEAN, 32, NULL, 0x04000000, |
3435 | 15 | NULL, HFILL |
3436 | 15 | }}, |
3437 | | |
3438 | 15 | { &hf_gvcp_capability_test_data, |
3439 | 15 | { "Test Data Supported", "gvcp.bootstrap.capability.testdata", |
3440 | 15 | FT_BOOLEAN, 32, NULL, 0x02000000, |
3441 | 15 | NULL, HFILL |
3442 | 15 | }}, |
3443 | | |
3444 | 15 | { &hf_gvcp_capability_discovery_ACK_delay, |
3445 | 15 | { "Discovery ACK Delay Supported", "gvcp.bootstrap.capability.discoveryackdelay", |
3446 | 15 | FT_BOOLEAN, 32, NULL, 0x01000000, |
3447 | 15 | NULL, HFILL |
3448 | 15 | }}, |
3449 | | |
3450 | 15 | { &hf_gvcp_capability_writable_discovery_ACK_delay, |
3451 | 15 | { "Writable Discovery ACK Delay Supported", "gvcp.bootstrap.capability.writablediscoveryackdelay", |
3452 | 15 | FT_BOOLEAN, 32, NULL, 0x00800000, |
3453 | 15 | NULL, HFILL |
3454 | 15 | }}, |
3455 | | |
3456 | 15 | { &hf_gvcp_capability_extended_status_code_v1_1, |
3457 | 15 | { "Extended Status Code Supported (v1.1)", "gvcp.bootstrap.capability.extendedstatuscodesupportedv1_1", |
3458 | 15 | FT_BOOLEAN, 32, NULL, 0x00400000, |
3459 | 15 | NULL, HFILL |
3460 | 15 | }}, |
3461 | | |
3462 | 15 | { &hf_gvcp_capability_primary_application_switchover, |
3463 | 15 | { "Primary Application Switchover Supported", "gvcp.bootstrap.capability.primaryapplicationswitchover", |
3464 | 15 | FT_BOOLEAN, 32, NULL, 0x00200000, |
3465 | 15 | NULL, HFILL |
3466 | 15 | }}, |
3467 | | |
3468 | 15 | { &hf_gvcp_capability_unconditional_action_command, |
3469 | 15 | { "Unconditional Action Command Supported", "gvcp.bootstrap.capability.unconditionalactioncommand", |
3470 | 15 | FT_BOOLEAN, 32, NULL, 0x00100000, |
3471 | 15 | NULL, HFILL |
3472 | 15 | }}, |
3473 | | |
3474 | 15 | { &hf_gvcp_capability_1588_v2_0, |
3475 | 15 | { "Capability 1588", "gvcp.bootstrap.capability.ieee1588", |
3476 | 15 | FT_BOOLEAN, 32, NULL, 0x00080000, |
3477 | 15 | NULL, HFILL |
3478 | 15 | }}, |
3479 | | |
3480 | 15 | { &hf_gvcp_capability_extended_status_code_v2_0, |
3481 | 15 | { "Status Code", "gvcp.bootstrap.capability.pendingextendedstatuscodev2_0", |
3482 | 15 | FT_BOOLEAN, 32, NULL, 0x00040000, |
3483 | 15 | NULL, HFILL |
3484 | 15 | }}, |
3485 | | |
3486 | 15 | { &hf_gvcp_capability_scheduled_action_command_v2_0, |
3487 | 15 | { "Scheduled Action Command", "gvcp.bootstrap.capability.scheduledactioncommand", |
3488 | 15 | FT_BOOLEAN, 32, NULL, 0x00020000, |
3489 | 15 | NULL, HFILL |
3490 | 15 | }}, |
3491 | | |
3492 | 15 | { &hf_gvcp_capability_ieee1588_extended_capabilities_v2_1, |
3493 | 15 | { "IEEE1588 Extended Capabilities", "gvcp.bootstrap.capability.ieee1588extendedcapabilities", |
3494 | 15 | FT_BOOLEAN, 32, NULL, 0x00010000, |
3495 | 15 | NULL, HFILL |
3496 | 15 | }}, |
3497 | | |
3498 | 15 | { &hf_gvcp_capability_action_command, |
3499 | 15 | { "Action Command", "gvcp.bootstrap.capability.actioncommand", |
3500 | 15 | FT_BOOLEAN, 32, NULL, 0x00000040, |
3501 | 15 | NULL, HFILL |
3502 | 15 | }}, |
3503 | | |
3504 | 15 | { &hf_gvcp_capability_pending, |
3505 | 15 | { "Pending ACK Supported", "gvcp.bootstrap.capability.pendingack", |
3506 | 15 | FT_BOOLEAN, 32, NULL, 0x00000020, |
3507 | 15 | NULL, HFILL |
3508 | 15 | }}, |
3509 | | |
3510 | 15 | { &hf_gvcp_capability_evendata, |
3511 | 15 | { "Event Data Supported", "gvcp.bootstrap.capability.eventdata", |
3512 | 15 | FT_BOOLEAN, 32, NULL, 0x00000010, |
3513 | 15 | NULL, HFILL |
3514 | 15 | }}, |
3515 | | |
3516 | 15 | { &hf_gvcp_capability_event, |
3517 | 15 | { "Event Signal Supported", "gvcp.bootstrap.capability.eventsignal", |
3518 | 15 | FT_BOOLEAN, 32, NULL, 0x00000008, |
3519 | 15 | NULL, HFILL |
3520 | 15 | }}, |
3521 | | |
3522 | 15 | { &hf_gvcp_capability_packetresend, |
3523 | 15 | { "Packet Resend CMD Supported", "gvcp.bootstrap.capability.packetresendcmd", |
3524 | 15 | FT_BOOLEAN, 32, NULL, 0x00000004, |
3525 | 15 | NULL, HFILL |
3526 | 15 | }}, |
3527 | | |
3528 | 15 | { &hf_gvcp_capability_writemem, |
3529 | 15 | { "WRITEMEM Supported", "gvcp.bootstrap.capability.writemem", |
3530 | 15 | FT_BOOLEAN, 32, NULL, 0x00000002, |
3531 | 15 | NULL, HFILL |
3532 | 15 | }}, |
3533 | | |
3534 | 15 | { &hf_gvcp_capability_concatenation, |
3535 | 15 | { "Concatenation Supported", "gvcp.bootstrap.capability.concatenation", |
3536 | 15 | FT_BOOLEAN, 32, NULL, 0x00000001, |
3537 | 15 | NULL, HFILL |
3538 | 15 | }}, |
3539 | | |
3540 | | /* GVCP_HEARTBEAT_TIMEOUT */ |
3541 | | |
3542 | 15 | { &hf_gvcp_heartbeat, |
3543 | 15 | { "Heartbeat Timeout (in ms)", "gvcp.bootstrap.heartbeattimeout", |
3544 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3545 | 15 | NULL, HFILL |
3546 | 15 | }}, |
3547 | | |
3548 | | /* GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH */ |
3549 | | |
3550 | 15 | { &hf_gvcp_high_timestamp_frequency, |
3551 | 15 | { "Timestamp Tick High Frequency (in Hz)", "gvcp.bootstrap.timestamptickfrequencyhigh", |
3552 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3553 | 15 | NULL, HFILL |
3554 | 15 | }}, |
3555 | | |
3556 | | /* GVCP_TIMESTAMP_TICK_FREQUENCY_LOW */ |
3557 | | |
3558 | 15 | { &hf_gvcp_low_timestamp_frequency, |
3559 | 15 | { "Timestamp Tick Low Frequency (in Hz)", "gvcp.bootstrap.timestamptickfrequencylow", |
3560 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3561 | 15 | NULL, HFILL |
3562 | 15 | }}, |
3563 | | |
3564 | | /* GVCP_TIMESTAMP_CONTROL */ |
3565 | | |
3566 | 15 | { &hf_gvcp_timestamp_control_latch, |
3567 | 15 | { "Timestamp Control Latch", "gvcp.bootstrap.timestampcontrol.latch", |
3568 | 15 | FT_BOOLEAN, 32, NULL, 0x00000002, |
3569 | 15 | NULL, HFILL |
3570 | 15 | }}, |
3571 | | |
3572 | 15 | { &hf_gvcp_timestamp_control_reset, |
3573 | 15 | { "Timestamp Control Reset", "gvcp.bootstrap.timestampcontrol.reset", |
3574 | 15 | FT_BOOLEAN, 32, NULL, 0x00000001, |
3575 | 15 | NULL, HFILL |
3576 | 15 | }}, |
3577 | | |
3578 | | /* GVCP_TIMESTAMP_VALUE_HIGH */ |
3579 | | |
3580 | 15 | { &hf_gvcp_high_timestamp_value, |
3581 | 15 | { "Timestamp Value High", "gvcp.bootstrap.timestampvaluehigh", |
3582 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3583 | 15 | NULL, HFILL |
3584 | 15 | }}, |
3585 | | |
3586 | | /* GVCP_TIMESTAMP_VALUE_LOW */ |
3587 | | |
3588 | 15 | { &hf_gvcp_low_timestamp_value, |
3589 | 15 | { "Timestamp Value Low", "gvcp.bootstrap.timestampvaluelow", |
3590 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3591 | 15 | NULL, HFILL |
3592 | 15 | }}, |
3593 | | |
3594 | | /* GVCP_DISCOVERY_ACK_DELAY */ |
3595 | | |
3596 | 15 | { &hf_gvcp_discovery_ACK_delay, |
3597 | 15 | { "Discovery ACK Delay (in ms)", "gvcp.bootstrap.discoveryackdelay", |
3598 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000FFFF, |
3599 | 15 | NULL, HFILL |
3600 | 15 | }}, |
3601 | | |
3602 | | /* GVCP_CONFIGURATION */ |
3603 | | |
3604 | 15 | { &hf_gvcp_configuration_1588_enable_v2_0, |
3605 | 15 | { "IEEE 1588 Enable", "gvcp.bootstrap.config.ieee1588enable", |
3606 | 15 | FT_BOOLEAN, 32, NULL, 0x00080000, |
3607 | 15 | NULL, HFILL |
3608 | 15 | }}, |
3609 | | |
3610 | 15 | { &hf_gvcp_configuration_extended_status_codes_enable_v2_0, |
3611 | 15 | { "Status Codes v2.0 Enable", "gvcp.bootstrap.config.statuscodesv2_0enable", |
3612 | 15 | FT_BOOLEAN, 32, NULL, 0x00040000, |
3613 | 15 | NULL, HFILL |
3614 | 15 | }}, |
3615 | | |
3616 | 15 | { &hf_gvcp_configuration_unconditional_action_command_enable_v2_0, |
3617 | 15 | { "Unconditional Action Command Enable", "gvcp.bootstrap.config.unconditionalactioncommandenable", |
3618 | 15 | FT_BOOLEAN, 32, NULL, 0x00000008, |
3619 | 15 | NULL, HFILL |
3620 | 15 | }}, |
3621 | | |
3622 | 15 | { &hf_gvcp_configuration_extended_status_codes_enable_v1_1, |
3623 | 15 | { "Status Codes v1.1 Enable", "gvcp.bootstrap.config.statuscodesv1_1enable", |
3624 | 15 | FT_BOOLEAN, 32, NULL, 0x00000004, |
3625 | 15 | NULL, HFILL |
3626 | 15 | }}, |
3627 | | |
3628 | 15 | { &hf_gvcp_configuration_pending_ack_enable, |
3629 | 15 | { "Pending_ACK Enable", "gvcp.bootstrap.config.pendingackenable", |
3630 | 15 | FT_BOOLEAN, 32, NULL, 0x00000002, |
3631 | 15 | NULL, HFILL |
3632 | 15 | }}, |
3633 | | |
3634 | 15 | { &hf_gvcp_configuration_heartbeat_disable, |
3635 | 15 | { "Heartbeat Disable", "gvcp.bootstrap.config.heartbeatdisable", |
3636 | 15 | FT_BOOLEAN, 32, NULL, 0x00000001, |
3637 | 15 | NULL, HFILL |
3638 | 15 | }}, |
3639 | | |
3640 | | /* GVCP_PENDING_TIMEOUT */ |
3641 | | |
3642 | 15 | { &hf_gvcp_pending_timeout_max_execution, |
3643 | 15 | { "Pending Timeout (in ms)", "gvcp.bootstrap.pending.timeout", |
3644 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3645 | 15 | NULL, HFILL |
3646 | 15 | }}, |
3647 | | |
3648 | | /* GVCP_CONTROL_SWITCHOVER_KEY */ |
3649 | | |
3650 | 15 | { &hf_gvcp_control_switchover_key_register, |
3651 | 15 | { "Control Switchover Key", "gvcp.bootstrap.controlswitchoverkey", |
3652 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000FFFF, |
3653 | 15 | NULL, HFILL |
3654 | 15 | }}, |
3655 | | |
3656 | | /* GVCP_GVSCP_CONFIGURATION */ |
3657 | | |
3658 | 15 | { &hf_gvcp_gvsp_configuration_64bit_blockid_enable_v2_0, |
3659 | 15 | { "GVSP Configuration 64 bit Block ID", "gvcp.bootstrap.gvcspconfig.64bitblockidenable", |
3660 | 15 | FT_BOOLEAN, 32, NULL, 0x40000000, |
3661 | 15 | NULL, HFILL |
3662 | 15 | }}, |
3663 | | |
3664 | | /* GVCP_PHYSICAL_LINK_CAPABILITY, GVCP_PHYSICAL_LINK_CONFIGURATION */ |
3665 | | |
3666 | 15 | { &hf_gvcp_link_dlag_v2_0, |
3667 | 15 | { "Link dLAG", "gvcp.bootstrap.link.dlag", |
3668 | 15 | FT_BOOLEAN, 32, NULL, 0x00000008, |
3669 | 15 | NULL, HFILL |
3670 | 15 | }}, |
3671 | | |
3672 | 15 | { &hf_gvcp_link_slag_v2_0, |
3673 | 15 | { "Link sLAG", "gvcp.bootstrap.link.slag", |
3674 | 15 | FT_BOOLEAN, 32, NULL, 0x00000004, |
3675 | 15 | NULL, HFILL |
3676 | 15 | }}, |
3677 | | |
3678 | 15 | { &hf_gvcp_link_ml_v2_0, |
3679 | 15 | { "Link ML", "gvcp.bootstrap.link.ml", |
3680 | 15 | FT_BOOLEAN, 32, NULL, 0x00000002, |
3681 | 15 | NULL, HFILL |
3682 | 15 | }}, |
3683 | | |
3684 | 15 | { &hf_gvcp_link_sl_v2_0, |
3685 | 15 | { "Link SL", "gvcp.bootstrap.link.sl", |
3686 | 15 | FT_BOOLEAN, 32, NULL, 0x00000001, |
3687 | 15 | NULL, HFILL |
3688 | 15 | }}, |
3689 | | |
3690 | | /* GVCP_IEEE_1588_STATUS */ |
3691 | | |
3692 | 15 | { &hf_gvcp_ieee1588_clock_status_v2_0, |
3693 | 15 | { "IEEE 1588 Clock Status", "gvcp.bootstrap.ieee1588.clockstatus", |
3694 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0000000F, |
3695 | 15 | NULL, HFILL |
3696 | 15 | }}, |
3697 | | |
3698 | | /* GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE */ |
3699 | | |
3700 | 15 | { &hf_gvcp_scheduled_action_command_queue_size_v2_0, |
3701 | 15 | { "Scheduled Action Command Queue Size", "gvcp.bootstrap.scheduledactioncommandqueuesize", |
3702 | 15 | FT_UINT32, BASE_DEC, NULL, 0, |
3703 | 15 | NULL, HFILL |
3704 | 15 | }}, |
3705 | | |
3706 | | /* GVCP_CCP */ |
3707 | | |
3708 | 15 | { &hf_gvcp_control_switchover_key, |
3709 | 15 | { "Control Switchover Key", "gvcp.bootstrap.control.switchoverkey", |
3710 | 15 | FT_UINT32, BASE_HEX, NULL, 0xFFFF0000, |
3711 | 15 | NULL, HFILL |
3712 | 15 | }}, |
3713 | | |
3714 | 15 | { &hf_gvcp_control_switchover_en, |
3715 | 15 | { "Control Switchover Enable", "gvcp.bootstrap.control.switchoverenable", |
3716 | 15 | FT_BOOLEAN, 32, NULL, 0x00000004, |
3717 | 15 | NULL, HFILL |
3718 | 15 | }}, |
3719 | | |
3720 | 15 | { &hf_gvcp_control_access, |
3721 | 15 | { "Control Access", "gvcp.bootstrap.control.controlaccess", |
3722 | 15 | FT_BOOLEAN, 32, NULL, 0x00000002, |
3723 | 15 | NULL, HFILL |
3724 | 15 | }}, |
3725 | | |
3726 | 15 | { &hf_gvcp_exclusive_access, |
3727 | 15 | { "Exclusive Access", "gvcp.bootstrap.control.exclusiveaccess", |
3728 | 15 | FT_BOOLEAN, 32, NULL, 0x00000001, |
3729 | 15 | NULL, HFILL |
3730 | 15 | }}, |
3731 | | |
3732 | | /* GVCP_PRIMARY_APPLICATION_PORT */ |
3733 | | |
3734 | 15 | { &hf_gvcp_primary_application_host_port, |
3735 | 15 | { "Primary Application Port", "gvcp.bootstrap.primaryapplicationport", |
3736 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000FFFF, |
3737 | 15 | NULL, HFILL |
3738 | 15 | }}, |
3739 | | |
3740 | | /* GVCP_PRIMARY_APPLICATION_IP_ADDRESS */ |
3741 | | |
3742 | 15 | { &hf_gvcp_primary_application_ip_address, |
3743 | 15 | { "Primary Application IP Address", "gvcp.bootstrap.primaryapplicationipaddress", |
3744 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3745 | 15 | NULL, HFILL |
3746 | 15 | }}, |
3747 | | |
3748 | | /* GVCP_MC_DESTINATION_PORT */ |
3749 | | |
3750 | 15 | { &hf_gvcp_network_interface_index, |
3751 | 15 | { "Network Interface Index", "gvcp.bootstrap.mcp.networkinterfaceindex", |
3752 | 15 | FT_UINT32, BASE_DEC, NULL, 0x000F0000, |
3753 | 15 | NULL, HFILL |
3754 | 15 | }}, |
3755 | | |
3756 | 15 | { &hf_gvcp_host_port, |
3757 | 15 | { "Host Port", "gvcp.bootstrap.mcp.hostport", |
3758 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000FFFF, |
3759 | 15 | NULL, HFILL |
3760 | 15 | }}, |
3761 | | |
3762 | | /* GVCP_MC_DESTINATION_ADDRESS */ |
3763 | | |
3764 | 15 | { &hf_gvcp_channel_destination_ip, |
3765 | 15 | { "Destination IP Address", "gvcp.bootstrap.mcda", |
3766 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3767 | 15 | NULL, HFILL |
3768 | 15 | }}, |
3769 | | |
3770 | | /* GVCP_MC_TIMEOUT */ |
3771 | | |
3772 | 15 | { &hf_gvcp_message_channel_transmission_timeout, |
3773 | 15 | { "Transmission Timeout (in ms)", "gvcp.bootstrap.mctt", |
3774 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3775 | 15 | NULL, HFILL |
3776 | 15 | }}, |
3777 | | |
3778 | | /* GVCP_MC_RETRY_COUNT */ |
3779 | | |
3780 | 15 | { &hf_gvcp_message_channel_retry_count, |
3781 | 15 | { "Retry Count", "gvcp.bootstrap.mcrc", |
3782 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3783 | 15 | NULL, HFILL |
3784 | 15 | }}, |
3785 | | |
3786 | | /* GVCP_MC_SOURCE_PORT */ |
3787 | | |
3788 | 15 | { &hf_gvcp_message_channel_source_port, |
3789 | 15 | { "Source Port", "gvcp.bootstrap.mcsp", |
3790 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000FFFF, |
3791 | 15 | NULL, HFILL |
3792 | 15 | }}, |
3793 | | |
3794 | | /* GVCP_MC_CONFIGURATION */ |
3795 | | |
3796 | 15 | { &hf_gvcp_mcec_enabled_v2_2, |
3797 | 15 | { "MCEC Enabled", "gvcp.bootstrap.mcconfig.mcecenabled", |
3798 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3799 | 15 | NULL, HFILL |
3800 | 15 | } }, |
3801 | | |
3802 | | /* GVCP_SC_DESTINATION_PORT(0), 1, 2, 3 */ |
3803 | | |
3804 | 15 | { &hf_gvcp_sc_direction, |
3805 | 15 | { "Direction", "gvcp.bootstrap.scpx.direction", |
3806 | 15 | FT_BOOLEAN, 32, TFS(&directionnames), 0x80000000, |
3807 | 15 | NULL, HFILL |
3808 | 15 | }}, |
3809 | | |
3810 | 15 | { &hf_gvcp_sc_ni_index, |
3811 | 15 | { "Network Interface Index", "gvcp.bootstrap.scpx.networkinterfaceindex", |
3812 | 15 | FT_UINT32, BASE_DEC, NULL, 0x000F0000, |
3813 | 15 | NULL, HFILL |
3814 | 15 | }}, |
3815 | | |
3816 | 15 | { &hf_gvcp_sc_host_port, |
3817 | 15 | { "Host Port", "gvcp.bootstrap.scpx.hostport", |
3818 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000FFFF, |
3819 | 15 | NULL, HFILL |
3820 | 15 | }}, |
3821 | | |
3822 | | /* GVCP_SC_PACKET_SIZE(0), 1, 2, 3 */ |
3823 | | |
3824 | 15 | { &hf_gvcp_sc_fire_test_packet, |
3825 | 15 | { "Fire Test Packet", "gvcp.bootstrap.scpsx.firetestpacket", |
3826 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3827 | 15 | NULL, HFILL |
3828 | 15 | }}, |
3829 | | |
3830 | 15 | { &hf_gvcp_sc_do_not_fragment, |
3831 | 15 | { "Do Not Fragment", "gvcp.bootstrap.scpsx.donotfragment", |
3832 | 15 | FT_BOOLEAN, 32, NULL, 0x40000000, |
3833 | 15 | NULL, HFILL |
3834 | 15 | }}, |
3835 | | |
3836 | 15 | { &hf_gvcp_sc_pixel_endianness, |
3837 | 15 | { "Pixel Endianness", "gvcp.bootstrap.scpsx.pixelendianness", |
3838 | 15 | FT_BOOLEAN, 32, NULL, 0x20000000, |
3839 | 15 | NULL, HFILL |
3840 | 15 | }}, |
3841 | | |
3842 | 15 | { &hf_gvcp_sc_packet_size, |
3843 | 15 | { "Packet Size", "gvcp.bootstrap.scpsx.packetsize", |
3844 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000FFFF, |
3845 | 15 | NULL, HFILL |
3846 | 15 | }}, |
3847 | | |
3848 | | /* GVCP_SC_PACKET_DELAY(0), 1, 2, 3 */ |
3849 | | |
3850 | 15 | { &hf_gvcp_sc_packet_delay, |
3851 | 15 | { "Packet Delay", "gvcp.bootstrap.scpdx", |
3852 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
3853 | 15 | NULL, HFILL |
3854 | 15 | }}, |
3855 | | |
3856 | | /* GVCP_SC_DESTINATION_ADDRESS(0), 1, 2, 3 */ |
3857 | | |
3858 | 15 | { &hf_gvcp_sc_destination_ip, |
3859 | 15 | { "Destination Address", "gvcp.bootstrap.scdax", |
3860 | 15 | FT_IPv4, BASE_NONE, NULL, 0x0, |
3861 | 15 | NULL, HFILL |
3862 | 15 | }}, |
3863 | | |
3864 | | /* GVCP_SC_SOURCE_PORT(0), 1, 2, 3 */ |
3865 | | |
3866 | 15 | { &hf_gvcp_sc_source_port, |
3867 | 15 | { "Source Port", "gvcp.bootstrap.scspx", |
3868 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000FFFF, |
3869 | 15 | NULL, HFILL |
3870 | 15 | }}, |
3871 | | |
3872 | | /* GVCP_SC_CAPABILITY(0), 1, 2, 3 */ |
3873 | | |
3874 | 15 | { &hf_gvcp_sc_big_little_endian_supported, |
3875 | 15 | { "Big/Little Endian Supported", "gvcp.bootstrap.sccx.biglittleendiansupported", |
3876 | 15 | FT_BOOLEAN, 32, NULL, 0x80000000, |
3877 | 15 | NULL, HFILL |
3878 | 15 | }}, |
3879 | | |
3880 | 15 | { &hf_gvcp_sc_ip_reassembly_supported, |
3881 | 15 | { "IP Reassembly Supported", "gvcp.bootstrap.sccx.ipreassemblysupported", |
3882 | 15 | FT_BOOLEAN, 32, NULL, 0x40000000, |
3883 | 15 | NULL, HFILL |
3884 | 15 | }}, |
3885 | | |
3886 | 15 | { &hf_gvcp_sc_scmpcx_supported_v2_2, |
3887 | 15 | { "Stream Channel Maximum Packet Count Supported", "gvcp.bootstrap.sccx.scmpcxsupported", |
3888 | 15 | FT_BOOLEAN, 32, NULL, 0x00000100, |
3889 | 15 | NULL, HFILL |
3890 | 15 | } }, |
3891 | | |
3892 | 15 | { &hf_gvcp_sc_gendc_supported_v2_2, |
3893 | 15 | { "GenDC Supported", "gvcp.bootstrap.sccx.gendcsupported", |
3894 | 15 | FT_BOOLEAN, 32, NULL, 0x00000080, |
3895 | 15 | NULL, HFILL |
3896 | 15 | } }, |
3897 | | |
3898 | 15 | { &hf_gvcp_sc_multi_part_supported_v2_1, |
3899 | 15 | { "Multi-part Supported", "gvcp.bootstrap.sccx.multipartsupported", |
3900 | 15 | FT_BOOLEAN, 32, NULL, 0x00000040, |
3901 | 15 | NULL, HFILL |
3902 | 15 | }}, |
3903 | | |
3904 | 15 | { &hf_gvcp_sc_large_leader_trailer_supported_v2_1, |
3905 | 15 | { "Large Leader/Trailer Supported", "gvcp.bootstrap.sccx.largeleadertrailersupported", |
3906 | 15 | FT_BOOLEAN, 32, NULL, 0x00000020, |
3907 | 15 | NULL, HFILL |
3908 | 15 | }}, |
3909 | | |
3910 | 15 | { &hf_gvcp_sc_multizone_supported_v2_0, |
3911 | 15 | { "Multi-zone Supported", "gvcp.bootstrap.sccx.multizonesupported", |
3912 | 15 | FT_BOOLEAN, 32, NULL, 0x00000010, |
3913 | 15 | NULL, HFILL |
3914 | 15 | }}, |
3915 | | |
3916 | 15 | { &hf_gvcp_sc_packet_resend_destination_option_supported_v2_0, |
3917 | 15 | { "Resend Destination Option Supported", "gvcp.bootstrap.sccx.resenddestinationoptionsupported", |
3918 | 15 | FT_BOOLEAN, 32, NULL, 0x00000008, |
3919 | 15 | NULL, HFILL |
3920 | 15 | }}, |
3921 | | |
3922 | 15 | { &hf_gvcp_sc_packet_resend_all_in_transmission_supported_v2_0, |
3923 | 15 | { "All In Transmission Supported", "gvcp.bootstrap.sccx.allintransmissionsupported", |
3924 | 15 | FT_BOOLEAN, 32, NULL, 0x00000004, |
3925 | 15 | NULL, HFILL |
3926 | 15 | }}, |
3927 | | |
3928 | 15 | { &hf_gvcp_sc_unconditional_streaming_supported, |
3929 | 15 | { "Unconditional Streaming Supported", "gvcp.bootstrap.sccx.unconditionalstreamingsupported", |
3930 | 15 | FT_BOOLEAN, 32, NULL, 0x00000002, |
3931 | 15 | NULL, HFILL |
3932 | 15 | }}, |
3933 | | |
3934 | 15 | { &hf_gvcp_sc_extended_chunk_data_supported, |
3935 | 15 | { "Extended Chunk Data Supported", "gvcp.bootstrap.sccx.extendedchunkdatasupported", |
3936 | 15 | FT_BOOLEAN, 32, NULL, 0x00000001, |
3937 | 15 | NULL, HFILL |
3938 | 15 | }}, |
3939 | | |
3940 | | /* GVCP_SC_CONFIGURATION(0), 1, 2, 3 */ |
3941 | | |
3942 | 15 | { &hf_gvcp_sc_gendc_enabled_v2_2, |
3943 | 15 | { "GenDC Enabled", "gvcp.bootstrap.sccfgx.gendcenabled", |
3944 | 15 | FT_BOOLEAN, 32, NULL, 0x00000080, |
3945 | 15 | NULL, HFILL |
3946 | 15 | } }, |
3947 | | |
3948 | 15 | { &hf_gvcp_sc_multi_part_enabled_v2_1, |
3949 | 15 | { "Multi-part Enabled", "gvcp.bootstrap.sccfgx.multipartenabled", |
3950 | 15 | FT_BOOLEAN, 32, NULL, 0x00000040, |
3951 | 15 | NULL, HFILL |
3952 | 15 | }}, |
3953 | | |
3954 | 15 | { &hf_gvcp_sc_large_leader_trailer_enabled_v2_1, |
3955 | 15 | { "Large Leader/Trailer Enabled", "gvcp.bootstrap.sccfgx.largeleadertrailerenabled", |
3956 | 15 | FT_BOOLEAN, 32, NULL, 0x00000020, |
3957 | 15 | NULL, HFILL |
3958 | 15 | }}, |
3959 | | |
3960 | 15 | { &hf_gvcp_sc_packet_resend_destination_option_enabled_v2_0, |
3961 | 15 | { "Resend Destination Option Enabled", "gvcp.bootstrap.sccfgx.resenddestinationoptionenabled", |
3962 | 15 | FT_BOOLEAN, 32, NULL, 0x00000008, |
3963 | 15 | NULL, HFILL |
3964 | 15 | }}, |
3965 | | |
3966 | 15 | { &hf_gvcp_sc_packet_resend_all_in_transmission_enabled_v2_0, |
3967 | 15 | { "All In Transmission Enabled", "gvcp.bootstrap.sccfgx.allintransmissionenabled", |
3968 | 15 | FT_BOOLEAN, 32, NULL, 0x00000004, |
3969 | 15 | NULL, HFILL |
3970 | 15 | }}, |
3971 | | |
3972 | 15 | { &hf_gvcp_sc_unconditional_streaming_enabled, |
3973 | 15 | { "Unconditional Streaming Enabled", "gvcp.bootstrap.sccfgx.unconditionalstreamingenabled", |
3974 | 15 | FT_BOOLEAN, 32, NULL, 0x00000002, |
3975 | 15 | NULL, HFILL |
3976 | 15 | }}, |
3977 | | |
3978 | 15 | { &hf_gvcp_sc_extended_chunk_data_enabled, |
3979 | 15 | { "Extended Chunk Data Enabled", "gvcp.bootstrap.sccfgx.extendedchunkdataenabled", |
3980 | 15 | FT_BOOLEAN, 32, NULL, 0x00000001, |
3981 | 15 | NULL, HFILL |
3982 | 15 | }}, |
3983 | | |
3984 | | /* GVCP_SC_ZONE(0), 1, 2, 3 */ |
3985 | | |
3986 | 15 | { &hf_gvcp_sc_additional_zones_v2_0, |
3987 | 15 | { "Additional Zones", "gvcp.bootstrap.sczx.additionalzones", |
3988 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0000000F, |
3989 | 15 | NULL, HFILL |
3990 | 15 | }}, |
3991 | | |
3992 | | /* GVCP_SC_ZONE_DIRECTION(0), 1, 2, 3 */ |
3993 | | |
3994 | 15 | { &hf_gvcp_sc_zone0_direction_v2_0, |
3995 | 15 | { "Zone 0 Direction", "gvcp.bootstrap.sczdx.zone0direction", |
3996 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x80000000, |
3997 | 15 | NULL, HFILL |
3998 | 15 | }}, |
3999 | | |
4000 | 15 | { &hf_gvcp_sc_zone1_direction_v2_0, |
4001 | 15 | { "Zone 1 Direction", "gvcp.bootstrap.sczdx.zone1direction", |
4002 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x40000000, |
4003 | 15 | NULL, HFILL |
4004 | 15 | }}, |
4005 | | |
4006 | 15 | { &hf_gvcp_sc_zone2_direction_v2_0, |
4007 | 15 | { "Zone 2 Direction", "gvcp.bootstrap.sczdx.zone2direction", |
4008 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x20000000, |
4009 | 15 | NULL, HFILL |
4010 | 15 | }}, |
4011 | | |
4012 | 15 | { &hf_gvcp_sc_zone3_direction_v2_0, |
4013 | 15 | { "Zone 3 Direction", "gvcp.bootstrap.sczdx.zone3direction", |
4014 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x10000000, |
4015 | 15 | NULL, HFILL |
4016 | 15 | }}, |
4017 | | |
4018 | 15 | { &hf_gvcp_sc_zone4_direction_v2_0, |
4019 | 15 | { "Zone 4 Direction", "gvcp.bootstrap.sczdx.zone4direction", |
4020 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x08000000, |
4021 | 15 | NULL, HFILL |
4022 | 15 | }}, |
4023 | | |
4024 | 15 | { &hf_gvcp_sc_zone5_direction_v2_0, |
4025 | 15 | { "Zone 5 Direction", "gvcp.bootstrap.sczdx.zone5direction", |
4026 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x04000000, |
4027 | 15 | NULL, HFILL |
4028 | 15 | }}, |
4029 | | |
4030 | 15 | { &hf_gvcp_sc_zone6_direction_v2_0, |
4031 | 15 | { "Zone 6 Direction", "gvcp.bootstrap.sczdx.zone6direction", |
4032 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x02000000, |
4033 | 15 | NULL, HFILL |
4034 | 15 | }}, |
4035 | | |
4036 | 15 | { &hf_gvcp_sc_zone7_direction_v2_0, |
4037 | 15 | { "Zone 7 Direction", "gvcp.bootstrap.sczdx.zone7direction", |
4038 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x01000000, |
4039 | 15 | NULL, HFILL |
4040 | 15 | }}, |
4041 | | |
4042 | 15 | { &hf_gvcp_sc_zone8_direction_v2_0, |
4043 | 15 | { "Zone 8 Direction", "gvcp.bootstrap.sczdx.zone8direction", |
4044 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00800000, |
4045 | 15 | NULL, HFILL |
4046 | 15 | }}, |
4047 | | |
4048 | 15 | { &hf_gvcp_sc_zone9_direction_v2_0, |
4049 | 15 | { "Zone 9 Direction", "gvcp.bootstrap.sczdx.zone9direction", |
4050 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00400000, |
4051 | 15 | NULL, HFILL |
4052 | 15 | }}, |
4053 | | |
4054 | 15 | { &hf_gvcp_sc_zone10_direction_v2_0, |
4055 | 15 | { "Zone 10 Direction", "gvcp.bootstrap.sczdx.zone10direction", |
4056 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00200000, |
4057 | 15 | NULL, HFILL |
4058 | 15 | }}, |
4059 | | |
4060 | 15 | { &hf_gvcp_sc_zone11_direction_v2_0, |
4061 | 15 | { "Zone 11 Direction", "gvcp.bootstrap.sczdx.zone11direction", |
4062 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00100000, |
4063 | 15 | NULL, HFILL |
4064 | 15 | }}, |
4065 | | |
4066 | 15 | { &hf_gvcp_sc_zone12_direction_v2_0, |
4067 | 15 | { "Zone 12 Direction", "gvcp.bootstrap.sczdx.zone12direction", |
4068 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00080000, |
4069 | 15 | NULL, HFILL |
4070 | 15 | }}, |
4071 | | |
4072 | 15 | { &hf_gvcp_sc_zone13_direction_v2_0, |
4073 | 15 | { "Zone 13 Direction", "gvcp.bootstrap.sczdx.zone13direction", |
4074 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00040000, |
4075 | 15 | NULL, HFILL |
4076 | 15 | }}, |
4077 | | |
4078 | 15 | { &hf_gvcp_sc_zone14_direction_v2_0, |
4079 | 15 | { "Zone 14 Direction", "gvcp.bootstrap.sczdx.zone14direction", |
4080 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00020000, |
4081 | 15 | NULL, HFILL |
4082 | 15 | }}, |
4083 | | |
4084 | 15 | { &hf_gvcp_sc_zone15_direction_v2_0, |
4085 | 15 | { "Zone 15 Direction", "gvcp.bootstrap.sczdx.zone15direction", |
4086 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00010000, |
4087 | 15 | NULL, HFILL |
4088 | 15 | }}, |
4089 | | |
4090 | 15 | { &hf_gvcp_sc_zone16_direction_v2_0, |
4091 | 15 | { "Zone 16 Direction", "gvcp.bootstrap.sczdx.zone16direction", |
4092 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00008000, |
4093 | 15 | NULL, HFILL |
4094 | 15 | }}, |
4095 | | |
4096 | 15 | { &hf_gvcp_sc_zone17_direction_v2_0, |
4097 | 15 | { "Zone 17 Direction", "gvcp.bootstrap.sczdx.zone17direction", |
4098 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00004000, |
4099 | 15 | NULL, HFILL |
4100 | 15 | }}, |
4101 | | |
4102 | 15 | { &hf_gvcp_sc_zone18_direction_v2_0, |
4103 | 15 | { "Zone 18 Direction", "gvcp.bootstrap.sczdx.zone18direction", |
4104 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00002000, |
4105 | 15 | NULL, HFILL |
4106 | 15 | }}, |
4107 | | |
4108 | 15 | { &hf_gvcp_sc_zone19_direction_v2_0, |
4109 | 15 | { "Zone 19 Direction", "gvcp.bootstrap.sczdx.zone19direction", |
4110 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00001000, |
4111 | 15 | NULL, HFILL |
4112 | 15 | }}, |
4113 | | |
4114 | 15 | { &hf_gvcp_sc_zone20_direction_v2_0, |
4115 | 15 | { "Zone 20 Direction", "gvcp.bootstrap.sczdx.zone20direction", |
4116 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000800, |
4117 | 15 | NULL, HFILL |
4118 | 15 | }}, |
4119 | | |
4120 | 15 | { &hf_gvcp_sc_zone21_direction_v2_0, |
4121 | 15 | { "Zone 21 Direction", "gvcp.bootstrap.sczdx.zone21direction", |
4122 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000400, |
4123 | 15 | NULL, HFILL |
4124 | 15 | }}, |
4125 | | |
4126 | 15 | { &hf_gvcp_sc_zone22_direction_v2_0, |
4127 | 15 | { "Zone 22 Direction", "gvcp.bootstrap.sczdx.zone22direction", |
4128 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000200, |
4129 | 15 | NULL, HFILL |
4130 | 15 | }}, |
4131 | | |
4132 | 15 | { &hf_gvcp_sc_zone23_direction_v2_0, |
4133 | 15 | { "Zone 23 Direction", "gvcp.bootstrap.sczdx.zone23direction", |
4134 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000100, |
4135 | 15 | NULL, HFILL |
4136 | 15 | }}, |
4137 | | |
4138 | 15 | { &hf_gvcp_sc_zone24_direction_v2_0, |
4139 | 15 | { "Zone 24 Direction", "gvcp.bootstrap.sczdx.zone24direction", |
4140 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000080, |
4141 | 15 | NULL, HFILL |
4142 | 15 | }}, |
4143 | | |
4144 | 15 | { &hf_gvcp_sc_zone25_direction_v2_0, |
4145 | 15 | { "Zone 25 Direction", "gvcp.bootstrap.sczdx.zone25direction", |
4146 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000040, |
4147 | 15 | NULL, HFILL |
4148 | 15 | }}, |
4149 | | |
4150 | 15 | { &hf_gvcp_sc_zone26_direction_v2_0, |
4151 | 15 | { "Zone 26 Direction", "gvcp.bootstrap.sczdx.zone26direction", |
4152 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000020, |
4153 | 15 | NULL, HFILL |
4154 | 15 | }}, |
4155 | | |
4156 | 15 | { &hf_gvcp_sc_zone27_direction_v2_0, |
4157 | 15 | { "Zone 27 Direction", "gvcp.bootstrap.sczdx.zone27direction", |
4158 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000010, |
4159 | 15 | NULL, HFILL |
4160 | 15 | }}, |
4161 | | |
4162 | 15 | { &hf_gvcp_sc_zone28_direction_v2_0, |
4163 | 15 | { "Zone 28 Direction", "gvcp.bootstrap.sczdx.zone28direction", |
4164 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000008, |
4165 | 15 | NULL, HFILL |
4166 | 15 | }}, |
4167 | | |
4168 | 15 | { &hf_gvcp_sc_zone29_direction_v2_0, |
4169 | 15 | { "Zone 29 Direction", "gvcp.bootstrap.sczdx.zone29direction", |
4170 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000004, |
4171 | 15 | NULL, HFILL |
4172 | 15 | }}, |
4173 | | |
4174 | 15 | { &hf_gvcp_sc_zone30_direction_v2_0, |
4175 | 15 | { "Zone 30 Direction", "gvcp.bootstrap.sczdx.zone30direction", |
4176 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000002, |
4177 | 15 | NULL, HFILL |
4178 | 15 | }}, |
4179 | | |
4180 | 15 | { &hf_gvcp_sc_zone31_direction_v2_0, |
4181 | 15 | { "Zone 31 Direction", "gvcp.bootstrap.sczdx.zone31direction", |
4182 | 15 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000001, |
4183 | 15 | NULL, HFILL |
4184 | 15 | }}, |
4185 | | |
4186 | | /* GVCP_SC_MAX_PACKET_COUNT(0), 1, 2, 3 */ |
4187 | | |
4188 | 15 | { &hf_gvcp_sc_max_packet_count_v2_2, |
4189 | 15 | { "Max. Packet Count", "gvcp.bootstrap.scmpcx.maxpacketcount", |
4190 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
4191 | 15 | NULL, HFILL |
4192 | 15 | } }, |
4193 | | |
4194 | | /* GVCP_SC_MAX_BLOCK_SIZE_HIGH(0), 1, 2, 3 */ |
4195 | | |
4196 | 15 | { &hf_gvcp_sc_max_block_size_high_v2_2, |
4197 | 15 | { "Max. Block Size (High)", "gvcp.bootstrap.maxblocksizehigh", |
4198 | 15 | FT_UINT32, BASE_DEC_HEX, NULL, 0x0, |
4199 | 15 | NULL, HFILL |
4200 | 15 | } }, |
4201 | | |
4202 | | /* GVCP_SC_MAX_BLOCK_SIZE_LOW(0), 1, 2, 3 */ |
4203 | | |
4204 | 15 | { &hf_gvcp_sc_max_block_size_low_v2_2, |
4205 | 15 | { "Max. Payload Size (Low)", "gvcp.bootstrap.maxblocksizelow", |
4206 | 15 | FT_UINT32, BASE_DEC_HEX, NULL, 0x0, |
4207 | 15 | NULL, HFILL |
4208 | 15 | } }, |
4209 | | |
4210 | | /* GVCP_SC_EXTENDED_BOOTSTRAP_ADDRESS(0), 1, 2, 3 */ |
4211 | | |
4212 | 15 | { &hf_gvcp_sc_extended_registers_address_v2_2, |
4213 | 15 | { "Stream Channel Extended Bootstrap Address", "gvcp.bootstrap.extendedbootstrapaddress", |
4214 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
4215 | 15 | NULL, HFILL |
4216 | 15 | } }, |
4217 | | |
4218 | | /* GVCP_SC_GENDC_DESCRIPTOR_ADDRESS(0), 1, 2, 3 */ |
4219 | | |
4220 | 15 | { &hf_gvcp_sc_gendc_descriptor_address_v2_2, |
4221 | 15 | { "Stream Channel GenDC Descriptor Address", "gvcp.bootstrap.gendc.descriptoraddress", |
4222 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
4223 | 15 | NULL, HFILL |
4224 | 15 | } }, |
4225 | | |
4226 | | /* GVCP_SC_GENDC_DESCRIPTOR_SIZE(0), 1, 2, 3 */ |
4227 | | |
4228 | 15 | { &hf_gvcp_sc_gendc_descriptor_size_v2_2, |
4229 | 15 | { "Stream Channel GenDC Descriptor Size", "gvcp.bootstrap.gedc.descriptorsize", |
4230 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
4231 | 15 | NULL, HFILL |
4232 | 15 | } }, |
4233 | | |
4234 | | /* GVCP_SC_GENDC_FLOW_MAPPING_TABLE_ADDRESS(0), 1, 2, 3 */ |
4235 | | |
4236 | 15 | { &hf_gvcp_sc_gendc_flow_mapping_table_address_v2_2, |
4237 | 15 | { "Stream Channel GenDC Flow Mapping Table Address", "gvcp.bootstrap.gendc.flowmappingtableaddress", |
4238 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
4239 | 15 | NULL, HFILL |
4240 | 15 | } }, |
4241 | | |
4242 | | /* GVCP_SC_GENDC_FLOW_MAPPING_TABLE_SIZE(0), 1, 2, 3 */ |
4243 | | |
4244 | 15 | { &hf_gvcp_sc_gendc_flow_mapping_table_size_v2_2, |
4245 | 15 | { "Stream Channel GenDC Flow Mapping Table Size", "gvcp.bootstrap.gendc.flowmappingtablesize", |
4246 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
4247 | 15 | NULL, HFILL |
4248 | 15 | } }, |
4249 | | |
4250 | | /* GVCP_ACTION_GROUP_KEY(0), 1, 2, 3, 4, 5, 6, 7, 8, 9 */ |
4251 | | |
4252 | 15 | { &hf_gvcp_action_group_key, |
4253 | 15 | { "Action Group Key", "gvcp.bootstrap.actiongroupkey", |
4254 | 15 | FT_UINT32, BASE_DEC, NULL, 0x0, |
4255 | 15 | NULL, HFILL |
4256 | 15 | }}, |
4257 | | |
4258 | | /* GVCP_ACTION_GROUP_MASK(0), 1, 2, 3, 4, 5, 6, 7, 8, 9 */ |
4259 | | |
4260 | 15 | { &hf_gvcp_action_group_mask, |
4261 | 15 | { "Action Group Mask", "gvcp.bootstrap.actiongroupmask", |
4262 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
4263 | 15 | NULL, HFILL |
4264 | 15 | }}, |
4265 | | /* |
4266 | | { &hf_gvcp_latency, |
4267 | | { "Latency Value (in us)", "gvcp.bootstrap.latency", |
4268 | | FT_UINT32, BASE_DEC, NULL, 0x0, |
4269 | | NULL, HFILL |
4270 | | }}, |
4271 | | */ |
4272 | 15 | { &hf_gvcp_custom_register_addr, |
4273 | 15 | { "Custom Register Address", "gvcp.bootstrap.custom.register.write", |
4274 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
4275 | 15 | NULL, HFILL |
4276 | 15 | }}, |
4277 | | |
4278 | 15 | { &hf_gvcp_custom_memory_addr, |
4279 | 15 | { "Custom Memory Address", "gvcp.bootstrap.custom.memory.write", |
4280 | 15 | FT_UINT32, BASE_HEX, NULL, 0x0, |
4281 | 15 | NULL, HFILL |
4282 | 15 | }}, |
4283 | | |
4284 | | /* Request/Response tracking */ |
4285 | 15 | { &hf_gvcp_response_in, |
4286 | 15 | { "Response In", "gvcp.response_in", |
4287 | 15 | FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0, |
4288 | 15 | "The response to this GVCP request is in this frame", HFILL |
4289 | 15 | }}, |
4290 | | |
4291 | 15 | { &hf_gvcp_response_to, |
4292 | 15 | { "Request In", "gvcp.response_to", |
4293 | 15 | FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0x0, |
4294 | 15 | "This is a response to the GVCP request in this frame", HFILL |
4295 | 15 | }}, |
4296 | | |
4297 | | /* Generated from convert_proto_tree_add_text.pl */ |
4298 | 15 | { &hf_gvcp_reserved_bit, { "Reserved Bit", "gvcp.reserved_bit", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, |
4299 | 15 | { &hf_gvcp_manifest_table, { "Manifest Table", "gvcp.manifest_table", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, |
4300 | 15 | { &hf_gvcp_custom_register_value, { "Value", "gvcp.bootstrap.custom.register.value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }}, |
4301 | 15 | { &hf_gvcp_custom_read_register_addr, { "Custom Register Address", "gvcp.bootstrap.custom.register.read", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }}, |
4302 | 15 | { &hf_gvcp_custom_read_register_value, { "Custom Register Value", "gvcp.bootstrap.custom.register.read_value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }}, |
4303 | 15 | { &hf_gvcp_readmemcmd_data_read, { "Data read", "gvcp.cmd.readmem.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, |
4304 | 15 | }; |
4305 | | |
4306 | 15 | static int *ett[] = { |
4307 | 15 | &ett_gvcp, |
4308 | 15 | &ett_gvcp_cmd, |
4309 | 15 | &ett_gvcp_flags, |
4310 | 15 | &ett_gvcp_ack, |
4311 | 15 | &ett_gvcp_payload_cmd, |
4312 | 15 | &ett_gvcp_payload_ack, |
4313 | 15 | &ett_gvcp_payload_ack_subtree, |
4314 | 15 | &ett_gvcp_payload_cmd_subtree, |
4315 | 15 | &ett_gvcp_bootstrap_fields |
4316 | 15 | }; |
4317 | | |
4318 | 15 | proto_gvcp = proto_register_protocol("GigE Vision Control Protocol", "GVCP", "gvcp"); |
4319 | | |
4320 | 15 | gvcp_handle = register_dissector("gvcp", dissect_gvcp, proto_gvcp); |
4321 | | |
4322 | 15 | proto_register_field_array(proto_gvcp, hf, array_length(hf)); |
4323 | 15 | proto_register_subtree_array(ett, array_length(ett)); |
4324 | 15 | } |
4325 | | |
4326 | | /* The registration hand-off routing */ |
4327 | | |
4328 | | void proto_reg_handoff_gvcp(void) |
4329 | 15 | { |
4330 | 15 | dissector_add_uint("udp.port", global_gvcp_port, gvcp_handle); |
4331 | 15 | gvsp_handle = find_dissector("gvsp"); |
4332 | 15 | } |
4333 | | |
4334 | | /* |
4335 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
4336 | | * |
4337 | | * Local variables: |
4338 | | * c-basic-offset: 8 |
4339 | | * tab-width: 8 |
4340 | | * indent-tabs-mode: t |
4341 | | * End: |
4342 | | * |
4343 | | * vi: set shiftwidth=8 tabstop=8 noexpandtab: |
4344 | | * :indentSize=8:tabSize=8:noTabs=false: |
4345 | | */ |