Lines Matching refs:ia
236 struct iface_af *ia; in if_start() local
242 ia = iface_af_get(iface, af); in if_start()
245 ia->uptime = now.tv_sec; in if_start()
260 send_hello(HELLO_LINK, ia, NULL); in if_start()
262 evtimer_set(&ia->hello_timer, if_hello_timer, ia); in if_start()
263 if_start_hello_timer(ia); in if_start()
270 struct iface_af *ia; in if_reset() local
276 ia = iface_af_get(iface, af); in if_reset()
277 if_stop_hello_timer(ia); in if_reset()
279 while ((adj = LIST_FIRST(&ia->adj_list)) != NULL) in if_reset()
300 if_update_af(struct iface_af *ia, int link_ok) in if_update_af() argument
305 switch (ia->af) { in if_update_af()
311 LIST_FOREACH(if_addr, &ia->iface->addr_list, entry) { in if_update_af()
320 if (IN6_IS_ADDR_LINKLOCAL(&ia->iface->linklocal)) in if_update_af()
327 if ((ldp_af_global_get(&global, ia->af))->ldp_disc_socket != -1) in if_update_af()
337 if (ia->state == IF_STA_DOWN) { in if_update_af()
338 if (!ia->enabled || !link_ok || !addr_ok || !socket_ok || in if_update_af()
342 ia->state = IF_STA_ACTIVE; in if_update_af()
343 if_start(ia->iface, ia->af); in if_update_af()
344 } else if (ia->state == IF_STA_ACTIVE) { in if_update_af()
345 if (ia->enabled && link_ok && addr_ok && socket_ok && rtr_id_ok) in if_update_af()
348 ia->state = IF_STA_DOWN; in if_update_af()
349 if_reset(ia->iface, ia->af); in if_update_af()
380 struct iface_af *ia = arg; in if_hello_timer() local
382 send_hello(HELLO_LINK, ia, NULL); in if_hello_timer()
383 if_start_hello_timer(ia); in if_hello_timer()
387 if_start_hello_timer(struct iface_af *ia) in if_start_hello_timer() argument
392 tv.tv_sec = ia->hello_interval; in if_start_hello_timer()
393 if (evtimer_add(&ia->hello_timer, &tv) == -1) in if_start_hello_timer()
398 if_stop_hello_timer(struct iface_af *ia) in if_stop_hello_timer() argument
400 if (evtimer_pending(&ia->hello_timer, NULL) && in if_stop_hello_timer()
401 evtimer_del(&ia->hello_timer) == -1) in if_stop_hello_timer()
406 if_to_ctl(struct iface_af *ia) in if_to_ctl() argument
412 ictl.af = ia->af; in if_to_ctl()
413 memcpy(ictl.name, ia->iface->name, sizeof(ictl.name)); in if_to_ctl()
414 ictl.ifindex = ia->iface->ifindex; in if_to_ctl()
415 ictl.state = ia->state; in if_to_ctl()
416 ictl.flags = ia->iface->flags; in if_to_ctl()
417 ictl.linkstate = ia->iface->linkstate; in if_to_ctl()
418 ictl.type = ia->iface->type; in if_to_ctl()
419 ictl.if_type = ia->iface->if_type; in if_to_ctl()
420 ictl.hello_holdtime = ia->hello_holdtime; in if_to_ctl()
421 ictl.hello_interval = ia->hello_interval; in if_to_ctl()
424 if (ia->state != IF_STA_DOWN && in if_to_ctl()
425 ia->uptime != 0) { in if_to_ctl()
426 ictl.uptime = now.tv_sec - ia->uptime; in if_to_ctl()
431 LIST_FOREACH(adj, &ia->adj_list, ia_entry) in if_to_ctl()