diff options
Diffstat (limited to 'src/cluster.h')
-rw-r--r-- | src/cluster.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/cluster.h b/src/cluster.h index b05a30ded..ef5caf0d6 100644 --- a/src/cluster.h +++ b/src/cluster.h @@ -163,10 +163,11 @@ typedef struct { char nodename[REDIS_CLUSTER_NAMELEN]; uint32_t ping_sent; uint32_t pong_received; - char ip[REDIS_IP_STR_LEN]; /* IP address last time it was seen */ - uint16_t port; /* port last time it was seen */ - uint16_t flags; - uint32_t notused; /* for 64 bit alignment */ + char ip[REDIS_IP_STR_LEN]; /* IP address last time it was seen */ + uint16_t port; /* port last time it was seen */ + uint16_t flags; /* node->flags copy */ + uint16_t notused1; /* Some room for future improvements. */ + uint32_t notused2; } clusterMsgDataGossip; typedef struct { @@ -176,7 +177,10 @@ typedef struct { typedef struct { uint32_t channel_len; uint32_t message_len; - unsigned char bulk_data[8]; /* defined as 8 just for alignment concerns. */ + /* We can't reclare bulk_data as bulk_data[] since this structure is + * nested. The 8 bytes are removed from the count during the message + * length computation. */ + unsigned char bulk_data[8]; } clusterMsgDataPublish; typedef struct { @@ -208,6 +212,7 @@ union clusterMsgData { } update; }; +#define CLUSTER_PROTO_VER 0 /* Cluster bus protocol version. */ typedef struct { char sig[4]; /* Siganture "RCmb" (Redis Cluster message bus). */ |