Lines Matching full: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;
211 if (++state->claims < ANNOUNCE_NUM)
215 iface->name, state->claims, ANNOUNCE_NUM, ANNOUNCE_WAIT);
219 iface->name, state->claims, ANNOUNCE_NUM);
221 state->new->yiaddr, state->new->yiaddr) == -1)
223 if (state->claims < ANNOUNCE_NUM) {
227 if (state->new->cookie != htonl(MAGIC_COOKIE)) {
230 if (state->interval != 0)
231 state->interval = 64;
232 state->probes = 0;
233 state->claims = 0;
234 tv.tv_sec = state->interval - DHCP_RAND_MIN;
249 struct if_state *state = iface->state;
254 if (state->arping_index < state->options->arping_len) {
255 addr.s_addr = state->options->arping[state->arping_index];
257 } else if (state->offer) {
258 if (state->offer->yiaddr)
259 addr.s_addr = state->offer->yiaddr;
261 addr.s_addr = state->offer->ciaddr;
269 if (state->probes == 0) {
277 if (++state->probes < PROBE_NUM) {
286 state->probes = 0;
287 if (++state->arping_index < state->options->arping_len)
296 iface->name, state->probes ? state->probes : PROBE_NUM, PROBE_NUM,
305 iface->state->probes = 0;
306 iface->state->arping_index = 0;