DMTF / libspdm

BSD 3-Clause "New" or "Revised" License
116 stars 106 forks source link

Add libspdm_get_data enum for accessing the request #2868

Closed wmaroneAMD closed 1 month ago

wmaroneAMD commented 1 month ago

Provide an enum to allow libspdm_get_data to return the current request and its size from the tracking pointer in the context.

steven-bellock commented 1 month ago

https://github.com/DMTF/libspdm/blob/main/doc/api/common_api.md needs to be updated as well, especially with information on when it is valid to use this.

wmaroneAMD commented 1 month ago

I'll get that added.

jyao1 commented 1 month ago

Please help me understand why the integrator need to know the request and size. What is the usage of this new type?

wmaroneAMD commented 1 month ago

@jyao1 This PR is intended to resolve the issue cited in #2847 in the most generic way possible.

steven-bellock commented 1 month ago

@wmaroneAMD you've tested this for your use case? Ie you can get the Requester's nonce?

wmaroneAMD commented 1 month ago

@steven-bellock I have tested it, once in the callback I can get the nonce from the request.