static UINT32 GetSelector()

in TPMCmd/tpm/src/support/TableDrivenMarshal.c [99:111]


static UINT32 GetSelector(
    void                *structure,
    const UINT16        *values,
    UINT16               descriptor
)
{
    unsigned             sel = GET_ELEMENT_NUMBER(descriptor);
    // Get the offset of the value in the unmarshaled structure
    const UINT16        *entry = &values[(sel * 3)];
//
    return GetUnmarshaledInteger(GET_ELEMENT_SIZE(entry[0]),
                        ((UINT8 *)structure) + entry[2]);
}