#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 | 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 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) |
#define INIT_PASSWD "NBDMAGIC" |
#define NBD_DEFAULT_PORT "10809" |
#define NBD_FLAG_HAS_FLAGS (1 << 0) |
#define NBD_FLAG_READ_ONLY (1 << 1) |
#define NBD_OPT_EXPORT_NAME (1 << 0) |
void err | ( | const char * | s | ) |
Definition at line 107 of file cliserv.h.
References err_nonfatal().
Referenced by append_serve(), copyonwrite_prepare(), daemonize(), disconnect(), dosockopts(), dousers(), finish_sock(), main(), mainloop(), myseek(), negotiate(), open_modern(), opennet(), oversize_test(), parse_cfile(), readit(), serve_err(), serveloop(), set_peername(), set_timeout(), setsizes(), setup_connection(), setup_serve(), setup_servers(), setupexport(), size_autodetect(), throughput_test(), and writeit().
void err_nonfatal | ( | const char * | s | ) |
void logging | ( | void | ) |
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.
Referenced by opennet(), serveconnection(), and setup_connection().
u64 cliserv_magic = 0x00420281861253LL |
u64 opts_magic = 0x49484156454F5054LL |