Changeset 8374 in vbox for trunk/include/VBox
- Timestamp:
- Apr 24, 2008 10:12:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmifs.h
r8312 r8374 90 90 * used by the iSCSI media driver. */ 91 91 PDMINTERFACE_ISCSITRANSPORT, 92 /** PDMIISCSITRANSPORTASYNC - The asynchronous iSCSI interface (Up) Couple with PDMINTERFACE_ISCSITRANSPORT. 93 * extension used by the iSCSI media driver. */ 94 PDMINTERFACE_ISCSITRANSPORTASYNC, 95 /** PDMIISCSITRANSPORTASYNCPORT - The asynchronous iSCSI interface (Down) Couple with PDMINTERFACE_ISCSITRANSPORTASYNC. 96 * notify port used by the iSCSI media driver. */ 97 PDMINTERFACE_ISCSITRANSPORTASYNCPORT, 92 98 /** PDMIMEDIAASYNC - Async version of the media interface (Down) Coupled with PDMINTERFACE_MEDIA_ASYNC_PORT. */ 93 99 PDMINTERFACE_MEDIA_ASYNC, … … 1103 1109 } PDMIISCSITRANSPORT; 1104 1110 1111 /** 1112 * Data transport buffer (scatter/gather) 1113 */ 1114 typedef struct PDMIDATATRANSPORTSEG 1115 { 1116 /** Length of buffer in entry. */ 1117 size_t cbSeg; 1118 /** Pointer to the start of the buffer. */ 1119 void *pvSeg; 1120 } PDMIDATATRANSPORTSEG; 1121 1122 /** Pointer to a data transport segment. */ 1123 typedef PDMIDATATRANSPORTSEG *PPDMIDATATRANSPORTSEG; 1124 1125 /** Pointer to an asynchronous iSCSI transport driver interface. */ 1126 typedef struct PDMIISCSITRANSPORTASYNC *PPDMIISCSITRANSPORTASYNC; 1127 /** 1128 * Asynchronous iSCSI transport driver interface. 1129 */ 1130 typedef struct PDMIISCSITRANSPORTASYNC 1131 { 1132 /** 1133 * Start an asynchronous read request from an iSCSI transport stream. Padding is performed when necessary. 1134 * 1135 * @returns VBox status code. 1136 * @param pTransport Pointer to the interface structure containing the called function pointer. 1137 * @param prgResponse Pointer to the first scatter list entry. 1138 * @param cnResponse Number of scatter list entries. 1139 * @param pvUser User argument which is returned in completion callback. 1140 * @thread EMT thread. 1141 */ 1142 DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIISCSITRANSPORTASYNC pTransport, PISCSIRES prgResponse, unsigned int cnResponse, void *pvUser)); 1143 1144 /** 1145 * Start an asychronous write to an iSCSI transport stream. Padding is performed when necessary. 1146 * 1147 * @returns VBox status code. 1148 * @param pTransport Pointer to the interface structure containing the called function pointer. 1149 * @param prgRequest Pointer to the fist gather list entry. 1150 * @param cnRequest Number of gather list entries. 1151 * @param pvUser User argument which is returned in completion callback. 1152 * @thread EMT thread. 1153 */ 1154 DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIISCSITRANSPORTASYNC pTransport, PISCSIREQ prgRequest, unsigned int cnRequest, void *pvUser)); 1155 } PDMIISCSITRANSPORTASYNC; 1156 1157 /** Pointer to a asynchronous iSCSI transport notify interface. */ 1158 typedef struct PDMIISCSITRANSPORTASYNCPORT *PPDMIISCSITRANSPORTASYNCPORT; 1159 /** 1160 * Asynchronous iSCSI transport notify interface. 1161 * Pair with PDMIISCSITRANSPORTASYNC. 1162 */ 1163 typedef struct PDMIISCSITRANSPORTASYNCPORT 1164 { 1165 /** 1166 * Notify completion of a read task. 1167 * 1168 * @returns VBox status code. 1169 * @param pInterface Pointer to the interface structure containing the called function pointer. 1170 * @param prgResponse Pointer to the first scatter list entry. 1171 * @param cnResponse Number of scatter list entries. 1172 * @param pvUser The user argument given in pfnStartRead. 1173 * @thread Any thread. 1174 */ 1175 DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMIISCSITRANSPORTASYNCPORT pInterface, PISCSIRES prgResponse, unsigned int cnResponse, void *pvUser)); 1176 1177 /** 1178 * Notify completion of a write task. 1179 * 1180 * @returns VBox status code. 1181 * @param pInterface Pointer to the interface structure containing the called function pointer. 1182 * @param prgRequest Pointer to the fist gather list entry. 1183 * @param cnRequest Number of gather list entries. 1184 * @param pvUser The user argument given in pfnStartWrite. 1185 * @thread Any thread. 1186 */ 1187 DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMIISCSITRANSPORTASYNCPORT pTransport, PISCSIREQ prgRequest, unsigned int cnRequest, void *pvUser)); 1188 } PDMIISCSITRANSPORTASYNCPORT; 1105 1189 1106 1190 /** Pointer to a asynchronous block notify interface. */ … … 1118 1202 * @param pInterface Pointer to the interface structure containing the called function pointer. 1119 1203 * @param off Offset the task read from. 1120 * @param pvBuf The buffer containig the read data. 1204 * @param pSeg Pointer to the first element in the gather list. 1205 * @param cSeg Number of segments in the gather list. 1121 1206 * @param cbRead Number of bytes read. 1122 1207 * @param pvUser The user argument given in pfnStartRead. 1123 1208 * @thread Any thread. 1124 1209 */ 1125 DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMIBLOCKASYNCPORT pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser));1210 DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMIBLOCKASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, size_t cbRead, void *pvUser)); 1126 1211 1127 1212 /** … … 1131 1216 * @param pInterface Pointer to the interface structure containing the called function pointer. 1132 1217 * @param off Offset the task has written to. 1133 * @param pvBuf The buffer containig the written data. 1134 * @param cbWrite Number of bytes actually written. 1218 * @param pSeg Pointer to the first element in the scatter list. 1219 * @param cSeg Number of segments in the scatter list. 1220 * @param cbWritten Number of bytes actually written. 1135 1221 * @param pvUser The user argument given in pfnStartWrite. 1136 1222 * @thread Any thread. 1137 1223 */ 1138 DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMIBLOCKASYNCPORT pInterface, uint64_t off, void *pvBuf, size_t cbWrite, void *pvUser));1224 DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMIBLOCKASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, size_t cbWritten, void *pvUser)); 1139 1225 } PDMIBLOCKASYNCPORT; 1140 1226 … … 1154 1240 * @param pInterface Pointer to the interface structure containing the called function pointer. 1155 1241 * @param off Offset to start reading from. 1156 * @param pvBuf Where to store the read bits. 1242 * @param pSeg Pointer to the first element in the scatter list. 1243 * @param cSeg Number of entries in the list. 1157 1244 * @param cbRead Number of bytes to read. 1158 1245 * @param pvUser User argument which is returned in completion callback. 1159 1246 * @thread Any thread. 1160 1247 */ 1161 DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIBLOCKASYNC pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser));1248 DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIBLOCKASYNC pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, size_t cbRead, void *pvUser)); 1162 1249 1163 1250 /** … … 1167 1254 * @param pInterface Pointer to the interface structure containing the called function pointer. 1168 1255 * @param off Offset to start writing at. 1169 * @param pvBuf Where to store the write bits. 1256 * @param pSeg Pointer to the first element in the gather list. 1257 * @param cSeg Number of entries in the list. 1170 1258 * @param cbWrite Number of bytes to write. 1171 1259 * @param pvUser User argument which is returned in completion callback. 1172 1260 * @thread Any thread. 1173 1261 */ 1174 DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIBLOCKASYNC pInterface, uint64_t off, const void *pvBuf, size_t cbWrite, void *pvUser));1262 DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIBLOCKASYNC pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, size_t cbWrite, void *pvUser)); 1175 1263 1176 1264 } PDMIBLOCKASYNC; … … 1191 1279 * @param pInterface Pointer to the interface structure containing the called function pointer. 1192 1280 * @param off Offset the task read from. 1193 * @param pvBuf The buffer containig the read data. 1281 * @param pSeg Pointer to the first element in the scatter list. 1282 * @param cSeg Number of entries in the list. 1194 1283 * @param cbRead Number of bytes read. 1195 1284 * @param pvUser The user argument given in pfnStartRead. 1196 1285 * @thread Any thread. 1197 1286 */ 1198 DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMIMEDIAASYNCPORT pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser));1287 DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMIMEDIAASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, size_t cbRead, void *pvUser)); 1199 1288 1200 1289 /** … … 1204 1293 * @param pInterface Pointer to the interface structure containing the called function pointer. 1205 1294 * @param off Offset the task has written to. 1206 * @param pvBuf The buffer containig the written data. 1295 * @param pSeg Pointer to the first element in the gather list. 1296 * @param cSeg Number of entries in the list. 1207 1297 * @param cbWritten Number of bytes actually written. 1208 1298 * @param pvUser The user argument given in pfnStartWrite. 1209 1299 * @thread Any thread. 1210 1300 */ 1211 DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMIMEDIAASYNCPORT pInterface, uint64_t off, void *pvBuf, size_t cbWritten, void *pvUser));1301 DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMIMEDIAASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, size_t cbWritten, void *pvUser)); 1212 1302 } PDMIMEDIAASYNCPORT; 1213 1303 … … 1227 1317 * @param pInterface Pointer to the interface structure containing the called function pointer. 1228 1318 * @param off Offset to start reading from. 1229 * @param pvBuf Where to store the read bits. 1319 * @param pSeg Pointer to the first element in the scatter list. 1320 * @param cSeg Number of entries in the list. 1230 1321 * @param cbRead Number of bytes to read. 1231 1322 * @param pvUser User data. 1232 1323 * @thread Any thread. 1233 1324 */ 1234 DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIMEDIAASYNC pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser));1325 DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIMEDIAASYNC pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, size_t cbRead, void *pvUser)); 1235 1326 1236 1327 /** … … 1240 1331 * @param pInterface Pointer to the interface structure containing the called function pointer. 1241 1332 * @param off Offset to start writing at. 1242 * @param pvBuf Where to store the write bits. 1333 * @param pSeg Pointer to the first element in the gather list. 1334 * @param cSeg Number of entries in the list. 1243 1335 * @param cbWrite Number of bytes to write. 1244 1336 * @param pvUser User data. 1245 1337 * @thread Any thread. 1246 1338 */ 1247 DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIMEDIAASYNC pInterface, uint64_t off, const void *pvBuf, size_t cbWrite, void *pvUser));1339 DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIMEDIAASYNC pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, size_t cbWrite, void *pvUser)); 1248 1340 1249 1341 } PDMIMEDIAASYNC; … … 1264 1356 * @param pInterface Pointer to the interface structure containing the called function pointer. 1265 1357 * @param off Offset the task read from. 1266 * @param pvBuf The buffer containig the read data. 1358 * @param pSeg Pointer to the first element in the scatter list. 1359 * @param cSeg Number of entries in the list. 1267 1360 * @param cbRead Number of bytes read. 1268 1361 * @param pvUser The user argument given in pfnStartRead. 1269 1362 * @thread Any thread. 1270 1363 */ 1271 DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser)); 1364 DECLR3CALLBACKMEMBER(int, pfnReadCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, 1365 size_t cbRead, void *pvUser)); 1272 1366 1273 1367 /** … … 1277 1371 * @param pInterface Pointer to the interface structure containing the called function pointer. 1278 1372 * @param off Offset the task has written to. 1279 * @param pvBuf The buffer containig the written data. 1373 * @param pSeg Pointer to the first element in the gather list. 1374 * @param cSeg Number of entries in the list. 1280 1375 * @param cbWritten Number of bytes actually written. 1281 1376 * @param pvUser The user argument given in pfnStartWrite. 1282 1377 * @thread Any thread. 1283 1378 */ 1284 DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t off, void *pvBuf, size_t cbWritten, void *pvUser)); 1379 DECLR3CALLBACKMEMBER(int, pfnWriteCompleteNotify, (PPDMITRANSPORTASYNCPORT pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, 1380 size_t cbWritten, void *pvUser)); 1285 1381 } PDMITRANSPORTASYNCPORT; 1286 1382 … … 1328 1424 * @param pInterface Pointer to the interface structure containing the called function pointer. 1329 1425 * @param off Offset to start reading from. 1330 * @param pvBuf Where to store the read bits. 1426 * @param pSeg Pointer to the first element in the scatter list. 1427 * @param cSeg Number of entries in the list. 1331 1428 * @param cbRead Number of bytes to read. 1332 1429 * @param pvUser User argument returned in completion callback. 1333 1430 * @thread Any thread. 1334 1431 */ 1335 DECLR3CALLBACKMEMBER(int, pfnReadStartAsynchronous,(PPDMITRANSPORTASYNC pInterface, uint64_t off, void *pvBuf, size_t cbRead, void *pvUser)); 1432 DECLR3CALLBACKMEMBER(int, pfnReadStartAsynchronous,(PPDMITRANSPORTASYNC pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, 1433 size_t cbRead, void *pvUser)); 1336 1434 1337 1435 /** … … 1341 1439 * @param pInterface Pointer to the interface structure containing the called function pointer. 1342 1440 * @param off Offset to start writing at. 1343 * @param pvBuf Where to store the write bits. 1441 * @param pSeg Pointer to the first element in the gather list. 1442 * @param cSeg Number of entries in the list. 1344 1443 * @param cbWrite Number of bytes to write. 1345 1444 * @param pvUser User argument returned in completion callback. 1346 1445 * @thread Any thread. 1347 1446 */ 1348 DECLR3CALLBACKMEMBER(int, pfnWriteStartAsynchronous,(PPDMITRANSPORTASYNC pInterface, uint64_t off, const void *pvBuf, size_t cbWrite, void *pvUser)); 1447 DECLR3CALLBACKMEMBER(int, pfnWriteStartAsynchronous,(PPDMITRANSPORTASYNC pInterface, uint64_t off, PPDMIDATATRANSPORTSEG pSeg, unsigned cSeg, 1448 size_t cbWrite, void *pvUser)); 1349 1449 1350 1450 /**
Note:
See TracChangeset
for help on using the changeset viewer.