Back to index

nbd  3.2
Classes | Defines | Enumerations | Functions | Variables
nbd.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nbd_request
struct  nbd_reply

Defines

#define NBD_SET_SOCK   _IO( 0xab, 0 )
#define NBD_SET_BLKSIZE   _IO( 0xab, 1 )
#define NBD_SET_SIZE   _IO( 0xab, 2 )
#define NBD_DO_IT   _IO( 0xab, 3 )
#define NBD_CLEAR_SOCK   _IO( 0xab, 4 )
#define NBD_CLEAR_QUE   _IO( 0xab, 5 )
#define NBD_PRINT_DEBUG   _IO( 0xab, 6 )
#define NBD_SET_SIZE_BLOCKS   _IO( 0xab, 7 )
#define NBD_DISCONNECT   _IO( 0xab, 8 )
#define NBD_SET_TIMEOUT   _IO( 0xab, 9 )
#define NBD_SET_FLAGS   _IO( 0xab, 10 )
#define NBD_CMD_MASK_COMMAND   0x0000ffff
#define NBD_CMD_FLAG_FUA   (1<<16)
#define NBD_FLAG_HAS_FLAGS   (1 << 0) /* Flags are there */
#define NBD_FLAG_READ_ONLY   (1 << 1) /* Device is read-only */
#define NBD_FLAG_SEND_FLUSH   (1 << 2) /* Send FLUSH */
#define NBD_FLAG_SEND_FUA   (1 << 3) /* Send FUA (Force Unit Access) */
#define NBD_FLAG_ROTATIONAL   (1 << 4) /* Use elevator algorithm - rotational media */
#define NBD_FLAG_SEND_TRIM   (1 << 5) /* Send TRIM (discard) */
#define nbd_cmd(req)   ((req)->cmd[0])
#define NBD_REQUEST_MAGIC   0x25609513
#define NBD_REPLY_MAGIC   0x67446698

Enumerations

enum  {
  NBD_CMD_READ = 0, NBD_CMD_WRITE = 1, NBD_CMD_DISC = 2, NBD_CMD_FLUSH = 3,
  NBD_CMD_TRIM = 4
}

Functions

struct nbd_request __attribute__ ((packed))

Variables

__be32 magic
__be32 type
char handle [8]
__be64 from
__be32 len
struct nbd_reply __attribute__

Class Documentation

struct nbd_request

Definition at line 65 of file nbd.h.

Class Members
__be64 from
char handle
__be32 len
__be32 magic
__be32 type
struct nbd_reply

Definition at line 77 of file nbd.h.

Class Members
__be32 error
char handle
__be32 magic

Define Documentation

#define NBD_CLEAR_QUE   _IO( 0xab, 5 )

Definition at line 25 of file nbd.h.

#define NBD_CLEAR_SOCK   _IO( 0xab, 4 )

Definition at line 24 of file nbd.h.

#define nbd_cmd (   req)    ((req)->cmd[0])

Definition at line 51 of file nbd.h.

#define NBD_CMD_FLAG_FUA   (1<<16)

Definition at line 41 of file nbd.h.

#define NBD_CMD_MASK_COMMAND   0x0000ffff

Definition at line 40 of file nbd.h.

#define NBD_DISCONNECT   _IO( 0xab, 8 )

Definition at line 28 of file nbd.h.

#define NBD_DO_IT   _IO( 0xab, 3 )

Definition at line 23 of file nbd.h.

#define NBD_FLAG_HAS_FLAGS   (1 << 0) /* Flags are there */

Definition at line 44 of file nbd.h.

#define NBD_FLAG_READ_ONLY   (1 << 1) /* Device is read-only */

Definition at line 45 of file nbd.h.

#define NBD_FLAG_ROTATIONAL   (1 << 4) /* Use elevator algorithm - rotational media */

Definition at line 48 of file nbd.h.

#define NBD_FLAG_SEND_FLUSH   (1 << 2) /* Send FLUSH */

Definition at line 46 of file nbd.h.

#define NBD_FLAG_SEND_FUA   (1 << 3) /* Send FUA (Force Unit Access) */

Definition at line 47 of file nbd.h.

#define NBD_FLAG_SEND_TRIM   (1 << 5) /* Send TRIM (discard) */

Definition at line 49 of file nbd.h.

#define NBD_PRINT_DEBUG   _IO( 0xab, 6 )

Definition at line 26 of file nbd.h.

#define NBD_REPLY_MAGIC   0x67446698

Definition at line 58 of file nbd.h.

#define NBD_REQUEST_MAGIC   0x25609513

Definition at line 57 of file nbd.h.

#define NBD_SET_BLKSIZE   _IO( 0xab, 1 )

Definition at line 21 of file nbd.h.

#define NBD_SET_FLAGS   _IO( 0xab, 10 )

Definition at line 30 of file nbd.h.

#define NBD_SET_SIZE   _IO( 0xab, 2 )

Definition at line 22 of file nbd.h.

#define NBD_SET_SIZE_BLOCKS   _IO( 0xab, 7 )

Definition at line 27 of file nbd.h.

#define NBD_SET_SOCK   _IO( 0xab, 0 )

Definition at line 20 of file nbd.h.

#define NBD_SET_TIMEOUT   _IO( 0xab, 9 )

Definition at line 29 of file nbd.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
NBD_CMD_READ 
NBD_CMD_WRITE 
NBD_CMD_DISC 
NBD_CMD_FLUSH 
NBD_CMD_TRIM 

Definition at line 32 of file nbd.h.


Function Documentation

struct nbd_request __attribute__ ( (packed)  )

Variable Documentation

Definition at line 75 of file nbd.h.

char handle[8]

Definition at line 74 of file nbd.h.

Definition at line 76 of file nbd.h.

Definition at line 72 of file nbd.h.

Definition at line 73 of file nbd.h.