Skip to content

Put n-1 repeated user types in one sequence field, and the last in another #1266

@msarrel-work

Description

@msarrel-work

I'm working on this spec. Is there any way to make Filestore Responses and Fault Location separate fields?

Image

Filestore Responses is a sequence of at least one TLV and is always present. Fault Location is only ever a single TLV and only present if Condition Code is not No Error. Right now, my ugly workaround is to put everything in a single field, called Dummy_TLV, and rely on the user writing in Python to check the value of Condition Code to know if the last TLV is a Fault Location TLV.

Note that the Filestore Responses TLVs all have a single type code in the TLV structure, and the Fault Location TLV has a different type code. Obviously, the TLV structures are variable length and therefore has a length field.

I've seen a bunch of existing issues on this topic, primarily #156. This comment in #156 is interesting, but it only seems to work if the repeated type is of fixed length, which my TLVs obviously are not. Also see this comment from #721. And also this microsoft_pe.ksy file referenced by @smx-smx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions