/src/wireshark/epan/dissectors/packet-gvsp.c
Line | Count | Source |
1 | | /* packet-gvsp.c |
2 | | * Routines for AIA GigE Vision (TM) Streaming Protocol dissection |
3 | | * Copyright 2012, AIA <www.visiononline.org> All rights reserved |
4 | | * |
5 | | * GigE Vision (TM): GigE Vision a standard developed under the sponsorship of the AIA for |
6 | | * the benefit of the machine vision industry. GVSP stands for GigE Vision (TM) Streaming |
7 | | * Protocol. |
8 | | * |
9 | | * Wireshark - Network traffic analyzer |
10 | | * By Gerald Combs <gerald@wireshark.org> |
11 | | * Copyright 1998 Gerald Combs |
12 | | * |
13 | | * SPDX-License-Identifier: GPL-2.0-or-later |
14 | | */ |
15 | | |
16 | | #include "config.h" |
17 | | #include <epan/packet.h> |
18 | | #include <epan/tfs.h> |
19 | | #include <epan/conversation.h> |
20 | | #include <epan/prefs.h> |
21 | | |
22 | | void proto_register_gvsp(void); |
23 | | void proto_reg_handoff_gvsp(void); |
24 | | |
25 | | /* |
26 | | * For all GenICam standards, including GenDC 1.0 and 1.1: |
27 | | * |
28 | | * https://www.emva.org/standards-technology/genicam/genicam-downloads/ |
29 | | */ |
30 | | |
31 | 0 | #define GVSP_MIN_PACKET_SIZE 8 |
32 | 0 | #define GVSP_V2_MIN_PACKET_SIZE 20 |
33 | 0 | #define GVSP_EXTENDED_ID_BIT 0x80 |
34 | | #define GVSP_EXTENDED_CHUNK_BIT 0x4000 |
35 | | |
36 | 0 | #define GVSP_SIZE_OF_PART_INFO_LEADER ( 48 ) |
37 | 0 | #define GVSP_SIZE_OF_PART_INFO_TRAILER ( 16 ) |
38 | | |
39 | | /* |
40 | | Payload types |
41 | | */ |
42 | | |
43 | 0 | #define GVSP_PAYLOAD_IMAGE ( 0x0001 ) |
44 | 0 | #define GVSP_PAYLOAD_RAWDATA ( 0x0002 ) |
45 | 0 | #define GVSP_PAYLOAD_FILE ( 0x0003 ) |
46 | 0 | #define GVSP_PAYLOAD_CHUNKDATA ( 0x0004 ) |
47 | 0 | #define GVSP_PAYLOAD_EXTENDEDCHUNKDATA ( 0x0005 ) /* Deprecated with GEV 2.0 */ |
48 | 0 | #define GVSP_PAYLOAD_JPEG ( 0x0006 ) /* GEV 2.0 */ |
49 | 0 | #define GVSP_PAYLOAD_JPEG2000 ( 0x0007 ) /* GEV 2.0 */ |
50 | 0 | #define GVSP_PAYLOAD_H264 ( 0x0008 ) /* GEV 2.0 */ |
51 | 0 | #define GVSP_PAYLOAD_MULTIZONEIMAGE ( 0x0009 ) /* GEV 2.0, deprecated with GEV 2.2 */ |
52 | 0 | #define GVSP_PAYLOAD_MULTIPART ( 0x000A ) /* GEV 2.1 */ |
53 | 0 | #define GVSP_PAYLOAD_GENDC ( 0x000B ) /* GEV 2.2 */ |
54 | | #define GVSP_PAYLOAD_DEVICE_SPECIFIC_START ( 0x8000 ) |
55 | | |
56 | | /* |
57 | | GenDC data flag masks (GEV 2.2) |
58 | | */ |
59 | | |
60 | 14 | #define GENDC_DESCRIPTOR_FLAG ( 0xC0 ) |
61 | 14 | #define GENDC_DESCRIPTOR_START_FLAG ( 0x20 ) |
62 | 14 | #define GENDC_DESCRIPTOR_END_FLAG ( 0x10 ) |
63 | | |
64 | | /* |
65 | | GenDC header types(GEV 2.2) |
66 | | */ |
67 | | |
68 | | #define GENDC_HEADER_TYPE_CONTAINER ( 0x1000 ) |
69 | | #define GENDC_HEADER_TYPE_COMPONENT_HEADER ( 0x2000 ) |
70 | 0 | #define GENDC_HEADER_TYPE_PART_CHUNK ( 0x4000 ) |
71 | 0 | #define GENDC_HEADER_TYPE_PART_XML ( 0x4001 ) /* GenDC 1.1 */ |
72 | 0 | #define GENDC_HEADER_TYPE_PART_1D ( 0x4100 ) |
73 | 0 | #define GENDC_HEADER_TYPE_PART_2D ( 0x4200 ) |
74 | 0 | #define GENDC_HEADER_TYPE_PART_2D_JPEG ( 0x4201 ) |
75 | 0 | #define GENDC_HEADER_TYPE_PART_2D_JPEG2000 ( 0x4202 ) |
76 | 0 | #define GENDC_HEADER_TYPE_PART_2D_H264 ( 0x4203 ) |
77 | | |
78 | | |
79 | | /* |
80 | | GenDC component types (GEV 2.2) |
81 | | */ |
82 | | |
83 | | #define GENDC_COMPONENT_TYPEID_UNDEFINED ( 0x0000 ) |
84 | | #define GENDC_COMPONENT_TYPEID_INTENSITY ( 0x0001 ) |
85 | | #define GENDC_COMPONENT_TYPEID_INFRARED ( 0x0002 ) |
86 | | #define GENDC_COMPONENT_TYPEID_ULTRAVIOLET ( 0x0003 ) |
87 | | #define GENDC_COMPONENT_TYPEID_RANGE ( 0x0004 ) |
88 | | #define GENDC_COMPONENT_TYPEID_REFLECTANCE ( 0x0005 ) |
89 | | #define GENDC_COMPONENT_TYPEID_CONFIDENCE ( 0x0006 ) |
90 | | #define GENDC_COMPONENT_TYPEID_SCATTER ( 0x0007 ) |
91 | | #define GENDC_COMPONENT_TYPEID_DISPARITY ( 0x0008 ) |
92 | | #define GENDC_COMPONENT_TYPEID_MULTISPECTRAL ( 0x0009 ) |
93 | | #define GENDC_COMPONENT_TYPEID_METADATA ( 0x8001 ) |
94 | | #define GENDC_COMPONENT_TYPEID_RESERVED ( 0xFFFF ) |
95 | | |
96 | | /* |
97 | | GVSP packet types |
98 | | */ |
99 | | |
100 | 0 | #define GVSP_PACKET_LEADER ( 1 ) |
101 | 0 | #define GVSP_PACKET_TRAILER ( 2 ) |
102 | 0 | #define GVSP_PACKET_PAYLOAD ( 3 ) |
103 | 0 | #define GVSP_PACKET_ALLIN ( 4 ) |
104 | 0 | #define GVSP_PACKET_PAYLOAD_H264 ( 5 ) |
105 | 0 | #define GVSP_PACKET_PAYLOAD_MULTIZONE ( 6 ) |
106 | 0 | #define GVSP_PACKET_PAYLOAD_MULTIPART ( 7 ) /* GEV 2.1 */ |
107 | 0 | #define GVSP_PACKET_PAYLOAD_GENDC ( 8 ) /* GEV 2.2 */ |
108 | 0 | #define GVSP_PACKET_PAYLOAD_LAST ( 8 ) |
109 | | |
110 | | /* |
111 | | GVSP Multi-Part data types (GEV 2.1) |
112 | | */ |
113 | | |
114 | 0 | #define GVSP_MULTIPART_DATA_TYPE_2DIMAGE ( 0x0001 ) |
115 | 0 | #define GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR ( 0x0002 ) |
116 | 0 | #define GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR ( 0x0003 ) |
117 | 0 | #define GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR ( 0x0004 ) |
118 | 0 | #define GVSP_MULTIPART_DATA_TYPE_3DIMAGE ( 0x0005 ) |
119 | 0 | #define GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR ( 0x0006 ) |
120 | 0 | #define GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR ( 0x0007 ) |
121 | 0 | #define GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR ( 0x0008 ) |
122 | 0 | #define GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP ( 0x0009 ) |
123 | | #define GVSP_MULTIPART_DATA_TYPE_CHUNKDATA ( 0x000A ) |
124 | 0 | #define GVSP_MULTIPART_DATA_TYPE_JPEG ( 0x000B ) |
125 | 0 | #define GVSP_MULTIPART_DATA_TYPE_JPEG2000 ( 0x000C ) |
126 | | #define GVSP_MULTIPART_DATA_TYPE_DEVICESPECIFIC ( 0x8000 ) |
127 | | |
128 | | /* |
129 | | GVSP statuses |
130 | | */ |
131 | | |
132 | 0 | #define GEV_STATUS_SUCCESS ( 0x0000 ) |
133 | 0 | #define GEV_STATUS_PACKET_RESEND ( 0x0100 ) |
134 | 0 | #define GEV_STATUS_NOT_IMPLEMENTED ( 0x8001 ) |
135 | | #define GEV_STATUS_INVALID_PARAMETER ( 0x8002 ) |
136 | | #define GEV_STATUS_INVALID_ADDRESS ( 0x8003 ) |
137 | | #define GEV_STATUS_WRITE_PROTECT ( 0x8004 ) |
138 | | #define GEV_STATUS_BAD_ALIGNMENT ( 0x8005 ) |
139 | | #define GEV_STATUS_ACCESS_DENIED ( 0x8006 ) |
140 | | #define GEV_STATUS_BUSY ( 0x8007 ) |
141 | | #define GEV_STATUS_LOCAL_PROBLEM ( 0x8008 ) /* deprecated */ |
142 | | #define GEV_STATUS_MSG_MISMATCH ( 0x8009 ) /* deprecated */ |
143 | | #define GEV_STATUS_INVALID_PROTOCOL ( 0x800A ) /* deprecated */ |
144 | | #define GEV_STATUS_NO_MSG ( 0x800B ) /* deprecated */ |
145 | | #define GEV_STATUS_PACKET_UNAVAILABLE ( 0x800C ) |
146 | | #define GEV_STATUS_DATA_OVERRUN ( 0x800D ) |
147 | | #define GEV_STATUS_INVALID_HEADER ( 0x800E ) |
148 | | #define GEV_STATUS_WRONG_CONFIG ( 0x800F ) /* deprecated */ |
149 | | #define GEV_STATUS_PACKET_NOT_YET_AVAILABLE ( 0x8010 ) |
150 | | #define GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY ( 0x8011 ) |
151 | | #define GEV_STATUS_PACKET_REMOVED_FROM_MEMORY ( 0x8012 ) |
152 | | #define GEV_STATUS_NO_REF_TIME ( 0x8013 ) /* GEV 2.0 */ |
153 | | #define GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE ( 0x8014 ) /* GEV 2.0 */ |
154 | | #define GEV_STATUS_OVERFLOW ( 0x8015 ) /* GEV 2.0 */ |
155 | | #define GEV_STATUS_ACTION_LATE ( 0x8016 ) /* GEV 2.0 */ |
156 | | #define GEV_STATUS_LEADER_TRAILER_OVERFLOW ( 0x8017 ) /* GEV 2.1 */ |
157 | 0 | #define GEV_STATUS_LAST ( 0x8017 ) |
158 | 0 | #define GEV_STATUS_ERROR ( 0x8FFF ) |
159 | | |
160 | | /* |
161 | | Pixel type color |
162 | | */ |
163 | | |
164 | | #define GVSP_PIX_MONO ( 0x01000000 ) |
165 | | #define GVSP_PIX_COLOR ( 0x02000000 ) |
166 | | #define GVSP_PIX_CUSTOM ( 0x80000000 ) |
167 | | |
168 | | /* |
169 | | Pixel types |
170 | | */ |
171 | | #define GVSP_PIX_MONO1P 0x01010037 |
172 | | #define GVSP_PIX_MONO2P 0x01020038 |
173 | | #define GVSP_PIX_MONO4P 0x01040039 |
174 | | #define GVSP_PIX_MONO8 0x01080001 |
175 | | #define GVSP_PIX_MONO8S 0x01080002 |
176 | | #define GVSP_PIX_MONO10 0x01100003 |
177 | | #define GVSP_PIX_MONO10P 0x010A0046 |
178 | | #define GVSP_PIX_MONO12 0x01100005 |
179 | | #define GVSP_PIX_MONO12P 0x010C0047 |
180 | | #define GVSP_PIX_MONO14 0x01100025 |
181 | | #define GVSP_PIX_MONO14P 0x010E0104 |
182 | | #define GVSP_PIX_MONO16 0x01100007 |
183 | | #define GVSP_PIX_MONO32 0x01200111 |
184 | | #define GVSP_PIX_BAYERBG4P 0x01040110 |
185 | | #define GVSP_PIX_BAYERBG8 0x0108000B |
186 | | #define GVSP_PIX_BAYERBG10 0x0110000F |
187 | | #define GVSP_PIX_BAYERBG10P 0x010A0052 |
188 | | #define GVSP_PIX_BAYERBG12 0x01100013 |
189 | | #define GVSP_PIX_BAYERBG12P 0x010C0053 |
190 | | #define GVSP_PIX_BAYERBG14 0x0110010C |
191 | | #define GVSP_PIX_BAYERBG14P 0x010E0108 |
192 | | #define GVSP_PIX_BAYERBG16 0x01100031 |
193 | | #define GVSP_PIX_BAYERGB4P 0x0104010F |
194 | | #define GVSP_PIX_BAYERGB8 0x0108000A |
195 | | #define GVSP_PIX_BAYERGB10 0x0110000E |
196 | | #define GVSP_PIX_BAYERGB10P 0x010A0054 |
197 | | #define GVSP_PIX_BAYERGB12 0x01100012 |
198 | | #define GVSP_PIX_BAYERGB12P 0x010C0055 |
199 | | #define GVSP_PIX_BAYERGB14 0x0110010B |
200 | | #define GVSP_PIX_BAYERGB14P 0x010E0107 |
201 | | #define GVSP_PIX_BAYERGB16 0x01100030 |
202 | | #define GVSP_PIX_BAYERGR4P 0x0104010D |
203 | | #define GVSP_PIX_BAYERGR8 0x01080008 |
204 | | #define GVSP_PIX_BAYERGR10 0x0110000C |
205 | | #define GVSP_PIX_BAYERGR10P 0x010A0056 |
206 | | #define GVSP_PIX_BAYERGR12 0x01100010 |
207 | | #define GVSP_PIX_BAYERGR12P 0x010C0057 |
208 | | #define GVSP_PIX_BAYERGR14 0x01100109 |
209 | | #define GVSP_PIX_BAYERGR14P 0x010E0105 |
210 | | #define GVSP_PIX_BAYERGR16 0x0110002E |
211 | | #define GVSP_PIX_BAYERRG4P 0x0104010E |
212 | | #define GVSP_PIX_BAYERRG8 0x01080009 |
213 | | #define GVSP_PIX_BAYERRG10 0x0110000D |
214 | | #define GVSP_PIX_BAYERRG10P 0x010A0058 |
215 | | #define GVSP_PIX_BAYERRG12 0x01100011 |
216 | | #define GVSP_PIX_BAYERRG12P 0x010C0059 |
217 | | #define GVSP_PIX_BAYERRG14 0x0110010A |
218 | | #define GVSP_PIX_BAYERRG14P 0x010E0106 |
219 | | #define GVSP_PIX_BAYERRG16 0x0110002F |
220 | | #define GVSP_PIX_RGBA8 0x02200016 |
221 | | #define GVSP_PIX_RGBA10 0x0240005F |
222 | | #define GVSP_PIX_RGBA10P 0x02280060 |
223 | | #define GVSP_PIX_RGBA12 0x02400061 |
224 | | #define GVSP_PIX_RGBA12P 0x02300062 |
225 | | #define GVSP_PIX_RGBA14 0x02400063 |
226 | | #define GVSP_PIX_RGBA16 0x02400064 |
227 | | #define GVSP_PIX_RGB8 0x02180014 |
228 | | #define GVSP_PIX_RGB8_PLANAR 0x02180021 |
229 | | #define GVSP_PIX_RGB10 0x02300018 |
230 | | #define GVSP_PIX_RGB10_PLANAR 0x02300022 |
231 | | #define GVSP_PIX_RGB10P 0x021E005C |
232 | | #define GVSP_PIX_RGB10P32 0x0220001D |
233 | | #define GVSP_PIX_RGB12 0x0230001A |
234 | | #define GVSP_PIX_RGB12_PLANAR 0x02300023 |
235 | | #define GVSP_PIX_RGB12P 0x0224005D |
236 | | #define GVSP_PIX_RGB14 0x0230005E |
237 | | #define GVSP_PIX_RGB16 0x02300033 |
238 | | #define GVSP_PIX_RGB16_PLANAR 0x02300024 |
239 | | #define GVSP_PIX_RGB565P 0x02100035 |
240 | | #define GVSP_PIX_BGRA8 0x02200017 |
241 | | #define GVSP_PIX_BGRA10 0x0240004C |
242 | | #define GVSP_PIX_BGRA10P 0x0228004D |
243 | | #define GVSP_PIX_BGRA12 0x0240004E |
244 | | #define GVSP_PIX_BGRA12P 0x0230004F |
245 | | #define GVSP_PIX_BGRA14 0x02400050 |
246 | | #define GVSP_PIX_BGRA16 0x02400051 |
247 | | #define GVSP_PIX_BGR8 0x02180015 |
248 | | #define GVSP_PIX_BGR10 0x02300019 |
249 | | #define GVSP_PIX_BGR10P 0x021E0048 |
250 | | #define GVSP_PIX_BGR12 0x0230001B |
251 | | #define GVSP_PIX_BGR12P 0x02240049 |
252 | | #define GVSP_PIX_BGR14 0x0230004A |
253 | | #define GVSP_PIX_BGR16 0x0230004B |
254 | | #define GVSP_PIX_BGR565P 0x02100036 |
255 | | #define GVSP_PIX_R8 0x010800C9 |
256 | | #define GVSP_PIX_R10 0x01100120 |
257 | | #define GVSP_PIX_R10_DEPRECATED 0x010A00CA |
258 | | #define GVSP_PIX_R12 0x01100121 |
259 | | #define GVSP_PIX_R12_DEPRECATED 0x010C00CB |
260 | | #define GVSP_PIX_R16 0x011000CC |
261 | | #define GVSP_PIX_G8 0x010800CD |
262 | | #define GVSP_PIX_G10 0x01100122 |
263 | | #define GVSP_PIX_G10_DEPRECATED 0x010A00CE |
264 | | #define GVSP_PIX_G12 0x01100123 |
265 | | #define GVSP_PIX_G12_DEPRECATED 0x010C00CF |
266 | | #define GVSP_PIX_G16 0x011000D0 |
267 | | #define GVSP_PIX_B8 0x010800D1 |
268 | | #define GVSP_PIX_B10 0x01100124 |
269 | | #define GVSP_PIX_B10_DEPRECATED 0x010A00D2 |
270 | | #define GVSP_PIX_B12 0x01100125 |
271 | | #define GVSP_PIX_B12_DEPRECATED 0x010C00D3 |
272 | | #define GVSP_PIX_B16 0x011000D4 |
273 | | #define GVSP_PIX_COORD3D_ABC8 0x021800B2 |
274 | | #define GVSP_PIX_COORD3D_ABC8_PLANAR 0x021800B3 |
275 | | #define GVSP_PIX_COORD3D_ABC10P 0x021E00DB |
276 | | #define GVSP_PIX_COORD3D_ABC10P_PLANAR 0x021E00DC |
277 | | #define GVSP_PIX_COORD3D_ABC12P 0x022400DE |
278 | | #define GVSP_PIX_COORD3D_ABC12P_PLANAR 0x022400DF |
279 | | #define GVSP_PIX_COORD3D_ABC16 0x023000B9 |
280 | | #define GVSP_PIX_COORD3D_ABC16_PLANAR 0x023000BA |
281 | | #define GVSP_PIX_COORD3D_ABC32F 0x026000C0 |
282 | | #define GVSP_PIX_COORD3D_ABC32F_PLANAR 0x026000C1 |
283 | | #define GVSP_PIX_COORD3D_AC8 0x021000B4 |
284 | | #define GVSP_PIX_COORD3D_AC8_PLANAR 0x021000B5 |
285 | | #define GVSP_PIX_COORD3D_AC10P 0x021400F0 |
286 | | #define GVSP_PIX_COORD3D_AC10P_PLANAR 0x021400F1 |
287 | | #define GVSP_PIX_COORD3D_AC12P 0x021800F2 |
288 | | #define GVSP_PIX_COORD3D_AC12P_PLANAR 0x021800F3 |
289 | | #define GVSP_PIX_COORD3D_AC16 0x022000BB |
290 | | #define GVSP_PIX_COORD3D_AC16_PLANAR 0x022000BC |
291 | | #define GVSP_PIX_COORD3D_AC32F 0x024000C2 |
292 | | #define GVSP_PIX_COORD3D_AC32F_PLANAR 0x024000C3 |
293 | | #define GVSP_PIX_COORD3D_A8 0x010800AF |
294 | | #define GVSP_PIX_COORD3D_A10P 0x010A00D5 |
295 | | #define GVSP_PIX_COORD3D_A12P 0x010C00D8 |
296 | | #define GVSP_PIX_COORD3D_A16 0x011000B6 |
297 | | #define GVSP_PIX_COORD3D_A32F 0x012000BD |
298 | | #define GVSP_PIX_COORD3D_B8 0x010800B0 |
299 | | #define GVSP_PIX_COORD3D_B10P 0x010A00D6 |
300 | | #define GVSP_PIX_COORD3D_B12P 0x010C00D9 |
301 | | #define GVSP_PIX_COORD3D_B16 0x011000B7 |
302 | | #define GVSP_PIX_COORD3D_B32F 0x012000BE |
303 | | #define GVSP_PIX_COORD3D_C8 0x010800B1 |
304 | | #define GVSP_PIX_COORD3D_C10P 0x010A00D7 |
305 | | #define GVSP_PIX_COORD3D_C12P 0x010C00DA |
306 | | #define GVSP_PIX_COORD3D_C16 0x011000B8 |
307 | | #define GVSP_PIX_COORD3D_C32F 0x012000BF |
308 | | #define GVSP_PIX_CONFIDENCE1 0x010800C4 |
309 | | #define GVSP_PIX_CONFIDENCE1P 0x010100C5 |
310 | | #define GVSP_PIX_CONFIDENCE8 0x010800C6 |
311 | | #define GVSP_PIX_CONFIDENCE16 0x011000C7 |
312 | | #define GVSP_PIX_CONFIDENCE32F 0x012000C8 |
313 | | #define GVSP_PIX_BICOLORBGRG8 0x021000A6 |
314 | | #define GVSP_PIX_BICOLORBGRG10 0x022000A9 |
315 | | #define GVSP_PIX_BICOLORBGRG10P 0x021400AA |
316 | | #define GVSP_PIX_BICOLORBGRG12 0x022000AD |
317 | | #define GVSP_PIX_BICOLORBGRG12P 0x021800AE |
318 | | #define GVSP_PIX_BICOLORRGBG8 0x021000A5 |
319 | | #define GVSP_PIX_BICOLORRGBG10 0x022000A7 |
320 | | #define GVSP_PIX_BICOLORRGBG10P 0x021400A8 |
321 | | #define GVSP_PIX_BICOLORRGBG12 0x022000AB |
322 | | #define GVSP_PIX_BICOLORRGBG12P 0x021800AC |
323 | | #define GVSP_PIX_DATA8 0x01080116 |
324 | | #define GVSP_PIX_DATA8S 0x01080117 |
325 | | #define GVSP_PIX_DATA16 0x01100118 |
326 | | #define GVSP_PIX_DATA16S 0x01100119 |
327 | | #define GVSP_PIX_DATA32 0x0120011A |
328 | | #define GVSP_PIX_DATA32F 0x0120011C |
329 | | #define GVSP_PIX_DATA32S 0x0120011B |
330 | | #define GVSP_PIX_DATA64 0x0140011D |
331 | | #define GVSP_PIX_DATA64F 0x0140011F |
332 | | #define GVSP_PIX_DATA64S 0x0140011E |
333 | | #define GVSP_PIX_SCF1WBWG8 0x01080067 |
334 | | #define GVSP_PIX_SCF1WBWG10 0x01100068 |
335 | | #define GVSP_PIX_SCF1WBWG10P 0x010A0069 |
336 | | #define GVSP_PIX_SCF1WBWG12 0x0110006A |
337 | | #define GVSP_PIX_SCF1WBWG12P 0x010C006B |
338 | | #define GVSP_PIX_SCF1WBWG14 0x0110006C |
339 | | #define GVSP_PIX_SCF1WBWG16 0x0110006D |
340 | | #define GVSP_PIX_SCF1WGWB8 0x0108006E |
341 | | #define GVSP_PIX_SCF1WGWB10 0x0110006F |
342 | | #define GVSP_PIX_SCF1WGWB10P 0x010A0070 |
343 | | #define GVSP_PIX_SCF1WGWB12 0x01100071 |
344 | | #define GVSP_PIX_SCF1WGWB12P 0x010C0072 |
345 | | #define GVSP_PIX_SCF1WGWB14 0x01100073 |
346 | | #define GVSP_PIX_SCF1WGWB16 0x01100074 |
347 | | #define GVSP_PIX_SCF1WGWR8 0x01080075 |
348 | | #define GVSP_PIX_SCF1WGWR10 0x01100076 |
349 | | #define GVSP_PIX_SCF1WGWR10P 0x010A0077 |
350 | | #define GVSP_PIX_SCF1WGWR12 0x01100078 |
351 | | #define GVSP_PIX_SCF1WGWR12P 0x010C0079 |
352 | | #define GVSP_PIX_SCF1WGWR14 0x0110007A |
353 | | #define GVSP_PIX_SCF1WGWR16 0x0110007B |
354 | | #define GVSP_PIX_SCF1WRWG8 0x0108007C |
355 | | #define GVSP_PIX_SCF1WRWG10 0x0110007D |
356 | | #define GVSP_PIX_SCF1WRWG10P 0x010A007E |
357 | | #define GVSP_PIX_SCF1WRWG12 0x0110007F |
358 | | #define GVSP_PIX_SCF1WRWG12P 0x010C0080 |
359 | | #define GVSP_PIX_SCF1WRWG14 0x01100081 |
360 | | #define GVSP_PIX_SCF1WRWG16 0x01100082 |
361 | | #define GVSP_PIX_YCBCR8 0x0218005B |
362 | | #define GVSP_PIX_YCBCR8_CBYCR 0x0218003A |
363 | | #define GVSP_PIX_YCBCR10_CBYCR 0x02300083 |
364 | | #define GVSP_PIX_YCBCR10P_CBYCR 0x021E0084 |
365 | | #define GVSP_PIX_YCBCR12_CBYCR 0x02300085 |
366 | | #define GVSP_PIX_YCBCR12P_CBYCR 0x02240086 |
367 | | #define GVSP_PIX_YCBCR411_8 0x020C005A |
368 | | #define GVSP_PIX_YCBCR411_8_CBYYCRYY 0x020C003C |
369 | | #define GVSP_PIX_YCBCR420_8_YY_CBCR_SEMIPLANAR 0x020C0112 |
370 | | #define GVSP_PIX_YCBCR420_8_YY_CRCB_SEMIPLANAR 0x020C0114 |
371 | | #define GVSP_PIX_YCBCR422_8 0x0210003B |
372 | | #define GVSP_PIX_YCBCR422_8_CBYCRY 0x02100043 |
373 | | #define GVSP_PIX_YCBCR422_8_YY_CBCR_SEMIPLANAR 0x02100113 |
374 | | #define GVSP_PIX_YCBCR422_8_YY_CRCB_SEMIPLANAR 0x02100115 |
375 | | #define GVSP_PIX_YCBCR422_10 0x02200065 |
376 | | #define GVSP_PIX_YCBCR422_10_CBYCRY 0x02200099 |
377 | | #define GVSP_PIX_YCBCR422_10P 0x02140087 |
378 | | #define GVSP_PIX_YCBCR422_10P_CBYCRY 0x0214009A |
379 | | #define GVSP_PIX_YCBCR422_12 0x02200066 |
380 | | #define GVSP_PIX_YCBCR422_12_CBYCRY 0x0220009B |
381 | | #define GVSP_PIX_YCBCR422_12P 0x02180088 |
382 | | #define GVSP_PIX_YCBCR422_12P_CBYCRY 0x0218009C |
383 | | #define GVSP_PIX_YCBCR601_8_CBYCR 0x0218003D |
384 | | #define GVSP_PIX_YCBCR601_10_CBYCR 0x02300089 |
385 | | #define GVSP_PIX_YCBCR601_10P_CBYCR 0x021E008A |
386 | | #define GVSP_PIX_YCBCR601_12_CBYCR 0x0230008B |
387 | | #define GVSP_PIX_YCBCR601_12P_CBYCR 0x0224008C |
388 | | #define GVSP_PIX_YCBCR601_411_8_CBYYCRYY 0x020C003F |
389 | | #define GVSP_PIX_YCBCR601_422_8 0x0210003E |
390 | | #define GVSP_PIX_YCBCR601_422_8_CBYCRY 0x02100044 |
391 | | #define GVSP_PIX_YCBCR601_422_10 0x0220008D |
392 | | #define GVSP_PIX_YCBCR601_422_10_CBYCRY 0x0220009D |
393 | | #define GVSP_PIX_YCBCR601_422_10P 0x0214008E |
394 | | #define GVSP_PIX_YCBCR601_422_10P_CBYCRY 0x0214009E |
395 | | #define GVSP_PIX_YCBCR601_422_12 0x0220008F |
396 | | #define GVSP_PIX_YCBCR601_422_12_CBYCRY 0x0220009F |
397 | | #define GVSP_PIX_YCBCR601_422_12P 0x02180090 |
398 | | #define GVSP_PIX_YCBCR601_422_12P_CBYCRY 0x021800A0 |
399 | | #define GVSP_PIX_YCBCR709_8_CBYCR 0x02180040 |
400 | | #define GVSP_PIX_YCBCR709_10_CBYCR 0x02300091 |
401 | | #define GVSP_PIX_YCBCR709_10P_CBYCR 0x021E0092 |
402 | | #define GVSP_PIX_YCBCR709_12_CBYCR 0x02300093 |
403 | | #define GVSP_PIX_YCBCR709_12P_CBYCR 0x02240094 |
404 | | #define GVSP_PIX_YCBCR709_411_8_CBYYCRYY 0x020C0042 |
405 | | #define GVSP_PIX_YCBCR709_422_8 0x02100041 |
406 | | #define GVSP_PIX_YCBCR709_422_8_CBYCRY 0x02100045 |
407 | | #define GVSP_PIX_YCBCR709_422_10 0x02200095 |
408 | | #define GVSP_PIX_YCBCR709_422_10_CBYCRY 0x022000A1 |
409 | | #define GVSP_PIX_YCBCR709_422_10P 0x02140096 |
410 | | #define GVSP_PIX_YCBCR709_422_10P_CBYCRY 0x021400A2 |
411 | | #define GVSP_PIX_YCBCR709_422_12 0x02200097 |
412 | | #define GVSP_PIX_YCBCR709_422_12_CBYCRY 0x022000A3 |
413 | | #define GVSP_PIX_YCBCR709_422_12P 0x02180098 |
414 | | #define GVSP_PIX_YCBCR709_422_12P_CBYCRY 0x021800A4 |
415 | | #define GVSP_PIX_YCBCR2020_8_CBYCR 0x021800F4 |
416 | | #define GVSP_PIX_YCBCR2020_10_CBYCR 0x023000F5 |
417 | | #define GVSP_PIX_YCBCR2020_10P_CBYCR 0x021E00F6 |
418 | | #define GVSP_PIX_YCBCR2020_12_CBYCR 0x023000F7 |
419 | | #define GVSP_PIX_YCBCR2020_12P_CBYCR 0x022400F8 |
420 | | #define GVSP_PIX_YCBCR2020_411_8_CBYYCRYY 0x020C00F9 |
421 | | #define GVSP_PIX_YCBCR2020_422_8 0x021000FA |
422 | | #define GVSP_PIX_YCBCR2020_422_8_CBYCRY 0x021000FB |
423 | | #define GVSP_PIX_YCBCR2020_422_10 0x022000FC |
424 | | #define GVSP_PIX_YCBCR2020_422_10_CBYCRY 0x022000FD |
425 | | #define GVSP_PIX_YCBCR2020_422_10P 0x021400FE |
426 | | #define GVSP_PIX_YCBCR2020_422_10P_CBYCRY 0x021400FF |
427 | | #define GVSP_PIX_YCBCR2020_422_12 0x02200100 |
428 | | #define GVSP_PIX_YCBCR2020_422_12_CBYCRY 0x02200101 |
429 | | #define GVSP_PIX_YCBCR2020_422_12P 0x02180102 |
430 | | #define GVSP_PIX_YCBCR2020_422_12P_CBYCRY 0x02180103 |
431 | | #define GVSP_PIX_YUV8_UYV 0x02180020 |
432 | | #define GVSP_PIX_YUV411_8_UYYVYY 0x020C001E |
433 | | #define GVSP_PIX_YUV422_8 0x02100032 |
434 | | #define GVSP_PIX_YUV422_8_UYVY 0x0210001F |
435 | | #define GVSP_PIX_MONO10PACKED 0x010C0004 |
436 | | #define GVSP_PIX_MONO12PACKED 0x010C0006 |
437 | | #define GVSP_PIX_BAYERBG10PACKED 0x010C0029 |
438 | | #define GVSP_PIX_BAYERBG12PACKED 0x010C002D |
439 | | #define GVSP_PIX_BAYERGB10PACKED 0x010C0028 |
440 | | #define GVSP_PIX_BAYERGB12PACKED 0x010C002C |
441 | | #define GVSP_PIX_BAYERGR10PACKED 0x010C0026 |
442 | | #define GVSP_PIX_BAYERGR12PACKED 0x010C002A |
443 | | #define GVSP_PIX_BAYERRG10PACKED 0x010C0027 |
444 | | #define GVSP_PIX_BAYERRG12PACKED 0x010C002B |
445 | | #define GVSP_PIX_RGB10V1PACKED 0x0220001C |
446 | | #define GVSP_PIX_RGB12V1PACKED 0x02240034 |
447 | | |
448 | | |
449 | | /* Structure to hold GVSP packet information */ |
450 | | typedef struct _gvsp_packet_info |
451 | | { |
452 | | int chunk; |
453 | | uint8_t format; |
454 | | uint16_t status; |
455 | | uint16_t payloadtype; |
456 | | uint64_t blockid; |
457 | | uint32_t packetid; |
458 | | int enhanced; |
459 | | int flag_resendrangeerror; |
460 | | int flag_previousblockdropped; |
461 | | int flag_packetresend; |
462 | | } gvsp_packet_info; |
463 | | |
464 | | |
465 | | /*Define the gvsp proto */ |
466 | | static int proto_gvsp; |
467 | | /*static int global_gvsp_port = 20202;*/ |
468 | | static dissector_handle_t gvsp_handle; |
469 | | |
470 | | |
471 | | /* Define the tree for gvsp */ |
472 | | static int ett_gvsp; |
473 | | static int ett_gvsp_flags; |
474 | | static int ett_gvsp_header; |
475 | | static int ett_gvsp_payload; |
476 | | static int ett_gvsp_trailer; |
477 | | static int ett_gvsp_pixelformat; |
478 | | static int ett_gvsp_fieldinfo; |
479 | | static int ett_gvsp_cs; |
480 | | static int ett_gvsp_sc_zone_direction; |
481 | | static int ett_gvsp_zoneinfo; |
482 | | static int ett_gvsp_zoneinfo_multipart; |
483 | | static int ett_gvsp_partinfo_leader; |
484 | | static int ett_gvsp_partinfo_trailer; |
485 | | static int ett_gvsp_gendc_leader_flags; |
486 | | static int ett_gvsp_gendc_payload_data_flags; |
487 | | static int ett_gvsp_gendc_payload_flow_flags; |
488 | | static int ett_gvsp_gendc_container_descriptor; |
489 | | static int ett_gvsp_gendc_container_header_flags; |
490 | | static int ett_gvsp_gendc_container_header_variable_fields; |
491 | | static int ett_gvsp_gendc_container_header_component_offsets; |
492 | | static int ett_gvsp_gendc_component_header; |
493 | | static int ett_gvsp_gendc_part_offsets; |
494 | | static int ett_gvsp_gendc_part_header; |
495 | | static int ett_gvsp_gendc_component_header_flags; |
496 | | static int ett_gvsp_gendc_part_header_flags; |
497 | | |
498 | | static const value_string statusnames[] = { |
499 | | { GEV_STATUS_SUCCESS, "GEV_STATUS_SUCCESS" }, |
500 | | { GEV_STATUS_PACKET_RESEND, "GEV_STATUS_PACKET_RESEND" }, |
501 | | { GEV_STATUS_NOT_IMPLEMENTED, "GEV_STATUS_NOT_IMPLEMENTED" }, |
502 | | { GEV_STATUS_INVALID_PARAMETER, "GEV_STATUS_INVALID_PARAMETER" }, |
503 | | { GEV_STATUS_INVALID_ADDRESS, "GEV_STATUS_INVALID_ADDRESS" }, |
504 | | { GEV_STATUS_WRITE_PROTECT, "GEV_STATUS_WRITE_PROTECT" }, |
505 | | { GEV_STATUS_BAD_ALIGNMENT, "GEV_STATUS_BAD_ALIGNMENT" }, |
506 | | { GEV_STATUS_ACCESS_DENIED, "GEV_STATUS_ACCESS_DENIED" }, |
507 | | { GEV_STATUS_BUSY, "GEV_STATUS_BUSY" }, |
508 | | { GEV_STATUS_LOCAL_PROBLEM, "GEV_STATUS_LOCAL_PROBLEM (deprecated)" }, |
509 | | { GEV_STATUS_MSG_MISMATCH, "GEV_STATUS_MSG_MISMATCH (deprecated)" }, |
510 | | { GEV_STATUS_INVALID_PROTOCOL, "GEV_STATUS_INVALID_PROTOCOL (deprecated)" }, |
511 | | { GEV_STATUS_NO_MSG, "GEV_STATUS_NO_MSG (deprecated)" }, |
512 | | { GEV_STATUS_PACKET_UNAVAILABLE, "GEV_STATUS_PACKET_UNAVAILABLE" }, |
513 | | { GEV_STATUS_DATA_OVERRUN, "GEV_STATUS_DATA_OVERRUN" }, |
514 | | { GEV_STATUS_INVALID_HEADER, "GEV_STATUS_INVALID_HEADER" }, |
515 | | { GEV_STATUS_WRONG_CONFIG, "GEV_STATUS_WRONG_CONFIG (deprecated)" }, |
516 | | { GEV_STATUS_PACKET_NOT_YET_AVAILABLE, "GEV_STATUS_PACKET_NOT_YET_AVAILABLE" }, |
517 | | { GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY" }, |
518 | | { GEV_STATUS_PACKET_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_REMOVED_FROM_MEMORY" }, |
519 | | { GEV_STATUS_NO_REF_TIME, "GEV_STATUS_NO_REF_TIME" }, |
520 | | { GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE, "GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE" }, |
521 | | { GEV_STATUS_OVERFLOW, "GEV_STATUS_OVERFLOW" }, |
522 | | { GEV_STATUS_ACTION_LATE, "GEV_STATUS_ACTION_LATE" }, |
523 | | { GEV_STATUS_LEADER_TRAILER_OVERFLOW, "GEV_STATUS_LEADER_TRAILER_OVERFLOW" }, |
524 | | { GEV_STATUS_ERROR, "GEV_STATUS_ERROR" }, |
525 | | { 0, NULL } |
526 | | }; |
527 | | |
528 | | static value_string_ext statusnames_ext = VALUE_STRING_EXT_INIT(statusnames); |
529 | | |
530 | | static const value_string formatnames[] = { |
531 | | { GVSP_PACKET_LEADER, "LEADER" }, |
532 | | { GVSP_PACKET_TRAILER, "TRAILER" }, |
533 | | { GVSP_PACKET_PAYLOAD, "PAYLOAD" }, |
534 | | { GVSP_PACKET_ALLIN, "ALLIN" }, |
535 | | { GVSP_PACKET_PAYLOAD_H264, "H264" }, |
536 | | { GVSP_PACKET_PAYLOAD_MULTIZONE, "MULTI-ZONE" }, |
537 | | { GVSP_PACKET_PAYLOAD_MULTIPART, "MULTI-PART" }, |
538 | | { GVSP_PACKET_PAYLOAD_GENDC, "GENDC" }, |
539 | | { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_LEADER, "LEADER (ext IDs)" }, |
540 | | { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_TRAILER, "TRAILER (ext IDs)" }, |
541 | | { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD, "PAYLOAD (ext IDs)" }, |
542 | | { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_ALLIN, "ALL-IN (ext IDs)" }, |
543 | | { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD_H264, "H264 (ext IDs)" }, |
544 | | { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD_MULTIZONE, "MULTI-ZONE (ext IDs)" }, |
545 | | { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD_MULTIPART, "MULTI-PART (ext IDs)" }, |
546 | | { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD_GENDC, "GENDC (ext IDs)" }, |
547 | | { 0, NULL } |
548 | | }; |
549 | | |
550 | | static const value_string payloadtypenames[] = { |
551 | | { GVSP_PAYLOAD_IMAGE, "IMAGE" }, |
552 | | { GVSP_PAYLOAD_RAWDATA, "RAW DATA" }, |
553 | | { GVSP_PAYLOAD_FILE, "FILE" }, |
554 | | { GVSP_PAYLOAD_CHUNKDATA, "CHUNK DATA" }, |
555 | | { GVSP_PAYLOAD_EXTENDEDCHUNKDATA, "EXTENDED CHUNK DATA (obsolete with v2.0)" }, |
556 | | { GVSP_PAYLOAD_JPEG, "JPEG" }, |
557 | | { GVSP_PAYLOAD_JPEG2000, "JPEG 2000" }, |
558 | | { GVSP_PAYLOAD_H264, "H264" }, |
559 | | { GVSP_PAYLOAD_MULTIZONEIMAGE, "MULTI-ZONE IMAGE" }, |
560 | | { GVSP_PAYLOAD_MULTIPART, "MULTI-PART" }, |
561 | | { GVSP_PAYLOAD_GENDC, "GENDC" }, |
562 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_IMAGE, "IMAGE (v2.0 chunks)" }, |
563 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_RAWDATA, "RAW DATA (v2.0 Chunks)" }, |
564 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_FILE, "FILE (v2.0 Chunks)" }, |
565 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_CHUNKDATA, "CHUNK DATA (v2.0 Chunks)" }, |
566 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_EXTENDEDCHUNKDATA, "EXTENDED CHUNK DATA (v2.0 chunks?)" }, |
567 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_JPEG, "JPEG (v2.0 Chunks)" }, |
568 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_JPEG2000, "JPEG 2000 (v2.0 Chunks)" }, |
569 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_H264, "H264 (v2.0 Chunks)" }, |
570 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_MULTIZONEIMAGE, "MULTI-ZONE IMAGE (v2.0 Chunks)" }, |
571 | | { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_MULTIPART, "MULTI-PART (v2.0 Chunks)" }, |
572 | | { 0, NULL } |
573 | | }; |
574 | | |
575 | | static value_string_ext payloadtypenames_ext = VALUE_STRING_EXT_INIT(payloadtypenames); |
576 | | |
577 | | static const value_string multipartdatatypenames[] = { |
578 | | { GVSP_MULTIPART_DATA_TYPE_2DIMAGE, "2D IMAGE" }, |
579 | | { GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR, "2D PLANE BI-PLANAR" }, |
580 | | { GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR, "2D PLANE TRI-PLANAR" }, |
581 | | { GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR, "2D PLANE QUAD-PLANAR" }, |
582 | | { GVSP_MULTIPART_DATA_TYPE_3DIMAGE, "3D IMAGE" }, |
583 | | { GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR, "3D PLANE BI-PLANAR" }, |
584 | | { GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR, "3D PLANE TRI-PLANAR" }, |
585 | | { GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR, "3D PLANE QUAD-PLANAR" }, |
586 | | { GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP, "CONFIDENCE MAP" }, |
587 | | { GVSP_MULTIPART_DATA_TYPE_CHUNKDATA, "CHUNK DATA" }, |
588 | | { GVSP_MULTIPART_DATA_TYPE_JPEG, "JPEG" }, |
589 | | { GVSP_MULTIPART_DATA_TYPE_JPEG2000, "JPEG 2000" }, |
590 | | { GVSP_MULTIPART_DATA_TYPE_DEVICESPECIFIC, "DEVICE SPECIFIC" }, |
591 | | { 0, NULL } |
592 | | }; |
593 | | |
594 | | static value_string_ext multipartdatatypenames_ext = VALUE_STRING_EXT_INIT(multipartdatatypenames); |
595 | | |
596 | | static const value_string pixeltypenames[] = |
597 | | { |
598 | | { GVSP_PIX_MONO1P, "Mono1p (Monochrome 1-bit packed)" }, |
599 | | { GVSP_PIX_CONFIDENCE1P, "Confidence1p (Confidence 1-bit packed)" }, |
600 | | { GVSP_PIX_MONO2P, "Mono2p (Monochrome 2-bit packed)" }, |
601 | | { GVSP_PIX_MONO4P, "Mono4p (Monochrome 4-bit packed)" }, |
602 | | { GVSP_PIX_BAYERGR4P, "BayerGR4p (Bayer Green-Red 4-bit packed)" }, |
603 | | { GVSP_PIX_BAYERRG4P, "BayerRG4p (Bayer Red-Green 4-bit packed)" }, |
604 | | { GVSP_PIX_BAYERGB4P, "BayerGB4p (Bayer Green-Blue 4-bit packed)" }, |
605 | | { GVSP_PIX_BAYERBG4P, "BayerBG4p (Bayer Blue-Green 4-bit packed)" }, |
606 | | { GVSP_PIX_MONO8, "Mono8 (Monochrome 8-bit)" }, |
607 | | { GVSP_PIX_MONO8S, "Mono8s (Monochrome 8-bit signed)" }, |
608 | | { GVSP_PIX_BAYERGR8, "BayerGR8 (Bayer Green-Red 8-bit)" }, |
609 | | { GVSP_PIX_BAYERRG8, "BayerRG8 (Bayer Red-Green 8-bit)" }, |
610 | | { GVSP_PIX_BAYERGB8, "BayerGB8 (Bayer Green-Blue 8-bit)" }, |
611 | | { GVSP_PIX_BAYERBG8, "BayerBG8 (Bayer Blue-Green 8-bit)" }, |
612 | | { GVSP_PIX_SCF1WBWG8, "SCF1WBWG8 (Sparse Color Filter #1 White-Blue-White-Green 8-bit)" }, |
613 | | { GVSP_PIX_SCF1WGWB8, "SCF1WGWB8 (Sparse Color Filter #1 White-Green-White-Blue 8-bit)" }, |
614 | | { GVSP_PIX_SCF1WGWR8, "SCF1WGWR8 (Sparse Color Filter #1 White-Green-White-Red 8-bit)" }, |
615 | | { GVSP_PIX_SCF1WRWG8, "SCF1WRWG8 (Sparse Color Filter #1 White-Red-White-Green 8-bit)" }, |
616 | | { GVSP_PIX_COORD3D_A8, "Coord3D_A8 (3D coordinate A 8-bit)" }, |
617 | | { GVSP_PIX_COORD3D_B8, "Coord3D_B8 (3D coordinate B 8-bit)" }, |
618 | | { GVSP_PIX_COORD3D_C8, "Coord3D_C8 (3D coordinate C 8-bit)" }, |
619 | | { GVSP_PIX_CONFIDENCE1, "Confidence1 (Confidence 1-bit unpacked)" }, |
620 | | { GVSP_PIX_CONFIDENCE8, "Confidence8 (Confidence 8-bit)" }, |
621 | | { GVSP_PIX_R8, "R8 (Red 8-bit)" }, |
622 | | { GVSP_PIX_G8, "G8 (Green 8-bit)" }, |
623 | | { GVSP_PIX_B8, "B8 (Blue 8-bit)" }, |
624 | | { GVSP_PIX_DATA8, "Data8 (Data 8-bit)" }, |
625 | | { GVSP_PIX_DATA8S, "Data8s (Data 8-bit signed)" }, |
626 | | { GVSP_PIX_MONO10P, "Mono10p (Monochrome 10-bit packed)" }, |
627 | | { GVSP_PIX_BAYERBG10P, "BayerBG10p (Bayer Blue-Green 10-bit packed)" }, |
628 | | { GVSP_PIX_BAYERGB10P, "BayerGB10p (Bayer Green-Blue 10-bit packed)" }, |
629 | | { GVSP_PIX_BAYERGR10P, "BayerGR10p (Bayer Green-Red 10-bit packed)" }, |
630 | | { GVSP_PIX_BAYERRG10P, "BayerRG10p (Bayer Red-Green 10-bit packed)" }, |
631 | | { GVSP_PIX_SCF1WBWG10P, "SCF1WBWG10p (Sparse Color Filter #1 White-Blue-White-Green 10-bit packed)" }, |
632 | | { GVSP_PIX_SCF1WGWB10P, "SCF1WGWB10p (Sparse Color Filter #1 White-Green-White-Blue 10-bit packed)" }, |
633 | | { GVSP_PIX_SCF1WGWR10P, "SCF1WGWR10p (Sparse Color Filter #1 White-Green-White-Red 10-bit packed)" }, |
634 | | { GVSP_PIX_SCF1WRWG10P, "SCF1WRWG10p (Sparse Color Filter #1 White-Red-White-Green 10-bit packed)" }, |
635 | | { GVSP_PIX_R10_DEPRECATED, "R10_Deprecated (Deprecated because size field is wrong)" }, |
636 | | { GVSP_PIX_G10_DEPRECATED, "G10_Deprecated (Deprecated because size field is wrong)" }, |
637 | | { GVSP_PIX_B10_DEPRECATED, "B10_Deprecated (Deprecated because size field is wrong)" }, |
638 | | { GVSP_PIX_COORD3D_A10P, "Coord3D_A10p (3D coordinate A 10-bit packed)" }, |
639 | | { GVSP_PIX_COORD3D_B10P, "Coord3D_B10p (3D coordinate B 10-bit packed)" }, |
640 | | { GVSP_PIX_COORD3D_C10P, "Coord3D_C10p (3D coordinate C 10-bit packed)" }, |
641 | | { GVSP_PIX_MONO10PACKED, "GVSP_Mono10Packed (GigE Vision specific format, Monochrome 10-bit packed)" }, |
642 | | { GVSP_PIX_MONO12PACKED, "GVSP_Mono12Packed (GigE Vision specific format, Monochrome 12-bit packed)" }, |
643 | | { GVSP_PIX_BAYERGR10PACKED, "GVSP_BayerGR10Packed (GigE Vision specific format, Bayer Green-Red 10-bit packed)" }, |
644 | | { GVSP_PIX_BAYERRG10PACKED, "GVSP_BayerRG10Packed (GigE Vision specific format, Bayer Red-Green 10-bit packed)" }, |
645 | | { GVSP_PIX_BAYERGB10PACKED, "GVSP_BayerGB10Packed (GigE Vision specific format, Bayer Green-Blue 10-bit packed)" }, |
646 | | { GVSP_PIX_BAYERBG10PACKED, "GVSP_BayerBG10Packed (GigE Vision specific format, Bayer Blue-Green 10-bit packed)" }, |
647 | | { GVSP_PIX_BAYERGR12PACKED, "GVSP_BayerGR12Packed (GigE Vision specific format, Bayer Green-Red 12-bit packed)" }, |
648 | | { GVSP_PIX_BAYERRG12PACKED, "GVSP_BayerRG12Packed (GigE Vision specific format, Bayer Red-Green 12-bit packed)" }, |
649 | | { GVSP_PIX_BAYERGB12PACKED, "GVSP_BayerGB12Packed (GigE Vision specific format, Bayer Green-Blue 12-bit packed)" }, |
650 | | { GVSP_PIX_BAYERBG12PACKED, "GVSP_BayerBG12Packed (GigE Vision specific format, Bayer Blue-Green 12-bit packed)" }, |
651 | | { GVSP_PIX_MONO12P, "Mono12p (Monochrome 12-bit packed)" }, |
652 | | { GVSP_PIX_BAYERBG12P, "BayerBG12p (Bayer Blue-Green 12-bit packed)" }, |
653 | | { GVSP_PIX_BAYERGB12P, "BayerGB12p (Bayer Green-Blue 12-bit packed)" }, |
654 | | { GVSP_PIX_BAYERGR12P, "BayerGR12p (Bayer Green-Red 12-bit packed)" }, |
655 | | { GVSP_PIX_BAYERRG12P, "BayerRG12p (Bayer Red-Green 12-bit packed)" }, |
656 | | { GVSP_PIX_SCF1WBWG12P, "SCF1WBWG12p (Sparse Color Filter #1 White-Blue-White-Green 12-bit packed)" }, |
657 | | { GVSP_PIX_SCF1WGWB12P, "SCF1WGWB12p (Sparse Color Filter #1 White-Green-White-Blue 12-bit packed)" }, |
658 | | { GVSP_PIX_SCF1WGWR12P, "SCF1WGWR12p (Sparse Color Filter #1 White-Green-White-Red 12-bit packed)" }, |
659 | | { GVSP_PIX_SCF1WRWG12P, "SCF1WRWG12p (Sparse Color Filter #1 White-Red-White-Green 12-bit packed)" }, |
660 | | { GVSP_PIX_R12_DEPRECATED, "R12_Deprecated (Deprecated because size field is wrong)" }, |
661 | | { GVSP_PIX_G12_DEPRECATED, "G12_Deprecated (Deprecated because size field is wrong)" }, |
662 | | { GVSP_PIX_B12_DEPRECATED, "B12_Deprecated (Deprecated because size field is wrong)" }, |
663 | | { GVSP_PIX_COORD3D_A12P, "Coord3D_A12p (3D coordinate A 12-bit packed)" }, |
664 | | { GVSP_PIX_COORD3D_B12P, "Coord3D_B12p (3D coordinate B 12-bit packed)" }, |
665 | | { GVSP_PIX_COORD3D_C12P, "Coord3D_C12p (3D coordinate C 12-bit packed)" }, |
666 | | { GVSP_PIX_MONO14P, "Mono14p (Monochrome 14-bit packed)" }, |
667 | | { GVSP_PIX_BAYERGR14P, "BayerGR14p (Bayer Green-Red 14-bit packed)" }, |
668 | | { GVSP_PIX_BAYERRG14P, "BayerRG14p (Bayer Red-Green 14-bit packed)" }, |
669 | | { GVSP_PIX_BAYERGB14P, "BayerGB14p (Bayer Green-Blue 14-bit packed)" }, |
670 | | { GVSP_PIX_BAYERBG14P, "BayerBG14p (Bayer Blue-Green 14-bit packed)" }, |
671 | | { GVSP_PIX_MONO10, "Mono10 (Monochrome 10-bit unpacked)" }, |
672 | | { GVSP_PIX_MONO12, "Mono12 (Monochrome 12-bit unpacked)" }, |
673 | | { GVSP_PIX_MONO16, "Mono16 (Monochrome 16-bit)" }, |
674 | | { GVSP_PIX_BAYERGR10, "BayerGR10 (Bayer Green-Red 10-bit unpacked)" }, |
675 | | { GVSP_PIX_BAYERRG10, "BayerRG10 (Bayer Red-Green 10-bit unpacked)" }, |
676 | | { GVSP_PIX_BAYERGB10, "BayerGB10 (Bayer Green-Blue 10-bit unpacked)" }, |
677 | | { GVSP_PIX_BAYERBG10, "BayerBG10 (Bayer Blue-Green 10-bit unpacked)" }, |
678 | | { GVSP_PIX_BAYERGR12, "BayerGR12 (Bayer Green-Red 12-bit unpacked)" }, |
679 | | { GVSP_PIX_BAYERRG12, "BayerRG12 (Bayer Red-Green 12-bit unpacked)" }, |
680 | | { GVSP_PIX_BAYERGB12, "BayerGB12 (Bayer Green-Blue 12-bit unpacked)" }, |
681 | | { GVSP_PIX_BAYERBG12, "BayerBG12 (Bayer Blue-Green 12-bit unpacked)" }, |
682 | | { GVSP_PIX_MONO14, "Mono14 (Monochrome 14-bit unpacked)" }, |
683 | | { GVSP_PIX_BAYERGR16, "BayerGR16 (Bayer Green-Red 16-bit)" }, |
684 | | { GVSP_PIX_BAYERRG16, "BayerRG16 (Bayer Red-Green 16-bit)" }, |
685 | | { GVSP_PIX_BAYERGB16, "BayerGB16 (Bayer Green-Blue 16-bit)" }, |
686 | | { GVSP_PIX_BAYERBG16, "BayerBG16 (Bayer Blue-Green 16-bit)" }, |
687 | | { GVSP_PIX_SCF1WBWG10, "SCF1WBWG10 (Sparse Color Filter #1 White-Blue-White-Green 10-bit unpacked)" }, |
688 | | { GVSP_PIX_SCF1WBWG12, "SCF1WBWG12 (Sparse Color Filter #1 White-Blue-White-Green 12-bit unpacked)" }, |
689 | | { GVSP_PIX_SCF1WBWG14, "SCF1WBWG14 (Sparse Color Filter #1 White-Blue-White-Green 14-bit unpacked)" }, |
690 | | { GVSP_PIX_SCF1WBWG16, "SCF1WBWG16 (Sparse Color Filter #1 White-Blue-White-Green 16-bit unpacked)" }, |
691 | | { GVSP_PIX_SCF1WGWB10, "SCF1WGWB10 (Sparse Color Filter #1 White-Green-White-Blue 10-bit unpacked)" }, |
692 | | { GVSP_PIX_SCF1WGWB12, "SCF1WGWB12 (Sparse Color Filter #1 White-Green-White-Blue 12-bit unpacked)" }, |
693 | | { GVSP_PIX_SCF1WGWB14, "SCF1WGWB14 (Sparse Color Filter #1 White-Green-White-Blue 14-bit unpacked)" }, |
694 | | { GVSP_PIX_SCF1WGWB16, "SCF1WGWB16 (Sparse Color Filter #1 White-Green-White-Blue 16-bit)" }, |
695 | | { GVSP_PIX_SCF1WGWR10, "SCF1WGWR10 (Sparse Color Filter #1 White-Green-White-Red 10-bit unpacked)" }, |
696 | | { GVSP_PIX_SCF1WGWR12, "SCF1WGWR12 (Sparse Color Filter #1 White-Green-White-Red 12-bit unpacked)" }, |
697 | | { GVSP_PIX_SCF1WGWR14, "SCF1WGWR14 (Sparse Color Filter #1 White-Green-White-Red 14-bit unpacked)" }, |
698 | | { GVSP_PIX_SCF1WGWR16, "SCF1WGWR16 (Sparse Color Filter #1 White-Green-White-Red 16-bit)" }, |
699 | | { GVSP_PIX_SCF1WRWG10, "SCF1WRWG10 (Sparse Color Filter #1 White-Red-White-Green 10-bit unpacked)" }, |
700 | | { GVSP_PIX_SCF1WRWG12, "SCF1WRWG12 (Sparse Color Filter #1 White-Red-White-Green 12-bit unpacked)" }, |
701 | | { GVSP_PIX_SCF1WRWG14, "SCF1WRWG14 (Sparse Color Filter #1 White-Red-White-Green 14-bit unpacked)" }, |
702 | | { GVSP_PIX_SCF1WRWG16, "SCF1WRWG16 (Sparse Color Filter #1 White-Red-White-Green 16-bit)" }, |
703 | | { GVSP_PIX_COORD3D_A16, "Coord3D_A16 (3D coordinate A 16-bit)" }, |
704 | | { GVSP_PIX_COORD3D_B16, "Coord3D_B16 (3D coordinate B 16-bit)" }, |
705 | | { GVSP_PIX_COORD3D_C16, "Coord3D_C16 (3D coordinate C 16-bit)" }, |
706 | | { GVSP_PIX_CONFIDENCE16, "Confidence16 (Confidence 16-bit)" }, |
707 | | { GVSP_PIX_R16, "R16 (Red 16-bit)" }, |
708 | | { GVSP_PIX_G16, "G16 (Green 16-bit)" }, |
709 | | { GVSP_PIX_B16, "B16 (Blue 16-bit)" }, |
710 | | { GVSP_PIX_BAYERGR14, "BayerGR14 (Bayer Green-Red 14-bit)" }, |
711 | | { GVSP_PIX_BAYERRG14, "BayerRG14 (Bayer Red-Green 14-bit)" }, |
712 | | { GVSP_PIX_BAYERGB14, "BayerGB14 (Bayer Green-Blue 14-bit)" }, |
713 | | { GVSP_PIX_BAYERBG14, "BayerBG14 (Bayer Blue-Green 14-bit)" }, |
714 | | { GVSP_PIX_DATA16, "Data16 (Data 16-bit)" }, |
715 | | { GVSP_PIX_DATA16S, "Data16s (Data 16-bit signed)" }, |
716 | | { GVSP_PIX_R10, "R10 (Red 10-bit)" }, |
717 | | { GVSP_PIX_R12, "R12 (Red 12-bit)" }, |
718 | | { GVSP_PIX_G10, "G10 (Green 10-bit)" }, |
719 | | { GVSP_PIX_G12, "G12 (Green 12-bit)" }, |
720 | | { GVSP_PIX_B10, "B10 (Blue 10-bit)" }, |
721 | | { GVSP_PIX_B12, "B12 (Blue 12-bit)" }, |
722 | | { GVSP_PIX_COORD3D_A32F, "Coord3D_A32f (3D coordinate A 32-bit floating point)" }, |
723 | | { GVSP_PIX_COORD3D_B32F, "Coord3D_B32f (3D coordinate B 32-bit floating point)" }, |
724 | | { GVSP_PIX_COORD3D_C32F, "Coord3D_C32f (3D coordinate C 32-bit floating point)" }, |
725 | | { GVSP_PIX_CONFIDENCE32F, "Confidence32f (Confidence 32-bit floating point)" }, |
726 | | { GVSP_PIX_MONO32, "Mono32 (Monochrome 32-bit)" }, |
727 | | { GVSP_PIX_DATA32, "Data32 (Data 32-bit)" }, |
728 | | { GVSP_PIX_DATA32S, "Data32s (Data 32-bit signed)" }, |
729 | | { GVSP_PIX_DATA32F, "Data32f (Data 32-bit floating point)" }, |
730 | | { GVSP_PIX_DATA64, "Data64 (Data 64-bit)" }, |
731 | | { GVSP_PIX_DATA64S, "Data64s (Data 64-bit signed)" }, |
732 | | { GVSP_PIX_DATA64F, "Data64f (Data 64-bit floating point)" }, |
733 | | { GVSP_PIX_YUV411_8_UYYVYY, "YUV411_8_UYYVYY (YUV 4:1:1 8-bit)" }, |
734 | | { GVSP_PIX_YCBCR411_8_CBYYCRYY, "YCbCr411_8_CbYYCrYY (YCbCr 4:1:1 8-bit)" }, |
735 | | { GVSP_PIX_YCBCR601_411_8_CBYYCRYY, "YCbCr601_411_8_CbYYCrYY (YCbCr 4:1:1 8-bit BT.601)" }, |
736 | | { GVSP_PIX_YCBCR709_411_8_CBYYCRYY, "YCbCr709_411_8_CbYYCrYY (YCbCr 4:1:1 8-bit BT.709)" }, |
737 | | { GVSP_PIX_YCBCR411_8, "YCbCr411_8 (YCbCr 4:1:1 8-bit)" }, |
738 | | { GVSP_PIX_YCBCR2020_411_8_CBYYCRYY, "YCbCr2020_411_8_CbYYCrYY (YCbCr 4:1:1 8-bit BT.2020)" }, |
739 | | { GVSP_PIX_YCBCR420_8_YY_CBCR_SEMIPLANAR, "YCbCr420_8_YY_CbCr_Semiplanar (YCbCr 4:2:0 8-bit YY/CbCr Semiplanar)" }, |
740 | | { GVSP_PIX_YCBCR420_8_YY_CRCB_SEMIPLANAR, "YCbCr420_8_YY_CrCb_Semiplanar (YCbCr 4:2:0 8-bit YY/CrCb Semiplanar)" }, |
741 | | { GVSP_PIX_YUV422_8_UYVY, "YUV422_8_UYVY (YUV 4:2:2 8-bit)" }, |
742 | | { GVSP_PIX_YUV422_8, "YUV422_8 (YUV 4:2:2 8-bit)" }, |
743 | | { GVSP_PIX_RGB565P, "RGB565p (Red-Green-Blue 5/6/5-bit packed)" }, |
744 | | { GVSP_PIX_BGR565P, "BGR565p (Blue-Green-Red 5/6/5-bit packed)" }, |
745 | | { GVSP_PIX_YCBCR422_8, "YCbCr422_8 (YCbCr 4:2:2 8-bit)" }, |
746 | | { GVSP_PIX_YCBCR601_422_8, "YCbCr601_422_8 (YCbCr 4:2:2 8-bit BT.601)" }, |
747 | | { GVSP_PIX_YCBCR709_422_8, "YCbCr709_422_8 (YCbCr 4:2:2 8-bit BT.709)" }, |
748 | | { GVSP_PIX_YCBCR422_8_CBYCRY, "YCbCr422_8_CbYCrY (YCbCr 4:2:2 8-bit)" }, |
749 | | { GVSP_PIX_YCBCR601_422_8_CBYCRY, "YCbCr601_422_8_CbYCrY (YCbCr 4:2:2 8-bit BT.601)" }, |
750 | | { GVSP_PIX_YCBCR709_422_8_CBYCRY, "YCbCr709_422_8_CbYCrY (YCbCr 4:2:2 8-bit BT.709)" }, |
751 | | { GVSP_PIX_BICOLORRGBG8, "BiColorRGBG8 (Bi-color Red/Green - Blue/Green 8-bit)" }, |
752 | | { GVSP_PIX_BICOLORBGRG8, "BiColorBGRG8 (Bi-color Blue/Green - Red/Green 8-bit)" }, |
753 | | { GVSP_PIX_COORD3D_AC8, "Coord3D_AC8 (3D coordinate A-C 8-bit)" }, |
754 | | { GVSP_PIX_COORD3D_AC8_PLANAR, "Coord3D_AC8_Planar (3D coordinate A-C 8-bit planar)" }, |
755 | | { GVSP_PIX_YCBCR2020_422_8, "YCbCr2020_422_8 (YCbCr 4:2:2 8-bit BT.2020)" }, |
756 | | { GVSP_PIX_YCBCR2020_422_8_CBYCRY, "YCbCr2020_422_8_CbYCrY (YCbCr 4:2:2 8-bit BT.2020)" }, |
757 | | { GVSP_PIX_YCBCR422_8_YY_CBCR_SEMIPLANAR, "YCbCr422_8_YY_CbCr_Semiplanar (YCbCr 4:2:2 8-bit YY/CbCr Semiplanar)" }, |
758 | | { GVSP_PIX_YCBCR422_8_YY_CRCB_SEMIPLANAR, "YCbCr422_8_YY_CrCb_Semiplanar (YCbCr 4:2:2 8-bit YY/CrCb Semiplanar)" }, |
759 | | { GVSP_PIX_YCBCR422_10P, "YCbCr422_10p (YCbCr 4:2:2 10-bit packed)" }, |
760 | | { GVSP_PIX_YCBCR601_422_10P, "YCbCr601_422_10p (YCbCr 4:2:2 10-bit packed BT.601)" }, |
761 | | { GVSP_PIX_YCBCR709_422_10P, "YCbCr709_422_10p (YCbCr 4:2:2 10-bit packed BT.709)" }, |
762 | | { GVSP_PIX_YCBCR422_10P_CBYCRY, "YCbCr422_10p_CbYCrY (YCbCr 4:2:2 10-bit packed)" }, |
763 | | { GVSP_PIX_YCBCR601_422_10P_CBYCRY, "YCbCr601_422_10p_CbYCrY (YCbCr 4:2:2 10-bit packed BT.601)" }, |
764 | | { GVSP_PIX_YCBCR709_422_10P_CBYCRY, "YCbCr709_422_10p_CbYCrY (YCbCr 4:2:2 10-bit packed BT.709)" }, |
765 | | { GVSP_PIX_BICOLORRGBG10P, "BiColorRGBG10p (Bi-color Red/Green - Blue/Green 10-bit packed)" }, |
766 | | { GVSP_PIX_BICOLORBGRG10P, "BiColorBGRG10p (Bi-color Blue/Green - Red/Green 10-bit packed)" }, |
767 | | { GVSP_PIX_COORD3D_AC10P, "Coord3D_AC10p (3D coordinate A-C 10-bit packed)" }, |
768 | | { GVSP_PIX_COORD3D_AC10P_PLANAR, "Coord3D_AC10p_Planar (3D coordinate A-C 10-bit packed planar)" }, |
769 | | { GVSP_PIX_YCBCR2020_422_10P, "YCbCr2020_422_10p (YCbCr 4:2:2 10-bit packed BT.2020)" }, |
770 | | { GVSP_PIX_YCBCR2020_422_10P_CBYCRY, "YCbCr2020_422_10p_CbYCrY (YCbCr 4:2:2 10-bit packed BT.2020)" }, |
771 | | { GVSP_PIX_RGB8, "RGB8 (Red-Green-Blue 8-bit)" }, |
772 | | { GVSP_PIX_BGR8, "BGR8 (Blue-Green-Red 8-bit)" }, |
773 | | { GVSP_PIX_YUV8_UYV, "YUV8_UYV (YUV 4:4:4 8-bit)" }, |
774 | | { GVSP_PIX_RGB8_PLANAR, "RGB8_Planar (Red-Green-Blue 8-bit planar)" }, |
775 | | { GVSP_PIX_YCBCR8_CBYCR, "YCbCr8_CbYCr (YCbCr 4:4:4 8-bit)" }, |
776 | | { GVSP_PIX_YCBCR601_8_CBYCR, "YCbCr601_8_CbYCr (YCbCr 4:4:4 8-bit BT.601)" }, |
777 | | { GVSP_PIX_YCBCR709_8_CBYCR, "YCbCr709_8_CbYCr (YCbCr 4:4:4 8-bit BT.709)" }, |
778 | | { GVSP_PIX_YCBCR8, "YCbCr8 (YCbCr 4:4:4 8-bit)" }, |
779 | | { GVSP_PIX_YCBCR422_12P, "YCbCr422_12p (YCbCr 4:2:2 12-bit packed)" }, |
780 | | { GVSP_PIX_YCBCR601_422_12P, "YCbCr601_422_12p (YCbCr 4:2:2 12-bit packed BT.601)" }, |
781 | | { GVSP_PIX_YCBCR709_422_12P, "YCbCr709_422_12p (YCbCr 4:2:2 12-bit packed BT.709)" }, |
782 | | { GVSP_PIX_YCBCR422_12P_CBYCRY, "YCbCr422_12p_CbYCrY (YCbCr 4:2:2 12-bit packed)" }, |
783 | | { GVSP_PIX_YCBCR601_422_12P_CBYCRY, "YCbCr601_422_12p_CbYCrY (YCbCr 4:2:2 12-bit packed BT.601)" }, |
784 | | { GVSP_PIX_YCBCR709_422_12P_CBYCRY, "YCbCr709_422_12p_CbYCrY (YCbCr 4:2:2 12-bit packed BT.709)" }, |
785 | | { GVSP_PIX_BICOLORRGBG12P, "BiColorRGBG12p (Bi-color Red/Green - Blue/Green 12-bit packed)" }, |
786 | | { GVSP_PIX_BICOLORBGRG12P, "BiColorBGRG12p (Bi-color Blue/Green - Red/Green 12-bit packed)" }, |
787 | | { GVSP_PIX_COORD3D_ABC8, "Coord3D_ABC8 (3D coordinate A-B-C 8-bit)" }, |
788 | | { GVSP_PIX_COORD3D_ABC8_PLANAR, "Coord3D_ABC8_Planar (3D coordinate A-B-C 8-bit planar)" }, |
789 | | { GVSP_PIX_COORD3D_AC12P, "Coord3D_AC12p (3D coordinate A-C 12-bit packed)" }, |
790 | | { GVSP_PIX_COORD3D_AC12P_PLANAR, "Coord3D_AC12p_Planar (3D coordinate A-C 12-bit packed planar)" }, |
791 | | { GVSP_PIX_YCBCR2020_8_CBYCR, "YCbCr2020_8_CbYCr (YCbCr 4:4:4 8-bit BT.2020)" }, |
792 | | { GVSP_PIX_YCBCR2020_422_12P, "YCbCr2020_422_12p (YCbCr 4:2:2 12-bit packed BT.2020)" }, |
793 | | { GVSP_PIX_YCBCR2020_422_12P_CBYCRY, "YCbCr2020_422_12p_CbYCrY (YCbCr 4:2:2 12-bit packed BT.2020)" }, |
794 | | { GVSP_PIX_BGR10P, "BGR10p (Blue-Green-Red 10-bit packed)" }, |
795 | | { GVSP_PIX_RGB10P, "RGB10p (Red-Green-Blue 10-bit packed)" }, |
796 | | { GVSP_PIX_YCBCR10P_CBYCR, "YCbCr10p_CbYCr (YCbCr 4:4:4 10-bit packed)" }, |
797 | | { GVSP_PIX_YCBCR601_10P_CBYCR, "YCbCr601_10p_CbYCr (YCbCr 4:4:4 10-bit packed BT.601)" }, |
798 | | { GVSP_PIX_YCBCR709_10P_CBYCR, "YCbCr709_10p_CbYCr (YCbCr 4:4:4 10-bit packed BT.709)" }, |
799 | | { GVSP_PIX_COORD3D_ABC10P, "Coord3D_ABC10p (3D coordinate A-B-C 10-bit packed)" }, |
800 | | { GVSP_PIX_COORD3D_ABC10P_PLANAR, "Coord3D_ABC10p_Planar (3D coordinate A-B-C 10-bit packed planar)" }, |
801 | | { GVSP_PIX_YCBCR2020_10P_CBYCR, "YCbCr2020_10p_CbYCr (YCbCr 4:4:4 10-bit packed BT.2020)" }, |
802 | | { GVSP_PIX_RGBA8, "RGBa8 (Red-Green-Blue-alpha 8-bit)" }, |
803 | | { GVSP_PIX_BGRA8, "BGRa8 (Blue-Green-Red-alpha 8-bit)" }, |
804 | | { GVSP_PIX_RGB10V1PACKED, "GVSP_RGB10V1Packed (GigE Vision specific format, Red-Green-Blue 10-bit packed - variant 1)" }, |
805 | | { GVSP_PIX_RGB10P32, "RGB10p32 (Red-Green-Blue 10-bit packed into 32-bit)" }, |
806 | | { GVSP_PIX_YCBCR422_10, "YCbCr422_10 (YCbCr 4:2:2 10-bit unpacked)" }, |
807 | | { GVSP_PIX_YCBCR422_12, "YCbCr422_12 (YCbCr 4:2:2 12-bit unpacked)" }, |
808 | | { GVSP_PIX_YCBCR601_422_10, "YCbCr601_422_10 (YCbCr 4:2:2 10-bit unpacked BT.601)" }, |
809 | | { GVSP_PIX_YCBCR601_422_12, "YCbCr601_422_12 (YCbCr 4:2:2 12-bit unpacked BT.601)" }, |
810 | | { GVSP_PIX_YCBCR709_422_10, "YCbCr709_422_10 (YCbCr 4:2:2 10-bit unpacked BT.709)" }, |
811 | | { GVSP_PIX_YCBCR709_422_12, "YCbCr709_422_12 (YCbCr 4:2:2 12-bit unpacked BT.709)" }, |
812 | | { GVSP_PIX_YCBCR422_10_CBYCRY, "YCbCr422_10_CbYCrY (YCbCr 4:2:2 10-bit unpacked)" }, |
813 | | { GVSP_PIX_YCBCR422_12_CBYCRY, "YCbCr422_12_CbYCrY (YCbCr 4:2:2 12-bit unpacked)" }, |
814 | | { GVSP_PIX_YCBCR601_422_10_CBYCRY, "YCbCr601_422_10_CbYCrY (YCbCr 4:2:2 10-bit unpacked BT.601)" }, |
815 | | { GVSP_PIX_YCBCR601_422_12_CBYCRY, "YCbCr601_422_12_CbYCrY (YCbCr 4:2:2 12-bit unpacked BT.601)" }, |
816 | | { GVSP_PIX_YCBCR709_422_10_CBYCRY, "YCbCr709_422_10_CbYCrY (YCbCr 4:2:2 10-bit unpacked BT.709)" }, |
817 | | { GVSP_PIX_YCBCR709_422_12_CBYCRY, "YCbCr709_422_12_CbYCrY (YCbCr 4:2:2 12-bit unpacked BT.709)" }, |
818 | | { GVSP_PIX_BICOLORRGBG10, "BiColorRGBG10 (Bi-color Red/Green - Blue/Green 10-bit unpacked)" }, |
819 | | { GVSP_PIX_BICOLORBGRG10, "BiColorBGRG10 (Bi-color Blue/Green - Red/Green 10-bit unpacked)" }, |
820 | | { GVSP_PIX_BICOLORRGBG12, "BiColorRGBG12 (Bi-color Red/Green - Blue/Green 12-bit unpacked)" }, |
821 | | { GVSP_PIX_BICOLORBGRG12, "BiColorBGRG12 (Bi-color Blue/Green - Red/Green 12-bit unpacked)" }, |
822 | | { GVSP_PIX_COORD3D_AC16, "Coord3D_AC16 (3D coordinate A-C 16-bit)" }, |
823 | | { GVSP_PIX_COORD3D_AC16_PLANAR, "Coord3D_AC16_Planar (3D coordinate A-C 16-bit planar)" }, |
824 | | { GVSP_PIX_YCBCR2020_422_10, "YCbCr2020_422_10 (YCbCr 4:2:2 10-bit unpacked BT.2020)" }, |
825 | | { GVSP_PIX_YCBCR2020_422_10_CBYCRY, "YCbCr2020_422_10_CbYCrY (YCbCr 4:2:2 10-bit unpacked BT.2020)" }, |
826 | | { GVSP_PIX_YCBCR2020_422_12, "YCbCr2020_422_12 (YCbCr 4:2:2 12-bit unpacked BT.2020)" }, |
827 | | { GVSP_PIX_YCBCR2020_422_12_CBYCRY, "YCbCr2020_422_12_CbYCrY (YCbCr 4:2:2 12-bit unpacked BT.2020)" }, |
828 | | { GVSP_PIX_RGB12V1PACKED, "GVSP_RGB12V1Packed (GigE Vision specific format, Red-Green-Blue 12-bit packed - variant 1)" }, |
829 | | { GVSP_PIX_BGR12P, "BGR12p (Blue-Green-Red 12-bit packed)" }, |
830 | | { GVSP_PIX_RGB12P, "RGB12p (Red-Green-Blue 12-bit packed)" }, |
831 | | { GVSP_PIX_YCBCR12P_CBYCR, "YCbCr12p_CbYCr (YCbCr 4:4:4 12-bit packed)" }, |
832 | | { GVSP_PIX_YCBCR601_12P_CBYCR, "YCbCr601_12p_CbYCr (YCbCr 4:4:4 12-bit packed BT.601)" }, |
833 | | { GVSP_PIX_YCBCR709_12P_CBYCR, "YCbCr709_12p_CbYCr (YCbCr 4:4:4 12-bit packed BT.709)" }, |
834 | | { GVSP_PIX_COORD3D_ABC12P, "Coord3D_ABC12p (3D coordinate A-B-C 12-bit packed)" }, |
835 | | { GVSP_PIX_COORD3D_ABC12P_PLANAR, "Coord3D_ABC12p_Planar (3D coordinate A-B-C 12-bit packed planar)" }, |
836 | | { GVSP_PIX_YCBCR2020_12P_CBYCR, "YCbCr2020_12p_CbYCr (YCbCr 4:4:4 12-bit packed BT.2020)" }, |
837 | | { GVSP_PIX_BGRA10P, "BGRa10p (Blue-Green-Red-alpha 10-bit packed)" }, |
838 | | { GVSP_PIX_RGBA10P, "RGBa10p (Red-Green-Blue-alpha 10-bit packed)" }, |
839 | | { GVSP_PIX_RGB10, "RGB10 (Red-Green-Blue 10-bit unpacked)" }, |
840 | | { GVSP_PIX_BGR10, "BGR10 (Blue-Green-Red 10-bit unpacked)" }, |
841 | | { GVSP_PIX_RGB12, "RGB12 (Red-Green-Blue 12-bit unpacked)" }, |
842 | | { GVSP_PIX_BGR12, "BGR12 (Blue-Green-Red 12-bit unpacked)" }, |
843 | | { GVSP_PIX_RGB10_PLANAR, "RGB10_Planar (Red-Green-Blue 10-bit unpacked planar)" }, |
844 | | { GVSP_PIX_RGB12_PLANAR, "RGB12_Planar (Red-Green-Blue 12-bit unpacked planar)" }, |
845 | | { GVSP_PIX_RGB16_PLANAR, "RGB16_Planar (Red-Green-Blue 16-bit planar)" }, |
846 | | { GVSP_PIX_RGB16, "RGB16 (Red-Green-Blue 16-bit)" }, |
847 | | { GVSP_PIX_BGR14, "BGR14 (Blue-Green-Red 14-bit unpacked)" }, |
848 | | { GVSP_PIX_BGR16, "BGR16 (Blue-Green-Red 16-bit)" }, |
849 | | { GVSP_PIX_BGRA12P, "BGRa12p (Blue-Green-Red-alpha 12-bit packed)" }, |
850 | | { GVSP_PIX_RGB14, "RGB14 (Red-Green-Blue 14-bit unpacked)" }, |
851 | | { GVSP_PIX_RGBA12P, "RGBa12p (Red-Green-Blue-alpha 12-bit packed)" }, |
852 | | { GVSP_PIX_YCBCR10_CBYCR, "YCbCr10_CbYCr (YCbCr 4:4:4 10-bit unpacked)" }, |
853 | | { GVSP_PIX_YCBCR12_CBYCR, "YCbCr12_CbYCr (YCbCr 4:4:4 12-bit unpacked)" }, |
854 | | { GVSP_PIX_YCBCR601_10_CBYCR, "YCbCr601_10_CbYCr (YCbCr 4:4:4 10-bit unpacked BT.601)" }, |
855 | | { GVSP_PIX_YCBCR601_12_CBYCR, "YCbCr601_12_CbYCr (YCbCr 4:4:4 12-bit unpacked BT.601)" }, |
856 | | { GVSP_PIX_YCBCR709_10_CBYCR, "YCbCr709_10_CbYCr (YCbCr 4:4:4 10-bit unpacked BT.709)" }, |
857 | | { GVSP_PIX_YCBCR709_12_CBYCR, "YCbCr709_12_CbYCr (YCbCr 4:4:4 12-bit unpacked BT.709)" }, |
858 | | { GVSP_PIX_COORD3D_ABC16, "Coord3D_ABC16 (3D coordinate A-B-C 16-bit)" }, |
859 | | { GVSP_PIX_COORD3D_ABC16_PLANAR, "Coord3D_ABC16_Planar (3D coordinate A-B-C 16-bit planar)" }, |
860 | | { GVSP_PIX_YCBCR2020_10_CBYCR, "YCbCr2020_10_CbYCr (YCbCr 4:4:4 10-bit unpacked BT.2020)" }, |
861 | | { GVSP_PIX_YCBCR2020_12_CBYCR, "YCbCr2020_12_CbYCr (YCbCr 4:4:4 12-bit unpacked BT.2020)" }, |
862 | | { GVSP_PIX_BGRA10, "BGRa10 (Blue-Green-Red-alpha 10-bit unpacked)" }, |
863 | | { GVSP_PIX_BGRA12, "BGRa12 (Blue-Green-Red-alpha 12-bit unpacked)" }, |
864 | | { GVSP_PIX_BGRA14, "BGRa14 (Blue-Green-Red-alpha 14-bit unpacked)" }, |
865 | | { GVSP_PIX_BGRA16, "BGRa16 (Blue-Green-Red-alpha 16-bit)" }, |
866 | | { GVSP_PIX_RGBA10, "RGBa10 (Red-Green-Blue-alpha 10-bit unpacked)" }, |
867 | | { GVSP_PIX_RGBA12, "RGBa12 (Red-Green-Blue-alpha 12-bit unpacked)" }, |
868 | | { GVSP_PIX_RGBA14, "RGBa14 (Red-Green-Blue-alpha 14-bit unpacked)" }, |
869 | | { GVSP_PIX_RGBA16, "RGBa16 (Red-Green-Blue-alpha 16-bit)" }, |
870 | | { GVSP_PIX_COORD3D_AC32F, "Coord3D_AC32f (3D coordinate A-C 32-bit floating point)" }, |
871 | | { GVSP_PIX_COORD3D_AC32F_PLANAR, "Coord3D_AC32f_Planar (3D coordinate A-C 32-bit floating point planar)" }, |
872 | | { GVSP_PIX_COORD3D_ABC32F, "Coord3D_ABC32f (3D coordinate A-B-C 32-bit floating point)" }, |
873 | | { GVSP_PIX_COORD3D_ABC32F_PLANAR, "Coord3D_ABC32f_Planar (3D coordinate A-B-C 32-bit floating point planar)" }, |
874 | | { 0, NULL } |
875 | | }; |
876 | | |
877 | | static value_string_ext pixeltypenames_ext = VALUE_STRING_EXT_INIT(pixeltypenames); |
878 | | |
879 | | static const value_string colornames[] = { |
880 | | { GVSP_PIX_MONO >> 24, "Mono" }, |
881 | | { GVSP_PIX_COLOR >> 24, "Color" }, |
882 | | { GVSP_PIX_CUSTOM >> 24, "Custom" }, |
883 | | { 0, NULL } |
884 | | }; |
885 | | |
886 | | static const true_false_string zonedirectionnames = { |
887 | | "Bottom Up", |
888 | | "Top-Down" |
889 | | }; |
890 | | |
891 | | /* GEV 2.2 */ |
892 | | static const value_string gendc_payload_descriptor_flag_values[] = { |
893 | | { 0, "No Descriptor Data" }, |
894 | | { 1, "Final Descriptor Data" }, |
895 | | { 2, "Final Descriptor Data With Non-Descriptor Data" }, |
896 | | { 3, "Preliminary Descriptor Data" }, |
897 | | { 0, NULL } |
898 | | }; |
899 | | |
900 | | /* GEV 2.2 */ |
901 | | static const value_string gendc_header_type_values[] = { |
902 | | { GENDC_HEADER_TYPE_CONTAINER , "Container" }, |
903 | | { GENDC_HEADER_TYPE_COMPONENT_HEADER , "Component Header" }, |
904 | | { GENDC_HEADER_TYPE_PART_CHUNK, "Chunk" }, |
905 | | { GENDC_HEADER_TYPE_PART_XML, "GenICam XML" }, |
906 | | { GENDC_HEADER_TYPE_PART_1D, "1D Array" }, |
907 | | { GENDC_HEADER_TYPE_PART_2D, "2D Array" }, |
908 | | { GENDC_HEADER_TYPE_PART_2D_JPEG, "JPEG Image" }, |
909 | | { GENDC_HEADER_TYPE_PART_2D_JPEG2000, "JPEG 2000 Image" }, |
910 | | { GENDC_HEADER_TYPE_PART_2D_H264, "H.264 Image" }, |
911 | | { 0, NULL } |
912 | | }; |
913 | | |
914 | | /* GEV 2.2 */ |
915 | | static const val64_string gendc_component_typeid_values[] = { |
916 | | { GENDC_COMPONENT_TYPEID_UNDEFINED , "Undefined" }, |
917 | | { GENDC_COMPONENT_TYPEID_INTENSITY , "Intensity" }, |
918 | | { GENDC_COMPONENT_TYPEID_INFRARED , "Infrared" }, |
919 | | { GENDC_COMPONENT_TYPEID_ULTRAVIOLET , "Ultraviolet" }, |
920 | | { GENDC_COMPONENT_TYPEID_RANGE , "Range" }, |
921 | | { GENDC_COMPONENT_TYPEID_REFLECTANCE , "Reflectance" }, |
922 | | { GENDC_COMPONENT_TYPEID_CONFIDENCE , "Confidence" }, |
923 | | { GENDC_COMPONENT_TYPEID_SCATTER , "Scatter" }, |
924 | | { GENDC_COMPONENT_TYPEID_DISPARITY , "Disparity" }, |
925 | | { GENDC_COMPONENT_TYPEID_MULTISPECTRAL , "Multispectral" }, |
926 | | { GENDC_COMPONENT_TYPEID_METADATA , "Metadata" }, |
927 | | { GENDC_COMPONENT_TYPEID_RESERVED , "Reserved" }, |
928 | | { 0, NULL } |
929 | | }; |
930 | | |
931 | | static int hf_gvsp_status; |
932 | | static int hf_gvsp_blockid16; |
933 | | static int hf_gvsp_flags; |
934 | | static int hf_gvsp_flagdevicespecific0; |
935 | | static int hf_gvsp_flagdevicespecific1; |
936 | | static int hf_gvsp_flagdevicespecific2; |
937 | | static int hf_gvsp_flagdevicespecific3; |
938 | | static int hf_gvsp_flagdevicespecific4; |
939 | | static int hf_gvsp_flagdevicespecific5; |
940 | | static int hf_gvsp_flagdevicespecific6; |
941 | | static int hf_gvsp_flagdevicespecific7; |
942 | | static int hf_gvsp_flagresendrangeerror; |
943 | | static int hf_gvsp_flagpreviousblockdropped; |
944 | | static int hf_gvsp_flagpacketresend; |
945 | | static int hf_gvsp_format; |
946 | | static int hf_gvsp_packetid24; |
947 | | static int hf_gvsp_blockid64; |
948 | | static int hf_gvsp_packetid32; |
949 | | static int hf_gvsp_payloadtype; |
950 | | static int hf_gvsp_payloaddata; |
951 | | static int hf_gvsp_timestamp; |
952 | | static int hf_gvsp_pixelformat; |
953 | | static int hf_gvsp_sizex; |
954 | | static int hf_gvsp_sizey; |
955 | | static int hf_gvsp_offsetx; |
956 | | static int hf_gvsp_offsety; |
957 | | static int hf_gvsp_paddingx; |
958 | | static int hf_gvsp_paddingy; |
959 | | static int hf_gvsp_payloaddatasize; |
960 | | static int hf_gvsp_pixelcolor; |
961 | | static int hf_gvsp_pixeloccupy; |
962 | | static int hf_gvsp_pixelid; |
963 | | static int hf_gvsp_filename; |
964 | | static int hf_gvsp_payloadlength; |
965 | | static int hf_gvsp_fieldinfo; |
966 | | static int hf_gvsp_fieldid; |
967 | | static int hf_gvsp_fieldcount; |
968 | | static int hf_gvsp_genericflags; |
969 | | static int hf_gvsp_timestamptickfrequency; |
970 | | static int hf_gvsp_dataformat; |
971 | | static int hf_gvsp_packetizationmode; |
972 | | static int hf_gvsp_packetsize; |
973 | | static int hf_gvsp_profileidc; |
974 | | static int hf_gvsp_cs; |
975 | | static int hf_gvsp_cs0; |
976 | | static int hf_gvsp_cs1; |
977 | | static int hf_gvsp_cs2; |
978 | | static int hf_gvsp_cs3; |
979 | | static int hf_gvsp_levelidc; |
980 | | static int hf_gvsp_sropinterleavingdepth; |
981 | | static int hf_gvsp_sropmaxdondiff; |
982 | | static int hf_gvsp_sropdeintbufreq; |
983 | | static int hf_gvsp_sropinitbuftime; |
984 | | static int hf_gvsp_add_zones; |
985 | | static int hf_gvsp_zoneinfo; |
986 | | static int hf_gvsp_zoneid; |
987 | | static int hf_gvsp_endofzone; |
988 | | static int hf_gvsp_addressoffset; |
989 | | static int hf_gvsp_sc_zone_direction; |
990 | | static int hf_gvsp_sc_zone0_direction; |
991 | | static int hf_gvsp_sc_zone1_direction; |
992 | | static int hf_gvsp_sc_zone2_direction; |
993 | | static int hf_gvsp_sc_zone3_direction; |
994 | | static int hf_gvsp_sc_zone4_direction; |
995 | | static int hf_gvsp_sc_zone5_direction; |
996 | | static int hf_gvsp_sc_zone6_direction; |
997 | | static int hf_gvsp_sc_zone7_direction; |
998 | | static int hf_gvsp_sc_zone8_direction; |
999 | | static int hf_gvsp_sc_zone9_direction; |
1000 | | static int hf_gvsp_sc_zone10_direction; |
1001 | | static int hf_gvsp_sc_zone11_direction; |
1002 | | static int hf_gvsp_sc_zone12_direction; |
1003 | | static int hf_gvsp_sc_zone13_direction; |
1004 | | static int hf_gvsp_sc_zone14_direction; |
1005 | | static int hf_gvsp_sc_zone15_direction; |
1006 | | static int hf_gvsp_sc_zone16_direction; |
1007 | | static int hf_gvsp_sc_zone17_direction; |
1008 | | static int hf_gvsp_sc_zone18_direction; |
1009 | | static int hf_gvsp_sc_zone19_direction; |
1010 | | static int hf_gvsp_sc_zone20_direction; |
1011 | | static int hf_gvsp_sc_zone21_direction; |
1012 | | static int hf_gvsp_sc_zone22_direction; |
1013 | | static int hf_gvsp_sc_zone23_direction; |
1014 | | static int hf_gvsp_sc_zone24_direction; |
1015 | | static int hf_gvsp_sc_zone25_direction; |
1016 | | static int hf_gvsp_sc_zone26_direction; |
1017 | | static int hf_gvsp_sc_zone27_direction; |
1018 | | static int hf_gvsp_sc_zone28_direction; |
1019 | | static int hf_gvsp_sc_zone29_direction; |
1020 | | static int hf_gvsp_sc_zone30_direction; |
1021 | | static int hf_gvsp_sc_zone31_direction; |
1022 | | static int hf_gvsp_numparts; |
1023 | | static int hf_gvsp_multipart_data_type; |
1024 | | static int hf_gvsp_partlength; |
1025 | | static int hf_gvsp_multi_part_source_id; |
1026 | | static int hf_gvsp_data_purpose_id; |
1027 | | static int hf_gvsp_region_id; |
1028 | | static int hf_gvsp_endofpart; |
1029 | | static int hf_gvsp_add_zones_multipart; |
1030 | | static int hf_gvsp_zoneinfo_multipart; |
1031 | | static int hf_gvsp_multi_part_part_id; |
1032 | | static int hf_gvsp_data_type_specific; |
1033 | | static int hf_gvsp_chunk_data_payload_length_hex; |
1034 | | static int hf_gvsp_chunk_layout_id_hex; |
1035 | | |
1036 | | /* Added for 2.2 support */ |
1037 | | static int hf_gvsp_gendc_leader_descriptor_size_v2_2; |
1038 | | static int hf_gvsp_gendc_leader_flags_v2_2; |
1039 | | static int hf_gvsp_gendc_leader_flags_preliminary_descriptor_v2_2; |
1040 | | static int hf_gvsp_gendc_leader_flags_reserved_v2_2; |
1041 | | static int hf_gvsp_gendc_payload_data_size_v2_2; |
1042 | | static int hf_gvsp_gendc_payload_data_destination_offset_v2_2; |
1043 | | static int hf_gvsp_gendc_payload_data_flags_v2_2; |
1044 | | static int hf_gvsp_gendc_payload_data_flag_descriptor_flags_v2_2; |
1045 | | static int hf_gvsp_gendc_payload_data_flag_start_of_descriptor_data_v2_2; |
1046 | | static int hf_gvsp_gendc_payload_data_flag_end_of_descriptor_data_v2_2; |
1047 | | static int hf_gvsp_gendc_payload_data_flags_reserved_v2_2; |
1048 | | static int hf_gvsp_gendc_payload_flow_flags_v2_2; |
1049 | | static int hf_gvsp_gendc_payload_flow_flag_first_packet_v2_2; |
1050 | | static int hf_gvsp_gendc_payload_flow_flag_last_packet_v2_2; |
1051 | | static int hf_gvsp_gendc_payload_flow_id_v2_2; |
1052 | | static int hf_gvsp_gendc_header_size_v2_2; |
1053 | | static int hf_gvsp_gendc_header_type_v2_2; |
1054 | | static int hf_gvsp_gendc_header_reserved_1_byte_v2_2; |
1055 | | static int hf_gvsp_gendc_header_reserved_2_bytes_v2_2; |
1056 | | static int hf_gvsp_gendc_header_reserved_4_bytes_v2_2; |
1057 | | static int hf_gvsp_gendc_container_header_signature_v2_2; |
1058 | | static int hf_gvsp_gendc_container_header_version_major_v2_2; |
1059 | | static int hf_gvsp_gendc_container_header_version_minor_v2_2; |
1060 | | static int hf_gvsp_gendc_container_header_version_sub_minor_v2_2; |
1061 | | static int hf_gvsp_gendc_container_header_flags_v2_2; |
1062 | | static int hf_gvsp_gendc_container_header_flags_timestamp_ptp_v2_2; |
1063 | | static int hf_gvsp_gendc_container_header_flags_component_invalid_v2_2; |
1064 | | static int hf_gvsp_gendc_container_header_flags_reserved_v2_2; |
1065 | | static int hf_gvsp_gendc_container_header_id_v2_2; |
1066 | | static int hf_gvsp_gendc_container_header_variable_fields_v2_2; |
1067 | | static int hf_gvsp_gendc_container_header_variable_fields_data_size_v2_2; |
1068 | | static int hf_gvsp_gendc_container_header_variable_fields_size_x_v2_2; |
1069 | | static int hf_gvsp_gendc_container_header_variable_fields_size_y_v2_2; |
1070 | | static int hf_gvsp_gendc_container_header_variable_fields_region_offset_v2_2; |
1071 | | static int hf_gvsp_gendc_container_header_variable_fields_format_v2_2; |
1072 | | static int hf_gvsp_gendc_container_header_variable_fields_timestamp_v2_2; |
1073 | | static int hf_gvsp_gendc_container_header_variable_fields_component_count_v2_2; |
1074 | | static int hf_gvsp_gendc_container_header_variable_fields_component_invalid_v2_2; |
1075 | | static int hf_gvsp_gendc_container_header_variable_fields_reserved_v2_2; |
1076 | | static int hf_gvsp_gendc_container_header_data_size_v2_2; |
1077 | | static int hf_gvsp_gendc_container_header_data_offset_v2_2; |
1078 | | static int hf_gvsp_gendc_container_header_descriptor_size_v2_2; |
1079 | | static int hf_gvsp_gendc_container_header_component_count_v2_2; |
1080 | | static int hf_gvsp_gendc_container_header_component_offset_v2_2; |
1081 | | static int hf_gvsp_gendc_component_header_flags_v2_2; |
1082 | | static int hf_gvsp_gendc_component_header_flags_invalid_v2_2; |
1083 | | static int hf_gvsp_gendc_component_header_flags_reserved_v2_2; |
1084 | | static int hf_gvsp_gendc_component_header_group_id_v2_2; |
1085 | | static int hf_gvsp_gendc_component_header_source_id_v2_2; |
1086 | | static int hf_gvsp_gendc_component_header_region_id_v2_2; |
1087 | | static int hf_gvsp_gendc_component_header_type_id_v2_2; |
1088 | | static int hf_gvsp_gendc_component_header_part_count_v2_2; |
1089 | | static int hf_gvsp_gendc_component_header_part_offset_v2_2; |
1090 | | static int hf_gvsp_gendc_part_header_flags_xml_reserved1_v2_2; |
1091 | | static int hf_gvsp_gendc_part_header_flags_xml_zip_v2_2; |
1092 | | static int hf_gvsp_gendc_part_header_flags_xml_chunk_v2_2; |
1093 | | static int hf_gvsp_gendc_part_header_flags_xml_reserved2_v2_2; |
1094 | | static int hf_gvsp_gendc_part_header_flags_v2_2; |
1095 | | static int hf_gvsp_gendc_part_header_flow_offset_v2_2; |
1096 | | static int hf_gvsp_gendc_part_header_type_specific_info_v2_2; |
1097 | | static int hf_gvsp_gendc_part_header_1D_size_v2_2; |
1098 | | static int hf_gvsp_gendc_part_header_1D_padding_v2_2; |
1099 | | |
1100 | | static int * const pixelformat_fields[] = { |
1101 | | &hf_gvsp_pixelcolor, |
1102 | | &hf_gvsp_pixeloccupy, |
1103 | | &hf_gvsp_pixelid, |
1104 | | NULL |
1105 | | }; |
1106 | | |
1107 | | static int * const fieldinfo_fields[] = { |
1108 | | &hf_gvsp_fieldid, |
1109 | | &hf_gvsp_fieldcount, |
1110 | | NULL |
1111 | | }; |
1112 | | |
1113 | | static int * const cs_fields[] = { |
1114 | | &hf_gvsp_cs0, |
1115 | | &hf_gvsp_cs1, |
1116 | | &hf_gvsp_cs2, |
1117 | | &hf_gvsp_cs3, |
1118 | | NULL |
1119 | | }; |
1120 | | |
1121 | | static int * const sc_zone_direction_fields[] = { |
1122 | | &hf_gvsp_sc_zone0_direction, |
1123 | | &hf_gvsp_sc_zone1_direction, |
1124 | | &hf_gvsp_sc_zone2_direction, |
1125 | | &hf_gvsp_sc_zone3_direction, |
1126 | | &hf_gvsp_sc_zone4_direction, |
1127 | | &hf_gvsp_sc_zone5_direction, |
1128 | | &hf_gvsp_sc_zone6_direction, |
1129 | | &hf_gvsp_sc_zone7_direction, |
1130 | | &hf_gvsp_sc_zone8_direction, |
1131 | | &hf_gvsp_sc_zone9_direction, |
1132 | | &hf_gvsp_sc_zone10_direction, |
1133 | | &hf_gvsp_sc_zone11_direction, |
1134 | | &hf_gvsp_sc_zone12_direction, |
1135 | | &hf_gvsp_sc_zone13_direction, |
1136 | | &hf_gvsp_sc_zone14_direction, |
1137 | | &hf_gvsp_sc_zone15_direction, |
1138 | | &hf_gvsp_sc_zone16_direction, |
1139 | | &hf_gvsp_sc_zone17_direction, |
1140 | | &hf_gvsp_sc_zone18_direction, |
1141 | | &hf_gvsp_sc_zone19_direction, |
1142 | | &hf_gvsp_sc_zone20_direction, |
1143 | | &hf_gvsp_sc_zone21_direction, |
1144 | | &hf_gvsp_sc_zone22_direction, |
1145 | | &hf_gvsp_sc_zone23_direction, |
1146 | | &hf_gvsp_sc_zone24_direction, |
1147 | | &hf_gvsp_sc_zone25_direction, |
1148 | | &hf_gvsp_sc_zone26_direction, |
1149 | | &hf_gvsp_sc_zone27_direction, |
1150 | | &hf_gvsp_sc_zone28_direction, |
1151 | | &hf_gvsp_sc_zone29_direction, |
1152 | | &hf_gvsp_sc_zone30_direction, |
1153 | | &hf_gvsp_sc_zone31_direction, |
1154 | | NULL |
1155 | | }; |
1156 | | |
1157 | | static int * const zoneinfo_fields[] = { |
1158 | | &hf_gvsp_zoneid, |
1159 | | &hf_gvsp_endofzone, |
1160 | | NULL |
1161 | | }; |
1162 | | |
1163 | | static int * const zoneinfo_multipart_fields[] = { |
1164 | | &hf_gvsp_endofpart, |
1165 | | &hf_gvsp_zoneid, |
1166 | | &hf_gvsp_endofzone, |
1167 | | NULL |
1168 | | }; |
1169 | | |
1170 | | static int * const flags_fields[] = { |
1171 | | &hf_gvsp_flagdevicespecific0, |
1172 | | &hf_gvsp_flagdevicespecific1, |
1173 | | &hf_gvsp_flagdevicespecific2, |
1174 | | &hf_gvsp_flagdevicespecific3, |
1175 | | &hf_gvsp_flagdevicespecific4, |
1176 | | &hf_gvsp_flagdevicespecific5, |
1177 | | &hf_gvsp_flagdevicespecific6, |
1178 | | &hf_gvsp_flagdevicespecific7, |
1179 | | &hf_gvsp_flagresendrangeerror, |
1180 | | &hf_gvsp_flagpreviousblockdropped, |
1181 | | &hf_gvsp_flagpacketresend, |
1182 | | NULL |
1183 | | }; |
1184 | | |
1185 | | static int * const gendc_leader_flags_fields[] = { |
1186 | | &hf_gvsp_gendc_leader_flags_reserved_v2_2, |
1187 | | &hf_gvsp_gendc_leader_flags_preliminary_descriptor_v2_2, |
1188 | | NULL |
1189 | | }; |
1190 | | |
1191 | | static int * const gendc_payload_data_flags_fields[] = { |
1192 | | &hf_gvsp_gendc_payload_data_flag_descriptor_flags_v2_2, |
1193 | | &hf_gvsp_gendc_payload_data_flag_start_of_descriptor_data_v2_2, |
1194 | | &hf_gvsp_gendc_payload_data_flag_end_of_descriptor_data_v2_2, |
1195 | | &hf_gvsp_gendc_payload_data_flags_reserved_v2_2, |
1196 | | NULL |
1197 | | }; |
1198 | | |
1199 | | static int * const gendc_payload_flow_flags_fields[] = { |
1200 | | &hf_gvsp_gendc_payload_flow_flag_first_packet_v2_2, |
1201 | | &hf_gvsp_gendc_payload_flow_flag_last_packet_v2_2, |
1202 | | NULL |
1203 | | }; |
1204 | | |
1205 | | static int * const gendc_container_header_flags_fields[] = { |
1206 | | &hf_gvsp_gendc_container_header_flags_timestamp_ptp_v2_2, |
1207 | | &hf_gvsp_gendc_container_header_flags_component_invalid_v2_2, |
1208 | | &hf_gvsp_gendc_container_header_flags_reserved_v2_2, |
1209 | | NULL |
1210 | | }; |
1211 | | |
1212 | | static int * const gendc_container_header_variable_fields_fields[] = { |
1213 | | &hf_gvsp_gendc_container_header_variable_fields_data_size_v2_2, |
1214 | | &hf_gvsp_gendc_container_header_variable_fields_size_x_v2_2, |
1215 | | &hf_gvsp_gendc_container_header_variable_fields_size_y_v2_2, |
1216 | | &hf_gvsp_gendc_container_header_variable_fields_region_offset_v2_2, |
1217 | | &hf_gvsp_gendc_container_header_variable_fields_format_v2_2, |
1218 | | &hf_gvsp_gendc_container_header_variable_fields_timestamp_v2_2, |
1219 | | &hf_gvsp_gendc_container_header_variable_fields_component_count_v2_2, |
1220 | | &hf_gvsp_gendc_container_header_variable_fields_component_invalid_v2_2, |
1221 | | &hf_gvsp_gendc_container_header_variable_fields_reserved_v2_2, |
1222 | | NULL |
1223 | | }; |
1224 | | |
1225 | | static int * const gendc_component_header_flags_fields[] = { |
1226 | | &hf_gvsp_gendc_component_header_flags_invalid_v2_2, |
1227 | | &hf_gvsp_gendc_component_header_flags_reserved_v2_2, |
1228 | | NULL |
1229 | | }; |
1230 | | |
1231 | | static int * const gendc_part_header_flags_fields[] = { |
1232 | | &hf_gvsp_gendc_part_header_flags_xml_reserved1_v2_2, |
1233 | | &hf_gvsp_gendc_part_header_flags_xml_zip_v2_2, |
1234 | | &hf_gvsp_gendc_part_header_flags_xml_chunk_v2_2, |
1235 | | &hf_gvsp_gendc_part_header_flags_xml_reserved2_v2_2, |
1236 | | NULL |
1237 | | }; |
1238 | | |
1239 | | /* |
1240 | | \brief Dissects the image dimensions |
1241 | | */ |
1242 | | |
1243 | | static void dissect_image_dimensions(proto_tree *gvsp_tree, tvbuff_t *tvb, int offset, const unsigned encoding) |
1244 | 0 | { |
1245 | | /* Size X */ |
1246 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sizex, tvb, offset, 4, encoding); |
1247 | | |
1248 | | /* Size Y */ |
1249 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 4, 4, encoding); |
1250 | | |
1251 | | /* Padding X */ |
1252 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_paddingx, tvb, offset + 8, 2, encoding); |
1253 | | |
1254 | | /* Padding Y */ |
1255 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_paddingy, tvb, offset + 10, 2, encoding); |
1256 | 0 | } |
1257 | | |
1258 | | /* |
1259 | | \brief Dissects the image AOI |
1260 | | */ |
1261 | | |
1262 | | static void dissect_image_aoi(proto_tree *gvsp_tree, tvbuff_t *tvb, int offset) |
1263 | 0 | { |
1264 | | /* Size X */ |
1265 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sizex, tvb, offset, 4, ENC_BIG_ENDIAN); |
1266 | | |
1267 | | /* Size Y */ |
1268 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
1269 | | |
1270 | | /* Offset X */ |
1271 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_offsetx, tvb, offset + 8, 4, ENC_BIG_ENDIAN); |
1272 | | |
1273 | | /* Offset Y */ |
1274 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_offsety, tvb, offset + 12, 4, ENC_BIG_ENDIAN); |
1275 | | |
1276 | | /* Padding X */ |
1277 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_paddingx, tvb, offset + 16, 2, ENC_BIG_ENDIAN); |
1278 | | |
1279 | | /* Padding Y */ |
1280 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_paddingy, tvb, offset + 18, 2, ENC_BIG_ENDIAN); |
1281 | 0 | } |
1282 | | |
1283 | | /* |
1284 | | \brief Dissects the image leader |
1285 | | */ |
1286 | | |
1287 | | static int dissect_image_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1288 | 0 | { |
1289 | | /* Field info */ |
1290 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset, hf_gvsp_fieldinfo, |
1291 | 0 | ett_gvsp_fieldinfo, fieldinfo_fields, ENC_BIG_ENDIAN); |
1292 | | |
1293 | | /* Payload type */ |
1294 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1295 | | |
1296 | | /* Timestamp */ |
1297 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1298 | | |
1299 | | /* Pixel format */ |
1300 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 12, hf_gvsp_pixelformat, ett_gvsp_pixelformat, |
1301 | 0 | pixelformat_fields, ENC_BIG_ENDIAN); |
1302 | | |
1303 | | /* AOI */ |
1304 | 0 | dissect_image_aoi(gvsp_tree, tvb, offset + 16); |
1305 | | |
1306 | | /* Return dissected byte count (for all-in dissection) */ |
1307 | 0 | return 36; |
1308 | 0 | } |
1309 | | |
1310 | | |
1311 | | /* |
1312 | | \brief Dissects the image trailer |
1313 | | */ |
1314 | | |
1315 | | static int dissect_image_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1316 | 0 | { |
1317 | | /* Payload type */ |
1318 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1319 | | |
1320 | | /* Size Y */ |
1321 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
1322 | | |
1323 | | /* Return dissected byte count (for all-in and extended chunk mode dissection) */ |
1324 | 0 | return 8; |
1325 | 0 | } |
1326 | | |
1327 | | |
1328 | | /* |
1329 | | \brief Dissects the multi-part trailer |
1330 | | */ |
1331 | | |
1332 | | static int dissect_multi_part_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1333 | 0 | { |
1334 | 0 | int part_count = tvb_reported_length_remaining(tvb, offset + 4) / GVSP_SIZE_OF_PART_INFO_TRAILER; |
1335 | 0 | int i = 0; |
1336 | 0 | int j = 0; |
1337 | | |
1338 | | /* Payload type */ |
1339 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1340 | |
|
1341 | 0 | for (i = 0; i < part_count; i++) |
1342 | 0 | { |
1343 | 0 | uint16_t multi_part_data_type = tvb_get_ntohs(tvb, offset + 4 + i * GVSP_SIZE_OF_PART_INFO_TRAILER); |
1344 | | |
1345 | | /* Add a tree per part */ |
1346 | 0 | proto_tree* gvsp_part_tree = proto_tree_add_subtree(gvsp_tree, tvb, offset + 4 + i * GVSP_SIZE_OF_PART_INFO_TRAILER, GVSP_SIZE_OF_PART_INFO_TRAILER, ett_gvsp_partinfo_trailer, NULL, "Part Specific Data"); |
1347 | | |
1348 | | /* Multi-Part data type */ |
1349 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_multipart_data_type, tvb, offset + 4 + i * GVSP_SIZE_OF_PART_INFO_TRAILER, 2, ENC_BIG_ENDIAN); |
1350 | | |
1351 | | /* Part Length */ |
1352 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_partlength, tvb, offset + 6 + i * GVSP_SIZE_OF_PART_INFO_TRAILER, 6, ENC_BIG_ENDIAN); |
1353 | |
|
1354 | 0 | switch( multi_part_data_type ) |
1355 | 0 | { |
1356 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DIMAGE: |
1357 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR: |
1358 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR: |
1359 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR: |
1360 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DIMAGE: |
1361 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR: |
1362 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR: |
1363 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR: |
1364 | 0 | case GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP: |
1365 | | /* Size Y */ |
1366 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_sizey, tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_TRAILER, 4, ENC_BIG_ENDIAN); |
1367 | 0 | break; |
1368 | 0 | default: |
1369 | | /* 2 DWORDS of data type specific data */ |
1370 | 0 | for (j = 0; j < 2; j++) |
1371 | 0 | { |
1372 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_data_type_specific, tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_TRAILER + 4 * j, 4, ENC_BIG_ENDIAN); |
1373 | 0 | } |
1374 | 0 | break; |
1375 | 0 | } |
1376 | 0 | } |
1377 | | |
1378 | | /* Return dissected byte count (for all-in and extended chunk mode dissection) */ |
1379 | 0 | return 4 + part_count * GVSP_SIZE_OF_PART_INFO_TRAILER; |
1380 | 0 | } |
1381 | | |
1382 | | |
1383 | | /* |
1384 | | \brief Dissects the raw data leader |
1385 | | */ |
1386 | | |
1387 | | static int dissect_raw_data_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1388 | 0 | { |
1389 | | /* Payload type */ |
1390 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1391 | | |
1392 | | /* Timestamp */ |
1393 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1394 | | |
1395 | | /* Payload data size */ |
1396 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddatasize, tvb, offset + 12, 8, ENC_BIG_ENDIAN); |
1397 | | |
1398 | | /* Return dissected byte count (for all-in dissection) */ |
1399 | 0 | return 20; |
1400 | 0 | } |
1401 | | |
1402 | | |
1403 | | /* |
1404 | | \brief Dissects a file leader |
1405 | | */ |
1406 | | |
1407 | | static int dissect_file_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1408 | 0 | { |
1409 | 0 | unsigned file_length = 0; |
1410 | | |
1411 | | /* Payload type */ |
1412 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1413 | | |
1414 | | /* Timestamp */ |
1415 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1416 | | |
1417 | | /* Payload data size */ |
1418 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddatasize, tvb, offset + 12, 8, ENC_BIG_ENDIAN); |
1419 | | |
1420 | | /* Filename */ |
1421 | 0 | file_length = tvb_strsize(tvb, offset + 20); |
1422 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_filename, tvb, offset + 20, file_length, ENC_ASCII); |
1423 | |
|
1424 | 0 | if (20 + file_length > INT_MAX) |
1425 | 0 | return -1; |
1426 | | |
1427 | | /* Return dissected byte count (for all-in dissection) */ |
1428 | 0 | return (int)(20 + file_length); |
1429 | 0 | } |
1430 | | |
1431 | | |
1432 | | /* |
1433 | | \brief Dissects a chunk data leader |
1434 | | */ |
1435 | | |
1436 | | static int dissect_chunk_data_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1437 | 0 | { |
1438 | | /* Payload type */ |
1439 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1440 | | |
1441 | | /* Timestamp */ |
1442 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1443 | | |
1444 | | /* Return dissected byte count (for all-in dissection) */ |
1445 | 0 | return 12; |
1446 | 0 | } |
1447 | | |
1448 | | |
1449 | | /* |
1450 | | \brief Dissects a chunk data trailer |
1451 | | */ |
1452 | | |
1453 | | static int dissect_chunk_data_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1454 | 0 | { |
1455 | | /* Payload type */ |
1456 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1457 | | |
1458 | | /* Payload data length */ |
1459 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadlength, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
1460 | | |
1461 | | /* Return dissected byte count (for all-in dissection) */ |
1462 | 0 | return 8; |
1463 | 0 | } |
1464 | | |
1465 | | |
1466 | | /* |
1467 | | \brief Dissects extended chunk data leader |
1468 | | */ |
1469 | | |
1470 | | static int dissect_extended_chunk_data_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1471 | 0 | { |
1472 | | /* Field info */ |
1473 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset, hf_gvsp_fieldinfo, |
1474 | 0 | ett_gvsp_fieldinfo, fieldinfo_fields, ENC_BIG_ENDIAN); |
1475 | | /* Generic flags */ |
1476 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_genericflags, tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
1477 | | |
1478 | | /* Payload type */ |
1479 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1480 | | |
1481 | | /* Timestamp */ |
1482 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1483 | | |
1484 | | /* Pixel format */ |
1485 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 12, hf_gvsp_pixelformat, ett_gvsp_pixelformat, |
1486 | 0 | pixelformat_fields, ENC_BIG_ENDIAN); |
1487 | | |
1488 | | /* AOI */ |
1489 | 0 | dissect_image_aoi(gvsp_tree, tvb, offset + 16); |
1490 | | |
1491 | | /* Return dissected byte count (for all-in dissection) */ |
1492 | 0 | return 36; |
1493 | 0 | } |
1494 | | |
1495 | | |
1496 | | /* |
1497 | | \brief Dissects extended chunk data trailer |
1498 | | */ |
1499 | | |
1500 | | static int dissect_extended_chunk_data_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1501 | 0 | { |
1502 | | /* Payload type */ |
1503 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1504 | | |
1505 | | /* Payload data length */ |
1506 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadlength, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
1507 | | |
1508 | | /* Size Y */ |
1509 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 8, 4, ENC_BIG_ENDIAN); |
1510 | | |
1511 | | /* Chunk layout ID */ |
1512 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_chunk_layout_id_hex, tvb, offset + 12, 4, ENC_BIG_ENDIAN); |
1513 | | |
1514 | | /* Return dissected byte count (for all-in dissection) */ |
1515 | 0 | return 16; |
1516 | 0 | } |
1517 | | |
1518 | | |
1519 | | /* |
1520 | | \brief Dissects a JPEG leader |
1521 | | */ |
1522 | | |
1523 | | static int dissect_jpeg_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1524 | 0 | { |
1525 | | /* Field info */ |
1526 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset, hf_gvsp_fieldinfo, |
1527 | 0 | ett_gvsp_fieldinfo, fieldinfo_fields, ENC_BIG_ENDIAN); |
1528 | | |
1529 | | /* Generic flags */ |
1530 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_genericflags, tvb, offset + 1, 1, ENC_BIG_ENDIAN); |
1531 | | |
1532 | | /* Payload type */ |
1533 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1534 | | |
1535 | | /* Timestamp */ |
1536 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1537 | | |
1538 | | /* Payload data size */ |
1539 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddatasize, tvb, offset + 12, 8, ENC_BIG_ENDIAN); |
1540 | | |
1541 | | /* Timestamp tick frequency */ |
1542 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamptickfrequency, tvb, offset + 20, 8, ENC_BIG_ENDIAN); |
1543 | | |
1544 | | /* Data format */ |
1545 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_dataformat, tvb, offset + 28, 4, ENC_BIG_ENDIAN); |
1546 | | |
1547 | | /* Return dissected byte count (for all-in dissection) */ |
1548 | 0 | return 32; |
1549 | 0 | } |
1550 | | |
1551 | | |
1552 | | /* |
1553 | | \brief Dissects a H264 leader |
1554 | | */ |
1555 | | |
1556 | | static void dissect_h264_leader_common(proto_tree *gvsp_tree, tvbuff_t *tvb, int offset, const unsigned encoding) |
1557 | 0 | { |
1558 | | /* profile_idc */ |
1559 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_profileidc, tvb, offset, 1, encoding); |
1560 | | |
1561 | | /* cs0, 1, 2 ,3 */ |
1562 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 1, hf_gvsp_cs, ett_gvsp_cs, |
1563 | 0 | cs_fields, encoding); |
1564 | | |
1565 | | /* level_idc */ |
1566 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_levelidc, tvb, offset + 2, 1, encoding); |
1567 | | |
1568 | | /* srop_interleaving_depth */ |
1569 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sropinterleavingdepth, tvb, offset + 3, 2, encoding); |
1570 | | |
1571 | | /* srop_max_don_diff */ |
1572 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sropmaxdondiff, tvb, offset + 5, 2, encoding); |
1573 | | |
1574 | | /* srop_deint_buf_req */ |
1575 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sropdeintbufreq, tvb, offset + 7, 4, encoding); |
1576 | | |
1577 | | /* srop_init_buf_time */ |
1578 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_sropinitbuftime, tvb, offset + 11, 4, encoding); |
1579 | 0 | } |
1580 | | |
1581 | | static int dissect_h264_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1582 | 0 | { |
1583 | | /* Field info */ |
1584 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset, hf_gvsp_fieldinfo, |
1585 | 0 | ett_gvsp_fieldinfo, fieldinfo_fields, ENC_BIG_ENDIAN); |
1586 | | |
1587 | | /* Payload type */ |
1588 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1589 | | |
1590 | | /* Payload data size */ |
1591 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddatasize, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1592 | | |
1593 | | /* packetization_mode */ |
1594 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_packetizationmode, tvb, offset + 13, 1, ENC_BIG_ENDIAN); |
1595 | | |
1596 | | /* packet_size */ |
1597 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_packetsize, tvb, offset + 14, 2, ENC_BIG_ENDIAN); |
1598 | |
|
1599 | 0 | dissect_h264_leader_common(gvsp_tree, tvb, offset + 17, ENC_BIG_ENDIAN); |
1600 | | |
1601 | | /* Return dissected byte count (for all-in dissection) */ |
1602 | 0 | return 32; |
1603 | 0 | } |
1604 | | |
1605 | | |
1606 | | /* |
1607 | | \brief Dissects the multi-zone image leader |
1608 | | */ |
1609 | | |
1610 | | static int dissect_multizone_image_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1611 | 0 | { |
1612 | | /* Field info */ |
1613 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset, hf_gvsp_fieldinfo, |
1614 | 0 | ett_gvsp_fieldinfo, fieldinfo_fields, ENC_BIG_ENDIAN); |
1615 | | /* Payload type */ |
1616 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1617 | | |
1618 | | /* Timestamp */ |
1619 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1620 | | |
1621 | | /* Zone direction */ |
1622 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 12, hf_gvsp_sc_zone_direction, |
1623 | 0 | ett_gvsp_sc_zone_direction, sc_zone_direction_fields, ENC_BIG_ENDIAN); |
1624 | | |
1625 | | /* Pixel format */ |
1626 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 16, hf_gvsp_pixelformat, ett_gvsp_pixelformat, |
1627 | 0 | pixelformat_fields, ENC_BIG_ENDIAN); |
1628 | | |
1629 | | /* AOI */ |
1630 | 0 | dissect_image_aoi(gvsp_tree, tvb, offset + 20); |
1631 | | |
1632 | | /* Return dissected byte count (for all-in dissection) */ |
1633 | 0 | return 40; |
1634 | 0 | } |
1635 | | |
1636 | | |
1637 | | /* |
1638 | | \brief Dissects the multi-part leader |
1639 | | */ |
1640 | | |
1641 | | static int dissect_multi_part_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1642 | 0 | { |
1643 | | /* Get the number of parts from the header. As we are already looking at the beginning of the sixth DWORD here we must step back */ |
1644 | 0 | int part_count_from_leader = tvb_get_uint8(tvb, offset - 13); |
1645 | 0 | int part_count_from_remaining_bytes = tvb_reported_length_remaining(tvb, offset + 12) / GVSP_SIZE_OF_PART_INFO_LEADER; |
1646 | | /* In case the leader contains incorrect data rely on the number of reported bytes instead */ |
1647 | 0 | int part_count = part_count_from_leader <= part_count_from_remaining_bytes ? part_count_from_leader : part_count_from_remaining_bytes; |
1648 | 0 | int i = 0; |
1649 | 0 | int j = 0; |
1650 | | |
1651 | | /* Payload type */ |
1652 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1653 | | |
1654 | | /* Timestamp */ |
1655 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1656 | |
|
1657 | 0 | for (i = 0; i < part_count; i++) |
1658 | 0 | { |
1659 | 0 | uint16_t multi_part_data_type = tvb_get_ntohs(tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_LEADER); |
1660 | | /* Add a tree per part */ |
1661 | 0 | proto_tree* gvsp_part_tree = proto_tree_add_subtree(gvsp_tree, tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_LEADER, GVSP_SIZE_OF_PART_INFO_LEADER, |
1662 | 0 | ett_gvsp_partinfo_leader, NULL, "Part Specific Data"); |
1663 | | |
1664 | | /* Multi-Part data type */ |
1665 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_multipart_data_type, tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 2, ENC_BIG_ENDIAN); |
1666 | | |
1667 | | /* Part Length */ |
1668 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_partlength, tvb, offset + 14 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 6, ENC_BIG_ENDIAN); |
1669 | |
|
1670 | 0 | switch( multi_part_data_type ) |
1671 | 0 | { |
1672 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DIMAGE: |
1673 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR: |
1674 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR: |
1675 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR: |
1676 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DIMAGE: |
1677 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR: |
1678 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR: |
1679 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR: |
1680 | 0 | case GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP: |
1681 | | /* Pixel format */ |
1682 | 0 | proto_tree_add_bitmask(gvsp_part_tree, tvb, offset + 20 + i * GVSP_SIZE_OF_PART_INFO_LEADER, hf_gvsp_pixelformat, ett_gvsp_pixelformat, pixelformat_fields, ENC_BIG_ENDIAN); |
1683 | 0 | break; |
1684 | 0 | case GVSP_MULTIPART_DATA_TYPE_JPEG: |
1685 | 0 | case GVSP_MULTIPART_DATA_TYPE_JPEG2000: |
1686 | 0 | default: |
1687 | | /* Data Format */ |
1688 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_dataformat, tvb, offset + 20 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 4, ENC_BIG_ENDIAN); |
1689 | 0 | break; |
1690 | 0 | } |
1691 | | |
1692 | | /* Source ID */ |
1693 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_multi_part_source_id, tvb, offset + 26 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 1, ENC_BIG_ENDIAN); |
1694 | | |
1695 | | /* Additional Zones */ |
1696 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_add_zones_multipart, tvb, offset + 27 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 1, ENC_BIG_ENDIAN); |
1697 | | |
1698 | | /* Zone direction */ |
1699 | 0 | proto_tree_add_bitmask(gvsp_part_tree, tvb, offset + 28 + i * GVSP_SIZE_OF_PART_INFO_LEADER, hf_gvsp_sc_zone_direction, |
1700 | 0 | ett_gvsp_sc_zone_direction, sc_zone_direction_fields, ENC_BIG_ENDIAN); |
1701 | | |
1702 | | /* Data Purpose */ |
1703 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_data_purpose_id, tvb, offset + 32 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 2, ENC_BIG_ENDIAN); |
1704 | | |
1705 | | /* Region ID */ |
1706 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_region_id, tvb, offset + 34 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 2, ENC_BIG_ENDIAN); |
1707 | |
|
1708 | 0 | switch( multi_part_data_type ) |
1709 | 0 | { |
1710 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DIMAGE: |
1711 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR: |
1712 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR: |
1713 | 0 | case GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR: |
1714 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DIMAGE: |
1715 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR: |
1716 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR: |
1717 | 0 | case GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR: |
1718 | 0 | case GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP: |
1719 | 0 | dissect_image_aoi(gvsp_part_tree, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER); |
1720 | 0 | break; |
1721 | 0 | case GVSP_MULTIPART_DATA_TYPE_JPEG: |
1722 | 0 | case GVSP_MULTIPART_DATA_TYPE_JPEG2000: |
1723 | | /* Generic flags */ |
1724 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_genericflags, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 1, ENC_BIG_ENDIAN); |
1725 | | |
1726 | | /* Timestamp tick frequency */ |
1727 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_timestamptickfrequency, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER + 4, 8, ENC_BIG_ENDIAN); |
1728 | | |
1729 | | /* Data format */ |
1730 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_dataformat, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER + 12, 4, ENC_BIG_ENDIAN); |
1731 | 0 | break; |
1732 | 0 | default: |
1733 | | /* 6 DWORDS of data type specific data */ |
1734 | 0 | for (j = 0; j < 6; j++) |
1735 | 0 | { |
1736 | 0 | proto_tree_add_item(gvsp_part_tree, hf_gvsp_data_type_specific, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER + 4 * j, 4, ENC_BIG_ENDIAN); |
1737 | 0 | } |
1738 | 0 | break; |
1739 | 0 | } |
1740 | 0 | } |
1741 | | |
1742 | | /* Return dissected byte count (for all-in dissection) */ |
1743 | 0 | return 12 + part_count * GVSP_SIZE_OF_PART_INFO_LEADER; |
1744 | 0 | } |
1745 | | |
1746 | | /* |
1747 | | \brief Dissects the GenDC leader |
1748 | | */ |
1749 | | |
1750 | | static int dissect_gendc_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1751 | 0 | { |
1752 | | /* Payload type */ |
1753 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1754 | | |
1755 | | /* Timestamp */ |
1756 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1757 | | |
1758 | | /* Payload data size */ |
1759 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddatasize, tvb, offset + 12, 8, ENC_BIG_ENDIAN); |
1760 | | |
1761 | | /* Payload specific flags */ |
1762 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 20, hf_gvsp_gendc_leader_flags_v2_2, |
1763 | 0 | ett_gvsp_gendc_leader_flags, gendc_leader_flags_fields, ENC_BIG_ENDIAN); |
1764 | | |
1765 | | /* GenDC descriptor size */ |
1766 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_gendc_leader_descriptor_size_v2_2, tvb, offset + 24, 4, ENC_BIG_ENDIAN); |
1767 | | |
1768 | | /* Return dissected byte count (for all-in dissection) */ |
1769 | 0 | return 28; |
1770 | 0 | } |
1771 | | |
1772 | | |
1773 | | /* |
1774 | | \brief Dissects a generic trailer (contains just the payload type) |
1775 | | */ |
1776 | | |
1777 | | static int dissect_generic_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1778 | 0 | { |
1779 | | /* Payload type */ |
1780 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN); |
1781 | | |
1782 | | /* Return dissected byte count (for all-in dissection) */ |
1783 | 0 | return 4; |
1784 | 0 | } |
1785 | | |
1786 | | |
1787 | | /* |
1788 | | \brief Dissects a generic trailer (contains just the payload type) |
1789 | | */ |
1790 | | |
1791 | | static int dissect_extra_chunk_info(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset) |
1792 | 0 | { |
1793 | | /* Chunk data payload length */ |
1794 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_chunk_data_payload_length_hex, tvb, offset, 4, ENC_BIG_ENDIAN); |
1795 | | |
1796 | | /* Chunk layout id */ |
1797 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_chunk_layout_id_hex, tvb, offset + 4, 4, ENC_BIG_ENDIAN); |
1798 | | |
1799 | | /* Return dissected byte count (for all-in dissection) */ |
1800 | 0 | return 8; |
1801 | 0 | } |
1802 | | |
1803 | | |
1804 | | /* |
1805 | | \brief Check if a packet with given status has payload |
1806 | | */ |
1807 | 0 | static bool status_with_payload(gvsp_packet_info *info){ |
1808 | 0 | return info->status == GEV_STATUS_SUCCESS || ( info->enhanced && info->status == GEV_STATUS_PACKET_RESEND); |
1809 | 0 | } |
1810 | | |
1811 | | /* |
1812 | | \brief Dissects a packet payload |
1813 | | */ |
1814 | | |
1815 | | static void dissect_packet_payload(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset, gvsp_packet_info *info) |
1816 | 0 | { |
1817 | 0 | if (status_with_payload(info) && tvb_reported_length_remaining(tvb, offset)) |
1818 | 0 | { |
1819 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddata, tvb, offset, -1, ENC_NA); |
1820 | 0 | } |
1821 | 0 | } |
1822 | | |
1823 | | |
1824 | | /* |
1825 | | \brief Dissects a packet payload for H264 |
1826 | | */ |
1827 | | |
1828 | | static void dissect_packet_payload_h264(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset, gvsp_packet_info *info) |
1829 | 0 | { |
1830 | 0 | if (status_with_payload(info) && tvb_reported_length_remaining(tvb, offset)) |
1831 | 0 | { |
1832 | | /* Timestamp */ |
1833 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset, 8, ENC_BIG_ENDIAN); |
1834 | | |
1835 | | /* Data */ |
1836 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddata, tvb, offset + 8, -1, ENC_NA); |
1837 | 0 | } |
1838 | 0 | } |
1839 | | |
1840 | | |
1841 | | /* |
1842 | | \brief Dissects a packet payload for multi-zone |
1843 | | */ |
1844 | | |
1845 | | static void dissect_packet_payload_multizone(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset, gvsp_packet_info *info) |
1846 | 0 | { |
1847 | 0 | if (status_with_payload(info) && tvb_reported_length_remaining(tvb, offset)) |
1848 | 0 | { |
1849 | | /* Zone information */ |
1850 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 1, hf_gvsp_zoneinfo, |
1851 | 0 | ett_gvsp_zoneinfo, zoneinfo_fields, ENC_BIG_ENDIAN); |
1852 | | |
1853 | | /* Address offset */ |
1854 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_addressoffset, tvb, offset + 2, 6, ENC_BIG_ENDIAN); |
1855 | | |
1856 | | /* Data */ |
1857 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddata, tvb, offset + 8, -1, ENC_NA); |
1858 | 0 | } |
1859 | 0 | } |
1860 | | |
1861 | | |
1862 | | /* |
1863 | | \brief Dissects a packet payload for multi-part |
1864 | | */ |
1865 | | |
1866 | | static void dissect_packet_payload_multipart(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset, gvsp_packet_info *info) |
1867 | 0 | { |
1868 | 0 | if (status_with_payload(info) && tvb_reported_length_remaining(tvb, offset)) |
1869 | 0 | { |
1870 | | /* Part ID */ |
1871 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_multi_part_part_id, tvb, offset, 1, ENC_BIG_ENDIAN); |
1872 | | |
1873 | | /* Zone information */ |
1874 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 1, hf_gvsp_zoneinfo_multipart, |
1875 | 0 | ett_gvsp_zoneinfo_multipart, zoneinfo_multipart_fields, ENC_BIG_ENDIAN); |
1876 | | |
1877 | | /* Address offset */ |
1878 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_addressoffset, tvb, offset + 2, 6, ENC_BIG_ENDIAN); |
1879 | | |
1880 | | /* Data */ |
1881 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddata, tvb, offset + 8, -1, ENC_NA); |
1882 | 0 | } |
1883 | 0 | } |
1884 | | |
1885 | | /* |
1886 | | \brief Dissects a payload packet for GenDC |
1887 | | */ |
1888 | | |
1889 | | static void dissect_packet_payload_gendc(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset, gvsp_packet_info *info) |
1890 | 0 | { |
1891 | 0 | if (status_with_payload(info) && tvb_reported_length_remaining(tvb, offset)) |
1892 | 0 | { |
1893 | 0 | const uint8_t data_flags = tvb_get_uint8(tvb, offset + 12); |
1894 | | |
1895 | | /* Data size */ |
1896 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_gendc_payload_data_size_v2_2, tvb, offset, 4, ENC_BIG_ENDIAN); |
1897 | | |
1898 | | /* Data destination offset */ |
1899 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_gendc_payload_data_destination_offset_v2_2, tvb, offset + 4, 8, ENC_BIG_ENDIAN); |
1900 | | |
1901 | | /* Data flags */ |
1902 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 12, hf_gvsp_gendc_payload_data_flags_v2_2, |
1903 | 0 | ett_gvsp_gendc_payload_data_flags, gendc_payload_data_flags_fields, ENC_BIG_ENDIAN); |
1904 | | |
1905 | | /* Flow flags */ |
1906 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset + 13, hf_gvsp_gendc_payload_flow_flags_v2_2, |
1907 | 0 | ett_gvsp_gendc_payload_flow_flags, gendc_payload_flow_flags_fields, ENC_BIG_ENDIAN); |
1908 | | |
1909 | | /* Flow ID */ |
1910 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_gendc_payload_flow_id_v2_2, tvb, offset + 14, 2, ENC_BIG_ENDIAN); |
1911 | |
|
1912 | 0 | if ((data_flags & GENDC_DESCRIPTOR_FLAG) && (data_flags & GENDC_DESCRIPTOR_START_FLAG)) |
1913 | 0 | { |
1914 | 0 | const uint32_t component_count = tvb_get_uint32(tvb, offset + 68, ENC_LITTLE_ENDIAN); |
1915 | 0 | proto_tree* gvsp_gendc_container_descriptor_tree = proto_tree_add_subtree(gvsp_tree, tvb, offset + 16, -1, ett_gvsp_gendc_container_descriptor, NULL, "GenDC Container Descriptor"); |
1916 | 0 | proto_tree* gvsp_gendc_container_header_component_offsets_tree = 0; |
1917 | | |
1918 | | /* GenDC container header signature */ |
1919 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_signature_v2_2, tvb, offset + 16, 4, ENC_ASCII); |
1920 | | |
1921 | | /* GenDC container header major version */ |
1922 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_version_major_v2_2, tvb, offset + 20, 1, ENC_LITTLE_ENDIAN); |
1923 | | |
1924 | | /* GenDC container header minor version */ |
1925 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_version_minor_v2_2, tvb, offset + 21, 1, ENC_LITTLE_ENDIAN); |
1926 | | |
1927 | | /* GenDC container header sub minor version */ |
1928 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_version_sub_minor_v2_2, tvb, offset + 22, 1, ENC_LITTLE_ENDIAN); |
1929 | | |
1930 | | /* GenDC 1 reserved byte */ |
1931 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_header_reserved_1_byte_v2_2, tvb, offset + 23, 1, ENC_LITTLE_ENDIAN); |
1932 | | |
1933 | | /* GenDC container header type */ |
1934 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_header_type_v2_2, tvb, offset + 24, 2, ENC_LITTLE_ENDIAN); |
1935 | | |
1936 | | /* GenDC container header flags */ |
1937 | 0 | proto_tree_add_bitmask(gvsp_gendc_container_descriptor_tree, tvb, offset + 26, hf_gvsp_gendc_container_header_flags_v2_2, |
1938 | 0 | ett_gvsp_gendc_container_header_flags, gendc_container_header_flags_fields, ENC_LITTLE_ENDIAN); |
1939 | | |
1940 | | /* GenDC container header size */ |
1941 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_header_size_v2_2, tvb, offset + 28, 4, ENC_LITTLE_ENDIAN); |
1942 | | |
1943 | | /* GenDC container header id */ |
1944 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_id_v2_2, tvb, offset + 32, 8, ENC_LITTLE_ENDIAN); |
1945 | | |
1946 | | /* GenDC container header variable fields */ |
1947 | 0 | proto_tree_add_bitmask(gvsp_gendc_container_descriptor_tree, tvb, offset + 40, hf_gvsp_gendc_container_header_variable_fields_v2_2, |
1948 | 0 | ett_gvsp_gendc_container_header_variable_fields, gendc_container_header_variable_fields_fields, ENC_LITTLE_ENDIAN); |
1949 | | |
1950 | | /* GenDC 2 reserved bytes */ |
1951 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_header_reserved_2_bytes_v2_2, tvb, offset + 42, 2, ENC_LITTLE_ENDIAN); |
1952 | | |
1953 | | /* GenDC 4 reserved bytes */ |
1954 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_header_reserved_4_bytes_v2_2, tvb, offset + 44, 4, ENC_LITTLE_ENDIAN); |
1955 | | |
1956 | | /* GenDC container header data size */ |
1957 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_data_size_v2_2, tvb, offset + 48, 8, ENC_LITTLE_ENDIAN); |
1958 | | |
1959 | | /* GenDC container header data offset */ |
1960 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_data_offset_v2_2, tvb, offset + 56, 8, ENC_LITTLE_ENDIAN); |
1961 | | |
1962 | | /* GenDC container header descriptor size */ |
1963 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_descriptor_size_v2_2, tvb, offset + 64, 4, ENC_LITTLE_ENDIAN); |
1964 | | |
1965 | | /* GenDC container header component count */ |
1966 | 0 | proto_tree_add_item(gvsp_gendc_container_descriptor_tree, hf_gvsp_gendc_container_header_component_count_v2_2, tvb, offset + 68, 4, ENC_LITTLE_ENDIAN); |
1967 | |
|
1968 | 0 | gvsp_gendc_container_header_component_offsets_tree = proto_tree_add_subtree(gvsp_gendc_container_descriptor_tree, tvb, offset + 72, 8 * component_count, ett_gvsp_gendc_container_header_component_offsets, NULL, "Component Offsets"); |
1969 | |
|
1970 | 0 | for (uint32_t i = 0; i < component_count; i++) |
1971 | 0 | { |
1972 | 0 | unsigned component_offset = offset + 16 + (int)tvb_get_uint64(tvb, offset + 72 + 8 * i, ENC_LITTLE_ENDIAN); |
1973 | 0 | uint16_t part_count = tvb_get_uint16(tvb, component_offset + 46, ENC_LITTLE_ENDIAN); |
1974 | |
|
1975 | 0 | proto_tree* gvsp_gendc_component_header_tree = proto_tree_add_subtree(gvsp_gendc_container_descriptor_tree, tvb, offset + 16 + component_offset, -1, ett_gvsp_gendc_component_header, NULL, "Component Header"); |
1976 | 0 | proto_tree* gvsp_gendc_component_header_part_offsets_tree = 0; |
1977 | | |
1978 | | /* GenDC container header component offset */ |
1979 | 0 | proto_tree_add_item(gvsp_gendc_container_header_component_offsets_tree, hf_gvsp_gendc_container_header_component_offset_v2_2, tvb, offset + 72 + 8 * i, 8, ENC_LITTLE_ENDIAN); |
1980 | | |
1981 | | /* component layout (size:offset) |
1982 | | 2 : 0 type |
1983 | | 2 : 2 flags |
1984 | | 4 : 4 header size |
1985 | | 2 : 8 reserved |
1986 | | 2 : 10 group id |
1987 | | 2 : 12 source id |
1988 | | 2 : 14 region id |
1989 | | 4 : 16 region offset x |
1990 | | 4 : 20 region offset y |
1991 | | 8 : 24 timestamp |
1992 | | 8 : 32 type id |
1993 | | 4 : 40 format |
1994 | | 2 : 44 reserved |
1995 | | 2 : 46 part count |
1996 | | */ |
1997 | | |
1998 | | /* GenDC component header type */ |
1999 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_header_type_v2_2, tvb, component_offset, 2, ENC_LITTLE_ENDIAN); |
2000 | | |
2001 | | /* GenDC component header flags */ |
2002 | 0 | proto_tree_add_bitmask(gvsp_gendc_component_header_tree, tvb, component_offset + 2, hf_gvsp_gendc_component_header_flags_v2_2, |
2003 | 0 | ett_gvsp_gendc_component_header_flags, gendc_component_header_flags_fields, ENC_LITTLE_ENDIAN); |
2004 | | |
2005 | | /* GenDC component header size */ |
2006 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_header_size_v2_2, tvb, component_offset + 4, 4, ENC_LITTLE_ENDIAN); |
2007 | | |
2008 | | /* GenDC 2 reserved bytes */ |
2009 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_header_reserved_2_bytes_v2_2, tvb, component_offset + 8, 2, ENC_LITTLE_ENDIAN); |
2010 | | |
2011 | | /* GenDC component header group id */ |
2012 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_component_header_group_id_v2_2, tvb, component_offset + 10, 2, ENC_LITTLE_ENDIAN); |
2013 | | |
2014 | | /* GenDC component header source id */ |
2015 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_component_header_source_id_v2_2, tvb, component_offset + 12, 2, ENC_LITTLE_ENDIAN); |
2016 | | |
2017 | | /* GenDC component header region id */ |
2018 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_component_header_region_id_v2_2, tvb, component_offset + 14, 2, ENC_LITTLE_ENDIAN); |
2019 | | |
2020 | | /* GenDC component header offset X */ |
2021 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_offsetx, tvb, component_offset + 16, 4, ENC_LITTLE_ENDIAN); |
2022 | | |
2023 | | /* GenDC component header offset Y */ |
2024 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_offsety, tvb, component_offset + 20, 4, ENC_LITTLE_ENDIAN); |
2025 | | |
2026 | | /* Timestamp */ |
2027 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_timestamp, tvb, component_offset + 24, 8, ENC_LITTLE_ENDIAN); |
2028 | | |
2029 | | /* GenDC component header type id */ |
2030 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_component_header_type_id_v2_2, tvb, component_offset + 32, 8, ENC_LITTLE_ENDIAN); |
2031 | | |
2032 | | /* GenDC component header format */ |
2033 | 0 | proto_tree_add_bitmask(gvsp_gendc_component_header_tree, tvb, component_offset + 40, hf_gvsp_pixelformat, ett_gvsp_pixelformat, |
2034 | 0 | pixelformat_fields, ENC_LITTLE_ENDIAN); |
2035 | | |
2036 | | /* GenDC 2 reserved bytes */ |
2037 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_header_reserved_2_bytes_v2_2, tvb, component_offset + 44, 2, ENC_LITTLE_ENDIAN); |
2038 | | |
2039 | | /* GenDC component header part count */ |
2040 | 0 | proto_tree_add_item(gvsp_gendc_component_header_tree, hf_gvsp_gendc_component_header_part_count_v2_2, tvb, component_offset + 46, 2, ENC_LITTLE_ENDIAN); |
2041 | |
|
2042 | 0 | gvsp_gendc_component_header_part_offsets_tree = proto_tree_add_subtree(gvsp_gendc_component_header_tree, tvb, component_offset + 48, 8 * part_count, ett_gvsp_gendc_part_offsets, NULL, "Part Offsets"); |
2043 | |
|
2044 | 0 | for (uint16_t j = 0; j < part_count; j++) |
2045 | 0 | { |
2046 | 0 | unsigned part_offset = offset + 16 + (int)tvb_get_uint64(tvb, component_offset + 48 + 8 * j, ENC_LITTLE_ENDIAN); |
2047 | 0 | uint16_t part_type = tvb_get_uint16(tvb, part_offset, ENC_LITTLE_ENDIAN); |
2048 | |
|
2049 | 0 | proto_tree* gvsp_gendc_part_header_tree = proto_tree_add_subtree(gvsp_gendc_component_header_tree, tvb, offset + 16 + part_offset, -1, ett_gvsp_gendc_part_header, NULL, "Part Header"); |
2050 | | |
2051 | | /* GenDC component header part offset */ |
2052 | 0 | proto_tree_add_item(gvsp_gendc_component_header_part_offsets_tree, hf_gvsp_gendc_component_header_part_offset_v2_2, tvb, component_offset + 48 + 8 * j, 8, ENC_LITTLE_ENDIAN); |
2053 | | |
2054 | | /* common part layout (size:offset) |
2055 | | 2:0 type |
2056 | | 2:2 flags |
2057 | | 4:4 header size |
2058 | | 4:8 format |
2059 | | 2:12 reserved |
2060 | | 2:14 flow id |
2061 | | 8:16 flow offset |
2062 | | 8:24 data size |
2063 | | 8:32 data offset |
2064 | | */ |
2065 | | |
2066 | | /* GenDC part header type */ |
2067 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_header_type_v2_2, tvb, part_offset, 2, ENC_LITTLE_ENDIAN); |
2068 | | |
2069 | | /* GenDC part header flags */ |
2070 | 0 | if( part_type == GENDC_HEADER_TYPE_PART_XML ) |
2071 | 0 | { |
2072 | 0 | proto_tree_add_bitmask(gvsp_gendc_part_header_tree, tvb, part_offset + 2, hf_gvsp_gendc_part_header_flags_v2_2, |
2073 | 0 | ett_gvsp_gendc_part_header_flags, gendc_part_header_flags_fields, ENC_LITTLE_ENDIAN); |
2074 | 0 | } |
2075 | 0 | else |
2076 | 0 | { |
2077 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_part_header_flags_v2_2, tvb, part_offset + 2, 2, ENC_LITTLE_ENDIAN); |
2078 | 0 | } |
2079 | | |
2080 | | /* GenDC part header size */ |
2081 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_header_size_v2_2, tvb, part_offset + 4, 4, ENC_LITTLE_ENDIAN); |
2082 | | |
2083 | | /* GenDC part header format */ |
2084 | 0 | proto_tree_add_bitmask(gvsp_gendc_part_header_tree, tvb, part_offset + 8, hf_gvsp_pixelformat, ett_gvsp_pixelformat, pixelformat_fields, ENC_LITTLE_ENDIAN); |
2085 | | |
2086 | | /* GenDC 2 reserved bytes */ |
2087 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_header_reserved_2_bytes_v2_2, tvb, part_offset + 12, 2, ENC_LITTLE_ENDIAN); |
2088 | | |
2089 | | /* Flow ID */ |
2090 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_payload_flow_id_v2_2, tvb, part_offset + 14, 2, ENC_LITTLE_ENDIAN); |
2091 | | |
2092 | | /* GenDC container header data offset */ |
2093 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_part_header_flow_offset_v2_2, tvb, part_offset + 16, 8, ENC_LITTLE_ENDIAN); |
2094 | | |
2095 | | /* GenDC part header data size */ |
2096 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_container_header_data_size_v2_2, tvb, part_offset + 24, 8, ENC_LITTLE_ENDIAN); |
2097 | | |
2098 | | /* GenDC part header data offset */ |
2099 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_container_header_data_offset_v2_2, tvb, part_offset + 32, 8, ENC_LITTLE_ENDIAN); |
2100 | |
|
2101 | 0 | switch (part_type) |
2102 | 0 | { |
2103 | 0 | case GENDC_HEADER_TYPE_PART_CHUNK: |
2104 | 0 | case GENDC_HEADER_TYPE_PART_XML: |
2105 | 0 | case GENDC_HEADER_TYPE_PART_1D: |
2106 | | /* GenDC part header size */ |
2107 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_part_header_1D_size_v2_2, tvb, part_offset + 40, 8, ENC_LITTLE_ENDIAN); |
2108 | | |
2109 | | /* GenDC part header padding */ |
2110 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_part_header_1D_padding_v2_2, tvb, part_offset + 48, 4, ENC_LITTLE_ENDIAN); |
2111 | | |
2112 | | /* GenDC 4 reserved bytes */ |
2113 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_header_reserved_4_bytes_v2_2, tvb, part_offset + 52, 4, ENC_LITTLE_ENDIAN); |
2114 | | |
2115 | | /* GenDC part header type specific */ |
2116 | 0 | proto_tree_add_item(gvsp_gendc_part_header_tree, hf_gvsp_gendc_part_header_type_specific_info_v2_2, tvb, part_offset + 56, 8, ENC_LITTLE_ENDIAN); |
2117 | 0 | break; |
2118 | 0 | case GENDC_HEADER_TYPE_PART_2D: |
2119 | 0 | case GENDC_HEADER_TYPE_PART_2D_JPEG: |
2120 | 0 | case GENDC_HEADER_TYPE_PART_2D_JPEG2000: |
2121 | 0 | dissect_image_dimensions(gvsp_gendc_part_header_tree, tvb, part_offset + 40, ENC_LITTLE_ENDIAN); |
2122 | 0 | break; |
2123 | 0 | case GENDC_HEADER_TYPE_PART_2D_H264: |
2124 | 0 | dissect_image_dimensions(gvsp_gendc_part_header_tree, tvb, part_offset + 40, ENC_LITTLE_ENDIAN); |
2125 | 0 | dissect_h264_leader_common(gvsp_gendc_part_header_tree, tvb, part_offset + 52, ENC_LITTLE_ENDIAN); |
2126 | 0 | break; |
2127 | 0 | } |
2128 | 0 | } |
2129 | 0 | } |
2130 | 0 | } |
2131 | 0 | else |
2132 | 0 | { |
2133 | | /* Data */ |
2134 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddata, tvb, offset + 16, -1, ENC_NA); |
2135 | 0 | } |
2136 | 0 | } |
2137 | 0 | } |
2138 | | |
2139 | | /* |
2140 | | \brief Dissects an all in packet |
2141 | | */ |
2142 | | |
2143 | | static void dissect_packet_all_in(proto_tree *gvsp_tree, tvbuff_t *tvb, int offset, packet_info *pinfo, gvsp_packet_info *info) |
2144 | 0 | { |
2145 | 0 | int ret; |
2146 | |
|
2147 | 0 | switch (info->payloadtype) |
2148 | 0 | { |
2149 | 0 | case GVSP_PAYLOAD_IMAGE: |
2150 | 0 | offset += dissect_image_leader(gvsp_tree, tvb, pinfo, offset); |
2151 | 0 | offset += dissect_image_trailer(gvsp_tree, tvb, pinfo, offset); |
2152 | 0 | if (info->chunk != 0) |
2153 | 0 | { |
2154 | 0 | offset += dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2155 | 0 | } |
2156 | 0 | dissect_packet_payload(gvsp_tree, tvb, pinfo, offset, info); |
2157 | 0 | break; |
2158 | | |
2159 | 0 | case GVSP_PAYLOAD_RAWDATA: |
2160 | 0 | offset += dissect_raw_data_leader(gvsp_tree, tvb, pinfo, offset); |
2161 | 0 | offset += dissect_generic_trailer(gvsp_tree, tvb, pinfo, offset); |
2162 | 0 | if (info->chunk != 0) |
2163 | 0 | { |
2164 | 0 | offset += dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2165 | 0 | } |
2166 | 0 | dissect_packet_payload(gvsp_tree, tvb, pinfo, offset, info); |
2167 | 0 | break; |
2168 | | |
2169 | 0 | case GVSP_PAYLOAD_FILE: |
2170 | 0 | ret = dissect_file_leader(gvsp_tree, tvb, pinfo, offset); |
2171 | 0 | if (ret < 0) |
2172 | 0 | break; |
2173 | 0 | offset += ret; |
2174 | 0 | offset += dissect_generic_trailer(gvsp_tree, tvb, pinfo, offset); |
2175 | 0 | if (info->chunk != 0) |
2176 | 0 | { |
2177 | 0 | offset += dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2178 | 0 | } |
2179 | 0 | dissect_packet_payload(gvsp_tree, tvb, pinfo, offset, info); |
2180 | 0 | break; |
2181 | | |
2182 | 0 | case GVSP_PAYLOAD_CHUNKDATA: |
2183 | 0 | offset += dissect_chunk_data_leader(gvsp_tree, tvb, pinfo, offset); |
2184 | 0 | offset += dissect_chunk_data_trailer(gvsp_tree, tvb, pinfo, offset); |
2185 | 0 | if (info->chunk != 0) |
2186 | 0 | { |
2187 | 0 | offset += dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2188 | 0 | } |
2189 | 0 | dissect_packet_payload(gvsp_tree, tvb, pinfo, offset, info); |
2190 | 0 | break; |
2191 | | |
2192 | 0 | case GVSP_PAYLOAD_EXTENDEDCHUNKDATA: |
2193 | 0 | offset += dissect_extended_chunk_data_leader(gvsp_tree, tvb, pinfo, offset); |
2194 | 0 | offset += dissect_extended_chunk_data_trailer(gvsp_tree, tvb, pinfo, offset); |
2195 | 0 | if (info->chunk != 0) |
2196 | 0 | { |
2197 | 0 | offset += dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2198 | 0 | } |
2199 | 0 | dissect_packet_payload(gvsp_tree, tvb, pinfo, offset, info); |
2200 | 0 | break; |
2201 | | |
2202 | 0 | case GVSP_PAYLOAD_JPEG: |
2203 | 0 | case GVSP_PAYLOAD_JPEG2000: |
2204 | 0 | offset += dissect_jpeg_leader(gvsp_tree, tvb, pinfo, offset); |
2205 | 0 | offset += dissect_generic_trailer(gvsp_tree, tvb, pinfo, offset); |
2206 | 0 | if (info->chunk != 0) |
2207 | 0 | { |
2208 | 0 | offset += dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2209 | 0 | } |
2210 | 0 | dissect_packet_payload(gvsp_tree, tvb, pinfo, offset, info); |
2211 | 0 | break; |
2212 | | |
2213 | 0 | case GVSP_PAYLOAD_H264: |
2214 | 0 | offset += dissect_h264_leader(gvsp_tree, tvb, pinfo, offset); |
2215 | 0 | offset += dissect_generic_trailer(gvsp_tree, tvb, pinfo, offset); |
2216 | 0 | if (info->chunk != 0) |
2217 | 0 | { |
2218 | 0 | offset += dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2219 | 0 | } |
2220 | 0 | dissect_packet_payload_h264(gvsp_tree, tvb, pinfo, offset, info); |
2221 | 0 | break; |
2222 | | |
2223 | 0 | case GVSP_PAYLOAD_MULTIZONEIMAGE: |
2224 | 0 | offset += dissect_multizone_image_leader(gvsp_tree, tvb, pinfo, offset); |
2225 | 0 | offset += dissect_image_trailer(gvsp_tree, tvb, pinfo, offset); |
2226 | 0 | if (info->chunk != 0) |
2227 | 0 | { |
2228 | 0 | offset += dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2229 | 0 | } |
2230 | 0 | dissect_packet_payload_multizone(gvsp_tree, tvb, pinfo, offset, info); |
2231 | 0 | break; |
2232 | | |
2233 | | /* case GVSP_PAYLOAD_MULTIPART: */ |
2234 | | /* By definition, Multi-part cannot support the all-in packet since it requires at least one data packet per part. */ |
2235 | | /* Therefore, it is not possible to use all-in transmission mode for the multi-part payload type. */ |
2236 | | |
2237 | | /* case GVSP_PAYLOAD_GENDC: */ |
2238 | | /* By definition, GenDC cannot support the all-in packet since it requires at least one data packet containing the GenDC descriptor. */ |
2239 | | /* Therefore, it is not possible to use all-in transmission mode for the GenDC payload type. */ |
2240 | |
|
2241 | 0 | } |
2242 | 0 | } |
2243 | | |
2244 | | |
2245 | | /* |
2246 | | \brief Dissects a leader packet |
2247 | | */ |
2248 | | |
2249 | | static void dissect_packet_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, int offset, packet_info *pinfo, gvsp_packet_info *info) |
2250 | 0 | { |
2251 | 0 | switch (info->payloadtype) |
2252 | 0 | { |
2253 | 0 | case GVSP_PAYLOAD_IMAGE: |
2254 | 0 | dissect_image_leader(gvsp_tree, tvb, pinfo, offset); |
2255 | 0 | break; |
2256 | | |
2257 | 0 | case GVSP_PAYLOAD_RAWDATA: |
2258 | 0 | dissect_raw_data_leader(gvsp_tree, tvb, pinfo, offset); |
2259 | 0 | break; |
2260 | | |
2261 | 0 | case GVSP_PAYLOAD_FILE: |
2262 | 0 | dissect_file_leader(gvsp_tree, tvb, pinfo, offset); |
2263 | 0 | break; |
2264 | | |
2265 | 0 | case GVSP_PAYLOAD_CHUNKDATA: |
2266 | 0 | dissect_chunk_data_leader(gvsp_tree, tvb, pinfo, offset); |
2267 | 0 | break; |
2268 | | |
2269 | 0 | case GVSP_PAYLOAD_EXTENDEDCHUNKDATA: |
2270 | 0 | dissect_extended_chunk_data_leader(gvsp_tree, tvb, pinfo, offset); |
2271 | 0 | break; |
2272 | | |
2273 | 0 | case GVSP_PAYLOAD_JPEG: |
2274 | 0 | case GVSP_PAYLOAD_JPEG2000: |
2275 | 0 | dissect_jpeg_leader(gvsp_tree, tvb, pinfo, offset); |
2276 | 0 | break; |
2277 | | |
2278 | 0 | case GVSP_PAYLOAD_H264: |
2279 | 0 | dissect_h264_leader(gvsp_tree, tvb, pinfo, offset); |
2280 | 0 | break; |
2281 | | |
2282 | 0 | case GVSP_PAYLOAD_MULTIZONEIMAGE: |
2283 | 0 | dissect_multizone_image_leader(gvsp_tree, tvb, pinfo, offset); |
2284 | 0 | break; |
2285 | | |
2286 | 0 | case GVSP_PAYLOAD_MULTIPART: |
2287 | 0 | dissect_multi_part_leader(gvsp_tree, tvb, pinfo, offset); |
2288 | 0 | break; |
2289 | | |
2290 | 0 | case GVSP_PAYLOAD_GENDC: |
2291 | 0 | dissect_gendc_leader(gvsp_tree, tvb, pinfo, offset); |
2292 | 0 | break; |
2293 | | |
2294 | 0 | default: |
2295 | 0 | break; |
2296 | 0 | } |
2297 | 0 | } |
2298 | | |
2299 | | |
2300 | | /* |
2301 | | \brief Dissects a trailer packet |
2302 | | */ |
2303 | | |
2304 | | static void dissect_packet_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, int offset, packet_info *pinfo, gvsp_packet_info *info) |
2305 | 0 | { |
2306 | 0 | switch (info->payloadtype) |
2307 | 0 | { |
2308 | 0 | case GVSP_PAYLOAD_IMAGE: |
2309 | 0 | case GVSP_PAYLOAD_MULTIZONEIMAGE: |
2310 | 0 | offset += dissect_image_trailer(gvsp_tree, tvb, pinfo, offset); |
2311 | 0 | break; |
2312 | | |
2313 | 0 | case GVSP_PAYLOAD_CHUNKDATA: |
2314 | 0 | offset += dissect_chunk_data_trailer(gvsp_tree, tvb, pinfo, offset); |
2315 | 0 | break; |
2316 | | |
2317 | 0 | case GVSP_PAYLOAD_EXTENDEDCHUNKDATA: |
2318 | 0 | offset += dissect_extended_chunk_data_trailer(gvsp_tree, tvb, pinfo, offset); |
2319 | 0 | break; |
2320 | | |
2321 | 0 | case GVSP_PAYLOAD_RAWDATA: |
2322 | 0 | case GVSP_PAYLOAD_FILE: |
2323 | 0 | case GVSP_PAYLOAD_JPEG: |
2324 | 0 | case GVSP_PAYLOAD_JPEG2000: |
2325 | 0 | case GVSP_PAYLOAD_H264: |
2326 | 0 | case GVSP_PAYLOAD_GENDC: |
2327 | 0 | offset += dissect_generic_trailer(gvsp_tree, tvb, pinfo, offset); |
2328 | 0 | break; |
2329 | | |
2330 | 0 | case GVSP_PAYLOAD_MULTIPART: |
2331 | 0 | offset += dissect_multi_part_trailer(gvsp_tree, tvb, pinfo, offset); |
2332 | 0 | break; |
2333 | | |
2334 | 0 | default: |
2335 | 0 | break; |
2336 | 0 | } |
2337 | | |
2338 | 0 | if (info->chunk != 0) |
2339 | 0 | { |
2340 | 0 | dissect_extra_chunk_info(gvsp_tree, tvb, pinfo, offset); |
2341 | 0 | } |
2342 | 0 | } |
2343 | | |
2344 | | |
2345 | | /* |
2346 | | \brief Point of entry of all GVSP dissection |
2347 | | */ |
2348 | | |
2349 | | static int dissect_gvsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) |
2350 | 0 | { |
2351 | 0 | proto_item *ti = NULL; |
2352 | 0 | int offset = 0; |
2353 | 0 | proto_tree *gvsp_tree = NULL; |
2354 | 0 | gvsp_packet_info info; |
2355 | |
|
2356 | 0 | if ((tvb_reported_length(tvb) < GVSP_MIN_PACKET_SIZE) || |
2357 | 0 | (tvb_captured_length(tvb) < 5)) |
2358 | 0 | { |
2359 | 0 | return 0; |
2360 | 0 | } |
2361 | | |
2362 | 0 | memset(&info, 0x00, sizeof(info)); |
2363 | |
|
2364 | 0 | info.format = tvb_get_uint8(tvb, 4); |
2365 | |
|
2366 | 0 | if ((info.format & GVSP_EXTENDED_ID_BIT) && tvb_reported_length(tvb) < GVSP_V2_MIN_PACKET_SIZE) |
2367 | 0 | { |
2368 | 0 | return 0; |
2369 | 0 | } |
2370 | | |
2371 | | /* Set the protocol column */ |
2372 | 0 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "GVSP"); |
2373 | | |
2374 | | /* Clear out stuff in the info column */ |
2375 | 0 | col_clear(pinfo->cinfo, COL_INFO); |
2376 | | |
2377 | | /* Adds "Gigabit-Ethernet Streaming Protocol" heading to protocol tree */ |
2378 | | /* We will add fields to this using the gvsp_tree pointer */ |
2379 | 0 | ti = proto_tree_add_item(tree, proto_gvsp, tvb, offset, -1, ENC_NA); |
2380 | 0 | gvsp_tree = proto_item_add_subtree(ti, ett_gvsp); |
2381 | | |
2382 | | /* Look for extended ID flag and then clear it */ |
2383 | 0 | info.enhanced = info.format & GVSP_EXTENDED_ID_BIT; |
2384 | 0 | info.format &= 0x7F; |
2385 | | |
2386 | | /* Add packet format to info string */ |
2387 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(pinfo->pool, info.format, formatnames, "Unknown Format (0x%x)")); |
2388 | | |
2389 | | /* Dissect status */ |
2390 | 0 | info.status = tvb_get_ntohs(tvb, offset); |
2391 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_status, tvb, offset, 2, ENC_BIG_ENDIAN); |
2392 | 0 | offset += 2; |
2393 | |
|
2394 | 0 | if (info.enhanced == 0) |
2395 | 0 | { |
2396 | 0 | info.blockid = tvb_get_ntohs(tvb, offset); |
2397 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_blockid16, tvb, offset, 2, ENC_BIG_ENDIAN); |
2398 | 0 | } |
2399 | 0 | else |
2400 | 0 | { |
2401 | 0 | uint8_t flags; |
2402 | 0 | flags = tvb_get_uint8(tvb, offset + 1); |
2403 | 0 | info.flag_resendrangeerror = flags & 0x04; |
2404 | 0 | info.flag_previousblockdropped = flags & 0x02; |
2405 | 0 | info.flag_packetresend = flags & 0x01; |
2406 | |
|
2407 | 0 | proto_tree_add_bitmask(gvsp_tree, tvb, offset, hf_gvsp_flags, |
2408 | 0 | ett_gvsp_flags, flags_fields, ENC_BIG_ENDIAN); |
2409 | 0 | } |
2410 | |
|
2411 | 0 | offset += 2; |
2412 | |
|
2413 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_format, tvb, offset, 1, ENC_BIG_ENDIAN); |
2414 | 0 | offset++; |
2415 | |
|
2416 | 0 | info.packetid = tvb_get_ntohl(tvb, offset - 1); |
2417 | 0 | info.packetid &= 0x00FFFFFF; |
2418 | 0 | if (info.enhanced == 0) |
2419 | 0 | { |
2420 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_packetid24, tvb, offset, 3, ENC_BIG_ENDIAN); |
2421 | 0 | offset += 3; |
2422 | 0 | } |
2423 | 0 | else |
2424 | 0 | { |
2425 | 0 | offset += 2; |
2426 | 0 | if (info.format == GVSP_PACKET_LEADER) |
2427 | 0 | { |
2428 | 0 | if (tvb_get_uint8(tvb, 23) == GVSP_PAYLOAD_MULTIZONEIMAGE) |
2429 | 0 | { |
2430 | | /* packet id contains the number of additional zones for multi-zone */ |
2431 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_add_zones, tvb, offset, 1, ENC_BIG_ENDIAN); |
2432 | 0 | } |
2433 | 0 | else if (tvb_get_uint8(tvb, 23) == GVSP_PAYLOAD_MULTIPART) |
2434 | 0 | { |
2435 | | /* packet id contains the number of parts for multi-part */ |
2436 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_numparts, tvb, offset, 1, ENC_BIG_ENDIAN); |
2437 | 0 | } |
2438 | 0 | } |
2439 | 0 | offset += 1; |
2440 | 0 | } |
2441 | |
|
2442 | 0 | if (info.enhanced != 0) |
2443 | 0 | { |
2444 | 0 | info.blockid = tvb_get_ntoh64(tvb, offset); |
2445 | | |
2446 | | /* Dissect 64 bit block ID */ |
2447 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_blockid64, tvb, offset, 8, ENC_BIG_ENDIAN); |
2448 | 0 | offset += 8; |
2449 | | |
2450 | | /* Dissect 32 bit packet ID */ |
2451 | 0 | info.packetid = tvb_get_ntohl(tvb, offset); |
2452 | 0 | proto_tree_add_item(gvsp_tree, hf_gvsp_packetid32, tvb, offset, 4, ENC_BIG_ENDIAN); |
2453 | 0 | offset += 4; |
2454 | 0 | } |
2455 | | |
2456 | | /* At this point offset is pointing to end of packet */ |
2457 | |
|
2458 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "[Block ID: %" PRIu64 " Packet ID: %d] ", (uint64_t)info.blockid, info.packetid); |
2459 | |
|
2460 | 0 | if (info.flag_resendrangeerror != 0) |
2461 | 0 | { |
2462 | | /* Add range error to info string */ |
2463 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "[RANGE_ERROR] "); |
2464 | 0 | } |
2465 | |
|
2466 | 0 | if (info.flag_previousblockdropped != 0) |
2467 | 0 | { |
2468 | | /* Add block dropped to info string */ |
2469 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "[BLOCK_DROPPED] "); |
2470 | 0 | } |
2471 | |
|
2472 | 0 | if (info.flag_packetresend != 0) |
2473 | 0 | { |
2474 | | /* Add packet resend to info string */ |
2475 | 0 | col_append_str(pinfo->cinfo, COL_INFO, "[PACKET_RESEND] "); |
2476 | 0 | } |
2477 | | |
2478 | | /* Process packet types that are payload agnostic */ |
2479 | 0 | switch (info.format) |
2480 | 0 | { |
2481 | 0 | case GVSP_PACKET_PAYLOAD: |
2482 | 0 | dissect_packet_payload(gvsp_tree, tvb, pinfo, offset, &info); |
2483 | 0 | return tvb_captured_length(tvb); |
2484 | | |
2485 | 0 | case GVSP_PACKET_PAYLOAD_H264: |
2486 | 0 | dissect_packet_payload_h264(gvsp_tree, tvb, pinfo, offset, &info); |
2487 | 0 | return tvb_captured_length(tvb); |
2488 | | |
2489 | 0 | case GVSP_PACKET_PAYLOAD_MULTIZONE: |
2490 | 0 | dissect_packet_payload_multizone(gvsp_tree, tvb, pinfo, offset, &info); |
2491 | 0 | return tvb_captured_length(tvb); |
2492 | | |
2493 | 0 | case GVSP_PACKET_PAYLOAD_MULTIPART: |
2494 | 0 | dissect_packet_payload_multipart(gvsp_tree, tvb, pinfo, offset, &info); |
2495 | 0 | return tvb_captured_length(tvb); |
2496 | | |
2497 | 0 | case GVSP_PACKET_PAYLOAD_GENDC: |
2498 | 0 | dissect_packet_payload_gendc(gvsp_tree, tvb, pinfo, offset, &info); |
2499 | 0 | return tvb_captured_length(tvb); |
2500 | | |
2501 | 0 | default: |
2502 | 0 | break; |
2503 | 0 | } |
2504 | | |
2505 | | /* Get payload type, clear chunk bit */ |
2506 | 0 | if (tvb_captured_length_remaining(tvb, offset) >= 2) |
2507 | 0 | { |
2508 | 0 | info.payloadtype = tvb_get_ntohs(tvb, offset + 2); |
2509 | 0 | } |
2510 | |
|
2511 | 0 | info.chunk = info.payloadtype & 0x4000; |
2512 | 0 | info.payloadtype &= 0x3FFF; |
2513 | | |
2514 | | |
2515 | | /* Add payload type to information string */ |
2516 | 0 | col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_ext(pinfo->pool, info.payloadtype, &payloadtypenames_ext, "Unknown Payload Type (0x%x)")); |
2517 | | |
2518 | | /* Process packet types for specific payload types */ |
2519 | 0 | switch (info.format) |
2520 | 0 | { |
2521 | 0 | case GVSP_PACKET_ALLIN: |
2522 | 0 | dissect_packet_all_in(gvsp_tree, tvb, offset, pinfo, &info); |
2523 | 0 | break; |
2524 | 0 | case GVSP_PACKET_LEADER: |
2525 | 0 | dissect_packet_leader(gvsp_tree, tvb, offset, pinfo, &info); |
2526 | 0 | break; |
2527 | 0 | case GVSP_PACKET_TRAILER: |
2528 | 0 | dissect_packet_trailer(gvsp_tree, tvb, offset, pinfo, &info); |
2529 | 0 | break; |
2530 | 0 | default: |
2531 | 0 | break; |
2532 | 0 | } |
2533 | 0 | return tvb_captured_length(tvb); |
2534 | 0 | } |
2535 | | |
2536 | | static bool dissect_gvsp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
2537 | 0 | { |
2538 | 0 | conversation_t *conversation = NULL; |
2539 | 0 | uint16_t status_code = 0; |
2540 | 0 | uint8_t format = 0; |
2541 | | |
2542 | | /* Verify packet size */ |
2543 | 0 | if ((tvb_reported_length(tvb) < GVSP_MIN_PACKET_SIZE) || |
2544 | 0 | (tvb_captured_length(tvb) < 5)) |
2545 | 0 | { |
2546 | 0 | return false; |
2547 | 0 | } |
2548 | | |
2549 | | /* Larger packet size if Extended ID flag is set */ |
2550 | 0 | format = tvb_get_uint8(tvb, 4); |
2551 | |
|
2552 | 0 | if ((format & GVSP_EXTENDED_ID_BIT) && tvb_reported_length(tvb) < GVSP_V2_MIN_PACKET_SIZE) |
2553 | 0 | { |
2554 | 0 | return false; |
2555 | 0 | } |
2556 | | |
2557 | | /* Check for valid status codes */ |
2558 | 0 | status_code = tvb_get_ntohs(tvb, 0); |
2559 | |
|
2560 | 0 | if (status_code == GEV_STATUS_SUCCESS || |
2561 | 0 | status_code == GEV_STATUS_PACKET_RESEND || |
2562 | 0 | (status_code >= GEV_STATUS_NOT_IMPLEMENTED && status_code <= GEV_STATUS_LAST) || |
2563 | 0 | status_code == GEV_STATUS_ERROR) |
2564 | 0 | { |
2565 | 0 | format &= 0x7F; |
2566 | | |
2567 | | /* Check for valid format types */ |
2568 | 0 | if (format >= GVSP_PACKET_LEADER && format <= GVSP_PACKET_PAYLOAD_LAST) |
2569 | 0 | { |
2570 | 0 | if(format == GVSP_PACKET_LEADER && tvb_captured_length_remaining(tvb, 8) >= 2) |
2571 | 0 | { |
2572 | 0 | uint32_t payloadtype; |
2573 | 0 | payloadtype = tvb_get_ntohs(tvb, 8); |
2574 | 0 | payloadtype &= 0x3FFF; |
2575 | 0 | if (try_val_to_str_ext(payloadtype, &payloadtypenames_ext) == NULL ){ |
2576 | 0 | return false; |
2577 | 0 | } |
2578 | 0 | } |
2579 | | |
2580 | 0 | conversation = find_or_create_conversation(pinfo); |
2581 | 0 | conversation_set_dissector(conversation, gvsp_handle); |
2582 | 0 | dissect_gvsp(tvb, pinfo, tree, data); |
2583 | 0 | return true; |
2584 | 0 | } |
2585 | 0 | } |
2586 | | |
2587 | 0 | return false; |
2588 | 0 | } |
2589 | | |
2590 | | /* |
2591 | | \brief Registers the dissector. Invoked at program startup. |
2592 | | */ |
2593 | | |
2594 | | void proto_register_gvsp(void) |
2595 | 14 | { |
2596 | 14 | module_t *gvsp_module; |
2597 | | |
2598 | 14 | static hf_register_info hfgvsp[] = |
2599 | 14 | { |
2600 | 14 | {&hf_gvsp_status, |
2601 | 14 | { "Status", "gvsp.status", |
2602 | 14 | FT_UINT16, BASE_HEX|BASE_EXT_STRING, &statusnames_ext, 0x0, |
2603 | 14 | NULL, HFILL |
2604 | 14 | }}, |
2605 | | |
2606 | 14 | {&hf_gvsp_blockid16, |
2607 | 14 | { "Block ID (16 bits)", "gvsp.blockid16", |
2608 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
2609 | 14 | NULL, HFILL |
2610 | 14 | }}, |
2611 | | |
2612 | 14 | {&hf_gvsp_flags, |
2613 | 14 | { "Flags", "gvsp.flags", |
2614 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
2615 | 14 | NULL, HFILL |
2616 | 14 | }}, |
2617 | | |
2618 | 14 | {&hf_gvsp_flagdevicespecific0, |
2619 | 14 | { "Flag Device Specific 0", "gvsp.flag.devicespecific0", |
2620 | 14 | FT_UINT16, BASE_HEX, NULL, 0x8000, |
2621 | 14 | NULL, HFILL |
2622 | 14 | }}, |
2623 | | |
2624 | 14 | {&hf_gvsp_flagdevicespecific1, |
2625 | 14 | { "Flag Device Specific 1", "gvsp.flag.devicespecific1", |
2626 | 14 | FT_UINT16, BASE_HEX, NULL, 0x4000, |
2627 | 14 | NULL, HFILL |
2628 | 14 | }}, |
2629 | | |
2630 | 14 | {&hf_gvsp_flagdevicespecific2, |
2631 | 14 | { "Flag Device Specific 2", "gvsp.flag.devicespecific2", |
2632 | 14 | FT_UINT16, BASE_HEX, NULL, 0x2000, |
2633 | 14 | NULL, HFILL |
2634 | 14 | }}, |
2635 | | |
2636 | 14 | {&hf_gvsp_flagdevicespecific3, |
2637 | 14 | { "Flag Device Specific 3", "gvsp.flag.devicespecific3", |
2638 | 14 | FT_UINT16, BASE_HEX, NULL, 0x1000, |
2639 | 14 | NULL, HFILL |
2640 | 14 | }}, |
2641 | | |
2642 | 14 | {&hf_gvsp_flagdevicespecific4, |
2643 | 14 | { "Flag Device Specific 4", "gvsp.flag.devicespecific4", |
2644 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0800, |
2645 | 14 | NULL, HFILL |
2646 | 14 | }}, |
2647 | | |
2648 | 14 | {&hf_gvsp_flagdevicespecific5, |
2649 | 14 | { "Flag Device Specific 5", "gvsp.flag.devicespecific5", |
2650 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0400, |
2651 | 14 | NULL, HFILL |
2652 | 14 | }}, |
2653 | | |
2654 | 14 | {&hf_gvsp_flagdevicespecific6, |
2655 | 14 | { "Flag Device Specific 6", "gvsp.flag.devicespecific6", |
2656 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0200, |
2657 | 14 | NULL, HFILL |
2658 | 14 | }}, |
2659 | | |
2660 | 14 | {&hf_gvsp_flagdevicespecific7, |
2661 | 14 | { "Flag Device Specific 7", "gvsp.flag.devicespecific7", |
2662 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0100, |
2663 | 14 | NULL, HFILL |
2664 | 14 | }}, |
2665 | | |
2666 | 14 | {&hf_gvsp_flagresendrangeerror, |
2667 | 14 | { "Flag Resend Range Error", "gvsp.flag.resendrangeerror", |
2668 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0004, |
2669 | 14 | NULL, HFILL |
2670 | 14 | }}, |
2671 | | |
2672 | 14 | {&hf_gvsp_flagpreviousblockdropped, |
2673 | 14 | { "Flag Previous Block Dropped", "gvsp.flag.previousblockdropped", |
2674 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0002, |
2675 | 14 | NULL, HFILL |
2676 | 14 | }}, |
2677 | | |
2678 | 14 | {&hf_gvsp_flagpacketresend, |
2679 | 14 | { "Flag Packet Resend", "gvsp.flag.packetresend", |
2680 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0001, |
2681 | 14 | NULL, HFILL |
2682 | 14 | }}, |
2683 | | |
2684 | 14 | {&hf_gvsp_format, |
2685 | 14 | { "Format", "gvsp.format", |
2686 | 14 | FT_UINT8, BASE_HEX, VALS(formatnames), 0, |
2687 | 14 | NULL, HFILL |
2688 | 14 | }}, |
2689 | | |
2690 | 14 | {&hf_gvsp_packetid24, |
2691 | 14 | { "Packet ID (24 bits)", "gvsp.packetid24", |
2692 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
2693 | 14 | NULL, HFILL |
2694 | 14 | }}, |
2695 | | |
2696 | 14 | {&hf_gvsp_blockid64, |
2697 | 14 | { "Block ID (64 bits v2.0)", "gvsp.blockid64", |
2698 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
2699 | 14 | NULL, HFILL |
2700 | 14 | }}, |
2701 | | |
2702 | 14 | {&hf_gvsp_packetid32, |
2703 | 14 | { "Packet ID (32 bits v2.0)", "gvsp.packetid32", |
2704 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
2705 | 14 | NULL, HFILL |
2706 | 14 | }}, |
2707 | | |
2708 | 14 | {&hf_gvsp_payloadtype, |
2709 | 14 | { "Payload Type", "gvsp.payloadtype", |
2710 | 14 | FT_UINT16, BASE_HEX|BASE_EXT_STRING, &payloadtypenames_ext, 0x0, |
2711 | 14 | NULL, HFILL |
2712 | 14 | }}, |
2713 | | |
2714 | 14 | {&hf_gvsp_payloaddata, |
2715 | 14 | { "Payload Data", "gvsp.payloaddata", |
2716 | 14 | FT_BYTES, BASE_NONE, NULL, 0x0, |
2717 | 14 | NULL, HFILL |
2718 | 14 | }}, |
2719 | | |
2720 | 14 | {&hf_gvsp_timestamp, |
2721 | 14 | { "Timestamp", "gvsp.timestamp", |
2722 | 14 | FT_UINT64, BASE_HEX, NULL, 0x0, |
2723 | 14 | NULL, HFILL |
2724 | 14 | }}, |
2725 | | |
2726 | 14 | {&hf_gvsp_pixelformat, |
2727 | 14 | { "Pixel Format", "gvsp.pixel", |
2728 | 14 | FT_UINT32, BASE_HEX|BASE_EXT_STRING, &pixeltypenames_ext, 0x0, |
2729 | 14 | NULL, HFILL |
2730 | 14 | }}, |
2731 | | |
2732 | 14 | {&hf_gvsp_sizex, |
2733 | 14 | { "Size X", "gvsp.sizex", |
2734 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
2735 | 14 | NULL, HFILL |
2736 | 14 | }}, |
2737 | | |
2738 | 14 | {&hf_gvsp_sizey, |
2739 | 14 | { "Size Y", "gvsp.sizey", |
2740 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
2741 | 14 | NULL, HFILL |
2742 | 14 | }}, |
2743 | | |
2744 | 14 | {&hf_gvsp_offsetx, |
2745 | 14 | { "Offset X", "gvsp.offsetx", |
2746 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
2747 | 14 | NULL, HFILL |
2748 | 14 | }}, |
2749 | | |
2750 | 14 | {&hf_gvsp_offsety, |
2751 | 14 | { "Offset Y", "gvsp.offsety", |
2752 | 14 | FT_UINT32, BASE_DEC, NULL, 0x0, |
2753 | 14 | NULL, HFILL |
2754 | 14 | }}, |
2755 | | |
2756 | 14 | {&hf_gvsp_paddingx, |
2757 | 14 | { "Padding X", "gvsp.paddingx", |
2758 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
2759 | 14 | NULL, HFILL |
2760 | 14 | }}, |
2761 | | |
2762 | 14 | {&hf_gvsp_paddingy, |
2763 | 14 | { "Padding Y", "gvsp.paddingy", |
2764 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
2765 | 14 | NULL, HFILL |
2766 | 14 | }}, |
2767 | | |
2768 | 14 | {&hf_gvsp_payloaddatasize, |
2769 | 14 | { "Payload Data Size", "gvsp.payloaddatasize", |
2770 | 14 | FT_UINT64, BASE_DEC, NULL, 0x0, |
2771 | 14 | NULL, HFILL |
2772 | 14 | }}, |
2773 | | |
2774 | 14 | {&hf_gvsp_pixelcolor, |
2775 | 14 | { "Monochrome or Color", "gvsp.pixel.color", |
2776 | 14 | FT_UINT32, BASE_HEX, VALS(colornames), 0xFF000000, |
2777 | 14 | NULL, HFILL |
2778 | 14 | }}, |
2779 | | |
2780 | 14 | {&hf_gvsp_pixeloccupy, |
2781 | 14 | { "Occupy Bits", "gvsp.pixel.occupy", |
2782 | 14 | FT_UINT32, BASE_DEC, NULL, 0x00FF0000, |
2783 | 14 | NULL, HFILL |
2784 | 14 | }}, |
2785 | | |
2786 | 14 | {&hf_gvsp_pixelid, |
2787 | 14 | { "ID", "gvsp.pixel.id", |
2788 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0000FFFF, |
2789 | 14 | NULL, HFILL |
2790 | 14 | }}, |
2791 | | |
2792 | 14 | {&hf_gvsp_filename, |
2793 | 14 | { "Filename", "gvsp.filename", |
2794 | 14 | FT_STRINGZ, BASE_NONE, NULL, 0, |
2795 | 14 | NULL, HFILL |
2796 | 14 | }}, |
2797 | | |
2798 | 14 | {&hf_gvsp_payloadlength, |
2799 | 14 | { "Payload Length", "gvsp.payloadlength", |
2800 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
2801 | 14 | NULL, HFILL |
2802 | 14 | }}, |
2803 | | |
2804 | 14 | {&hf_gvsp_fieldinfo, |
2805 | 14 | { "Field Info", "gvsp.fieldinfo", |
2806 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
2807 | 14 | NULL, HFILL |
2808 | 14 | }}, |
2809 | | |
2810 | 14 | {&hf_gvsp_fieldid, |
2811 | 14 | { "Field ID", "gvsp.fieldid", |
2812 | 14 | FT_UINT8, BASE_HEX, NULL, 0xF0, |
2813 | 14 | NULL, HFILL |
2814 | 14 | }}, |
2815 | | |
2816 | 14 | {&hf_gvsp_fieldcount, |
2817 | 14 | { "Field Count", "gvsp.fieldcount", |
2818 | 14 | FT_UINT8, BASE_HEX, NULL, 0x0F, |
2819 | 14 | NULL, HFILL |
2820 | 14 | }}, |
2821 | | |
2822 | 14 | {&hf_gvsp_genericflags, |
2823 | 14 | { "Generic Flag", "gvsp.genericflag", |
2824 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
2825 | 14 | NULL, HFILL |
2826 | 14 | }}, |
2827 | | |
2828 | 14 | {&hf_gvsp_timestamptickfrequency , |
2829 | 14 | { "Timestamp Tick Frequency", "gvsp.timestamptickfrequency", |
2830 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
2831 | 14 | NULL, HFILL |
2832 | 14 | }}, |
2833 | | |
2834 | 14 | {&hf_gvsp_dataformat, |
2835 | 14 | { "Data Format", "gvsp.dataformat", |
2836 | 14 | FT_UINT32, BASE_HEX, NULL, 0, |
2837 | 14 | NULL, HFILL |
2838 | 14 | }}, |
2839 | | |
2840 | 14 | {&hf_gvsp_packetizationmode, |
2841 | 14 | { "packetization_mode", "gvsp.packetizationmode", |
2842 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
2843 | 14 | NULL, HFILL |
2844 | 14 | }}, |
2845 | | |
2846 | 14 | {&hf_gvsp_packetsize, |
2847 | 14 | { "packet_size", "gvsp.packetsize", |
2848 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
2849 | 14 | NULL, HFILL |
2850 | 14 | }}, |
2851 | | |
2852 | 14 | {&hf_gvsp_profileidc, |
2853 | 14 | { "profile_idc", "gvsp.profileidc", |
2854 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
2855 | 14 | NULL, HFILL |
2856 | 14 | }}, |
2857 | | |
2858 | 14 | {&hf_gvsp_cs, |
2859 | 14 | { "cs", "gvsp.cs", |
2860 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
2861 | 14 | NULL, HFILL |
2862 | 14 | }}, |
2863 | | |
2864 | 14 | {&hf_gvsp_cs0, |
2865 | 14 | { "cs0", "gvsp.cs0", |
2866 | 14 | FT_UINT8, BASE_HEX, NULL, 0x80, |
2867 | 14 | NULL, HFILL |
2868 | 14 | }}, |
2869 | | |
2870 | 14 | {&hf_gvsp_cs1, |
2871 | 14 | { "cs1", "gvsp.cs1", |
2872 | 14 | FT_UINT8, BASE_HEX, NULL, 0x40, |
2873 | 14 | NULL, HFILL |
2874 | 14 | }}, |
2875 | | |
2876 | 14 | {&hf_gvsp_cs2, |
2877 | 14 | { "cs2", "gvsp.cs2", |
2878 | 14 | FT_UINT8, BASE_HEX, NULL, 0x20, |
2879 | 14 | NULL, HFILL |
2880 | 14 | }}, |
2881 | | |
2882 | 14 | {&hf_gvsp_cs3, |
2883 | 14 | { "cs3", "gvsp.cs3", |
2884 | 14 | FT_UINT8, BASE_HEX, NULL, 0x10, |
2885 | 14 | NULL, HFILL |
2886 | 14 | }}, |
2887 | | |
2888 | 14 | {&hf_gvsp_levelidc, |
2889 | 14 | { "level_idc", "gvsp.levelidc", |
2890 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
2891 | 14 | NULL, HFILL |
2892 | 14 | }}, |
2893 | | |
2894 | 14 | {&hf_gvsp_sropinterleavingdepth, |
2895 | 14 | { "srop_interleaving_depth", "gvsp.sropinterleavingdepth", |
2896 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
2897 | 14 | NULL, HFILL |
2898 | 14 | }}, |
2899 | | |
2900 | 14 | {&hf_gvsp_sropmaxdondiff, |
2901 | 14 | { "srop_max_don_diff", "gvsp.sropmaxdondiff", |
2902 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
2903 | 14 | NULL, HFILL |
2904 | 14 | }}, |
2905 | | |
2906 | 14 | {&hf_gvsp_sropdeintbufreq, |
2907 | 14 | { "srop_deint_buf_req", "gvsp.sropdeintbufreq", |
2908 | 14 | FT_UINT32, BASE_HEX, NULL, 0, |
2909 | 14 | NULL, HFILL |
2910 | 14 | }}, |
2911 | | |
2912 | 14 | {&hf_gvsp_sropinitbuftime, |
2913 | 14 | { "srop_init_buf_time", "gvsp.sropinitbuftime", |
2914 | 14 | FT_UINT32, BASE_HEX, NULL, 0, |
2915 | 14 | NULL, HFILL |
2916 | 14 | }}, |
2917 | | |
2918 | 14 | {&hf_gvsp_add_zones, |
2919 | 14 | { "Additional Zones (Multi-Zone)", "gvsp.addzones", |
2920 | 14 | FT_UINT8, BASE_HEX, NULL, 0x1F, |
2921 | 14 | NULL, HFILL |
2922 | 14 | }}, |
2923 | | |
2924 | 14 | {&hf_gvsp_zoneinfo, |
2925 | 14 | { "Zone Info (Multi-Zone)", "gvsp.multizoneinfo", |
2926 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
2927 | 14 | NULL, HFILL |
2928 | 14 | }}, |
2929 | | |
2930 | 14 | {&hf_gvsp_zoneid, |
2931 | 14 | { "Zone ID", "gvsp.zoneid", |
2932 | 14 | FT_UINT8, BASE_HEX, NULL, 0x3E, |
2933 | 14 | NULL, HFILL |
2934 | 14 | }}, |
2935 | | |
2936 | 14 | {&hf_gvsp_endofzone, |
2937 | 14 | { "End of Zone", "gvsp.endofzone", |
2938 | 14 | FT_BOOLEAN, 8, NULL, 0x01, |
2939 | 14 | NULL, HFILL |
2940 | 14 | }}, |
2941 | | |
2942 | 14 | {&hf_gvsp_addressoffset, |
2943 | 14 | { "Address Offset", "gvsp.addressoffset", |
2944 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0, |
2945 | 14 | NULL, HFILL |
2946 | 14 | }}, |
2947 | | |
2948 | 14 | {&hf_gvsp_sc_zone_direction, |
2949 | 14 | { "Zone Directions Mask", "gvsp.zonedirection", |
2950 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0, |
2951 | 14 | NULL, HFILL |
2952 | 14 | }}, |
2953 | | |
2954 | 14 | {&hf_gvsp_sc_zone0_direction, |
2955 | 14 | { "Zone 0 Direction", "gvsp.zone0direction", |
2956 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x80000000, |
2957 | 14 | NULL, HFILL |
2958 | 14 | }}, |
2959 | | |
2960 | 14 | {&hf_gvsp_sc_zone1_direction, |
2961 | 14 | { "Zone 1 Direction", "gvsp.zone1direction", |
2962 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x40000000, |
2963 | 14 | NULL, HFILL |
2964 | 14 | }}, |
2965 | | |
2966 | 14 | {&hf_gvsp_sc_zone2_direction, |
2967 | 14 | { "Zone 2 Direction", "gvsp.zone2direction", |
2968 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x20000000, |
2969 | 14 | NULL, HFILL |
2970 | 14 | }}, |
2971 | | |
2972 | 14 | {&hf_gvsp_sc_zone3_direction, |
2973 | 14 | { "Zone 3 Direction", "gvsp.zone3direction", |
2974 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x10000000, |
2975 | 14 | NULL, HFILL |
2976 | 14 | }}, |
2977 | | |
2978 | 14 | {&hf_gvsp_sc_zone4_direction, |
2979 | 14 | { "Zone 4 Direction", "gvsp.zone4direction", |
2980 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x08000000, |
2981 | 14 | NULL, HFILL |
2982 | 14 | }}, |
2983 | | |
2984 | 14 | {&hf_gvsp_sc_zone5_direction, |
2985 | 14 | { "Zone 5 Direction", "gvsp.zone5direction", |
2986 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x04000000, |
2987 | 14 | NULL, HFILL |
2988 | 14 | }}, |
2989 | | |
2990 | 14 | {&hf_gvsp_sc_zone6_direction, |
2991 | 14 | { "Zone 6 Direction", "gvsp.zone6direction", |
2992 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x02000000, |
2993 | 14 | NULL, HFILL |
2994 | 14 | }}, |
2995 | | |
2996 | 14 | {&hf_gvsp_sc_zone7_direction, |
2997 | 14 | { "Zone 7 Direction", "gvsp.zone7direction", |
2998 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x01000000, |
2999 | 14 | NULL, HFILL |
3000 | 14 | }}, |
3001 | | |
3002 | 14 | {&hf_gvsp_sc_zone8_direction, |
3003 | 14 | { "Zone 8 Direction", "gvsp.zone8direction", |
3004 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00800000, |
3005 | 14 | NULL, HFILL |
3006 | 14 | }}, |
3007 | | |
3008 | 14 | {&hf_gvsp_sc_zone9_direction, |
3009 | 14 | { "Zone 9 Direction", "gvsp.zone9direction", |
3010 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00400000, |
3011 | 14 | NULL, HFILL |
3012 | 14 | }}, |
3013 | | |
3014 | 14 | {&hf_gvsp_sc_zone10_direction, |
3015 | 14 | { "Zone 10 Direction", "gvsp.zone10direction", |
3016 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00200000, |
3017 | 14 | NULL, HFILL |
3018 | 14 | }}, |
3019 | | |
3020 | 14 | {&hf_gvsp_sc_zone11_direction, |
3021 | 14 | { "Zone 11 Direction", "gvsp.zone11direction", |
3022 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00100000, |
3023 | 14 | NULL, HFILL |
3024 | 14 | }}, |
3025 | | |
3026 | 14 | {&hf_gvsp_sc_zone12_direction, |
3027 | 14 | { "Zone 12 Direction", "gvsp.zone12direction", |
3028 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00080000, |
3029 | 14 | NULL, HFILL |
3030 | 14 | }}, |
3031 | | |
3032 | 14 | {&hf_gvsp_sc_zone13_direction, |
3033 | 14 | { "Zone 13 Direction", "gvsp.zone13direction", |
3034 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00040000, |
3035 | 14 | NULL, HFILL |
3036 | 14 | }}, |
3037 | | |
3038 | 14 | {&hf_gvsp_sc_zone14_direction, |
3039 | 14 | { "Zone 14 Direction", "gvsp.zone14direction", |
3040 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00020000, |
3041 | 14 | NULL, HFILL |
3042 | 14 | }}, |
3043 | | |
3044 | 14 | {&hf_gvsp_sc_zone15_direction, |
3045 | 14 | { "Zone 15 Direction", "gvsp.zone15direction", |
3046 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00010000, |
3047 | 14 | NULL, HFILL |
3048 | 14 | }}, |
3049 | | |
3050 | 14 | {&hf_gvsp_sc_zone16_direction, |
3051 | 14 | { "Zone 16 Direction", "gvsp.zone16direction", |
3052 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00008000, |
3053 | 14 | NULL, HFILL |
3054 | 14 | }}, |
3055 | | |
3056 | 14 | {&hf_gvsp_sc_zone17_direction, |
3057 | 14 | { "Zone 17 Direction", "gvsp.zone17direction", |
3058 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00004000, |
3059 | 14 | NULL, HFILL |
3060 | 14 | }}, |
3061 | | |
3062 | 14 | {&hf_gvsp_sc_zone18_direction, |
3063 | 14 | { "Zone 18 Direction", "gvsp.zone18direction", |
3064 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00002000, |
3065 | 14 | NULL, HFILL |
3066 | 14 | }}, |
3067 | | |
3068 | 14 | {&hf_gvsp_sc_zone19_direction, |
3069 | 14 | { "Zone 19 Direction", "gvsp.zone19direction", |
3070 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00001000, |
3071 | 14 | NULL, HFILL |
3072 | 14 | }}, |
3073 | | |
3074 | 14 | {&hf_gvsp_sc_zone20_direction, |
3075 | 14 | { "Zone 20 Direction", "gvsp.zone20direction", |
3076 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000800, |
3077 | 14 | NULL, HFILL |
3078 | 14 | }}, |
3079 | | |
3080 | 14 | {&hf_gvsp_sc_zone21_direction, |
3081 | 14 | { "Zone 21 Direction", "gvsp.zone21direction", |
3082 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000400, |
3083 | 14 | NULL, HFILL |
3084 | 14 | }}, |
3085 | | |
3086 | 14 | {&hf_gvsp_sc_zone22_direction, |
3087 | 14 | { "Zone 22 Direction", "gvsp.zone22direction", |
3088 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000200, |
3089 | 14 | NULL, HFILL |
3090 | 14 | }}, |
3091 | | |
3092 | 14 | {&hf_gvsp_sc_zone23_direction, |
3093 | 14 | { "Zone 23 Direction", "gvsp.zone23direction", |
3094 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000100, |
3095 | 14 | NULL, HFILL |
3096 | 14 | }}, |
3097 | | |
3098 | 14 | {&hf_gvsp_sc_zone24_direction, |
3099 | 14 | { "Zone 24 Direction", "gvsp.zone24direction", |
3100 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000080, |
3101 | 14 | NULL, HFILL |
3102 | 14 | }}, |
3103 | | |
3104 | 14 | {&hf_gvsp_sc_zone25_direction, |
3105 | 14 | { "Zone 25 Direction", "gvsp.zone25direction", |
3106 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000040, |
3107 | 14 | NULL, HFILL |
3108 | 14 | }}, |
3109 | | |
3110 | 14 | {&hf_gvsp_sc_zone26_direction, |
3111 | 14 | { "Zone 26 Direction", "gvsp.zone26direction", |
3112 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000020, |
3113 | 14 | NULL, HFILL |
3114 | 14 | }}, |
3115 | | |
3116 | 14 | {&hf_gvsp_sc_zone27_direction, |
3117 | 14 | { "Zone 27 Direction", "gvsp.zone27direction", |
3118 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000010, |
3119 | 14 | NULL, HFILL |
3120 | 14 | }}, |
3121 | | |
3122 | 14 | {&hf_gvsp_sc_zone28_direction, |
3123 | 14 | { "Zone 28 Direction", "gvsp.zone28direction", |
3124 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000008, |
3125 | 14 | NULL, HFILL |
3126 | 14 | }}, |
3127 | | |
3128 | 14 | {&hf_gvsp_sc_zone29_direction, |
3129 | 14 | { "Zone 29 Direction", "gvsp.zone29direction", |
3130 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000004, |
3131 | 14 | NULL, HFILL |
3132 | 14 | }}, |
3133 | | |
3134 | 14 | {&hf_gvsp_sc_zone30_direction, |
3135 | 14 | { "Zone 30 Direction", "gvsp.zone30direction", |
3136 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000002, |
3137 | 14 | NULL, HFILL |
3138 | 14 | }}, |
3139 | | |
3140 | 14 | {&hf_gvsp_sc_zone31_direction, |
3141 | 14 | { "Zone 31 Direction", "gvsp.zone31direction", |
3142 | 14 | FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000001, |
3143 | 14 | NULL, HFILL |
3144 | 14 | }}, |
3145 | | |
3146 | 14 | {&hf_gvsp_numparts, |
3147 | 14 | { "Multi-part number of parts", "gvsp.numparts", |
3148 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3149 | 14 | NULL, HFILL |
3150 | 14 | }}, |
3151 | | |
3152 | 14 | {&hf_gvsp_multipart_data_type, |
3153 | 14 | { "Data Type", "gvsp.multipartdatatype", |
3154 | 14 | FT_UINT16, BASE_HEX|BASE_EXT_STRING, &multipartdatatypenames_ext, 0, |
3155 | 14 | NULL, HFILL |
3156 | 14 | }}, |
3157 | | |
3158 | 14 | {&hf_gvsp_partlength, |
3159 | 14 | { "Part Length", "gvsp.partlength", |
3160 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0, |
3161 | 14 | NULL, HFILL |
3162 | 14 | }}, |
3163 | | |
3164 | 14 | {&hf_gvsp_multi_part_source_id, |
3165 | 14 | { "Source ID", "gvsp.sourceid", |
3166 | 14 | FT_UINT8, BASE_HEX_DEC, NULL, 0, |
3167 | 14 | NULL, HFILL |
3168 | 14 | }}, |
3169 | | |
3170 | 14 | {&hf_gvsp_data_purpose_id, |
3171 | 14 | { "Data Purpose ID", "gvsp.datapurposeid", |
3172 | 14 | FT_UINT16, BASE_HEX_DEC, NULL, 0, |
3173 | 14 | NULL, HFILL |
3174 | 14 | }}, |
3175 | | |
3176 | 14 | {&hf_gvsp_region_id, |
3177 | 14 | { "Region ID", "gvsp.regionid", |
3178 | 14 | FT_UINT16, BASE_HEX_DEC, NULL, 0, |
3179 | 14 | NULL, HFILL |
3180 | 14 | }}, |
3181 | | |
3182 | 14 | {&hf_gvsp_data_type_specific, |
3183 | 14 | { "Data Type Specific", "gvsp.datatypespecific", |
3184 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0, |
3185 | 14 | NULL, HFILL |
3186 | 14 | }}, |
3187 | | |
3188 | 14 | {&hf_gvsp_endofpart, |
3189 | 14 | { "End of Part", "gvsp.endofpart", |
3190 | 14 | FT_BOOLEAN, 8, NULL, 0x40, |
3191 | 14 | NULL, HFILL |
3192 | 14 | }}, |
3193 | | |
3194 | 14 | {&hf_gvsp_add_zones_multipart, |
3195 | 14 | { "Additional Zones (Multi-Part)", "gvsp.multipartaddzones", |
3196 | 14 | FT_UINT8, BASE_HEX, NULL, 0x1F, |
3197 | 14 | NULL, HFILL |
3198 | 14 | }}, |
3199 | | |
3200 | 14 | {&hf_gvsp_zoneinfo_multipart, |
3201 | 14 | { "Zone Info (Multi-Part)", "gvsp.multipartzoneinfo", |
3202 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
3203 | 14 | NULL, HFILL |
3204 | 14 | }}, |
3205 | | |
3206 | 14 | {&hf_gvsp_multi_part_part_id, |
3207 | 14 | { "Part ID", "gvsp.partid", |
3208 | 14 | FT_UINT8, BASE_HEX_DEC, NULL, 0, |
3209 | 14 | NULL, HFILL |
3210 | 14 | }}, |
3211 | | |
3212 | 14 | {&hf_gvsp_chunk_data_payload_length_hex, |
3213 | 14 | { "Chunk Data Payload Length", "gvsp.chunkdatapayloadlengthhex", |
3214 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3215 | 14 | NULL, HFILL |
3216 | 14 | }}, |
3217 | | |
3218 | 14 | {&hf_gvsp_chunk_layout_id_hex, |
3219 | 14 | { "Chunk Layout ID", "gvsp.chunklayoutidhex", |
3220 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3221 | 14 | NULL, HFILL |
3222 | 14 | }}, |
3223 | | |
3224 | | /* GEV 2.2 */ |
3225 | 14 | { &hf_gvsp_gendc_leader_descriptor_size_v2_2, |
3226 | 14 | { "GenDC Descriptor Size", "gvsp.gendcdescriptorsize", |
3227 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3228 | 14 | NULL, HFILL |
3229 | 14 | } }, |
3230 | | |
3231 | 14 | { &hf_gvsp_gendc_leader_flags_v2_2, |
3232 | 14 | { "Flags", "gvsp.gendc.leader.flags", |
3233 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
3234 | 14 | NULL, HFILL |
3235 | 14 | } }, |
3236 | | |
3237 | 14 | { &hf_gvsp_gendc_leader_flags_preliminary_descriptor_v2_2, |
3238 | 14 | { "Preliminary Descriptor", "gvsp.gendc.leader.flags.preliminarydescriptor", |
3239 | 14 | FT_UINT8, BASE_HEX, NULL, 0x80, |
3240 | 14 | NULL, HFILL |
3241 | 14 | } }, |
3242 | | |
3243 | 14 | { &hf_gvsp_gendc_leader_flags_reserved_v2_2, |
3244 | 14 | { "Reserved", "gvsp.gendc.leader.flags.reserved", |
3245 | 14 | FT_UINT8, BASE_HEX, NULL, 0x7F, |
3246 | 14 | NULL, HFILL |
3247 | 14 | } }, |
3248 | | |
3249 | 14 | { &hf_gvsp_gendc_payload_data_size_v2_2, |
3250 | 14 | { "Data Size", "gvsp.gendc.payload.datasize", |
3251 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3252 | 14 | NULL, HFILL |
3253 | 14 | } }, |
3254 | | |
3255 | 14 | { &hf_gvsp_gendc_payload_data_destination_offset_v2_2, |
3256 | 14 | { "Data Destination Offset", "gvsp.gendc.payload.datadestinationoffset", |
3257 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3258 | 14 | NULL, HFILL |
3259 | 14 | } }, |
3260 | | |
3261 | 14 | { &hf_gvsp_gendc_payload_data_flags_v2_2, |
3262 | 14 | { "Data Flags", "gvsp.gendc.payload.dataflags", |
3263 | 14 | FT_UINT8, BASE_HEX, NULL, 0xFF, |
3264 | 14 | NULL, HFILL |
3265 | 14 | } }, |
3266 | | |
3267 | 14 | { &hf_gvsp_gendc_payload_data_flag_descriptor_flags_v2_2, |
3268 | 14 | { "Descriptor Data Present", "gvsp.gendc.payload.dataflags.descriptordatapresent", |
3269 | 14 | FT_UINT8, BASE_HEX, VALS(gendc_payload_descriptor_flag_values), GENDC_DESCRIPTOR_FLAG, |
3270 | 14 | NULL, HFILL |
3271 | 14 | } }, |
3272 | | |
3273 | 14 | { &hf_gvsp_gendc_payload_data_flag_start_of_descriptor_data_v2_2, |
3274 | 14 | { "Start Of Descriptor Data", "gvsp.gendc.payload.dataflags.startofdescriptordata", |
3275 | 14 | FT_UINT8, BASE_HEX, NULL, GENDC_DESCRIPTOR_START_FLAG, |
3276 | 14 | NULL, HFILL |
3277 | 14 | } }, |
3278 | | |
3279 | 14 | { &hf_gvsp_gendc_payload_data_flag_end_of_descriptor_data_v2_2, |
3280 | 14 | { "End Of Descriptor Data", "gvsp.gendc.payload.dataflags.endofdescriptordata", |
3281 | 14 | FT_UINT8, BASE_HEX, NULL, GENDC_DESCRIPTOR_END_FLAG, |
3282 | 14 | NULL, HFILL |
3283 | 14 | } }, |
3284 | | |
3285 | 14 | { &hf_gvsp_gendc_payload_data_flags_reserved_v2_2, |
3286 | 14 | { "Reserved", "gvsp.gendc.payload.dataflags.reserved", |
3287 | 14 | FT_UINT8, BASE_HEX, NULL, 0x0F, |
3288 | 14 | NULL, HFILL |
3289 | 14 | } }, |
3290 | | |
3291 | 14 | { &hf_gvsp_gendc_payload_flow_flags_v2_2, |
3292 | 14 | { "Flow Flags", "gvsp.gendc.payload.flowflags", |
3293 | 14 | FT_UINT8, BASE_HEX, NULL, 0xFF, |
3294 | 14 | NULL, HFILL |
3295 | 14 | } }, |
3296 | | |
3297 | 14 | { &hf_gvsp_gendc_payload_flow_flag_first_packet_v2_2, |
3298 | 14 | { "First Packet With Current Flow ID", "gvsp.gendc.payload.flowflags.firstpacketwithcurrentflow", |
3299 | 14 | FT_UINT8, BASE_HEX, NULL, 0x80, |
3300 | 14 | NULL, HFILL |
3301 | 14 | } }, |
3302 | | |
3303 | 14 | { &hf_gvsp_gendc_payload_flow_flag_last_packet_v2_2, |
3304 | 14 | { "Last Packet With Current Flow ID", "gvsp.gendc.payload.flowflags.lastpacketwithcurrentflow", |
3305 | 14 | FT_UINT8, BASE_HEX, NULL, 0x40, |
3306 | 14 | NULL, HFILL |
3307 | 14 | } }, |
3308 | | |
3309 | 14 | { &hf_gvsp_gendc_payload_flow_id_v2_2, |
3310 | 14 | { "Flow ID", "gvsp.gendc.payload.flowid", |
3311 | 14 | FT_UINT16, BASE_DEC, NULL, 0x0, |
3312 | 14 | NULL, HFILL |
3313 | 14 | } }, |
3314 | | |
3315 | 14 | { &hf_gvsp_gendc_header_type_v2_2, |
3316 | 14 | { "Header Type", "gvsp.gendc.header.type", |
3317 | 14 | FT_UINT16, BASE_HEX, VALS(gendc_header_type_values), 0x0, |
3318 | 14 | NULL, HFILL |
3319 | 14 | } }, |
3320 | | |
3321 | 14 | { &hf_gvsp_gendc_header_size_v2_2, |
3322 | 14 | { "Size", "gvsp.gendc.header.size", |
3323 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3324 | 14 | NULL, HFILL |
3325 | 14 | } }, |
3326 | | |
3327 | 14 | { &hf_gvsp_gendc_header_reserved_1_byte_v2_2, |
3328 | 14 | { "Reserved (1 Byte)", "gvsp.gendc.header.reserved1", |
3329 | 14 | FT_UINT8, BASE_HEX, NULL, 0x0, |
3330 | 14 | NULL, HFILL |
3331 | 14 | } }, |
3332 | | |
3333 | 14 | { &hf_gvsp_gendc_header_reserved_2_bytes_v2_2, |
3334 | 14 | { "Reserved (2 Bytes)", "gvsp.gendc.header.reserved2", |
3335 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
3336 | 14 | NULL, HFILL |
3337 | 14 | } }, |
3338 | | |
3339 | 14 | { &hf_gvsp_gendc_header_reserved_4_bytes_v2_2, |
3340 | 14 | { "Reserved (4 Bytes)", "gvsp.gendc.header.reserved4", |
3341 | 14 | FT_UINT32, BASE_HEX, NULL, 0x0, |
3342 | 14 | NULL, HFILL |
3343 | 14 | } }, |
3344 | | |
3345 | 14 | { &hf_gvsp_gendc_container_header_signature_v2_2, |
3346 | 14 | { "Signature", "gvsp.gendc.container.header.signature", |
3347 | 14 | FT_STRING, BASE_NONE, NULL, 0x0, |
3348 | 14 | NULL, HFILL |
3349 | 14 | } }, |
3350 | | |
3351 | 14 | { &hf_gvsp_gendc_container_header_version_major_v2_2, |
3352 | 14 | { "Major Version", "gvsp.gendc.container.header.majorversion", |
3353 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
3354 | 14 | NULL, HFILL |
3355 | 14 | } }, |
3356 | | |
3357 | 14 | { &hf_gvsp_gendc_container_header_version_minor_v2_2, |
3358 | 14 | { "Minor Version", "gvsp.gendc.container.header.minorversion", |
3359 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
3360 | 14 | NULL, HFILL |
3361 | 14 | } }, |
3362 | | |
3363 | 14 | { &hf_gvsp_gendc_container_header_version_sub_minor_v2_2, |
3364 | 14 | { "Sub Minor Version", "gvsp.gendc.container.header.subminorversion", |
3365 | 14 | FT_UINT8, BASE_DEC, NULL, 0x0, |
3366 | 14 | NULL, HFILL |
3367 | 14 | } }, |
3368 | | |
3369 | 14 | { &hf_gvsp_gendc_container_header_flags_v2_2, |
3370 | 14 | { "Flags", "gvsp.gendc.container.header.flags", |
3371 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
3372 | 14 | NULL, HFILL |
3373 | 14 | } }, |
3374 | | |
3375 | 14 | { &hf_gvsp_gendc_container_header_flags_timestamp_ptp_v2_2, |
3376 | 14 | { "Timestamp PTP", "gvsp.gendc.container.header.flags.timestampptp", |
3377 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0001, |
3378 | 14 | NULL, HFILL |
3379 | 14 | } }, |
3380 | | |
3381 | 14 | { &hf_gvsp_gendc_container_header_flags_component_invalid_v2_2, |
3382 | 14 | { "Component Invalid", "gvsp.gendc.container.header.flags.componentinvalid", |
3383 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0002, |
3384 | 14 | NULL, HFILL |
3385 | 14 | } }, |
3386 | | |
3387 | 14 | { &hf_gvsp_gendc_container_header_flags_reserved_v2_2, |
3388 | 14 | { "Reserved", "gvsp.gendc.container.header.flags.reserved", |
3389 | 14 | FT_UINT16, BASE_HEX, NULL, 0xFFFC, |
3390 | 14 | NULL, HFILL |
3391 | 14 | } }, |
3392 | | |
3393 | 14 | { &hf_gvsp_gendc_container_header_id_v2_2, |
3394 | 14 | { "ID", "gvsp.gendc.container.header.id", |
3395 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3396 | 14 | NULL, HFILL |
3397 | 14 | } }, |
3398 | | |
3399 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_v2_2, |
3400 | 14 | { "Variable Fields", "gvsp.gendc.container.header.variablefields", |
3401 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
3402 | 14 | NULL, HFILL |
3403 | 14 | } }, |
3404 | | |
3405 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_data_size_v2_2, |
3406 | 14 | { "Data Size", "gvsp.gendc.container.header.variablefields.datasize", |
3407 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0001, |
3408 | 14 | NULL, HFILL |
3409 | 14 | } }, |
3410 | | |
3411 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_size_x_v2_2, |
3412 | 14 | { "Size X", "gvsp.gendc.container.header.variablefields.sizex", |
3413 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0002, |
3414 | 14 | NULL, HFILL |
3415 | 14 | } }, |
3416 | | |
3417 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_size_y_v2_2, |
3418 | 14 | { "Size Y", "gvsp.gendc.container.header.variablefields.sizey", |
3419 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0004, |
3420 | 14 | NULL, HFILL |
3421 | 14 | } }, |
3422 | | |
3423 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_region_offset_v2_2, |
3424 | 14 | { "Region Offset", "gvsp.gendc.container.header.variablefields.regionoffset", |
3425 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0008, |
3426 | 14 | NULL, HFILL |
3427 | 14 | } }, |
3428 | | |
3429 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_format_v2_2, |
3430 | 14 | { "Format", "gvsp.gendc.container.header.variablefields.format", |
3431 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0010, |
3432 | 14 | NULL, HFILL |
3433 | 14 | } }, |
3434 | | |
3435 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_timestamp_v2_2, |
3436 | 14 | { "Timestamp", "gvsp.gendc.container.header.variablefields.timestamp", |
3437 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0020, |
3438 | 14 | NULL, HFILL |
3439 | 14 | } }, |
3440 | | |
3441 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_component_count_v2_2, |
3442 | 14 | { "Component Count", "gvsp.gendc.container.header.variablefields.componentcount", |
3443 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0040, |
3444 | 14 | NULL, HFILL |
3445 | 14 | } }, |
3446 | | |
3447 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_component_invalid_v2_2, |
3448 | 14 | { "Component Invalid", "gvsp.gendc.container.header.variablefields.componentinvalid", |
3449 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0080, |
3450 | 14 | NULL, HFILL |
3451 | 14 | } }, |
3452 | | |
3453 | 14 | { &hf_gvsp_gendc_container_header_variable_fields_reserved_v2_2, |
3454 | 14 | { "Reserved", "gvsp.gendc.container.header.variablefields.reserved", |
3455 | 14 | FT_UINT16, BASE_HEX, NULL, 0xFF00, |
3456 | 14 | NULL, HFILL |
3457 | 14 | } }, |
3458 | | |
3459 | 14 | { &hf_gvsp_gendc_container_header_data_size_v2_2, |
3460 | 14 | { "Data Size", "gvsp.gendc.container.header.datasize", |
3461 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3462 | 14 | NULL, HFILL |
3463 | 14 | } }, |
3464 | | |
3465 | 14 | { &hf_gvsp_gendc_container_header_data_offset_v2_2, |
3466 | 14 | { "Data Offset", "gvsp.gendc.container.header.dataoffset", |
3467 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3468 | 14 | NULL, HFILL |
3469 | 14 | } }, |
3470 | | |
3471 | 14 | { &hf_gvsp_gendc_container_header_descriptor_size_v2_2, |
3472 | 14 | { "Descriptor Size", "gvsp.gendc.container.header.descriptorsize", |
3473 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3474 | 14 | NULL, HFILL |
3475 | 14 | } }, |
3476 | | |
3477 | 14 | { &hf_gvsp_gendc_container_header_component_count_v2_2, |
3478 | 14 | { "Component Count", "gvsp.gendc.container.header.componentcount", |
3479 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3480 | 14 | NULL, HFILL |
3481 | 14 | } }, |
3482 | | |
3483 | 14 | { &hf_gvsp_gendc_container_header_component_offset_v2_2, |
3484 | 14 | { "Component Offset", "gvsp.gendc.container.header.componentoffset", |
3485 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3486 | 14 | NULL, HFILL |
3487 | 14 | } }, |
3488 | | |
3489 | 14 | { &hf_gvsp_gendc_component_header_flags_v2_2, |
3490 | 14 | { "Flags", "gvsp.gendc.component.header.flags", |
3491 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
3492 | 14 | NULL, HFILL |
3493 | 14 | } }, |
3494 | | |
3495 | 14 | { &hf_gvsp_gendc_component_header_flags_invalid_v2_2, |
3496 | 14 | { "Invalid", "gvsp.gendc.container.header.flags.invalid", |
3497 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0001, |
3498 | 14 | NULL, HFILL |
3499 | 14 | } }, |
3500 | | |
3501 | 14 | { &hf_gvsp_gendc_component_header_flags_reserved_v2_2, |
3502 | 14 | { "Reserved", "gvsp.gendc.component.header.flags.reserved", |
3503 | 14 | FT_UINT16, BASE_HEX, NULL, 0xFFFE, |
3504 | 14 | NULL, HFILL |
3505 | 14 | } }, |
3506 | | |
3507 | 14 | { &hf_gvsp_gendc_component_header_group_id_v2_2, |
3508 | 14 | { "Group ID", "gvsp.gendc.component.header.groupid", |
3509 | 14 | FT_UINT16, BASE_HEX_DEC, NULL, 0, |
3510 | 14 | NULL, HFILL |
3511 | 14 | } }, |
3512 | | |
3513 | 14 | { &hf_gvsp_gendc_component_header_source_id_v2_2, |
3514 | 14 | { "Source ID", "gvsp.gendc.component.header.sourceid", |
3515 | 14 | FT_UINT16, BASE_HEX_DEC, NULL, 0, |
3516 | 14 | NULL, HFILL |
3517 | 14 | } }, |
3518 | | |
3519 | 14 | { &hf_gvsp_gendc_component_header_region_id_v2_2, |
3520 | 14 | { "Region ID", "gvsp.gendc.component.header.regionid", |
3521 | 14 | FT_UINT16, BASE_HEX_DEC, NULL, 0, |
3522 | 14 | NULL, HFILL |
3523 | 14 | } }, |
3524 | | |
3525 | 14 | { &hf_gvsp_gendc_component_header_type_id_v2_2, |
3526 | 14 | { "Type ID", "gvsp.gendc.component.header.typeid", |
3527 | 14 | FT_UINT64, BASE_HEX | BASE_VAL64_STRING, VALS64(gendc_component_typeid_values), 0x0, |
3528 | 14 | NULL, HFILL |
3529 | 14 | } }, |
3530 | | |
3531 | 14 | { &hf_gvsp_gendc_component_header_part_count_v2_2, |
3532 | 14 | { "Part Count", "gvsp.gendc.component.header.partcount", |
3533 | 14 | FT_UINT16, BASE_HEX_DEC, NULL, 0x0, |
3534 | 14 | NULL, HFILL |
3535 | 14 | } }, |
3536 | | |
3537 | 14 | { &hf_gvsp_gendc_component_header_part_offset_v2_2, |
3538 | 14 | { "Part Offset", "gvsp.gendc.container.header.partoffset", |
3539 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3540 | 14 | NULL, HFILL |
3541 | 14 | } }, |
3542 | | |
3543 | 14 | { &hf_gvsp_gendc_part_header_flags_xml_reserved1_v2_2, |
3544 | 14 | { "Reserved", "gvsp.gendc.part.header.flags.xml.reserved1", |
3545 | 14 | FT_UINT16, BASE_HEX, NULL, 0x00FF, |
3546 | 14 | NULL, HFILL |
3547 | 14 | } }, |
3548 | | |
3549 | 14 | { &hf_gvsp_gendc_part_header_flags_xml_zip_v2_2, |
3550 | 14 | { "ZIP", "gvsp.gendc.part.header.flags.xml.zip", |
3551 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0100, |
3552 | 14 | NULL, HFILL |
3553 | 14 | } }, |
3554 | | |
3555 | 14 | { &hf_gvsp_gendc_part_header_flags_xml_chunk_v2_2, |
3556 | 14 | { "Chunk", "gvsp.gendc.part.header.flags.xml.chunk", |
3557 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0200, |
3558 | 14 | NULL, HFILL |
3559 | 14 | } }, |
3560 | | |
3561 | 14 | { &hf_gvsp_gendc_part_header_flags_xml_reserved2_v2_2, |
3562 | 14 | { "Reserved", "gvsp.gendc.part.header.flags.xml.reserved2", |
3563 | 14 | FT_UINT16, BASE_HEX, NULL, 0xFC00, |
3564 | 14 | NULL, HFILL |
3565 | 14 | } }, |
3566 | | |
3567 | 14 | { &hf_gvsp_gendc_part_header_flags_v2_2, |
3568 | 14 | { "Flags", "gvsp.gendc.part.header.flags", |
3569 | 14 | FT_UINT16, BASE_HEX, NULL, 0x0, |
3570 | 14 | NULL, HFILL |
3571 | 14 | } }, |
3572 | | |
3573 | 14 | { &hf_gvsp_gendc_part_header_flow_offset_v2_2, |
3574 | 14 | { "Flow Offset", "gvsp.gendc.part.header.flowoffset", |
3575 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3576 | 14 | NULL, HFILL |
3577 | 14 | } }, |
3578 | | |
3579 | 14 | { &hf_gvsp_gendc_part_header_type_specific_info_v2_2, |
3580 | 14 | { "Type Specific Info", "gvsp.gendc.part.header.typespecificinfo", |
3581 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3582 | 14 | NULL, HFILL |
3583 | 14 | } }, |
3584 | | |
3585 | 14 | { &hf_gvsp_gendc_part_header_1D_size_v2_2, |
3586 | 14 | { "Size (1D Data)", "gvsp.gendc.part.header.1d.size", |
3587 | 14 | FT_UINT64, BASE_HEX_DEC, NULL, 0x0, |
3588 | 14 | NULL, HFILL |
3589 | 14 | } }, |
3590 | | |
3591 | 14 | { &hf_gvsp_gendc_part_header_1D_padding_v2_2, |
3592 | 14 | { "Padding (1D Data)", "gvsp.gendc.part.header.1d.padding", |
3593 | 14 | FT_UINT32, BASE_HEX_DEC, NULL, 0x0, |
3594 | 14 | NULL, HFILL |
3595 | 14 | } }, |
3596 | 14 | }; |
3597 | | |
3598 | 14 | static int *ett[] = { |
3599 | 14 | &ett_gvsp, |
3600 | 14 | &ett_gvsp_flags, |
3601 | 14 | &ett_gvsp_header, |
3602 | 14 | &ett_gvsp_payload, |
3603 | 14 | &ett_gvsp_trailer, |
3604 | 14 | &ett_gvsp_pixelformat, |
3605 | 14 | &ett_gvsp_fieldinfo, |
3606 | 14 | &ett_gvsp_cs, |
3607 | 14 | &ett_gvsp_sc_zone_direction, |
3608 | 14 | &ett_gvsp_zoneinfo, |
3609 | 14 | &ett_gvsp_zoneinfo_multipart, |
3610 | 14 | &ett_gvsp_partinfo_leader, |
3611 | 14 | &ett_gvsp_partinfo_trailer, |
3612 | 14 | &ett_gvsp_gendc_leader_flags, |
3613 | 14 | &ett_gvsp_gendc_payload_data_flags, |
3614 | 14 | &ett_gvsp_gendc_payload_flow_flags, |
3615 | 14 | &ett_gvsp_gendc_container_descriptor, |
3616 | 14 | &ett_gvsp_gendc_container_header_flags, |
3617 | 14 | &ett_gvsp_gendc_container_header_variable_fields, |
3618 | 14 | &ett_gvsp_gendc_container_header_component_offsets, |
3619 | 14 | &ett_gvsp_gendc_component_header, |
3620 | 14 | &ett_gvsp_gendc_component_header_flags, |
3621 | 14 | &ett_gvsp_gendc_part_offsets, |
3622 | 14 | &ett_gvsp_gendc_part_header, |
3623 | 14 | &ett_gvsp_gendc_part_header_flags |
3624 | 14 | }; |
3625 | | |
3626 | 14 | proto_gvsp = proto_register_protocol("GigE Vision Streaming Protocol", "GVSP", "gvsp"); |
3627 | | |
3628 | 14 | gvsp_handle = register_dissector("gvsp", dissect_gvsp, proto_gvsp); |
3629 | | |
3630 | 14 | proto_register_field_array(proto_gvsp, hfgvsp, array_length(hfgvsp)); |
3631 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
3632 | | |
3633 | 14 | gvsp_module = prefs_register_protocol(proto_gvsp, NULL); |
3634 | 14 | prefs_register_obsolete_preference(gvsp_module, "enable_heuristic"); |
3635 | 14 | } |
3636 | | |
3637 | | void proto_reg_handoff_gvsp(void) |
3638 | 14 | { |
3639 | 14 | dissector_add_for_decode_as_with_preference("udp.port", gvsp_handle); |
3640 | 14 | heur_dissector_add("udp", dissect_gvsp_heur, "GigE Vision over UDP", "gvsp_udp", proto_gvsp, HEURISTIC_DISABLE); |
3641 | 14 | } |
3642 | | |
3643 | | /* |
3644 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
3645 | | * |
3646 | | * Local variables: |
3647 | | * c-basic-offset: 4 |
3648 | | * tab-width: 8 |
3649 | | * indent-tabs-mode: nil |
3650 | | * End: |
3651 | | * |
3652 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
3653 | | * :indentSize=4:tabSize=8:noTabs=true: |
3654 | | */ |