summaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
authorsr2012-08-27 21:02:49 +0200
committersr2012-08-27 21:02:49 +0200
commitde01183aa40dbbd274e18f681d8a255a886f493e (patch)
treef614e764704aec26df15df68c633178064c60a41 /src/types.h
parent[KERNEL] Make rtt threshold relative (diff)
downloaddnbd3-de01183aa40dbbd274e18f681d8a255a886f493e.tar.gz
dnbd3-de01183aa40dbbd274e18f681d8a255a886f493e.tar.xz
dnbd3-de01183aa40dbbd274e18f681d8a255a886f493e.zip
[KERNEL] Refactor and extend sysfs (add data the server will need in proxy mode)
[SERVER] Use MSG_MORE instead of cork/uncork to save two syscalls [KERNEL] Fail-Counter for alt servers, ignore servers that fail too often [KERNEL] Add new alt servers to list, instead of replacing the old list [*] Add CMD_LATEST_RID to tell client about new revisions
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/types.h b/src/types.h
index 0227433..4f44f32 100644
--- a/src/types.h
+++ b/src/types.h
@@ -76,6 +76,7 @@ typedef struct
#define CMD_GET_SERVERS 3
#define CMD_ERROR 4
#define CMD_KEEPALIVE 5
+#define CMD_LATEST_RID 6
#pragma pack(1)
typedef struct
@@ -101,10 +102,10 @@ typedef struct
#pragma pack(1)
typedef struct
{
- uint8_t ipaddr[16]; // 16byte (network representation, so it can be directly passed to socket functions)
- uint16_t port; // 2byte (network representation, so it can be directly passed to socket functions)
- uint8_t addrtype; // 1byte (ip version. AF_INET or AF_INET6. 0 means this struct is empty and should be ignored)
- uint8_t failures; // 1byte (number of times server has been consecutively unreachable)
+ uint8_t hostaddr[16]; // 16byte (network representation, so it can be directly passed to socket functions)
+ uint16_t port; // 2byte (network representation, so it can be directly passed to socket functions)
+ uint8_t hostaddrtype; // 1byte (ip version. AF_INET or AF_INET6. 0 means this struct is empty and should be ignored)
+ uint8_t failures; // 1byte (number of times server has been consecutively unreachable)
} dnbd3_server_entry_t;
#pragma pack(0)