Overview   API Reference  

windhoek_driver Struct Reference

Class providing access to raw disks using the windhoek block server. More...

#include <windhoek_driver.hpp>

Inheritance diagram for windhoek_driver:

Inheritance graph
[legend]
Collaboration diagram for windhoek_driver:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 windhoek_driver (const string &disk_name, const state_flags flags=0)
virtual l4_sector_t sectors (void) const
 Returns the number of disk sectors the underlying medium (e.g a file) provides.
virtual int read_sectors (uint8_t *buffer, l4_sector_t sector, l4_sector_t number)
 Reads (from disk) the specified number of sectors starting at the specified sector (inclusive) into the specified data buffer (which must be big enough).
virtual int write_sectors (uint8_t *buffer, l4_sector_t sector, l4_sector_t number)
 Writes (to disk) the specified number of sectors starting at the specified sector (inclusive) from the specified data buffer (which must be big enough).

Protected Member Functions

virtual int open_device (void)
virtual int close_device (void)
int transfer_sectors (uint8_t read_write, l4_sector_t sector, l4_sector_t number)
int read_write_sectors (uint8_t read_write, uint8_t *buffer, l4_sector_t sector, l4_sector_t number)

Static Protected Member Functions

static l4_threadid_t get_windhoek_id (void)

Protected Attributes

const string disk_name
 Windhoek block device name.
l4_threadid_t server_id
 Windhoek server ID to send requests to.
int handle
 Connection handle returned by windhoek.
windhoek_device * device
 Pointer to windhoek_device struct inside the control dataspace. Do not free.
l4_sector_t size
 Disk/partition size in sectors as reported by windhoek.
dataspace control
 Windhoek connection associated dataspaces.
dataspace data
l4_sector_t data_size
 Number of sectors the data dataspace can store.


Detailed Description

Class providing access to raw disks using the windhoek block server.

TODO: interleaved requests. handle more than 1 transaction at a time. TODO: resize dataspaces, instead of copying in a loop.

FIXME: resize dataspaces? does the server still work? FIXME: what is windhoek_device.start_sector used for? FIXME: open partitions? how do i get the partition size? FIXME: is windhoek_bio.uid client or client connection (aka. open call) unique? FIXME: is windhoek_bio.start_sector relative to partition or disk (see windhoek_device.start_sector) in case of a partition?


Member Function Documentation

virtual int windhoek_driver::read_sectors ( uint8_t *  buffer,
l4_sector_t  sector,
l4_sector_t  number 
) [inline, virtual]

Reads (from disk) the specified number of sectors starting at the specified sector (inclusive) into the specified data buffer (which must be big enough).

Returns 0 on success. Negative error codes otherwise.

Implements block_driver.

virtual int windhoek_driver::write_sectors ( uint8_t *  buffer,
l4_sector_t  sector,
l4_sector_t  number 
) [inline, virtual]

Writes (to disk) the specified number of sectors starting at the specified sector (inclusive) from the specified data buffer (which must be big enough).

Returns 0 on success. Negative error codes otherwise.

Implements block_driver.


The documentation for this struct was generated from the following files:

L4vmm Reference Manual, written by Mario Schwalbe  © 2006-2008