Lines Matching defs:peer
900 dhcp_failover_state_t *peer;
913 parse_warn (cfile, "expecting \"peer\"");
922 log_fatal ("no memory for peer name %s", val);
925 parse_warn (cfile, "expecting failover peer name.");
930 /* See if there's a peer declaration by this name. */
931 peer = (dhcp_failover_state_t *)0;
932 find_failover_peer (&peer, name, MDL);
937 parse_warn (cfile, "failover peer reference not %s",
940 if (!peer) {
942 " failover peer ", name);
948 peer, MDL);
950 dhcp_failover_state_dereference (&peer, MDL);
954 if (!peer) {
956 " failover peer ", name);
960 parse_failover_state_declaration (cfile, peer);
961 dhcp_failover_state_dereference (&peer, MDL);
970 if (peer) {
971 parse_warn (cfile, "redeclaration of failover peer %s", name);
973 dhcp_failover_state_dereference (&peer, MDL);
978 status = dhcp_failover_state_allocate (&peer, MDL);
980 log_fatal ("Can't allocate failover peer %s: %s",
984 peer -> name = name;
987 cp = &peer -> me;
988 peer:
995 peer -> i_am = primary;
999 peer -> i_am = secondary;
1000 if (peer -> hba)
1007 cp = &peer -> partner;
1008 goto peer;
1014 dhcp_failover_state_dereference (&peer, MDL);
1033 tp = &peer->max_lease_misbalance;
1037 tp = &peer->max_lease_ownership;
1041 tp = &peer->max_balance;
1045 tp = &peer->min_balance;
1049 tp = &peer->auto_partner_down;
1059 dhcp_failover_state_dereference (&peer, MDL);
1070 tp = &peer -> mclt;
1075 if (peer -> i_am == secondary)
1082 dhcp_failover_state_dereference (&peer, MDL);
1091 peer -> hba = dmalloc (32, MDL);
1092 if (!peer -> hba) {
1093 dfree (peer -> name, MDL);
1094 dfree (peer, MDL);
1096 memcpy (peer -> hba, hba, 32);
1101 if (peer -> i_am == secondary)
1108 dhcp_failover_state_dereference (&peer, MDL);
1148 peer -> load_balance_max_secs = atoi (val);
1153 "invalid statement in peer declaration");
1155 dhcp_failover_state_dereference (&peer, MDL);
1160 dhcp_failover_state_dereference (&peer, MDL);
1168 if (!peer -> partner.address)
1169 parse_warn (cfile, "peer address may not be omitted");
1171 if (!peer->me.port)
1172 peer->me.port = DEFAULT_FAILOVER_PORT;
1173 if (!peer->partner.port)
1174 peer->partner.port = DEFAULT_FAILOVER_PORT;
1176 if (peer -> i_am == primary) {
1177 if (!peer -> hba) {
1180 } else if (!peer -> mclt) {
1186 if (!peer->max_lease_misbalance)
1187 peer->max_lease_misbalance = DEFAULT_MAX_LEASE_MISBALANCE;
1188 if (!peer->max_lease_ownership)
1189 peer->max_lease_ownership = DEFAULT_MAX_LEASE_OWNERSHIP;
1190 if (!peer->max_balance)
1191 peer->max_balance = DEFAULT_MAX_BALANCE_TIME;
1192 if (!peer->min_balance)
1193 peer->min_balance = DEFAULT_MIN_BALANCE_TIME;
1194 if (!peer->me.max_flying_updates)
1195 peer->me.max_flying_updates = DEFAULT_MAX_FLYING_UPDATES;
1196 if (!peer->me.max_response_delay)
1197 peer->me.max_response_delay = DEFAULT_MAX_RESPONSE_DELAY;
1200 group->shared_network->failover_peer = peer;
1203 peer->me.state = recover;
1204 peer->me.stos = cur_time;
1205 peer->partner.state = unknown_state;
1206 peer->partner.stos = cur_time;
1208 status = enter_failover_peer (peer);
1210 parse_warn (cfile, "failover peer %s: %s",
1211 peer -> name, isc_result_totext (status));
1212 dhcp_failover_state_dereference (&peer, MDL);
1216 dhcp_failover_state_t *peer)
1224 if (!peer) {
1227 parse_warn (cfile, "expecting \"peer\"");
1236 log_fatal ("failover peer name %s: no memory",
1240 parse_warn (cfile, "expecting failover peer name.");
1245 /* See if there's a peer declaration by this name. */
1249 parse_warn (cfile, "unknown failover peer: %s", name);
1263 dhcp_failover_state_reference (&state, peer, MDL);
1764 /* Inherit the failover peer from the shared network. */
1785 "expecting \"failover peer\".");
1801 parse_warn(cfile, "expecting 'peer'.");
1818 "failover peer %s: %s", val,
3920 log_error ("peer in scope. If you wish to declare an");