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

Detailed Description

Variables associated with a client connection.

Definition at line 55 of file nbdsrv.h.

Field Documentation

struct sockaddr_storage CLIENT::clientaddr

peer, in binary format, network byte order

Definition at line 58 of file nbdsrv.h.

Referenced by set_peername().

int CLIENT::clientfeats

Features supported by this client.

Definition at line 73 of file nbdsrv.h.

Referenced by handle_export_name().

char* CLIENT::clientname

peer, in human-readable format

Definition at line 57 of file nbdsrv.h.

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

int CLIENT::difffile

filedescriptor of copyonwrite file.

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

Definition at line 66 of file nbdsrv.h.

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

uint32_t CLIENT::difffilelen

number of pages in difffile

Definition at line 69 of file nbdsrv.h.

Referenced by expwrite().

char* CLIENT::difffilename

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

Definition at line 65 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 70 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 60 of file nbdsrv.h.

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

char* CLIENT::exportname

(processed) filename of the file we're exporting

Definition at line 59 of file nbdsrv.h.

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

uint64_t CLIENT::exportsize

size of the file we're exporting

Definition at line 56 of file nbdsrv.h.

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

gboolean CLIENT::modern

client was negotiated using modern negotiation protocol

Definition at line 71 of file nbdsrv.h.

Referenced by handle_export_name().

int CLIENT::net

The actual client socket.

Definition at line 63 of file nbdsrv.h.

Referenced by handle_export_name(), handle_oldstyle_connection(), main(), mainloop(), send_export_info(), and serveconnection().

SERVER* CLIENT::server
int CLIENT::transactionlogfd

fd for transaction log

Definition at line 72 of file nbdsrv.h.

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


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