Interop-TestSuites icon indicating copy to clipboard operation
Interop-TestSuites copied to clipboard

magic number

Open gabor-v opened this issue 2 years ago • 3 comments

Hi!

In SharedTestCase/S12_QueryChanges.cs within TestCase_S12_TC17_QueryChanges_IncludeFilteredOutDataElementsInKnowledge I've found the following: "These two bytes are magic number which is not documented in the open specification in the current stage, but it will be wrote down in the future."

Is it already possible to know more about these bytes?

I'm interested in MS-FSSHTTP. Thank you very much!

gabor-v avatar Mar 10 '23 11:03 gabor-v

@gabor-v I am reaching doc author to get the detail info about these 2 magic numbers. Will keep you posted.

ChangDu2021 avatar Mar 14 '23 09:03 ChangDu2021

@gabor-v I reached out the document author about these 2 magic numbers, this is their reply: 0x29 in the beginning is encoding of filter itself. Hierarchy Filters don’t take guids, they take extended guids. Aka a tuple of guid and an int. That 0x01 is simply saying that you are using {guid, 1} extended guid for a filter.

Let us know if you have more questions, thanks

IvyLinMS avatar Sep 28 '23 04:09 IvyLinMS

@IvyLinMS Thank you!

Q1: Why is it necessary to use 0x29 to mark this filter? If MS-FSSHTTP server finds filterType = Hierarchy in any Filter subRequest, then it could expect ExGuids instead of Guids. In MS-FSSHTTPB 2.2.2.1.3.1.6 Data Element IDs Filter also uses an ExtendedGuidArray, but doesn't require magic numbers.

Q2: {guid, 1} extended guid would be 17 byte long version (MS-FSSHTTPB - 2.2.1.7.2), so 1 byte is enough to store it's maximum 5 bit long value. What if I would use an ExGuid for this filter, which one's value would require more than 1 byte (for example: MS-FSSHTTPB - 2.2.1.7.3-5). Will we have then here more than 2 magic numbers? In 2.2.1.7.3 case: one for 0x29 and two more for the value of this bigger ExGuid.value?

gabor-v avatar Sep 28 '23 13:09 gabor-v