From de01183aa40dbbd274e18f681d8a255a886f493e Mon Sep 17 00:00:00 2001 From: sr Date: Mon, 27 Aug 2012 21:02:49 +0200 Subject: [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 --- src/types.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/types.h') 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) -- cgit v1.2.3-55-g7522