Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-ptpip.h
1/* packet-ptpip.h
2 * Routines for PTP/IP (Picture Transfer Protocol) packet dissection
3 * 0xBismarck 2013
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <[email protected]>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
21/* PTP Definitions */
22/* String Names of packet types [3] & [4]
23 * Opcode 0x1000 - 0x1025 defined in Table 22 of [2]
24 * Remainder of Opcodes from [4]. Enums reformatted from [4] ptp.h
25 */
26typedef enum {
27 /* PTP v1.0 operation codes */
28 PTP_OC_Undefined = 0x1000,
29 PTP_OC_GetDeviceInfo = 0x1001,
30 PTP_OC_OpenSession = 0x1002,
31 PTP_OC_CloseSession = 0x1003,
32 PTP_OC_GetStorageIDs = 0x1004,
33 PTP_OC_GetStorageInfo = 0x1005,
34 PTP_OC_GetNumObjects = 0x1006,
35 PTP_OC_GetObjectHandles = 0x1007,
36 PTP_OC_GetObjectInfo = 0x1008,
37 PTP_OC_GetObject = 0x1009,
38 PTP_OC_GetThumb = 0x100A,
39 PTP_OC_DeleteObject = 0x100B,
40 PTP_OC_SendObjectInfo = 0x100C,
41 PTP_OC_SendObject = 0x100D,
42 PTP_OC_InitiateCapture = 0x100E,
43 PTP_OC_FormatStore = 0x100F,
44 PTP_OC_ResetDevice = 0x1010,
45 PTP_OC_SelfTest = 0x1011,
46 PTP_OC_SetObjectProtection = 0x1012,
47 PTP_OC_PowerDown = 0x1013,
48 PTP_OC_GetDevicePropDesc = 0x1014,
49 PTP_OC_GetDevicePropValue = 0x1015,
50 PTP_OC_SetDevicePropValue = 0x1016,
51 PTP_OC_ResetDevicePropValue = 0x1017,
52 PTP_OC_TerminateOpenCapture = 0x1018,
53 PTP_OC_MoveObject = 0x1019,
54 PTP_OC_CopyObject = 0x101A,
55 PTP_OC_GetPartialObject = 0x101B,
56 PTP_OC_InitiateOpenCapture = 0x101C,
57 /* PTP v1.1 operation codes */
58 PTP_OC_StartEnumHandles = 0x101D,
59 PTP_OC_EnumHandles = 0x101E,
60 PTP_OC_StopEnumHandles = 0x101F,
61 PTP_OC_GetVendorExtensionMaps = 0x1020,
62 PTP_OC_GetVendorDeviceInfo = 0x1021,
63 PTP_OC_GetResizedImageObject = 0x1022,
64 PTP_OC_GetFilesystemManifest = 0x1023,
65 PTP_OC_GetStreamInfo = 0x1024,
66 PTP_OC_GetStream = 0x1025,
67
68 /* Eastman Kodak extension Operation Codes */
69 PTP_OC_EK_GetSerial = 0x9003,
70 PTP_OC_EK_SetSerial = 0x9004,
71 PTP_OC_EK_SendFileObjectInfo = 0x9005,
72 PTP_OC_EK_SendFileObject = 0x9006,
73 PTP_OC_EK_SetText = 0x9008,
74
75 /* Canon extension Operation Codes */
76 PTP_OC_CANON_GetPartialObjectInfo = 0x9001,
77 /* 9002 - sends 2 uint32, nothing back */
78 PTP_OC_CANON_SetObjectArchive = 0x9002,
79 PTP_OC_CANON_KeepDeviceOn = 0x9003,
80 PTP_OC_CANON_LockDeviceUI = 0x9004,
81 PTP_OC_CANON_UnlockDeviceUI = 0x9005,
82 PTP_OC_CANON_GetObjectHandleByName = 0x9006,
83 /* no 9007 observed yet */
84 PTP_OC_CANON_InitiateReleaseControl = 0x9008,
85 PTP_OC_CANON_TerminateReleaseControl = 0x9009,
86 PTP_OC_CANON_TerminatePlaybackMode = 0x900A,
87 PTP_OC_CANON_ViewfinderOn = 0x900B,
88 PTP_OC_CANON_ViewfinderOff = 0x900C,
89 PTP_OC_CANON_DoAeAfAwb = 0x900D,
90
91 /* 900e - send nothing, gets 5 uint16t in 32bit entities back in 20byte datablob */
92 PTP_OC_CANON_GetCustomizeSpec = 0x900E,
93 PTP_OC_CANON_GetCustomizeItemInfo = 0x900F,
94 PTP_OC_CANON_GetCustomizeData = 0x9010,
95 PTP_OC_CANON_SetCustomizeData = 0x9011,
96 PTP_OC_CANON_GetCaptureStatus = 0x9012,
97 PTP_OC_CANON_CheckEvent = 0x9013,
98 PTP_OC_CANON_FocusLock = 0x9014,
99 PTP_OC_CANON_FocusUnlock = 0x9015,
100 PTP_OC_CANON_GetLocalReleaseParam = 0x9016,
101 PTP_OC_CANON_SetLocalReleaseParam = 0x9017,
102 PTP_OC_CANON_AskAboutPcEvf = 0x9018,
103 PTP_OC_CANON_SendPartialObject = 0x9019,
104 PTP_OC_CANON_InitiateCaptureInMemory = 0x901A,
105 PTP_OC_CANON_GetPartialObjectEx = 0x901B,
106 PTP_OC_CANON_SetObjectTime = 0x901C,
107 PTP_OC_CANON_GetViewfinderImage = 0x901D,
108 PTP_OC_CANON_GetObjectAttributes = 0x901E,
109 PTP_OC_CANON_ChangeUSBProtocol = 0x901F,
110 PTP_OC_CANON_GetChanges = 0x9020,
111 PTP_OC_CANON_GetObjectInfoEx = 0x9021,
112 PTP_OC_CANON_InitiateDirectTransfer = 0x9022,
113 PTP_OC_CANON_TerminateDirectTransfer = 0x9023,
114 PTP_OC_CANON_SendObjectInfoByPath = 0x9024,
115 PTP_OC_CANON_SendObjectByPath = 0x9025,
116 PTP_OC_CANON_InitiateDirectTransferEx = 0x9026,
117 PTP_OC_CANON_GetAncillaryObjectHandles = 0x9027,
118 PTP_OC_CANON_GetTreeInfo = 0x9028,
119 PTP_OC_CANON_GetTreeSize = 0x9029,
120 PTP_OC_CANON_NotifyProgress = 0x902A,
121 PTP_OC_CANON_NotifyCancelAccepted = 0x902B,
122 /* 902c: no parms, read 3 uint32 in data, no response parms */
123 PTP_OC_CANON_902C = 0x902C,
124 PTP_OC_CANON_GetDirectory = 0x902D,
125 PTP_OC_CANON_SetPairingInfo = 0x9030,
126 PTP_OC_CANON_GetPairingInfo = 0x9031,
127 PTP_OC_CANON_DeletePairingInfo = 0x9032,
128 PTP_OC_CANON_GetMACAddress = 0x9033,
129 /* 9034: 1 param, no parms returned */
130 PTP_OC_CANON_SetDisplayMonitor = 0x9034,
131 PTP_OC_CANON_PairingComplete = 0x9035,
132 PTP_OC_CANON_GetWirelessMAXChannel = 0x9036,
133 /* 9101: no args, 8 byte data (01 00 00 00 00 00 00 00), no resp data. */
134 PTP_OC_CANON_EOS_GetStorageIDs = 0x9101,
135 /* 9102: 1 arg (0)
136 * = 0x28 bytes of data:
137 00000000: 34 00 00 00 02 00 02 91 0a 00 00 00 04 00 03 00
138 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
139 00000020: 00 00 ff ff ff ff 03 43 00 46 00 00 00 03 41 00
140 00000030: 3a 00 00 00
141 * no resp args
142 */
143 PTP_OC_CANON_EOS_GetStorageInfo = 0x9102,
144 PTP_OC_CANON_EOS_GetObjectInfo = 0x9103,
145 PTP_OC_CANON_EOS_GetObject = 0x9104,
146 PTP_OC_CANON_EOS_DeleteObject = 0x9105,
147 PTP_OC_CANON_EOS_FormatStore = 0x9106,
148 PTP_OC_CANON_EOS_GetPartialObject = 0x9107,
149 PTP_OC_CANON_EOS_GetDeviceInfoEx = 0x9108,
150
151 /* sample1:
152 * 3 cmdargs: 1, = 0xffffffff,00 00 10 00;
153 * data:
154 00000000: 48 00 00 00 02 00 09 91 12 00 00 00 01 00 00 00
155 00000010: 38 00 00 00 00 00 00 30 01 00 00 00 01 30 00 00
156 00000020: 01 00 00 00 10 00 00 00 00 00 00 00 00 00 00 20
157 00000030: 00 00 00 30 44 43 49 4d 00 00 00 00 00 00 00 00 DCIM
158 00000040: 00 00 00 00 cc c3 01 46
159 * 2 respargs: = 0x0, = 0x3c
160 *
161 * sample2:
162 *
163 00000000: 18 00 00 00 01 00 09 91 15 00 00 00 01 00 00 00
164 00000010: 00 00 00 30 00 00 10 00
165
166 00000000: 48 00 00 00 02 00 09 91 15 00 00 00 01 00 00 00
167 00000010: 38 00 00 00 00 00 9c 33 01 00 00 00 01 30 00 00
168 00000020: 01 00 00 00 10 00 00 00 00 00 00 00 00 00 00 30
169 00000030: 00 00 9c 33 32 33 31 43 41 4e 4f 4e 00 00 00 00 231CANON
170 00000040: 00 00 00 00 cc c3 01 46
171
172 */
173 PTP_OC_CANON_EOS_GetObjectInfoEx = 0x9109,
174 PTP_OC_CANON_EOS_GetThumbEx = 0x910A,
175 PTP_OC_CANON_EOS_SendPartialObject = 0x910B,
176 PTP_OC_CANON_EOS_SetObjectAttributes = 0x910C,
177 PTP_OC_CANON_EOS_GetObjectTime = 0x910D,
178 PTP_OC_CANON_EOS_SetObjectTime = 0x910E,
179
180 /* 910f: no args, no data, 1 response arg (0). */
181 PTP_OC_CANON_EOS_RemoteRelease = 0x910F,
182 /* Marcus: looks more like "Set DeviceProperty" in the trace.
183 *
184 * no cmd args
185 * data phase ( = 0xc, = 0xd11c, = 0x1)
186 * no resp args
187 */
188 PTP_OC_CANON_EOS_SetDevicePropValueEx = 0x9110,
189 PTP_OC_CANON_EOS_GetRemoteMode = 0x9113,
190 /* 9114: 1 arg ( = 0x1), no data, no resp data. */
191 PTP_OC_CANON_EOS_SetRemoteMode = 0x9114,
192 /* 9115: 1 arg ( = 0x1), no data, no resp data. */
193 PTP_OC_CANON_EOS_SetEventMode = 0x9115,
194 /* 9116: no args, data phase, no resp data. */
195 PTP_OC_CANON_EOS_GetEvent = 0x9116,
196 PTP_OC_CANON_EOS_TransferComplete = 0x9117,
197 PTP_OC_CANON_EOS_CancelTransfer = 0x9118,
198 PTP_OC_CANON_EOS_ResetTransfer = 0x9119,
199
200 /* 911a: 3 args ( = 0xfffffff7, = 0x00001000, = 0x00000001), no data, no resp data. */
201 /* 911a: 3 args ( = 0x001dfc60, = 0x00001000, = 0x00000001), no data, no resp data. */
202 PTP_OC_CANON_EOS_PCHDDCapacity = 0x911A,
203
204 /* 911b: no cmd args, no data, no resp args */
205 PTP_OC_CANON_EOS_SetUILock = 0x911B,
206 /* 911c: no cmd args, no data, no resp args */
207 PTP_OC_CANON_EOS_ResetUILock = 0x911C,
208 PTP_OC_CANON_EOS_KeepDeviceOn = 0x911D,
209 PTP_OC_CANON_EOS_SetNullPacketMode = 0x911E,
210 PTP_OC_CANON_EOS_UpdateFirmware = 0x911F,
211 PTP_OC_CANON_EOS_TransferCompleteDT = 0x9120,
212 PTP_OC_CANON_EOS_CancelTransferDT = 0x9121,
213 PTP_OC_CANON_EOS_SetWftProfile = 0x9122,
214 PTP_OC_CANON_EOS_GetWftProfile = 0x9123,
215 PTP_OC_CANON_EOS_SetProfileToWft = 0x9124,
216 PTP_OC_CANON_EOS_BulbStart = 0x9125,
217 PTP_OC_CANON_EOS_BulbEnd = 0x9126,
218 PTP_OC_CANON_EOS_RequestDevicePropValue = 0x9127,
219
220 /* = 0x9128 args (= 0x1/= 0x2, = 0x0), no data, no resp args */
221 PTP_OC_CANON_EOS_RemoteReleaseOn = 0x9128,
222 /* = 0x9129 args (= 0x1/= 0x2), no data, no resp args */
223 PTP_OC_CANON_EOS_RemoteReleaseOff = 0x9129,
224 PTP_OC_CANON_EOS_InitiateViewfinder = 0x9151,
225 PTP_OC_CANON_EOS_TerminateViewfinder = 0x9152,
226 PTP_OC_CANON_EOS_GetViewFinderData = 0x9153,
227 PTP_OC_CANON_EOS_DoAf = 0x9154,
228 PTP_OC_CANON_EOS_DriveLens = 0x9155,
229 PTP_OC_CANON_EOS_DepthOfFieldPreview = 0x9156,
230 PTP_OC_CANON_EOS_ClickWB = 0x9157,
231 PTP_OC_CANON_EOS_Zoom = 0x9158,
232 PTP_OC_CANON_EOS_ZoomPosition = 0x9159,
233 PTP_OC_CANON_EOS_SetLiveAfFrame = 0x915a,
234 PTP_OC_CANON_EOS_AfCancel = 0x9160,
235 PTP_OC_CANON_EOS_FAPIMessageTX = 0x91FE,
236 PTP_OC_CANON_EOS_FAPIMessageRX = 0x91FF,
237
238 /* Nikon extension Operation Codes */
239 PTP_OC_NIKON_GetProfileAllData = 0x9006,
240 PTP_OC_NIKON_SendProfileData = 0x9007,
241 PTP_OC_NIKON_DeleteProfile = 0x9008,
242 PTP_OC_NIKON_SetProfileData = 0x9009,
243 PTP_OC_NIKON_AdvancedTransfer = 0x9010,
244 PTP_OC_NIKON_GetFileInfoInBlock = 0x9011,
245 PTP_OC_NIKON_Capture = 0x90C0, /* 1 param, no data */
246 PTP_OC_NIKON_AfDrive = 0x90C1, /* no params, no data */
247 PTP_OC_NIKON_SetControlMode = 0x90C2, /* 1 param, no data */
248 PTP_OC_NIKON_DelImageSDRAM = 0x90C3, /* no params, no data */
249 PTP_OC_NIKON_GetLargeThumb = 0x90C4,
250 PTP_OC_NIKON_CurveDownload = 0x90C5, /* 1 param, data in */
251 PTP_OC_NIKON_CurveUpload = 0x90C6, /* 1 param, data out */
252 PTP_OC_NIKON_CheckEvent = 0x90C7, /* no params, data in */
253 PTP_OC_NIKON_DeviceReady = 0x90C8, /* no params, no data */
254 PTP_OC_NIKON_SetPreWBData = 0x90C9, /* 3 params, data out */
255 PTP_OC_NIKON_GetVendorPropCodes = 0x90CA, /* 0 params, data in */
256 PTP_OC_NIKON_AfCaptureSDRAM = 0x90CB, /* no params, no data */
257 PTP_OC_NIKON_GetPictCtrlData = 0x90CC,
258 PTP_OC_NIKON_SetPictCtrlData = 0x90CD,
259 PTP_OC_NIKON_DelCstPicCtrl = 0x90CE,
260 PTP_OC_NIKON_GetPicCtrlCapability = 0x90CF,
261
262 /* Nikon Liveview stuff */
263 PTP_OC_NIKON_GetPreviewImg = 0x9200,
264 PTP_OC_NIKON_StartLiveView = 0x9201,
265 PTP_OC_NIKON_EndLiveView = 0x9202,
266 PTP_OC_NIKON_GetLiveViewImg = 0x9203,
267 PTP_OC_NIKON_MfDrive = 0x9204,
268 PTP_OC_NIKON_ChangeAfArea = 0x9205,
269 PTP_OC_NIKON_AfDriveCancel = 0x9206,
270 PTP_OC_NIKON_GetDevicePTPIPInfo = 0x90E0,
271
272 /* Casio EX-F1 (from http://code.google.com/p/exf1ctrl/ ) */
273 PTP_OC_CASIO_STILL_START = 0x9001,
274 PTP_OC_CASIO_STILL_STOP = 0x9002,
275 PTP_OC_CASIO_FOCUS = 0x9007,
276 PTP_OC_CASIO_CF_PRESS = 0x9009,
277 PTP_OC_CASIO_CF_RELEASE = 0x900A,
278 PTP_OC_CASIO_GET_OBJECT_INFO = 0x900C,
279 PTP_OC_CASIO_SHUTTER = 0x9024,
280 PTP_OC_CASIO_GET_STILL_HANDLES = 0x9027,
281 PTP_OC_CASIO_STILL_RESET = 0x9028,
282 PTP_OC_CASIO_HALF_PRESS = 0x9029,
283 PTP_OC_CASIO_HALF_RELEASE = 0x902A,
284 PTP_OC_CASIO_CS_PRESS = 0x902B,
285 PTP_OC_CASIO_CS_RELEASE = 0x902C,
286 PTP_OC_CASIO_ZOOM = 0x902D,
287 PTP_OC_CASIO_CZ_PRESS = 0x902E,
288 PTP_OC_CASIO_CZ_RELEASE = 0x902F,
289 PTP_OC_CASIO_MOVIE_START = 0x9041,
290 PTP_OC_CASIO_MOVIE_STOP = 0x9042,
291 PTP_OC_CASIO_MOVIE_PRESS = 0x9043,
292 PTP_OC_CASIO_MOVIE_RELEASE = 0x9044,
293 PTP_OC_CASIO_GET_MOVIE_HANDLES = 0x9045,
294 PTP_OC_CASIO_MOVIE_RESET = 0x9046,
295 PTP_OC_CASIO_GET_OBJECT = 0x9025,
296 PTP_OC_CASIO_GET_THUMBNAIL = 0x9026,
297
298 /* Microsoft / MTP extension codes */
299 PTP_OC_MTP_GetObjectPropsSupported = 0x9801,
300 PTP_OC_MTP_GetObjectPropDesc = 0x9802,
301 PTP_OC_MTP_GetObjectPropValue = 0x9803,
302 PTP_OC_MTP_SetObjectPropValue = 0x9804,
303 PTP_OC_MTP_GetObjPropList = 0x9805,
304 PTP_OC_MTP_SetObjPropList = 0x9806,
305 PTP_OC_MTP_GetInterdependendPropdesc = 0x9807,
306 PTP_OC_MTP_SendObjectPropList = 0x9808,
307 PTP_OC_MTP_GetObjectReferences = 0x9810,
308 PTP_OC_MTP_SetObjectReferences = 0x9811,
309 PTP_OC_MTP_UpdateDeviceFirmware = 0x9812,
310 PTP_OC_MTP_Skip = 0x9820,
311
312 /*
313 * Windows Media Digital Rights Management for Portable Devices
314 * Extension Codes (microsoft.com/WMDRMPD: 10.1)
315 */
316 PTP_OC_MTP_WMDRMPD_GetSecureTimeChallenge = 0x9101,
317 PTP_OC_MTP_WMDRMPD_GetSecureTimeResponse = 0x9102,
318 PTP_OC_MTP_WMDRMPD_SetLicenseResponse = 0x9103,
319 PTP_OC_MTP_WMDRMPD_GetSyncList = 0x9104,
320 PTP_OC_MTP_WMDRMPD_SendMeterChallengeQuery = 0x9105,
321 PTP_OC_MTP_WMDRMPD_GetMeterChallenge = 0x9106,
322 PTP_OC_MTP_WMDRMPD_SetMeterResponse = 0x9107,
323 PTP_OC_MTP_WMDRMPD_CleanDataStore = 0x9108,
324 PTP_OC_MTP_WMDRMPD_GetLicenseState = 0x9109,
325 PTP_OC_MTP_WMDRMPD_SendWMDRMPDCommand = 0x910A,
326 PTP_OC_MTP_WMDRMPD_SendWMDRMPDRequest = 0x910B,
327
328 /*
329 * Windows Media Digital Rights Management for Portable Devices
330 * Extension Codes (microsoft.com/WMDRMPD: 10.1)
331 * Below are operations that have no public documented identifier
332 * associated with them "Vendor-defined Command Code"
333 */
334 PTP_OC_MTP_WMDRMPD_SendWMDRMPDAppRequest = 0x9212,
335 PTP_OC_MTP_WMDRMPD_GetWMDRMPDAppResponse = 0x9213,
336 PTP_OC_MTP_WMDRMPD_EnableTrustedFilesOperations = 0x9214,
337 PTP_OC_MTP_WMDRMPD_DisableTrustedFilesOperations = 0x9215,
338 PTP_OC_MTP_WMDRMPD_EndTrustedAppSession = 0x9216,
339 /* ^^^ guess ^^^ */
340
341 /*
342 * Microsoft Advanced Audio/Video Transfer
343 * Extensions (microsoft.com/AAVT: 1.0)
344 */
345 PTP_OC_MTP_AAVT_OpenMediaSession = 0x9170,
346 PTP_OC_MTP_AAVT_CloseMediaSession = 0x9171,
347 PTP_OC_MTP_AAVT_GetNextDataBlock = 0x9172,
348 PTP_OC_MTP_AAVT_SetCurrentTimePosition = 0x9173,
349
350 /*
351 * Windows Media Digital Rights Management for Network Devices
352 * Extensions (microsoft.com/WMDRMND: 1.0) MTP/IP?
353 */
354 PTP_OC_MTP_WMDRMND_SendRegistrationRequest = 0x9180,
355 PTP_OC_MTP_WMDRMND_GetRegistrationResponse = 0x9181,
356 PTP_OC_MTP_WMDRMND_GetProximityChallenge = 0x9182,
357 PTP_OC_MTP_WMDRMND_SendProximityResponse = 0x9183,
358 PTP_OC_MTP_WMDRMND_SendWMDRMNDLicenseRequest = 0x9184,
359 PTP_OC_MTP_WMDRMND_GetWMDRMNDLicenseResponse = 0x9185,
360
361 /*
362 * Windows Media Player Portiable Devices
363 * Extension Codes (microsoft.com/WMPPD: 11.1)
364 */
365 PTP_OC_MTP_WMPPD_ReportAddedDeletedItems = 0x9201,
366 PTP_OC_MTP_WMPPD_ReportAcquiredItems = 0x9202,
367 PTP_OC_MTP_WMPPD_PlaylistObjectPref = 0x9203,
368
369 /*
370 * Undocumented Zune Operation Codes
371 * maybe related to WMPPD extension set?
372 */
373 PTP_OC_MTP_ZUNE_GETUNDEFINED001 = 0x9204,
374
375 /* WiFi Provisioning MTP Extension Codes (microsoft.com/WPDWCN: 1.0) */
376 PTP_OC_MTP_WPDWCN_ProcessWFCObject = 0x9122,
377
378 /* Olympus E series commands */
379 PTP_OC_OLYMPUS_Capture = 0x9101,
380 PTP_OC_OLYMPUS_SelfCleaning = 0x9103,
381 PTP_OC_OLYMPUS_SetRGBGain = 0x9106,
382 PTP_OC_OLYMPUS_SetPresetMode = 0x9107,
383 PTP_OC_OLYMPUS_SetWBBiasAll = 0x9108,
384 PTP_OC_OLYMPUS_GetCameraControlMode = 0x910a,
385 PTP_OC_OLYMPUS_SetCameraControlMode = 0x910b,
386 PTP_OC_OLYMPUS_SetWBRGBGain = 0x910c,
387 PTP_OC_OLYMPUS_GetDeviceInfo = 0x9301,
388 PTP_OC_OLYMPUS_Init1 = 0x9302,
389 PTP_OC_OLYMPUS_SetDateTime = 0x9402,
390 PTP_OC_OLYMPUS_GetDateTime = 0x9482,
391 PTP_OC_OLYMPUS_SetCameraID = 0x9501,
392 PTP_OC_OLYMPUS_GetCameraID = 0x9581,
393
394 /* Proprietary vendor extension operations mask */
395 PTP_OC_EXTENSION_MASK = 0xF000,
396 PTP_OC_EXTENSION = 0x9000
397} ptp_opcodes;
398
399/*
400 * String Names of packet types [3] & [4]
401 * Response codes 0x2000 - 0x2023 defined in Table 27 of [2]
402 * Remainder of Response codes from [4]. Enums reformatted from [4] ptp.h */
403/* Response Codes */
404typedef enum {
405 /* PTP v1.0 response codes */
406 PTP_RC_Undefined = 0x2000,
407 PTP_RC_OK = 0x2001,
408 PTP_RC_GeneralError = 0x2002,
409 PTP_RC_SessionNotOpen = 0x2003,
410 PTP_RC_InvalidTransactionID = 0x2004,
411 PTP_RC_OperationNotSupported = 0x2005,
412 PTP_RC_ParameterNotSupported = 0x2006,
413 PTP_RC_IncompleteTransfer = 0x2007,
414 PTP_RC_InvalidStorageId = 0x2008,
415 PTP_RC_InvalidObjectHandle = 0x2009,
416 PTP_RC_DevicePropNotSupported = 0x200A,
417 PTP_RC_InvalidObjectFormatCode = 0x200B,
418 PTP_RC_StoreFull = 0x200C,
419 PTP_RC_ObjectWriteProtected = 0x200D,
420 PTP_RC_StoreReadOnly = 0x200E,
421 PTP_RC_AccessDenied = 0x200F,
422 PTP_RC_NoThumbnailPresent = 0x2010,
423 PTP_RC_SelfTestFailed = 0x2011,
424 PTP_RC_PartialDeletion = 0x2012,
425 PTP_RC_StoreNotAvailable = 0x2013,
426 PTP_RC_SpecificationByFormatUnsupported = 0x2014,
427 PTP_RC_NoValidObjectInfo = 0x2015,
428 PTP_RC_InvalidCodeFormat = 0x2016,
429 PTP_RC_UnknownVendorCode = 0x2017,
430 PTP_RC_CaptureAlreadyTerminated = 0x2018,
431 PTP_RC_DeviceBusy = 0x2019,
432 PTP_RC_InvalidParentObject = 0x201A,
433 PTP_RC_InvalidDevicePropFormat = 0x201B,
434 PTP_RC_InvalidDevicePropValue = 0x201C,
435 PTP_RC_InvalidParameter = 0x201D,
436 PTP_RC_SessionAlreadyOpened = 0x201E,
437 PTP_RC_TransactionCanceled = 0x201F,
438 PTP_RC_SpecificationOfDestinationUnsupported = 0x2020,
439 /* PTP v1.1 response codes */
440 PTP_RC_InvalidEnumHandle = 0x2021,
441 PTP_RC_NoStreamEnabled = 0x2022,
442 PTP_RC_InvalidDataSet = 0x2023,
443
444 /* Eastman Kodak extension Response Codes */
445 PTP_RC_EK_FilenameRequired = 0xA001,
446 PTP_RC_EK_FilenameConflicts = 0xA002,
447 PTP_RC_EK_FilenameInvalid = 0xA003,
448
449 /* Nikon specific response codes */
450 PTP_RC_NIKON_HardwareError = 0xA001,
451 PTP_RC_NIKON_OutOfFocus = 0xA002,
452 PTP_RC_NIKON_ChangeCameraModeFailed = 0xA003,
453 PTP_RC_NIKON_InvalidStatus = 0xA004,
454 PTP_RC_NIKON_SetPropertyNotSupported = 0xA005,
455 PTP_RC_NIKON_WbResetError = 0xA006,
456 PTP_RC_NIKON_DustReferenceError = 0xA007,
457 PTP_RC_NIKON_ShutterSpeedBulb = 0xA008,
458 PTP_RC_NIKON_MirrorUpSequence = 0xA009,
459 PTP_RC_NIKON_CameraModeNotAdjustFNumber = 0xA00A,
460 PTP_RC_NIKON_NotLiveView = 0xA00B,
461 PTP_RC_NIKON_MfDriveStepEnd = 0xA00C,
462 PTP_RC_NIKON_MfDriveStepInsufficiency = 0xA00E,
463 PTP_RC_NIKON_AdvancedTransferCancel = 0xA022,
464
465 /* Canon specific response codes */
466 PTP_RC_CANON_UNKNOWN_COMMAND = 0xA001,
467 PTP_RC_CANON_OPERATION_REFUSED = 0xA005,
468 PTP_RC_CANON_LENS_COVER = 0xA006,
469 PTP_RC_CANON_BATTERY_LOW = 0xA101,
470 PTP_RC_CANON_NOT_READY = 0xA102,
471 PTP_RC_CANON_A009 = 0xA009,
472 /* Microsoft/MTP specific codes */
473 PTP_RC_MTP_Undefined = 0xA800,
474 PTP_RC_MTP_Invalid_ObjectPropCode = 0xA801,
475 PTP_RC_MTP_Invalid_ObjectProp_Format = 0xA802,
476 PTP_RC_MTP_Invalid_ObjectProp_Value = 0xA803,
477 PTP_RC_MTP_Invalid_ObjectReference = 0xA804,
478 PTP_RC_MTP_Invalid_Dataset = 0xA806,
479 PTP_RC_MTP_Specification_By_Group_Unsupported = 0xA807,
480 PTP_RC_MTP_Specification_By_Depth_Unsupported = 0xA808,
481 PTP_RC_MTP_Object_Too_Large = 0xA809,
482 PTP_RC_MTP_ObjectProp_Not_Supported = 0xA80A,
483
484 /* Microsoft Advanced Audio/Video Transfer response codes
485 (microsoft.com/AAVT 1.0) */
486 PTP_RC_MTP_Invalid_Media_Session_ID = 0xA170,
487 PTP_RC_MTP_Media_Session_Limit_Reached = 0xA171,
488 PTP_RC_MTP_No_More_Data = 0xA172,
489
490 /* WiFi Provisioning MTP Extension Error Codes (microsoft.com/WPDWCN: 1.0) */
491 PTP_RC_MTP_Invalid_WFC_Syntax = 0xA121,
492 PTP_RC_MTP_WFC_Version_Not_Supported = 0xA122
493
494} ptp_respcodes;
495
496/* function prototypes */
497void dissect_ptp_opCode_openSession(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint16_t *offset);
498void dissect_ptp_transactionID (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint16_t *offset);
499
Definition packet_info.h:43
Definition proto.h:901
Definition tvbuff-int.h:35