Changeset 77509 in vbox for trunk/include/iprt
- Timestamp:
- Feb 28, 2019 7:14:03 PM (6 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/fuzz.h
r77482 r77509 78 78 } RTFUZZCTXTYPE; 79 79 80 80 81 /** @name RTFUZZCTX_F_XXX - Flags for RTFuzzCtxCfgSetBehavioralFlags 81 82 * @{ */ … … 86 87 /** @} */ 87 88 89 90 /** 91 * Fuzzing context state export callback. 92 * 93 * @returns IPRT status code. 94 * @param hFuzzCtx Handle of the fuzzing context. 95 * @param pvBuf The data to write. 96 * @param cbWrite Number of bytes to write. 97 * @param pvUser Opaque user data passed in RTFuzzCtxStateExport(). 98 */ 99 typedef DECLCALLBACK(int) FNRTFUZZCTXEXPORT(RTFUZZCTX hFuzzCtx, const void *pvBuf, size_t cbWrite, void *pvUser); 100 /** Pointer to a fuzzing context state export callback. */ 101 typedef FNRTFUZZCTXEXPORT *PFNRTFUZZCTXEXPORT; 102 103 /** 104 * Fuzzing context state import callback. 105 * 106 * @returns IPRT status code. 107 * @param hFuzzCtx Handle of the fuzzing context. 108 * @param pvBuf Where to store the read data. 109 * @param cbRead Number of bytes to read. 110 * @param pcbRead Where to store the amount of data written, optional. 111 * @param pvUser Opaque user data passed in RTFuzzCtxCreateFromState(). 112 */ 113 typedef DECLCALLBACK(int) FNRTFUZZCTXIMPORT(RTFUZZCTX hFuzzCtx, void *pvBuf, size_t cbRead, size_t *pcbRead, void *pvUser); 114 /** Pointer to a fuzzing context state export callback. */ 115 typedef FNRTFUZZCTXIMPORT *PFNRTFUZZCTXIMPORT; 116 117 88 118 /** 89 119 * Creates a new fuzzing context. … … 100 130 * @returns IPRT status code. 101 131 * @param phFuzzCtx Where to store the handle to the fuzzing context on success. 102 * @param pvState The pointer to the fuzzing state. 103 * @param cbState Size of the state buffer in bytes. 104 */ 105 RTDECL(int) RTFuzzCtxCreateFromState(PRTFUZZCTX phFuzzCtx, const void *pvState, size_t cbState); 132 * @param pfnImport State import callback. 133 * @param pvUser Opaque user data to pass to the callback. 134 */ 135 RTDECL(int) RTFuzzCtxCreateFromState(PRTFUZZCTX phFuzzCtx, PFNRTFUZZCTXIMPORT pfnImport, void *pvUser); 136 137 /** 138 * Creates a new fuzzing context loading the state from the given memory buffer. 139 * 140 * @returns IPRT status code. 141 * @param phFuzzCtx Where to store the handle to the fuzzing context on success. 142 * @param pvState Pointer to the memory containing the state. 143 * @param cbState Size of the state buffer. 144 */ 145 RTDECL(int) RTFuzzCtxCreateFromStateMem(PRTFUZZCTX phFuzzCtx, const void *pvState, size_t cbState); 106 146 107 147 /** … … 135 175 * @returns IPRT statuse code 136 176 * @param hFuzzCtx The fuzzing context to export. 137 * @param ppvState Where to store the buffer of the state on success, free with RTMemFree(). 138 * @param pcbState Where to store the size of the context on success. 139 */ 140 RTDECL(int) RTFuzzCtxStateExport(RTFUZZCTX hFuzzCtx, void **ppvState, size_t *pcbState); 177 * @param pfnExport Export callback. 178 * @param pvUser Opaque user data to pass to the callback. 179 */ 180 RTDECL(int) RTFuzzCtxStateExport(RTFUZZCTX hFuzzCtx, PFNRTFUZZCTXEXPORT pfnExport, void *pvUser); 181 182 /** 183 * Exports the given fuzzing context state to memory allocating the buffer. 184 * 185 * @returns IPRT status code. 186 * @param hFuzzCtx The fuzzing context to export. 187 * @param ppvState Where to store the pointer to the memory containing state on success. 188 * Free with RTMemFree(). 189 * @param pcbState Where to store the size of the state in bytes. 190 */ 191 RTDECL(int) RTFuzzCtxStateExportToMem(RTFUZZCTX hFuzzCtx, void **ppvState, size_t *pcbState); 141 192 142 193 /** -
trunk/include/iprt/mangling.h
r77482 r77509 1037 1037 # define RTFuzzCtxCreateFromState RT_MANGLER(RTFuzzCtxCreateFromState) 1038 1038 # define RTFuzzCtxCreateFromStateFile RT_MANGLER(RTFuzzCtxCreateFromStateFile) 1039 # define RTFuzzCtxCreateFromStateMem RT_MANGLER(RTFuzzCtxCreateFromStateMem) 1039 1040 # define RTFuzzCtxInputGenerate RT_MANGLER(RTFuzzCtxInputGenerate) 1040 1041 # define RTFuzzCtxRelease RT_MANGLER(RTFuzzCtxRelease) … … 1043 1044 # define RTFuzzCtxStateExport RT_MANGLER(RTFuzzCtxStateExport) 1044 1045 # define RTFuzzCtxStateExportToFile RT_MANGLER(RTFuzzCtxStateExportToFile) 1046 # define RTFuzzCtxStateExportToMem RT_MANGLER(RTFuzzCtxStateExportToMem) 1045 1047 # define RTFuzzInputAddToCtxCorpus RT_MANGLER(RTFuzzInputAddToCtxCorpus) 1046 1048 # define RTFuzzInputMutateStreamData RT_MANGLER(RTFuzzInputMutateStreamData)
Note:
See TracChangeset
for help on using the changeset viewer.