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.

Detailed Description

Variables associated with a client connection.

Definition at line 54 of file nbdsrv.h.


Field Documentation

struct sockaddr_storage CLIENT::clientaddr

peer, in binary format, network byte order

Definition at line 57 of file nbdsrv.h.

Referenced by authorized_client(), and set_peername().

Features supported by this client.

Definition at line 72 of file nbdsrv.h.

Referenced by handle_export_name().

peer, in human-readable format

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

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

number of pages in difffile

Definition at line 68 of file nbdsrv.h.

Referenced by expwrite().

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

Definition at line 64 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 69 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 59 of file nbdsrv.h.

Referenced by expflush(), exptrim(), rawexpread(), rawexpwrite(), and setupexport().

(processed) filename of the file we're exporting

Definition at line 58 of file nbdsrv.h.

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

size of the file we're exporting

Definition at line 55 of file nbdsrv.h.

Referenced by copyonwrite_prepare(), handle_export_name(), handle_oldstyle_connection(), main(), mainloop(), negotiate(), and setupexport().

gboolean CLIENT::modern

client was negotiated using modern negotiation protocol

Definition at line 70 of file nbdsrv.h.

Referenced by handle_export_name(), and mainloop().

The actual client socket.

Definition at line 62 of file nbdsrv.h.

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

fd for transaction log

Definition at line 71 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: