Network Block Device 2.9.20
Data Structures | Defines | Enumerations | Functions | Variables

nbd.h File Reference

Go to the source code of this file.

Data Structures

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_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 }

Functions

struct nbd_request __attribute__ ((packed))

Variables

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

Define Documentation

#define NBD_CLEAR_QUE   _IO( 0xab, 5 )

Definition at line 25 of file nbd.h.

Referenced by disconnect(), and main().

#define NBD_CLEAR_SOCK   _IO( 0xab, 4 )

Definition at line 24 of file nbd.h.

Referenced by disconnect(), main(), and setsizes().

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

Definition at line 37 of file nbd.h.

#define NBD_DISCONNECT   _IO( 0xab, 8 )

Definition at line 28 of file nbd.h.

Referenced by disconnect().

#define NBD_DO_IT   _IO( 0xab, 3 )

Definition at line 23 of file nbd.h.

Referenced by main().

#define NBD_PRINT_DEBUG   _IO( 0xab, 6 )

Definition at line 26 of file nbd.h.

#define NBD_REPLY_MAGIC   0x67446698

Definition at line 44 of file nbd.h.

Referenced by mainloop(), and read_packet_check_header().

#define NBD_REQUEST_MAGIC   0x25609513

Definition at line 43 of file nbd.h.

Referenced by close_connection(), mainloop(), oversize_test(), and throughput_test().

#define NBD_SET_BLKSIZE   _IO( 0xab, 1 )

Definition at line 21 of file nbd.h.

Referenced by setsizes().

#define NBD_SET_SIZE   _IO( 0xab, 2 )

Definition at line 22 of file nbd.h.

Referenced by setsizes().

#define NBD_SET_SIZE_BLOCKS   _IO( 0xab, 7 )

Definition at line 27 of file nbd.h.

Referenced by setsizes().

#define NBD_SET_SOCK   _IO( 0xab, 0 )

Definition at line 20 of file nbd.h.

Referenced by finish_sock().

#define NBD_SET_TIMEOUT   _IO( 0xab, 9 )

Definition at line 29 of file nbd.h.

Referenced by set_timeout().


Enumeration Type Documentation

anonymous enum
Enumerator:
NBD_CMD_READ 
NBD_CMD_WRITE 
NBD_CMD_DISC 

Definition at line 31 of file nbd.h.


Function Documentation

struct nbd_request __attribute__ ( (packed)  )

Variable Documentation

struct nbd_reply __attribute__
__be64 from

Definition at line 61 of file nbd.h.

char handle[8]

Definition at line 60 of file nbd.h.

__be32 len

Definition at line 62 of file nbd.h.

Referenced by authorized_client(), check_conn(), and mainloop().

__be32 magic

Definition at line 58 of file nbd.h.

Referenced by negotiate().

__be32 type

Definition at line 59 of file nbd.h.