diff options
author | Ted Lemon <source@isc.org> | 2000-05-01 23:40:15 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2000-05-01 23:40:15 +0000 |
commit | f3886ff38c9bdc04248ebc4ac070523a659dc4dd (patch) | |
tree | 0f948e6b768d2196082cd7046f200b656249e88f /includes/failover.h | |
parent | aa8579c0f56fe01d55af58768bfef59a082e4db8 (diff) | |
download | isc-dhcp-f3886ff38c9bdc04248ebc4ac070523a659dc4dd.tar.gz |
Add some missing data structures to the failover_state structure.
Diffstat (limited to 'includes/failover.h')
-rw-r--r-- | includes/failover.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/includes/failover.h b/includes/failover.h index 799de138..e2de3297 100644 --- a/includes/failover.h +++ b/includes/failover.h @@ -201,6 +201,7 @@ enum failover_state { partner_down, normal, communications_interrupted, + potential_conflict_nic, potential_conflict, recover }; @@ -211,18 +212,23 @@ typedef struct _dhcp_failover_state { struct _dhcp_failover_state *next; char *name; /* Name of this failover instance. */ struct option_cache *address; /* Partner's IP address or hostname. */ - int listen_port; int port; /* Partner's TCP port. */ - struct iaddr server_addr; + struct option_cache *server_addr; /* IP address on which to listen. */ + int listen_port; /* Port on which to listen. */ u_int32_t max_flying_updates; u_int32_t mclt; - u_int8_t *hba; + + u_int8_t *hba; /* Hash bucket array for load balancing. */ + int load_balance_max_secs; enum failover_state partner_state; TIME partner_stos; enum failover_state my_state; TIME my_stos; + omapi_object_t *link_to_peer; /* Currently-established link + to peer. */ + enum { primary, secondary } i_am; /* We are primary or secondary in this relationship. */ @@ -238,16 +244,13 @@ typedef struct _dhcp_failover_state { last packet we received is older than this, communications have been interrupted. */ - /* The ack queue and update queue are circular lists, so you can - tell whether or not a lease is on one of the lists by looking - at its next pointer. Or maybe we should just flag it as - UPDATE_PENDING or ACK_PENDING. But anyway, two seperate - queues. Hm. Maybe these should be hash tables, with no pointer - from the peer to the lease. */ - struct lease *update_queue; /* List of leases we haven't sent - to peer. */ - struct lease *ack_queue; /* List of lease updates the peer + struct lease *update_queue_head; /* List of leases we haven't sent + to peer. */ + struct lease *update_queue_tail; + + struct lease *ack_queue_head; /* List of lease updates the peer hasn't yet acked. */ + struct lease *ack_queue_tail; int cur_unacked_updates; /* Number of updates we've sent that have not yet been acked. */ } dhcp_failover_state_t; |