diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
commit | e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch) | |
tree | 68cb5ef9081156392f1dd62a00c6ccc1451b93df /epan/dissectors/pidl/mapi | |
parent | Initial commit. (diff) | |
download | wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip |
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/pidl/mapi')
-rw-r--r-- | epan/dissectors/pidl/mapi/mapi.cnf | 1351 | ||||
-rw-r--r-- | epan/dissectors/pidl/mapi/mapi.idl | 4049 |
2 files changed, 5400 insertions, 0 deletions
diff --git a/epan/dissectors/pidl/mapi/mapi.cnf b/epan/dissectors/pidl/mapi/mapi.cnf new file mode 100644 index 00000000..c817bbca --- /dev/null +++ b/epan/dissectors/pidl/mapi/mapi.cnf @@ -0,0 +1,1351 @@ +# Conformance file for mapi + +HF_FIELD hf_mapi_decrypted_data "Decrypted data" "mapi.decrypted.data" FT_BYTES BASE_NONE NULL 0 NULL HFILL +HF_FIELD hf_mapi_LogonId "LogonId" "mapi.rop.LogonId" FT_UINT8 BASE_DEC NULL 0 NULL HFILL +HF_FIELD hf_mapi_ResponseHandleIndex "ResponseHandleIndex" "mapi.rop.ResponseHandleIndex" FT_UINT8 BASE_DEC NULL 0 NULL HFILL +HF_FIELD hf_mapi_InputHandleIndex "InputHandleIndex" "mapi.rop.InputHandleIndex" FT_UINT8 BASE_DEC NULL 0 NULL HFILL +HF_FIELD hf_mapi_OutputHandleIndex "OutputHandleIndex" "mapi.rop.OutputHandleIndex" FT_UINT8 BASE_DEC NULL 0 NULL HFILL +HF_FIELD hf_mapi_RgbInSize "RgbInSize" "mapi.RgbIn.RgbInSize" FT_UINT32 BASE_DEC NULL 0 NULL HFILL +HF_FIELD hf_mapi_RgbOutSize "RgbOutSize" "mapi.RgbOut.RgbOutSize" FT_UINT32 BASE_DEC NULL 0 NULL HFILL +HF_FIELD hf_mapi_AUX_PERF_CLIENTINFO_ClientIPV4 "ClientIP" "mapi.AUX_PERF_CLIENTINFO.ClientIP" FT_IPv4 BASE_NONE NULL 0 NULL HFILL +HF_FIELD hf_mapi_AUX_PERF_CLIENTINFO_ClientIPV6 "ClientIPV6" "mapi.AUX_PERF_CLIENTINFO.ClientIPV6" FT_IPv6 BASE_NONE NULL 0 NULL HFILL +HF_FIELD hf_mapi_AUX_PERF_CLIENTINFO_MacAddressEther "MacAddress" "mapi.AUX_PERF_CLIENTINFO.MacAddress" FT_ETHER BASE_NONE NULL 0 NULL HFILL + +HF_RENAME hf_mapi_AUX_PERF_CLIENTINFO_MacAddress hf_mapi_AUX_PERF_CLIENTINFO_MacAddressEther +HF_RENAME hf_mapi_AUX_PERF_CLIENTINFO_ClientIP hf_mapi_AUX_PERF_CLIENTINFO_ClientIPV4 +HF_RENAME hf_mapi_AbortSubmit_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_Abort_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_AddressTypes_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CloneStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CollapseRow_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CommitStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CopyFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CopyProperties_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CopyToStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CopyTo_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CreateAttach_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CreateBookmark_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CreateFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_CreateMessage_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_DeleteAttach_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_DeleteFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_DeleteMessages_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_DeletePropertiesNoReplicate_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_DeleteProps_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_EmptyFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_ExpandRow_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_FastTransferSourceGetBuffer_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_FindRow_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_FreeBookmark_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetAttachmentTable_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetCollapseState_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetContentsTable_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetHierarchyTable_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetIDsFromNames_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetLocalReplicaIds_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetMessageStatus_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetNamesFromIDs_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetOwningServers_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetPerUserGuid_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetPerUserLongTermIds_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetPermissionsTable_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetPropList_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetPropsAll_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetProps_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetReceiveFolderTable_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetReceiveFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetRulesTable_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetSearchCriteria_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetStatus_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetStoreState_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetStreamSize_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetTransportFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_GetValidAttachments_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_HardDeleteMessagesAndSubfolders_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_HardDeleteMessages_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_IdFromLongTermId_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_LockRegionStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_Logon_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_LongTermIdFromId_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_ModifyPermissions_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_ModifyRecipients_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_ModifyRules_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_MoveCopyMessages_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_MoveFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_OpenAttach_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_OpenEmbeddedMessage_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_OpenFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_OpenMessage_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_OpenStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_OptionsData_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_Progress_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_PublicFolderIsGhosted_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_QueryColumnsAll_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_QueryNamedProperties_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_QueryPosition_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_QueryRows_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_ReadPerUserInformation_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_ReadRecipients_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_ReadStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_RegisterNotification_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_Release_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_RemoveAllRecipients_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_ResetTable_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SaveChangesAttachment_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SaveChangesMessage_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SeekRowApprox_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SeekRowBookmark_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SeekRow_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SeekStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetCollapseState_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetColumns_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetMessageReadFlag_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetMessageStatus_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetPropertiesNoReplicate_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetProps_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetReadFlags_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetReceiveFolder_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetSearchCriteria_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetSpooler_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SetStreamSize_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SortTable_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SpoolerLockMessage_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SubmitMessage_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncConfigure_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncGetTransferState_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncImportDeletes_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncImportHierarchyChange_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncImportMessageChange_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncImportMessageMove_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncImportReadStateChanges_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncOpenCollector_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncUploadStateStreamBegin_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncUploadStateStreamContinue_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_SyncUploadStateStreamEnd_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_TransportNewMail_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_TransportSend_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_UnlockRegionStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_UpdateDeferredActionMessages_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_WriteAndCommitStream_req_LogonId hf_mapi_LogonId +HF_RENAME hf_mapi_WriteStream_req_LogonId hf_mapi_LogonId + + +HF_RENAME hf_mapi_AbortSubmit_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_Abort_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_AddressTypes_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_CloneStream_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_CollapseRow_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_CommitStream_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_CreateAttach_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_CreateBookmark_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_CreateFolder_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_CreateMessage_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_DeleteAttach_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_DeleteFolder_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_DeleteMessages_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_DeletePropertiesNoReplicate_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_DeleteProps_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_EmptyFolder_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_ExpandRow_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_FastTransferSourceGetBuffer_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_FindRow_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_FreeBookmark_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetAttachmentTable_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetCollapseState_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetContentsTable_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetHierarchyTable_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetIDsFromNames_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetLocalReplicaIds_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetMessageStatus_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetNamesFromIDs_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetOwningServers_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetPerUserGuid_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetPerUserLongTermIds_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetPermissionsTable_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetPropList_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetPropsAll_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetProps_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetReceiveFolderTable_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetReceiveFolder_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetRulesTable_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetSearchCriteria_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetStatus_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetStoreState_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetStreamSize_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetTransportFolder_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_GetValidAttachments_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_HardDeleteMessagesAndSubfolders_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_HardDeleteMessages_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_IdFromLongTermId_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_LockRegionStream_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_LongTermIdFromId_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_ModifyPermissions_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_ModifyRecipients_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_ModifyRules_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_OpenAttach_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_OpenEmbeddedMessage_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_OpenFolder_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_OpenMessage_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_OpenStream_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_OptionsData_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_Progress_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_PublicFolderIsGhosted_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_QueryColumnsAll_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_QueryNamedProperties_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_QueryPosition_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_QueryRows_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_ReadPerUserInformation_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_ReadRecipients_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_ReadStream_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_RegisterNotification_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_Release_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_RemoveAllRecipients_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_ResetTable_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SaveChangesAttachment_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SaveChangesMessage_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SeekRowApprox_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SeekRowBookmark_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SeekRow_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SeekStream_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetCollapseState_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetColumns_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetMessageReadFlag_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetMessageStatus_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetPropertiesNoReplicate_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetProps_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetReadFlags_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetReceiveFolder_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetSearchCriteria_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetSpooler_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SetStreamSize_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SortTable_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SpoolerLockMessage_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SubmitMessage_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncConfigure_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncGetTransferState_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncImportDeletes_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncImportHierarchyChange_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncImportMessageChange_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncImportMessageMove_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncImportReadStateChanges_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncOpenCollector_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncUploadStateStreamBegin_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncUploadStateStreamContinue_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_SyncUploadStateStreamEnd_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_TransportNewMail_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_TransportSend_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_UnlockRegionStream_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_UpdateDeferredActionMessages_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_WriteAndCommitStream_req_InputHandleIndex hf_mapi_InputHandleIndex +HF_RENAME hf_mapi_WriteStream_req_InputHandleIndex hf_mapi_InputHandleIndex + +HF_RENAME hf_mapi_CloneStream_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_CreateAttach_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_CreateFolder_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_CreateMessage_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_GetAttachmentTable_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_GetContentsTable_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_GetHierarchyTable_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_GetPermissionsTable_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_GetRulesTable_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_Logon_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_OpenAttach_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_OpenEmbeddedMessage_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_OpenFolder_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_OpenMessage_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_OpenStream_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_RegisterNotification_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_SyncConfigure_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_SyncGetTransferState_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_SyncImportMessageChange_req_OutputHandleIndex hf_mapi_OutputHandleIndex +HF_RENAME hf_mapi_SyncOpenCollector_req_OutputHandleIndex hf_mapi_OutputHandleIndex + +HF_RENAME hf_mapi_SaveChangesAttachment_req_ResponseHandleIndex hf_mapi_ResponseHandleIndex +HF_RENAME hf_mapi_SaveChangesMessage_req_ResponseHandleIndex hf_mapi_ResponseHandleIndex +HF_RENAME hf_mapi_SetMessageReadFlag_req_ResponseHandleIndex hf_mapi_ResponseHandleIndex + +HF_FIELD hf_mapi_SyncUploadStateStreamContinue_req_StreamDataValue "StreamData" "mapi.SyncUploadStateStreamContinue_req.StreamData" FT_BYTES BASE_NONE NULL 0 NULL HFILL +HF_RENAME hf_mapi_SyncUploadStateStreamContinue_req_StreamData hf_mapi_SyncUploadStateStreamContinue_req_StreamDataValue + +HF_FIELD hf_mapi_SyncImportMessageMove_req_SourceFolderIdValue "SourceFolderId" "mapi.SyncImportMessageMove_req.SourceFolderId" FT_BYTES BASE_NONE NULL 0 NULL HFILL +HF_RENAME hf_mapi_SyncImportMessageMove_req_SourceFolderId hf_mapi_SyncImportMessageMove_req_SourceFolderIdValue + +HF_FIELD hf_mapi_SyncImportMessageMove_req_SourceMessageIdValue "SourceMessageId" "mapi.SyncImportMessageMove_req.SourceMessageId" FT_BYTES BASE_NONE NULL 0 NULL HFILL +HF_RENAME hf_mapi_SyncImportMessageMove_req_SourceMessageId hf_mapi_SyncImportMessageMove_req_SourceMessageIdValue + +HF_FIELD hf_mapi_SyncImportMessageMove_req_PredecessorChangeListValue "PredecessorChangeList" "mapi.SyncImportMessageMove_req.PredecessorChangeList" FT_BYTES BASE_NONE NULL 0 NULL HFILL +HF_RENAME hf_mapi_SyncImportMessageMove_req_PredecessorChangeList hf_mapi_SyncImportMessageMove_req_PredecessorChangeListValue + +HF_FIELD hf_mapi_SyncImportMessageMove_req_DestinationMessageIdValue "DestinationMessageId" "mapi.SyncImportMessageMove_req.DestinationMessageId" FT_BYTES BASE_NONE NULL 0 NULL HFILL +HF_RENAME hf_mapi_SyncImportMessageMove_req_DestinationMessageId hf_mapi_SyncImportMessageMove_req_DestinationMessageIdValue + +HF_FIELD hf_mapi_SyncImportMessageMove_req_ChangeNumberValue "ChangeNumber" "mapi.SyncImportMessageMove_req.ChangeNumber" FT_BYTES BASE_NONE NULL 0 NULL HFILL +HF_RENAME hf_mapi_SyncImportMessageMove_req_ChangeNumber hf_mapi_SyncImportMessageMove_req_ChangeNumberValue + +ETT_FIELD ett_mapi_connect_request +ETT_FIELD ett_ServerObjectHandleTable + +MANUAL mapi_dissect_struct_request +MANUAL mapi_dissect_struct_EcDoRpcMapiRequest +MANUAL mapi_dissect_struct_AuxInfo +MANUAL mapi_dissect_struct_AUX_HEADER +MANUAL mapi_dissect_AUX_HEADER_TYPE_ENUM +MANUAL mapi_dissect_AUX_DATA +MANUAL mapi_dissect_struct_EcDoRpcMapiResponse +MANUAL mapi_dissect_struct_response +MANUAL mapi_dissect_element_EcDoRpc_response +MANUAL mapi_dissect_struct_AUX_PERF_CLIENTINFO +MANUAL mapi_dissect_element_AuxInfo_auxHeader +MANUAL mapi_dissect_element_EcDoConnect_szUserDN +MANUAL mapi_dissect_element_EcDoConnectEx_szUserDN +MANUAL mapi_dissect_element_EcDoConnectEx_rgbAuxOut_ +MANUAL mapi_dissect_element_EcDoRpcExt2_rgbAuxOut_ +MANUAL mapi_dissect_element_EcDoConnect_rgwClientVersion +MANUAL mapi_dissect_element_EcDoConnect_rgwServerVersion +MANUAL mapi_dissect_element_EcDoConnect_rgwBestVersion +MANUAL mapi_dissect_element_EcDoConnectEx_rgwClientVersion +MANUAL mapi_dissect_element_EcDoConnectEx_rgwServerVersion +MANUAL mapi_dissect_element_EcDoConnectEx_rgwBestVersion +MANUAL mapi_dissect_struct_SyncUploadStateStreamContinue_req +MANUAL mapi_dissect_struct_SyncImportMessageMove_req +MANUAL mapi_dissect_bitmap_OpenFlags +MANUAL mapi_dissect_bitmap_StoreState +MANUAL mapi_dissect_struct_Logon_repl +MANUAL mapi_dissect_struct_RgbIn +MANUAL mapi_dissect_struct_RgbOut +MANUAL mapi_dissect_element_EcDoRpcExt2_rgbOut_ +MANUAL mapi_dissect_element_EcDoRpcExt_rgbOut_ + + +NOEMIT mapi_dissect_element_EcDoRpc_request +NOEMIT mapi_dissect_element_request_len +NOEMIT mapi_dissect_element_request_length +NOEMIT mapi_dissect_element_EcDoRpcMapiRequest_opnum +NOEMIT mapi_dissect_element_request_handles +NOEMIT mapi_dissect_element_EcDoRpc_MAPI_REPL_opnum +NOEMIT mapi_dissect_element_EcDoRpcMapiResponse_opnum +NOEMIT mapi_dissect_element_response_len +NOEMIT mapi_dissect_element_response_length +NOEMIT mapi_dissect_element_response_handles +NOEMIT mapi_dissect_element_EcDoRpc_response_ +NOEMIT mapi_dissect_element_AuxInfo_auxInSize +NOEMIT mapi_dissect_element_AuxInfo_auxIn +NOEMIT mapi_dissect_element_AuxInfo_RpcHeaderExtension +NOEMIT mapi_dissect_element_AuxInfo_AUX_HEADER +NOEMIT mapi_dissect_element_AUX_HEADER_hdrType +NOEMIT mapi_dissect_element_AUX_HEADER_TYPE_ENUM_Type +NOEMIT mapi_dissect_element_AUX_HEADER_TYPE_ENUM_Type_2 +NOEMIT mapi_dissect_element_AUX_HEADER_AuxData +NOEMIT mapi_dissect_element_AUX_DATA_Version1 +NOEMIT mapi_dissect_element_AUX_DATA_Version2 +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_MachineNameOffset +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_UserNameOffset +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_ClientIPSize +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_ClientIPOffset +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_ClientIPMaskSize +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_ClientIPMaskOffset +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_AdapterNameOffset +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_MacAddressSize +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_MacAddressOffset +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_MachineName +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_UserName +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_ClientIP +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_ClientIPMask +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_AdapterName +NOEMIT mapi_dissect_element_AUX_PERF_CLIENTINFO_MacAddress +NOEMIT mapi_dissect_element_AUX_HEADER_Size +NOEMIT mapi_dissect_element_EcDoConnectEx_rgbAuxOut__ +NOEMIT mapi_dissect_element_EcDoRpcExt2_rgbAuxOut__ +NOEMIT mapi_dissect_element_AuxInfo_auxHeader_ +NOEMIT mapi_dissect_element_EcDoConnect_rgwClientVersion_ +NOEMIT mapi_dissect_element_ROPRequest_RopId +NOEMIT mapi_dissect_element_SyncUploadStateStreamContinue_req_StreamDataSize +NOEMIT mapi_dissect_element_SyncUploadStateStreamContinue_req_StreamData +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_SourceFolderIdSize +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_SourceFolderId +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_SourceMessageIdSize +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_SourceMessageId +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_PredecessorChangeListSize +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_PredecessorChangeList +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_DestinationMessageIdSize +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_DestinationMessageId +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_ChangeNumberSize +NOEMIT mapi_dissect_element_SyncImportMessageMove_req_ChangeNumber +NOEMIT mapi_dissect_element_Logon_repl_ReturnValue +NOEMIT mapi_dissect_element_Logon_repl_LogonFlags +NOEMIT mapi_dissect_element_RgbIn_RpcHeaderExtension +NOEMIT mapi_dissect_element_RgbIn_ropIn +NOEMIT mapi_dissect_element_RgbOut_RpcHeaderExtension +NOEMIT mapi_dissect_element_RgbOut_ropOut +NOEMIT mapi_dissect_element_EcDoRpcExt2_rgbOut__ +NOEMIT mapi_dissect_element_EcDoRpcExt_rgbOut__ + +CODE START + +tvbuff_t * +mapi_deobfuscate(tvbuff_t *tvb, int offset, packet_info *pinfo, guint32 size) +{ + tvbuff_t *deob_tvb = NULL; + guint8 *decrypted_data; + const guint8 *ptr; + gint reported_len; + + reported_len = tvb_reported_length_remaining(tvb, offset); + + if ((guint32) reported_len > size) { + reported_len = size; + } + + if (size > (guint32) reported_len) { + size = reported_len; + } + + ptr = tvb_get_ptr(tvb, offset, size); + + decrypted_data = (guint8 *)wmem_alloc0(pinfo->pool, size); + for (guint32 i = 0; i < size; i++) { + decrypted_data[i] = ptr[i] ^ 0xA5; + } + + deob_tvb = tvb_new_child_real_data(tvb, decrypted_data, size, reported_len); + + return deob_tvb; +} + +/* [MS-OXCRPC] 3.1.4.1.3.1 Version Number Comparison +*/ +static int +normalize_version(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, int hf_index, const gchar * str) +{ + guint16 version_0, build_major, product_major, product_minor; + gchar *value; + + version_0= tvb_get_letohs(tvb, offset); + build_major= tvb_get_letohs(tvb, offset + 2); + + if(build_major & 0x8000){ + product_major = (version_0 & 0xFF00) >> 8; + product_minor = (version_0 & 0xFF); + build_major = (build_major & 0x7FFF); + } else { + product_major = version_0; + product_minor = 0; + } + + value = wmem_strdup_printf( pinfo->pool + , "%d.%d.%d.%d" + , product_major + , product_minor + , build_major + , tvb_get_letohs(tvb, offset + 4)); + + proto_tree_add_string_format( tree + , hf_index + , tvb + , offset + , 6 + , value + , "%s: %s" + , str + , value + ); + return offset + 6; +} + +static int +mapi_dissect_element_EcDoConnect_rgwClientVersion(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return normalize_version(tvb, pinfo, offset, tree, hf_mapi_mapi_EcDoConnect_rgwClientVersion, "rgwClientVersion"); +} + +static int +mapi_dissect_element_EcDoConnect_rgwServerVersion(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return normalize_version(tvb, pinfo, offset, tree, hf_mapi_mapi_EcDoConnect_rgwServerVersion, "rgwServerVersion"); +} + +static int +mapi_dissect_element_EcDoConnect_rgwBestVersion(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return normalize_version(tvb, pinfo, offset, tree, hf_mapi_mapi_EcDoConnect_rgwBestVersion, "rgwBestVersion"); +} + +static int +mapi_dissect_element_EcDoConnectEx_rgwClientVersion(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return normalize_version(tvb, pinfo, offset, tree, hf_mapi_mapi_EcDoConnectEx_rgwClientVersion, "rgwClientVersion"); +} + +static int +mapi_dissect_element_EcDoConnectEx_rgwServerVersion(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return normalize_version(tvb, pinfo, offset, tree, hf_mapi_mapi_EcDoConnectEx_rgwServerVersion, "rgwServerVersion"); +} + +static int +mapi_dissect_element_EcDoConnectEx_rgwBestVersion(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return normalize_version(tvb, pinfo, offset, tree, hf_mapi_mapi_EcDoConnectEx_rgwBestVersion, "rgwBestVersion"); +} + + +static int +mapi_dissect_element_EcDoRpc_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return mapi_dissect_struct_request(tvb, offset, pinfo, tree, di, drep, hf_mapi_mapi_EcDoRpc_mapi_request, 0); +} + +static int +mapi_dissect_element_EcDoRpc_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return mapi_dissect_struct_response(tvb, offset, pinfo, tree, di, drep, hf_mapi_mapi_EcDoRpc_mapi_response, 0); +} + +/** + * Analyze mapi_request MAPI Handles + */ +static int +mapi_dissect_element_handles_cnf(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, int hf_index _U_, guint8 *drep _U_) +{ + gint reported_len; + gint handles_cnt = 0; + guint32 value; + proto_tree *tr = NULL; + + reported_len = tvb_reported_length_remaining(tvb, offset); + + handles_cnt = reported_len / 4; + + tr = proto_tree_add_subtree_format(tree, tvb, offset, reported_len, ett_mapi_mapi_request, NULL, "MAPI Handles: %d", handles_cnt); + + for (gint i = 0; i < handles_cnt; i++) { + value = tvb_get_letohl(tvb, offset); + proto_tree_add_uint_format(tr, hf_index, tvb, offset, 4, value, "[%.2d] MAPI handle: 0x%.8x", i, value); + offset += 4; + } + + return offset; +} + +int +mapi_dissect_struct_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + int start_offset = offset; + tvbuff_t *decrypted_tvb; + guint32 size; + guint16 pdu_len; + + ALIGN_TO_5_BYTES; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, start_offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_mapi_response); + } + + offset = dissect_ndr_uint32(tvb, start_offset, pinfo, tree, di, drep, hf_mapi_mapi_response_mapi_len, &size); + + decrypted_tvb = mapi_deobfuscate(tvb, offset, pinfo, size); + if (!decrypted_tvb || tvb_reported_length(decrypted_tvb) != size) { + return offset; + } + + offset += size; + proto_item_set_len(item, offset - start_offset); + + { + add_new_data_source(pinfo, decrypted_tvb, "Decrypted MAPI Response"); + + tree = proto_tree_add_subtree(tree, decrypted_tvb, 0, size, ett_mapi_mapi_response, NULL, "Decrypted MAPI Response PDU"); + + pdu_len = tvb_get_letohs(decrypted_tvb, 0); + proto_tree_add_uint(tree, hf_mapi_mapi_response_length, decrypted_tvb, 0, sizeof(guint16), pdu_len); + proto_tree_add_item(tree, hf_mapi_decrypted_data, decrypted_tvb, sizeof(guint16), pdu_len - sizeof(guint16), ENC_NA); + + /* analyze contents */ + mapi_dissect_element_response_rpcResponse(decrypted_tvb, sizeof(guint16), pinfo, tree, di, drep); + mapi_dissect_element_handles_cnf(decrypted_tvb, pdu_len, pinfo, tree, di, hf_mapi_mapi_response_handles, drep); + } + + if (di->call_data->flags & DCERPC_IS_NDR64) { + ALIGN_TO_5_BYTES; + } + + return offset; +} + +static int +mapi_dissect_element_AuxInfo_auxHeader(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + guint total_length = tvb_reported_length(tvb); + + if(di->conformant_run){ + return offset; + } + + while(offset >= 0 && (guint)offset < total_length){ + offset = mapi_dissect_struct_AUX_HEADER(tvb,offset,pinfo,tree,di,drep,di->ptype == PDU_REQ ? hf_mapi_AuxInfo_auxHeader : hf_mapi_AuxInfoOut_auxHeader ,0); + } + + return offset; +} + +int +dissect_EcDoConnectEx_AuxInfoOut(tvbuff_t *tvb _U_, int offset _U_, int length _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + if (length == 0){ + return offset; + } + return mapi_dissect_struct_AuxInfo(tvb, offset, pinfo, parent_tree, di, drep, hf_mapi_mapi_EcDoConnectEx_rgbAuxOut, 0); +} + +static int +mapi_dissect_element_EcDoConnectEx_rgbAuxOut_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return dissect_ndr_ucvarray_block(tvb, offset, pinfo, tree, di, drep, &dissect_EcDoConnectEx_AuxInfoOut); +} + +int +dissect_EcDoRpcExt2_AuxInfoOut(tvbuff_t *tvb _U_, int offset _U_, int length _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + if (length == 0){ + return offset; + } + return mapi_dissect_struct_AuxInfo(tvb, offset, pinfo, parent_tree, di, drep, hf_mapi_mapi_EcDoRpcExt2_rgbAuxOut, 0); +} + +static int +mapi_dissect_element_EcDoRpcExt2_rgbAuxOut_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return dissect_ndr_ucvarray_block(tvb, offset, pinfo, tree, di, drep, &dissect_EcDoRpcExt2_AuxInfoOut); +} + +int +mapi_dissect_struct_AUX_PERF_CLIENTINFO(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + gboolean oldalign = di->no_align; + int old_offset, cur_end_offset; + guint16 MachineNameOffset; + guint16 UserNameOffset; + guint16 ClientIPSize; + guint16 ClientIPOffset; + guint16 ClientIPMaskSize; + guint16 ClientIPMaskOffset; + guint16 AdapterNameOffset; + guint16 MacAddressSize; + guint16 MacAddressOffset; + + di->no_align = TRUE; + + old_offset = offset; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_AUX_PERF_CLIENTINFO); + } + + offset = mapi_dissect_element_AUX_PERF_CLIENTINFO_AdapterSpeed(tvb, offset, pinfo, tree, di, drep); + + offset = mapi_dissect_element_AUX_PERF_CLIENTINFO_ClientID(tvb, offset, pinfo, tree, di, drep); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_MachineNameOffset, 0, &MachineNameOffset); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_UserNameOffset, 0, &UserNameOffset); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_ClientIPSize, 0, &ClientIPSize); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_ClientIPOffset, 0, &ClientIPOffset); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_ClientIPMaskSize, 0, &ClientIPMaskSize); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_ClientIPMaskOffset, 0, &ClientIPMaskOffset); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_AdapterNameOffset, 0, &AdapterNameOffset); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_MacAddressSize, 0, &MacAddressSize); + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_MacAddressOffset, 0, &MacAddressOffset); + + offset = mapi_dissect_element_AUX_PERF_CLIENTINFO_ClientMode(tvb, offset, pinfo, tree, di, drep); + + offset = mapi_dissect_element_AUX_PERF_CLIENTINFO_Reserved(tvb, offset, pinfo, tree, di, drep); + + if (MachineNameOffset > 0){ + cur_end_offset = dissect_null_term_wstring(tvb, MachineNameOffset, pinfo, tree, drep, hf_mapi_AUX_PERF_CLIENTINFO_MachineName , 0); + if (cur_end_offset > offset) + offset = cur_end_offset; + } + + if (UserNameOffset > 0){ + cur_end_offset = dissect_null_term_wstring(tvb, UserNameOffset, pinfo, tree, drep, hf_mapi_AUX_PERF_CLIENTINFO_UserName , 0); + if (cur_end_offset > offset) + offset = cur_end_offset; + } + + if (ClientIPOffset > 0 && ClientIPSize > 0){ + if(ClientIPSize == 4){ + proto_tree_add_item(tree, hf_mapi_AUX_PERF_CLIENTINFO_ClientIPV4, tvb, ClientIPOffset, 4, ENC_NA); + } else if(ClientIPSize == 16){ + proto_tree_add_item(tree, hf_mapi_AUX_PERF_CLIENTINFO_ClientIPV6, tvb, ClientIPOffset, 16, ENC_NA); + } + + cur_end_offset = ClientIPOffset + ClientIPSize; + + if (cur_end_offset > offset) + offset = cur_end_offset; + } + + if (ClientIPMaskOffset > 0 && ClientIPMaskSize > 0){ + for (int i = 0; i < ClientIPMaskSize; i++) + cur_end_offset = PIDL_dissect_uint8(tvb, ClientIPMaskOffset+i, pinfo, tree, di, drep, hf_mapi_AUX_PERF_CLIENTINFO_ClientIPMask, 0); + + if (cur_end_offset > offset) + offset = cur_end_offset; + } + + if (AdapterNameOffset > 0){ + cur_end_offset = dissect_null_term_wstring(tvb, AdapterNameOffset, pinfo, tree, drep, hf_mapi_AUX_PERF_CLIENTINFO_AdapterName , 0); + + if (cur_end_offset > offset) + offset = cur_end_offset; + } + + if (MacAddressOffset > 0 && MacAddressSize > 0){ + if(MacAddressSize == 6){ + proto_tree_add_item(tree, hf_mapi_AUX_PERF_CLIENTINFO_MacAddressEther, tvb, MacAddressOffset, 6, ENC_NA); + } + + cur_end_offset = MacAddressOffset + MacAddressSize; + + if (cur_end_offset > offset) + offset = cur_end_offset; + } + + proto_item_set_len(item, offset-old_offset); + + di->no_align = oldalign; + + return offset; +} + +static int +mapi_dissect_AuxDataVersion1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_); + +static int +mapi_dissect_AuxDataVersion2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_); + +static int +mapi_dissect_AUX_DATA(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, guint8 Version, int hf_index _U_, guint8 hdrType) +{ + switch(Version) { + case AUX_VERSION_1: + return mapi_dissect_AuxDataVersion1(tvb, offset, pinfo, parent_tree, di, drep, hf_mapi_AUX_DATA_Version1, hdrType); + case AUX_VERSION_2: + return mapi_dissect_AuxDataVersion2(tvb, offset, pinfo, parent_tree, di, drep, hf_mapi_AUX_DATA_Version2, hdrType); + default: + return offset; + } +} + +int +mapi_dissect_AUX_HEADER_TYPE_ENUM(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, guint8 Version, int hf_index _U_, guint8 *hdrType) +{ + switch(Version) { + case AUX_VERSION_1: + return PIDL_dissect_uint8_val(tvb, offset, pinfo, parent_tree, di, drep, hf_mapi_AUX_HEADER_TYPE_ENUM_Type, 0, hdrType); + case AUX_VERSION_2: + return PIDL_dissect_uint8_val(tvb, offset, pinfo, parent_tree, di, drep, hf_mapi_AUX_HEADER_TYPE_ENUM_Type_2, 0, hdrType); + default: + return offset; + } +} + +int +mapi_dissect_struct_AUX_HEADER(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + guint16 auxSize = 0; + guint8 Version = 0; + guint8 hdrType = 0; + proto_item *item = NULL; + proto_tree *tree = NULL; + gboolean oldalign = di->no_align; + + di->no_align = TRUE; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_AUX_HEADER); + } + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_AUX_HEADER_Size, 0, &auxSize); + offset = mapi_dissect_element_AUX_HEADER_Version(tvb, offset, pinfo, tree, di, drep, &Version); + offset = mapi_dissect_AUX_HEADER_TYPE_ENUM(tvb, offset, pinfo, tree, di, drep, Version, hf_mapi_AUX_HEADER_hdrType, &hdrType); + offset = mapi_dissect_AUX_DATA(tvb, offset, pinfo, tree, di, drep, Version, hf_mapi_AUX_HEADER_AuxData, hdrType); + + proto_item_set_len(item, auxSize); + + di->no_align = oldalign; + + return offset; +} + +int +mapi_dissect_struct_EcDoRpcMapiRequest(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + guint8 opnum = 0; + proto_item *item = NULL; + proto_tree *tree = NULL; + gboolean oldalign = di->no_align; + int old_offset; + + di->no_align = TRUE; + + old_offset = offset; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_EcDoRpcMapiRequest); + } + + offset = PIDL_dissect_uint8_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_EcDoRpcMapiRequest_opnum, param, &opnum); + + col_append_fstr(pinfo->cinfo, COL_INFO, " + %s", val_to_str(opnum, mapi_ROP_OPNUM_vals, "Unknown MAPI operation")); + + offset = mapi_dissect_element_EcDoRpcMapiRequest_u(tvb, offset, pinfo, tree, di, drep, &opnum); + + proto_item_set_len(item, offset-old_offset); + + di->no_align = oldalign; + + return offset; +} + +int +mapi_dissect_struct_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + int start_offset = offset;; + tvbuff_t *decrypted_tvb = NULL; + guint16 pdu_len; + guint32 size; + + ALIGN_TO_5_BYTES; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_mapi_request); + } + + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_mapi_mapi_request_mapi_len, &size); + + decrypted_tvb = mapi_deobfuscate(tvb, offset, pinfo, size); + if (!decrypted_tvb || tvb_reported_length(decrypted_tvb) != size) { + return offset; + } + + offset += size; + proto_item_set_len(item, offset - start_offset); + + { + add_new_data_source(pinfo, decrypted_tvb, "Decrypted MAPI Request"); + + tree = proto_tree_add_subtree(tree, decrypted_tvb, 0, size, ett_mapi_mapi_request, NULL, "Decrypted MAPI Request PDU"); + + pdu_len = tvb_get_letohs(decrypted_tvb, 0); + proto_tree_add_uint(tree, hf_mapi_mapi_request_length, decrypted_tvb, 0, 2, pdu_len); + proto_tree_add_item(tree, hf_mapi_decrypted_data, decrypted_tvb, 2, pdu_len - 2, ENC_NA); + + /* analyze contents */ + mapi_dissect_element_request_rpcRequest(decrypted_tvb, 2, pinfo, tree, di, drep); + + mapi_dissect_element_handles_cnf(decrypted_tvb, pdu_len, pinfo, tree, di, hf_mapi_mapi_request_handles, drep); + } + + if (di->call_data->flags & DCERPC_IS_NDR64) { + ALIGN_TO_5_BYTES; + } + + return offset; +} + +static int +mapi_dissect_element_EcDoConnect_szUserDN(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + char *data= NULL; + + offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint8), hf_mapi_mapi_EcDoConnect_szUserDN, FALSE, &data); + proto_item_append_text(tree, ": %s", data); + col_append_fstr(pinfo->cinfo, COL_INFO, " DN: %s", data); + + return offset; +} + +static int +mapi_dissect_element_EcDoConnectEx_szUserDN(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + char *data= NULL; + + offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint8), hf_mapi_mapi_EcDoConnectEx_szUserDN, FALSE, &data); + proto_item_append_text(tree, ": %s", data); + + col_append_fstr(pinfo->cinfo, COL_INFO, " DN: %s", data); + + return offset; +} + +int +mapi_dissect_struct_EcDoRpcMapiResponse(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + guint8 opnum = 0; + proto_item *item = NULL; + proto_tree *tree = NULL; + gboolean oldalign = di->no_align; + int old_offset= offset; + + di->no_align = TRUE; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_EcDoRpcMapiResponse); + } + + offset = PIDL_dissect_uint8_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_EcDoRpcMapiResponse_opnum, param, &opnum); + col_append_fstr(pinfo->cinfo, COL_INFO, " + %s", val_to_str(opnum, mapi_ROP_OPNUM_vals, "Unknown MAPI operation")); + + offset = mapi_dissect_element_EcDoRpcMapiResponse_u(tvb, offset, pinfo, tree, di, drep, &opnum); + + proto_item_set_len(item, offset-old_offset); + + di->no_align = oldalign; + + return offset; +} + +int +uint32_size_uint8_buffer(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dcerpc_info* di, guint8 *drep, int hf_size_index, int hf_buffer_index, guint32 param) +{ + guint32 size= 0; + + offset = PIDL_dissect_uint32_val(tvb, offset, pinfo, parent_tree, di, drep, hf_size_index, param, &size); + + proto_tree_add_item(parent_tree, hf_buffer_index, tvb, offset, size, ENC_NA); + + return offset+size; +} + +int +mapi_dissect_struct_SyncUploadStateStreamContinue_req(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + gboolean oldalign = di->no_align; + int old_offset= offset; + + di->no_align = TRUE; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_SyncUploadStateStreamContinue_req); + } + + offset = mapi_dissect_element_SyncUploadStateStreamContinue_req_LogonId(tvb, offset, pinfo, tree, di, drep); + + offset = mapi_dissect_element_SyncUploadStateStreamContinue_req_InputHandleIndex(tvb, offset, pinfo, tree, di, drep); + + offset = uint32_size_uint8_buffer(tvb, offset, pinfo, tree, di, drep, hf_mapi_SyncUploadStateStreamContinue_req_StreamDataSize, hf_mapi_SyncUploadStateStreamContinue_req_StreamDataValue, 0); + + proto_item_set_len(item, offset-old_offset); + + di->no_align = oldalign; + + return offset; +} + +int +mapi_dissect_struct_SyncImportMessageMove_req(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + gboolean oldalign = di->no_align; + int old_offset = offset; + + di->no_align = TRUE; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_SyncImportMessageMove_req); + } + + offset = mapi_dissect_element_SyncImportMessageMove_req_LogonId(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_SyncImportMessageMove_req_InputHandleIndex(tvb, offset, pinfo, tree, di, drep); + offset = uint32_size_uint8_buffer(tvb, offset, pinfo, tree, di, drep, hf_mapi_SyncImportMessageMove_req_SourceFolderIdSize, hf_mapi_SyncImportMessageMove_req_SourceFolderIdValue, 0); + offset = uint32_size_uint8_buffer(tvb, offset, pinfo, tree, di, drep, hf_mapi_SyncImportMessageMove_req_SourceMessageIdSize, hf_mapi_SyncImportMessageMove_req_SourceMessageIdValue, 0); + offset = uint32_size_uint8_buffer(tvb, offset, pinfo, tree, di, drep, hf_mapi_SyncImportMessageMove_req_PredecessorChangeListSize, hf_mapi_SyncImportMessageMove_req_PredecessorChangeListValue, 0); + offset = uint32_size_uint8_buffer(tvb, offset, pinfo, tree, di, drep, hf_mapi_SyncImportMessageMove_req_DestinationMessageIdSize, hf_mapi_SyncImportMessageMove_req_DestinationMessageIdValue, 0); + offset = uint32_size_uint8_buffer(tvb, offset, pinfo, tree, di, drep, hf_mapi_SyncImportMessageMove_req_ChangeNumberSize, hf_mapi_SyncImportMessageMove_req_ChangeNumberValue, 0); + + proto_item_set_len(item, offset-old_offset); + + di->no_align = oldalign; + + return offset; +} + +/* IDL: bitmap { */ +/* IDL: PUBLIC = 0x2 , */ +/* IDL: HOME_LOGON = 0x4 , */ +/* IDL: TAKE_OWNERSHIP = 0x8 , */ +/* IDL: ALTERNATE_SERVER = 0x100 , */ +/* IDL: IGNORE_HOME_MDB = 0x200 , */ +/* IDL: NO_MAIL = 0x400 , */ +/* IDL: USE_PER_MDB_REPLID_MAPPING = 0x010000000 , */ +/* IDL: } */ + +int +mapi_dissect_bitmap_OpenFlags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item= NULL; + static int * const mapi_OpenFlags_fields[] = { + &hf_mapi_OpenFlags_PUBLIC, + &hf_mapi_OpenFlags_HOME_LOGON, + &hf_mapi_OpenFlags_TAKE_OWNERSHIP, + &hf_mapi_OpenFlags_ALTERNATE_SERVER, + &hf_mapi_OpenFlags_IGNORE_HOME_MDB, + &hf_mapi_OpenFlags_NO_MAIL, + &hf_mapi_OpenFlags_USE_PER_MDB_REPLID_MAPPING, + NULL + }; + guint32 flags; + + item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index, + ett_mapi_OpenFlags, mapi_OpenFlags_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE); + + offset = dissect_ndr_uint32(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags); + + if (!flags) + proto_item_append_text(item, ": (No values set)"); + + if (flags & (~0x1000070e)) { + flags &= (~0x1000070e); + proto_item_append_text(item, "Unknown bitmap value 0x%x", flags); + } + + return offset; +} + +int +mapi_dissect_bitmap_StoreState(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item; + static int * const mapi_StoreState_fields[] = { + &hf_mapi_StoreState_STORE_HAS_SEARCHES, + NULL + }; + guint32 flags; + + item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index, + ett_mapi_StoreState, mapi_StoreState_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE); + + offset = dissect_ndr_uint32(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags); + + if (!flags) + proto_item_append_text(item, ": (No values set)"); + + if (flags & (~0x10000000)) { + flags &= (~0x10000000); + proto_item_append_text(item, "Unknown bitmap value 0x%x", flags); + } + + return offset; +} + +int +mapi_dissect_struct_Logon_repl(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + gboolean oldalign = di->no_align; + int old_offset= offset; + guint32 returnValue; + + di->no_align = TRUE; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_Logon_repl); + } + + offset = mapi_dissect_element_Logon_repl_OutputHandleIndex(tvb, offset, pinfo, tree, di, drep); + + offset = PIDL_dissect_uint32_val(tvb, offset, pinfo, tree, di, drep, hf_mapi_Logon_repl_ReturnValue, 0, &returnValue); + + if (returnValue == 0x0){ + // 2.2.3.1.2 RopLogon ROP Success Response Buffer + guint8 LogonFlags= 0; + + offset = mapi_dissect_enum_LogonFlags(tvb, offset, pinfo, tree, di, drep, hf_mapi_Logon_repl_LogonFlags, &LogonFlags); + + if (LogonFlags == 0x1){ + // Private + offset = mapi_dissect_element_Logon_repl_FolderIds(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_ResponseFlags(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_MailboxGuid(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_ReplId(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_ReplGuid(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_LogonTime(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_GwartTime(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_StoreState(tvb, offset, pinfo, tree, di, drep); + } else { + // Public + offset = mapi_dissect_element_Logon_repl_FolderIds(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_ReplId(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_ReplGuid(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_PerUserGuid(tvb, offset, pinfo, tree, di, drep); + } + } else if (returnValue == 0x00000478){ + // 2.2.1.1.2 RopLogon ROP Redirect Response Buffer + offset = mapi_dissect_enum_LogonFlags(tvb, offset, pinfo, tree, di, drep, hf_mapi_Logon_repl_LogonFlags, 0); + offset = mapi_dissect_element_Logon_repl_ServerNameSize(tvb, offset, pinfo, tree, di, drep); + offset = mapi_dissect_element_Logon_repl_ServerName(tvb, offset, pinfo, tree, di, drep); + } + + proto_item_set_len(item, offset-old_offset); + + di->no_align = oldalign; + + return offset; +} + + #define RHEF_Compressed 0x0001 + #define RHEF_XorMagic 0x0002 + #define RHEF_Last 0x0004 + +int dissect_RPC_HEADER_EXT(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dcerpc_info* di, guint8 *drep, int hf_index, tvbuff_t **ppUncomp_tvb) +{ + proto_tree *hTree = NULL; + proto_item *rpcItem = NULL; + guint16 flags; + guint16 compressedSize= 0, uncompressedSize= 0; + int old_offset= offset; + + ALIGN_TO_2_BYTES; + + if (parent_tree) { + rpcItem = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + hTree = proto_item_add_subtree(rpcItem, ett_mapi_RPC_HEADER_EXT); + } + + offset = mapi_dissect_element_RPC_HEADER_EXT_Version(tvb, offset, pinfo, hTree, di, drep); + + proto_item *flagItem; + static int * const mapi_RPC_HEADER_EXT_Flags_fields[] = { + &hf_mapi_RPC_HEADER_EXT_Flags_RHEF_Compressed, + &hf_mapi_RPC_HEADER_EXT_Flags_RHEF_XorMagic, + &hf_mapi_RPC_HEADER_EXT_Flags_RHEF_Last, + NULL + }; + + ALIGN_TO_2_BYTES; + + flagItem = proto_tree_add_bitmask_with_flags(hTree, tvb, offset, hf_mapi_RPC_HEADER_EXT_Flags, + ett_mapi_RPC_HEADER_EXT_Flags, mapi_RPC_HEADER_EXT_Flags_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE); + + offset = dissect_ndr_uint16(tvb, offset, pinfo, hTree, di, drep, -1, &flags); + + if (!flags) + proto_item_append_text(flagItem, ": (No values set)"); + + if (flags & (~0x00000007)) { + flags &= (~0x00000007); + proto_item_append_text(flagItem, "Unknown bitmap value 0x%x", flags); + } + + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, hTree, di, drep, hf_mapi_RPC_HEADER_EXT_Size, 0, &compressedSize); + offset = PIDL_dissect_uint16_val(tvb, offset, pinfo, hTree, di, drep, hf_mapi_RPC_HEADER_EXT_SizeActual, 0, &uncompressedSize); + + proto_item_set_len(flagItem, 2); + + if (di->call_data->flags & DCERPC_IS_NDR64) { + ALIGN_TO_2_BYTES; + } + + bool last = RHEF_Last == (flags & RHEF_Last); + bool compressed = RHEF_Compressed == (flags & RHEF_Compressed); + bool xored = RHEF_XorMagic == (flags & RHEF_XorMagic); + + if (!last){ + // TODO: Currently we don't support multiple buffers of RPC_HEADER_EXT. + return offset; + } + + if (compressed && xored){ + // TODO: Currently we don't support both compressed and Xored + return offset; + } + + if (compressed){ + *ppUncomp_tvb= tvb_child_uncompress_lz77(tvb, tvb, offset, compressedSize); + } else if (xored){ + *ppUncomp_tvb= mapi_deobfuscate(tvb, offset, pinfo, uncompressedSize); + } else if (!compressed && !xored) { + *ppUncomp_tvb = tvb_new_subset_length(tvb, offset, uncompressedSize); + } else { + return offset; + } + + if (!(*ppUncomp_tvb) || tvb_reported_length(*ppUncomp_tvb) != uncompressedSize) { + *ppUncomp_tvb= NULL; + return offset; + } + + offset += compressedSize; + + proto_item_set_len(rpcItem, offset-old_offset); + + return offset; +} + +int +mapi_dissect_struct_AuxInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset= offset; + tvbuff_t *uncomp_tvb = NULL; + + ALIGN_TO_4_BYTES; + + if(di->conformant_run){ + return offset; + } + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_mapi_AuxInfo); + } + + if (di->ptype == PDU_REQ){ + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_mapi_AuxInfo_auxInSize, NULL); + } + + offset = dissect_RPC_HEADER_EXT(tvb, offset, pinfo, tree, di, drep, di->ptype == PDU_REQ ? hf_mapi_AuxInfo_RpcHeaderExtension : hf_mapi_AuxInfoOut_RpcHeaderExtension, &uncomp_tvb); + + if (!uncomp_tvb) { + return offset; + } + + proto_item_set_len(item, offset-old_offset); + + add_new_data_source(pinfo, uncomp_tvb, "Decrypted MAPI AuxInfo"); + + { + tree = proto_tree_add_subtree(tree, uncomp_tvb, 0, tvb_reported_length(uncomp_tvb), ett_mapi_connect_request, NULL, "Decrypted MAPI AuxInfo"); + + mapi_dissect_element_AuxInfo_auxHeader(uncomp_tvb, 0, pinfo, tree, di, drep); + } + + if (di->call_data->flags & DCERPC_IS_NDR64) { + ALIGN_TO_4_BYTES; + } + + return offset; +} + +int +mapi_dissect_RgbInOut(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dcerpc_info* di, guint8 *drep, int hf_index) +{ + proto_item *item = NULL; + proto_tree *tree = NULL; + int old_offset= offset; + tvbuff_t *uncomp_tvb = NULL; + + if (parent_tree) { + item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, di->ptype == PDU_REQ ? ett_mapi_RgbIn : ett_mapi_RgbOut); + } + + if (di->ptype == PDU_REQ){ + offset = dissect_ndr_uint3264(tvb, offset, pinfo, tree, di, drep, di->ptype == PDU_REQ ? hf_mapi_RgbInSize : hf_mapi_RgbOutSize, NULL); + } + + offset = dissect_RPC_HEADER_EXT(tvb, offset, pinfo, tree, di, drep, di->ptype == PDU_REQ ? hf_mapi_RgbIn_RpcHeaderExtension : hf_mapi_RgbOut_RpcHeaderExtension, &uncomp_tvb); + + if (!uncomp_tvb) { + return offset; + } + + proto_item_set_len(item, offset-old_offset); + + add_new_data_source(pinfo, uncomp_tvb, di->ptype == PDU_REQ ? "Decrypted MAPI ROPIn PDU" : "Decrypted MAPI ROPOut PDU"); + + { + int uncompressed_offset= 0; + guint16 total_length; + + item = proto_tree_add_item(tree, di->ptype == PDU_REQ ? hf_mapi_RgbIn_ropIn : hf_mapi_RgbOut_ropOut, uncomp_tvb, 0, tvb_reported_length(uncomp_tvb), ENC_NA); + tree = proto_item_add_subtree(item, di->ptype == PDU_REQ ? ett_mapi_RgbIn : ett_mapi_RgbOut); + + uncompressed_offset = PIDL_dissect_uint16_val(uncomp_tvb, uncompressed_offset, pinfo, tree, di, drep, di->ptype == PDU_REQ ? hf_mapi_ROPInputBuffer_ropSize : hf_mapi_ROPOutputBuffer_ropSize, 0, &total_length); + + while((guint)(uncompressed_offset) < total_length){ + if (di->ptype == PDU_REQ){ + uncompressed_offset = mapi_dissect_struct_RopInput(uncomp_tvb, uncompressed_offset,pinfo,tree,di,drep,hf_mapi_ROPInputBuffer_rop,0); + } else { + uncompressed_offset = mapi_dissect_struct_RopOutput(uncomp_tvb, uncompressed_offset,pinfo,tree,di,drep,hf_mapi_ROPOutputBuffer_rop,0); + } + } + } + + ALIGN_TO_5_BYTES + + return offset; +} + + +int +mapi_dissect_struct_RgbIn(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, dcerpc_info* di, guint8 *drep, int hf_index, guint32 param _U_) +{ + return mapi_dissect_RgbInOut(tvb, offset, pinfo, parent_tree, di, drep, hf_index); +} + +int +dissect_EcDoRpcExt2_RgbOut(tvbuff_t *tvb _U_, int offset _U_, int length _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + if (length == 0){ + return offset; + } + return mapi_dissect_struct_RgbOut(tvb, offset, pinfo, parent_tree, di, drep, hf_mapi_mapi_EcDoRpcExt2_rgbOut, 0); +} + +static int +mapi_dissect_element_EcDoRpcExt2_rgbOut_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return dissect_ndr_ucvarray_block(tvb, offset, pinfo, tree, di, drep, &dissect_EcDoRpcExt2_RgbOut); +} + +int +dissect_EcDoRpcExt_RgbOut(tvbuff_t *tvb _U_, int offset _U_, int length _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + if (length == 0){ + return offset; + } + return mapi_dissect_struct_RgbOut(tvb, offset, pinfo, parent_tree, di, drep, hf_mapi_mapi_EcDoRpcExt_rgbOut, 0); +} + +static int +mapi_dissect_element_EcDoRpcExt_rgbOut_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_) +{ + return dissect_ndr_ucvarray_block(tvb, offset, pinfo, tree, di, drep, &dissect_EcDoRpcExt_RgbOut); +} + +int +mapi_dissect_struct_RgbOut(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_) +{ + return mapi_dissect_RgbInOut(tvb, offset, pinfo, parent_tree, di, drep, hf_index); +} + +CODE END
\ No newline at end of file diff --git a/epan/dissectors/pidl/mapi/mapi.idl b/epan/dissectors/pidl/mapi/mapi.idl new file mode 100644 index 00000000..2b77f2ca --- /dev/null +++ b/epan/dissectors/pidl/mapi/mapi.idl @@ -0,0 +1,4049 @@ +#include "idl_types.h" + +import "nspi.idl"; + +/* + emsmdb interface definitions +*/ +[ uuid("a4f1db00-ca47-1067-b31f-00dd010662da"), + version(0.82), + endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]","ncacn_ip_tcp:"), + pointer_default(unique), + helpstring("MAPI") +] interface mapi +{ +#include "mapicodes_enum.h" +#include "mapitags_enum.h" + +/* Property types */ +#define PT_UNSPECIFIED 0x0 +#define PT_NULL 0x1 +#define PT_I2 0x2 +#define PT_SHORT 0x2 +#define PT_LONG 0x3 +#define PT_FLOAT 0x4 +#define PT_DOUBLE 0x5 +#define PT_CURRENCY 0x6 +#define PT_APPTIME 0x7 +#define PT_ERROR 0xa +#define PT_BOOLEAN 0xb +#define PT_OBJECT 0xd +#define PT_I8 0x14 +#define PT_STRING8 0x1e +#define PT_UNICODE 0x1f +#define PT_SYSTIME 0x40 +#define PT_CLSID 0x48 +#define PT_SVREID 0xFB +#define PT_SRESTRICT 0xFD +#define PT_ACTIONS 0xFE +#define PT_BINARY 0x102 + + typedef struct datablob { + uint8 *data; + uint8 length; + } DATA_BLOB; + + /******************/ + /* Function: 0x00 */ + WERROR mapi_EcDoConnect( + [out] policy_handle *hBinding, + [in,string,charset(DOS)] uint8 szUserDN[], + [in] uint32 ulFlags, + [in] uint32 ulConMod, + [in] uint32 cbLimit, + [in] uint32 ulCpid, + [in] uint32 ulLcidString, + [in] uint32 ulLcidSort, + [in] uint32 ulIcxrLink, + [in] uint16 usFCanConvertCodePages, + [out] uint32 *pcmsPollsMax, + [out] uint32 *pcRetry, + [out] uint32 *pcmsRetryDelay, + [out] uint32 *picxr, + [out,unique,ref,string,charset(DOS)] uint8 **szDNPrefix, + [out,unique,ref,string,charset(DOS)] uint8 **szDisplayName, + [in,string] uint8 rgwClientVersion[6], + [out,string] uint8 rgwServerVersion[6], + [out,string] uint8 rgwBestVersion[6], + [in,out] uint32 *pullTimeStamp + ); + + /******************/ + /* Function: 0x01 */ + WERROR mapi_EcDoDisconnect( + [in, out, ref] policy_handle *pcxh + ); + + /******************/ + /* Function: 0x02 */ + typedef [public, enum8bit, flag(NDR_PAHEX)] enum + { + MAPI_STORE = 0x1, + MAPI_ADDRBOOK = 0x2, + MAPI_FOLDER = 0x3, + MAPI_ABCONT = 0x4, + MAPI_MESSAGE = 0x5, + MAPI_MAILUSER = 0x6, /* Individual Recipient */ + MAPI_ATTACH = 0x7, + MAPI_DISTLIST = 0x8, + MAPI_PROFSECT = 0x9, + MAPI_STATUS = 0xA, + MAPI_SESSION = 0xB, + MAPI_FORMINFO = 0xC + } MAPI_OBJTYPE; + + typedef [public, v1_enum, flag(NDR_PAHEX)] enum + { + RightsNone = 0x00000000, + RightsReadItems = 0x00000001, + RightsCreateItems = 0x00000002, + RightsEditOwn = 0x00000008, + RightsDeleteOwn = 0x00000010, + RightsEditAll = 0x00000020, + RightsDeleteAll = 0x00000040, + RightsCreateSubfolders = 0x00000080, + RightsFolderOwner = 0x00000100, + RightsFolderContact = 0x00000200, + RoleNone = 0x00000400, + RoleReviewer = 0x00000401, + RoleContributor = 0x00000402, + RoleNoneditingAuthor = 0x00000413, + RoleAuthor = 0x0000041B, + RoleEditor = 0x0000047B, + RolePublishAuthor = 0x0000049B, + RolePublishEditor = 0x000004FB, + RightsAll = 0x000005FB, + RoleOwner = 0x000007FB + } ACLRIGHTS; + + /* + EcDoRpc opnums + */ + typedef [public, enum8bit, flag(NDR_PAHEX)] enum + { + RopNone = 0x00, + RopRelease = 0x01, + RopOpenFolder = 0x02, + RopOpenMessage = 0x03, + RopGetHierarchyTable = 0x04, + RopGetContentsTable = 0x05, + RopCreateMessage = 0x06, + RopGetPropertiesSpecific = 0x07, + RopGetPropertiesAll = 0x08, + RopGetPropertiesList = 0x09, + RopSetProperties = 0x0a, + RopDeleteProperties = 0x0b, + RopSaveChangesMessage = 0x0c, + RopRemoveAllRecipients = 0x0d, + RopModifyRecipients = 0x0e, + RopReadRecipients = 0x0f, + RopReloadCachedInformation = 0x10, + RopSetMessageReadFlag = 0x11, + RopSetColumns = 0x12, + RopSortTable = 0x13, + RopRestrict = 0x14, + RopQueryRows = 0x15, + RopGetStatus = 0x16, + RopQueryPosition = 0x17, + RopSeekRow = 0x18, + RopSeekRowBookmark = 0x19, + RopSeekRowFractional = 0x1a, + RopCreateBookmark = 0x1b, + RopCreateFolder = 0x1c, + RopDeleteFolder = 0x1d, + RopDeleteMessages = 0x1e, + RopGetMessageStatus = 0x1f, + RopSetMessageStatus = 0x20, + RopGetAttachmentTable = 0x21, + RopOpenAttachment = 0x22, + RopCreateAttachment = 0x23, + RopDeleteAttachment = 0x24, + RopSaveChangesAttachment = 0x25, + RopSetReceiveFolder = 0x26, + RopGetReceiveFolder = 0x27, + RopSpoolerRules = 0x28, + RopRegisterNotification = 0x29, + RopNotify = 0x2a, + RopOpenStream = 0x2b, + RopReadStream = 0x2c, + RopWriteStream = 0x2d, + RopSeekStream = 0x2e, + RopSetStreamSize = 0x2f, + RopSetSearchCriteria = 0x30, + RopGetSearchCriteria = 0x31, + RopSubmitMessage = 0x32, + RopMoveCopyMessages = 0x33, + RopAbortSubmit = 0x34, + RopMoveFolder = 0x35, + RopCopyFolder = 0x36, + RopQueryColumnsAll = 0x37, + RopAbort = 0x38, + RopCopyTo = 0x39, + RopCopyToStream = 0x3a, + RopCloneStream = 0x3b, + RopRegisterTableNotification = 0x3c, + RopDeregisterTableNotification = 0x3d, + RopGetPermissionsTable = 0x3e, /* RopGetACLTable */ + RopGetRulesTable = 0x3f, + RopModifyPermissions = 0x40, + RopModifyRules = 0x41, + RopGetOwningServers = 0x42, + RopLongTermIdFromId = 0x43, + RopIdFromLongTermId = 0x44, + RopPublicFolderIsGhosted = 0x45, + RopOpenEmbeddedMessage = 0x46, + RopSetSpooler = 0x47, + RopSpoolerLockMessage = 0x48, + RopGetAddressTypes = 0x49, + RopTransportSend = 0x4a, + RopFastTransferSourceCopyMessages = 0x4b, /* NEW */ + RopFastTransferSourceCopyFolder = 0x4c, /* NEW */ + RopFastTransferSourceCopyTo = 0x4d, /* NEW */ + RopFastTransferSourceGetBuffer = 0x4e, + RopFindRow = 0x4f, + RopProgress = 0x50, + RopTransportNewMail = 0x51, + RopGetValidAttachments = 0x52, + RopFastTransferDestinationConfigure = 0x53, /* NEW */ + RopFastTransferDestinationPutBuffer = 0x54, /* NEW */ + RopGetNamesFromPropertyIds = 0x55, + RopGetPropertyIdsFromNames = 0x56, + RopUpdateDeferredActionMessages = 0x57, + RopEmptyFolder = 0x58, + RopExpandRow = 0x59, + RopCollapseRow = 0x5a, + RopLockRegionStream = 0x5b, + RopUnlockRegionStream = 0x5c, + RopCommitStream = 0x5d, + RopGetStreamSize = 0x5e, + RopQueryNamedProperties = 0x5f, + RopGetPerUserLongTermIds = 0x60, + RopGetPerUserGuid = 0x61, + RopFlushPerUser = 0x62, + RopReadPerUserInformation = 0x63, + RopWritePerUserInformation = 0x64, /* NEW */ + RopCacheCcnRead = 0x65, + RopSetReadFlags = 0x66, + RopCopyProperties = 0x67, + RopGetReceiveFolderTable = 0x68, + RopFastTransferSourceCopyProperties = 0x69, /* NEW */ + RopFastTransferDestinationCopyProperties = 0x6a, /* NEW */ + RopGetCollapseState = 0x6b, + RopSetCollapseState = 0x6c, + RopGetTransportFolder = 0x6d, + RopPending = 0x6e, + RopOptionsData = 0x6f, + RopSynchronizationConfigure = 0x70, + RopIncrState = 0x71, + RopSynchronizationImportMessageChange = 0x72, + RopSynchronizationImportHierarchyChange = 0x73, + RopSynchronizationImportDeletes = 0x74, + RopSynchronizationUploadStateStreamBegin = 0x75, + RopSynchronizationUploadStateStreamContinue = 0x76, + RopSynchronizationUploadStateStreamEnd = 0x77, + RopSynchronizationImportMessageMove = 0x78, + RopSetPropertiesNoReplicate = 0x79, + RopDeletePropertiesNoReplicate = 0x7a, + RopGetStoreState = 0x7b, + RopGetRights = 0x7c, + RopGetAllPerUserLtids = 0x7d, + RopSynchronizationOpenCollector = 0x7e, + RopGetLocalReplicaIds = 0x7f, + RopSynchronizationImportReadStateChanges = 0x80, + RopResetTable = 0x81, + RopSynchronizationGetTransferState = 0x82, + RopOpenAdvisor = 0x83, + RopRegICSNotifs = 0x84, + RopOpenCStream = 0x85, + RopTellVersion = 0x86, /* NEW */ + RopOpenPublicFolderByName = 0x87, + RopSetSyncNotificationGuid = 0x88, + RopFreeBookmark = 0x89, + RopWriteAndCommitStream = 0x90, + RopHardDeleteMessages = 0x91, + RopHardDeleteMessagesAndSubfolders = 0x92, + RopSetLocalReplicaMidsetDeleted = 0x93, /* NEW */ + RopTransportDeliverMessage = 0x94, + RopTransportDoneWithMessage = 0x95, + RopIdFromLegacyDN = 0x96, + RopSetAuthenticatedContext = 0x97, + RopCopyToEx = 0x98, + RopImportMsgChangePartial = 0x99, + RopSetMessageFlags = 0x9a, + RopMoveCopyMessagesEx = 0x9b, + RopFXSrcGetBufferEx = 0x9c, + RopFXDstPutBufferEx = 0x9d, + RopTransportDeliverMessage2 = 0x9e, + RopCreateMessageEx = 0x9f, + RopMoveCopyMessagesEID = 0xA0, + RopTransportDupDlvCheck = 0xA1, + RopPrereadMessages = 0xA2, + RopWriteStreamExtended = 0xA3, + RopGetContentsTableExtended = 0xA4, + RopStartScope = 0xA5, + RopEndScope = 0xA6, + RopEchoString = 0xC8, + RopEchoInt = 0xC9, + RopEchoBinary = 0xCA, + RopBackoff = 0xF9, /* NEW */ + RopExtendedError = 0xFA, /* NEW */ + RopBookmarkReturned = 0xFB, + RopFidReturned = 0xFC, + RopHsotReturned = 0xFd, + RopLogon = 0xFE, + RopBufferTooSmall = 0xFF + } ROP_OPNUM; + + typedef [public,noprint,flag(NDR_NOALIGN)] struct { + uint16 cb; + [flag(NDR_BUFFERS), size_is(cb)] uint8 lpb[]; + } SBinary_short; + + typedef [public] struct { + uint32 cValues; + [size_is(cValues)] uint32 lpl[]; + } mapi_MV_LONG_STRUCT; + + typedef [public] struct { + astring lppszA; + } mapi_LPSTR; + + typedef [public] struct { + uint32 cValues; + [size_is(cValues)] mapi_LPSTR strings[]; + } mapi_SLPSTRArray; + + typedef struct { + [flag(STR_NULLTERM)] string lppszW; + } mapi_LPWSTR; + + typedef struct { + uint32 cValues; + [size_is(cValues)] mapi_LPWSTR strings[]; + } mapi_SPLSTRArrayW; + + typedef [public] struct { + uint32 cValues; + [size_is(cValues)] SBinary_short bin[]; + } mapi_SBinaryArray; + + typedef struct { + uint32 cValues; + [size_is(cValues)] GUID lpguid[]; + } mapi_SGuidArray; + + /******* part of the no-pointer deep recursion hack *******/ + typedef [nopull,nopush,noprint,flag(NDR_NOALIGN)] struct { + uint8 wrap[0x8000]; + } mapi_SRestriction_wrap; + + typedef [nopush,nopull,noprint,flag(NDR_NOALIGN)] struct { + uint8 wrap[0x8000]; + } mapi_SPropValue_wrap; + + typedef [nopush,nopull,noprint,flag(NDR_NOALIGN)] struct { + uint8 wrap[0x8000]; + } mapi_SPropValue_array_wrap; + /**********************************************************/ + + typedef [enum8bit] enum { + ActionType_OP_MOVE = 0x1, + ActionType_OP_COPY = 0x2, + ActionType_OP_REPLY = 0x3, + ActionType_OP_OOF_REPLY = 0x4, + ActionType_OP_DEFER_ACTION = 0x5, + ActionType_OP_BOUNCE = 0x6, + ActionType_OP_FORWARD = 0x7, + ActionType_OP_DELEGATE = 0x8, + ActionType_OP_TAG = 0x9, + ActionType_OP_DELETE = 0xA, + ActionType_OP_MARK_AS_READ = 0xB + } ActionType; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 FolderInThisStore; + SBinary_short StoreEID; + SBinary_short FolderEID; + } MoveCopy_Action; + + typedef [flag(NDR_NOALIGN)] struct { + hyper ReplyTemplateFID; + hyper ReplyTemplateMID; + GUID ReplyTemplateGUID; + } ReplyOOF_Action; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 Reserved; + mapi_SPropValue_array_wrap PropertyValue; + } RecipientBlock; + + typedef [flag(NDR_NOALIGN)] enum { + BOUNCE_MESSAGE_TOO_LARGE = 0x0000000d, + BOUNCE_MESSAGE_NOT_DISPLAYED = 0x0000001f, + BOUNCE_MESSAGE_DENIED = 0x00000026 + } BounceCode; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 RecipientCount; + [size_is(RecipientCount)] RecipientBlock RecipientBlock[]; + } ForwardDelegate_Action; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(ActionType_OP_MOVE)] MoveCopy_Action MoveAction; + [case(ActionType_OP_COPY)] MoveCopy_Action CopyAction; + [case(ActionType_OP_REPLY)] ReplyOOF_Action ReplyAction; + [case(ActionType_OP_OOF_REPLY)] ReplyOOF_Action ReplyOOFAction; + [case(ActionType_OP_DEFER_ACTION)][flag(NDR_REMAINING)] DATA_BLOB DeferAction; + [case(ActionType_OP_BOUNCE)] BounceCode BounceCode; + [case(ActionType_OP_TAG)] mapi_SPropValue_wrap PropValue; + [case(ActionType_OP_FORWARD)] ForwardDelegate_Action ForwardAction; + [case(ActionType_OP_DELEGATE)] ForwardDelegate_Action DelegateAction; + [case(ActionType_OP_DELETE)]; + [case(ActionType_OP_MARK_AS_READ)]; + } ActionData; + + typedef [flag(NDR_NOALIGN)] struct { + ActionType ActionType; + uint32 ActionFlavor; + uint32 ActionFlags; + [switch_is(ActionType)] ActionData ActionDataBuffer; + } ActionBlockData; + + typedef [flag(NDR_NOALIGN)] struct { + [flag(NDR_REMAINING)] [represent_as(uint16)] ActionBlockData ActionBlockData; + } ActionBlock; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 count; + [size_is(count)] ActionBlock ActionBlock[]; + } RuleAction; + + typedef struct { + [range(0,100000)] uint32 cValues; + [size_is(cValues)] uint16 *lpi; + } ShortArray_r; + + typedef struct { + [range(0,100000)] uint32 cValues; + [size_is(cValues)] uint32 *lpl; + } LongArray_r; + + typedef struct { + [range(0,100000)] uint32 cValues; + [size_is(cValues)] Binary_r *lpbin; + } BinaryArray_r; + + typedef struct { + [range(0,100000)] uint32 cValues; + [size_is(cValues)] FILETIME *lpft; + } DateTimeArray_r; + + typedef [public] struct { + [range(0,2097152)] uint32 cb; + [size_is(cb)] uint8 *lpb; + } Binary_r; + + typedef [switch_type(uint32)] union { + [case(PT_I2)] uint16 i; + [case(PT_LONG)] uint32 l; + [case(PT_DOUBLE)] dlong dbl; + [case(PT_BOOLEAN)] uint8 b; + [case(PT_I8)] dlong d; + [case(PT_STRING8)][unique][string,charset(DOS)] uint8 *lpszA; + [case(PT_BINARY)] Binary_r bin; + [case(PT_SVREID)] SBinary_short svreid; + [case(PT_UNICODE)][string,charset(UTF16)] uint16 *lpszW; + [case(PT_CLSID)] GUID *lpguid; + [case(PT_SRESTRICT)] mapi_SRestriction_wrap Restrictions; + [case(PT_ACTIONS)] RuleAction RuleAction; + [case(PT_SYSTIME)] FILETIME ft; + [case(PT_ERROR)] MAPISTATUS err; + [case(PT_MV_I2)] ShortArray_r MVi; + [case(PT_MV_LONG)] LongArray_r MVl; + [case(PT_MV_STRING8)] mapi_SLPSTRArray MVszA; + [case(PT_MV_BINARY)] mapi_SBinaryArray MVbin; + [case(PT_MV_CLSID)] mapi_SGuidArray MVguid; + [case(PT_MV_UNICODE)] mapi_SPLSTRArrayW MVszW; + [case(PT_MV_SYSTIME)] DateTimeArray_r MVft; + [case(PT_NULL)] uint32 null; + [case(PT_OBJECT)] uint32 object; + } mapi_SPropValue_CTR; + + typedef [public,flag(NDR_NOALIGN)] struct { + MAPITAGS ulPropTag; + [switch_is(ulPropTag & 0xFFFF)] mapi_SPropValue_CTR value; + } mapi_SPropValue; + + typedef [public,flag(NDR_NOALIGN)] struct { + uint16 cValues; + [flag(NDR_REMAINING), size_is(cValues)]mapi_SPropValue lpProps[]; + } mapi_SPropValue_array; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 cValues; + [size_is(cValues)] MAPITAGS aulPropTag[]; + } mapi_SPropTagArray; + + typedef [enum8bit, flag(NDR_PAHEX)] enum { + ROW_ADD = 0x1, + ROW_MODIFY = 0x2, + ROW_REMOVE = 0x4 + } ulRowFlags; + + /**************************/ + /* ROP: RopRelease(0x1) */ + typedef [nopush,nopull,flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } Release_req; + + typedef [nopush,nopull,flag(NDR_NOALIGN)] struct { + } Release_repl; + + /**************************/ + /* ROP: RopOpenFolder(0x2) */ + typedef [enum8bit] enum { + OpenModeFlags_Folder = 0x0, + OpenModeFlags_SoftDeleted = 0x4 + } OpenFolder_OpenModeFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + hyper FolderId; + OpenFolder_OpenModeFlags OpenModeFlags; + } OpenFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 ServerCount; + uint16 CheapServerCount; + [size_is(ServerCount)] astring Servers[]; + } OpenFolder_Replicas; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x1)] OpenFolder_Replicas Replicas; + } IsGhosted; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HasRules; + boolean8 IsGhosted; + [switch_is(IsGhosted)] IsGhosted Ghost; + } OpenFolder_Success; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] OpenFolder_Success Success; + [default]; + } OpenFolder_repl_status; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 OutputHandleIndex; + uint32 ReturnValue; + [switch_is(ReturnValue)] OpenFolder_repl_status repl; + } OpenFolder_repl; + + /**************************/ + /* ROP: RopOpenMessage(0x3) */ + typedef [enum8bit] enum { + StringType_NONE = 0x0, + StringType_EMPTY = 0x1, + StringType_STRING8 = 0x2, + StringType_UNICODE_REDUCED = 0x3, + StringType_UNICODE = 0x4 + } StringType; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x1)]; + [case(0x2)] astring lpszA; + [case(0x3)] astring lpszW_reduced; + [case(0x4)] [flag(STR_NULLTERM)] string lpszW; + } String; + + typedef [flag(NDR_NOALIGN)] struct { + StringType StringType; + [switch_is(StringType)] String String; + } TypedString; + + typedef [enum8bit] enum { + ReadOnly = 0x0, + ReadWrite = 0x1, + Create = 0x3, + OpenSoftDelete = 0x4 + } OpenMessage_OpenModeFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + uint16 CodePageId; + hyper FolderId; + OpenMessage_OpenModeFlags OpenModeFlags; + hyper MessageId; + } OpenMessage_req; + + typedef [enum16bit, flag(NDR_PAHEX)] enum { + CP_USASCII = 0x04E4, + CP_UNICODE = 0x04B0, + CP_JAUTODETECT = 0xC6F4, + CP_KAUTODETECT = 0xC705, + CP_ISO2022JPESC = 0xC42D, + CP_ISO2022JPSIO = 0xC42E + } CODEPAGEID; + + typedef [enum8bit, flag(NDR_PAHEX)] enum { + MAPI_ORIG = 0x0, + MAPI_TO = 0x1, + MAPI_CC = 0x2, + MAPI_BCC = 0x3 + } ulRecipClass; + + typedef [enum8bit, flag(NDR_PAHEX)] enum { + SINGLE_RECIPIENT = 0x0, + DISTRIBUTION_LIST = 0x1 + } addr_type; + + typedef [flag(NDR_NOALIGN)]struct { + uint8 organization_length; + addr_type addr_type; + astring username; + } RecipExchange; + + typedef [flag(NDR_NOALIGN)] struct { + } RecipSMTP; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x1)] RecipExchange EXCHANGE; + [case(0x3)] RecipSMTP SMTP; + [default]; + } recipient_type; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x400)] astring lpszA; + [case(0x600)][flag(STR_NULLTERM)] string lpszW; + [default]; + } recipient_SimpleDisplayName; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x60)]; + [case(0x260)]; + [case(0x20)] astring lpszA; + [case(0x220)][flag(STR_NULLTERM)] string lpszW; + [default]; + } recipient_TransmittableDisplayName; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x10)] astring lpszA; + [case(0x210)][flag(STR_NULLTERM)] string lpszW; + [default]; + } recipient_DisplayName; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x8)] astring lpszA; + [case(0x208)][flag(STR_NULLTERM)] string lpszW; + [default]; + } recipient_EmailAddress; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 RecipientFlags; + [switch_is(RecipientFlags & 0x7)] recipient_type type; + [switch_is(RecipientFlags & 0x208)] recipient_EmailAddress EmailAddress; + [switch_is(RecipientFlags & 0x210)] recipient_DisplayName DisplayName; + [switch_is(RecipientFlags & 0x600)] recipient_SimpleDisplayName SimpleDisplayName; + [switch_is(RecipientFlags & 0x260)] recipient_TransmittableDisplayName TransmittableDisplayName; + uint16 prop_count; + uint8 layout; + [flag(NDR_REMAINING)] DATA_BLOB prop_values; + } RecipientRow; + + typedef [flag(NDR_NOALIGN)] struct { + ulRecipClass RecipClass; + CODEPAGEID codepage; + uint16 Reserved; + [represent_as(uint16)] RecipientRow RecipientRow; + } OpenMessage_recipients; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HasNamedProperties; + TypedString SubjectPrefix; + TypedString NormalizedSubject; + uint16 RecipientCount; + uint16 ColumnCount; + mapi_SPropTagArray RecipientColumns; + uint8 RowCount; + [size_is(RowCount)] OpenMessage_recipients recipients[]; + } OpenMessage_Success; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] OpenMessage_Success Success; + [default]; + } OpenMessage_repl_status; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 OutputHandleIndex; + uint32 ReturnValue; + [switch_is(ReturnValue)] OpenMessage_repl_status repl; + } OpenMessage_repl; + + /**************************/ + /* ROP: RopGetHierarchyTable(0x4) */ + typedef [bitmap8bit] bitmap { + TableFlags_Depth = 0x4, + TableFlags_DeferredErrors = 0x8, + TableFlags_NoNotifications = 0x10, + TableFlags_SoftDeletes = 0x20, + TableFlags_UseUnicode = 0x40, + TableFlags_SuppressNotifications = 0x80 + } TableFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + TableFlags TableFlags; + } GetHierarchyTable_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 RowCount; + } GetHierarchyTable_repl_success; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] GetHierarchyTable_repl_success Success; + [default]; + } GetHierarchyTable_repl_status; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 OutputHandleIndex; + uint32 ReturnValue; + [switch_is(ReturnValue)] GetHierarchyTable_repl_status repl; + } GetHierarchyTable_repl; + + /**************************/ + /* ROP: RopGetContentsTable(0x5) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + TableFlags TableFlags; + } GetContentsTable_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 RowCount; + } GetContentsTable_repl_success; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] GetContentsTable_repl_success Success; + [default]; + } GetContentsTable_repl_status; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 OutputHandleIndex; + uint32 ReturnValue; + [switch_is(ReturnValue)] GetContentsTable_repl_status repl; + } GetContentsTable_repl; + + /**************************/ + /* ROP: RopCreateMessage(0x6) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + uint16 CodePageId; + hyper FolderId; + boolean8 AssociatedFlag; + } CreateMessage_req; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x1)] hyper MessageId; + } CreateMessage_MessageId; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HasMessageId; + [switch_is(HasMessageId)] CreateMessage_MessageId MessageId; + } CreateMessage_repl_success; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] CreateMessage_repl_success Success; + [default]; + } CreateMessage_repl_status; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 OutputHandleIndex; + uint32 ReturnValue; + [switch_is(ReturnValue)] CreateMessage_repl_status repl; + } CreateMessage_repl; + + /*************************/ + /* ROP: RopGetPropertiesSpecific(0x7) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint16 PropertySizeLimit; + uint16 WantUnicode; + uint16 prop_count; + [size_is(prop_count)] MAPITAGS properties[]; + } GetProps_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 layout; + [flag(NDR_REMAINING)] DATA_BLOB prop_data; + } GetProps_repl_success; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] GetProps_repl_success Success; + [default]; + } GetProps_repl_status; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 InputHandleIndex; + uint32 ReturnValue; + [switch_is(ReturnValue)] GetProps_repl_status repl; + } GetProps_repl; + + /*************************/ + /* ROP: RopGetPropertiesAll(0x8) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint16 PropertySizeLimit; + uint16 WantUnicode; + } GetPropsAll_req; + + typedef [flag(NDR_NOALIGN)] struct { + mapi_SPropValue_array properties; + } GetPropsAll_repl_success; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] GetPropsAll_repl_success Success; + [default]; + } GetPropsAll_repl_status; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 InputHandleIndex; + uint32 ReturnValue; + [switch_is(ReturnValue)] GetPropsAll_repl_status repl; + } GetPropsAll_repl; + + /*************************/ + /* ROP: RopGetPropertiesList(0x9) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } GetPropList_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 count; + [size_is(count)] MAPITAGS tags[]; + } GetPropList_repl; + + /*************************/ + /* ROP: RopSetProperties(0xa) */ + typedef [flag(NDR_NOALIGN)] struct { + uint32 index; /* index into array of property tags */ + MAPITAGS property_tag; /* property for which there was an error */ + MAPISTATUS error_code; /* the error that occurred for this property */ + } PropertyProblem; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + [represent_as(uint16)] mapi_SPropValue_array values; + } SetProps_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 PropertyProblemCount; + [size_is(PropertyProblemCount)] PropertyProblem PropertyProblem[]; + } SetProps_repl; + + /*************************/ + /* ROP: RopDeleteProperties(0xb) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint16 PropertyTagCount; + [size_is(PropertyTagCount)] MAPITAGS tags[]; + } DeleteProps_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 PropertyProblemCount; + [size_is(PropertyProblemCount)] PropertyProblem PropertyProblem[]; + } DeleteProps_repl; + + /*************************/ + /* ROP: RopSaveChangesMessage(0xc) */ + typedef [enum8bit] enum { + KeepOpenReadOnly = 0x9, + KeepOpenReadWrite = 0xA, + ForceSave = 0xC + } SaveFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 ResponseHandleIndex; + uint8 InputHandleIndex; + uint8 SaveFlags; + } SaveChangesMessage_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 handle_idx; + hyper MessageId; + } SaveChangesMessage_repl; + + /*************************/ + /* ROP: RopRemoveAllRecipients(0xd) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint32 ulReserved; + } RemoveAllRecipients_req; + + typedef [flag(NDR_NOALIGN)] struct { + + } RemoveAllRecipients_repl; + + /*************************/ + /* ROP: RopModifyRecipients(0xe) */ + + /* + * MODRECIP_NULL and INVALID are not part of the msdn flags + * but are added for printing support + */ + typedef [enum8bit,flag(NDR_PAHEX)] enum { + MODRECIP_NULL = 0x0, + MODRECIP_INVALID = 0x1, + MODRECIP_ADD = 0x2, + MODRECIP_MODIFY = 0x4, + MODRECIP_REMOVE = 0x8 + } modrecip; + + typedef [flag(NDR_NOALIGN)]struct { + uint32 idx; + ulRecipClass RecipClass; + [represent_as(uint16),flag(NDR_REMAINING)] RecipientRow RecipientRow; + } ModifyRecipientRow; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint16 prop_count; + [size_is(prop_count)] MAPITAGS properties[]; + uint16 cValues; + [size_is(cValues)] ModifyRecipientRow RecipientRow[]; + } ModifyRecipients_req; + + typedef [flag(NDR_NOALIGN)] struct { + + } ModifyRecipients_repl; + + /*************************/ + /* ROP: RopReadRecipients(0xf) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint32 RowId; + uint16 ulReserved; + } ReadRecipients_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 RowId; + ulRecipClass RecipientType; + uint16 CodePageId; + uint16 ulReserved; + [represent_as(uint16)] RecipientRow RecipientRow; + } ReadRecipientRow; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 RowCount; + [size_is(RowCount)] ReadRecipientRow RecipientRows[]; + } ReadRecipients_repl; + + /*************************/ + /* ROP: RopReloadCachedInformation(0x10) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + ulRecipClass RecipientType; + uint16 CodePageId; + uint16 Reserved; + [represent_as(uint16),flag(NDR_REMAINING)]RecipientRow RecipientRow; + } OpenRecipientRow; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 Reserved; + } ReloadCachedInformation_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HasNamedProperties; + TypedString SubjectPrefix; + TypedString NormalizedSubject; + uint16 RecipientCount; + mapi_SPropTagArray RecipientColumns; + uint8 RowCount; + [size_is(RowCount)] OpenRecipientRow RecipientRows[]; + } ReloadCachedInformation_repl; + + /*************************/ + /* ROP: RopSetMessageReadFlag(0x11) */ + typedef [bitmap8bit] bitmap { + SUPPRESS_RECEIPT = 0x01, + CLEAR_READ_FLAG = 0x04, + MAPI_DEFERRED_ERRORS = 0x08, + GENERATE_RECEIPT_ONLY = 0x10, + CLEAR_RN_PENDING = 0x20, + CLEAR_NRN_PENDING = 0x40 + } MSGFLAG_READ; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 ResponseHandleIndex; + uint8 InputHandleIndex; + MSGFLAG_READ ReadFlags; + [flag(NDR_REMAINING)] DATA_BLOB clientdata; + } SetMessageReadFlag_req; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x1)] uint8 LogonId; + } SetMessageReadFlag_LogonId; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x1)] uint8 ClientData[24]; + } SetMessageReadFlag_ClientData; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 ReadStatusChanged; + [switch_is(ReadStatusChanged)] SetMessageReadFlag_LogonId LogonId; + [switch_is(ReadStatusChanged)] SetMessageReadFlag_ClientData ClientData; + } SetMessageReadFlag_repl; + + /*************************/ + /* ROP: RopSetColumns(0x12) */ + typedef [enum8bit] enum { + SetColumns_TBL_SYNC = 0x0, + SetColumns_TBL_ASYNC = 0x1 + } SetColumnsFlags; + + typedef [enum8bit] enum { + TBLSTAT_COMPLETE = 0x0, + TBLSTAT_SORTING = 0x9, + TBLSTAT_SORT_ERROR = 0xA, + TBLSTAT_SETTING_COLS = 0xB, + TBLSTAT_SETCOL_ERROR = 0xD, + TBLSTAT_RESTRICTING = 0xE, + TBLSTAT_RESTRICT_ERROR = 0xF + } TableStatus; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + SetColumnsFlags SetColumnsFlags; + uint16 prop_count; + [size_is(prop_count)] MAPITAGS properties[]; + } SetColumns_req; + + typedef [flag(NDR_NOALIGN)] struct { + TableStatus TableStatus; + } SetColumns_repl; + + /**************************/ + /* ROP: RopSortTable(0x13) */ + typedef [enum8bit, flag(NDR_PAHEX)] enum { + TBL_ASYNC = 0x1, + TBL_BATCH = 0x2 + } TBL_FLAGS; + + typedef [enum8bit, flag(NDR_PAHEX)] enum { + TABLE_SORT_ASCEND = 0x0, + TABLE_SORT_COMBINE = 0x1, + TABLE_SORT_DESCEND = 0x2 + } TABLE_SORT; + + typedef [public, flag(NDR_NOALIGN)] struct _SSortOrder{ + MAPITAGS ulPropTag; + TABLE_SORT ulOrder; + } SSortOrder; + + typedef [public, flag(NDR_NOALIGN)] struct _SSortOrderSet { + uint16 cSorts; + uint16 cCategories; + uint16 cExpanded; + [size_is(cSorts)] SSortOrder aSort[]; + } SSortOrderSet; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 SortTableFlags; + SSortOrderSet lpSortCriteria; + } SortTable_req; + + typedef [flag(NDR_NOALIGN)] struct { + TableStatus TableStatus; + } SortTable_repl; + + /**************************/ + /* ROP: RopRestrict(0x14) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 cRes; + [size_is(cRes)] SRestriction_and res[]; + } mapi_SAndRestriction; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 cRes; + [size_is(cRes)] SRestriction_or res[]; + } mapi_SOrRestriction; + + typedef [flag(NDR_NOALIGN)] struct { + mapi_SRestriction_wrap res; + } mapi_SNotRestriction; + + typedef [noprint, bitmap32bit] bitmap { + FL_FULLSTRING = 0x00000, + FL_SUBSTRING = 0x00001, + FL_PREFIX = 0x00002, + FL_IGNORECASE = 0x10000, + FL_IGNORENONSPACE = 0x20000, + FL_LOOSE = 0x40000 + } fuzzyLevel; + + typedef [flag(NDR_NOALIGN)] struct { + fuzzyLevel fuzzy; + MAPITAGS ulPropTag; + mapi_SPropValue lpProp; + } mapi_SContentRestriction; + + typedef [enum8bit, flag(NDR_PAHEX)] enum { + BMR_EQZ = 0x0, + BMR_NEZ = 0x1 + } relMBR; + + typedef [flag(NDR_NOALIGN)] struct { + relMBR relMBR; + MAPITAGS ulPropTag; + uint32 ulMask; + } mapi_SBitmaskRestriction; + + typedef [enum8bit, flag(NDR_PAHEX)] enum { + RELOP_LT = 0x0, /* < */ + RELOP_LE = 0x1, /* <= */ + RELOP_GT = 0x2, /* > */ + RELOP_GE = 0x3, /* >= */ + RELOP_EQ = 0x4, /* == */ + RELOP_NE = 0x5, /* != */ + RELOP_RE = 0x6 /* LIKE (Regular expression) */ + } CompareRelop; + + typedef [flag(NDR_NOALIGN)] struct { + CompareRelop relop; + MAPITAGS ulPropTag; + uint32 size; + } mapi_SSizeRestriction; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 relop; + MAPITAGS ulPropTag; + mapi_SPropValue lpProp; + } mapi_SPropertyRestriction; + + typedef [flag(NDR_NOALIGN)] struct { + CompareRelop relop; + MAPITAGS ulPropTag1; + MAPITAGS ulPropTag2; + } mapi_SCompareProps; + + typedef [flag(NDR_NOALIGN)] struct { + MAPITAGS ulPropTag; + } mapi_SExistRestriction; + + typedef [flag(NDR_NOALIGN)] struct { + MAPITAGS ulSubObject; + [size_is(ulSubObject - ulSubObject + 1)] SRestriction_sub res[]; /* nasty hack - generates fake pointer */ + } mapi_SSubRestriction; + + typedef [nopush,nopull,noprint,nodiscriminant] union { + [case(0x0)]; + [case(0x1)] SRestriction_comment *res; + } RestrictionVariable; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 TaggedValuesCount; + [size_is(TaggedValuesCount)] mapi_SPropValue TaggedValues[]; + boolean8 RestrictionPresent; + [switch_is(RestrictionPresent)] RestrictionVariable Restriction; + } mapi_SCommentRestriction; + + typedef [public,nodiscriminant] union { + [case(RES_AND)] mapi_SAndRestriction resAnd; + [case(RES_OR)] mapi_SOrRestriction resOr; + [case(RES_NOT)] mapi_SNotRestriction resNot; + [case(RES_CONTENT)] mapi_SContentRestriction resContent; + [case(RES_PROPERTY)] mapi_SPropertyRestriction resProperty; + [case(RES_COMPAREPROPS)] mapi_SCompareProps resCompareProps; + [case(RES_BITMASK)] mapi_SBitmaskRestriction resBitmask; + [case(RES_SIZE)] mapi_SSizeRestriction resSize; + [case(RES_EXIST)] mapi_SExistRestriction resExist; + [case(RES_SUBRESTRICTION)] mapi_SSubRestriction resSub; + [case(RES_COMMENT)] mapi_SCommentRestriction resComment; + [default]; + } mapi_SRestriction_CTR; + + typedef [public,flag(NDR_NOALIGN)] struct { + uint8 rt; + [switch_is(rt)] mapi_SRestriction_CTR res; + } mapi_SRestriction; + + typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction_and { + uint8 rt; + [switch_is(rt)] mapi_SRestriction_CTR res; + } SRestriction_and; + + typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction_or { + uint8 rt; + [switch_is(rt)] mapi_SRestriction_CTR res; + } SRestriction_or; + + typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction_sub { + uint8 rt; + [switch_is(rt)] mapi_SRestriction_CTR res; + } SRestriction_sub; + + typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction_comment { + uint8 rt; + [switch_is(rt)] mapi_SRestriction_CTR res; + } SRestriction_comment; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 handle_idx; + [represent_as(uint16)] mapi_SRestriction restrictions; + } Restrict_req; + + typedef [flag(NDR_NOALIGN)] struct { + TableStatus TableStatus; + } Restrict_repl; + + /**************************/ + /* ROP: RopQueryRows(0x15) */ + typedef [enum8bit] enum { + TBL_ADVANCE = 0x0, + TBL_NOADVANCE = 0x1, + TBL_ENABLEPACKEDBUFFERS = 0x2 + } QueryRowsFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + QueryRowsFlags QueryRowsFlags; + uint8 ForwardRead; + uint16 RowCount; + } QueryRows_req; + + typedef [nopush,nopull,flag(NDR_NOALIGN)] struct { + uint8 Origin; + uint16 RowCount; + [flag(NDR_REMAINING)]DATA_BLOB RowData; + } QueryRows_repl; + + /**************************/ + /* ROP: RopGetStatus(0x16) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } GetStatus_req; + + typedef [flag(NDR_NOALIGN)] struct { + TableStatus TableStatus; + } GetStatus_repl; + + /**************************/ + /* ROP: RopQueryPosition(0x17) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } QueryPosition_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 Numerator; + uint32 Denominator; + } QueryPosition_repl; + + /**************************/ + /* ROP: RopSeekRow(0x18) */ + typedef [enum8bit] enum { + BOOKMARK_BEGINNING = 0x0, + BOOKMARK_CURRENT = 0x1, + BOOKMARK_END = 0x2, + BOOKMARK_USER = 0x3 + } BOOKMARK; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + BOOKMARK origin; + int32 offset; + boolean8 WantRowMovedCount; + } SeekRow_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HasSoughtLess; + uint32 RowsSought; + } SeekRow_repl; + + /**************************/ + /* ROP: RopSeekRowBookmark(0x19) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + SBinary_short Bookmark; + uint32 RowCount; + boolean8 WantRowMovedCount; + } SeekRowBookmark_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 RowNoLongerVisible; + boolean8 HasSoughtLess; + uint32 RowsSought; + } SeekRowBookmark_repl; + + /**************************/ + /* ROP: RopSeekRowFractional(0x1a) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint32 ulNumerator; + uint32 ulDenominator; + } SeekRowApprox_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SeekRowApprox_repl; + + /**************************/ + /* ROP: RopCreateBookmark(0x1b) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } CreateBookmark_req; + + typedef [flag(NDR_NOALIGN)] struct { + SBinary_short bookmark; + } CreateBookmark_repl; + + /**************************/ + /* ROP: RopCreateFolder(0x1c) */ + typedef [enum8bit] enum { + FOLDER_GENERIC = 0x1, + FOLDER_SEARCH = 0x2 + } FOLDER_TYPE; + + typedef [enum8bit] enum { + MAPI_FOLDER_ANSI = 0x0, + MAPI_FOLDER_UNICODE = 0x1 + } FOLDER_STRING; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(MAPI_FOLDER_ANSI)] astring lpszA; + [case(MAPI_FOLDER_UNICODE)][flag(STR_NULLTERM)] string lpszW; + } LPTSTR; + + typedef [enum16bit] enum { + NONE = 0x0000, + OPEN_IF_EXISTS = 0x0001 + } FOLDER_FLAGS; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + FOLDER_TYPE ulFolderType; + FOLDER_STRING ulType; + FOLDER_FLAGS ulFlags; + [switch_is(ulType)] LPTSTR FolderName; + [switch_is(ulType)] LPTSTR FolderComment; + } CreateFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HasRules; + boolean8 IsGhosted; + [switch_is(IsGhosted)] IsGhosted Ghost; + } CreateFolder_GhostInfo; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [case(0x1)] CreateFolder_GhostInfo GhostInfo; + } CreateFolder_GhostUnion; + + typedef [flag(NDR_NOALIGN)] struct { + hyper folder_id; + boolean8 IsExistingFolder; + [switch_is(IsExistingFolder)] CreateFolder_GhostUnion GhostUnion; + } CreateFolder_repl; + + /**************************/ + /* ROP: RopDeleteFolder(0x1d) */ + typedef [bitmap8bit] bitmap { + DEL_MESSAGES = 0x1, + DEL_FOLDERS = 0x4, + DELETE_HARD_DELETE = 0x10 + } DeleteFolderFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + DeleteFolderFlags DeleteFolderFlags; + hyper FolderId; + } DeleteFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } DeleteFolder_repl; + + /**************************/ + /* ROP: RopDeleteMessages(0x1e) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + boolean8 WantAsynchronous; + boolean8 NotifyNonRead; + uint16 cn_ids; + [size_is(cn_ids)] hyper message_ids[]; + } DeleteMessages_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } DeleteMessages_repl; + + /**************************/ + /* ROP: RopGetMessageStatus(0x1f) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper msgid; + } GetMessageStatus_req; + + /**************************/ + /* ROP: RopSetMessageStatus(0x20) */ + typedef [bitmap32bit] bitmap { + MSGSTATUS_HIGHLIGHTED = 0x1, + MSGSTATUS_TAGGED = 0x2, + MSGSTATUS_HIDDEN = 0x4, + MSGSTATUS_DELMARKED = 0x8, + MSGSTATUS_REMOTE_DOWNLOAD = 0x1000, + MSGSTATUS_REMOTE_DELETE = 0x2000 + } ulMessageStatus; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper msgid; + uint32 ulNewStatus; + ulMessageStatus ulNewStatusMask; + } SetMessageStatus_req; + + typedef [flag(NDR_NOALIGN)] struct { + ulMessageStatus ulOldStatus; + } SetMessageStatus_repl; + + /**************************/ + /* ROP: RopGetAttachmentTable(0x21) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + TableFlags TableFlags; + } GetAttachmentTable_req; + + typedef [flag(NDR_NOALIGN)] struct { + } GetAttachmentTable_repl; + + /*************************/ + /* ROP: RopOpenAttachment(0x22) */ + typedef [enum8bit] enum { + OpenAttachmentFlags_ReadOnly = 0x0, + OpenAttachmentFlags_ReadWrite = 0x1, + OpenAttachmentFlags_BestAccess = 0x3 + } OpenAttachmentFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + OpenAttachmentFlags OpenAttachmentFlags; + uint32 AttachmentID; + } OpenAttach_req; + + typedef [flag(NDR_NOALIGN)] struct { + } OpenAttach_repl; + + /*************************/ + /* ROP: RopCreateAttachment(0x23) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + } CreateAttach_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 AttachmentID; + } CreateAttach_repl; + + /*************************/ + /* ROP: RopDeleteAttachment(0x24) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint32 AttachmentID; + } DeleteAttach_req; + + + typedef [flag(NDR_NOALIGN)] struct { + } DeleteAttach_repl; + + /*************************/ + /* ROP: RopSaveChangesAttachment(0x25) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 ResponseHandleIndex; + uint8 InputHandleIndex; + SaveFlags SaveFlags; + } SaveChangesAttachment_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SaveChangesAttachment_repl; + + /*************************/ + /* ROP: RopSetReceiveFolder(0x26) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper fid; + astring lpszMessageClass; + } SetReceiveFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SetReceiveFolder_repl; + + /*************************/ + /* ROP: RopGetReceiveFolder(0x27) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + astring MessageClass; + } GetReceiveFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + hyper folder_id; + astring MessageClass; + } GetReceiveFolder_repl; + + /*************************/ + /* ROP: RopRegisterNotification(0x29) */ + typedef [enum16bit] enum { + fnevCriticalError = 0x0001, + fnevNewMail = 0x0002, + fnevObjectCreated = 0x0004, + fnevObjectDeleted = 0x0008, + fnevObjectModified = 0x0010, + fnevObjectMoved = 0x0020, + fnevObjectCopied = 0x0040, + fnevSearchComplete = 0x0080, + fnevTableModified = 0x0100, + fnevStatusObjectModified = 0x0200, + fnevReserved = 0x0400, + fnevTbit = 0x1000, + fnevUbit = 0x2000, + fnevSbit = 0x4000, + fnevMbit = 0x8000 + } NotificationFlags; + + typedef [nodiscriminant,flag(NDR_NOALIGN)] union { + [case(0x0)] hyper ID; + [case(0x1)]; + } hyperbool; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + NotificationFlags notificationFlags; + uint8 layout; + [switch_is(layout)] hyperbool u; + } RegisterNotification_req; + + typedef [flag(NDR_NOALIGN)] struct { + } RegisterNotification_repl; + + /*************************/ + /* ROP: RopNotify(0x2a) */ + typedef [bitmap32bit] bitmap { + MSGFLAG_READ = 0x1, + MSGFLAG_UNMODIFIED = 0x2, + MSGFLAG_SUBMIT = 0x4, + MSGFLAG_UNSENT = 0x8, + MSGFLAG_HASATTACH = 0x10, + MSGFLAG_FROMME = 0x20, + MSGFLAG_ASSOCIATED = 0x40, + MSGFLAG_RESEND = 0x80, + MSGFLAG_RN_PENDING = 0x100, + MSGFLAG_NRN_PENDING = 0x200 + } MsgFlags; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] astring lpszA; + [case(0x1)][flag(STR_NULLTERM)] string lpszW; + } MessageClass; + + typedef [flag(NDR_NOALIGN)] struct { + GUID DatabaseGUID; + uint8 GlobalCounter[6]; + } GID; + + typedef [enum16bit] enum { + TABLE_CHANGED = 0x1, + TABLE_ROW_ADDED = 0x3, + TABLE_ROW_DELETED = 0x4, + TABLE_ROW_MODIFIED = 0x5, + TABLE_RESTRICT_DONE = 0x7 + } RichTableNotificationType; + + /* NewMailNotification: case 0x2 and 0x8002 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + MsgFlags MessageFlags; + boolean8 UnicodeFlag; + [switch_is(UnicodeFlag)] MessageClass MessageClass; + } NewMailNotification; + + /* FolderCreatedNotification: case 0x4 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper ParentFID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + } FolderCreatedNotification; + + /* FolderDeletedNotification: case 0x8 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper ParentFID; + } FolderDeletedNotification; + + /* FolderModifiedNotification: case 0x10 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + } FolderModifiedNotification_10; + + /* FolderMoveCopyNotification: case 0x20 and 0x40 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper ParentFID; + hyper OldFID; + hyper OldParentFID; + } FolderMoveCopyNotification; + + /* SearchCompleteNotification: case 0x80 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + } SearchCompleteNotification; + + /* HierarchyTable: case 0x100 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper InsertAfterFID; + [represent_as(uint16)] DATA_BLOB Columns; + } HierarchyRowAddedNotification; + + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + } HierarchyRowDeletedNotification; + + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper InsertAfterFID; + [represent_as(uint16)] DATA_BLOB Columns; + } HierarchyRowModifiedNotification; + + typedef [nodiscriminant] union { + [case(TABLE_ROW_ADDED)] HierarchyRowAddedNotification HierarchyRowAddedNotification; + [case(TABLE_ROW_DELETED)] HierarchyRowDeletedNotification HierarchyRowDeletedNotification; + [case(TABLE_ROW_MODIFIED)] HierarchyRowModifiedNotification HierarchyRowModifiedNotification; + [default]; + } HierarchyTableChangeUnion; + + typedef [flag(NDR_NOALIGN)] struct { + RichTableNotificationType TableEvent; + [switch_is(TableEvent)] HierarchyTableChangeUnion HierarchyTableChangeUnion; + } HierarchyTableChange; + + /* IcsNotification: case 0x200 */ + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HierChanged; + uint32 GIDCount; + [size_is(GIDCount)] GID GID[]; + } IcsNotification; + + /* FolderModifiedNotification: case 0x1010 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + uint32 TotalMessageCount; + } FolderModifiedNotification_1010; + + /* FolderModifiedNotification: case 0x2010 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + uint32 UnreadMessageCount; + } FolderModifiedNotification_2010; + + /* FolderModifiedNotification: case 0x3010 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + uint32 TotalMessageCount; + uint32 UnreadMessageCount; + } FolderModifiedNotification_3010; + + /* MessageCreatedNotification: case 0x8004 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + } MessageCreatedNotification; + + /* MessageDeletedNotification: case 0x8008 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + } MessageDeletedNotification; + + /* MessageModifiedNotification: case 0x8010 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + } MessageModifiedNotification; + + /* MessageMoveCopyNotification: case 0x8020 and 0x8040 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + hyper OldFID; + hyper OldMID; + } MessageMoveCopyNotification; + + /* ContentsTableChange: case 0x8100 and 0xc100 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + uint32 Instance; + hyper InsertAfterFID; + hyper InsertAfterMID; + uint32 InsertAfterInstance; + [represent_as(uint16)] DATA_BLOB Columns; + } ContentsRowAddedNotification; + + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + uint32 Instance; + } ContentsRowDeletedNotification; + + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + uint32 Instance; + hyper InsertAfterFID; + hyper InsertAfterMID; + uint32 InsertAfterInstance; + [represent_as(uint16)] DATA_BLOB Columns; + } ContentsRowModifiedNotification; + + typedef [nodiscriminant] union { + [case(TABLE_ROW_ADDED)] ContentsRowAddedNotification ContentsRowAddedNotification; + [case(TABLE_ROW_DELETED)] ContentsRowDeletedNotification ContentsRowDeletedNotification; + [case(TABLE_ROW_MODIFIED)] ContentsRowModifiedNotification ContentsRowModifiedNotification; + [default]; + } ContentsTableChangeUnion; + + typedef [flag(NDR_NOALIGN)] struct { + RichTableNotificationType TableEvent; + [switch_is(TableEvent)] ContentsTableChangeUnion ContentsTableChangeUnion; + } ContentsTableChange; + + /* SearchMessageCreatedNotification: case 0xc004 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + hyper SearchFID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + } SearchMessageCreatedNotification; + + /* SearchMessageRemovedNotification: case 0xc008 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + hyper SearchFID; + } SearchMessageRemovedNotification; + + /* SearchMessageModifiedNotification: 0xc010 */ + typedef [flag(NDR_NOALIGN)] struct { + hyper FID; + hyper MID; + uint16 TagCount; + [size_is(TagCount)] MAPITAGS Tags[]; + } SearchMessageModifiedNotification; + + typedef [nodiscriminant] union { + [case(0x0002)] NewMailNotification NewMailNotification; + [case(0x0004)] FolderCreatedNotification FolderCreatedNotification; + [case(0x0008)] FolderDeletedNotification FolderDeletedNotification; + [case(0x0010)] FolderModifiedNotification_10 FolderModifiedNotification_10; + [case(0x0020)] FolderMoveCopyNotification FolderMoveNotification; + [case(0x0040)] FolderMoveCopyNotification FolderCopyNotification; + [case(0x0080)] SearchCompleteNotification SearchCompleteNotification; + [case(0x0100)] HierarchyTableChange HierarchyTableChange; + [case(0x0200)] IcsNotification IcsNotification; + [case(0x1010)] FolderModifiedNotification_1010 FolderModifiedNotification_1010; + [case(0x2010)] FolderModifiedNotification_2010 FolderModifiedNotification_2010; + [case(0x3010)] FolderModifiedNotification_3010 FolderModifiedNotification_3010; + [case(0x8002)] NewMailNotification NewMessageNotification; + [case(0x8004)] MessageCreatedNotification MessageCreatedNotification; + [case(0x8008)] MessageDeletedNotification MessageDeletedNotification; + [case(0x8010)] MessageModifiedNotification MessageModifiedNotification; + [case(0x8020)] MessageMoveCopyNotification MessageMoveNotification; + [case(0x8040)] MessageMoveCopyNotification MessageCopyNotification; + [case(0x8100)] ContentsTableChange ContentsTableChange; + [case(0xc004)] SearchMessageCreatedNotification SearchMessageCreatedNotification; + [case(0xc008)] SearchMessageRemovedNotification SearchMessageRemovedNotification; + [case(0xc010)] SearchMessageModifiedNotification SearchMessageModifiedNotification; + [case(0xc100)] ContentsTableChange SearchTableChange; + } NotificationData; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 NotificationHandle; + uint8 LogonId; + NotificationFlags NotificationType; + [switch_is(NotificationType)] NotificationData NotificationData; + } Notify_repl; + + /*************************/ + /* ROP: RopOpenStream(0x2b) */ + typedef [enum8bit] enum { + OpenStream_ReadOnly = 0x0, + OpenStream_ReadWrite = 0x1, + OpenStream_Create = 0x2, + OpenStream_BestAccess = 0x3 + } OpenStream_OpenModeFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + MAPITAGS PropertyTag; + OpenStream_OpenModeFlags OpenModeFlags; + } OpenStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 StreamSize; + } OpenStream_repl; + + /*************************/ + /* ROP: RopReadStream(0x2c) */ + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0xBABE)] uint32 value; + [default]; + } MaximumByteCount; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint16 ByteCount; + [switch_is(ByteCount)] MaximumByteCount MaximumByteCount; + } ReadStream_req; + + typedef [flag(NDR_ALIGN2)] struct { + [represent_as(uint16), flag(NDR_REMAINING)] DATA_BLOB data; + } ReadStream_repl; + + /*************************/ + /* ROP: RopWriteStream(0x2d) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + [represent_as(uint16), flag(NDR_REMAINING)] DATA_BLOB data; + } WriteStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 WrittenSize; + } WriteStream_repl; + + /*************************/ + /* ROP: RopSeekStream(0x2e) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 Origin; + hyper Offset; + } SeekStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + hyper NewPosition; + } SeekStream_repl; + + /*************************/ + /* ROP: RopSetStreamSize(0x2f) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper SizeStream; + } SetStreamSize_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SetStreamSize_repl; + + /*************************/ + /* ROP: RopSetSearchCriteria(0x30) */ + typedef [bitmap32bit, flag(NDR_PAHEX)] bitmap { + STOP_SEARCH = 0x00000001, + RESTART_SEARCH = 0x00000002, + RECURSIVE_SEARCH = 0x00000004, + SHALLOW_SEARCH = 0x00000008, + FOREGROUND_SEARCH = 0x00000010, + BACKGROUND_SEARCH = 0x00000020, + CONTENT_INDEXED_SEARCH = 0x00010000, + NON_CONTENT_INDEXED_SEARCH = 0x00020000, + STATIC_SEARCH = 0x00040000 + } SearchFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + [represent_as(uint16)] mapi_SRestriction res; + uint16 FolderIdCount; + [size_is(FolderIdCount)] hyper FolderIds[]; + SearchFlags SearchFlags; + } SetSearchCriteria_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SetSearchCriteria_repl; + + /*************************/ + /* ROP: RopGetSearchCriteria(0x31) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + boolean8 UseUnicode; + boolean8 IncludeRestriction; + boolean8 IncludeFolders; + } GetSearchCriteria_req; + + typedef [flag(NDR_NOALIGN)] struct { + [represent_as(uint16)] mapi_SRestriction res; + uint8 unknown; + uint16 FolderIdCount; + [size_is(FolderIdCount)] hyper FolderIds[]; + SearchFlags SearchFlags; + } GetSearchCriteria_repl; + + /*************************/ + /* ROP: RopSubmitMessage(0x32) */ + typedef [enum8bit] enum { + None = 0x0, /* None */ + PreProcess = 0x1, /* Needs to be preprocessed by the server */ + NeedsSpooler = 0x2 /* Is to be processed by a client spooler */ + } SubmitFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + SubmitFlags SubmitFlags; + } SubmitMessage_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SubmitMessage_repl; + + /*************************/ + /* ROP: RopMoveCopyMessages(0x33) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint16 count; + [size_is(count)] hyper message_id[]; + boolean8 WantAsynchronous; + boolean8 WantCopy; + } MoveCopyMessages_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } MoveCopyMessages_repl; + + /*************************/ + /* ROP: RopAbortSubmit(0x34) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper FolderId; + hyper MessageId; + } AbortSubmit_req; + + typedef [flag(NDR_NOALIGN)] struct { + } AbortSubmit_repl; + + /*************************/ + /* ROP: RopMoveFolder(0x35) */ + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] astring lpszA; + [case(0x1)][flag(STR_NULLTERM)] string lpszW; + } Folder_name; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + boolean8 WantAsynchronous; + boolean8 UseUnicode; + hyper FolderId; + [switch_is(UseUnicode)] Folder_name NewFolderName; + } MoveFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } MoveFolder_repl; + + /*************************/ + /* ROP: RopCopyFolder(0x36) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + boolean8 WantAsynchronous; + boolean8 WantRecursive; + boolean8 UseUnicode; + hyper FolderId; + [switch_is(UseUnicode)] Folder_name NewFolderName; + } CopyFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } CopyFolder_repl; + + /*************************/ + /* ROP: RopQueryColumnsAll(0x37) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } QueryColumnsAll_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 PropertyTagCount; + [size_is(PropertyTagCount)] MAPITAGS PropertyTags[]; + } QueryColumnsAll_repl; + + /*************************/ + /* ROP: RopAbort(0x38) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } Abort_req; + + typedef [flag(NDR_NOALIGN)] struct { + TableStatus TableStatus; + } Abort_repl; + + /*************************/ + /* ROP: RopCopyTo(0x39) */ + typedef [bitmap8bit] bitmap { + CopyFlagsMove = 0x1, /* Move properties */ + CopyFlagsNoOverwrite = 0x2 /* Do not overwrite existing properties */ + } CopyFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + boolean8 WantAsynchronous; + boolean8 WantSubObjects; + CopyFlags CopyFlags; + mapi_SPropTagArray ExcludedTags; + } CopyTo_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 PropertyProblemCount; + [size_is(PropertyProblemCount)] PropertyProblem PropertyProblem[]; + } CopyTo_repl; + + /*************************/ + /* ROP: RopCopyToStream(0x3a) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + hyper ByteCount; + } CopyToStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + hyper ReadByteCount; + hyper WrittenByteCount; + } CopyToStream_repl; + + /*************************/ + /* ROP: RopCloneStream(0x3b) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + } CloneStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + } CloneStream_repl; + + /*************************/ + /* ROP: RopGetPermissionsTable(0x3e) */ + typedef [bitmap8bit] bitmap { + IncludeFreeBusy = 0x02 + } PermissionsTableFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + PermissionsTableFlags TableFlags; + } GetPermissionsTable_req; + + typedef [flag(NDR_NOALIGN)] struct { + } GetPermissionsTable_repl; + + /*************************/ + /* ROP: RopGetRulesTable(0x3f) */ + typedef [bitmap8bit] bitmap { + RulesTableFlags_Unicode = 0x40 + } RulesTableFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + RulesTableFlags TableFlags; + } GetRulesTable_req; + + typedef [flag(NDR_NOALIGN)] struct { + } GetRulesTable_repl; + + /*************************/ + /* ROP: RopModifyPermissions(0x40) */ + typedef [bitmap8bit] bitmap { + ModifyPerms_IncludeFreeBusy = 0x02, + ModifyPerms_ReplaceRows = 0x01 + } ModifyPermissionsFlags; + + typedef [flag(NDR_NOALIGN)] struct { + ulRowFlags PermissionDataFlags; + mapi_SPropValue_array lpProps; + } PermissionData; + + typedef [flag(NDR_NOALIGN)] struct { + ModifyPermissionsFlags ModifyFlags; + uint16 ModifyCount; + [size_is(ModifyCount)] PermissionData PermissionsData[]; + } mapi_PermissionsData; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + mapi_PermissionsData rowList; + } ModifyPermissions_req; + + typedef [flag(NDR_NOALIGN)] struct { + } ModifyPermissions_repl; + + /*************************/ + /* ROP: RopModifyRules(0x41) */ + typedef [flag(NDR_NOALIGN)] struct { + ulRowFlags RuleDataFlags; + mapi_SPropValue_array PropertyValues; + } RuleData; + + typedef [bitmap8bit] bitmap { + ModifyRulesFlag_Replace = 0x01 + } ModifyRulesFlag; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + ModifyRulesFlag ModifyRulesFlags; + uint16 RulesCount; + [size_is(RulesCount)] RuleData RulesData[]; + } ModifyRules_req; + + typedef [flag(NDR_NOALIGN)] struct { + } ModifyRules_repl; + + /*************************/ + /* ROP: RopGetOwningServers(0x42) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper FolderId; + } GetOwningServers_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 OwningServersCount; + uint16 CheapServersCount; + [size_is(OwningServersCount)] astring OwningServers[]; + } GetOwningServers_repl; + + /*************************/ + /* ROP: RopLongTermIdFromId(0x43) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper Id; + } LongTermIdFromId_req; + + typedef [flag(NDR_NOALIGN)] struct { + GUID DatabaseGuid; + uint8 GlobalCounter[6]; + uint16 padding; + } LongTermId; + + typedef [flag(NDR_NOALIGN)] struct { + LongTermId LongTermId; + } LongTermIdFromId_repl_Success; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)] LongTermIdFromId_repl_Success Success; + [default]; + } LongTermIdFromId_repl_status; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 InputHandleIndex; + uint32 ReturnValue; + [switch_is(ReturnValue)] LongTermIdFromId_repl_status repl; + } LongTermIdFromId_repl; + + /*************************/ + /* ROP: RopIdFromLongTermId(0x44) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + LongTermId LongTermId; + } IdFromLongTermId_req; + + typedef [flag(NDR_NOALIGN)] struct { + hyper Id; + } IdFromLongTermId_repl; + + /*************************/ + /* ROP: RopPublicFolderIsGhosted(0x45) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper FolderId; + } PublicFolderIsGhosted_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 IsGhosted; + [switch_is(IsGhosted)] IsGhosted Ghost; + } PublicFolderIsGhosted_repl; + + /*************************/ + /* ROP: RopOpenEmbeddedMessage(0x46) */ + typedef [enum8bit, flag(NDR_PAHEX)] enum { + MAPI_READONLY = 0x0, + MAPI_READWRITE = 0x1, + MAPI_CREATE = 0x2 + } OpenEmbeddedMessage_OpenModeFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + uint16 CodePageId; + OpenEmbeddedMessage_OpenModeFlags OpenModeFlags; + } OpenEmbeddedMessage_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 Reserved; + hyper MessageId; + boolean8 HasNamedProperties; + TypedString SubjectPrefix; + TypedString NormalizedSubject; + uint16 RecipientCount; + uint16 ColumnCount; + [size_is(ColumnCount)] MAPITAGS RecipientColumns[]; + uint8 RowCount; + [size_is(RowCount)] OpenRecipientRow RecipientRows[]; + } OpenEmbeddedMessage_repl; + + /*************************/ + /* ROP: RopSetSpooler(0x47) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } SetSpooler_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SetSpooler_repl; + + /*************************/ + /* ROP: RopSpoolerLockMessage(0x48) */ + typedef [enum8bit] enum { + LockState_1stLock = 0x0, + LockState_1stUnlock = 0x1, + LockState_1stFinished = 0x2 + } LockState; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper MessageId; + LockState LockState; + } SpoolerLockMessage_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SpoolerLockMessage_repl; + + /*************************/ + /* ROP: RopGetAddressTypes(0x49) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } AddressTypes_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 cValues; + uint16 size; + [size_is(cValues)] mapi_LPSTR transport[]; + } AddressTypes_repl; + + /**************************/ + /* ROP: RopTransportSend(0x4a) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } TransportSend_req; + + typedef [nodiscriminant] union { + [case(0x0)] mapi_SPropValue_array lpProps; + [case(0x1)]; + } TransportSend_lpProps; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 NoPropertiesReturned; + [switch_is(NoPropertiesReturned)] TransportSend_lpProps properties; + } TransportSend_repl; + + /**************************/ + /* ROP: RopFastTransferSourceCopyMessages(0x4b) */ + /* TODO */ + + /**************************/ + /* ROP: RopFastTransferSourceCopyFolder(0x4c) */ + /* TODO */ + + /**************************/ + /* ROP: RopFastTransferSourceCopyTo(0x4d) */ + /* TODO */ + + /**************************/ + /* ROP: RopFastTransferSourceGetBuffer(0x4e) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint16 BufferSize; + } FastTransferSourceGetBuffer_req; + + typedef [enum16bit] enum { + TransferStatus_Error = 0x0, + TransferStatus_Partial = 0x1, + TransferStatus_NoRoom = 0x2, + TransferStatus_Done = 0x3 + } TransferStatus; + + typedef [flag(NDR_NOALIGN)] struct { + TransferStatus TransferStatus; + uint16 InProgressCount; + uint16 TotalStepCount; + uint8 Reserved; + [flag(NDR_REMAINING)] [represent_as(uint16)] DATA_BLOB TransferBuffer; + /*uint16 TransferBufferSize; + [subcontext(0),subcontext_size(TransferBufferSize),flag(NDR_REMAINING)] DATA_BLOB TransferBuffer;*/ + } FastTransferSourceGetBuffer_repl; + + /**************************/ + /* ROP: RopFindRow(0x4f) */ + typedef [enum8bit] enum { + DIR_FORWARD = 0x0, + DIR_BACKWARD = 0x1 + } FindRow_ulFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + FindRow_ulFlags ulFlags; + [represent_as(uint16)] mapi_SRestriction res; + BOOKMARK origin; + SBinary_short bookmark; + } FindRow_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 RowNoLongerVisible; + uint8 HasRowData; + [flag(NDR_NOALIGN)] DATA_BLOB row; + } FindRow_repl; + + /**************************/ + /* ROP: RopProgress(0x50) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + boolean8 WantCancel; + } Progress_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 CompletedTaskCount; + uint32 TotalTaskCount; + } Progress_repl; + + /**************************/ + /* ROP: RopTransportNewMail(0x51) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper MessageId; + hyper FolderId; + astring MessageClass; + uint32 MessageFlags; + } TransportNewMail_req; + + typedef [flag(NDR_NOALIGN)] struct { + } TransportNewMail_repl; + + /**************************/ + /* ROP: RopGetValidAttachments(0x52) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } GetValidAttachments_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 AttachmentIdCount; + [size_is(AttachmentIdCount)] uint32 AttachmentIdArray[]; + } GetValidAttachments_repl; + + /**************************/ + /* ROP: RopFastTransferDestinationConfigure(0x53) */ + /* TODO */ + + /**************************/ + /* ROP: RopFastTransferDestinationPutBuffer(0x54) */ + /* TODO */ + + /*************************/ + /* ROP: RopGetNamesFromPropertyIds(0x55) */ + typedef [enum8bit] enum { + MNID_ID = 0, + MNID_STRING = 1 + } ulKind; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 NameSize; + [flag(STR_NULLTERM)] string Name; + } mapi_name; + + typedef [nodiscriminant] union { + [case(MNID_ID)] uint32 lid; + [case(MNID_STRING)] mapi_name lpwstr; + } Kind; + + typedef [flag(NDR_NOALIGN)] struct { + ulKind ulKind; + GUID lpguid; + [switch_is(ulKind)] Kind kind; + } MAPINAMEID; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint16 PropertyIdCount; + [size_is(PropertyIdCount)] uint16 PropertyIds[]; + } GetNamesFromIDs_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 count; + [size_is(count)] MAPINAMEID nameid[]; + } GetNamesFromIDs_repl; + + /*************************/ + /* ROP: RopGetPropertyIdsFromNames(0x56) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 ulFlags; + uint16 count; + [size_is(count)] MAPINAMEID nameid[]; + } GetIDsFromNames_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 count; + [size_is(count)] uint16 propID[]; + } GetIDsFromNames_repl; + + /*************************/ + /* ROP: RopUpdateDeferredActionMessages(0x57) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + SBinary_short ServerEntryId; + SBinary_short ClientEntryId; + } UpdateDeferredActionMessages_req; + + typedef [flag(NDR_NOALIGN)] struct { + } UpdateDeferredActionMessages_repl; + + /*************************/ + /* ROP: RopEmptyFolder(0x58) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + boolean8 WantAsynchronous; + boolean8 WantDeleteAssociated; + } EmptyFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } EmptyFolder_repl; + + /*************************/ + /* ROP: RopExpandRow(0x59) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint16 MaxRowCount; + hyper CategoryId; + } ExpandRow_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 ExpandedRowCount; + uint16 RowCount; + [flag(NDR_REMAINING)]DATA_BLOB RowData; + } ExpandRow_repl; + + /*************************/ + /* ROP: RopCollapseRow(0x5a) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper CategoryId; + } CollapseRow_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 CollapsedRowCount; + } CollapseRow_repl; + + /*************************/ + /* ROP: RopLockRegionStream(0x5b) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper RegionOffset; + hyper RegionSize; + uint32 LockFlags; + } LockRegionStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + } LockRegionStream_repl; + + /*************************/ + /* ROP: RopUnlockRegionStream(0x5c) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper RegionOffset; + hyper RegionSize; + uint32 LockFlags; + } UnlockRegionStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + } UnlockRegionStream_repl; + + /*************************/ + /* ROP: RopCommitStream(0x5d) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } CommitStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + } CommitStream_repl; + + /*************************/ + /* ROP: RopGetStreamSize(0x5e) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } GetStreamSize_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 StreamSize; + } GetStreamSize_repl; + + /*************************/ + /* ROP: RopQueryNamedProperties(0x5f) */ + typedef [bitmap8bit] bitmap { + NoStrings = 0x01, + NoIds = 0x02 + } QueryFlags; + + typedef [nodiscriminant] union { + [case(0x0)]; + [case(0x1)] GUID guid; + } QueryNamedProperties_guid; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + QueryFlags QueryFlags; + boolean8 HasGuid; + [switch_is(HasGuid)] QueryNamedProperties_guid PropertyGuid; + } QueryNamedProperties_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 IdCount; + [size_is(IdCount)] uint16 PropertyIds[]; + [size_is(IdCount)] MAPINAMEID PropertyNames[]; + } QueryNamedProperties_repl; + + /*************************/ + /* ROP: RopGetPerUserLongTermIds(0x60) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + GUID DatabaseGuid; + } GetPerUserLongTermIds_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 LongTermIdCount; + [size_is(LongTermIdCount)] LongTermId LongTermIds[]; + } GetPerUserLongTermIds_repl; + + /*************************/ + /* ROP: RopGetPerUserGuid(0x61) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + LongTermId LongTermId; + } GetPerUserGuid_req; + + typedef [flag(NDR_NOALIGN)] struct { + GUID DatabaseGuid; + } GetPerUserGuid_repl; + + /*************************/ + /* ROP: RopReadPerUserInformation(0x63) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 FolderId[24]; + boolean8 WhatIfChanged; + uint32 DataOffset; + uint16 MaxDataSize; + } ReadPerUserInformation_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HasFinished; + [flag(NDR_REMAINING)] [represent_as(uint16)] DATA_BLOB Data; + /*uint16 DataSize; + [subcontext(0), subcontext_size(DataSize), flag(NDR_REMAINING)] DATA_BLOB Data;*/ + } ReadPerUserInformation_repl; + + /*************************/ + /* ROP: RopWritePerUserInformation(0x64) */ + /* TODO */ + + /*************************/ + /* ROP: RopSetReadFlags(0x66) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + boolean8 WantAsynchronous; + MSGFLAG_READ ReadFlags; + uint16 MessageIdCount; + [size_is(MessageIdCount)] hyper MessageIds[]; + } SetReadFlags_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } SetReadFlags_repl; + + /*************************/ + /* ROP: RopCopyProperties(0x67) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + boolean8 WantAsynchronous; + CopyFlags CopyFlags; + mapi_SPropTagArray PropertyTags; + } CopyProperties_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 PropertyProblemCount; + [size_is(PropertyProblemCount)] PropertyProblem PropertyProblem[]; + } CopyProperties_repl; + + /*************************/ + /* ROP: RopGetReceiveFolderTable(0x68) */ + typedef struct { + uint32 dwLowDateTime; + uint32 dwHighDateTime; + } FILETIME; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 unknown; + hyper fid; + astring lpszMessageClass; + FILETIME modiftime; + } ReceiveFolder; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } GetReceiveFolderTable_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint32 cValues; + [size_is(cValues)] ReceiveFolder entries[]; + } GetReceiveFolderTable_repl; + + /*************************/ + /* ROP: RopFastTransferSourceCopyProperties(0x69) */ + /* TODO */ + + /*************************/ + /* ROP: RopGetCollapseState(0x6b) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + hyper RowId; + uint32 RowInstanceNumber; + } GetCollapseState_req; + + typedef [flag(NDR_NOALIGN)] struct { + SBinary_short CollapseState; + } GetCollapseState_repl; + + /*************************/ + /* ROP: RopSetCollapseState(0x6c) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + SBinary_short CollapseState; + } SetCollapseState_req; + + typedef [flag(NDR_NOALIGN)] struct { + SBinary_short bookmark; + } SetCollapseState_repl; + + /*************************/ + /* ROP: RopGetTransportFolder(0x6d) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } GetTransportFolder_req; + + typedef [flag(NDR_NOALIGN)] struct { + hyper FolderId; + } GetTransportFolder_repl; + + /*************************/ + /* ROP: RopPending(0x6e) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 SessionIndex; + } Pending_repl; + + /*************************/ + /* ROP: RopOptionsData(0x6f) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + astring AddressType; + boolean8 WantWin32; + } OptionsData_req; + + typedef [nodiscriminant, flag(NDR_NOALIGN)] union { + [case(0x0)]; + [default] astring HelpFileName; + } OptionsData_HelpFileName; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 Reserved; + SBinary_short OptionsInfo; + uint16 HelpFileSize; + [size_is(HelpFileSize)] uint8 HelpFile[]; + [switch_is(HelpFileSize)] OptionsData_HelpFileName HelpFileName; + } OptionsData_repl; + + /*************************/ + /* ROP: RopSynchronizationConfigure(0x70) */ + typedef [enum8bit] enum { + Contents = 0x1, + Hierarchy = 0x2 + } SynchronizationType; + + typedef [bitmap8bit] bitmap { + SendOptions_Unicode = 0x1, + SendOptions_ForUpload = 0x3, + SendOptions_RecoverMode = 0x4, + SendOptions_ForceUnicode = 0x8, + SendOptions_Partial = 0x10 + } SendOptions; + + typedef [bitmap16bit] bitmap { + SynchronizationFlag_Unicode = 0x1, + SynchronizationFlag_NoDeletions = 0x2, + SynchronizationFlag_NoSoftDeletions = 0x4, + SynchronizationFlag_ReadState = 0x8, + SynchronizationFlag_FAI = 0x10, + SynchronizationFlag_Normal = 0x20, + SynchronizationFlag_OnlySpecifiedProperties = 0x80, + SynchronizationFlag_NoForeignIdentifiers = 0x100, + SynchronizationFlag_Reserved = 0x1000, + SynchronizationFlag_BestBody = 0x2000, + SynchronizationFlag_IgnoreSpecifiedOnFAI = 0x4000, + SynchronizationFlag_Progress = 0x8000 + } SynchronizationFlag; + + typedef [bitmap32bit] bitmap { + Eid = 0x00000001, + MessageSize = 0x00000002, + Cn = 0x00000004, + OrderByDeliveryTime = 0x00000008 + } SynchronizationExtraFlags; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + SynchronizationType SynchronizationType; + SendOptions SendOptions; + SynchronizationFlag SynchronizationFlag; + [flag(NDR_REMAINING)] [represent_as(uint16)] DATA_BLOB RestrictionData; + SynchronizationExtraFlags SynchronizationExtraFlags; + mapi_SPropTagArray PropertyTags; + } SyncConfigure_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SyncConfigure_repl; + + /*************************/ + /* ROP: RopSynchronizationImportMessageChange(0x72) */ + typedef [bitmap8bit] bitmap { + ImportFlag_Associated = 0x10, + ImportFlag_FailOnConflict = 0x40 + } ImportFlag; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + ImportFlag ImportFlag; + mapi_SPropValue_array PropertyValues; + } SyncImportMessageChange_req; + + typedef [flag(NDR_NOALIGN)] struct { + hyper MessageId; + } SyncImportMessageChange_repl; + + /*************************/ + /* ROP: RopSynchronizationImportHierarchyChange(0x73) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + mapi_SPropValue_array HierarchyValues; + mapi_SPropValue_array PropertyValues; + } SyncImportHierarchyChange_req; + + typedef [flag(NDR_NOALIGN)] struct { + hyper FolderId; + } SyncImportHierarchyChange_repl; + + /*************************/ + /* ROP: RopSynchronizationImportDeletes(0x74) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + boolean8 IsHierarchy; + mapi_SPropValue_array PropertyValues; + } SyncImportDeletes_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SyncImportDeletes_repl; + + /*************************/ + /* ROP: RopSynchronizationUploadStateStreamBegin(0x75) */ + typedef [v1_enum,flag(NDR_PAHEX)] enum { + PidTagIdsetGiven = 0x40170003, + PidTagCnsetSeen = 0x67960102, + PidTagCnsetSeenFAI = 0x67da0102, + PidTagCnsetRead = 0x67d20102 + } StateProperty; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + StateProperty StateProperty; + uint32 TransferBufferSize; + } SyncUploadStateStreamBegin_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SyncUploadStateStreamBegin_repl; + + /*************************/ + /* ROP: RopSynchronizationUploadStateStreamContinue(0x76) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint32 StreamDataSize; + /* Current PIDL in wireshark repo does not support inline arrays. */ + [flag(NDR_BUFFERS), size_is(cb)]uint8 StreamData[]; /* [StreamDataSize] */ + } SyncUploadStateStreamContinue_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SyncUploadStateStreamContinue_repl; + + /*************************/ + /* ROP: RopSynchronizationUploadStateStreamEnd(0x77) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } SyncUploadStateStreamEnd_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SyncUploadStateStreamEnd_repl; + + /*************************/ + /* ROP: RopSynchronizationImportMessageMove(0x78) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint32 SourceFolderIdSize; + [size_is(SourceFolderIdSize)] uint8 SourceFolderId[]; + uint32 SourceMessageIdSize; + [size_is(SourceMessageIdSize)] uint8 SourceMessageId[]; + uint32 PredecessorChangeListSize; + [size_is(PredecessorChangeListSize)] uint8 PredecessorChangeList[]; + uint32 DestinationMessageIdSize; + [size_is(DestinationMessageIdSize)] uint8 DestinationMessageId[]; + uint32 ChangeNumberSize; + [size_is(ChangeNumberSize)] uint8 ChangeNumber[]; + } SyncImportMessageMove_req; + + typedef [flag(NDR_NOALIGN)] struct { + hyper MessageId; + } SyncImportMessageMove_repl; + + /*************************/ + /* ROP: RopSetPropertiesNoReplicate(0x79) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + [represent_as(uint16)] mapi_SPropValue_array values; + } SetPropertiesNoReplicate_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 PropertyProblemCount; + [size_is(PropertyProblemCount)] PropertyProblem PropertyProblem[]; + } SetPropertiesNoReplicate_repl; + + /*************************/ + /* ROP: RopDeletePropertiesNoReplicate(0x7a) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + mapi_SPropTagArray PropertyTags; + } DeletePropertiesNoReplicate_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 PropertyProblemCount; + [size_is(PropertyProblemCount)] PropertyProblem PropertyProblem[]; + } DeletePropertiesNoReplicate_repl; + + /*************************/ + /* ROP: RopGetStoreState(0x7b) */ + typedef [public,bitmap32bit] bitmap { + STORE_HAS_SEARCHES = 0x010000000 + } StoreState; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } GetStoreState_req; + + typedef [flag(NDR_NOALIGN)] struct { + StoreState StoreState; + } GetStoreState_repl; + + /*************************/ + /* ROP: RopSynchronizationOpenCollector(0x7e) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + boolean8 IsContentsCollector; + } SyncOpenCollector_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SyncOpenCollector_repl; + + /*************************/ + /* ROP: RopGetLocalReplicaIds(0x7f) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint32 IdCount; + } GetLocalReplicaIds_req; + + typedef [flag(NDR_NOALIGN)] struct { + GUID ReplGuid; + uint8 GlobalCount[6]; + } GetLocalReplicaIds_repl; + + /*************************/ + /* ROP: RopSynchronizationImportReadStateChanges(0x80) */ + #if 0 + typedef [flag(NDR_NOALIGN)] struct { + uint16 MessageSize; + uint8 MessageId[MessageSize]; + boolean8 MarkAsRead; + } MessageReadStates; + #endif + + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + [flag(NDR_REMAINING)] [represent_as(uint16)] DATA_BLOB MessageStates; + } SyncImportReadStateChanges_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SyncImportReadStateChanges_repl; + + /*************************/ + /* ROP: RopResetTable(0x81) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + } ResetTable_req; + + typedef [flag(NDR_NOALIGN)] struct { + } ResetTable_repl; + + /*************************/ + /* ROP: RopSynchronizationGetTransferState(0x82) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + uint8 OutputHandleIndex; + } SyncGetTransferState_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SyncGetTransferState_repl; + + /*************************/ + /* ROP: RopTellVersion(0x86) */ + /* TODO */ + + /*************************/ + /* ROP: OpenPublicFolderByName(0x87) - NOT DOCUMENTED */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 handle_idx; + asclstr name; + } OpenPublicFolderByName_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 HasRules; + boolean8 IsGhosted; + [switch_is(IsGhosted)] IsGhosted Ghost; + } OpenPublicFolderByName_repl; + + /*************************/ + /* ROP: SetSyncNotificationGuid(0x88) - NOT DOCUMENTED */ + typedef [flag(NDR_NOALIGN)] struct { + GUID NotificationGuid; + } SetSyncNotificationGuid_req; + + typedef [flag(NDR_NOALIGN)] struct { + } SetSyncNotificationGuid_repl; + + /*************************/ + /* ROP: RopFreeBookmark(0x89) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + SBinary_short bookmark; + } FreeBookmark_req; + + typedef [flag(NDR_NOALIGN)] struct { + } FreeBookmark_repl; + + /*************************/ + /* ROP: RopWriteAndCommitStream(0x90) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + [represent_as(uint16), flag(NDR_REMAINING)] DATA_BLOB data; + } WriteAndCommitStream_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 WrittenSize; + } WriteAndCommitStream_repl; + + /**************************/ + /* ROP: RopHardDeleteMessages(0x91) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + boolean8 WantAsynchronous; + boolean8 NotifyNonRead; + uint16 MessageIdCount; + [size_is(MessageIdCount)] hyper MessageIds[]; + } HardDeleteMessages_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } HardDeleteMessages_repl; + + /*************************/ + /* ROP: RopHardDeleteMessagesAndSubfolders(0x92) */ + typedef [flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 InputHandleIndex; + boolean8 WantAsynchronous; + boolean8 WantDeleteAssociated; + } HardDeleteMessagesAndSubfolders_req; + + typedef [flag(NDR_NOALIGN)] struct { + boolean8 PartialCompletion; + } HardDeleteMessagesAndSubfolders_repl; + + /*************************/ + /* ROP: RopSetLocalReplicaMidsetDeleted(0x93) */ + /* TODO */ + + /*************************/ + /* ROP: RopBackoff(0xF9) */ + /* TODO */ + + /*************************/ + /* ROP: RopLogon(0xFE) */ + typedef [flag(NDR_NOALIGN),public,enum8bit] enum { + LogonPrivate = 0x1, + UnderCover = 0x2, + Ghosted = 0x4, + SpIProcess = 0x8 + } LogonFlags; + + typedef [flag(NDR_NOALIGN),public,bitmap32bit] bitmap { + PUBLIC = 0x2, + HOME_LOGON = 0x4, + TAKE_OWNERSHIP = 0x8, + ALTERNATE_SERVER = 0x100, + IGNORE_HOME_MDB = 0x200, + NO_MAIL = 0x400, + USE_PER_MDB_REPLID_MAPPING = 0x010000000 + } OpenFlags; + + typedef [enum8bit] enum { + DayOfWeek_Sunday = 0x0, + DayOfWeek_Monday = 0x1, + DayOfWeek_Tuesday = 0x2, + DayOfWeek_Wednesday = 0x3, + DayOfWeek_Thursday = 0x4, + DayOfWeek_Friday = 0x5, + DayOfWeek_Saturday = 0x6 + } DayOfWeek; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 Seconds; + uint8 Minutes; + uint8 Hour; + DayOfWeek DayOfWeek; + uint8 Day; + uint8 Month; + uint16 Year; + } LogonTime; + + typedef [bitmap8bit] bitmap { + ResponseFlags_Reserved = 0x1, + ResponseFlags_OwnerRight = 0x2, + ResponseFlags_SendAsRight = 0x4, + ResponseFlags_OOF = 0x10 + } ResponseFlags; + + typedef [nopush,flag(NDR_NOALIGN)] struct { + uint8 LogonId; + uint8 OutputHandleIndex; + LogonFlags LogonFlags; + OpenFlags OpenFlags; + StoreState StoreState; + uint16 EssdnSize; + astring EssDN; + } Logon_req; + + typedef [flag(NDR_NOALIGN)] struct { + uint8 OutputHandleIndex; + uint32 ReturnValue; + /* Success - Private Mailboxes */ + LogonFlags LogonFlags; + hyper FolderIds[13]; + uint8 ResponseFlags; + GUID MailboxGuid; + uint16 ReplId; + GUID ReplGuid; + hyper LogonTime; /* TODO */ + hyper GwartTime; + StoreState StoreState; + /* Success - Public mailbox */ + GUID PerUserGuid; + /* Success - Redirect */ + uint8 ServerNameSize; + astring ServerName; + } Logon_repl; + + /*************************/ + /* ROP: RopBufferTooSmall(0xFF) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 SizeNeeded; + /* [size_is(SizeNeeded)] RequestBuffers; */ + } RopBufferTooSmall_repl; + + typedef [public, nodiscriminant] union { + [case(RopRelease)] Release_req Release; + [case(RopOpenFolder)] OpenFolder_req OpenFolder; + [case(RopOpenMessage)] OpenMessage_req OpenMessage; + [case(RopGetHierarchyTable)] GetHierarchyTable_req GetHierarchyTable; + [case(RopGetContentsTable)] GetContentsTable_req GetContentsTable; + [case(RopCreateMessage)] CreateMessage_req CreateMessage; + [case(RopGetPropertiesSpecific)] GetProps_req GetProps; + [case(RopGetPropertiesAll)] GetPropsAll_req GetPropsAll; + [case(RopGetPropertiesList)] GetPropList_req GetPropList; + [case(RopSetProperties)] SetProps_req SetProps; + [case(RopDeleteProperties)] DeleteProps_req DeleteProps; + [case(RopSaveChangesMessage)] SaveChangesMessage_req SaveChangesMessage; + [case(RopSetMessageReadFlag)] SetMessageReadFlag_req SetMessageReadFlag; + [case(RopReloadCachedInformation)] ReloadCachedInformation_req ReloadCachedInformation; + [case(RopSetColumns)] SetColumns_req SetColumns; + [case(RopSortTable)] SortTable_req SortTable; + [case(RopRestrict)] Restrict_req Restrict; + [case(RopRemoveAllRecipients)] RemoveAllRecipients_req RemoveAllRecipients; + [case(RopModifyRecipients)] ModifyRecipients_req ModifyRecipients; + [case(RopReadRecipients)] ReadRecipients_req ReadRecipients; + [case(RopQueryRows)] QueryRows_req QueryRows; + [case(RopGetStatus)] GetStatus_req GetStatus; + [case(RopQueryPosition)] QueryPosition_req QueryPosition; + [case(RopSeekRow)] SeekRow_req SeekRow; + [case(RopSeekRowBookmark)] SeekRowBookmark_req SeekRowBookmark; + [case(RopSeekRowFractional)] SeekRowApprox_req SeekRowApprox; + [case(RopCreateBookmark)] CreateBookmark_req CreateBookmark; + [case(RopCreateFolder)] CreateFolder_req CreateFolder; + [case(RopDeleteFolder)] DeleteFolder_req DeleteFolder; + [case(RopDeleteMessages)] DeleteMessages_req DeleteMessages; + [case(RopGetMessageStatus)] GetMessageStatus_req GetMessageStatus; + [case(RopSetMessageStatus)] SetMessageStatus_req SetMessageStatus; + [case(RopGetAttachmentTable)] GetAttachmentTable_req GetAttachmentTable; + [case(RopOpenAttachment)] OpenAttach_req OpenAttach; + [case(RopCreateAttachment)] CreateAttach_req CreateAttach; + [case(RopDeleteAttachment)] DeleteAttach_req DeleteAttach; + [case(RopSaveChangesAttachment)] SaveChangesAttachment_req SaveChangesAttachment; + [case(RopSetReceiveFolder)] SetReceiveFolder_req SetReceiveFolder; + [case(RopGetReceiveFolder)] GetReceiveFolder_req GetReceiveFolder; + [case(RopRegisterNotification)] RegisterNotification_req Advise; + [case(RopOpenStream)] OpenStream_req OpenStream; + [case(RopReadStream)] ReadStream_req ReadStream; + [case(RopWriteStream)] WriteStream_req WriteStream; + [case(RopSeekStream)] SeekStream_req SeekStream; + [case(RopSetStreamSize)] SetStreamSize_req SetStreamSize; + [case(RopSetSearchCriteria)] SetSearchCriteria_req SetSearchCriteria; + [case(RopGetSearchCriteria)] GetSearchCriteria_req GetSearchCriteria; + [case(RopSubmitMessage)] SubmitMessage_req SubmitMessage; + [case(RopMoveCopyMessages)] MoveCopyMessages_req MoveCopyMessages; + [case(RopAbortSubmit)] AbortSubmit_req AbortSubmit; + [case(RopMoveFolder)] MoveFolder_req MoveFolder; + [case(RopCopyFolder)] CopyFolder_req CopyFolder; + [case(RopQueryColumnsAll)] QueryColumnsAll_req QueryColumnsAll; + [case(RopAbort)] Abort_req Abort; + [case(RopCopyTo)] CopyTo_req CopyTo; + [case(RopCopyToStream)] CopyToStream_req CopyToStream; + [case(RopCloneStream)] CloneStream_req CloneStream; + [case(RopGetPermissionsTable)] GetPermissionsTable_req GetPermissionsTable; + [case(RopGetRulesTable)] GetRulesTable_req GetRulesTable; + [case(RopModifyPermissions)] ModifyPermissions_req ModifyPermissions; + [case(RopModifyRules)] ModifyRules_req ModifyRules; + [case(RopGetOwningServers)] GetOwningServers_req GetOwningServers; + [case(RopLongTermIdFromId)] LongTermIdFromId_req LongTermIdFromId; + [case(RopIdFromLongTermId)] IdFromLongTermId_req IdFromLongTermId; + [case(RopPublicFolderIsGhosted)] PublicFolderIsGhosted_req PublicFolderIsGhosted; + [case(RopOpenEmbeddedMessage)] OpenEmbeddedMessage_req OpenEmbeddedMessage; + [case(RopSetSpooler)] SetSpooler_req SetSpooler; + [case(RopSpoolerLockMessage)] SpoolerLockMessage_req SpoolerLockMessage; + [case(RopGetAddressTypes)] AddressTypes_req AddressTypes; + [case(RopTransportSend)] TransportSend_req TransportSend; + [case(RopFastTransferSourceGetBuffer)] FastTransferSourceGetBuffer_req FastTransferSourceGetBuffer; + [case(RopFindRow)] FindRow_req FindRow; + [case(RopProgress)] Progress_req Progress; + [case(RopTransportNewMail)] TransportNewMail_req TransportNewMail; + [case(RopGetValidAttachments)] GetValidAttachments_req GetValidAttachments; + [case(RopGetNamesFromPropertyIds)] GetNamesFromIDs_req GetNamesFromIDs; + [case(RopGetPropertyIdsFromNames)] GetIDsFromNames_req GetIDsFromNames; + [case(RopUpdateDeferredActionMessages)] UpdateDeferredActionMessages_req UpdateDeferredActionMessages; + [case(RopEmptyFolder)] EmptyFolder_req EmptyFolder; + [case(RopExpandRow)] ExpandRow_req ExpandRow; + [case(RopCollapseRow)] CollapseRow_req CollapseRow; + [case(RopLockRegionStream)] LockRegionStream_req LockRegionStream; + [case(RopUnlockRegionStream)] UnlockRegionStream_req UnlockRegionStream; + [case(RopCommitStream)] CommitStream_req CommitStream; + [case(RopGetStreamSize)] GetStreamSize_req GetStreamSize; + [case(RopQueryNamedProperties)] QueryNamedProperties_req QueryNamedProperties; + [case(RopGetPerUserLongTermIds)] GetPerUserLongTermIds_req GetPerUserLongTermIds; + [case(RopGetPerUserGuid)] GetPerUserGuid_req GetPerUserGuid; + [case(RopReadPerUserInformation)] ReadPerUserInformation_req ReadPerUserInformation; + [case(RopSetReadFlags)] SetReadFlags_req SetReadFlags; + [case(RopCopyProperties)] CopyProperties_req CopyProperties; + [case(RopGetReceiveFolderTable)] GetReceiveFolderTable_req GetReceiveFolderTable; + [case(RopGetCollapseState)] GetCollapseState_req GetCollapseState; + [case(RopSetCollapseState)] SetCollapseState_req SetCollapseState; + [case(RopGetTransportFolder)] GetTransportFolder_req GetTransportFolder; + [case(RopOptionsData)] OptionsData_req OptionsData; + [case(RopSynchronizationConfigure)] SyncConfigure_req SyncConfigure; + [case(RopSynchronizationImportMessageChange)] SyncImportMessageChange_req SyncImportMessageChange; + [case(RopSynchronizationImportHierarchyChange)] SyncImportHierarchyChange_req SyncImportHierarchyChange; + [case(RopSynchronizationImportDeletes)] SyncImportDeletes_req SyncImportDeletes; + [case(RopSynchronizationUploadStateStreamBegin)] SyncUploadStateStreamBegin_req SyncUploadStateStreamBegin; + [case(RopSynchronizationUploadStateStreamContinue)] SyncUploadStateStreamContinue_req SyncUploadStateStreamContinue; + [case(RopSynchronizationUploadStateStreamEnd)] SyncUploadStateStreamEnd_req SyncUploadStateStreamEnd; + [case(RopSynchronizationImportMessageMove)] SyncImportMessageMove_req SyncImportMessageMove; + [case(RopSetPropertiesNoReplicate)] SetPropertiesNoReplicate_req SetPropertiesNoReplicate; + [case(RopDeletePropertiesNoReplicate)] DeletePropertiesNoReplicate_req DeletePropertiesNoReplicate; + [case(RopGetStoreState)] GetStoreState_req GetStoreState; + [case(RopSynchronizationOpenCollector)] SyncOpenCollector_req SyncOpenCollector; + [case(RopGetLocalReplicaIds)] GetLocalReplicaIds_req GetLocalReplicaIds; + [case(RopSynchronizationImportReadStateChanges)] SyncImportReadStateChanges_req SyncImportReadStateChanges; + [case(RopResetTable)] ResetTable_req ResetTable; + [case(RopSynchronizationGetTransferState)] SyncGetTransferState_req SyncGetTransferState; + [case(RopOpenPublicFolderByName)] OpenPublicFolderByName_req OpenPublicFolderByName; + [case(RopSetSyncNotificationGuid)] SetSyncNotificationGuid_req SetSyncNotificationGuid; + [case(RopFreeBookmark)] FreeBookmark_req FreeBookmark; + [case(RopWriteAndCommitStream)] WriteAndCommitStream_req WriteAndCommitStream; + [case(RopHardDeleteMessages)] HardDeleteMessages_req HardDeleteMessages; + [case(RopHardDeleteMessagesAndSubfolders)] HardDeleteMessagesAndSubfolders_req HardDeleteMessagesAndSubfolders; + [case(RopLogon)] Logon_req Logon; + [default]; + } RopRequest; + + typedef [public, nodiscriminant] union { + [case(RopRelease)] Release_repl Release; + [case(RopOpenFolder)] OpenFolder_repl OpenFolder; + [case(RopOpenMessage)] OpenMessage_repl OpenMessage; + [case(RopGetHierarchyTable)] GetHierarchyTable_repl GetHierarchyTable; + [case(RopGetContentsTable)] GetContentsTable_repl GetContentsTable; + [case(RopCreateMessage)] CreateMessage_repl CreateMessage; + [case(RopGetPropertiesSpecific)] GetProps_repl GetProps; + [case(RopGetPropertiesAll)] GetPropsAll_repl GetPropsAll; + [case(RopGetPropertiesList)] GetPropList_repl GetPropList; + [case(RopSetProperties)] SetProps_repl SetProps; + [case(RopDeleteProperties)] DeleteProps_repl DeleteProps; + [case(RopSaveChangesMessage)] SaveChangesMessage_repl SaveChangesMessage; + [case(RopRemoveAllRecipients)] RemoveAllRecipients_repl RemoveAllRecipients; + [case(RopModifyRecipients)] ModifyRecipients_repl ModifyRecipients; + [case(RopReadRecipients)] ReadRecipients_repl ReadRecipients; + [case(RopSetMessageReadFlag)] SetMessageReadFlag_repl SetMessageReadFlag; + [case(RopReloadCachedInformation)] ReloadCachedInformation_repl ReloadCachedInformation; + [case(RopSetColumns)] SetColumns_repl SetColumns; + [case(RopSortTable)] SortTable_repl SortTable; + [case(RopRestrict)] Restrict_repl Restrict; + [case(RopQueryRows)] QueryRows_repl QueryRows; + [case(RopGetStatus)] GetStatus_repl GetStatus; + [case(RopQueryPosition)] QueryPosition_repl QueryPosition; + [case(RopSeekRow)] SeekRow_repl SeekRow; + [case(RopSeekRowBookmark)] SeekRowBookmark_repl SeekRowBookmark; + [case(RopSeekRowFractional)] SeekRowApprox_repl SeekRowApprox; + [case(RopCreateBookmark)] CreateBookmark_repl CreateBookmark; + [case(RopCreateFolder)] CreateFolder_repl CreateFolder; + [case(RopDeleteFolder)] DeleteFolder_repl DeleteFolder; + [case(RopDeleteMessages)] DeleteMessages_repl DeleteMessages; + [case(RopSetMessageStatus)] SetMessageStatus_repl SetMessageStatus; + [case(RopGetAttachmentTable)] GetAttachmentTable_repl GetAttachmentTable; + [case(RopOpenAttachment)] OpenAttach_repl OpenAttach; + [case(RopCreateAttachment)] CreateAttach_repl CreateAttach; + [case(RopDeleteAttachment)] DeleteAttach_repl DeleteAttach; + [case(RopSaveChangesAttachment)] SaveChangesAttachment_repl SaveChangesAttachment; + [case(RopSetReceiveFolder)] SetReceiveFolder_repl SetReceiveFolder; + [case(RopGetReceiveFolder)] GetReceiveFolder_repl GetReceiveFolder; + [case(RopRegisterNotification)] RegisterNotification_repl Advise; + [case(RopNotify)] Notify_repl Notify; + [case(RopOpenStream)] OpenStream_repl OpenStream; + [case(RopReadStream)] ReadStream_repl ReadStream; + [case(RopWriteStream)] WriteStream_repl WriteStream; + [case(RopSeekStream)] SeekStream_repl SeekStream; + [case(RopSetStreamSize)] SetStreamSize_repl SetStreamSize; + [case(RopSetSearchCriteria)] SetSearchCriteria_repl SetSearchCriteria; + [case(RopGetSearchCriteria)] GetSearchCriteria_repl GetSearchCriteria; + [case(RopSubmitMessage)] SubmitMessage_repl SubmitMessage; + [case(RopMoveCopyMessages)] MoveCopyMessages_repl MoveCopyMessages; + [case(RopAbortSubmit)] AbortSubmit_repl AbortSubmit; + [case(RopMoveFolder)] MoveFolder_repl MoveFolder; + [case(RopCopyFolder)] CopyFolder_repl CopyFolder; + [case(RopQueryColumnsAll)] QueryColumnsAll_repl QueryColumnsAll; + [case(RopAbort)] Abort_repl Abort; + [case(RopCopyTo)] CopyTo_repl CopyTo; + [case(RopCopyToStream)] CopyToStream_repl CopyToStream; + [case(RopCloneStream)] CloneStream_repl CloneStream; + [case(RopGetPermissionsTable)] GetPermissionsTable_repl GetPermissionsTable; + [case(RopGetRulesTable)] GetRulesTable_repl GetRulesTable; + [case(RopModifyPermissions)] ModifyPermissions_repl ModifyPermissions; + [case(RopModifyRules)] ModifyRules_repl ModifyRules; + [case(RopGetOwningServers)] GetOwningServers_repl GetOwningServers; + [case(RopLongTermIdFromId)] LongTermIdFromId_repl LongTermIdFromId; + [case(RopIdFromLongTermId)] IdFromLongTermId_repl IdFromLongTermId; + [case(RopPublicFolderIsGhosted)] PublicFolderIsGhosted_repl PublicFolderIsGhosted; + [case(RopOpenEmbeddedMessage)] OpenEmbeddedMessage_repl OpenEmbeddedMessage; + [case(RopSetSpooler)] SetSpooler_repl SetSpooler; + [case(RopSpoolerLockMessage)] SpoolerLockMessage_repl SpoolerLockMessage; + [case(RopGetAddressTypes)] AddressTypes_repl AddressTypes; + [case(RopTransportSend)] TransportSend_repl TransportSend; + [case(RopFastTransferSourceGetBuffer)] FastTransferSourceGetBuffer_repl FastTransferSourceGetBuffer; + [case(RopFindRow)] FindRow_repl FindRow; + [case(RopProgress)] Progress_repl Progress; + [case(RopTransportNewMail)] TransportNewMail_repl TransportNewMail; + [case(RopGetValidAttachments)] GetValidAttachments_repl GetValidAttachments; + [case(RopGetNamesFromPropertyIds)] GetNamesFromIDs_repl GetNamesFromIDs; + [case(RopGetPropertyIdsFromNames)] GetIDsFromNames_repl GetIDsFromNames; + [case(RopUpdateDeferredActionMessages)] UpdateDeferredActionMessages_repl UpdateDeferredActionMessages; + [case(RopEmptyFolder)] EmptyFolder_repl EmptyFolder; + [case(RopExpandRow)] ExpandRow_repl ExpandRow; + [case(RopCollapseRow)] CollapseRow_repl CollapseRow; + [case(RopLockRegionStream)] LockRegionStream_repl LockRegionStream; + [case(RopUnlockRegionStream)] UnlockRegionStream_repl UnlockRegionStream; + [case(RopCommitStream)] CommitStream_repl CommitStream; + [case(RopGetStreamSize)] GetStreamSize_repl GetStreamSize; + [case(RopQueryNamedProperties)] QueryNamedProperties_repl QueryNamedProperties; + [case(RopGetPerUserLongTermIds)] GetPerUserLongTermIds_repl GetPerUserLongTermIds; + [case(RopGetPerUserGuid)] GetPerUserGuid_repl GetPerUserGuid; + [case(RopReadPerUserInformation)] ReadPerUserInformation_repl ReadPerUserInformation; + [case(RopSetReadFlags)] SetReadFlags_repl SetReadFlags; + [case(RopCopyProperties)] CopyProperties_repl CopyProperties; + [case(RopGetReceiveFolderTable)] GetReceiveFolderTable_repl GetReceiveFolderTable; + [case(RopPending)] Pending_repl Pending; + [case(RopGetCollapseState)] GetCollapseState_repl GetCollapseState; + [case(RopSetCollapseState)] SetCollapseState_repl SetCollapseState; + [case(RopGetTransportFolder)] GetTransportFolder_repl GetTransportFolder; + [case(RopOptionsData)] OptionsData_repl OptionsData; + [case(RopSynchronizationConfigure)] SyncConfigure_repl SyncConfigure; + [case(RopSynchronizationImportMessageChange)] SyncImportMessageChange_repl SyncImportMessageChange; + [case(RopSynchronizationImportHierarchyChange)] SyncImportHierarchyChange_repl SyncImportHierarchyChange; + [case(RopSynchronizationImportDeletes)] SyncImportDeletes_repl SyncImportDeletes; + [case(RopSynchronizationUploadStateStreamBegin)] SyncUploadStateStreamBegin_repl SyncUploadStateStreamBegin; + [case(RopSynchronizationUploadStateStreamContinue)] SyncUploadStateStreamContinue_repl SyncUploadStateStreamContinue; + [case(RopSynchronizationUploadStateStreamEnd)] SyncUploadStateStreamEnd_repl SyncUploadStateStreamEnd; + [case(RopSynchronizationImportMessageMove)] SyncImportMessageMove_repl SyncImportMessageMove; + [case(RopSetPropertiesNoReplicate)] SetPropertiesNoReplicate_repl SetPropertiesNoReplicate; + [case(RopDeletePropertiesNoReplicate)] DeletePropertiesNoReplicate_repl DeletePropertiesNoReplicate; + [case(RopGetStoreState)] GetStoreState_repl GetStoreState; + [case(RopSynchronizationOpenCollector)] SyncOpenCollector_repl SyncOpenCollector; + [case(RopGetLocalReplicaIds)] GetLocalReplicaIds_repl GetLocalReplicaIds; + [case(RopSynchronizationImportReadStateChanges)] SyncImportReadStateChanges_repl SyncImportReadStateChanges; + [case(RopResetTable)] ResetTable_repl ResetTable; + [case(RopSynchronizationGetTransferState)] SyncGetTransferState_repl SyncGetTransferState; + [case(RopOpenPublicFolderByName)] OpenPublicFolderByName_repl OpenPublicFolderByName; + [case(RopSetSyncNotificationGuid)] SetSyncNotificationGuid_repl SetSyncNotificationGuid; + [case(RopFreeBookmark)] FreeBookmark_repl FreeBookmark; + [case(RopWriteAndCommitStream)] WriteAndCommitStream_repl WriteAndCommitStream; + [case(RopHardDeleteMessages)] HardDeleteMessages_repl HardDeleteMessages; + [case(RopHardDeleteMessagesAndSubfolders)] HardDeleteMessagesAndSubfolders_repl HardDeleteMessagesAndSubfolders; + [case(RopLogon)] Logon_repl Logon; + [case(RopBufferTooSmall)] RopBufferTooSmall_repl RopBufferTooSmall; + [default]; + } RopReply; + + typedef [public,flag(NDR_NOALIGN)] struct { + uint8 opnum; + [switch_is(opnum)] RopRequest u; + } EcDoRpcMapiRequest; + + typedef [public,nopush,nopull,noprint,flag(NDR_NOALIGN)] struct { + uint8 opnum; + /*uint8 handle_idx; + MAPISTATUS error_code;*/ + [switch_is(opnum)] RopReply u; + } EcDoRpcMapiResponse; + + typedef [public,nopull,nopush,noprint] struct { + uint32 mapi_len; /* whole mapi_data length */ + uint16 length; /* obfuscated: content length */ + EcDoRpcMapiRequest rpcRequest; /* obfuscated */ + uint32 *handles; /* obfuscated: handles id array */ + } mapi_request; + + typedef [public,nopull,nopush,noprint] struct { + uint32 mapi_len; + uint16 length; /* obfuscated: content length */ + EcDoRpcMapiResponse rpcResponse; /* obfuscated */ + uint32 *handles; /* obfuscated: handles id array */ + } mapi_response; + + WERROR mapi_EcDoRpc( + [in,out] policy_handle *handle, + [in,out] uint32 *size, + [in,out] uint32 *offset, + [in] [flag(NDR_REMAINING|NDR_NOALIGN)] mapi_request *mapi_request, + [out] [flag(NDR_REMAINING|NDR_NOALIGN)] mapi_response *mapi_response, + [in,out] uint16 *length, + [in] uint16 max_data + ); + + /******************/ + /* Function: 0x03 */ + WERROR mapi_EcGetMoreRpc( + [in, out, ref] policy_handle * pcxh, + [in][out] [size_is(usSize), length_is(*pusLength)] uint8 *rgb, + [in][out] uint16 *pusLength, + [in] uint16 usSize + ); + + /******************/ + /* Function: 0x04 */ + WERROR mapi_EcRRegisterPushNotification( + [in, out, ref] policy_handle * handle, + [in] uint32 iRpc, + [in] [size_is(cbContext)] uint8 *rgbContext, + [in] uint16 cbContext, + [in] uint32 grbitMapiAdviseBits, + [in, size_is(cbCallbackAddress)] uint8 *rgbCallbackAddress, + [in] uint16 cbCallbackAddress, + [out] uint32 *hNotification + ); + + /******************/ + /* Function: 0x05 */ + WERROR mapi_EcRUnregisterPushNotification( + [in,out] policy_handle *handle, + [in] uint32 iRpc, + [in] uint32 hNotification + ); + + /******************/ + /* Function: 0x06 */ + WERROR mapi_EcDummyRpc( + ); + + /******************/ + /* Function: 0x07 */ + WERROR mapi_EcRGetDCName( + [in,out] policy_handle *handle, + [in][string] uint8* szDomainName, + [out] uint8 rgchDomainController[16] + ); + + /******************/ + /* Function: 0x08 */ + WERROR mapi_EcRNetGetDCName( + [in][string] uint8* szDomainName, + [out] uint8 rgchDomainController[16] + ); + + /******************/ + /* Function: 0x09 */ + WERROR mapi_EcDoRpcExt( + [in, out, ref] policy_handle * pcxh, + [in, out] RpcExt2Flags *pulFlags, + [in, represent_as(4)] RgbIn *rgbIn, + [in] uint32 cbIn, + [out, length_is(*pcbOut), size_is(*pcbOut)] RgbOut *rgbOut, + [in, out] [range(0x0, 0x40000)] uint32 *pcbOut, + [in,represent_as(4),flag(NDR_NOALIGN|NDR_REMAINING)] AuxInfo *rgbAuxIn, + [in] uint32 cbAuxIn, + [out] uint32 *pulTransTime + ); + + /******************/ + /* Function: 0x0a */ + typedef [enum8bit,flag(NDR_PAHEX)] enum { + AUX_TYPE_PERF_REQUESTID = 0x01, + AUX_TYPE_PERF_CLIENTINFO = 0x02, + AUX_TYPE_PERF_SERVERINFO = 0x03, + AUX_TYPE_PERF_SESSIONINFO = 0x04, + AUX_TYPE_PERF_DEFMDB_SUCCESS = 0x05, + AUX_TYPE_PERF_DEFGC_SUCCESS = 0x06, + AUX_TYPE_PERF_MDB_SUCCESS = 0x07, + AUX_TYPE_PERF_GC_SUCCESS = 0x08, + AUX_TYPE_PERF_FAILURE = 0x09, + AUX_TYPE_CLIENT_CONTROL = 0x0A, + AUX_TYPE_PERF_PROCESSINFO = 0x0B, + AUX_TYPE_PERF_BG_DEFMDB_SUCCESS = 0x0C, + AUX_TYPE_PERF_BG_DEFGC_SUCCESS = 0x0D, + AUX_TYPE_PERF_BG_MDB_SUCCESS = 0x0E, + AUX_TYPE_PERF_BG_GC_SUCCESS = 0x0F, + AUX_TYPE_PERF_BG_FAILURE = 0x10, + AUX_TYPE_PERF_FG_DEFMDB_SUCCESS = 0x11, + AUX_TYPE_PERF_FG_DEFGC_SUCCESS = 0x12, + AUX_TYPE_PERF_FG_MDB_SUCCESS = 0x13, + AUX_TYPE_PERF_FG_GC_SUCCESS = 0x14, + AUX_TYPE_PERF_FG_FAILURE = 0x15, + AUX_TYPE_OSVERSIONINFO = 0x16, + AUX_TYPE_EXORGINFO = 0x17, + AUX_TYPE_PERF_ACCOUNTINFO = 0x18, + AUX_TYPE_SERVER_CAPABILITIES = 0x46, + AUX_TYPE_ENDPOINT_CAPABILITIES = 0x48, + AUX_CLIENT_CONNECTION_INFO = 0x4A, + AUX_SERVER_SESSION_INFO = 0x4B, + AUX_PROTOCOL_DEVICE_IDENTIFICATION = 0x4E + } AUX_HEADER_TYPE_1; + + typedef [enum8bit,flag(NDR_PAHEX)] enum { + AUX_TYPE_PERF_SESSIONINFO_2 = 0x04, + AUX_TYPE_PERF_MDB_SUCCESS_2 = 0x07, + AUX_TYPE_PERF_GC_SUCCESS_2 = 0x08, + AUX_TYPE_PERF_FAILURE_2 = 0x09, + AUX_TYPE_PERF_PROCESSINFO_2 = 0x0B, + AUX_TYPE_PERF_BG_MDB_SUCCESS_2 = 0x0E, + AUX_TYPE_PERF_BG_GC_SUCCESS_2 = 0x0F, + AUX_TYPE_PERF_BG_FAILURE_2 = 0x10, + AUX_TYPE_PERF_FG_MDB_SUCCESS_2 = 0x13, + AUX_TYPE_PERF_FG_GC_SUCCESS_2 = 0x14, + AUX_TYPE_PERF_FG_FAILURE_2 = 0x15 + } AUX_HEADER_TYPE_2; + + typedef [public,enum8bit,flag(NDR_PAHEX)] enum { + AUX_VERSION_1 = 0x1, + AUX_VERSION_2 = 0x2 + } AUX_VERSION; + + typedef [switch_type(uint8)] union { + [case(AUX_VERSION_1)] AUX_HEADER_TYPE_1 Type; + [case(AUX_VERSION_2)] AUX_HEADER_TYPE_2 Type_2; + [default]; + } AUX_HEADER_TYPE_ENUM; + + /*************************/ + /* AUX_HEADER case (0x1) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 SessionID; + uint16 RequestID; + } AUX_PERF_REQUESTID; + + /*************************/ + /* AUX_HEADER case (0x2) */ + typedef [public,enum16bit, flag(NDR_PAHEX)] enum { + CLIENTMODE_UNKNOWN = 0x0, + CLIENTMODE_CLASSIC = 0x1, + CLIENTMODE_CACHED = 0x2 + } ClientMode; + + typedef [public,flag(NDR_NOALIGN)] struct { + uint32 AdapterSpeed; + uint16 ClientID; + uint16 MachineNameOffset; + uint16 UserNameOffset; + uint16 ClientIPSize; + uint16 ClientIPOffset; + uint16 ClientIPMaskSize; + uint16 ClientIPMaskOffset; + uint16 AdapterNameOffset; + uint16 MacAddressSize; + uint16 MacAddressOffset; + ClientMode ClientMode; + uint16 Reserved; + nstring MachineName; + nstring UserName; + uint8 ClientIP[0]; + uint8 ClientIPMask[0]; + nstring AdapterName; + uint8 MacAddress[0]; + } AUX_PERF_CLIENTINFO; + + /*************************/ + /* AUX_HEADER case (0x3) */ + typedef [enum16bit,flag(NDR_PAHEX)] enum { + SERVERTYPE_UNKNOWN = 0x0, + SERVERTYPE_PRIVATE = 0x1, + SERVERTYPE_PUBLIC = 0x2, + SERVERTYPE_DIRECTORY = 0x3, + SERVERTYPE_REFERRAL = 0x4 + } SERVERINFO_ServerType; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 ServerID; + SERVERINFO_ServerType ServerType; + uint16 ServerDNOffset; + uint16 ServerNameOffset; + nstring ServerDN; + nstring ServerName; + } AUX_PERF_SERVERINFO; + + /*************************/ + /* AUX_HEADER case (0x4) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 SessionID; + uint16 Reserved; + GUID SessionGuid; + } AUX_PERF_SESSIONINFO; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 SessionID; + uint16 Reserved; + GUID SessionGuid; + uint32 ConnectionID; + } AUX_PERF_SESSIONINFO_V2; + + /**************************/ + /* AUX_HEADER case (0x5) */ + /* AUX_HEADER case (0xC) */ + /* AUX_HEADER case (0x11) */ + typedef [flag(NDR_NOALIGN)] struct { + uint32 TimeSinceRequest; + uint32 TimeToCompleteRequest; + uint16 RequestID; + uint16 Reserved; + } AUX_PERF_DEFMDB_SUCCESS; + + /**************************/ + /* AUX_HEADER case (0x6) */ + /* AUX_HEADER case (0xD) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 ServerID; + uint16 SessionID; + uint32 TimeSinceRequest; + uint32 TimeToCompleteRequest; + uint8 RequestOperation; + uint8 Reserved[3]; + } AUX_PERF_DEFGC_SUCCESS; + + /**************************/ + /* AUX_HEADER case (0x7) */ + /* AUX_HEADER case (0xE) */ + + /* AUX_HEADER case (0x13) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 ClientID; + uint16 ServerID; + uint16 SessionID; + uint16 RequestID; + uint32 TimeSinceRequest; + uint32 TimeToCompleteRequest; + } AUX_PERF_MDB_SUCCESS; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 ProcessID; + uint16 ClientID; + uint16 ServerID; + uint16 SessionID; + uint16 RequestID; + uint16 Reserved; + uint32 TimeSinceRequest; + uint32 TimeToCompleteRequest; + } AUX_PERF_MDB_SUCCESS_V2; + + /**************************/ + /* AUX_HEADER case (0x8) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 ClientID; + uint16 ServerID; + uint16 SessionID; + uint16 Reserved_1; + uint32 TimeSinceRequest; + uint32 TimeToCompleteRequest; + uint8 RequestOperation; + uint8 Reserved_2[3]; + } AUX_PERF_GC_SUCCESS; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 ProcessID; + uint16 ClientID; + uint16 ServerID; + uint16 SessionID; + uint32 TimeSinceRequest; + uint32 TimeToCompleteRequest; + uint8 RequestOperation; + uint8 Reserved[3]; + } AUX_PERF_GC_SUCCESS_V2; + + /**************************/ + /* AUX_HEADER case (0x9) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 ClientID; + uint16 ServerID; + uint16 SessionID; + uint16 RequestID; + uint32 TimeSinceRequest; + uint32 TimeToFailRequest; + MAPISTATUS ResultCode; + uint8 RequestOperation; + uint8 Reserved[3]; + } AUX_PERF_FAILURE; + + typedef [flag(NDR_NOALIGN)] struct { + uint16 ProcessID; + uint16 ClientID; + uint16 ServerID; + uint16 SessionID; + uint16 RequestID; + uint16 Reserved_1; + uint32 TimeSinceRequest; + uint32 TimeToFailRequest; + MAPISTATUS ResultCode; + uint8 RequestOperation; + uint8 Reserved_2[3]; + } AUX_PERF_FAILURE_V2; + + /**************************/ + /* AUX_HEADER case (0xA) */ + typedef [bitmap32bit] bitmap { + ENABLE_PERF_SENDTOSERVER = 0x00000001, + ENABLE_PERF_SENDTOMAILBOX = 0x00000002, + ENABLE_COMPRESSION = 0x00000004, + ENABLE_HTTP_TUNNELING = 0x00000008, + ENABLE_PERF_SENDGCDATA = 0x00000010 + } CLIENT_CONTROL_EnableFlags; + + typedef [flag(NDR_NOALIGN)] struct { + CLIENT_CONTROL_EnableFlags EnableFlags; + uint32 ExpiryTime; + } AUX_CLIENT_CONTROL; + + /*************************/ + /* AUX_HEADER case (0xB) */ + typedef [flag(NDR_NOALIGN)] struct { + uint16 ProcessID; + uint16 Reserved1; + GUID ProcessGuid; + uint16 ProcessNameOffset; + uint16 Reserved2; + nstring ProcessName; + } AUX_PERF_PROCESSINFO; + + /**************************/ + /* AUX_HEADER case (0x16) */ + typedef [flag(NDR_NOALIGN)] struct { + uint32 OSVersionInfoSize; + uint32 MajorVersion; + uint32 MinorVersion; + uint32 BuildNumber; + [flag(NDR_NOALIGN|NDR_REMAINING)] DATA_BLOB Reserved_1; + uint16 ServicePackMajor; + uint16 ServicePackMinor; + uint32 Reserved_2; + } AUX_OSVERSIONINFO; + + /**************************/ + /* AUX_HEADER case (0x17) */ + typedef [bitmap32bit] bitmap { + PUBLIC_FOLDERS_ENABLED = 0x00000001 + } EXORGINFO_OrgFlags; + + typedef [flag(NDR_NOALIGN)] struct { + EXORGINFO_OrgFlags OrgFlags; + } AUX_EXORGINFO; + + typedef [public,nodiscriminant,flag(NDR_NOALIGN)] union { + [case(AUX_TYPE_PERF_REQUESTID)] AUX_PERF_REQUESTID AuxiliaryPerfRequestId; + [case(AUX_TYPE_PERF_CLIENTINFO)] AUX_PERF_CLIENTINFO AuxiliaryPerfClientInfo; + [case(AUX_TYPE_PERF_SERVERINFO)] AUX_PERF_SERVERINFO AuxiliaryPerfServerInfo; + [case(AUX_TYPE_PERF_SESSIONINFO)] AUX_PERF_SESSIONINFO AuxiliaryPerfSessionInfo; + [case(AUX_TYPE_PERF_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS AuxiliaryPerfDefmdbSuccess; + [case(AUX_TYPE_PERF_DEFGC_SUCCESS)] AUX_PERF_DEFGC_SUCCESS AuxiliaryPerfDefgcSuccess; + [case(AUX_TYPE_PERF_MDB_SUCCESS)] AUX_PERF_MDB_SUCCESS AuxiliaryPerfMdbSuccess; + [case(AUX_TYPE_PERF_GC_SUCCESS)] AUX_PERF_GC_SUCCESS AuxiliaryPerfGcSuccess; + [case(AUX_TYPE_PERF_FAILURE)] AUX_PERF_FAILURE AuxiliaryPerfFailure; + [case(AUX_TYPE_CLIENT_CONTROL)] AUX_CLIENT_CONTROL AuxiliaryClientControl; + [case(AUX_TYPE_PERF_PROCESSINFO)] AUX_PERF_PROCESSINFO AuxiliaryPerfProcessInfo; + [case(AUX_TYPE_PERF_BG_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS AuxiliaryPerfBgDefmdbSuccess; + [case(AUX_TYPE_PERF_BG_DEFGC_SUCCESS)] AUX_PERF_DEFGC_SUCCESS AuxiliaryPerfBgDefgcSuccess; + [case(AUX_TYPE_PERF_BG_MDB_SUCCESS)] AUX_PERF_MDB_SUCCESS AuxiliaryPerfBgMdbSuccess; + [case(AUX_TYPE_PERF_BG_GC_SUCCESS)] AUX_PERF_GC_SUCCESS AuxiliaryPerfBgGcSuccess; + [case(AUX_TYPE_PERF_BG_FAILURE)] AUX_PERF_FAILURE AuxiliaryPerfBgFailure; + [case(AUX_TYPE_PERF_FG_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS AuxiliaryPerfFgDefmdbSuccess; + [case(AUX_TYPE_PERF_FG_DEFGC_SUCCESS)] AUX_PERF_DEFGC_SUCCESS AuxiliaryPerfFgDefgcSuccess; + [case(AUX_TYPE_PERF_FG_MDB_SUCCESS)] AUX_PERF_MDB_SUCCESS AuxiliaryPerfFgMdbSuccess; + [case(AUX_TYPE_PERF_FG_GC_SUCCESS)] AUX_PERF_GC_SUCCESS AuxiliaryPerFGGCSuccess; + [case(AUX_TYPE_PERF_FG_FAILURE)] AUX_PERF_FAILURE AuxiliaryPerfFgFailure; + [case(AUX_TYPE_OSVERSIONINFO)] AUX_OSVERSIONINFO AuxiliaryOSVersionInfo; + [case(AUX_TYPE_EXORGINFO)] AUX_EXORGINFO AuxiliaryEXOrgInfo; + [default][flag(NDR_REMAINING|NDR_NOALIGN)] DATA_BLOB Payload; + } AuxDataVersion1; + + typedef [public,nodiscriminant,flag(NDR_NOALIGN)] union { + [case(AUX_TYPE_PERF_REQUESTID)] AUX_PERF_REQUESTID AuxiliaryPerfRequestId; + [case(AUX_TYPE_PERF_CLIENTINFO)] AUX_PERF_CLIENTINFO AuxiliaryPerfClientInfo; + [case(AUX_TYPE_PERF_SERVERINFO)] AUX_PERF_SERVERINFO AuxiliaryPerfServerInfo; + [case(AUX_TYPE_PERF_SESSIONINFO_2)] AUX_PERF_SESSIONINFO_V2 AuxiliaryPerfSessioninfo; /* V2 specific */ + [case(AUX_TYPE_PERF_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS AuxiliaryPerfDefmdbSuccess; + [case(AUX_TYPE_PERF_DEFGC_SUCCESS)] AUX_PERF_DEFGC_SUCCESS AuxiliaryPerfDefgcSuccess; + [case(AUX_TYPE_PERF_MDB_SUCCESS_2)] AUX_PERF_MDB_SUCCESS_V2 AuxiliaryPerfMdbSuccess; /* V2 specific */ + [case(AUX_TYPE_PERF_GC_SUCCESS_2)] AUX_PERF_GC_SUCCESS_V2 AuxiliaryPerfGcSuccess; /* V2 specific */ + [case(AUX_TYPE_PERF_FAILURE_2)] AUX_PERF_FAILURE_V2 AuxiliaryPerfFailure; /* V2 specific*/ + [case(AUX_TYPE_CLIENT_CONTROL)] AUX_CLIENT_CONTROL AuxiliaryPerf; + [case(AUX_TYPE_PERF_PROCESSINFO_2)] AUX_PERF_PROCESSINFO AuxiliaryPerfProcessInfo; + [case(AUX_TYPE_PERF_BG_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS AuxiliaryPerfBgDefmdbSuccess; + [case(AUX_TYPE_PERF_BG_DEFGC_SUCCESS)] AUX_PERF_DEFGC_SUCCESS AuxiliaryPerfBgDefgcSuccess; + [case(AUX_TYPE_PERF_BG_MDB_SUCCESS_2)] AUX_PERF_MDB_SUCCESS_V2 AuxiliaryPerfBgMdbSuccess; + [case(AUX_TYPE_PERF_BG_GC_SUCCESS_2)] AUX_PERF_GC_SUCCESS AuxiliaryPerfBgGcSuccess; + [case(AUX_TYPE_PERF_BG_FAILURE_2)] AUX_PERF_FAILURE AuxiliaryPerfBgFailure; + [case(AUX_TYPE_PERF_FG_DEFMDB_SUCCESS)] AUX_PERF_DEFMDB_SUCCESS AuxiliaryPerfFgDefmdbSuccess; + [case(AUX_TYPE_PERF_FG_DEFGC_SUCCESS)] AUX_PERF_DEFGC_SUCCESS AuxiliaryPerfFgDefgcSuccess; + [case(AUX_TYPE_PERF_FG_MDB_SUCCESS_2)] AUX_PERF_MDB_SUCCESS AuxiliaryPerfFgMdbSuccess; + [case(AUX_TYPE_PERF_FG_GC_SUCCESS_2)] AUX_PERF_GC_SUCCESS AuxiliaryPerFGGCSuccess; + [case(AUX_TYPE_PERF_FG_FAILURE_2)] AUX_PERF_FAILURE AuxiliaryPerfFgFailure; + [case(AUX_TYPE_OSVERSIONINFO)] AUX_OSVERSIONINFO AuxiliaryOSVersionInfo; + [case(AUX_TYPE_EXORGINFO)] AUX_EXORGINFO AuxiliaryEXOrgInfo; + [default][flag(NDR_REMAINING|NDR_NOALIGN)] DATA_BLOB Payload; + } AuxDataVersion2; + + typedef [public,switch_type(uint8)] union { + [case(AUX_VERSION_1)] AuxDataVersion1 Version1; + [case(AUX_VERSION_2)] AuxDataVersion2 Version2; + [default]; + } AUX_DATA; + + typedef [public,nopull,noprint,flag(NDR_NOALIGN)] struct { + uint16 Size; + AUX_VERSION Version; + + /* Switch based on the version. Not really a union in NDR */ + [switch_is(Version)] AUX_HEADER_TYPE_ENUM hdrType; + + /* Switch based on the version and header type */ + AUX_DATA AuxData ; + } AUX_HEADER; + + typedef [public,bitmap16bit] bitmap { + RHEF_Compressed = 0x0001, + RHEF_XorMagic = 0x0002, + RHEF_Last = 0x0004 + } RPC_HEADER_EXT_Flags; + + typedef [public] struct { + uint16 Version; + RPC_HEADER_EXT_Flags Flags; + uint16 Size; + uint16 SizeActual; + } RPC_HEADER_EXT; + + typedef [public,nopull,noprint] struct { + uint32 auxInSize; + RPC_HEADER_EXT RpcHeaderExtension; + AUX_HEADER auxHeader[0]; /* Plain LZ77 Compressed */ + } AuxInfo; + + typedef [public,nopull,noprint] struct { + RPC_HEADER_EXT RpcHeaderExtension; + AUX_HEADER auxHeader[0]; /* Plain LZ77 Compressed */ + } AuxInfoOut; + + WERROR mapi_EcDoConnectEx( + [out] policy_handle *handle, + [in,string,charset(DOS)] uint8 szUserDN[], + [in] uint32 ulFlags, + [in] uint32 ulConMod, + [in] uint32 cbLimit, + [in] uint32 ulCpid, + [in] uint32 ulLcidString, + [in] uint32 ulLcidSort, + [in] uint32 ulIcxrLink, + [in] uint16 usFCanConvertCodePages, + [out] uint32 *pcmsPollsMax, + [out] uint32 *pcRetry, + [out] uint32 *pcmsRetryDelay, + [out] uint32 *picxr, + [out,unique,ref,string,charset(DOS)]uint8 **szDNPrefix, + [out,unique,ref,string,charset(DOS)]uint8 **szDisplayName, + [in,string] uint8 rgwClientVersion[6], + [out,string] uint8 rgwServerVersion[6], + [out,string] uint8 rgwBestVersion[6], + [in,out] uint32 *pulTimeStamp, + [in,represent_as(4),flag(NDR_NOALIGN|NDR_REMAINING)] AuxInfo *rgbAuxIn, + [in] uint32 cbAuxIn, + [out,size_is(*pcbAuxOut),length_is(0)] AuxInfoOut *rgbAuxOut, + [in,out][range(0,0x1008)] uint32 *pcbAuxOut + ); + + /******************/ + /* Function: 0x0b */ + + typedef [noprint, bitmap32bit] bitmap { + NoCompression = 0x00000001, + NoXorMagic = 0x00000002, + Chain = 0x00000004 + } RpcExt2Flags; + + typedef [public,flag(NDR_NOALIGN)] struct { + ROP_OPNUM RopId; + [switch_is(RopId)] RopRequest u; + } RopInput; + + typedef [public,nopull] struct { + uint16 ropSize; + RopInput rop[0]; + uint32 objectHandles[0]; /* ServerObjectHandleTable */ + } ROPInputBuffer; + + typedef [public,nopull] struct { + RPC_HEADER_EXT RpcHeaderExtension; + [flag(NDR_REMAINING|NDR_NOALIGN)] ROPInputBuffer ropIn; + } RgbIn; + + typedef [public,flag(NDR_NOALIGN)] struct { + ROP_OPNUM RopId; + [switch_is(RopId)] RopReply u; + } RopOutput; + + typedef [public,nopull] struct { + uint16 ropSize; + RopOutput rop[0]; + uint32 objectHandles[0]; /* ServerObjectHandleTable */ + } ROPOutputBuffer; + + typedef [public,nopull] struct { + RPC_HEADER_EXT RpcHeaderExtension; + [flag(NDR_REMAINING|NDR_NOALIGN)] ROPOutputBuffer ropOut; + } RgbOut; + + WERROR mapi_EcDoRpcExt2( + [in, out, ref] policy_handle * pcxh, + [in, out] RpcExt2Flags *pulFlags, + [in, represent_as(4)] RgbIn *rgbIn, + [in] uint32 cbIn, + [out, length_is(*pcbOut), size_is(*pcbOut)] RgbOut *rgbOut, + [in, out] [range(0x0, 0x40000)] uint32 *pcbOut, + [in,represent_as(4),flag(NDR_NOALIGN|NDR_REMAINING)] AuxInfo *rgbAuxIn, + [in] uint32 cbAuxIn, + [out,size_is(*pcbAuxOut),length_is(0)] AuxInfoOut *rgbAuxOut, + [in, out] [range(0x0, 0x1008)] uint32 *pcbAuxOut, + [out] uint32 *pulTransTime + ); + + /******************/ + /* Function: 0x0c */ + WERROR mapi_EcDoAsyncConnect( + [in] policy_handle *cxh, + [out, ref] policy_handle * pacxh + ); + + /******************/ + /* Function: 0x0d */ + WERROR mapi_EcDoAsyncWait( + [in] policy_handle *cxh, + [in] long ulFlagsIn, + [out] long *pulFlagsOut + ); + + /******************/ + /* Function: 0x0e */ + WERROR mapi_EcDoAsyncConnectEx( + [in] policy_handle *cxh, + [out, ref] policy_handle * pacxh + ); +}
\ No newline at end of file |