summaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
authorsr2012-09-01 18:08:27 +0200
committersr2012-09-01 18:08:27 +0200
commit3e992e066c6aeb3972758a2304cccbdba024c31e (patch)
treeb7d31b75002d5b6edd3c18b884eebf08346828ac /src/types.h
parent[SERVER] Added soft and hard timeouts for image deletion: reject any new clie... (diff)
downloaddnbd3-3e992e066c6aeb3972758a2304cccbdba024c31e.tar.gz
dnbd3-3e992e066c6aeb3972758a2304cccbdba024c31e.tar.xz
dnbd3-3e992e066c6aeb3972758a2304cccbdba024c31e.zip
[KERNEL] Tell server whether we're a client or a server in proxy mode
[KERNEL] SysFS: Return empty string for current_server if not connected [SERVER] Code refactoring
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/types.h b/src/types.h
index a264288..ab3a2f0 100644
--- a/src/types.h
+++ b/src/types.h
@@ -64,16 +64,14 @@ typedef struct
{
uint16_t len;
uint8_t addrtype;
- uint8_t addr[16]; // network representation
- uint16_t port; // network representation
+ uint8_t addr[16]; // network representation
+ uint16_t port; // network representation
uint16_t imgnamelen;
char *imgname;
int rid;
int read_ahead_kb;
- uint8_t mode; // 0 = automatic (real client), 1 = manual control (proxy)
+ uint8_t is_server; // FALSE = automatic (real client), TRUE = manual control (proxy)
} dnbd3_ioctl_t;
-#define DEVICE_MODE_CLIENT 0
-#define DEVICE_MODE_PROXY 1
// network
#define CMD_GET_BLOCK 1