Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-u3v.c
blobe0a0bf0904c85a603e8d345ebfef31b1c66b6834
1 /* packet-u3v.c
2 * Routines for AIA USB3 Vision (TM) Protocol dissection
3 * Copyright 2016, AIA (www.visiononline.org)
5 * USB3 Vision (TM): USB3 Vision a standard developed under the sponsorship of
6 * the AIA for the benefit of the machine vision industry.
7 * U3V stands for USB3 Vision (TM) Protocol.
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
16 #include "config.h"
18 #include <epan/packet.h>
19 #include <epan/proto_data.h>
20 #include "packet-usb.h"
23 U3V descriptor constants
25 #define DESCRIPTOR_TYPE_U3V_INTERFACE 0x24
26 #define DESCRIPTOR_SUBTYPE_U3V_DEVICE_INFO 0x01
29 Bootstrap registers addresses
31 #define U3V_ABRM_GENCP_VERSION 0x00000000
32 #define U3V_ABRM_MANUFACTURER_NAME 0x00000004
33 #define U3V_ABRM_MODEL_NAME 0x00000044
34 #define U3V_ABRM_FAMILY_NAME 0x00000084
35 #define U3V_ABRM_DEVICE_VERSION 0x000000C4
36 #define U3V_ABRM_MANUFACTURER_INFO 0x00000104
37 #define U3V_ABRM_SERIAL_NUMBER 0x00000144
38 #define U3V_ABRM_USER_DEFINED_NAME 0x00000184
39 #define U3V_ABRM_DEVICE_CAPABILITY 0x000001C4
40 #define U3V_ABRM_MAXIMUM_DEVICE_RESPONSE_TIME 0x000001CC
41 #define U3V_ABRM_MANIFEST_TABLE_ADDRESS 0x000001D0
42 #define U3V_ABRM_SBRM_ADDRESS 0x000001D8
43 #define U3V_ABRM_DEVICE_CONFIGURATION 0x000001E0
44 #define U3V_ABRM_HEARTBEAT_TIMEOUT 0x000001E8
45 #define U3V_ABRM_MESSAGE_CHANNEL_CHANNEL_ID 0x000001EC
46 #define U3V_ABRM_TIMESTAMP 0x000001F0
47 #define U3V_ABRM_TIMESTAMP_LATCH 0x000001F8
48 #define U3V_ABRM_TIMESTAMP_INCREMENT 0x000001FC
49 #define U3V_ABRM_ACCESS_PRIVILEGE 0x00000204
50 #define U3V_ABRM_PROTOCOL_ENDIANNESS 0x00000208
51 #define U3V_ABRM_IMPLEMENTATION_ENDIANNESS 0x0000020C
52 #define U3V_SBRM_U3V_VERSION 0x00000000
53 #define U3V_SBRM_U3VCP_CAPABILITY_REGISTER 0x00000004
54 #define U3V_SBRM_U3VCP_CONFIGURATION_REGISTER 0x0000000C
55 #define U3V_SBRM_MAXIMUM_COMMAND_TRANSFER_LENGTH 0x00000014
56 #define U3V_SBRM_MAXIMUM_ACKNOWLEDGE_TRANSFER_LENGTH 0x00000018
57 #define U3V_SBRM_NUMBER_OF_STREAM_CHANNELS 0x0000001C
58 #define U3V_SBRM_SIRM_ADDRESS 0x00000020
59 #define U3V_SBRM_SIRM_LENGTH 0x00000028
60 #define U3V_SBRM_EIRM_ADDRESS 0x0000002C
61 #define U3V_SBRM_EIRM_LENGTH 0x00000034
62 #define U3V_SBRM_IIDC2_ADDRESS 0x00000038
63 #define U3V_SBRM_CURRENT_SPEED 0x00000040
64 #define U3V_SIRM_SI_INFO 0x00000000
65 #define U3V_SIRM_SI_CONTROL 0x00000004
66 #define U3V_SIRM_SI_REQUIRED_PAYLOAD_SIZE 0x00000008
67 #define U3V_SIRM_SI_REQUIRED_LEADER_SIZE 0x00000010
68 #define U3V_SIRM_SI_REQUIRED_TRAILER_SIZE 0x00000014
69 #define U3V_SIRM_SI_MAXIMUM_LEADER_SIZE 0x00000018
70 #define U3V_SIRM_SI_PAYLOAD_TRANSFER_SIZE 0x0000001C
71 #define U3V_SIRM_SI_PAYLOAD_TRANSFER_COUNT 0x00000020
72 #define U3V_SIRM_SI_PAYLOAD_FINAL_TRANSFER1_SIZE 0x00000024
73 #define U3V_SIRM_SI_PAYLOAD_FINAL_TRANSFER2_SIZE 0x00000028
74 #define U3V_SIRM_SI_MAXIMUM_TRAILER_SIZE 0x0000002C
75 #define U3V_EIRM_EI_CONTROL 0x00000000
76 #define U3V_EIRM_MAXIMUM_EVENT_TRANSFER_LENGTH 0x00000004
77 #define U3V_EIRM_EVENT_TEST_CONTROL 0x00000008
80 Command and acknowledge IDs
82 #define U3V_READMEM_CMD 0x0800
83 #define U3V_READMEM_ACK 0x0801
84 #define U3V_WRITEMEM_CMD 0x0802
85 #define U3V_WRITEMEM_ACK 0x0803
86 #define U3V_PENDING_ACK 0x0805
87 #define U3V_EVENT_CMD 0x0C00
88 #define U3V_EVENT_ACK 0x0C01
91 Status codes
93 #define U3V_STATUS_GENCP_SUCCESS 0x0000
94 #define U3V_STATUS_GENCP_NOT_IMPLEMENTED 0x8001
95 #define U3V_STATUS_GENCP_INVALID_PARAMETER 0x8002
96 #define U3V_STATUS_GENCP_INVALID_ADDRESS 0x8003
97 #define U3V_STATUS_GENCP_WRITE_PROTECT 0x8004
98 #define U3V_STATUS_GENCP_BAD_ALIGNMENT 0x8005
99 #define U3V_STATUS_GENCP_ACCESS_DENIED 0x8006
100 #define U3V_STATUS_GENCP_BUSY 0x8007
101 /* 0x8008 - 0x800A have been used in GEV 1.x but are now deprecated. The GenCP specification did NOT recycle these values! */
102 #define U3V_STATUS_GENCP_MSG_TIMEOUT 0x800B
103 /* 0x800C - 0x800D are used in GEV only. The GenCP specification did NOT recycle these values! */
104 #define U3V_STATUS_GENCP_INVALID_HEADER 0x800E
105 #define U3V_STATUS_GENCP_WRONG_CONFIG 0x800F
107 #define U3V_STATUS_GENCP_ERROR 0x8FFF
109 #define U3V_STATUS_RESEND_NOT_SUPPORTED 0xA001
110 #define U3V_STATUS_DSI_ENDPOINT_HALTED 0xA002
111 #define U3V_STATUS_SI_PAYLOAD_SIZE_NOT_ALIGNED 0xA003
112 #define U3V_STATUS_SI_REGISTERS_INCONSISTENT 0xA004
113 #define U3V_STATUS_DATA_DISCARDED 0xA100
114 #define U3V_STATUS_DATA_OVERRUN 0xA101
117 Prefix
119 #define U3V_CONTROL_PREFIX 0x43563355
120 #define U3V_EVENT_PREFIX 0x45563355
122 #define U3V_STREAM_LEADER_PREFIX 0x4C563355
123 #define U3V_STREAM_TRAILER_PREFIX 0x54563355
126 Event IDs
128 #define U3V_EVENT_TESTEVENT 0x4FFF
131 * Pixel Format IDs
133 #define PFNC_U3V_MONO1P 0x01010037
134 #define PFNC_U3V_MONO2P 0x01020038
135 #define PFNC_U3V_MONO4P 0x01040039
136 #define PFNC_U3V_MONO8 0x01080001
137 #define PFNC_U3V_MONO8S 0x01080002
138 #define PFNC_U3V_MONO10 0x01100003
139 #define PFNC_U3V_MONO10P 0x010A0046
140 #define PFNC_U3V_MONO12 0x01100005
141 #define PFNC_U3V_MONO12P 0x010C0047
142 #define PFNC_U3V_MONO14 0x01100025
143 #define PFNC_U3V_MONO14P 0x010E0104
144 #define PFNC_U3V_MONO16 0x01100007
145 #define PFNC_U3V_MONO32 0x01200111
146 #define PFNC_U3V_BAYERBG4P 0x01040110
147 #define PFNC_U3V_BAYERBG8 0x0108000B
148 #define PFNC_U3V_BAYERBG10 0x0110000F
149 #define PFNC_U3V_BAYERBG10P 0x010A0052
150 #define PFNC_U3V_BAYERBG12 0x01100013
151 #define PFNC_U3V_BAYERBG12P 0x010C0053
152 #define PFNC_U3V_BAYERBG14 0x0110010C
153 #define PFNC_U3V_BAYERBG14P 0x010E0108
154 #define PFNC_U3V_BAYERBG16 0x01100031
155 #define PFNC_U3V_BAYERGB4P 0x0104010F
156 #define PFNC_U3V_BAYERGB8 0x0108000A
157 #define PFNC_U3V_BAYERGB10 0x0110000E
158 #define PFNC_U3V_BAYERGB10P 0x010A0054
159 #define PFNC_U3V_BAYERGB12 0x01100012
160 #define PFNC_U3V_BAYERGB12P 0x010C0055
161 #define PFNC_U3V_BAYERGB14 0x0110010B
162 #define PFNC_U3V_BAYERGB14P 0x010E0107
163 #define PFNC_U3V_BAYERGB16 0x01100030
164 #define PFNC_U3V_BAYERGR4P 0x0104010D
165 #define PFNC_U3V_BAYERGR8 0x01080008
166 #define PFNC_U3V_BAYERGR10 0x0110000C
167 #define PFNC_U3V_BAYERGR10P 0x010A0056
168 #define PFNC_U3V_BAYERGR12 0x01100010
169 #define PFNC_U3V_BAYERGR12P 0x010C0057
170 #define PFNC_U3V_BAYERGR14 0x01100109
171 #define PFNC_U3V_BAYERGR14P 0x010E0105
172 #define PFNC_U3V_BAYERGR16 0x0110002E
173 #define PFNC_U3V_BAYERRG4P 0x0104010E
174 #define PFNC_U3V_BAYERRG8 0x01080009
175 #define PFNC_U3V_BAYERRG10 0x0110000D
176 #define PFNC_U3V_BAYERRG10P 0x010A0058
177 #define PFNC_U3V_BAYERRG12 0x01100011
178 #define PFNC_U3V_BAYERRG12P 0x010C0059
179 #define PFNC_U3V_BAYERRG14 0x0110010A
180 #define PFNC_U3V_BAYERRG14P 0x010E0106
181 #define PFNC_U3V_BAYERRG16 0x0110002F
182 #define PFNC_U3V_RGBA8 0x02200016
183 #define PFNC_U3V_RGBA10 0x0240005F
184 #define PFNC_U3V_RGBA10P 0x02280060
185 #define PFNC_U3V_RGBA12 0x02400061
186 #define PFNC_U3V_RGBA12P 0x02300062
187 #define PFNC_U3V_RGBA14 0x02400063
188 #define PFNC_U3V_RGBA16 0x02400064
189 #define PFNC_U3V_RGB8 0x02180014
190 #define PFNC_U3V_RGB8_PLANAR 0x02180021
191 #define PFNC_U3V_RGB10 0x02300018
192 #define PFNC_U3V_RGB10_PLANAR 0x02300022
193 #define PFNC_U3V_RGB10P 0x021E005C
194 #define PFNC_U3V_RGB10P32 0x0220001D
195 #define PFNC_U3V_RGB12 0x0230001A
196 #define PFNC_U3V_RGB12_PLANAR 0x02300023
197 #define PFNC_U3V_RGB12P 0x0224005D
198 #define PFNC_U3V_RGB14 0x0230005E
199 #define PFNC_U3V_RGB16 0x02300033
200 #define PFNC_U3V_RGB16_PLANAR 0x02300024
201 #define PFNC_U3V_RGB565P 0x02100035
202 #define PFNC_U3V_BGRA8 0x02200017
203 #define PFNC_U3V_BGRA10 0x0240004C
204 #define PFNC_U3V_BGRA10P 0x0228004D
205 #define PFNC_U3V_BGRA12 0x0240004E
206 #define PFNC_U3V_BGRA12P 0x0230004F
207 #define PFNC_U3V_BGRA14 0x02400050
208 #define PFNC_U3V_BGRA16 0x02400051
209 #define PFNC_U3V_BGR8 0x02180015
210 #define PFNC_U3V_BGR10 0x02300019
211 #define PFNC_U3V_BGR10P 0x021E0048
212 #define PFNC_U3V_BGR12 0x0230001B
213 #define PFNC_U3V_BGR12P 0x02240049
214 #define PFNC_U3V_BGR14 0x0230004A
215 #define PFNC_U3V_BGR16 0x0230004B
216 #define PFNC_U3V_BGR565P 0x02100036
217 #define PFNC_U3V_R8 0x010800C9
218 #define PFNC_U3V_R10 0x01100120
219 #define PFNC_U3V_R10_DEPRECATED 0x010A00CA
220 #define PFNC_U3V_R12 0x01100121
221 #define PFNC_U3V_R12_DEPRECATED 0x010C00CB
222 #define PFNC_U3V_R16 0x011000CC
223 #define PFNC_U3V_G8 0x010800CD
224 #define PFNC_U3V_G10 0x01100122
225 #define PFNC_U3V_G10_DEPRECATED 0x010A00CE
226 #define PFNC_U3V_G12 0x01100123
227 #define PFNC_U3V_G12_DEPRECATED 0x010C00CF
228 #define PFNC_U3V_G16 0x011000D0
229 #define PFNC_U3V_B8 0x010800D1
230 #define PFNC_U3V_B10 0x01100124
231 #define PFNC_U3V_B10_DEPRECATED 0x010A00D2
232 #define PFNC_U3V_B12 0x01100125
233 #define PFNC_U3V_B12_DEPRECATED 0x010C00D3
234 #define PFNC_U3V_B16 0x011000D4
235 #define PFNC_U3V_COORD3D_ABC8 0x021800B2
236 #define PFNC_U3V_COORD3D_ABC8_PLANAR 0x021800B3
237 #define PFNC_U3V_COORD3D_ABC10P 0x021E00DB
238 #define PFNC_U3V_COORD3D_ABC10P_PLANAR 0x021E00DC
239 #define PFNC_U3V_COORD3D_ABC12P 0x022400DE
240 #define PFNC_U3V_COORD3D_ABC12P_PLANAR 0x022400DF
241 #define PFNC_U3V_COORD3D_ABC16 0x023000B9
242 #define PFNC_U3V_COORD3D_ABC16_PLANAR 0x023000BA
243 #define PFNC_U3V_COORD3D_ABC32F 0x026000C0
244 #define PFNC_U3V_COORD3D_ABC32F_PLANAR 0x026000C1
245 #define PFNC_U3V_COORD3D_AC8 0x021000B4
246 #define PFNC_U3V_COORD3D_AC8_PLANAR 0x021000B5
247 #define PFNC_U3V_COORD3D_AC10P 0x021400F0
248 #define PFNC_U3V_COORD3D_AC10P_PLANAR 0x021400F1
249 #define PFNC_U3V_COORD3D_AC12P 0x021800F2
250 #define PFNC_U3V_COORD3D_AC12P_PLANAR 0x021800F3
251 #define PFNC_U3V_COORD3D_AC16 0x022000BB
252 #define PFNC_U3V_COORD3D_AC16_PLANAR 0x022000BC
253 #define PFNC_U3V_COORD3D_AC32F 0x024000C2
254 #define PFNC_U3V_COORD3D_AC32F_PLANAR 0x024000C3
255 #define PFNC_U3V_COORD3D_A8 0x010800AF
256 #define PFNC_U3V_COORD3D_A10P 0x010A00D5
257 #define PFNC_U3V_COORD3D_A12P 0x010C00D8
258 #define PFNC_U3V_COORD3D_A16 0x011000B6
259 #define PFNC_U3V_COORD3D_A32F 0x012000BD
260 #define PFNC_U3V_COORD3D_B8 0x010800B0
261 #define PFNC_U3V_COORD3D_B10P 0x010A00D6
262 #define PFNC_U3V_COORD3D_B12P 0x010C00D9
263 #define PFNC_U3V_COORD3D_B16 0x011000B7
264 #define PFNC_U3V_COORD3D_B32F 0x012000BE
265 #define PFNC_U3V_COORD3D_C8 0x010800B1
266 #define PFNC_U3V_COORD3D_C10P 0x010A00D7
267 #define PFNC_U3V_COORD3D_C12P 0x010C00DA
268 #define PFNC_U3V_COORD3D_C16 0x011000B8
269 #define PFNC_U3V_COORD3D_C32F 0x012000BF
270 #define PFNC_U3V_CONFIDENCE1 0x010800C4
271 #define PFNC_U3V_CONFIDENCE1P 0x010100C5
272 #define PFNC_U3V_CONFIDENCE8 0x010800C6
273 #define PFNC_U3V_CONFIDENCE16 0x011000C7
274 #define PFNC_U3V_CONFIDENCE32F 0x012000C8
275 #define PFNC_U3V_BICOLORBGRG8 0x021000A6
276 #define PFNC_U3V_BICOLORBGRG10 0x022000A9
277 #define PFNC_U3V_BICOLORBGRG10P 0x021400AA
278 #define PFNC_U3V_BICOLORBGRG12 0x022000AD
279 #define PFNC_U3V_BICOLORBGRG12P 0x021800AE
280 #define PFNC_U3V_BICOLORRGBG8 0x021000A5
281 #define PFNC_U3V_BICOLORRGBG10 0x022000A7
282 #define PFNC_U3V_BICOLORRGBG10P 0x021400A8
283 #define PFNC_U3V_BICOLORRGBG12 0x022000AB
284 #define PFNC_U3V_BICOLORRGBG12P 0x021800AC
285 #define PFNC_U3V_DATA8 0x01080116
286 #define PFNC_U3V_DATA8S 0x01080117
287 #define PFNC_U3V_DATA16 0x01100118
288 #define PFNC_U3V_DATA16S 0x01100119
289 #define PFNC_U3V_DATA32 0x0120011A
290 #define PFNC_U3V_DATA32F 0x0120011C
291 #define PFNC_U3V_DATA32S 0x0120011B
292 #define PFNC_U3V_DATA64 0x0140011D
293 #define PFNC_U3V_DATA64F 0x0140011F
294 #define PFNC_U3V_DATA64S 0x0140011E
295 #define PFNC_U3V_SCF1WBWG8 0x01080067
296 #define PFNC_U3V_SCF1WBWG10 0x01100068
297 #define PFNC_U3V_SCF1WBWG10P 0x010A0069
298 #define PFNC_U3V_SCF1WBWG12 0x0110006A
299 #define PFNC_U3V_SCF1WBWG12P 0x010C006B
300 #define PFNC_U3V_SCF1WBWG14 0x0110006C
301 #define PFNC_U3V_SCF1WBWG16 0x0110006D
302 #define PFNC_U3V_SCF1WGWB8 0x0108006E
303 #define PFNC_U3V_SCF1WGWB10 0x0110006F
304 #define PFNC_U3V_SCF1WGWB10P 0x010A0070
305 #define PFNC_U3V_SCF1WGWB12 0x01100071
306 #define PFNC_U3V_SCF1WGWB12P 0x010C0072
307 #define PFNC_U3V_SCF1WGWB14 0x01100073
308 #define PFNC_U3V_SCF1WGWB16 0x01100074
309 #define PFNC_U3V_SCF1WGWR8 0x01080075
310 #define PFNC_U3V_SCF1WGWR10 0x01100076
311 #define PFNC_U3V_SCF1WGWR10P 0x010A0077
312 #define PFNC_U3V_SCF1WGWR12 0x01100078
313 #define PFNC_U3V_SCF1WGWR12P 0x010C0079
314 #define PFNC_U3V_SCF1WGWR14 0x0110007A
315 #define PFNC_U3V_SCF1WGWR16 0x0110007B
316 #define PFNC_U3V_SCF1WRWG8 0x0108007C
317 #define PFNC_U3V_SCF1WRWG10 0x0110007D
318 #define PFNC_U3V_SCF1WRWG10P 0x010A007E
319 #define PFNC_U3V_SCF1WRWG12 0x0110007F
320 #define PFNC_U3V_SCF1WRWG12P 0x010C0080
321 #define PFNC_U3V_SCF1WRWG14 0x01100081
322 #define PFNC_U3V_SCF1WRWG16 0x01100082
323 #define PFNC_U3V_YCBCR8 0x0218005B
324 #define PFNC_U3V_YCBCR8_CBYCR 0x0218003A
325 #define PFNC_U3V_YCBCR10_CBYCR 0x02300083
326 #define PFNC_U3V_YCBCR10P_CBYCR 0x021E0084
327 #define PFNC_U3V_YCBCR12_CBYCR 0x02300085
328 #define PFNC_U3V_YCBCR12P_CBYCR 0x02240086
329 #define PFNC_U3V_YCBCR411_8 0x020C005A
330 #define PFNC_U3V_YCBCR411_8_CBYYCRYY 0x020C003C
331 #define PFNC_U3V_YCBCR420_8_YY_CBCR_SEMIPLANAR 0x020C0112
332 #define PFNC_U3V_YCBCR420_8_YY_CRCB_SEMIPLANAR 0x020C0114
333 #define PFNC_U3V_YCBCR422_8 0x0210003B
334 #define PFNC_U3V_YCBCR422_8_CBYCRY 0x02100043
335 #define PFNC_U3V_YCBCR422_8_YY_CBCR_SEMIPLANAR 0x02100113
336 #define PFNC_U3V_YCBCR422_8_YY_CRCB_SEMIPLANAR 0x02100115
337 #define PFNC_U3V_YCBCR422_10 0x02200065
338 #define PFNC_U3V_YCBCR422_10_CBYCRY 0x02200099
339 #define PFNC_U3V_YCBCR422_10P 0x02140087
340 #define PFNC_U3V_YCBCR422_10P_CBYCRY 0x0214009A
341 #define PFNC_U3V_YCBCR422_12 0x02200066
342 #define PFNC_U3V_YCBCR422_12_CBYCRY 0x0220009B
343 #define PFNC_U3V_YCBCR422_12P 0x02180088
344 #define PFNC_U3V_YCBCR422_12P_CBYCRY 0x0218009C
345 #define PFNC_U3V_YCBCR601_8_CBYCR 0x0218003D
346 #define PFNC_U3V_YCBCR601_10_CBYCR 0x02300089
347 #define PFNC_U3V_YCBCR601_10P_CBYCR 0x021E008A
348 #define PFNC_U3V_YCBCR601_12_CBYCR 0x0230008B
349 #define PFNC_U3V_YCBCR601_12P_CBYCR 0x0224008C
350 #define PFNC_U3V_YCBCR601_411_8_CBYYCRYY 0x020C003F
351 #define PFNC_U3V_YCBCR601_422_8 0x0210003E
352 #define PFNC_U3V_YCBCR601_422_8_CBYCRY 0x02100044
353 #define PFNC_U3V_YCBCR601_422_10 0x0220008D
354 #define PFNC_U3V_YCBCR601_422_10_CBYCRY 0x0220009D
355 #define PFNC_U3V_YCBCR601_422_10P 0x0214008E
356 #define PFNC_U3V_YCBCR601_422_10P_CBYCRY 0x0214009E
357 #define PFNC_U3V_YCBCR601_422_12 0x0220008F
358 #define PFNC_U3V_YCBCR601_422_12_CBYCRY 0x0220009F
359 #define PFNC_U3V_YCBCR601_422_12P 0x02180090
360 #define PFNC_U3V_YCBCR601_422_12P_CBYCRY 0x021800A0
361 #define PFNC_U3V_YCBCR709_8_CBYCR 0x02180040
362 #define PFNC_U3V_YCBCR709_10_CBYCR 0x02300091
363 #define PFNC_U3V_YCBCR709_10P_CBYCR 0x021E0092
364 #define PFNC_U3V_YCBCR709_12_CBYCR 0x02300093
365 #define PFNC_U3V_YCBCR709_12P_CBYCR 0x02240094
366 #define PFNC_U3V_YCBCR709_411_8_CBYYCRYY 0x020C0042
367 #define PFNC_U3V_YCBCR709_422_8 0x02100041
368 #define PFNC_U3V_YCBCR709_422_8_CBYCRY 0x02100045
369 #define PFNC_U3V_YCBCR709_422_10 0x02200095
370 #define PFNC_U3V_YCBCR709_422_10_CBYCRY 0x022000A1
371 #define PFNC_U3V_YCBCR709_422_10P 0x02140096
372 #define PFNC_U3V_YCBCR709_422_10P_CBYCRY 0x021400A2
373 #define PFNC_U3V_YCBCR709_422_12 0x02200097
374 #define PFNC_U3V_YCBCR709_422_12_CBYCRY 0x022000A3
375 #define PFNC_U3V_YCBCR709_422_12P 0x02180098
376 #define PFNC_U3V_YCBCR709_422_12P_CBYCRY 0x021800A4
377 #define PFNC_U3V_YCBCR2020_8_CBYCR 0x021800F4
378 #define PFNC_U3V_YCBCR2020_10_CBYCR 0x023000F5
379 #define PFNC_U3V_YCBCR2020_10P_CBYCR 0x021E00F6
380 #define PFNC_U3V_YCBCR2020_12_CBYCR 0x023000F7
381 #define PFNC_U3V_YCBCR2020_12P_CBYCR 0x022400F8
382 #define PFNC_U3V_YCBCR2020_411_8_CBYYCRYY 0x020C00F9
383 #define PFNC_U3V_YCBCR2020_422_8 0x021000FA
384 #define PFNC_U3V_YCBCR2020_422_8_CBYCRY 0x021000FB
385 #define PFNC_U3V_YCBCR2020_422_10 0x022000FC
386 #define PFNC_U3V_YCBCR2020_422_10_CBYCRY 0x022000FD
387 #define PFNC_U3V_YCBCR2020_422_10P 0x021400FE
388 #define PFNC_U3V_YCBCR2020_422_10P_CBYCRY 0x021400FF
389 #define PFNC_U3V_YCBCR2020_422_12 0x02200100
390 #define PFNC_U3V_YCBCR2020_422_12_CBYCRY 0x02200101
391 #define PFNC_U3V_YCBCR2020_422_12P 0x02180102
392 #define PFNC_U3V_YCBCR2020_422_12P_CBYCRY 0x02180103
393 #define PFNC_U3V_YUV8_UYV 0x02180020
394 #define PFNC_U3V_YUV411_8_UYYVYY 0x020C001E
395 #define PFNC_U3V_YUV422_8 0x02100032
396 #define PFNC_U3V_YUV422_8_UYVY 0x0210001F
397 #define GVSP_MONO10PACKED 0x010C0004
398 #define GVSP_MONO12PACKED 0x010C0006
399 #define GVSP_BAYERBG10PACKED 0x010C0029
400 #define GVSP_BAYERBG12PACKED 0x010C002D
401 #define GVSP_BAYERGB10PACKED 0x010C0028
402 #define GVSP_BAYERGB12PACKED 0x010C002C
403 #define GVSP_BAYERGR10PACKED 0x010C0026
404 #define GVSP_BAYERGR12PACKED 0x010C002A
405 #define GVSP_BAYERRG10PACKED 0x010C0027
406 #define GVSP_BAYERRG12PACKED 0x010C002B
407 #define GVSP_RGB10V1PACKED 0x0220001C
408 #define GVSP_RGB12V1PACKED 0x02240034
411 Payload Types
413 #define U3V_STREAM_PAYLOAD_IMAGE 0x0001
414 #define U3V_STREAM_PAYLOAD_IMAGE_EXT_CHUNK 0x4001
415 #define U3V_STREAM_PAYLOAD_CHUNK 0x4000
417 void proto_register_u3v(void);
418 void proto_reg_handoff_u3v(void);
420 /* Define the u3v protocol */
421 static int proto_u3v;
423 /* GenCP transaction tracking
424 * the protocol only allows strict sequential
425 * communication.
427 * we track the current cmd/ack/pend_ack information
428 * in a struct that is created per GenCP communication
430 * in each request/response packet we add pointers
431 * to this information, that allow navigation between packets
432 * and dissection of addresses
434 typedef struct _gencp_transaction_t {
435 uint32_t cmd_frame;
436 uint32_t ack_frame;
437 nstime_t cmd_time;
438 /* list of pending acknowledges */
439 wmem_array_t *pend_ack_frame_list;
440 /* current requested address */
441 uint64_t address;
442 /* current requested count read/write */
443 uint32_t count;
444 } gencp_transaction_t;
446 typedef struct _u3v_conv_info_t {
447 uint64_t abrm_addr;
448 uint64_t sbrm_addr;
449 uint64_t sirm_addr;
450 uint64_t eirm_addr;
451 uint64_t iidc2_addr;
452 uint64_t manifest_addr;
453 uint32_t ep_stream;
454 gencp_transaction_t *trans_info;
455 } u3v_conv_info_t;
458 \brief IDs used for bootstrap dissection
460 static int hf_u3v_gencp_prefix;
461 static int hf_u3v_flag;
462 static int hf_u3v_acknowledge_required_flag;
463 static int hf_u3v_command_id;
464 static int hf_u3v_length;
465 static int hf_u3v_request_id;
466 static int hf_u3v_status;
467 static int hf_u3v_address;
468 static int hf_u3v_count;
469 static int hf_u3v_eventcmd_id;
470 static int hf_u3v_eventcmd_error_id;
471 static int hf_u3v_eventcmd_device_specific_id;
472 static int hf_u3v_eventcmd_timestamp;
473 static int hf_u3v_eventcmd_data;
474 static int hf_u3v_time_to_completion;
475 static int hf_u3v_payloaddata;
476 static int hf_u3v_reserved;
478 static int hf_u3v_bootstrap_GenCP_Version;
479 static int hf_u3v_bootstrap_Manufacturer_Name;
480 static int hf_u3v_bootstrap_Model_Name;
481 static int hf_u3v_bootstrap_Family_Name;
482 static int hf_u3v_bootstrap_Device_Version;
483 static int hf_u3v_bootstrap_Manufacturer_Info;
484 static int hf_u3v_bootstrap_Serial_Number;
485 static int hf_u3v_bootstrap_User_Defined_Name;
486 static int hf_u3v_bootstrap_Device_Capability;
487 static int hf_u3v_bootstrap_Maximum_Device_Response_Time;
488 static int hf_u3v_bootstrap_Manifest_Table_Address;
489 static int hf_u3v_bootstrap_SBRM_Address;
490 static int hf_u3v_bootstrap_Device_Configuration;
491 static int hf_u3v_bootstrap_Heartbeat_Timeout;
492 static int hf_u3v_bootstrap_Message_Channel_channel_id;
493 static int hf_u3v_bootstrap_Timestamp;
494 static int hf_u3v_bootstrap_Timestamp_Latch;
495 static int hf_u3v_bootstrap_Timestamp_Increment;
496 static int hf_u3v_bootstrap_Access_Privilege;
497 static int hf_u3v_bootstrap_Protocol_Endianness;
498 static int hf_u3v_bootstrap_Implementation_Endianness;
499 static int hf_u3v_bootstrap_U3V_Version;
500 static int hf_u3v_bootstrap_U3VCP_Capability_Register;
501 static int hf_u3v_bootstrap_U3VCP_Configuration_Register;
502 static int hf_u3v_bootstrap_Maximum_Command_Transfer_Length;
503 static int hf_u3v_bootstrap_Maximum_Acknowledge_Transfer_Length;
504 static int hf_u3v_bootstrap_Number_of_Stream_Channels;
505 static int hf_u3v_bootstrap_SIRM_Address;
506 static int hf_u3v_bootstrap_SIRM_Length;
507 static int hf_u3v_bootstrap_EIRM_Address;
508 static int hf_u3v_bootstrap_EIRM_Length;
509 static int hf_u3v_bootstrap_IIDC2_Address;
510 static int hf_u3v_bootstrap_Current_Speed;
511 static int hf_u3v_bootstrap_SI_Info;
512 static int hf_u3v_bootstrap_SI_Control;
513 static int hf_u3v_bootstrap_SI_Required_Payload_Size;
514 static int hf_u3v_bootstrap_SI_Required_Leader_Size;
515 static int hf_u3v_bootstrap_SI_Required_Trailer_Size;
516 static int hf_u3v_bootstrap_SI_Maximum_Leader_Size;
517 static int hf_u3v_bootstrap_SI_Payload_Transfer_Size;
518 static int hf_u3v_bootstrap_SI_Payload_Transfer_Count;
519 static int hf_u3v_bootstrap_SI_Payload_Final_Transfer1_Size;
520 static int hf_u3v_bootstrap_SI_Payload_Final_Transfer2_Size;
521 static int hf_u3v_bootstrap_SI_Maximum_Trailer_Size;
522 static int hf_u3v_bootstrap_EI_Control;
523 static int hf_u3v_bootstrap_Maximum_Event_Transfer_Length;
524 static int hf_u3v_bootstrap_Event_Test_Control;
525 static int hf_u3v_custom_memory_addr;
526 static int hf_u3v_custom_memory_data;
528 static int hf_u3v_scd_readmem_cmd;
529 static int hf_u3v_scd_writemem_cmd;
530 static int hf_u3v_scd_event_cmd;
531 static int hf_u3v_scd_ack_readmem_ack;
532 static int hf_u3v_scd_writemem_ack;
533 static int hf_u3v_ccd_pending_ack;
534 static int hf_u3v_stream_leader;
535 static int hf_u3v_stream_trailer;
536 static int hf_u3v_stream_payload;
537 static int hf_u3v_ccd_cmd;
538 static int hf_u3v_ccd_ack;
539 static int hf_u3v_device_info_descriptor;
541 /* stream elements */
542 static int hf_u3v_stream_reserved;
543 static int hf_u3v_stream_leader_size;
545 static int hf_u3v_stream_prefix;
546 static int hf_u3v_stream_trailer_size;
548 static int hf_u3v_stream_block_id;
549 static int hf_u3v_stream_payload_type;
550 static int hf_u3v_stream_status;
551 static int hf_u3v_stream_valid_payload_size;
553 static int hf_u3v_stream_timestamp;
554 static int hf_u3v_stream_pixel_format;
555 static int hf_u3v_stream_size_x;
556 static int hf_u3v_stream_size_y;
557 static int hf_u3v_stream_offset_x;
558 static int hf_u3v_stream_offset_y;
559 static int hf_u3v_stream_padding_x;
560 static int hf_u3v_stream_chunk_layout_id;
562 static int hf_u3v_stream_data;
564 /* U3V device info descriptor */
565 static int hf_u3v_device_info_descriptor_bLength;
566 static int hf_u3v_device_info_descriptor_bDescriptorType;
567 static int hf_u3v_device_info_descriptor_bDescriptorSubtype;
568 static int hf_u3v_device_info_descriptor_bGenCPVersion;
569 static int hf_u3v_device_info_descriptor_bGenCPVersion_minor;
570 static int hf_u3v_device_info_descriptor_bGenCPVersion_major;
571 static int hf_u3v_device_info_descriptor_bU3VVersion;
572 static int hf_u3v_device_info_descriptor_bU3VVersion_minor;
573 static int hf_u3v_device_info_descriptor_bU3VVersion_major;
574 static int hf_u3v_device_info_descriptor_iDeviceGUID;
575 static int hf_u3v_device_info_descriptor_iVendorName;
576 static int hf_u3v_device_info_descriptor_iModelName;
577 static int hf_u3v_device_info_descriptor_iFamilyName;
578 static int hf_u3v_device_info_descriptor_iDeviceVersion;
579 static int hf_u3v_device_info_descriptor_iManufacturerInfo;
580 static int hf_u3v_device_info_descriptor_iSerialNumber;
581 static int hf_u3v_device_info_descriptor_iUserDefinedName;
582 static int hf_u3v_device_info_descriptor_bmSpeedSupport;
583 static int hf_u3v_device_info_descriptor_bmSpeedSupport_low_speed;
584 static int hf_u3v_device_info_descriptor_bmSpeedSupport_full_speed;
585 static int hf_u3v_device_info_descriptor_bmSpeedSupport_high_speed;
586 static int hf_u3v_device_info_descriptor_bmSpeedSupport_super_speed;
587 static int hf_u3v_device_info_descriptor_bmSpeedSupport_reserved;
589 /*Define the tree for u3v*/
590 static int ett_u3v;
591 static int ett_u3v_cmd;
592 static int ett_u3v_flags;
593 static int ett_u3v_ack;
594 static int ett_u3v_payload_cmd;
595 static int ett_u3v_payload_ack;
596 static int ett_u3v_payload_cmd_subtree;
597 static int ett_u3v_payload_ack_subtree;
598 static int ett_u3v_bootstrap_fields;
599 static int ett_u3v_stream_leader;
600 static int ett_u3v_stream_trailer;
601 static int ett_u3v_stream_payload;
603 static int ett_u3v_device_info_descriptor;
604 static int ett_u3v_device_info_descriptor_speed_support;
605 static int ett_u3v_device_info_descriptor_gencp_version;
606 static int ett_u3v_device_info_descriptor_u3v_version;
608 static dissector_handle_t u3v_handle;
610 static const value_string command_names[] =
612 { U3V_READMEM_CMD, "READMEM_CMD" },
613 { U3V_WRITEMEM_CMD, "WRITEMEM_CMD" },
614 { U3V_EVENT_CMD, "EVENT_CMD" },
615 { U3V_READMEM_ACK, "READMEM_ACK" },
616 { U3V_WRITEMEM_ACK, "WRITEMEM_ACK" },
617 { U3V_PENDING_ACK, "PENDING_ACK" },
618 { U3V_EVENT_ACK, "EVENT_ACK" },
619 { 0, NULL }
622 static const value_string event_id_names[] =
624 { U3V_EVENT_TESTEVENT, "U3V_EVENT_TESTEVENT" },
625 { 0, NULL }
628 static const value_string status_names[] =
630 { U3V_STATUS_GENCP_SUCCESS, "U3V_STATUS_GENCP_SUCCESS" },
631 { U3V_STATUS_GENCP_NOT_IMPLEMENTED, "U3V_STATUS_GENCP_NOT_IMPLEMENTED" },
632 { U3V_STATUS_GENCP_INVALID_PARAMETER, "U3V_STATUS_GENCP_INVALID_PARAMETER" },
633 { U3V_STATUS_GENCP_INVALID_ADDRESS, "U3V_STATUS_GENCP_INVALID_ADDRESS" },
634 { U3V_STATUS_GENCP_WRITE_PROTECT, "U3V_STATUS_GENCP_WRITE_PROTECT" },
635 { U3V_STATUS_GENCP_BAD_ALIGNMENT, "U3V_STATUS_GENCP_BAD_ALIGNMENT" },
636 { U3V_STATUS_GENCP_ACCESS_DENIED, "U3V_STATUS_GENCP_ACCESS_DENIED" },
637 { U3V_STATUS_GENCP_BUSY, "U3V_STATUS_GENCP_BUSY" },
638 { U3V_STATUS_GENCP_WRONG_CONFIG, "U3V_STATUS_GENCP_WRONG_CONFIG" },
639 { U3V_STATUS_RESEND_NOT_SUPPORTED, "U3V_STATUS_RESEND_NOT_SUPPORTED" },
640 { U3V_STATUS_DSI_ENDPOINT_HALTED, "U3V_STATUS_DSI_ENDPOINT_HALTED" },
641 { U3V_STATUS_SI_PAYLOAD_SIZE_NOT_ALIGNED, "U3V_STATUS_SI_PAYLOAD_SIZE_NOT_ALIGNED" },
642 { U3V_STATUS_SI_REGISTERS_INCONSISTENT, "U3V_STATUS_SI_REGISTERS_INCONSISTENT" },
643 { U3V_STATUS_DATA_DISCARDED, "U3V_STATUS_DATA_DISCARDED" },
644 { U3V_STATUS_DATA_OVERRUN, "U3V_STATUS_DATA_OVERRUN" },
645 { 0, NULL }
648 static const value_string status_names_short[] =
650 { U3V_STATUS_GENCP_SUCCESS, "" },
651 { U3V_STATUS_GENCP_NOT_IMPLEMENTED, "U3V_STATUS_GENCP_NOT_IMPLEMENTED" },
652 { U3V_STATUS_GENCP_INVALID_PARAMETER, "U3V_STATUS_GENCP_INVALID_PARAMETER" },
653 { U3V_STATUS_GENCP_INVALID_ADDRESS, "U3V_STATUS_GENCP_INVALID_ADDRESS" },
654 { U3V_STATUS_GENCP_WRITE_PROTECT, "U3V_STATUS_GENCP_WRITE_PROTECT" },
655 { U3V_STATUS_GENCP_BAD_ALIGNMENT, "U3V_STATUS_GENCP_BAD_ALIGNMENT" },
656 { U3V_STATUS_GENCP_ACCESS_DENIED, "U3V_STATUS_GENCP_ACCESS_DENIED" },
657 { U3V_STATUS_GENCP_BUSY, "U3V_STATUS_GENCP_BUSY" },
658 { U3V_STATUS_GENCP_WRONG_CONFIG, "U3V_STATUS_GENCP_WRONG_CONFIG" },
659 { U3V_STATUS_RESEND_NOT_SUPPORTED, "U3V_STATUS_RESEND_NOT_SUPPORTED" },
660 { U3V_STATUS_DSI_ENDPOINT_HALTED, "U3V_STATUS_DSI_ENDPOINT_HALTED" },
661 { U3V_STATUS_SI_PAYLOAD_SIZE_NOT_ALIGNED, "U3V_STATUS_SI_PAYLOAD_SIZE_NOT_ALIGNED" },
662 { U3V_STATUS_SI_REGISTERS_INCONSISTENT, "U3V_STATUS_SI_REGISTERS_INCONSISTENT" },
663 { U3V_STATUS_DATA_DISCARDED, "U3V_STATUS_DATA_DISCARDED" },
664 { U3V_STATUS_DATA_OVERRUN, "U3V_STATUS_DATA_OVERRUN" },
665 { 0, NULL }
669 \brief Register name to address mappings
671 static const value_string bootstrap_register_names_abrm[] =
673 { U3V_ABRM_GENCP_VERSION, "[GenCP_Version]" },
674 { U3V_ABRM_MANUFACTURER_NAME, "[Manufacturer_Name]" },
675 { U3V_ABRM_MODEL_NAME, "[Model_Name]" },
676 { U3V_ABRM_FAMILY_NAME, "[Family_Name]" },
677 { U3V_ABRM_DEVICE_VERSION, "[Device_Version]" },
678 { U3V_ABRM_MANUFACTURER_INFO, "[Manufacturer_Info]" },
679 { U3V_ABRM_SERIAL_NUMBER, "[Serial_Number]" },
680 { U3V_ABRM_USER_DEFINED_NAME, "[User_Defined_Name]" },
681 { U3V_ABRM_DEVICE_CAPABILITY, "[Device_Capability]" },
682 { U3V_ABRM_MAXIMUM_DEVICE_RESPONSE_TIME, "[Maximum_Device_Response_Time]" },
683 { U3V_ABRM_MANIFEST_TABLE_ADDRESS, "[Manifest_Table_Address]" },
684 { U3V_ABRM_SBRM_ADDRESS, "[SBRM_Address]" },
685 { U3V_ABRM_DEVICE_CONFIGURATION, "[Device_Configuration]" },
686 { U3V_ABRM_HEARTBEAT_TIMEOUT, "[Heartbeat_Timeout]" },
687 { U3V_ABRM_MESSAGE_CHANNEL_CHANNEL_ID, "[Message_Channel_channel_id]" },
688 { U3V_ABRM_TIMESTAMP, "[Timestamp]" },
689 { U3V_ABRM_TIMESTAMP_LATCH, "[Timestamp_Latch]" },
690 { U3V_ABRM_TIMESTAMP_INCREMENT, "[Timestamp_Increment]" },
691 { U3V_ABRM_ACCESS_PRIVILEGE, "[Access_Privilege]" },
692 { U3V_ABRM_PROTOCOL_ENDIANNESS, "[Protocol_Endianness]" },
693 { U3V_ABRM_IMPLEMENTATION_ENDIANNESS, "[Implementation_Endianness]" },
694 { 0, NULL }
697 static const value_string bootstrap_register_names_sbrm[] =
699 { U3V_SBRM_U3V_VERSION, "[U3V_Version]" },
700 { U3V_SBRM_U3VCP_CAPABILITY_REGISTER, "[U3VCP_Capability_Register]" },
701 { U3V_SBRM_U3VCP_CONFIGURATION_REGISTER, "[U3VCP_Configuration_Register]" },
702 { U3V_SBRM_MAXIMUM_COMMAND_TRANSFER_LENGTH, "[Maximum_Command_Transfer_Length]" },
703 { U3V_SBRM_MAXIMUM_ACKNOWLEDGE_TRANSFER_LENGTH, "[Maximum_Acknowledge_Transfer_Length]" },
704 { U3V_SBRM_NUMBER_OF_STREAM_CHANNELS, "[Number_of_Stream_Channels]" },
705 { U3V_SBRM_SIRM_ADDRESS, "[SIRM_Address]" },
706 { U3V_SBRM_SIRM_LENGTH, "[SIRM_Length]" },
707 { U3V_SBRM_EIRM_ADDRESS, "[EIRM_Address]" },
708 { U3V_SBRM_EIRM_LENGTH, "[EIRM_Length]" },
709 { U3V_SBRM_IIDC2_ADDRESS, "[IIDC2_Address]" },
710 { U3V_SBRM_CURRENT_SPEED, "[Current_Speed]" },
711 { 0, NULL }
714 static const value_string bootstrap_register_names_sirm[] =
716 { U3V_SIRM_SI_INFO, "[SI_Info]" },
717 { U3V_SIRM_SI_CONTROL, "[SI_Control]" },
718 { U3V_SIRM_SI_REQUIRED_PAYLOAD_SIZE, "[SI_Required_Payload_Size]" },
719 { U3V_SIRM_SI_REQUIRED_LEADER_SIZE, "[SI_Required_Leader_Size]" },
720 { U3V_SIRM_SI_REQUIRED_TRAILER_SIZE, "[SI_Required_Trailer_Size]" },
721 { U3V_SIRM_SI_MAXIMUM_LEADER_SIZE, "[SI_Maximum_Leader_Size]" },
722 { U3V_SIRM_SI_PAYLOAD_TRANSFER_SIZE, "[SI_Payload_Transfer_Size]" },
723 { U3V_SIRM_SI_PAYLOAD_TRANSFER_COUNT, "[SI_Payload_Transfer_Count]" },
724 { U3V_SIRM_SI_PAYLOAD_FINAL_TRANSFER1_SIZE, "[SI_Payload_Final_Transfer1_Size]" },
725 { U3V_SIRM_SI_PAYLOAD_FINAL_TRANSFER2_SIZE, "[SI_Payload_Final_Transfer2_Size]" },
726 { U3V_SIRM_SI_MAXIMUM_TRAILER_SIZE, "[SI_Maximum_Trailer_Size]" },
727 { 0, NULL }
730 static const value_string bootstrap_register_names_eirm[] =
732 { U3V_EIRM_EI_CONTROL, "[EI_Control]" },
733 { U3V_EIRM_MAXIMUM_EVENT_TRANSFER_LENGTH, "[Maximum_Event_Transfer_Length]" },
734 { U3V_EIRM_EVENT_TEST_CONTROL, "[Event_Test_Control]" },
735 { 0, NULL }
738 static const value_string pixel_format_names[] =
740 { PFNC_U3V_MONO1P, "Mono1p (Monochrome 1-bit packed)" },
741 { PFNC_U3V_CONFIDENCE1P, "Confidence1p (Confidence 1-bit packed)" },
742 { PFNC_U3V_MONO2P, "Mono2p (Monochrome 2-bit packed)" },
743 { PFNC_U3V_MONO4P, "Mono4p (Monochrome 4-bit packed)" },
744 { PFNC_U3V_BAYERGR4P, "BayerGR4p (Bayer Green-Red 4-bit packed)" },
745 { PFNC_U3V_BAYERRG4P, "BayerRG4p (Bayer Red-Green 4-bit packed)" },
746 { PFNC_U3V_BAYERGB4P, "BayerGB4p (Bayer Green-Blue 4-bit packed)" },
747 { PFNC_U3V_BAYERBG4P, "BayerBG4p (Bayer Blue-Green 4-bit packed)" },
748 { PFNC_U3V_MONO8, "Mono8 (Monochrome 8-bit)" },
749 { PFNC_U3V_MONO8S, "Mono8s (Monochrome 8-bit signed)" },
750 { PFNC_U3V_BAYERGR8, "BayerGR8 (Bayer Green-Red 8-bit)" },
751 { PFNC_U3V_BAYERRG8, "BayerRG8 (Bayer Red-Green 8-bit)" },
752 { PFNC_U3V_BAYERGB8, "BayerGB8 (Bayer Green-Blue 8-bit)" },
753 { PFNC_U3V_BAYERBG8, "BayerBG8 (Bayer Blue-Green 8-bit)" },
754 { PFNC_U3V_SCF1WBWG8, "SCF1WBWG8 (Sparse Color Filter #1 White-Blue-White-Green 8-bit)" },
755 { PFNC_U3V_SCF1WGWB8, "SCF1WGWB8 (Sparse Color Filter #1 White-Green-White-Blue 8-bit)" },
756 { PFNC_U3V_SCF1WGWR8, "SCF1WGWR8 (Sparse Color Filter #1 White-Green-White-Red 8-bit)" },
757 { PFNC_U3V_SCF1WRWG8, "SCF1WRWG8 (Sparse Color Filter #1 White-Red-White-Green 8-bit)" },
758 { PFNC_U3V_COORD3D_A8, "Coord3D_A8 (3D coordinate A 8-bit)" },
759 { PFNC_U3V_COORD3D_B8, "Coord3D_B8 (3D coordinate B 8-bit)" },
760 { PFNC_U3V_COORD3D_C8, "Coord3D_C8 (3D coordinate C 8-bit)" },
761 { PFNC_U3V_CONFIDENCE1, "Confidence1 (Confidence 1-bit unpacked)" },
762 { PFNC_U3V_CONFIDENCE8, "Confidence8 (Confidence 8-bit)" },
763 { PFNC_U3V_R8, "R8 (Red 8-bit)" },
764 { PFNC_U3V_G8, "G8 (Green 8-bit)" },
765 { PFNC_U3V_B8, "B8 (Blue 8-bit)" },
766 { PFNC_U3V_DATA8, "Data8 (Data 8-bit)" },
767 { PFNC_U3V_DATA8S, "Data8s (Data 8-bit signed)" },
768 { PFNC_U3V_MONO10P, "Mono10p (Monochrome 10-bit packed)" },
769 { PFNC_U3V_BAYERBG10P, "BayerBG10p (Bayer Blue-Green 10-bit packed)" },
770 { PFNC_U3V_BAYERGB10P, "BayerGB10p (Bayer Green-Blue 10-bit packed)" },
771 { PFNC_U3V_BAYERGR10P, "BayerGR10p (Bayer Green-Red 10-bit packed)" },
772 { PFNC_U3V_BAYERRG10P, "BayerRG10p (Bayer Red-Green 10-bit packed)" },
773 { PFNC_U3V_SCF1WBWG10P, "SCF1WBWG10p (Sparse Color Filter #1 White-Blue-White-Green 10-bit packed)" },
774 { PFNC_U3V_SCF1WGWB10P, "SCF1WGWB10p (Sparse Color Filter #1 White-Green-White-Blue 10-bit packed)" },
775 { PFNC_U3V_SCF1WGWR10P, "SCF1WGWR10p (Sparse Color Filter #1 White-Green-White-Red 10-bit packed)" },
776 { PFNC_U3V_SCF1WRWG10P, "SCF1WRWG10p (Sparse Color Filter #1 White-Red-White-Green 10-bit packed)" },
777 { PFNC_U3V_R10_DEPRECATED, "R10_Deprecated (Deprecated because size field is wrong)" },
778 { PFNC_U3V_G10_DEPRECATED, "G10_Deprecated (Deprecated because size field is wrong)" },
779 { PFNC_U3V_B10_DEPRECATED, "B10_Deprecated (Deprecated because size field is wrong)" },
780 { PFNC_U3V_COORD3D_A10P, "Coord3D_A10p (3D coordinate A 10-bit packed)" },
781 { PFNC_U3V_COORD3D_B10P, "Coord3D_B10p (3D coordinate B 10-bit packed)" },
782 { PFNC_U3V_COORD3D_C10P, "Coord3D_C10p (3D coordinate C 10-bit packed)" },
783 { GVSP_MONO10PACKED, "GVSP_Mono10Packed (GigE Vision specific format, Monochrome 10-bit packed)" },
784 { GVSP_MONO12PACKED, "GVSP_Mono12Packed (GigE Vision specific format, Monochrome 12-bit packed)" },
785 { GVSP_BAYERGR10PACKED, "GVSP_BayerGR10Packed (GigE Vision specific format, Bayer Green-Red 10-bit packed)" },
786 { GVSP_BAYERRG10PACKED, "GVSP_BayerRG10Packed (GigE Vision specific format, Bayer Red-Green 10-bit packed)" },
787 { GVSP_BAYERGB10PACKED, "GVSP_BayerGB10Packed (GigE Vision specific format, Bayer Green-Blue 10-bit packed)" },
788 { GVSP_BAYERBG10PACKED, "GVSP_BayerBG10Packed (GigE Vision specific format, Bayer Blue-Green 10-bit packed)" },
789 { GVSP_BAYERGR12PACKED, "GVSP_BayerGR12Packed (GigE Vision specific format, Bayer Green-Red 12-bit packed)" },
790 { GVSP_BAYERRG12PACKED, "GVSP_BayerRG12Packed (GigE Vision specific format, Bayer Red-Green 12-bit packed)" },
791 { GVSP_BAYERGB12PACKED, "GVSP_BayerGB12Packed (GigE Vision specific format, Bayer Green-Blue 12-bit packed)" },
792 { GVSP_BAYERBG12PACKED, "GVSP_BayerBG12Packed (GigE Vision specific format, Bayer Blue-Green 12-bit packed)" },
793 { PFNC_U3V_MONO12P, "Mono12p (Monochrome 12-bit packed)" },
794 { PFNC_U3V_BAYERBG12P, "BayerBG12p (Bayer Blue-Green 12-bit packed)" },
795 { PFNC_U3V_BAYERGB12P, "BayerGB12p (Bayer Green-Blue 12-bit packed)" },
796 { PFNC_U3V_BAYERGR12P, "BayerGR12p (Bayer Green-Red 12-bit packed)" },
797 { PFNC_U3V_BAYERRG12P, "BayerRG12p (Bayer Red-Green 12-bit packed)" },
798 { PFNC_U3V_SCF1WBWG12P, "SCF1WBWG12p (Sparse Color Filter #1 White-Blue-White-Green 12-bit packed)" },
799 { PFNC_U3V_SCF1WGWB12P, "SCF1WGWB12p (Sparse Color Filter #1 White-Green-White-Blue 12-bit packed)" },
800 { PFNC_U3V_SCF1WGWR12P, "SCF1WGWR12p (Sparse Color Filter #1 White-Green-White-Red 12-bit packed)" },
801 { PFNC_U3V_SCF1WRWG12P, "SCF1WRWG12p (Sparse Color Filter #1 White-Red-White-Green 12-bit packed)" },
802 { PFNC_U3V_R12_DEPRECATED, "R12_Deprecated (Deprecated because size field is wrong)" },
803 { PFNC_U3V_G12_DEPRECATED, "G12_Deprecated (Deprecated because size field is wrong)" },
804 { PFNC_U3V_B12_DEPRECATED, "B12_Deprecated (Deprecated because size field is wrong)" },
805 { PFNC_U3V_COORD3D_A12P, "Coord3D_A12p (3D coordinate A 12-bit packed)" },
806 { PFNC_U3V_COORD3D_B12P, "Coord3D_B12p (3D coordinate B 12-bit packed)" },
807 { PFNC_U3V_COORD3D_C12P, "Coord3D_C12p (3D coordinate C 12-bit packed)" },
808 { PFNC_U3V_MONO14P, "Mono14p (Monochrome 14-bit packed)" },
809 { PFNC_U3V_BAYERGR14P, "BayerGR14p (Bayer Green-Red 14-bit packed)" },
810 { PFNC_U3V_BAYERRG14P, "BayerRG14p (Bayer Red-Green 14-bit packed)" },
811 { PFNC_U3V_BAYERGB14P, "BayerGB14p (Bayer Green-Blue 14-bit packed)" },
812 { PFNC_U3V_BAYERBG14P, "BayerBG14p (Bayer Blue-Green 14-bit packed)" },
813 { PFNC_U3V_MONO10, "Mono10 (Monochrome 10-bit unpacked)" },
814 { PFNC_U3V_MONO12, "Mono12 (Monochrome 12-bit unpacked)" },
815 { PFNC_U3V_MONO16, "Mono16 (Monochrome 16-bit)" },
816 { PFNC_U3V_BAYERGR10, "BayerGR10 (Bayer Green-Red 10-bit unpacked)" },
817 { PFNC_U3V_BAYERRG10, "BayerRG10 (Bayer Red-Green 10-bit unpacked)" },
818 { PFNC_U3V_BAYERGB10, "BayerGB10 (Bayer Green-Blue 10-bit unpacked)" },
819 { PFNC_U3V_BAYERBG10, "BayerBG10 (Bayer Blue-Green 10-bit unpacked)" },
820 { PFNC_U3V_BAYERGR12, "BayerGR12 (Bayer Green-Red 12-bit unpacked)" },
821 { PFNC_U3V_BAYERRG12, "BayerRG12 (Bayer Red-Green 12-bit unpacked)" },
822 { PFNC_U3V_BAYERGB12, "BayerGB12 (Bayer Green-Blue 12-bit unpacked)" },
823 { PFNC_U3V_BAYERBG12, "BayerBG12 (Bayer Blue-Green 12-bit unpacked)" },
824 { PFNC_U3V_MONO14, "Mono14 (Monochrome 14-bit unpacked)" },
825 { PFNC_U3V_BAYERGR16, "BayerGR16 (Bayer Green-Red 16-bit)" },
826 { PFNC_U3V_BAYERRG16, "BayerRG16 (Bayer Red-Green 16-bit)" },
827 { PFNC_U3V_BAYERGB16, "BayerGB16 (Bayer Green-Blue 16-bit)" },
828 { PFNC_U3V_BAYERBG16, "BayerBG16 (Bayer Blue-Green 16-bit)" },
829 { PFNC_U3V_SCF1WBWG10, "SCF1WBWG10 (Sparse Color Filter #1 White-Blue-White-Green 10-bit unpacked)" },
830 { PFNC_U3V_SCF1WBWG12, "SCF1WBWG12 (Sparse Color Filter #1 White-Blue-White-Green 12-bit unpacked)" },
831 { PFNC_U3V_SCF1WBWG14, "SCF1WBWG14 (Sparse Color Filter #1 White-Blue-White-Green 14-bit unpacked)" },
832 { PFNC_U3V_SCF1WBWG16, "SCF1WBWG16 (Sparse Color Filter #1 White-Blue-White-Green 16-bit unpacked)" },
833 { PFNC_U3V_SCF1WGWB10, "SCF1WGWB10 (Sparse Color Filter #1 White-Green-White-Blue 10-bit unpacked)" },
834 { PFNC_U3V_SCF1WGWB12, "SCF1WGWB12 (Sparse Color Filter #1 White-Green-White-Blue 12-bit unpacked)" },
835 { PFNC_U3V_SCF1WGWB14, "SCF1WGWB14 (Sparse Color Filter #1 White-Green-White-Blue 14-bit unpacked)" },
836 { PFNC_U3V_SCF1WGWB16, "SCF1WGWB16 (Sparse Color Filter #1 White-Green-White-Blue 16-bit)" },
837 { PFNC_U3V_SCF1WGWR10, "SCF1WGWR10 (Sparse Color Filter #1 White-Green-White-Red 10-bit unpacked)" },
838 { PFNC_U3V_SCF1WGWR12, "SCF1WGWR12 (Sparse Color Filter #1 White-Green-White-Red 12-bit unpacked)" },
839 { PFNC_U3V_SCF1WGWR14, "SCF1WGWR14 (Sparse Color Filter #1 White-Green-White-Red 14-bit unpacked)" },
840 { PFNC_U3V_SCF1WGWR16, "SCF1WGWR16 (Sparse Color Filter #1 White-Green-White-Red 16-bit)" },
841 { PFNC_U3V_SCF1WRWG10, "SCF1WRWG10 (Sparse Color Filter #1 White-Red-White-Green 10-bit unpacked)" },
842 { PFNC_U3V_SCF1WRWG12, "SCF1WRWG12 (Sparse Color Filter #1 White-Red-White-Green 12-bit unpacked)" },
843 { PFNC_U3V_SCF1WRWG14, "SCF1WRWG14 (Sparse Color Filter #1 White-Red-White-Green 14-bit unpacked)" },
844 { PFNC_U3V_SCF1WRWG16, "SCF1WRWG16 (Sparse Color Filter #1 White-Red-White-Green 16-bit)" },
845 { PFNC_U3V_COORD3D_A16, "Coord3D_A16 (3D coordinate A 16-bit)" },
846 { PFNC_U3V_COORD3D_B16, "Coord3D_B16 (3D coordinate B 16-bit)" },
847 { PFNC_U3V_COORD3D_C16, "Coord3D_C16 (3D coordinate C 16-bit)" },
848 { PFNC_U3V_CONFIDENCE16, "Confidence16 (Confidence 16-bit)" },
849 { PFNC_U3V_R16, "R16 (Red 16-bit)" },
850 { PFNC_U3V_G16, "G16 (Green 16-bit)" },
851 { PFNC_U3V_B16, "B16 (Blue 16-bit)" },
852 { PFNC_U3V_BAYERGR14, "BayerGR14 (Bayer Green-Red 14-bit)" },
853 { PFNC_U3V_BAYERRG14, "BayerRG14 (Bayer Red-Green 14-bit)" },
854 { PFNC_U3V_BAYERGB14, "BayerGB14 (Bayer Green-Blue 14-bit)" },
855 { PFNC_U3V_BAYERBG14, "BayerBG14 (Bayer Blue-Green 14-bit)" },
856 { PFNC_U3V_DATA16, "Data16 (Data 16-bit)" },
857 { PFNC_U3V_DATA16S, "Data16s (Data 16-bit signed)" },
858 { PFNC_U3V_R10, "R10 (Red 10-bit)" },
859 { PFNC_U3V_R12, "R12 (Red 12-bit)" },
860 { PFNC_U3V_G10, "G10 (Green 10-bit)" },
861 { PFNC_U3V_G12, "G12 (Green 12-bit)" },
862 { PFNC_U3V_B10, "B10 (Blue 10-bit)" },
863 { PFNC_U3V_B12, "B12 (Blue 12-bit)" },
864 { PFNC_U3V_COORD3D_A32F, "Coord3D_A32f (3D coordinate A 32-bit floating point)" },
865 { PFNC_U3V_COORD3D_B32F, "Coord3D_B32f (3D coordinate B 32-bit floating point)" },
866 { PFNC_U3V_COORD3D_C32F, "Coord3D_C32f (3D coordinate C 32-bit floating point)" },
867 { PFNC_U3V_CONFIDENCE32F, "Confidence32f (Confidence 32-bit floating point)" },
868 { PFNC_U3V_MONO32, "Mono32 (Monochrome 32-bit)" },
869 { PFNC_U3V_DATA32, "Data32 (Data 32-bit)" },
870 { PFNC_U3V_DATA32S, "Data32s (Data 32-bit signed)" },
871 { PFNC_U3V_DATA32F, "Data32f (Data 32-bit floating point)" },
872 { PFNC_U3V_DATA64, "Data64 (Data 64-bit)" },
873 { PFNC_U3V_DATA64S, "Data64s (Data 64-bit signed)" },
874 { PFNC_U3V_DATA64F, "Data64f (Data 64-bit floating point)" },
875 { PFNC_U3V_YUV411_8_UYYVYY, "YUV411_8_UYYVYY (YUV 4:1:1 8-bit)" },
876 { PFNC_U3V_YCBCR411_8_CBYYCRYY, "YCbCr411_8_CbYYCrYY (YCbCr 4:1:1 8-bit)" },
877 { PFNC_U3V_YCBCR601_411_8_CBYYCRYY, "YCbCr601_411_8_CbYYCrYY (YCbCr 4:1:1 8-bit BT.601)" },
878 { PFNC_U3V_YCBCR709_411_8_CBYYCRYY, "YCbCr709_411_8_CbYYCrYY (YCbCr 4:1:1 8-bit BT.709)" },
879 { PFNC_U3V_YCBCR411_8, "YCbCr411_8 (YCbCr 4:1:1 8-bit)" },
880 { PFNC_U3V_YCBCR2020_411_8_CBYYCRYY, "YCbCr2020_411_8_CbYYCrYY (YCbCr 4:1:1 8-bit BT.2020)" },
881 { PFNC_U3V_YCBCR420_8_YY_CBCR_SEMIPLANAR, "YCbCr420_8_YY_CbCr_Semiplanar (YCbCr 4:2:0 8-bit YY/CbCr Semiplanar)" },
882 { PFNC_U3V_YCBCR420_8_YY_CRCB_SEMIPLANAR, "YCbCr420_8_YY_CrCb_Semiplanar (YCbCr 4:2:0 8-bit YY/CrCb Semiplanar)" },
883 { PFNC_U3V_YUV422_8_UYVY, "YUV422_8_UYVY (YUV 4:2:2 8-bit)" },
884 { PFNC_U3V_YUV422_8, "YUV422_8 (YUV 4:2:2 8-bit)" },
885 { PFNC_U3V_RGB565P, "RGB565p (Red-Green-Blue 5/6/5-bit packed)" },
886 { PFNC_U3V_BGR565P, "BGR565p (Blue-Green-Red 5/6/5-bit packed)" },
887 { PFNC_U3V_YCBCR422_8, "YCbCr422_8 (YCbCr 4:2:2 8-bit)" },
888 { PFNC_U3V_YCBCR601_422_8, "YCbCr601_422_8 (YCbCr 4:2:2 8-bit BT.601)" },
889 { PFNC_U3V_YCBCR709_422_8, "YCbCr709_422_8 (YCbCr 4:2:2 8-bit BT.709)" },
890 { PFNC_U3V_YCBCR422_8_CBYCRY, "YCbCr422_8_CbYCrY (YCbCr 4:2:2 8-bit)" },
891 { PFNC_U3V_YCBCR601_422_8_CBYCRY, "YCbCr601_422_8_CbYCrY (YCbCr 4:2:2 8-bit BT.601)" },
892 { PFNC_U3V_YCBCR709_422_8_CBYCRY, "YCbCr709_422_8_CbYCrY (YCbCr 4:2:2 8-bit BT.709)" },
893 { PFNC_U3V_BICOLORRGBG8, "BiColorRGBG8 (Bi-color Red/Green - Blue/Green 8-bit)" },
894 { PFNC_U3V_BICOLORBGRG8, "BiColorBGRG8 (Bi-color Blue/Green - Red/Green 8-bit)" },
895 { PFNC_U3V_COORD3D_AC8, "Coord3D_AC8 (3D coordinate A-C 8-bit)" },
896 { PFNC_U3V_COORD3D_AC8_PLANAR, "Coord3D_AC8_Planar (3D coordinate A-C 8-bit planar)" },
897 { PFNC_U3V_YCBCR2020_422_8, "YCbCr2020_422_8 (YCbCr 4:2:2 8-bit BT.2020)" },
898 { PFNC_U3V_YCBCR2020_422_8_CBYCRY, "YCbCr2020_422_8_CbYCrY (YCbCr 4:2:2 8-bit BT.2020)" },
899 { PFNC_U3V_YCBCR422_8_YY_CBCR_SEMIPLANAR, "YCbCr422_8_YY_CbCr_Semiplanar (YCbCr 4:2:2 8-bit YY/CbCr Semiplanar)" },
900 { PFNC_U3V_YCBCR422_8_YY_CRCB_SEMIPLANAR, "YCbCr422_8_YY_CrCb_Semiplanar (YCbCr 4:2:2 8-bit YY/CrCb Semiplanar)" },
901 { PFNC_U3V_YCBCR422_10P, "YCbCr422_10p (YCbCr 4:2:2 10-bit packed)" },
902 { PFNC_U3V_YCBCR601_422_10P, "YCbCr601_422_10p (YCbCr 4:2:2 10-bit packed BT.601)" },
903 { PFNC_U3V_YCBCR709_422_10P, "YCbCr709_422_10p (YCbCr 4:2:2 10-bit packed BT.709)" },
904 { PFNC_U3V_YCBCR422_10P_CBYCRY, "YCbCr422_10p_CbYCrY (YCbCr 4:2:2 10-bit packed)" },
905 { PFNC_U3V_YCBCR601_422_10P_CBYCRY, "YCbCr601_422_10p_CbYCrY (YCbCr 4:2:2 10-bit packed BT.601)" },
906 { PFNC_U3V_YCBCR709_422_10P_CBYCRY, "YCbCr709_422_10p_CbYCrY (YCbCr 4:2:2 10-bit packed BT.709)" },
907 { PFNC_U3V_BICOLORRGBG10P, "BiColorRGBG10p (Bi-color Red/Green - Blue/Green 10-bit packed)" },
908 { PFNC_U3V_BICOLORBGRG10P, "BiColorBGRG10p (Bi-color Blue/Green - Red/Green 10-bit packed)" },
909 { PFNC_U3V_COORD3D_AC10P, "Coord3D_AC10p (3D coordinate A-C 10-bit packed)" },
910 { PFNC_U3V_COORD3D_AC10P_PLANAR, "Coord3D_AC10p_Planar (3D coordinate A-C 10-bit packed planar)" },
911 { PFNC_U3V_YCBCR2020_422_10P, "YCbCr2020_422_10p (YCbCr 4:2:2 10-bit packed BT.2020)" },
912 { PFNC_U3V_YCBCR2020_422_10P_CBYCRY, "YCbCr2020_422_10p_CbYCrY (YCbCr 4:2:2 10-bit packed BT.2020)" },
913 { PFNC_U3V_RGB8, "RGB8 (Red-Green-Blue 8-bit)" },
914 { PFNC_U3V_BGR8, "BGR8 (Blue-Green-Red 8-bit)" },
915 { PFNC_U3V_YUV8_UYV, "YUV8_UYV (YUV 4:4:4 8-bit)" },
916 { PFNC_U3V_RGB8_PLANAR, "RGB8_Planar (Red-Green-Blue 8-bit planar)" },
917 { PFNC_U3V_YCBCR8_CBYCR, "YCbCr8_CbYCr (YCbCr 4:4:4 8-bit)" },
918 { PFNC_U3V_YCBCR601_8_CBYCR, "YCbCr601_8_CbYCr (YCbCr 4:4:4 8-bit BT.601)" },
919 { PFNC_U3V_YCBCR709_8_CBYCR, "YCbCr709_8_CbYCr (YCbCr 4:4:4 8-bit BT.709)" },
920 { PFNC_U3V_YCBCR8, "YCbCr8 (YCbCr 4:4:4 8-bit)" },
921 { PFNC_U3V_YCBCR422_12P, "YCbCr422_12p (YCbCr 4:2:2 12-bit packed)" },
922 { PFNC_U3V_YCBCR601_422_12P, "YCbCr601_422_12p (YCbCr 4:2:2 12-bit packed BT.601)" },
923 { PFNC_U3V_YCBCR709_422_12P, "YCbCr709_422_12p (YCbCr 4:2:2 12-bit packed BT.709)" },
924 { PFNC_U3V_YCBCR422_12P_CBYCRY, "YCbCr422_12p_CbYCrY (YCbCr 4:2:2 12-bit packed)" },
925 { PFNC_U3V_YCBCR601_422_12P_CBYCRY, "YCbCr601_422_12p_CbYCrY (YCbCr 4:2:2 12-bit packed BT.601)" },
926 { PFNC_U3V_YCBCR709_422_12P_CBYCRY, "YCbCr709_422_12p_CbYCrY (YCbCr 4:2:2 12-bit packed BT.709)" },
927 { PFNC_U3V_BICOLORRGBG12P, "BiColorRGBG12p (Bi-color Red/Green - Blue/Green 12-bit packed)" },
928 { PFNC_U3V_BICOLORBGRG12P, "BiColorBGRG12p (Bi-color Blue/Green - Red/Green 12-bit packed)" },
929 { PFNC_U3V_COORD3D_ABC8, "Coord3D_ABC8 (3D coordinate A-B-C 8-bit)" },
930 { PFNC_U3V_COORD3D_ABC8_PLANAR, "Coord3D_ABC8_Planar (3D coordinate A-B-C 8-bit planar)" },
931 { PFNC_U3V_COORD3D_AC12P, "Coord3D_AC12p (3D coordinate A-C 12-bit packed)" },
932 { PFNC_U3V_COORD3D_AC12P_PLANAR, "Coord3D_AC12p_Planar (3D coordinate A-C 12-bit packed planar)" },
933 { PFNC_U3V_YCBCR2020_8_CBYCR, "YCbCr2020_8_CbYCr (YCbCr 4:4:4 8-bit BT.2020)" },
934 { PFNC_U3V_YCBCR2020_422_12P, "YCbCr2020_422_12p (YCbCr 4:2:2 12-bit packed BT.2020)" },
935 { PFNC_U3V_YCBCR2020_422_12P_CBYCRY, "YCbCr2020_422_12p_CbYCrY (YCbCr 4:2:2 12-bit packed BT.2020)" },
936 { PFNC_U3V_BGR10P, "BGR10p (Blue-Green-Red 10-bit packed)" },
937 { PFNC_U3V_RGB10P, "RGB10p (Red-Green-Blue 10-bit packed)" },
938 { PFNC_U3V_YCBCR10P_CBYCR, "YCbCr10p_CbYCr (YCbCr 4:4:4 10-bit packed)" },
939 { PFNC_U3V_YCBCR601_10P_CBYCR, "YCbCr601_10p_CbYCr (YCbCr 4:4:4 10-bit packed BT.601)" },
940 { PFNC_U3V_YCBCR709_10P_CBYCR, "YCbCr709_10p_CbYCr (YCbCr 4:4:4 10-bit packed BT.709)" },
941 { PFNC_U3V_COORD3D_ABC10P, "Coord3D_ABC10p (3D coordinate A-B-C 10-bit packed)" },
942 { PFNC_U3V_COORD3D_ABC10P_PLANAR, "Coord3D_ABC10p_Planar (3D coordinate A-B-C 10-bit packed planar)" },
943 { PFNC_U3V_YCBCR2020_10P_CBYCR, "YCbCr2020_10p_CbYCr (YCbCr 4:4:4 10-bit packed BT.2020)" },
944 { PFNC_U3V_RGBA8, "RGBa8 (Red-Green-Blue-alpha 8-bit)" },
945 { PFNC_U3V_BGRA8, "BGRa8 (Blue-Green-Red-alpha 8-bit)" },
946 { GVSP_RGB10V1PACKED, "GVSP_RGB10V1Packed (GigE Vision specific format, Red-Green-Blue 10-bit packed - variant 1)" },
947 { PFNC_U3V_RGB10P32, "RGB10p32 (Red-Green-Blue 10-bit packed into 32-bit)" },
948 { PFNC_U3V_YCBCR422_10, "YCbCr422_10 (YCbCr 4:2:2 10-bit unpacked)" },
949 { PFNC_U3V_YCBCR422_12, "YCbCr422_12 (YCbCr 4:2:2 12-bit unpacked)" },
950 { PFNC_U3V_YCBCR601_422_10, "YCbCr601_422_10 (YCbCr 4:2:2 10-bit unpacked BT.601)" },
951 { PFNC_U3V_YCBCR601_422_12, "YCbCr601_422_12 (YCbCr 4:2:2 12-bit unpacked BT.601)" },
952 { PFNC_U3V_YCBCR709_422_10, "YCbCr709_422_10 (YCbCr 4:2:2 10-bit unpacked BT.709)" },
953 { PFNC_U3V_YCBCR709_422_12, "YCbCr709_422_12 (YCbCr 4:2:2 12-bit unpacked BT.709)" },
954 { PFNC_U3V_YCBCR422_10_CBYCRY, "YCbCr422_10_CbYCrY (YCbCr 4:2:2 10-bit unpacked)" },
955 { PFNC_U3V_YCBCR422_12_CBYCRY, "YCbCr422_12_CbYCrY (YCbCr 4:2:2 12-bit unpacked)" },
956 { PFNC_U3V_YCBCR601_422_10_CBYCRY, "YCbCr601_422_10_CbYCrY (YCbCr 4:2:2 10-bit unpacked BT.601)" },
957 { PFNC_U3V_YCBCR601_422_12_CBYCRY, "YCbCr601_422_12_CbYCrY (YCbCr 4:2:2 12-bit unpacked BT.601)" },
958 { PFNC_U3V_YCBCR709_422_10_CBYCRY, "YCbCr709_422_10_CbYCrY (YCbCr 4:2:2 10-bit unpacked BT.709)" },
959 { PFNC_U3V_YCBCR709_422_12_CBYCRY, "YCbCr709_422_12_CbYCrY (YCbCr 4:2:2 12-bit unpacked BT.709)" },
960 { PFNC_U3V_BICOLORRGBG10, "BiColorRGBG10 (Bi-color Red/Green - Blue/Green 10-bit unpacked)" },
961 { PFNC_U3V_BICOLORBGRG10, "BiColorBGRG10 (Bi-color Blue/Green - Red/Green 10-bit unpacked)" },
962 { PFNC_U3V_BICOLORRGBG12, "BiColorRGBG12 (Bi-color Red/Green - Blue/Green 12-bit unpacked)" },
963 { PFNC_U3V_BICOLORBGRG12, "BiColorBGRG12 (Bi-color Blue/Green - Red/Green 12-bit unpacked)" },
964 { PFNC_U3V_COORD3D_AC16, "Coord3D_AC16 (3D coordinate A-C 16-bit)" },
965 { PFNC_U3V_COORD3D_AC16_PLANAR, "Coord3D_AC16_Planar (3D coordinate A-C 16-bit planar)" },
966 { PFNC_U3V_YCBCR2020_422_10, "YCbCr2020_422_10 (YCbCr 4:2:2 10-bit unpacked BT.2020)" },
967 { PFNC_U3V_YCBCR2020_422_10_CBYCRY, "YCbCr2020_422_10_CbYCrY (YCbCr 4:2:2 10-bit unpacked BT.2020)" },
968 { PFNC_U3V_YCBCR2020_422_12, "YCbCr2020_422_12 (YCbCr 4:2:2 12-bit unpacked BT.2020)" },
969 { PFNC_U3V_YCBCR2020_422_12_CBYCRY, "YCbCr2020_422_12_CbYCrY (YCbCr 4:2:2 12-bit unpacked BT.2020)" },
970 { GVSP_RGB12V1PACKED, "GVSP_RGB12V1Packed (GigE Vision specific format, Red-Green-Blue 12-bit packed - variant 1)" },
971 { PFNC_U3V_BGR12P, "BGR12p (Blue-Green-Red 12-bit packed)" },
972 { PFNC_U3V_RGB12P, "RGB12p (Red-Green-Blue 12-bit packed)" },
973 { PFNC_U3V_YCBCR12P_CBYCR, "YCbCr12p_CbYCr (YCbCr 4:4:4 12-bit packed)" },
974 { PFNC_U3V_YCBCR601_12P_CBYCR, "YCbCr601_12p_CbYCr (YCbCr 4:4:4 12-bit packed BT.601)" },
975 { PFNC_U3V_YCBCR709_12P_CBYCR, "YCbCr709_12p_CbYCr (YCbCr 4:4:4 12-bit packed BT.709)" },
976 { PFNC_U3V_COORD3D_ABC12P, "Coord3D_ABC12p (3D coordinate A-B-C 12-bit packed)" },
977 { PFNC_U3V_COORD3D_ABC12P_PLANAR, "Coord3D_ABC12p_Planar (3D coordinate A-B-C 12-bit packed planar)" },
978 { PFNC_U3V_YCBCR2020_12P_CBYCR, "YCbCr2020_12p_CbYCr (YCbCr 4:4:4 12-bit packed BT.2020)" },
979 { PFNC_U3V_BGRA10P, "BGRa10p (Blue-Green-Red-alpha 10-bit packed)" },
980 { PFNC_U3V_RGBA10P, "RGBa10p (Red-Green-Blue-alpha 10-bit packed)" },
981 { PFNC_U3V_RGB10, "RGB10 (Red-Green-Blue 10-bit unpacked)" },
982 { PFNC_U3V_BGR10, "BGR10 (Blue-Green-Red 10-bit unpacked)" },
983 { PFNC_U3V_RGB12, "RGB12 (Red-Green-Blue 12-bit unpacked)" },
984 { PFNC_U3V_BGR12, "BGR12 (Blue-Green-Red 12-bit unpacked)" },
985 { PFNC_U3V_RGB10_PLANAR, "RGB10_Planar (Red-Green-Blue 10-bit unpacked planar)" },
986 { PFNC_U3V_RGB12_PLANAR, "RGB12_Planar (Red-Green-Blue 12-bit unpacked planar)" },
987 { PFNC_U3V_RGB16_PLANAR, "RGB16_Planar (Red-Green-Blue 16-bit planar)" },
988 { PFNC_U3V_RGB16, "RGB16 (Red-Green-Blue 16-bit)" },
989 { PFNC_U3V_BGR14, "BGR14 (Blue-Green-Red 14-bit unpacked)" },
990 { PFNC_U3V_BGR16, "BGR16 (Blue-Green-Red 16-bit)" },
991 { PFNC_U3V_BGRA12P, "BGRa12p (Blue-Green-Red-alpha 12-bit packed)" },
992 { PFNC_U3V_RGB14, "RGB14 (Red-Green-Blue 14-bit unpacked)" },
993 { PFNC_U3V_RGBA12P, "RGBa12p (Red-Green-Blue-alpha 12-bit packed)" },
994 { PFNC_U3V_YCBCR10_CBYCR, "YCbCr10_CbYCr (YCbCr 4:4:4 10-bit unpacked)" },
995 { PFNC_U3V_YCBCR12_CBYCR, "YCbCr12_CbYCr (YCbCr 4:4:4 12-bit unpacked)" },
996 { PFNC_U3V_YCBCR601_10_CBYCR, "YCbCr601_10_CbYCr (YCbCr 4:4:4 10-bit unpacked BT.601)" },
997 { PFNC_U3V_YCBCR601_12_CBYCR, "YCbCr601_12_CbYCr (YCbCr 4:4:4 12-bit unpacked BT.601)" },
998 { PFNC_U3V_YCBCR709_10_CBYCR, "YCbCr709_10_CbYCr (YCbCr 4:4:4 10-bit unpacked BT.709)" },
999 { PFNC_U3V_YCBCR709_12_CBYCR, "YCbCr709_12_CbYCr (YCbCr 4:4:4 12-bit unpacked BT.709)" },
1000 { PFNC_U3V_COORD3D_ABC16, "Coord3D_ABC16 (3D coordinate A-B-C 16-bit)" },
1001 { PFNC_U3V_COORD3D_ABC16_PLANAR, "Coord3D_ABC16_Planar (3D coordinate A-B-C 16-bit planar)" },
1002 { PFNC_U3V_YCBCR2020_10_CBYCR, "YCbCr2020_10_CbYCr (YCbCr 4:4:4 10-bit unpacked BT.2020)" },
1003 { PFNC_U3V_YCBCR2020_12_CBYCR, "YCbCr2020_12_CbYCr (YCbCr 4:4:4 12-bit unpacked BT.2020)" },
1004 { PFNC_U3V_BGRA10, "BGRa10 (Blue-Green-Red-alpha 10-bit unpacked)" },
1005 { PFNC_U3V_BGRA12, "BGRa12 (Blue-Green-Red-alpha 12-bit unpacked)" },
1006 { PFNC_U3V_BGRA14, "BGRa14 (Blue-Green-Red-alpha 14-bit unpacked)" },
1007 { PFNC_U3V_BGRA16, "BGRa16 (Blue-Green-Red-alpha 16-bit)" },
1008 { PFNC_U3V_RGBA10, "RGBa10 (Red-Green-Blue-alpha 10-bit unpacked)" },
1009 { PFNC_U3V_RGBA12, "RGBa12 (Red-Green-Blue-alpha 12-bit unpacked)" },
1010 { PFNC_U3V_RGBA14, "RGBa14 (Red-Green-Blue-alpha 14-bit unpacked)" },
1011 { PFNC_U3V_RGBA16, "RGBa16 (Red-Green-Blue-alpha 16-bit)" },
1012 { PFNC_U3V_COORD3D_AC32F, "Coord3D_AC32f (3D coordinate A-C 32-bit floating point)" },
1013 { PFNC_U3V_COORD3D_AC32F_PLANAR, "Coord3D_AC32f_Planar (3D coordinate A-C 32-bit floating point planar)" },
1014 { PFNC_U3V_COORD3D_ABC32F, "Coord3D_ABC32f (3D coordinate A-B-C 32-bit floating point)" },
1015 { PFNC_U3V_COORD3D_ABC32F_PLANAR, "Coord3D_ABC32f_Planar (3D coordinate A-B-C 32-bit floating point planar)" },
1016 { 0, NULL }
1019 static value_string_ext pixel_format_names_ext = VALUE_STRING_EXT_INIT(pixel_format_names);
1021 static const value_string payload_type_names[] =
1023 { U3V_STREAM_PAYLOAD_IMAGE, "Image" },
1024 { U3V_STREAM_PAYLOAD_IMAGE_EXT_CHUNK, "Image Extended Chunk" },
1025 { U3V_STREAM_PAYLOAD_CHUNK, "Chunk" },
1026 { 0, NULL }
1029 static const value_string u3v_descriptor_subtypes[] =
1031 { DESCRIPTOR_SUBTYPE_U3V_DEVICE_INFO, "U3V DEVICE INFO" },
1032 { 0, NULL }
1035 static int * const speed_support_fields[] = {
1036 &hf_u3v_device_info_descriptor_bmSpeedSupport_low_speed,
1037 &hf_u3v_device_info_descriptor_bmSpeedSupport_full_speed,
1038 &hf_u3v_device_info_descriptor_bmSpeedSupport_high_speed,
1039 &hf_u3v_device_info_descriptor_bmSpeedSupport_super_speed,
1040 &hf_u3v_device_info_descriptor_bmSpeedSupport_reserved,
1041 NULL
1046 \brief Returns a register name based on its address
1048 static const char*
1049 get_register_name_from_address(uint64_t addr, bool* is_custom_register, u3v_conv_info_t * u3v_conv_info)
1051 const char* address_string = NULL;
1052 uint32_t offset_address;
1054 if (is_custom_register != NULL) {
1055 *is_custom_register = false;
1058 /* check if this is the access to one of the base address registers */
1059 if ( addr < 0x10000 ) {
1060 offset_address = (uint32_t)addr;
1061 address_string = try_val_to_str(offset_address, bootstrap_register_names_abrm);
1063 if ( u3v_conv_info && u3v_conv_info->sbrm_addr != 0 && (addr >= u3v_conv_info->sbrm_addr)) {
1064 offset_address = (uint32_t)( addr - u3v_conv_info->sbrm_addr);
1065 address_string = try_val_to_str(offset_address, bootstrap_register_names_sbrm);
1067 if ( u3v_conv_info && u3v_conv_info->sirm_addr != 0 && (addr >= u3v_conv_info->sirm_addr)) {
1068 offset_address = (uint32_t)( addr - u3v_conv_info->sirm_addr);
1069 address_string = try_val_to_str(offset_address, bootstrap_register_names_sirm);
1071 if ( u3v_conv_info && u3v_conv_info->eirm_addr != 0 && (addr >= u3v_conv_info->eirm_addr)) {
1072 offset_address = (uint32_t)( addr - u3v_conv_info->eirm_addr);
1073 address_string = try_val_to_str(offset_address, bootstrap_register_names_eirm);
1076 if (!address_string) {
1077 address_string = wmem_strdup_printf(wmem_packet_scope(), "[Addr:0x%016" PRIX64 "]", addr);
1078 if (is_custom_register != NULL) {
1079 *is_custom_register = true;
1083 return address_string;
1087 \brief Returns true if a register (identified by its address) is a known bootstrap register
1089 static int
1090 is_known_bootstrap_register(uint64_t addr, u3v_conv_info_t * u3v_conv_info)
1092 const char* address_string = NULL;
1093 uint32_t offset_address;
1094 /* check if this is the access to one of the base address registers */
1095 if ( addr < 0x10000 ) {
1096 offset_address = (uint32_t)addr;
1097 address_string = try_val_to_str(offset_address, bootstrap_register_names_abrm);
1099 if ( u3v_conv_info->sbrm_addr != 0 && (addr >= u3v_conv_info->sbrm_addr)) {
1100 offset_address = (uint32_t)( addr - u3v_conv_info->sbrm_addr);
1101 address_string = try_val_to_str(offset_address, bootstrap_register_names_sbrm);
1103 if ( u3v_conv_info->sirm_addr != 0 && (addr >= u3v_conv_info->sirm_addr)) {
1104 offset_address = (uint32_t)( addr - u3v_conv_info->sirm_addr);
1105 address_string = try_val_to_str(offset_address, bootstrap_register_names_sirm);
1107 if ( u3v_conv_info->eirm_addr != 0 && (addr >= u3v_conv_info->eirm_addr)) {
1108 offset_address = (uint32_t)( addr - u3v_conv_info->eirm_addr);
1109 address_string = try_val_to_str(offset_address, bootstrap_register_names_eirm);
1111 return address_string != NULL;
1115 \brief Identify Base Address Pointer
1117 static void
1118 dissect_u3v_register_bases(uint64_t addr, tvbuff_t *tvb, int offset, u3v_conv_info_t * u3v_conv_info)
1120 if ( addr < 0x10000 ) {
1121 switch (addr) {
1122 case U3V_ABRM_SBRM_ADDRESS:
1123 u3v_conv_info->sbrm_addr = tvb_get_letoh64(tvb, offset);
1124 break;
1125 case U3V_ABRM_MANIFEST_TABLE_ADDRESS:
1126 u3v_conv_info->manifest_addr = tvb_get_letoh64(tvb, offset);
1127 break;
1130 if ( u3v_conv_info->sbrm_addr != 0 && (addr >= u3v_conv_info->sbrm_addr)) {
1131 addr -= u3v_conv_info->sbrm_addr;
1132 switch(addr) {
1133 case U3V_SBRM_SIRM_ADDRESS:
1134 u3v_conv_info->sirm_addr = tvb_get_letoh64(tvb, offset);
1135 break;
1136 case U3V_SBRM_EIRM_ADDRESS:
1137 u3v_conv_info->eirm_addr = tvb_get_letoh64(tvb, offset);
1138 break;
1139 case U3V_SBRM_IIDC2_ADDRESS:
1140 u3v_conv_info->iidc2_addr = tvb_get_letoh64(tvb, offset);
1141 break;
1147 \brief Attempt to dissect a bootstrap register
1149 static int
1150 dissect_u3v_register(uint64_t addr, proto_tree *branch, tvbuff_t *tvb, int offset, int length, u3v_conv_info_t *u3v_conv_info)
1152 bool isABRM = false, isSBRM = false, isSIRM = false, isEIRM = false;
1153 /* check if this is the access to one of the base address registers */
1154 if ( addr < 0x10000 ) {
1155 isABRM = true;
1156 switch (addr) {
1157 case U3V_ABRM_GENCP_VERSION:
1158 proto_tree_add_item(branch, hf_u3v_bootstrap_GenCP_Version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1159 break;
1160 case U3V_ABRM_MANUFACTURER_NAME:
1161 if ( length <= 64 ) {
1162 proto_tree_add_item(branch, hf_u3v_bootstrap_Manufacturer_Name, tvb, offset, length, ENC_ASCII);
1164 break;
1165 case U3V_ABRM_MODEL_NAME:
1166 if ( length <= 64 ) {
1167 proto_tree_add_item(branch, hf_u3v_bootstrap_Model_Name, tvb, offset, length, ENC_ASCII);
1169 break;
1170 case U3V_ABRM_FAMILY_NAME:
1171 if ( length <= 64 ) {
1172 proto_tree_add_item(branch, hf_u3v_bootstrap_Family_Name, tvb, offset, length, ENC_ASCII);
1174 break;
1175 case U3V_ABRM_DEVICE_VERSION:
1176 if ( length <= 64 ) {
1177 proto_tree_add_item(branch, hf_u3v_bootstrap_Device_Version, tvb, offset, length, ENC_ASCII);
1179 break;
1180 case U3V_ABRM_MANUFACTURER_INFO:
1181 if ( length <= 64 ) {
1182 proto_tree_add_item(branch, hf_u3v_bootstrap_Manufacturer_Info, tvb, offset, length, ENC_ASCII);
1184 break;
1185 case U3V_ABRM_SERIAL_NUMBER:
1186 if ( length <= 64 ) {
1187 proto_tree_add_item(branch, hf_u3v_bootstrap_Serial_Number, tvb, offset, length, ENC_ASCII);
1189 break;
1190 case U3V_ABRM_USER_DEFINED_NAME:
1191 if ( length <= 64 ) {
1192 proto_tree_add_item(branch, hf_u3v_bootstrap_User_Defined_Name, tvb, offset, length, ENC_ASCII);
1194 break;
1195 case U3V_ABRM_DEVICE_CAPABILITY:
1196 proto_tree_add_item(branch, hf_u3v_bootstrap_Device_Capability, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1197 break;
1198 case U3V_ABRM_MAXIMUM_DEVICE_RESPONSE_TIME:
1199 proto_tree_add_item(branch, hf_u3v_bootstrap_Maximum_Device_Response_Time, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1200 break;
1201 case U3V_ABRM_MANIFEST_TABLE_ADDRESS:
1202 proto_tree_add_item(branch, hf_u3v_bootstrap_Manifest_Table_Address, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1203 break;
1204 case U3V_ABRM_SBRM_ADDRESS:
1205 proto_tree_add_item(branch, hf_u3v_bootstrap_SBRM_Address, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1206 break;
1207 case U3V_ABRM_DEVICE_CONFIGURATION:
1208 proto_tree_add_item(branch, hf_u3v_bootstrap_Device_Configuration, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1209 break;
1210 case U3V_ABRM_HEARTBEAT_TIMEOUT:
1211 proto_tree_add_item(branch, hf_u3v_bootstrap_Heartbeat_Timeout, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1212 break;
1213 case U3V_ABRM_MESSAGE_CHANNEL_CHANNEL_ID:
1214 proto_tree_add_item(branch, hf_u3v_bootstrap_Message_Channel_channel_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1215 break;
1216 case U3V_ABRM_TIMESTAMP:
1217 proto_tree_add_item(branch, hf_u3v_bootstrap_Timestamp, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1218 break;
1219 case U3V_ABRM_TIMESTAMP_LATCH:
1220 proto_tree_add_item(branch, hf_u3v_bootstrap_Timestamp_Latch, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1221 break;
1222 case U3V_ABRM_TIMESTAMP_INCREMENT:
1223 proto_tree_add_item(branch, hf_u3v_bootstrap_Timestamp_Increment, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1224 break;
1225 case U3V_ABRM_ACCESS_PRIVILEGE:
1226 proto_tree_add_item(branch, hf_u3v_bootstrap_Access_Privilege, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1227 break;
1228 case U3V_ABRM_PROTOCOL_ENDIANNESS:
1229 proto_tree_add_item(branch, hf_u3v_bootstrap_Protocol_Endianness, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1230 break;
1231 case U3V_ABRM_IMPLEMENTATION_ENDIANNESS:
1232 proto_tree_add_item(branch, hf_u3v_bootstrap_Implementation_Endianness, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1233 break;
1234 default:
1235 isABRM = false;
1236 break;
1239 if ( u3v_conv_info->sbrm_addr != 0 && (addr >= u3v_conv_info->sbrm_addr)) {
1240 uint64_t map_offset = addr - u3v_conv_info->sbrm_addr;
1241 isSBRM = true;
1242 switch(map_offset) {
1243 case U3V_SBRM_U3V_VERSION:
1244 proto_tree_add_item(branch, hf_u3v_bootstrap_U3V_Version, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1245 break;
1246 case U3V_SBRM_U3VCP_CAPABILITY_REGISTER:
1247 proto_tree_add_item(branch, hf_u3v_bootstrap_U3VCP_Capability_Register, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1248 break;
1249 case U3V_SBRM_U3VCP_CONFIGURATION_REGISTER:
1250 proto_tree_add_item(branch, hf_u3v_bootstrap_U3VCP_Configuration_Register, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1251 break;
1252 case U3V_SBRM_MAXIMUM_COMMAND_TRANSFER_LENGTH:
1253 proto_tree_add_item(branch, hf_u3v_bootstrap_Maximum_Command_Transfer_Length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1254 break;
1255 case U3V_SBRM_MAXIMUM_ACKNOWLEDGE_TRANSFER_LENGTH:
1256 proto_tree_add_item(branch, hf_u3v_bootstrap_Maximum_Acknowledge_Transfer_Length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1257 break;
1258 case U3V_SBRM_NUMBER_OF_STREAM_CHANNELS:
1259 proto_tree_add_item(branch, hf_u3v_bootstrap_Number_of_Stream_Channels, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1260 break;
1261 case U3V_SBRM_SIRM_ADDRESS:
1262 proto_tree_add_item(branch, hf_u3v_bootstrap_SIRM_Address, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1263 break;
1264 case U3V_SBRM_SIRM_LENGTH:
1265 proto_tree_add_item(branch, hf_u3v_bootstrap_SIRM_Length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1266 break;
1267 case U3V_SBRM_EIRM_ADDRESS:
1268 proto_tree_add_item(branch, hf_u3v_bootstrap_EIRM_Address, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1269 break;
1270 case U3V_SBRM_EIRM_LENGTH:
1271 proto_tree_add_item(branch, hf_u3v_bootstrap_EIRM_Length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1272 break;
1273 case U3V_SBRM_IIDC2_ADDRESS:
1274 proto_tree_add_item(branch, hf_u3v_bootstrap_IIDC2_Address, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1275 break;
1276 case U3V_SBRM_CURRENT_SPEED:
1277 proto_tree_add_item(branch, hf_u3v_bootstrap_Current_Speed, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1278 break;
1279 default:
1280 isSBRM = false;
1281 break;
1284 if ( u3v_conv_info->sirm_addr != 0 && (addr >= u3v_conv_info->sirm_addr)) {
1285 uint64_t map_offset = addr - u3v_conv_info->sirm_addr;
1286 isSIRM = true;
1287 switch(map_offset) {
1288 case U3V_SIRM_SI_INFO:
1289 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Info, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1290 break;
1291 case U3V_SIRM_SI_CONTROL:
1292 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Control, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1293 break;
1294 case U3V_SIRM_SI_REQUIRED_PAYLOAD_SIZE:
1295 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Required_Payload_Size, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1296 break;
1297 case U3V_SIRM_SI_REQUIRED_LEADER_SIZE:
1298 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Required_Leader_Size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1299 break;
1300 case U3V_SIRM_SI_REQUIRED_TRAILER_SIZE:
1301 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Required_Trailer_Size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1302 break;
1303 case U3V_SIRM_SI_MAXIMUM_LEADER_SIZE:
1304 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Maximum_Leader_Size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1305 break;
1306 case U3V_SIRM_SI_PAYLOAD_TRANSFER_SIZE:
1307 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Payload_Transfer_Size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1308 break;
1309 case U3V_SIRM_SI_PAYLOAD_TRANSFER_COUNT:
1310 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Payload_Transfer_Count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1311 break;
1312 case U3V_SIRM_SI_PAYLOAD_FINAL_TRANSFER1_SIZE:
1313 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Payload_Final_Transfer1_Size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1314 break;
1315 case U3V_SIRM_SI_PAYLOAD_FINAL_TRANSFER2_SIZE:
1316 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Payload_Final_Transfer2_Size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1317 break;
1318 case U3V_SIRM_SI_MAXIMUM_TRAILER_SIZE:
1319 proto_tree_add_item(branch, hf_u3v_bootstrap_SI_Maximum_Trailer_Size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1320 break;
1321 default:
1322 isSIRM = false;
1323 break;
1326 if ( u3v_conv_info->eirm_addr != 0 && (addr >= u3v_conv_info->eirm_addr)) {
1327 uint64_t map_offset = addr -u3v_conv_info->eirm_addr;
1328 isEIRM=true;
1329 switch(map_offset) {
1330 case U3V_EIRM_EI_CONTROL:
1331 proto_tree_add_item(branch, hf_u3v_bootstrap_EI_Control, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1332 break;
1333 case U3V_EIRM_MAXIMUM_EVENT_TRANSFER_LENGTH:
1334 proto_tree_add_item(branch, hf_u3v_bootstrap_Maximum_Event_Transfer_Length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1335 break;
1336 case U3V_EIRM_EVENT_TEST_CONTROL:
1337 proto_tree_add_item(branch, hf_u3v_bootstrap_Event_Test_Control, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1338 break;
1339 default:
1340 isEIRM = false;
1341 break;
1344 if(isABRM || isSBRM || isSIRM || isEIRM ) {
1345 return 1;
1347 return 0;
1351 \brief DISSECT: Read memory command
1353 static void
1354 dissect_u3v_read_mem_cmd(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, u3v_conv_info_t *u3v_conv_info, gencp_transaction_t * gencp_trans)
1356 uint64_t addr = 0;
1357 const char* address_string = NULL;
1358 bool is_custom_register = false;
1359 uint16_t count = 0;
1360 int offset = startoffset;
1361 proto_item *item = NULL;
1363 addr = tvb_get_letoh64(tvb, offset);
1364 gencp_trans->address = addr;
1366 address_string = get_register_name_from_address(addr, &is_custom_register, u3v_conv_info);
1367 count = tvb_get_letohs(tvb, offset + 10); /* Number of bytes to read from memory */
1369 gencp_trans->count = count;
1370 if ( 0xffffffff00000000 & addr ) {
1371 col_append_fstr(pinfo->cinfo, COL_INFO, " (0x%016" PRIX64 " (%d) bytes) %s", addr, count, address_string);
1372 } else {
1373 col_append_fstr(pinfo->cinfo, COL_INFO, " (0x%08X (%d) bytes)", (uint32_t)addr, count);
1377 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_scd_readmem_cmd, tvb, offset, length, ENC_NA);
1378 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_payload_cmd);
1380 /* address */
1381 if (is_known_bootstrap_register(addr, u3v_conv_info)) {
1382 item = proto_tree_add_uint64(u3v_telegram_tree, hf_u3v_address, tvb, offset, 8, addr);
1383 proto_item_append_text(item, " %s", address_string);
1384 } else {
1385 proto_tree_add_item(u3v_telegram_tree, hf_u3v_custom_memory_addr, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1387 offset += 8;
1389 /* reserved field */
1390 proto_tree_add_item(u3v_telegram_tree, hf_u3v_reserved, tvb, offset, 2, ENC_NA);
1391 offset += 2;
1393 /* count */
1394 proto_tree_add_item(u3v_telegram_tree, hf_u3v_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1398 \brief DISSECT: Write memory command
1400 static void
1401 dissect_u3v_write_mem_cmd(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, u3v_conv_info_t *u3v_conv_info, gencp_transaction_t *gencp_trans)
1403 const char* address_string = NULL;
1404 bool is_custom_register = false;
1405 uint64_t addr = 0;
1406 unsigned byte_count = 0;
1407 proto_item *item = NULL;
1408 unsigned offset = startoffset + 8;
1410 addr = tvb_get_letoh64(tvb, startoffset);
1411 byte_count = length - 8;
1412 address_string = get_register_name_from_address(addr, &is_custom_register, u3v_conv_info);
1414 gencp_trans->address = addr;
1415 gencp_trans->count = byte_count;
1417 /* fill in Info column in Wireshark GUI */
1418 col_append_fstr(pinfo->cinfo, COL_INFO, "%s: %d bytes", address_string, byte_count);
1421 /* Subtree initialization for Payload Data: WRITEMEM_CMD */
1422 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_scd_writemem_cmd, tvb, startoffset, length, ENC_NA);
1423 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_payload_cmd);
1425 if (is_known_bootstrap_register(addr, u3v_conv_info)) {
1426 item = proto_tree_add_uint64(u3v_telegram_tree, hf_u3v_address, tvb, startoffset, 8, addr);
1427 proto_item_append_text(item, " %s", address_string);
1428 dissect_u3v_register(addr, u3v_telegram_tree, tvb, offset, byte_count, u3v_conv_info);
1429 } else {
1430 proto_tree_add_item(u3v_telegram_tree, hf_u3v_custom_memory_addr, tvb, startoffset, 8, ENC_LITTLE_ENDIAN);
1431 proto_tree_add_item(u3v_telegram_tree, hf_u3v_custom_memory_data, tvb, startoffset + 8, byte_count, ENC_NA);
1437 * \brief DISSECT: Event command
1439 static void
1440 dissect_u3v_event_cmd(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length)
1442 int32_t eventid;
1443 int offset = startoffset;
1444 proto_item *item = NULL;
1446 /* Get event ID */
1447 eventid = tvb_get_letohs(tvb, offset + 2);
1449 /* fill in Info column in Wireshark GUI */
1450 col_append_fstr(pinfo->cinfo, COL_INFO, "[ID: 0x%04X]", eventid);
1453 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_scd_event_cmd, tvb, offset, length, ENC_NA);
1454 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_payload_cmd);
1456 offset += 2;
1458 /* Use range to determine type of event */
1459 if ((eventid >= 0x0000) && (eventid <= 0x8000)) {
1460 /* Standard ID */
1461 proto_tree_add_item(u3v_telegram_tree, hf_u3v_eventcmd_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1462 } else if ((eventid >= 0x8001) && (eventid <= 0x8FFF)) {
1463 /* Error */
1464 proto_tree_add_item(u3v_telegram_tree, hf_u3v_eventcmd_error_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1465 } else if ((eventid >= 0x9000) && (eventid <= 0xFFFF)) {
1466 /* Device specific */
1467 proto_tree_add_item(u3v_telegram_tree, hf_u3v_eventcmd_device_specific_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1469 offset += 2;
1471 /* Timestamp (64 bit) associated with event */
1472 proto_tree_add_item(u3v_telegram_tree, hf_u3v_eventcmd_timestamp, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1473 offset += 8;
1475 /* Data */
1476 if (length > offset ) {
1477 proto_tree_add_item(u3v_telegram_tree, hf_u3v_eventcmd_data, tvb, offset, length - 12, ENC_NA);
1482 \brief DISSECT: Read memory acknowledge
1484 static void
1485 dissect_u3v_read_mem_ack(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, u3v_conv_info_t *u3v_conv_info, gencp_transaction_t * gencp_trans)
1487 uint64_t addr = 0;
1488 const char *address_string = NULL;
1489 bool is_custom_register = false;
1490 bool have_address = (0 != gencp_trans->cmd_frame);
1491 proto_item *item = NULL;
1492 unsigned offset = startoffset;
1493 unsigned byte_count = (length);
1495 addr = gencp_trans->address;
1496 dissect_u3v_register_bases(addr, tvb, startoffset, u3v_conv_info);
1497 if (have_address) {
1498 address_string = get_register_name_from_address(addr, &is_custom_register, u3v_conv_info);
1499 /* Fill in Wireshark GUI Info column */
1500 col_append_str(pinfo->cinfo, COL_INFO, address_string);
1504 /* Subtree initialization for Payload Data: READMEM_ACK */
1505 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_scd_ack_readmem_ack, tvb, startoffset, length, ENC_NA);
1506 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_payload_cmd);
1508 /* Bootstrap register known address */
1509 if (have_address) {
1510 item = proto_tree_add_uint64(u3v_telegram_tree, hf_u3v_address, tvb, 0,0 , addr);
1511 proto_item_set_generated(item);
1513 if (is_known_bootstrap_register(addr, u3v_conv_info)) {
1514 dissect_u3v_register(addr, u3v_telegram_tree, tvb, offset, byte_count, u3v_conv_info);
1515 } else {
1516 proto_tree_add_item(u3v_telegram_tree, hf_u3v_custom_memory_data, tvb, startoffset, length, ENC_NA);
1522 \brief DISSECT: Write memory acknowledge
1524 static void
1525 dissect_u3v_write_mem_ack(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, int startoffset, int length, u3v_conv_info_t *u3v_conv_info , gencp_transaction_t * gencp_trans)
1527 uint64_t addr = 0;
1528 int offset = startoffset;
1529 const char *address_string = NULL;
1530 bool is_custom_register = false;
1531 bool have_address = (0 != gencp_trans->cmd_frame);
1532 proto_item *item = NULL;
1534 addr = gencp_trans->address;
1535 if (have_address) {
1536 address_string = get_register_name_from_address(addr, &is_custom_register, u3v_conv_info);
1538 /* Fill in Wireshark GUI Info column */
1539 col_append_str(pinfo->cinfo, COL_INFO, address_string);
1542 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_scd_writemem_ack, tvb, startoffset, length, ENC_NA);
1543 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_payload_cmd);
1545 if (have_address) {
1546 item = proto_tree_add_uint64(u3v_telegram_tree, hf_u3v_address, tvb, 0,0 , addr);
1547 proto_item_set_generated(item);
1549 /* Number of bytes successfully written to the device register map */
1550 if ( length == 4 ) {
1552 /* reserved field */
1553 proto_tree_add_item(u3v_telegram_tree, hf_u3v_reserved, tvb, offset, 2, ENC_NA);
1554 offset += 2;
1556 proto_tree_add_item(u3v_telegram_tree, hf_u3v_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1561 \brief DISSECT: Pending acknowledge
1563 static void
1564 dissect_u3v_pending_ack(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int startoffset, int length, u3v_conv_info_t *u3v_conv_info _U_, gencp_transaction_t *gencp_trans _U_)
1566 proto_item *item = NULL;
1567 unsigned offset = startoffset;
1569 /* Fill in Wireshark GUI Info column */
1570 col_append_fstr(pinfo->cinfo, COL_INFO, " %d ms", tvb_get_letohs(tvb, startoffset+2));
1572 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_ccd_pending_ack, tvb, startoffset, length, ENC_NA);
1573 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_payload_cmd);
1575 /* reserved field */
1576 proto_tree_add_item(u3v_telegram_tree, hf_u3v_reserved, tvb, offset, 2, ENC_NA);
1577 offset += 2;
1579 proto_tree_add_item(u3v_telegram_tree, hf_u3v_time_to_completion, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1583 \brief DISSECT: Stream Leader
1585 static void
1586 dissect_u3v_stream_leader(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, urb_info_t *urb _U_)
1588 uint32_t offset = 0;
1589 uint32_t payload_type = 0;
1590 uint64_t block_id = 0;
1591 proto_item *item = NULL;
1593 /* Subtree initialization for Stream Leader */
1594 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_leader, tvb, 0, -1, ENC_NA);
1595 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_stream_leader);
1597 /* Add the prefix code: */
1598 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_prefix, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1599 offset += 4;
1601 /* reserved field */
1602 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_reserved, tvb, offset, 2, ENC_NA);
1603 offset += 2;
1605 /* leader size */
1606 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_leader_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1607 offset += 2;
1609 /* block id */
1610 block_id = tvb_get_letoh64(tvb, offset);
1611 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_block_id, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1612 offset += 8;
1614 /* reserved field */
1615 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_reserved, tvb, offset, 2, ENC_NA);
1616 offset += 2;
1618 /* payload type */
1619 payload_type = tvb_get_letohs(tvb, offset);
1620 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_payload_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1621 offset += 2;
1623 /* Add payload type to information string */
1624 col_append_fstr(pinfo->cinfo, COL_INFO, "Stream Leader [ Block ID: %" PRIu64 " , Type %s]",
1625 block_id,
1626 val_to_str_const(payload_type, payload_type_names, "Unknown Payload Type"));
1628 if (payload_type == U3V_STREAM_PAYLOAD_IMAGE ||
1629 payload_type == U3V_STREAM_PAYLOAD_IMAGE_EXT_CHUNK ||
1630 payload_type == U3V_STREAM_PAYLOAD_CHUNK) {
1631 /* timestamp */
1632 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_timestamp, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1633 offset += 8;
1636 if (payload_type == U3V_STREAM_PAYLOAD_IMAGE ||
1637 payload_type == U3V_STREAM_PAYLOAD_IMAGE_EXT_CHUNK ) {
1638 /* pixel format */
1639 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_pixel_format, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1640 offset += 4;
1642 /* size_x */
1643 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_size_x, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1644 offset += 4;
1646 /* size_y */
1647 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_size_y, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1648 offset += 4;
1650 /* offset_x */
1651 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_offset_x, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1652 offset += 4;
1654 /* offset_x */
1655 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_offset_y, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1656 offset += 4;
1658 /* padding_x */
1659 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_padding_x, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1660 /* offset += 2; */
1662 /* reserved field */
1663 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_reserved, tvb, offset, 2, ENC_NA);
1664 /* offset += 2; */
1669 \brief DISSECT: Stream Trailer
1671 static void
1672 dissect_u3v_stream_trailer(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, urb_info_t *urb _U_)
1674 int offset = 0;
1675 uint64_t block_id;
1676 proto_item *item = NULL;
1678 /* Subtree initialization for Stream Trailer */
1679 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_trailer, tvb, 0, -1, ENC_NA);
1680 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_stream_trailer);
1682 /* Add the prefix code: */
1683 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_prefix, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1684 offset += 4;
1686 /* reserved field */
1687 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_reserved, tvb, offset, 2, ENC_NA);
1688 offset += 2;
1690 /* trailer size */
1691 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_trailer_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1692 offset += 2;
1694 /* block id */
1695 block_id = tvb_get_letoh64(tvb, offset);
1696 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_block_id, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1697 offset += 8;
1699 /* status*/
1700 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_status, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1701 offset += 2;
1703 /* reserved field */
1704 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_reserved, tvb, offset, 2, ENC_NA);
1705 offset += 2;
1707 /* block id */
1708 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_valid_payload_size, tvb, offset, 8, ENC_LITTLE_ENDIAN);
1709 offset += 8;
1711 /* Add payload type to information string */
1712 col_append_fstr(pinfo->cinfo, COL_INFO, "Stream Trailer [ Block ID: %" PRIu64 "]", block_id);
1714 if (tvb_captured_length_remaining(tvb,offset) >=4 ) {
1715 /* size_y */
1716 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_size_y, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1717 offset += 4;
1720 if (tvb_captured_length_remaining(tvb,offset) >=4 ) {
1721 /* chunk layout id */
1722 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_chunk_layout_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1723 /* offset += 4; */
1728 \brief DISSECT: Stream Payload
1730 static void
1731 dissect_u3v_stream_payload(proto_tree *u3v_telegram_tree, tvbuff_t *tvb, packet_info *pinfo, urb_info_t *urb _U_)
1733 proto_item *item = NULL;
1735 /* Subtree initialization for Stream Payload */
1736 item = proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_payload, tvb, 0, -1, ENC_NA);
1737 u3v_telegram_tree = proto_item_add_subtree(item, ett_u3v_stream_payload);
1739 /* Data */
1740 proto_tree_add_item(u3v_telegram_tree, hf_u3v_stream_data, tvb, 0, -1, ENC_NA);
1742 /* Add payload type to information string */
1743 col_append_str(pinfo->cinfo, COL_INFO, "Stream Payload");
1747 \brief Point of entry of all U3V packet dissection
1749 static int
1750 dissect_u3v(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
1752 int offset = 0;
1753 proto_tree *u3v_tree = NULL, *ccd_tree_flag, *u3v_telegram_tree = NULL, *ccd_tree = NULL;
1754 int data_length = 0;
1755 int req_id = 0;
1756 int command_id = -1;
1757 int status = 0;
1758 unsigned prefix = 0;
1759 proto_item *ti = NULL;
1760 proto_item *item = NULL;
1761 const char *command_string;
1762 urb_info_t *urb;
1763 bool stream_detected = false;
1764 bool control_detected = false;
1765 u3v_conv_info_t *u3v_conv_info = NULL;
1766 gencp_transaction_t *gencp_trans = NULL;
1768 urb = (urb_info_t *)data;
1769 if (!urb || !urb->conv) {
1770 return 0;
1773 /* decide if this packet belongs to U3V protocol */
1774 u3v_conv_info = (u3v_conv_info_t *)urb->conv->class_data;
1776 if (!u3v_conv_info) {
1777 u3v_conv_info = wmem_new0(wmem_file_scope(), u3v_conv_info_t);
1778 urb->conv->class_data = u3v_conv_info;
1779 urb->conv->class_data_type = USB_CONV_U3V;
1780 } else if (urb->conv->class_data_type != USB_CONV_U3V) {
1781 /* Don't dissect if another USB type is in the conversation */
1782 return 0;
1785 prefix = tvb_get_letohl(tvb, 0);
1786 if ((tvb_reported_length(tvb) >= 4) && ( ( U3V_CONTROL_PREFIX == prefix ) || ( U3V_EVENT_PREFIX == prefix ) ) ) {
1787 control_detected = true;
1790 if (((tvb_reported_length(tvb) >= 4) && (( U3V_STREAM_LEADER_PREFIX == prefix ) || ( U3V_STREAM_TRAILER_PREFIX == prefix )))
1791 || (urb->endpoint == u3v_conv_info->ep_stream)) {
1792 stream_detected = true;
1795 /* initialize interface class/subclass in case no descriptors have been dissected yet */
1796 if ( control_detected || stream_detected){
1797 if (urb->conv->interfaceClass == IF_CLASS_UNKNOWN &&
1798 urb->conv->interfaceSubclass == IF_SUBCLASS_UNKNOWN) {
1799 urb->conv->interfaceClass = IF_CLASS_MISCELLANEOUS;
1800 urb->conv->interfaceSubclass = IF_SUBCLASS_MISC_U3V;
1804 if ( control_detected ) {
1805 /* Set the protocol column */
1806 col_set_str(pinfo->cinfo, COL_PROTOCOL, "U3V");
1808 /* Clear out stuff in the info column */
1809 col_clear(pinfo->cinfo, COL_INFO);
1811 /* Adds "USB3Vision" heading to protocol tree */
1812 /* We will add fields to this using the u3v_tree pointer */
1813 ti = proto_tree_add_item(tree, proto_u3v, tvb, offset, -1, ENC_NA);
1814 u3v_tree = proto_item_add_subtree(ti, ett_u3v);
1816 prefix = tvb_get_letohl(tvb, offset);
1817 command_id = tvb_get_letohs(tvb, offset+6);
1819 /* decode CCD ( DCI/DCE command data layout) */
1820 if ((prefix == U3V_CONTROL_PREFIX || prefix == U3V_EVENT_PREFIX) && ((command_id % 2) == 0)) {
1821 command_string = val_to_str(command_id,command_names,"Unknown Command (0x%x)");
1822 item = proto_tree_add_item(u3v_tree, hf_u3v_ccd_cmd, tvb, offset, 8, ENC_NA);
1823 proto_item_append_text(item, ": %s", command_string);
1824 ccd_tree = proto_item_add_subtree(item, ett_u3v_cmd);
1826 /* Add the prefix code: */
1827 proto_tree_add_item(ccd_tree, hf_u3v_gencp_prefix, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1828 offset += 4;
1830 /* Add the flags */
1831 item = proto_tree_add_item(ccd_tree, hf_u3v_flag, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1832 ccd_tree_flag = proto_item_add_subtree(item, ett_u3v_flags);
1833 proto_tree_add_item(ccd_tree_flag, hf_u3v_acknowledge_required_flag, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1835 offset += 2;
1836 col_append_fstr(pinfo->cinfo, COL_INFO, "> %s ", command_string);
1837 } else if (prefix == U3V_CONTROL_PREFIX && ((command_id % 2) == 1)) {
1838 command_string = val_to_str(command_id,command_names,"Unknown Acknowledge (0x%x)");
1839 item = proto_tree_add_item(u3v_tree, hf_u3v_ccd_ack, tvb, offset, 8, ENC_NA);
1840 proto_item_append_text(item, ": %s", command_string);
1841 ccd_tree = proto_item_add_subtree(item, ett_u3v_ack);
1843 /* Add the prefix code: */
1844 proto_tree_add_item(ccd_tree, hf_u3v_gencp_prefix, tvb, offset, 4, ENC_LITTLE_ENDIAN);
1845 offset += 4;
1847 /* Add the status: */
1848 proto_tree_add_item(ccd_tree, hf_u3v_status, tvb, offset, 2,ENC_LITTLE_ENDIAN);
1849 status = tvb_get_letohs(tvb, offset);
1850 offset += 2;
1851 col_append_fstr(pinfo->cinfo, COL_INFO, "< %s %s",
1852 command_string,
1853 val_to_str(status, status_names_short, "Unknown status (0x%04X)"));
1854 } else {
1855 return 0;
1858 /* Add the command id*/
1859 proto_tree_add_item(ccd_tree, hf_u3v_command_id, tvb, offset, 2,ENC_LITTLE_ENDIAN);
1860 offset += 2;
1862 /* Parse the second part of both the command and the acknowledge header:
1863 0 15 16 31
1864 -------- -------- -------- --------
1865 | status | acknowledge |
1866 -------- -------- -------- --------
1867 | length | req_id |
1868 -------- -------- -------- --------
1870 Add the data length
1871 Number of valid data bytes in this message, not including this header. This
1872 represents the number of bytes of payload appended after this header */
1874 proto_tree_add_item(ccd_tree, hf_u3v_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1875 data_length = tvb_get_letohs(tvb, offset);
1876 offset += 2;
1878 /* Add the request ID */
1879 proto_tree_add_item(ccd_tree, hf_u3v_request_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1880 req_id = tvb_get_letohs(tvb, offset);
1881 offset += 2;
1883 /* Add telegram subtree */
1884 u3v_telegram_tree = proto_item_add_subtree(u3v_tree, ett_u3v);
1886 if (!PINFO_FD_VISITED(pinfo)) {
1887 if ((command_id % 2) == 0) {
1888 /* This is a command */
1889 gencp_trans = wmem_new0(wmem_file_scope(), gencp_transaction_t);
1890 gencp_trans->cmd_frame = pinfo->fd->num;
1891 gencp_trans->ack_frame = 0;
1892 gencp_trans->cmd_time = pinfo->abs_ts;
1893 /* add reference to current packet */
1894 p_add_proto_data(wmem_file_scope(), pinfo, proto_u3v, req_id, gencp_trans);
1895 /* add reference to current */
1896 u3v_conv_info->trans_info = gencp_trans;
1897 } else {
1898 gencp_trans = u3v_conv_info->trans_info;
1899 if (gencp_trans) {
1900 gencp_trans->ack_frame = pinfo->fd->num;
1901 /* add reference to current packet */
1902 p_add_proto_data(wmem_file_scope(), pinfo, proto_u3v, req_id, gencp_trans);
1905 } else {
1906 gencp_trans = (gencp_transaction_t*)p_get_proto_data(wmem_file_scope(),pinfo, proto_u3v, req_id);
1909 if (!gencp_trans) {
1910 /* create a "fake" gencp_trans structure */
1911 gencp_trans = wmem_new0(wmem_packet_scope(), gencp_transaction_t);
1912 gencp_trans->cmd_frame = 0;
1913 gencp_trans->ack_frame = 0;
1914 gencp_trans->cmd_time = pinfo->abs_ts;
1917 /* dissect depending on command? */
1918 switch (command_id) {
1919 case U3V_READMEM_CMD:
1920 dissect_u3v_read_mem_cmd(u3v_telegram_tree, tvb, pinfo, offset, data_length,u3v_conv_info,gencp_trans);
1921 break;
1922 case U3V_WRITEMEM_CMD:
1923 dissect_u3v_write_mem_cmd(u3v_telegram_tree, tvb, pinfo, offset, data_length,u3v_conv_info,gencp_trans);
1924 break;
1925 case U3V_EVENT_CMD:
1926 dissect_u3v_event_cmd(u3v_telegram_tree, tvb, pinfo, offset, data_length);
1927 break;
1928 case U3V_READMEM_ACK:
1929 if ( U3V_STATUS_GENCP_SUCCESS == status ) {
1930 dissect_u3v_read_mem_ack(u3v_telegram_tree, tvb, pinfo, offset, data_length,u3v_conv_info,gencp_trans);
1932 break;
1933 case U3V_WRITEMEM_ACK:
1934 dissect_u3v_write_mem_ack(u3v_telegram_tree, tvb, pinfo, offset, data_length, u3v_conv_info,gencp_trans);
1935 break;
1936 case U3V_PENDING_ACK:
1937 dissect_u3v_pending_ack(u3v_telegram_tree, tvb, pinfo, offset, data_length, u3v_conv_info,gencp_trans);
1938 break;
1939 default:
1940 proto_tree_add_item(u3v_telegram_tree, hf_u3v_payloaddata, tvb, offset, data_length, ENC_NA);
1941 break;
1943 return data_length + 12;
1944 } else if ( stream_detected ) {
1945 /* this is streaming data */
1947 /* init this stream configuration */
1948 u3v_conv_info = (u3v_conv_info_t *)urb->conv->class_data;
1949 u3v_conv_info->ep_stream = urb->endpoint;
1951 /* Set the protocol column */
1952 col_set_str(pinfo->cinfo, COL_PROTOCOL, "U3V");
1954 /* Clear out stuff in the info column */
1955 col_clear(pinfo->cinfo, COL_INFO);
1957 /* Adds "USB3Vision" heading to protocol tree */
1958 /* We will add fields to this using the u3v_tree pointer */
1959 ti = proto_tree_add_item(tree, proto_u3v, tvb, offset, -1, ENC_NA);
1960 u3v_tree = proto_item_add_subtree(ti, ett_u3v);
1962 if(tvb_captured_length(tvb) >=4) {
1963 prefix = tvb_get_letohl(tvb, offset);
1964 switch (prefix) {
1965 case U3V_STREAM_LEADER_PREFIX:
1966 dissect_u3v_stream_leader(u3v_tree, tvb, pinfo, urb);
1967 break;
1968 case U3V_STREAM_TRAILER_PREFIX:
1969 dissect_u3v_stream_trailer(u3v_tree, tvb, pinfo, urb);
1970 break;
1971 default:
1972 dissect_u3v_stream_payload(u3v_tree, tvb, pinfo, urb);
1973 break;
1976 return tvb_captured_length(tvb);
1978 return 0;
1982 static bool
1983 dissect_u3v_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
1985 uint32_t prefix;
1986 urb_info_t *urb;
1988 /* all control and meta data packets of U3V contain at least the prefix */
1989 if (tvb_reported_length(tvb) < 4)
1990 return false;
1991 prefix = tvb_get_letohl(tvb, 0);
1993 /* check if stream endpoint has been already set up for this conversation */
1994 urb = (urb_info_t *)data;
1995 if (!urb || !urb->conv)
1996 return false;
1998 /* either right prefix or the endpoint of the interface descriptor
1999 set the correct class and subclass */
2000 if ((U3V_STREAM_LEADER_PREFIX == prefix) || (U3V_STREAM_TRAILER_PREFIX == prefix) ||
2001 (U3V_CONTROL_PREFIX == prefix) || (U3V_EVENT_PREFIX == prefix) ||
2002 ((urb->conv->interfaceClass == IF_CLASS_MISCELLANEOUS &&
2003 urb->conv->interfaceSubclass == IF_SUBCLASS_MISC_U3V))) {
2004 dissect_u3v(tvb, pinfo, tree, data);
2005 return true;
2008 return false;
2011 static int
2012 dissect_u3v_descriptors(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
2014 uint8_t type;
2015 int offset = 0;
2016 proto_item * ti;
2017 proto_tree * sub_tree;
2018 uint32_t version;
2021 /* The descriptor must at least have a length and type field. */
2022 if (tvb_reported_length(tvb) < 2) {
2023 return 0;
2026 /* skip len */
2027 type = tvb_get_uint8(tvb, 1);
2029 /* Check for U3V device info descriptor. */
2030 if (type != DESCRIPTOR_TYPE_U3V_INTERFACE) {
2031 return 0;
2034 ti = proto_tree_add_item(tree, hf_u3v_device_info_descriptor, tvb, offset, -1, ENC_NA);
2035 tree = proto_item_add_subtree(ti, ett_u3v_device_info_descriptor);
2037 /* bLength */
2038 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_bLength, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2039 offset++;
2041 /* bDescriptorType */
2042 ti = proto_tree_add_item(tree, hf_u3v_device_info_descriptor_bDescriptorType, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2043 proto_item_append_text(ti, " (U3V INTERFACE)");
2044 offset++;
2046 /* bDescriptorSubtype */
2047 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_bDescriptorSubtype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2048 offset++;
2050 /* bGenCPVersion */
2051 if (!tvb_bytes_exist(tvb, offset, 4)) {
2052 /* Version not completely in buffer -> break dissection here. */
2053 return offset;
2055 version = tvb_get_letohl(tvb, offset);
2056 ti = proto_tree_add_item(tree, hf_u3v_device_info_descriptor_bGenCPVersion, tvb, offset, 4, ENC_NA);
2057 proto_item_append_text(ti, ": %u.%u", version >> 16, version & 0xFFFF);
2058 sub_tree = proto_item_add_subtree(ti, ett_u3v_device_info_descriptor_gencp_version);
2059 proto_tree_add_item(sub_tree, hf_u3v_device_info_descriptor_bGenCPVersion_minor, tvb, offset, 4, ENC_LITTLE_ENDIAN);
2060 proto_tree_add_item(sub_tree, hf_u3v_device_info_descriptor_bGenCPVersion_major, tvb, offset, 4, ENC_LITTLE_ENDIAN);
2061 offset += 4;
2063 /* bU3VVersion */
2064 if (!tvb_bytes_exist(tvb, offset, 4)) {
2065 /* Version not completely in buffer -> break dissection here. */
2066 return offset;
2068 version = tvb_get_letohl(tvb, offset);
2069 ti = proto_tree_add_item(tree, hf_u3v_device_info_descriptor_bU3VVersion, tvb, offset, 4, ENC_NA);
2070 proto_item_append_text(ti, ": %u.%u", version >> 16, version & 0xFFFF);
2071 sub_tree = proto_item_add_subtree(ti, ett_u3v_device_info_descriptor_u3v_version);
2072 proto_tree_add_item(sub_tree, hf_u3v_device_info_descriptor_bU3VVersion_minor, tvb, offset, 4, ENC_LITTLE_ENDIAN);
2073 proto_tree_add_item(sub_tree, hf_u3v_device_info_descriptor_bU3VVersion_major, tvb, offset, 4, ENC_LITTLE_ENDIAN);
2074 offset += 4;
2076 /* iDeviceGUID */
2077 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_iDeviceGUID, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2078 offset++;
2080 /* iVendorName */
2081 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_iVendorName, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2082 offset++;
2084 /* iModelName */
2085 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_iModelName, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2086 offset++;
2088 /* iFamilyName */
2089 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_iFamilyName, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2090 offset++;
2092 /* iDeviceVersion */
2093 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_iDeviceVersion, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2094 offset++;
2096 /* iManufacturerInfo */
2097 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_iManufacturerInfo, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2098 offset++;
2100 /* iSerialNumber */
2101 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_iSerialNumber, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2102 offset++;
2104 /* iUserDefinedName */
2105 proto_tree_add_item(tree, hf_u3v_device_info_descriptor_iUserDefinedName, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2106 offset++;
2108 /* bmSpeedSupport */
2109 proto_tree_add_bitmask(tree, tvb, offset, hf_u3v_device_info_descriptor_bmSpeedSupport,
2110 ett_u3v_device_info_descriptor_speed_support, speed_support_fields, ENC_LITTLE_ENDIAN);
2112 offset++;
2114 return offset;
2118 \brief Structures for register dissection
2120 static hf_register_info hf[] =
2122 /* Common U3V data */
2123 { &hf_u3v_gencp_prefix,
2124 { "Prefix", "u3v.gencp.prefix",
2125 FT_UINT32, BASE_HEX, NULL, 0x0,
2126 "U3V GenCP Prefix", HFILL
2127 } },
2129 { &hf_u3v_flag,
2130 { "Flags", "u3v.gencp.flags",
2131 FT_UINT16, BASE_HEX, NULL, 0x0,
2132 "U3V Flags", HFILL
2133 } },
2135 { &hf_u3v_acknowledge_required_flag,
2136 { "Acknowledge Required", "u3v.gencp.flag.acq_required",
2137 FT_BOOLEAN, 16, NULL, 0x4000,
2138 "U3V Acknowledge Required", HFILL
2139 } },
2141 { &hf_u3v_command_id,
2142 { "Command", "u3v.gencp.command_id",
2143 FT_UINT16, BASE_HEX, VALS( command_names ), 0x0,
2144 "U3V Command", HFILL
2145 } },
2147 { &hf_u3v_length,
2148 { "Payload Length", "u3v.gencp.payloadlength",
2149 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2150 "U3V Payload Length", HFILL
2151 } },
2153 { &hf_u3v_request_id,
2154 { "Request ID", "u3v.gencp.req_id",
2155 FT_UINT16, BASE_HEX, NULL, 0x0,
2156 "U3V Request ID", HFILL
2157 } },
2159 { &hf_u3v_payloaddata,
2160 { "Payload Data", "u3v.gencp.payloaddata",
2161 FT_BYTES, BASE_NONE, NULL, 0x0,
2162 "U3V Payload", HFILL
2163 } },
2165 { &hf_u3v_status,
2166 { "Status", "u3v.gencp.status",
2167 FT_UINT16, BASE_HEX, VALS( status_names ), 0x0,
2168 "U3V Status", HFILL
2169 } },
2171 /* Read memory */
2172 { &hf_u3v_address,
2173 { "Address", "u3v.gencp.address",
2174 FT_UINT64, BASE_HEX, NULL, 0x0,
2175 "U3V Address", HFILL } },
2177 { &hf_u3v_count,
2178 { "Count", "u3v.gencp.count",
2179 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2180 "U3V Count", HFILL
2181 } },
2183 /* Event */
2185 { &hf_u3v_eventcmd_id,
2186 { "ID", "u3v.cmd.event.id",
2187 FT_UINT16, BASE_HEX_DEC, VALS( event_id_names ), 0x0,
2188 "U3V Event ID", HFILL
2189 } },
2191 { &hf_u3v_eventcmd_error_id,
2192 { "Error ID", "u3v.cmd.event.errorid",
2193 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2194 "U3V Event Error ID", HFILL
2195 } },
2197 { &hf_u3v_eventcmd_device_specific_id,
2198 { "Device Specific ID", "u3v.cmd.event.devicespecificid",
2199 FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
2200 "U3V Event Device Specific ID", HFILL
2201 } },
2203 { &hf_u3v_eventcmd_timestamp,
2204 { "Timestamp", "u3v.cmd.event.timestamp",
2205 FT_UINT64, BASE_HEX_DEC, NULL, 0x0,
2206 "U3V Event Timestamp", HFILL
2207 } },
2209 { &hf_u3v_eventcmd_data,
2210 { "Data", "u3v.cmd.event.data",
2211 FT_BYTES, BASE_NONE, NULL, 0x0,
2212 "U3V Event Data", HFILL
2213 } },
2215 /* Pending acknowledge */
2216 { &hf_u3v_time_to_completion,
2217 { "Time to completion", "u3v.gencp.timetocompletion",
2218 FT_UINT16, BASE_DEC, NULL, 0x0,
2219 "U3V Time to completion [ms]", HFILL
2220 } },
2222 { &hf_u3v_reserved,
2223 { "Reserved", "u3v.reserved",
2224 FT_BYTES, BASE_NONE, NULL, 0,
2225 NULL, HFILL
2226 } },
2228 /* Custom */
2229 { &hf_u3v_custom_memory_addr,
2230 { "Custom Memory Address", "u3v.gencp.custom_addr",
2231 FT_UINT64, BASE_HEX, NULL, 0x0,
2232 "U3V Custom Memory Address", HFILL
2233 } },
2235 { &hf_u3v_custom_memory_data,
2236 { "Custom Memory Data", "u3v.gencp.custom_data",
2237 FT_BYTES, BASE_NONE, NULL, 0x0,
2238 "U3V Custom Memory Data", HFILL
2239 } },
2241 /* Bootstrap Defines */
2242 { &hf_u3v_bootstrap_GenCP_Version,
2243 { "GenCP Version", "u3v.bootstrap.GenCP_Version",
2244 FT_UINT32, BASE_DEC, NULL, 0x0,
2245 "Complying GenCP Version", HFILL
2246 } },
2248 { &hf_u3v_bootstrap_Manufacturer_Name,
2249 { "Manufacturer Name", "u3v.bootstrap.Manufacturer_Name",
2250 FT_STRING, BASE_NONE, NULL, 0x0,
2251 "String containing the self-describing name of the manufacturer", HFILL
2252 } },
2254 { &hf_u3v_bootstrap_Model_Name,
2255 { "Model Name", "u3v.bootstrap.Model_Name",
2256 FT_STRING, BASE_NONE, NULL, 0x0,
2257 "String containing the self-describing name of the device model", HFILL
2258 } },
2260 { &hf_u3v_bootstrap_Family_Name,
2261 { "Family Name", "u3v.bootstrap.Family_Name",
2262 FT_STRING, BASE_NONE, NULL, 0x0,
2263 "String containing the name of the family of this device", HFILL
2264 } },
2266 { &hf_u3v_bootstrap_Device_Version,
2267 { "Device Version", "u3v.bootstrap.Device_Version",
2268 FT_STRING, BASE_NONE, NULL, 0x0,
2269 "String containing the version of this device", HFILL
2270 } },
2272 { &hf_u3v_bootstrap_Manufacturer_Info,
2273 { "Manufacturer Information", "u3v.bootstrap.Manufacturer_Info",
2274 FT_STRING, BASE_NONE, NULL, 0x0,
2275 "String containing additional manufacturer information", HFILL
2276 } },
2278 { &hf_u3v_bootstrap_Serial_Number,
2279 { "Serial Number", "u3v.bootstrap.Serial_Number",
2280 FT_STRING, BASE_NONE, NULL, 0x0,
2281 "String containing the serial number of the device", HFILL
2282 } },
2284 { &hf_u3v_bootstrap_User_Defined_Name,
2285 { "User Defined Name", "u3v.bootstrap.User_Defined_Name",
2286 FT_STRING, BASE_NONE, NULL, 0x0,
2287 "String containing the user defined name of the device", HFILL
2288 } },
2290 { &hf_u3v_bootstrap_Device_Capability,
2291 { "Device Capabilities", "u3v.bootstrap.Device_Capability",
2292 FT_UINT64, BASE_DEC, NULL, 0x0,
2293 "Bit field describing the device?s capabilities", HFILL
2294 } },
2296 { &hf_u3v_bootstrap_Maximum_Device_Response_Time,
2297 { "Device Maximum response time in ms", "u3v.bootstrap.Maximum_Device_Response_Time",
2298 FT_UINT32, BASE_DEC, NULL, 0x0,
2299 NULL, HFILL
2300 } },
2302 { &hf_u3v_bootstrap_Manifest_Table_Address,
2303 { "Pointer to the Manifest Table", "u3v.bootstrap.Manifest_Table_Address",
2304 FT_UINT64, BASE_HEX, NULL, 0x0,
2305 NULL, HFILL
2306 } },
2308 { &hf_u3v_bootstrap_SBRM_Address,
2309 { "Pointer to the SBRM", "u3v.bootstrap.SBRM_Address",
2310 FT_UINT64, BASE_HEX, NULL, 0x0,
2311 "Pointer to the Technology Specific Bootstrap Register Map", HFILL
2312 } },
2314 { &hf_u3v_bootstrap_Device_Configuration,
2315 { "Device Configuration", "u3v.bootstrap.Device_Configuration",
2316 FT_UINT64, BASE_DEC, NULL, 0x0,
2317 "Bit field describing the device?s configuration", HFILL
2318 } },
2320 { &hf_u3v_bootstrap_Heartbeat_Timeout,
2321 { "Heartbeat Timeout in ms.", "u3v.bootstrap.Heartbeat_Timeout",
2322 FT_UINT32, BASE_DEC, NULL, 0x0,
2323 "Heartbeat Timeout in ms. Not used for these specification.", HFILL
2324 } },
2326 { &hf_u3v_bootstrap_Message_Channel_channel_id,
2327 { "Message channel id", "u3v.bootstrap.Message_Channel_channel_id",
2328 FT_UINT32, BASE_DEC, NULL, 0x0,
2329 "channel_id use for the message channel", HFILL
2330 } },
2332 { &hf_u3v_bootstrap_Timestamp,
2333 { "Timestamp", "u3v.bootstrap.Timestamp",
2334 FT_UINT64, BASE_DEC, NULL, 0x0,
2335 "Current device time in ns", HFILL
2336 } },
2338 { &hf_u3v_bootstrap_Timestamp_Latch,
2339 { "Latch Timestamp", "u3v.bootstrap.Timestamp_Latch",
2340 FT_UINT32, BASE_DEC, NULL, 0x0,
2341 NULL, HFILL
2342 } },
2344 { &hf_u3v_bootstrap_Timestamp_Increment,
2345 { "Timestamp Increment Value", "u3v.bootstrap.Timestamp_Increment",
2346 FT_UINT64, BASE_DEC, NULL, 0x0,
2347 NULL, HFILL
2348 } },
2350 { &hf_u3v_bootstrap_Access_Privilege,
2351 { "Access Privilege.", "u3v.bootstrap.Access_Privilege",
2352 FT_UINT32, BASE_DEC, NULL, 0x0,
2353 "Access Privilege. Not used for these specification.", HFILL
2354 } },
2356 { &hf_u3v_bootstrap_Protocol_Endianness,
2357 { "Protocol Endianness", "u3v.bootstrap.Protocol_Endianness",
2358 FT_UINT32, BASE_DEC, NULL, 0x0,
2359 "Endianness of protocol fields and bootstrap registers. Only little endian is supported by these specification.", HFILL
2360 } },
2362 { &hf_u3v_bootstrap_Implementation_Endianness,
2363 { "Device Endianness", "u3v.bootstrap.Implementation_Endianness",
2364 FT_UINT32, BASE_DEC, NULL, 0x0,
2365 "Endianness of device implementation registers. Only little endian is supported by these specification.", HFILL
2366 } },
2368 { &hf_u3v_bootstrap_U3V_Version,
2369 { "TL Version", "u3v.bootstrap.U3V_Version",
2370 FT_UINT32, BASE_DEC, NULL, 0x0,
2371 "Version of the TL specification", HFILL
2372 } },
2374 { &hf_u3v_bootstrap_U3VCP_Capability_Register,
2375 { "Control channel capabilities", "u3v.bootstrap.U3VCP_Capability_Register",
2376 FT_UINT64, BASE_DEC, NULL, 0x0,
2377 "Indicates additional features on the control channel", HFILL
2378 } },
2380 { &hf_u3v_bootstrap_U3VCP_Configuration_Register,
2381 { "Control channel configuration", "u3v.bootstrap.U3VCP_Configuration_Register",
2382 FT_UINT64, BASE_DEC, NULL, 0x0,
2383 "Configures additional features on the control channel", HFILL
2384 } },
2386 { &hf_u3v_bootstrap_Maximum_Command_Transfer_Length,
2387 { "Maximum Command Transfer Length", "u3v.bootstrap.Maximum_Command_Transfer_Length",
2388 FT_UINT32, BASE_DEC, NULL, 0x0,
2389 "Specifies the maximum supported command transfer length of the device", HFILL
2390 } },
2392 { &hf_u3v_bootstrap_Maximum_Acknowledge_Transfer_Length,
2393 { "Maximum Acknowledge Transfer Length", "u3v.bootstrap.Maximum_Acknowledge_Transfer_Length",
2394 FT_UINT32, BASE_DEC, NULL, 0x0,
2395 "Specifies the maximum supported acknowledge transfer length of the device", HFILL
2396 } },
2398 { &hf_u3v_bootstrap_Number_of_Stream_Channels,
2399 { "Number of Stream Channels", "u3v.bootstrap.Number_of_Stream_Channels",
2400 FT_UINT32, BASE_DEC, NULL, 0x0,
2401 "Number of Stream Channels and its corresponding Streaming Interface Register Maps (SIRM)", HFILL
2402 } },
2404 { &hf_u3v_bootstrap_SIRM_Address,
2405 { "Pointer to the first SIRM", "u3v.bootstrap.SIRM_Address",
2406 FT_UINT64, BASE_HEX, NULL, 0x0,
2407 "Pointer to the first Streaming Interface Register Map.", HFILL
2408 } },
2410 { &hf_u3v_bootstrap_SIRM_Length,
2411 { "Length of SIRM", "u3v.bootstrap.SIRM_Length",
2412 FT_UINT32, BASE_HEX, NULL, 0x0,
2413 "Specifies the length of each SIRM", HFILL
2414 } },
2416 { &hf_u3v_bootstrap_EIRM_Address,
2417 { "Pointer to the EIRM", "u3v.bootstrap.EIRM_Address",
2418 FT_UINT64, BASE_HEX, NULL, 0x0,
2419 "Pointer to the Event Interface Register Map.", HFILL
2420 } },
2422 { &hf_u3v_bootstrap_EIRM_Length,
2423 { "Length of EIRM", "u3v.bootstrap.EIRM_Length",
2424 FT_UINT32, BASE_DEC, NULL, 0x0,
2425 "Specifies the length of the EIRM", HFILL
2426 } },
2428 { &hf_u3v_bootstrap_IIDC2_Address,
2429 { "Pointer to the IIDC2", "u3v.bootstrap.IIDC2_Address",
2430 FT_UINT64, BASE_HEX, NULL, 0x0,
2431 "Pointer to the IIDC2 register set.", HFILL
2432 } },
2434 { &hf_u3v_bootstrap_Current_Speed,
2435 { "LinkSpeed", "u3v.bootstrap.Current_Speed",
2436 FT_UINT32, BASE_DEC, NULL, 0x0,
2437 "Specifies the current speed of the USB link.", HFILL
2438 } },
2440 { &hf_u3v_bootstrap_SI_Info,
2441 { "Stream Info", "u3v.bootstrap.SI_Info",
2442 FT_UINT32, BASE_DEC, NULL, 0x0,
2443 "Device reports information about stream interface", HFILL
2444 } },
2446 { &hf_u3v_bootstrap_SI_Control,
2447 { "Stream Control", "u3v.bootstrap.SI_Control",
2448 FT_UINT32, BASE_DEC, NULL, 0x0,
2449 "Stream interface Operation Control", HFILL
2450 } },
2452 { &hf_u3v_bootstrap_SI_Required_Payload_Size,
2453 { "Stream Max Required Payload Size", "u3v.bootstrap.SI_Required_Payload_Size",
2454 FT_UINT64, BASE_DEC, NULL, 0x0,
2455 "Device reports maximum payload size with current settings", HFILL
2456 } },
2458 { &hf_u3v_bootstrap_SI_Required_Leader_Size,
2459 { "Stream Max Required Leader Size", "u3v.bootstrap.SI_Required_Leader_Size",
2460 FT_UINT32, BASE_DEC, NULL, 0x0,
2461 "Device reports maximum leader size it will use", HFILL
2462 } },
2464 { &hf_u3v_bootstrap_SI_Required_Trailer_Size,
2465 { "Stream Max Required Trailer Size", "u3v.bootstrap.SI_Required_Trailer_Size",
2466 FT_UINT32, BASE_DEC, NULL, 0x0,
2467 "Device reports maximum trailer size it will use", HFILL
2468 } },
2470 { &hf_u3v_bootstrap_SI_Maximum_Leader_Size,
2471 { "Stream Max leader size", "u3v.bootstrap.SI_Maximum_Leader_Size",
2472 FT_UINT32, BASE_DEC, NULL, 0x0,
2473 "Maximum leader size", HFILL
2474 } },
2476 { &hf_u3v_bootstrap_SI_Payload_Transfer_Size,
2477 { "Stream transfer size", "u3v.bootstrap.SI_Payload_Transfer_Size",
2478 FT_UINT32, BASE_DEC, NULL, 0x0,
2479 "Expected Size of a single Payload Transfer", HFILL
2480 } },
2482 { &hf_u3v_bootstrap_SI_Payload_Transfer_Count,
2483 { "Stream transfer count", "u3v.bootstrap.SI_Payload_Transfer_Count",
2484 FT_UINT32, BASE_DEC, NULL, 0x0,
2485 "Expected Number of Payload Transfers", HFILL
2486 } },
2488 { &hf_u3v_bootstrap_SI_Payload_Final_Transfer1_Size,
2489 { "Stream final transfer 1 size", "u3v.bootstrap.SI_Payload_Final_Transfer1_Size",
2490 FT_UINT32, BASE_DEC, NULL, 0x0,
2491 "Size of first final Payload transfer", HFILL
2492 } },
2494 { &hf_u3v_bootstrap_SI_Payload_Final_Transfer2_Size,
2495 { "Stream final transfer 2 size", "u3v.bootstrap.SI_Payload_Final_Transfer2_Size",
2496 FT_UINT32, BASE_DEC, NULL, 0x0,
2497 "Size of second final Payload transfer", HFILL
2498 } },
2500 { &hf_u3v_bootstrap_SI_Maximum_Trailer_Size,
2501 { "Stream Max trailer size", "u3v.bootstrap.SI_Maximum_Trailer_Size",
2502 FT_UINT32, BASE_DEC, NULL, 0x0,
2503 "Maximum trailer size", HFILL
2504 } },
2506 { &hf_u3v_bootstrap_EI_Control,
2507 { "Event Interface Control", "u3v.bootstrap.EI_Control",
2508 FT_UINT32, BASE_DEC, NULL, 0x0,
2509 "Event Interface Control Register", HFILL
2510 } },
2512 { &hf_u3v_bootstrap_Maximum_Event_Transfer_Length,
2513 { "Event max Transfer size", "u3v.bootstrap.Maximum_Event_Transfer_Length",
2514 FT_UINT32, BASE_DEC, NULL, 0x0,
2515 "Specifies the maximum supported event command transfer length of the device.", HFILL
2516 } },
2518 { &hf_u3v_bootstrap_Event_Test_Control,
2519 { "Event test event control", "u3v.bootstrap.Event_Test_Control",
2520 FT_UINT32, BASE_DEC, NULL, 0x0,
2521 "Control the generation of test events.", HFILL
2522 } },
2524 { &hf_u3v_stream_prefix,
2525 { "Stream Prefix", "u3v.stream.prefix",
2526 FT_UINT32, BASE_HEX, NULL, 0,
2527 "U3V stream prefix", HFILL
2528 } },
2530 { &hf_u3v_stream_reserved,
2531 { "Reserved", "u3v.stream.reserved",
2532 FT_BYTES, BASE_NONE, NULL, 0,
2533 NULL, HFILL
2534 } },
2536 { &hf_u3v_stream_leader_size,
2537 { "Leader Size", "u3v.stream.leader_size",
2538 FT_UINT16, BASE_DEC, NULL, 0x0,
2539 "U3V stream leader size", HFILL
2540 } },
2542 { &hf_u3v_stream_trailer_size,
2543 { "Trailer Size", "u3v.stream.trailer_size",
2544 FT_UINT16, BASE_DEC, NULL, 0x0,
2545 "U3V stream trailer size", HFILL
2546 } },
2548 { &hf_u3v_stream_block_id,
2549 { "Block ID", "u3v.stream.block_id",
2550 FT_UINT64, BASE_DEC, NULL, 0x0,
2551 "U3V stream block id", HFILL
2552 } },
2554 { &hf_u3v_stream_payload_type,
2555 { "Payload Type", "u3v.stream.payload_type",
2556 FT_UINT16, BASE_HEX, VALS( payload_type_names ), 0x0,
2557 "U3V Payload Type", HFILL
2558 } },
2560 { &hf_u3v_stream_timestamp,
2561 { "Timestamp", "u3v.stream.timestamp",
2562 FT_UINT64, BASE_HEX_DEC, NULL, 0x0,
2563 "U3V Stream Timestamp", HFILL
2564 } },
2566 { &hf_u3v_stream_pixel_format,
2567 { "Pixel Format", "u3v.stream.pixel_format",
2568 FT_UINT32, BASE_HEX|BASE_EXT_STRING, VALS_EXT_PTR( &pixel_format_names_ext ), 0x0,
2569 "U3V Stream Pixel Format", HFILL
2570 } },
2572 { &hf_u3v_stream_size_x,
2573 { "Size X", "u3v.stream.sizex",
2574 FT_UINT32, BASE_DEC, NULL, 0x0,
2575 "U3V Stream Size X", HFILL
2576 } },
2578 { &hf_u3v_stream_size_y,
2579 { "Size Y", "u3v.stream.sizey",
2580 FT_UINT32, BASE_DEC, NULL, 0x0,
2581 "U3V Stream Size Y", HFILL
2582 } },
2584 { &hf_u3v_stream_offset_x,
2585 { "Offset X", "u3v.stream.offsetx",
2586 FT_UINT32, BASE_DEC, NULL, 0x0,
2587 "U3V Stream Offset X", HFILL
2588 } },
2590 { &hf_u3v_stream_offset_y,
2591 { "Offset Y", "u3v.stream.offsety",
2592 FT_UINT32, BASE_DEC, NULL, 0x0,
2593 "U3V Stream Offset Y", HFILL
2594 } },
2596 { &hf_u3v_stream_padding_x,
2597 { "Padding X", "u3v.stream.paddingx",
2598 FT_UINT16, BASE_DEC, NULL, 0x0,
2599 "U3V Stream Padding X", HFILL
2600 } },
2602 { &hf_u3v_stream_chunk_layout_id,
2603 { "Chunk Layout ID", "u3v.stream.chunk_layout_id",
2604 FT_UINT32, BASE_HEX, NULL, 0x0,
2605 "U3V Stream Chunk Layout ID", HFILL
2606 } },
2608 { &hf_u3v_stream_valid_payload_size,
2609 { "Valid Payload Size", "u3v.stream.valid_payload_size",
2610 FT_UINT64, BASE_HEX, NULL, 0x0,
2611 "U3V Stream Valid Payload Size", HFILL
2612 } },
2614 { &hf_u3v_stream_status,
2615 { "Status", "u3v.stream.status",
2616 FT_UINT16, BASE_HEX, VALS( status_names ), 0x0,
2617 "U3V Stream Status", HFILL
2618 } },
2620 { &hf_u3v_stream_data,
2621 { "Payload Data", "u3v.stream.data",
2622 FT_BYTES, BASE_NONE, NULL, 0x0,
2623 "U3V Stream Payload Data", HFILL
2624 } },
2626 /* U3V device info descriptor */
2627 { &hf_u3v_device_info_descriptor_bLength,
2628 { "bLength", "u3v.device_info.bLength",
2629 FT_UINT8, BASE_DEC, NULL, 0x0,
2630 NULL, HFILL } },
2632 { &hf_u3v_device_info_descriptor_bDescriptorType,
2633 { "bDescriptorType", "u3v.device_info.bDescriptorType",
2634 FT_UINT8, BASE_HEX, NULL, 0x0,
2635 NULL, HFILL } },
2637 { &hf_u3v_device_info_descriptor_bDescriptorSubtype,
2638 { "bDescriptorSubtype", "u3v.device_info.bDescriptorSubtype",
2639 FT_UINT8, BASE_HEX, VALS( u3v_descriptor_subtypes ), 0x0,
2640 NULL, HFILL } },
2642 { &hf_u3v_device_info_descriptor_bGenCPVersion,
2643 { "bGenCPVersion", "u3v.device_info.bGenCPVersion",
2644 FT_NONE, BASE_NONE, NULL, 0x0,
2645 NULL, HFILL } },
2647 { &hf_u3v_device_info_descriptor_bGenCPVersion_minor,
2648 { "Minor Version", "u3v.device_info.bGenCPVersion.minor",
2649 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
2650 NULL, HFILL } },
2652 { &hf_u3v_device_info_descriptor_bGenCPVersion_major,
2653 { "Major Version", "u3v.device_info.bGenCPVersion.major",
2654 FT_UINT32, BASE_DEC, NULL, 0xFFFF0000,
2655 NULL, HFILL } },
2657 { &hf_u3v_device_info_descriptor_bU3VVersion,
2658 { "bU3VVersion", "u3v.device_info.bU3VVersion",
2659 FT_NONE, BASE_NONE, NULL, 0x0,
2660 NULL, HFILL } },
2662 { &hf_u3v_device_info_descriptor_bU3VVersion_minor,
2663 { "Minor Version", "u3v.device_info.bU3VVersion.minor",
2664 FT_UINT32, BASE_DEC, NULL, 0x0000FFFF,
2665 NULL, HFILL } },
2667 { &hf_u3v_device_info_descriptor_bU3VVersion_major,
2668 { "Major Version", "u3v.device_info.bU3VVersion.major",
2669 FT_UINT32, BASE_DEC, NULL, 0xFFFF0000,
2670 NULL, HFILL } },
2672 { &hf_u3v_device_info_descriptor_iDeviceGUID,
2673 { "iDeviceGUID", "u3v.device_info.iDeviceGUID",
2674 FT_UINT8, BASE_DEC, NULL, 0x0,
2675 NULL, HFILL } },
2677 { &hf_u3v_device_info_descriptor_iVendorName,
2678 { "iVendorName", "u3v.device_info.iVendorName",
2679 FT_UINT8, BASE_DEC, NULL, 0x0,
2680 NULL, HFILL } },
2682 { &hf_u3v_device_info_descriptor_iModelName,
2683 { "iModelName", "u3v.device_info.iModelName",
2684 FT_UINT8, BASE_DEC, NULL, 0x0,
2685 NULL, HFILL } },
2687 { &hf_u3v_device_info_descriptor_iFamilyName,
2688 { "iFamilyName", "u3v.device_info.iFamilyName",
2689 FT_UINT8, BASE_DEC, NULL, 0x0,
2690 NULL, HFILL } },
2692 { &hf_u3v_device_info_descriptor_iDeviceVersion,
2693 { "iDeviceVersion", "u3v.device_info.iDeviceVersion",
2694 FT_UINT8, BASE_DEC, NULL, 0x0,
2695 NULL, HFILL } },
2697 { &hf_u3v_device_info_descriptor_iManufacturerInfo,
2698 { "iManufacturerInfo", "u3v.device_info.iManufacturerInfo",
2699 FT_UINT8, BASE_DEC, NULL, 0x0,
2700 NULL, HFILL } },
2702 { &hf_u3v_device_info_descriptor_iSerialNumber,
2703 { "iSerialNumber", "u3v.device_info.iSerialNumber",
2704 FT_UINT8, BASE_DEC, NULL, 0x0,
2705 NULL, HFILL } },
2707 { &hf_u3v_device_info_descriptor_iUserDefinedName,
2708 { "iUserDefinedName", "u3v.device_info.iUserDefinedName",
2709 FT_UINT8, BASE_DEC, NULL, 0x0,
2710 NULL, HFILL } },
2712 { &hf_u3v_device_info_descriptor_bmSpeedSupport,
2713 { "bmSpeedSupport", "u3v.device_info.bmSpeedSupport",
2714 FT_UINT8, BASE_HEX, NULL, 0x0,
2715 NULL, HFILL } },
2717 { &hf_u3v_device_info_descriptor_bmSpeedSupport_low_speed,
2718 { "Low-Speed", "u3v.device_info.bmSpeedSupport.lowSpeed",
2719 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
2720 NULL, HFILL } },
2722 { &hf_u3v_device_info_descriptor_bmSpeedSupport_full_speed,
2723 { "Full-Speed", "u3v.device_info.bmSpeedSupport.fullSpeed",
2724 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
2725 NULL, HFILL } },
2727 { &hf_u3v_device_info_descriptor_bmSpeedSupport_high_speed,
2728 { "High-Speed", "u3v.device_info.bmSpeedSupport.highSpeed",
2729 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
2730 NULL, HFILL } },
2732 { &hf_u3v_device_info_descriptor_bmSpeedSupport_super_speed,
2733 { "Super-Speed", "u3v.device_info.bmSpeedSupport.superSpeed",
2734 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
2735 NULL, HFILL } },
2737 { &hf_u3v_device_info_descriptor_bmSpeedSupport_reserved,
2738 { "Reserved", "u3v.device_info.bmSpeedSupport.reserved",
2739 FT_UINT8, BASE_HEX, NULL, 0xF0,
2740 NULL, HFILL } },
2742 { &hf_u3v_scd_readmem_cmd,
2743 { "SCD: READMEM_CMD", "u3v.scd_readmem_cmd",
2744 FT_NONE, BASE_NONE, NULL, 0x0,
2745 NULL, HFILL } },
2747 { &hf_u3v_scd_writemem_cmd,
2748 { "SCD: WRITEMEM_CMD", "u3v.scd_writemem_cmd",
2749 FT_NONE, BASE_NONE, NULL, 0x0,
2750 NULL, HFILL } },
2752 { &hf_u3v_scd_event_cmd,
2753 { "SCD: EVENT_CMD", "u3v.scd_event_cmd",
2754 FT_NONE, BASE_NONE, NULL, 0x0,
2755 NULL, HFILL } },
2757 { &hf_u3v_scd_ack_readmem_ack,
2758 { "SCD: READMEM_ACK", "u3v.scd_ack_readmem_ack",
2759 FT_NONE, BASE_NONE, NULL, 0x0,
2760 NULL, HFILL } },
2762 { &hf_u3v_scd_writemem_ack,
2763 { "SCD: WRITEMEM_ACK", "u3v.scd_writemem_ack",
2764 FT_NONE, BASE_NONE, NULL, 0x0,
2765 NULL, HFILL } },
2767 { &hf_u3v_ccd_pending_ack,
2768 { "CCD: PENDING_ACK", "u3v.ccd_pending_ack",
2769 FT_NONE, BASE_NONE, NULL, 0x0,
2770 NULL, HFILL } },
2772 { &hf_u3v_stream_leader,
2773 { "Stream: Leader", "u3v.stream_leader",
2774 FT_NONE, BASE_NONE, NULL, 0x0,
2775 NULL, HFILL } },
2777 { &hf_u3v_stream_trailer,
2778 { "Stream: Trailer", "u3v.stream_trailer",
2779 FT_NONE, BASE_NONE, NULL, 0x0,
2780 NULL, HFILL } },
2782 { &hf_u3v_stream_payload,
2783 { "Stream: Payload", "u3v.stream_payload",
2784 FT_NONE, BASE_NONE, NULL, 0x0,
2785 NULL, HFILL } },
2787 { &hf_u3v_ccd_cmd,
2788 { "CCD", "u3v.ccd_cmd",
2789 FT_NONE, BASE_NONE, NULL, 0x0,
2790 NULL, HFILL } },
2792 { &hf_u3v_ccd_ack,
2793 { "CCD", "u3v.ccd_ack",
2794 FT_NONE, BASE_NONE, NULL, 0x0,
2795 NULL, HFILL } },
2797 { &hf_u3v_device_info_descriptor,
2798 { "U3V DEVICE INFO DESCRIPTOR", "u3v.device_info_descriptor",
2799 FT_NONE, BASE_NONE, NULL, 0x0,
2800 NULL, HFILL } }
2803 void
2804 proto_register_u3v(void)
2806 static int *ett[] = {
2807 &ett_u3v,
2808 &ett_u3v_cmd,
2809 &ett_u3v_flags,
2810 &ett_u3v_ack,
2811 &ett_u3v_payload_cmd,
2812 &ett_u3v_payload_ack,
2813 &ett_u3v_payload_ack_subtree,
2814 &ett_u3v_payload_cmd_subtree,
2815 &ett_u3v_bootstrap_fields,
2816 &ett_u3v_stream_leader,
2817 &ett_u3v_stream_trailer,
2818 &ett_u3v_stream_payload,
2819 &ett_u3v_device_info_descriptor,
2820 &ett_u3v_device_info_descriptor_speed_support,
2821 &ett_u3v_device_info_descriptor_gencp_version,
2822 &ett_u3v_device_info_descriptor_u3v_version,
2825 proto_u3v = proto_register_protocol("USB 3 Vision", "U3V", "u3v");
2826 proto_register_field_array(proto_u3v, hf, array_length(hf));
2827 proto_register_subtree_array(ett, array_length(ett));
2828 u3v_handle = register_dissector("u3v", dissect_u3v, proto_u3v);
2833 void
2834 proto_reg_handoff_u3v(void)
2836 dissector_handle_t u3v_descr_handle = NULL;
2838 dissector_add_uint("usb.bulk", IF_CLASS_MISCELLANEOUS, u3v_handle);
2839 heur_dissector_add("usb.bulk", dissect_u3v_heur, "USB3Vision Protocol", "u3v", proto_u3v,HEURISTIC_ENABLE);
2840 u3v_descr_handle = create_dissector_handle(dissect_u3v_descriptors, proto_u3v);
2841 dissector_add_uint("usb.descriptor", IF_CLASS_MISCELLANEOUS, u3v_descr_handle);
2845 * Editor modelines - https://www.wireshark.org/tools/modelines.html
2847 * Local variables:
2848 * c-basic-offset: 4
2849 * tab-width: 8
2850 * indent-tabs-mode: nil
2851 * End:
2853 * vi: set shiftwidth=4 tabstop=8 expandtab:
2854 * :indentSize=4:tabSize=8:noTabs=true: