Home | History | Annotate | Download | only in dhcpcd

Lines Matching refs:state

84 	if ((iface->state->offer != NULL &&
85 iface->state->offer->cookie != htonl(MAGIC_COOKIE)) ||
86 (iface->state->new != NULL &&
87 iface->state->new->cookie != htonl(MAGIC_COOKIE)))
94 if (!iface->state->lease.frominfo)
98 if (iface->state->lease.frominfo)
114 struct if_state *state = iface->state;
115 struct if_options *opts = state->options;
119 state->fail.s_addr = 0;
154 if (state->arping_index &&
155 state->arping_index <= opts->arping_len &&
156 (reply_s == opts->arping[state->arping_index - 1] ||
158 reply_t == opts->arping[state->arping_index - 1])))
176 if (state->offer &&
177 (reply_s == state->offer->yiaddr ||
178 (reply_s == 0 && reply_t == state->offer->yiaddr)))
179 state->fail.s_addr = state->offer->yiaddr;
185 state->fail.s_addr = iface->addr.s_addr;
187 if (state->fail.s_addr) {
192 inet_ntoa(state->fail));
204 struct if_state *state = iface->state;
207 if (state->new == NULL)
213 if (++state->claims < ANNOUNCE_NUM)
217 iface->name, state->claims, ANNOUNCE_NUM, ANNOUNCE_WAIT);
221 iface->name, state->claims, ANNOUNCE_NUM);
223 state->new->yiaddr, state->new->yiaddr) == -1)
225 if (state->claims < ANNOUNCE_NUM) {
229 if (state->new->cookie != htonl(MAGIC_COOKIE)) {
232 if (state->interval != 0)
233 state->interval = 64;
234 state->probes = 0;
235 state->claims = 0;
236 tv.tv_sec = state->interval - DHCP_RAND_MIN;
251 struct if_state *state = iface->state;
256 if (state->arping_index < state->options->arping_len) {
257 addr.s_addr = state->options->arping[state->arping_index];
259 } else if (state->offer) {
260 if (state->offer->yiaddr)
261 addr.s_addr = state->offer->yiaddr;
263 addr.s_addr = state->offer->ciaddr;
271 if (state->probes == 0) {
279 if (++state->probes < PROBE_NUM) {
288 state->probes = 0;
289 if (++state->arping_index < state->options->arping_len)
298 iface->name, state->probes ? state->probes : PROBE_NUM, PROBE_NUM,
307 iface->state->probes = 0;
308 iface->state->arping_index = 0;