Safe Haskell | None |
---|
Low-level interface to XenCtrl
. Each function defined in this module is
a ffi call to corresponding c function.
- xc_interface_open :: CInt -> CInt -> CInt -> IO XcHandle
- xc_interface_close :: XcHandle -> IO CInt
- xc_domain_getinfo :: XcHandle -> DomId -> CUInt -> Ptr DomainInfo -> IO CInt
Documentation
This function opens the handle to the hypervisor interface. Each successful call
to this function should have a corresponding call to xc_interface_close
.
xc_interface_close :: XcHandle -> IO CIntSource
This function closes an open hypervisor interface. This function can fail if the handle does not represent an open interface or if there were problems closing the interface. In the latter case the interface is still closed.
:: XcHandle | Handle to the open hypervisor interface |
-> DomId | First domain to enumerate from. |
-> CUInt | The number of requested domains |
-> Ptr DomainInfo | Pointer to the structure that will contain the information for enumerated domains |
-> IO CInt | Number of domains enumerated, -1 on error |
This function will return information about one or more domains. It is designed to iterate over the list of domains. If a single domain is requested, this function will return the next domain in the list - if one exists. It is, therefore, important in this case to make sure the domain requested was the one returned.