From 3e992e066c6aeb3972758a2304cccbdba024c31e Mon Sep 17 00:00:00 2001 From: sr Date: Sat, 1 Sep 2012 18:08:27 +0200 Subject: [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 --- src/types.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/types.h') 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 -- cgit v1.2.3-55-g7522