ifapi_eventlog.3 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. .TH "ifapi_eventlog" 3 "Fri Oct 7 2022" "Version 3.2.0" "tpm2-tss" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. ifapi_eventlog
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "void \fBifapi_cleanup_event\fP (\fBIFAPI_EVENT\fP *event)"
  13. .br
  14. .ti -1c
  15. .RI "TSS2_RC \fBifapi_eventlog_append_check\fP (\fBIFAPI_EVENTLOG\fP *eventlog, \fBIFAPI_IO\fP *io)"
  16. .br
  17. .ti -1c
  18. .RI "TSS2_RC \fBifapi_eventlog_append_finish\fP (\fBIFAPI_EVENTLOG\fP *eventlog, \fBIFAPI_IO\fP *io, const \fBIFAPI_EVENT\fP *pcr_event)"
  19. .br
  20. .ti -1c
  21. .RI "TSS2_RC \fBifapi_eventlog_get_async\fP (\fBIFAPI_EVENTLOG\fP *eventlog, \fBIFAPI_IO\fP *io, const TPM2_HANDLE *pcrList, size_t pcrListSize)"
  22. .br
  23. .ti -1c
  24. .RI "TSS2_RC \fBifapi_eventlog_get_finish\fP (\fBIFAPI_EVENTLOG\fP *eventlog, \fBIFAPI_IO\fP *io, char **log)"
  25. .br
  26. .ti -1c
  27. .RI "TSS2_RC \fBifapi_eventlog_initialize\fP (\fBIFAPI_EVENTLOG\fP *eventlog, const char *log_dir)"
  28. .br
  29. .in -1c
  30. .SH "Detailed Description"
  31. .PP
  32. Provides internal fapi functions for the handling of event logs
  33. .SH "Function Documentation"
  34. .PP
  35. .SS "void ifapi_cleanup_event (\fBIFAPI_EVENT\fP * event)"
  36. Free allocated memory for an ifapi event\&.
  37. .PP
  38. \fBParameters:\fP
  39. .RS 4
  40. \fIevent\fP The structure to be cleaned up\&.
  41. .RE
  42. .PP
  43. .SS "TSS2_RC ifapi_eventlog_append_check (\fBIFAPI_EVENTLOG\fP * eventlog, \fBIFAPI_IO\fP * io)"
  44. Check event log format before appending an event to the existing event log\&.
  45. .PP
  46. Call after ifapi_eventlog_get_async\&.
  47. .PP
  48. \fBParameters:\fP
  49. .RS 4
  50. \fIeventlog\fP The context area for the eventlog\&.
  51. .br
  52. \fIio\fP The context area for the asynchronous io module\&.
  53. .RE
  54. .PP
  55. \fBReturn values:\fP
  56. .RS 4
  57. \fITSS2_RC_SUCCESS\fP on success\&.
  58. .br
  59. \fITSS2_FAPI_RC_IO_ERROR\fP if creation of log_dir failed or log_dir is not writable\&.
  60. .br
  61. \fITSS2_FAPI_RC_MEMORY\fP if memory allocation failed\&.
  62. .br
  63. \fITSS2_FAPI_RC_TRY_AGAIN\fP if the I/O operation is not finished yet and this function needs to be called again\&.
  64. .br
  65. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  66. .br
  67. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  68. .br
  69. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  70. .br
  71. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  72. .RE
  73. .PP
  74. .SS "TSS2_RC ifapi_eventlog_append_finish (\fBIFAPI_EVENTLOG\fP * eventlog, \fBIFAPI_IO\fP * io, const \fBIFAPI_EVENT\fP * pcr_event)"
  75. Append an event to the existing event log\&.
  76. .PP
  77. Call after ifapi_eventlog_get_async\&.
  78. .PP
  79. \fBParameters:\fP
  80. .RS 4
  81. \fIeventlog\fP The context area for the eventlog\&.
  82. .br
  83. \fIio\fP The context area for the asynchronous io module\&.
  84. .br
  85. \fIpcr_event\fP The event to be appended to the eventlog\&.
  86. .RE
  87. .PP
  88. \fBReturn values:\fP
  89. .RS 4
  90. \fITSS2_RC_SUCCESS\fP on success\&.
  91. .br
  92. \fITSS2_FAPI_RC_IO_ERROR\fP if creation of log_dir failed or log_dir is not writable\&.
  93. .br
  94. \fITSS2_FAPI_RC_MEMORY\fP if memory allocation failed\&.
  95. .br
  96. \fITSS2_FAPI_RC_TRY_AGAIN\fP if the I/O operation is not finished yet and this function needs to be called again\&.
  97. .br
  98. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  99. .br
  100. \fITSS2_FAPI_RC_GENERAL_FAILURE\fP if an internal error occurred\&.
  101. .br
  102. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  103. .br
  104. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  105. .RE
  106. .PP
  107. .SS "TSS2_RC ifapi_eventlog_get_async (\fBIFAPI_EVENTLOG\fP * eventlog, \fBIFAPI_IO\fP * io, const TPM2_HANDLE * pcrList, size_t pcrListSize)"
  108. Retrieve the eventlog for a given list of pcrs using asynchronous io\&.
  109. .PP
  110. Call ifapi_eventlog_get_finish to retrieve the results\&.
  111. .PP
  112. \fBParameters:\fP
  113. .RS 4
  114. \fIeventlog\fP The context area for the eventlog\&.
  115. .br
  116. \fIio\fP The context area for the asynchronous io module\&.
  117. .br
  118. \fIpcrList\fP The list of PCR indices to retrieve the log for\&.
  119. .br
  120. \fIpcrListSize\fP The size of pcrList\&.
  121. .RE
  122. .PP
  123. \fBReturn values:\fP
  124. .RS 4
  125. \fITSS2_RC_SUCCESS\fP on success\&.
  126. .br
  127. \fITSS2_FAPI_RC_IO_ERROR\fP if creation of log_dir failed or log_dir is not writable\&.
  128. .br
  129. \fITSS2_FAPI_RC_MEMORY\fP if memory allocation failed\&.
  130. .br
  131. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  132. .br
  133. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  134. .RE
  135. .PP
  136. .SS "TSS2_RC ifapi_eventlog_get_finish (\fBIFAPI_EVENTLOG\fP * eventlog, \fBIFAPI_IO\fP * io, char ** log)"
  137. Retrieve the eventlog for a given list of pcrs using asynchronous io\&.
  138. .PP
  139. Call after ifapi_eventlog_get_async\&.
  140. .PP
  141. \fBParameters:\fP
  142. .RS 4
  143. \fIeventlog\fP The context area for the eventlog\&.
  144. .br
  145. \fIio\fP The context area for the asynchronous io module\&.
  146. .br
  147. \fIlog\fP The event log for the requested PCRs in JSON format
  148. .RE
  149. .PP
  150. \fBReturn values:\fP
  151. .RS 4
  152. \fITSS2_RC_SUCCESS\fP on success\&.
  153. .br
  154. \fITSS2_FAPI_RC_IO_ERROR\fP if creation of log_dir failed or log_dir is not writable\&.
  155. .br
  156. \fITSS2_FAPI_RC_MEMORY\fP if memory allocation failed\&.
  157. .br
  158. \fITSS2_FAPI_RC_TRY_AGAIN\fP if the I/O operation is not finished yet and this function needs to be called again\&.
  159. .br
  160. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  161. .br
  162. \fITSS2_FAPI_RC_BAD_SEQUENCE\fP if the context has an asynchronous operation already pending\&.
  163. .br
  164. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  165. .RE
  166. .PP
  167. .SS "TSS2_RC ifapi_eventlog_initialize (\fBIFAPI_EVENTLOG\fP * eventlog, const char * log_dir)"
  168. Initialize the eventlog module of FAPI\&.
  169. .PP
  170. \fBParameters:\fP
  171. .RS 4
  172. \fIeventlog\fP The context area for the eventlog\&.
  173. .br
  174. \fIlog_dir\fP The directory where to put the eventlog data\&.
  175. .RE
  176. .PP
  177. \fBReturn values:\fP
  178. .RS 4
  179. \fITSS2_RC_SUCCESS\fP on success\&.
  180. .br
  181. \fITSS2_FAPI_RC_IO_ERROR\fP if creation of log_dir failed or log_dir is not writable\&.
  182. .br
  183. \fITSS2_FAPI_RC_MEMORY\fP if memory allocation failed\&.
  184. .br
  185. \fITSS2_FAPI_RC_BAD_REFERENCE\fP a invalid null pointer is passed\&.
  186. .br
  187. \fITSS2_FAPI_RC_BAD_VALUE\fP if an invalid value was passed into the function\&.
  188. .RE
  189. .PP
  190. .SH "Author"
  191. .PP
  192. Generated automatically by Doxygen for tpm2-tss from the source code\&.