summaryrefslogtreecommitdiffstats
path: root/src/server/server.h
diff options
context:
space:
mode:
authorsr2012-09-03 15:27:36 +0200
committersr2012-09-03 15:27:36 +0200
commita55be46ec7a281f5c3d41d48edf32e57ef5e4ba1 (patch)
treed375eaf63e03a6e1b5e199712735a68b448c6d97 /src/server/server.h
parent[SERVER] Add list of trusted servers and namespaces (load, display) (diff)
downloaddnbd3-a55be46ec7a281f5c3d41d48edf32e57ef5e4ba1.tar.gz
dnbd3-a55be46ec7a281f5c3d41d48edf32e57ef5e4ba1.tar.xz
dnbd3-a55be46ec7a281f5c3d41d48edf32e57ef5e4ba1.zip
[*] Fixed and unified formatting
Diffstat (limited to 'src/server/server.h')
-rw-r--r--src/server/server.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/server/server.h b/src/server/server.h
index 1e17048..c608066 100644
--- a/src/server/server.h
+++ b/src/server/server.h
@@ -41,27 +41,27 @@ typedef struct
{
char *config_group; // exact name of group in config file that represents this image
char *low_name; // full (global) name of image, lowercased for comparison, eg. "uni-freiburg/rz/ubuntu-12.04"
- int rid; // revision of provided image
- char *file; // path to image file or device
- uint64_t filesize; // size of image
- dnbd3_server_entry_t servers[NUMBER_SERVERS]; // known alt servers that also offer that image
- time_t atime; // last access time
- uint8_t *cache_map; // cache map telling which parts are locally cached
- char *cache_file; // path to local cache of image (in case the image is read from a dnbd3 device)
- char working; // whether this image is considered working. local images are "working" if the local file exists, proxied images have to have at least one working upstream server or a complete local cache file
- time_t delete_soft; // unixtime telling when this image should be deleted. if there are still clients using this image it weill be kept, but new clients requesting the image will be rejected. 0 = never
- time_t delete_hard; // unixtime telling when this image should be deleted, no matter if there are still clients connected. 0 = never
- uint8_t relayed; // TRUE if relayed from other server (needs dnbd3 client module loaded)
+ int rid; // revision of provided image
+ char *file; // path to image file or device
+ uint64_t filesize; // size of image
+ dnbd3_server_entry_t servers[NUMBER_SERVERS]; // known alt servers that also offer that image
+ time_t atime; // last access time
+ uint8_t *cache_map; // cache map telling which parts are locally cached
+ char *cache_file; // path to local cache of image (in case the image is read from a dnbd3 device)
+ char working; // whether this image is considered working. local images are "working" if the local file exists, proxied images have to have at least one working upstream server or a complete local cache file
+ time_t delete_soft; // unixtime telling when this image should be deleted. if there are still clients using this image it weill be kept, but new clients requesting the image will be rejected. 0 = never
+ time_t delete_hard; // unixtime telling when this image should be deleted, no matter if there are still clients connected. 0 = never
+ uint8_t relayed; // TRUE if relayed from other server (needs dnbd3 client module loaded)
} dnbd3_image_t;
typedef struct
{
- int sock;
- uint8_t ipaddr[16];
- uint8_t addrtype; // ip version (AF_INET or AF_INET6)
- uint8_t is_server; // TRUE if a server in proxy mode, FALSE if real client
- pthread_t thread;
- dnbd3_image_t *image;
+ int sock;
+ uint8_t ipaddr[16];
+ uint8_t addrtype; // ip version (AF_INET or AF_INET6)
+ uint8_t is_server; // TRUE if a server in proxy mode, FALSE if real client
+ pthread_t thread;
+ dnbd3_image_t *image;
} dnbd3_client_t;
typedef struct