@@ -18,10 +18,22 @@ typedef struct {
18
18
/**
19
19
* This function sends GET_VERSION and receives VERSION.
20
20
*
21
- * @param spdm_context A pointer to the SPDM context.
21
+ * @param spdm_context A pointer to the SPDM context.
22
+ * @param version_count The number of SPDM versions that the Responder supports.
23
+ * @param VersionNumberEntries The list of SPDM versions that the Responder supports.
22
24
*
23
- * @retval RETURN_SUCCESS The GET_VERSION is sent and the VERSION is received.
24
- * @retval RETURN_DEVICE_ERROR A device error occurs when communicates with the device.
25
+ * @retval LIBSPDM_STATUS_SUCCESS
26
+ * GET_VERSION was sent and VERSION was received.
27
+ * @retval LIBSPDM_STATUS_INVALID_MSG_SIZE
28
+ * The size of the VERSION response is invalid.
29
+ * @retval LIBSPDM_STATUS_INVALID_MSG_FIELD
30
+ * The VERSION response contains one or more invalid fields.
31
+ * @retval LIBSPDM_STATUS_ERROR_PEER
32
+ * The Responder returned an unexpected error.
33
+ * @retval LIBSPDM_STATUS_BUSY_PEER
34
+ * The Responder continually returned Busy error messages.
35
+ * @retval LIBSPDM_STATUS_NEGOTIATION_FAIL
36
+ * The Requester and Responder do not support a common SPDM version.
25
37
**/
26
38
libspdm_return_t libspdm_try_get_version (libspdm_context_t * spdm_context ,
27
39
uint8_t * version_number_entry_count ,
@@ -156,14 +168,25 @@ libspdm_return_t libspdm_try_get_version(libspdm_context_t *spdm_context,
156
168
}
157
169
158
170
/**
159
- * This function sends GET_VERSION and receives VERSION.
171
+ * This function sends GET_VERSION and receives VERSION. It may retry GET_VERSION multiple times
172
+ * if the Responder replies with a Busy error.
160
173
*
161
- * @param spdm_context A pointer to the SPDM context.
162
- * @param version_count version_count from the VERSION response .
163
- * @param VersionNumberEntries VersionNumberEntries from the VERSION response .
174
+ * @param spdm_context A pointer to the SPDM context.
175
+ * @param version_count The number of SPDM versions that the Responder supports .
176
+ * @param VersionNumberEntries The list of SPDM versions that the Responder supports .
164
177
*
165
- * @retval RETURN_SUCCESS The GET_VERSION is sent and the VERSION is received.
166
- * @retval RETURN_DEVICE_ERROR A device error occurs when communicates with the device.
178
+ * @retval LIBSPDM_STATUS_SUCCESS
179
+ * GET_VERSION was sent and VERSION was received.
180
+ * @retval LIBSPDM_STATUS_INVALID_MSG_SIZE
181
+ * The size of the VERSION response is invalid.
182
+ * @retval LIBSPDM_STATUS_INVALID_MSG_FIELD
183
+ * The VERSION response contains one or more invalid fields.
184
+ * @retval LIBSPDM_STATUS_ERROR_PEER
185
+ * The Responder returned an unexpected error.
186
+ * @retval LIBSPDM_STATUS_BUSY_PEER
187
+ * The Responder continually returned Busy error messages.
188
+ * @retval LIBSPDM_STATUS_NEGOTIATION_FAIL
189
+ * The Requester and Responder do not support a common SPDM version.
167
190
**/
168
191
libspdm_return_t libspdm_get_version (libspdm_context_t * spdm_context ,
169
192
uint8_t * version_number_entry_count ,
0 commit comments