Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

VBOXDDU_DECL ( int   ) 

Initializes HDD backends.

Returns:
VBox status code.
Destroys loaded HDD backends.

Returns:
VBox status code.
Lists all HDD backends and their capabilities in a caller-provided buffer.

Returns:
VBox status code. VERR_BUFFER_OVERFLOW if not enough space is passed.
Parameters:
cEntriesAlloc Number of list entries available.
pEntries Pointer to array for the entries.
pcEntriesUsed Number of entries returned.
Lists the capablities of a backend indentified by its name.

Returns:
VBox status code.
Parameters:
pszBackend The backend name (case insensitive).
pEntries Pointer to an entry.
Allocates and initializes an empty HDD container. No image files are opened.

Returns:
VBox status code.
Parameters:
pVDIfsDisk Pointer to the per-disk VD interface list.
ppDisk Where to store the reference to HDD container.
Try to get the backend name which can use this image.

Returns:
VBox status code.
Parameters:
pVDIfsDisk Pointer to the per-disk VD interface list.
pszFilename Name of the image file for which the backend is queried.
ppszFormat Receives pointer of the UTF-8 string which contains the format name. The returned pointer must be freed using RTStrFree().
Opens an image file.

The first opened image file in HDD container must have a base image type, others (next opened images) must be differencing or undo images. Linkage is checked for differencing image to be consistent with the previously opened image. When another differencing image is opened and the last image was opened in read/write access mode, then the last image is reopened in read-only with deny write sharing mode. This allows other processes to use images in read-only mode too.

Note that the image is opened in read-only mode if a read/write open is not possible. Use VDIsReadOnly to check open mode.

Returns:
VBox status code.
Parameters:
pDisk Pointer to HDD container.
pszBackend Name of the image file backend to use (case insensitive).
pszFilename Name of the image file to open.
uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants.
pVDIfsImage Pointer to the per-image VD interface list.
Creates and opens a new base image file.

Returns:
VBox status code.
Parameters:
pDisk Pointer to HDD container.
pszBackend Name of the image file backend to use (case insensitive).
pszFilename Name of the image file to create.
cbSize Image size in bytes.
uImageFlags Flags specifying special image features.
pszComment Pointer to image comment. NULL is ok.
pPCHSGeometry Pointer to physical disk geometry <= (16383,16,63). Not NULL.
pLCHSGeometry Pointer to logical disk geometry <= (x,255,63). Not NULL.
pUuid New UUID of the image. If NULL, a new UUID is created.
uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants.
pVDIfsImage Pointer to the per-image VD interface list.
pVDIfsOperation Pointer to the per-operation VD interface list.
Creates and opens a new differencing image file in HDD container. See comments for VDOpen function about differencing images.

Returns:
VBox status code.
Parameters:
pDisk Pointer to HDD container.
pszBackend Name of the image file backend to use (case insensitive).
pszFilename Name of the differencing image file to create.
uImageFlags Flags specifying special image features.
pszComment Pointer to image comment. NULL is ok.
pUuid New UUID of the image. If NULL, a new UUID is created.
pParentUuid New parent UUID of the image. If NULL, the UUID is queried automatically.
uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants.
pVDIfsImage Pointer to the per-image VD interface list.
pVDIfsOperation Pointer to the per-operation VD interface list.
Merges two images (not necessarily with direct parent/child relationship). As a side effect the source image and potentially the other images which are also merged to the destination are deleted from both the disk and the images in the HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImageFrom Image number to merge from, counts from 0. 0 is always base image of container.
nImageTo Image number to merge to, counts from 0. 0 is always base image of container.
pVDIfsOperation Pointer to the per-operation VD interface list.
Copies an image from one HDD container to another. The copy is opened in the target HDD container. It is possible to convert between different image formats, because the backend for the destination may be different from the source. If both the source and destination reference the same HDD container, then the image is moved (by copying/deleting or renaming) to the new location. The source container is unchanged if the move operation fails, otherwise the image at the new location is opened in the same way as the old one was.

Note:
The read/write accesses across disks are not synchronized, just the accesses to each disk. Once there is a use case which requires a defined read/write behavior in this situation this needs to be extended.
Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDiskFrom Pointer to source HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pDiskTo Pointer to destination HDD container.
pszBackend Name of the image file backend to use (may be NULL to use the same as the source, case insensitive).
pszFilename New name of the image (may be NULL to specify that the copy destination is the destination container, or if pDiskFrom == pDiskTo, i.e. when moving).
fMoveByRename If true, attempt to perform a move by renaming (if successful the new size is ignored).
cbSize New image size (0 means leave unchanged).
uImageFlags Flags specifying special destination image features.
pDstUuid New UUID of the destination image. If NULL, a new UUID is created. This parameter is used if and only if a true copy is created. In all rename/move cases or copy to existing image cases the modification UUIDs are copied over.
pVDIfsOperation Pointer to the per-operation VD interface list.
pDstVDIfsImage Pointer to the per-image VD interface list, for the destination image.
pDstVDIfsOperation Pointer to the per-operation VD interface list, for the destination operation.
Optimizes the storage consumption of an image. Typically the unused blocks have to be wiped with zeroes to achieve a substantial reduced storage use. Another optimization done is reordering the image blocks, which can provide a significant performance boost, as reads and writes tend to use less random file offsets.

Note:
Compaction is treated as a single operation with regard to thread synchronization, which means that it potentially blocks other activities for a long time. The complexity of compaction would grow even more if concurrent accesses have to be handled.
Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

VERR_VD_IMAGE_READ_ONLY if image is not writable.

VERR_NOT_SUPPORTED if this kind of image can be compacted, but this isn't supported yet.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pVDIfsOperation Pointer to the per-operation VD interface list.
Closes the last opened image file in HDD container. If previous image file was opened in read-only mode (the normal case) and the last opened image is in read-write mode then the previous image will be reopened in read/write mode.

Returns:
VBox status code.

VERR_VD_NOT_OPENED if no image is opened in HDD container.

Parameters:
pDisk Pointer to HDD container.
fDelete If true, delete the image from the host disk.
Closes all opened image files in HDD container.

Returns:
VBox status code.
Parameters:
pDisk Pointer to HDD container.
Read data from virtual HDD.

Returns:
VBox status code.

VERR_VD_NOT_OPENED if no image is opened in HDD container.

Parameters:
pDisk Pointer to HDD container.
uOffset Offset of first reading byte from start of disk. Must be aligned to a sector boundary.
pvBuf Pointer to buffer for reading data.
cbRead Number of bytes to read. Must be aligned to a sector boundary.
Write data to virtual HDD.

Returns:
VBox status code.

VERR_VD_NOT_OPENED if no image is opened in HDD container.

Parameters:
pDisk Pointer to HDD container.
uOffset Offset of first writing byte from start of disk. Must be aligned to a sector boundary.
pvBuf Pointer to buffer for writing data.
cbWrite Number of bytes to write. Must be aligned to a sector boundary.
Make sure the on disk representation of a virtual HDD is up to date.

Returns:
VBox status code.

VERR_VD_NOT_OPENED if no image is opened in HDD container.

Parameters:
pDisk Pointer to HDD container.
Get virtual disk PCHS geometry of an image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

VERR_VD_GEOMETRY_NOT_SET if no geometry present in the HDD container.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pPCHSGeometry Where to store PCHS geometry. Not NULL.
Store virtual disk PCHS geometry of an image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pPCHSGeometry Where to load PCHS geometry from. Not NULL.
Get virtual disk LCHS geometry of an image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

VERR_VD_GEOMETRY_NOT_SET if no geometry present in the HDD container.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pLCHSGeometry Where to store LCHS geometry. Not NULL.
Store virtual disk LCHS geometry of an image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pLCHSGeometry Where to load LCHS geometry from. Not NULL.
Get version of image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
puVersion Where to store the image version.
List the capabilities of image backend in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to the HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pbackendInfo Where to store the backend information.
Get flags of image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
puImageFlags Where to store the image flags.
Get open flags of image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
puOpenFlags Where to store the image open flags.
Set open flags of image in HDD container. This operation may cause file locking changes and/or files being reopened. Note that in case of unrecoverable error all images in HDD container will be closed.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
uOpenFlags Image file open mode, see VD_OPEN_FLAGS_* constants.
Get base filename of image in HDD container. Some image formats use other filenames as well, so don't use this for anything but informational purposes.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

VERR_BUFFER_OVERFLOW if pszFilename buffer too small to hold filename.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pszFilename Where to store the image file name.
cbFilename Size of buffer pszFilename points to.
Get the comment line of image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

VERR_BUFFER_OVERFLOW if pszComment buffer too small to hold comment text.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pszComment Where to store the comment string of image. NULL is ok.
cbComment The size of pszComment buffer. 0 is ok.
Changes the comment line of image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pszComment New comment string (UTF-8). NULL is allowed to reset the comment.
Get UUID of image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pUuid Where to store the image UUID.
Set the image's UUID. Should not be used by normal applications.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pUuid New UUID of the image. If NULL, a new UUID is created.
Get last modification UUID of image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pUuid Where to store the image modification UUID.
Set the image's last modification UUID. Should not be used by normal applications.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pUuid New modification UUID of the image. If NULL, a new UUID is created.
Get parent UUID of image in HDD container.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of the container.
pUuid Where to store the parent image UUID.
Set the image's parent UUID. Should not be used by normal applications.

Returns:
VBox status code.
Parameters:
pDisk Pointer to HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pUuid New parent UUID of the image. If NULL, a new UUID is created.
Query if asynchronous operations are supported for this disk.

Returns:
VBox status code.

VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to the HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pfAIOSupported Where to store if async IO is supported.
Start a asynchronous read request.

Returns:
VBox status code.
Parameters:
pDisk Pointer to the HDD container.
uOffset The offset of the virtual disk to read from.
cbRead How many bytes to read.
paSeg Pointer to an array of segments.
cSeg Number of segments in the array.
pfnComplete Completion callback.
pvUser User data which is passed on completion
Start a asynchronous write request.

Returns:
VBox status code.
Parameters:
pDisk Pointer to the HDD container.
uOffset The offset of the virtual disk to write to.
cbWrtie How many bytes to write.
paSeg Pointer to an array of segments.
cSeg Number of segments in the array.
pfnComplete Completion callback.
pvUser User data which is passed on completion.
Start a asynchronous flush request.

Returns:
VBox status code.
Parameters:
pDisk Pointer to the HDD container.
pfnComplete Completion callback.
pvUser User data which is passed on completion.
Destroy a SCSI device instance.

Returns:
VBox status code.
Parameters:
hScsiDevice The SCSI device handle to destroy.
Attach a LUN to the SCSI device.

Returns:
VBox status code.
Parameters:
hScsiDevice The SCSI device handle to add the LUN to.
hScsiLun The LUN handle to add.
iLun The LUN number.
Detach a LUN from the SCSI device.

Returns:
VBox status code.
Parameters:
hVScsiDevice The SCSI device handle to add the LUN to.
iLun The LUN number to remove.
phVScsiLun Where to store the detached LUN handle.
Return the SCSI LUN handle.

Returns:
VBox status code.
Parameters:
hVScsiDevice The SCSI device handle.
iLun The LUN number to get.
phVScsiLun Where to store the LUN handle.
Enqueue a request to the SCSI device.

Returns:
VBox status code.
Parameters:
hVScsiDevice The SCSI device handle.
hVScsiReq The SCSI request handle to enqueue.
Allocate a new request handle.

Returns:
VBox status code.
Parameters:
phVScsiDevice The SCSI device handle.
phVScsiReq Where to SCSI request handle.
iLun The LUN the request is for.
pbCDB The CDB for the request.
cbCDB The size of the CDB in bytes.
cbSGList Number of bytes the S/G list describes.
cSGListEntries Number of S/G list entries.
paSGList Pointer to the S/G list.
pbSense Pointer to the sense buffer.
cbSense Size of the sense buffer.
pvVScsiReqUser Opqaue user data returned when the request completes.
Create a new LUN.

Returns:
VBox status code.
Parameters:
phVScsiLun Where to store the SCSI LUN handle.
enmLunType The Lun type.
pVScsiLunIoCallbacks Pointer to the I/O callbacks to use for his LUN.
pvVScsiLunUser Opaque user argument which is returned in the pvScsiLunUser parameter when the request completion callback is called.
Destroy virtual SCSI LUN.

Returns:
VBox status code.
Parameters:
hVScsiLun The virtal SCSI LUN handle to destroy.
Notify a that a I/O request completed.

Returns:
VBox status code.
Parameters:
hVScsiIoReq The I/O request handle that completed. This is given when a I/O callback for the LUN is called by the virtual SCSI layer.
rcIoReq The status code the I/O request completed with.
Query I/O parameters.

Returns:
VBox status code.
Parameters:
hVScsiIoReq The SCSI I/O request handle.
puOffset Where to store the start offset.
pcbTransfer Where to store the amount of bytes to transfer.
pcSeg Where to store the number of segments in the S/G list.
pcbSeg Where to store the number of bytes the S/G list describes.
ppaSeg Where to store the pointer to the S/G list.
Create a new empty SCSI device instance.

Returns:
VBox status code.
Parameters:
phVScsiDevice Where to store the SCSI device handle.
pfnVScsiReqCompleted The method call after a request completed.
pvVScsiDeviceUser Opaque user data given in the completion callback.
Destroy a SCSI device instance.

Returns:
VBox status code.
Parameters:
hScsiDevice The SCSI device handle to destroy.
Attach a LUN to the SCSI device.

Returns:
VBox status code.
Parameters:
hScsiDevice The SCSI device handle to add the LUN to.
hScsiLun The LUN handle to add.
iLun The LUN number.
Detach a LUN from the SCSI device.

Returns:
VBox status code.
Parameters:
hVScsiDevice The SCSI device handle to add the LUN to.
iLun The LUN number to remove.
phVScsiLun Where to store the detached LUN handle.
Return the SCSI LUN handle.

Returns:
VBox status code.
Parameters:
hVScsiDevice The SCSI device handle.
iLun The LUN number to get.
phVScsiLun Where to store the LUN handle.
Enqueue a request to the SCSI device.

Returns:
VBox status code.
Parameters:
hVScsiDevice The SCSI device handle.
hVScsiReq The SCSI request handle to enqueue.
Allocate a new request handle.

Returns:
VBox status code.
Parameters:
phVScsiDevice The SCSI device handle.
phVScsiReq Where to SCSI request handle.
iLun The LUN the request is for.
pbCDB The CDB for the request.
cbCDB The size of the CDB in bytes.
cbSGList Number of bytes the S/G list describes.
cSGListEntries Number of S/G list entries.
paSGList Pointer to the S/G list.
pbSense Pointer to the sense buffer.
cbSense Size of the sense buffer.
pvVScsiReqUser Opqaue user data returned when the request completes.
Create a new LUN.

Returns:
VBox status code.
Parameters:
phVScsiLun Where to store the SCSI LUN handle.
enmLunType The Lun type.
pVScsiLunIoCallbacks Pointer to the I/O callbacks to use for his LUN.
pvVScsiLunUser Opaque user argument which is returned in the pvScsiLunUser parameter when the request completion callback is called.
Destroy virtual SCSI LUN.

Returns:
VBox status code.
Parameters:
hVScsiLun The virtal SCSI LUN handle to destroy.
Notify a that a I/O request completed.

Returns:
VBox status code.
Parameters:
hVScsiIoReq The I/O request handle that completed. This is given when a I/O callback for the LUN is called by the virtual SCSI layer.
rcIoReq The status code the I/O request completed with.
Query I/O parameters.

Returns:
VBox status code.
Parameters:
hVScsiIoReq The SCSI I/O request handle.
puOffset Where to store the start offset.
pcbTransfer Where to store the amount of bytes to transfer.
pcSeg Where to store the number of segments in the S/G list.
pcbSeg Where to store the number of bytes the S/G list describes.
ppaSeg Where to store the pointer to the S/G list.


Generated by  Doxygen 1.6.0   Back to index