Network Block Device @PACKAGE_VERSION@
Data Fields

CLIENT Struct Reference

Variables associated with a client connection. More...

#include <nbdsrv.h>

Data Fields

uint64_t exportsize
 size of the file we're exporting
char * clientname
 peer, in human-readable format
struct sockaddr_storage clientaddr
 peer, in binary format, network byte order
char * exportname
 (processed) filename of the file we're exporting
GArray * export
 array of FILE_INFO of exported files; array size is always 1 unless we're doing the multiple file option
int net
 The actual client socket.
SERVERserver
 The server this client is getting data from.
char * difffilename
 filename of the copy-on-write file, if any
int difffile
 filedescriptor of copyonwrite file.
uint32_t difffilelen
 number of pages in difffile
uint32_t * difmap
 see comment on the global difmap for this one
gboolean modern
 client was negotiated using modern negotiation protocol
int transactionlogfd
 fd for transaction log
int clientfeats
 Features supported by this client.
pthread_mutex_t lock

Detailed Description

Variables associated with a client connection.

Definition at line 53 of file nbdsrv.h.


Field Documentation

struct sockaddr_storage CLIENT::clientaddr

peer, in binary format, network byte order

Definition at line 56 of file nbdsrv.h.

Referenced by authorized_client(), and set_peername().

Features supported by this client.

Definition at line 71 of file nbdsrv.h.

Referenced by handle_export_name().

peer, in human-readable format

Definition at line 55 of file nbdsrv.h.

Referenced by copyonwrite_prepare(), handle_modern_connection(), and set_peername().

filedescriptor of copyonwrite file.

Todo:
shouldn't this be an array too? (cfr export) Or make -m and -c mutually exclusive

Definition at line 64 of file nbdsrv.h.

Referenced by copyonwrite_prepare(), expflush(), expread(), expwrite(), and mainloop().

number of pages in difffile

Definition at line 67 of file nbdsrv.h.

Referenced by expwrite().

filename of the copy-on-write file, if any

Definition at line 63 of file nbdsrv.h.

Referenced by copyonwrite_prepare(), and mainloop().

uint32_t* CLIENT::difmap

see comment on the global difmap for this one

Definition at line 68 of file nbdsrv.h.

Referenced by copyonwrite_prepare(), expread(), expwrite(), and mainloop().

GArray* CLIENT::export

array of FILE_INFO of exported files; array size is always 1 unless we're doing the multiple file option

Definition at line 58 of file nbdsrv.h.

Referenced by expflush(), exptrim(), get_filepos(), and setupexport().

(processed) filename of the file we're exporting

Definition at line 57 of file nbdsrv.h.

Referenced by copyonwrite_prepare(), exptrim(), get_filepos(), serveconnection(), set_peername(), and setupexport().

size of the file we're exporting

Definition at line 54 of file nbdsrv.h.

Referenced by copyonwrite_prepare(), exptrim(), get_filepos(), handle_export_name(), main(), mainloop(), send_export_info(), and setupexport().

pthread_mutex_t CLIENT::lock
gboolean CLIENT::modern

client was negotiated using modern negotiation protocol

Definition at line 69 of file nbdsrv.h.

Referenced by handle_export_name(), and main().

fd for transaction log

Definition at line 70 of file nbdsrv.h.

Referenced by handle_export_name(), mainloop(), mainloop_threaded(), and serveconnection().


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