Network Block Device 2.9.20
Defines | Functions | Variables

cliserv.h File Reference

#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <netinet/tcp.h>
#include <stdlib.h>
#include "nbd.h"

Go to the source code of this file.

Defines

#define __be32   u32
#define __be64   u64
#define INIT_PASSWD   "NBDMAGIC"
#define INFO(a)   do { } while(0)
#define G_GNUC_NORETURN
#define htonll   ntohll
#define NBD_FLAG_HAS_FLAGS   (1 << 0)
#define NBD_FLAG_READ_ONLY   (1 << 1)
#define NBD_DEFAULT_PORT   "10809"
#define NBD_OPT_EXPORT_NAME   (1 << 0)

Functions

void setmysockopt (int sock)
void err_nonfatal (const char *s)
void err (const char *s) G_GNUC_NORETURN
void logging (void)
u64 ntohll (u64 a)

Variables

u64 cliserv_magic = 0x00420281861253LL
u64 opts_magic = 0x49484156454F5054LL

Define Documentation

#define __be32   u32

Definition at line 38 of file cliserv.h.

#define __be64   u64

Definition at line 39 of file cliserv.h.

#define G_GNUC_NORETURN

Definition at line 75 of file cliserv.h.

#define htonll   ntohll

Definition at line 133 of file cliserv.h.

Referenced by negotiate(), oversize_test(), setup_connection(), and throughput_test().

#define INFO (   a)    do { } while(0)

Definition at line 51 of file cliserv.h.

Referenced by setmysockopt().

#define INIT_PASSWD   "NBDMAGIC"

Definition at line 49 of file cliserv.h.

Referenced by negotiate(), and setup_connection().

#define NBD_DEFAULT_PORT   "10809"

Definition at line 139 of file cliserv.h.

Referenced by main(), open_modern(), and parse_cfile().

#define NBD_FLAG_HAS_FLAGS   (1 << 0)

Definition at line 136 of file cliserv.h.

Referenced by negotiate().

#define NBD_FLAG_READ_ONLY   (1 << 1)

Definition at line 137 of file cliserv.h.

Referenced by negotiate(), and setsizes().

#define NBD_OPT_EXPORT_NAME   (1 << 0)

Definition at line 143 of file cliserv.h.

Referenced by negotiate(), and setup_connection().


Function Documentation

void err ( const char *  s)
void err_nonfatal ( const char *  s)

Definition at line 79 of file cliserv.h.

Referenced by err(), negotiate(), and serveloop().

void logging ( void  )

Definition at line 112 of file cliserv.h.

References MY_NAME.

Referenced by main().

u64 ntohll ( u64  a)

Definition at line 125 of file cliserv.h.

Referenced by mainloop(), negotiate(), and setup_connection().

void setmysockopt ( int  sock)

Definition at line 53 of file cliserv.h.

References INFO, and size.

Referenced by opennet(), serveconnection(), and setup_connection().


Variable Documentation

u64 cliserv_magic = 0x00420281861253LL

Definition at line 47 of file cliserv.h.

Referenced by negotiate(), and setup_connection().

u64 opts_magic = 0x49484156454F5054LL

Definition at line 48 of file cliserv.h.

Referenced by negotiate(), and setup_connection().