• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/quagga/ospfd/

Lines Matching refs:ospf

405   flags = area->ospf->flags;
416 if (area->ospf->abr_type == OSPF_ABR_SHORTCUT)
419 area->ospf->backbone == NULL) ||
427 else if (IS_OSPF_ASBR (area->ospf))
431 if (IS_OSPF_ABR (area->ospf))
456 if (!IPV4_ADDR_SAME (&nbr->router_id, &oi->ospf->router_id))
663 if (!IPV4_ADDR_SAME (&nbr->router_id, &oi->ospf->router_id))
791 if (area->ospf->stub_router_startup_time == OSPF_STUB_ROUTER_UNCONFIGURED)
804 area->ospf->stub_router_startup_time);
811 struct ospf *ospf = area->ospf;
829 OSPF_ROUTER_LSA, ospf->router_id, ospf->router_id);
880 new = ospf_lsa_install (area->ospf, NULL, new);
883 area->ospf->lsa_originate_count++;
912 ospf_refresher_unregister_lsa (area->ospf, lsa);
923 ospf_lsa_install (area->ospf, NULL, new);
947 ospf_lsa_refresh (area->ospf, area->router_lsa_self);
956 ospf_router_lsa_update (struct ospf *ospf)
964 for (ALL_LIST_ELEMENTS (ospf->areas, node, nnode, area))
983 else if (!IPV4_ADDR_SAME (&lsa->data->id, &ospf->router_id))
988 ospf_refresher_unregister_lsa (ospf, lsa);
1000 if (rl->flags != ospf->flags)
1054 OSPF_NETWORK_LSA, DR (oi), oi->ospf->router_id);
1105 ospf_lsa_refresh (oi->ospf, oi->network_lsa_self);
1115 new = ospf_lsa_install (oi->ospf, oi, new);
1118 oi->ospf->lsa_originate_count++;
1144 oi = ospf_if_lookup_by_local_addr (area->ospf, NULL, lsa->data->id);
1160 ospf_refresher_unregister_lsa (area->ospf, lsa);
1171 new2 = ospf_lsa_install (area->ospf, oi, new);
1246 id, area->ospf->router_id);
1276 id = ospf_lsa_unique_id (area->ospf, area->lsdb, OSPF_SUMMARY_LSA, p);
1292 new = ospf_lsa_install (area->ospf, NULL, new);
1295 area->ospf->lsa_originate_count++;
1311 ospf_summary_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa)
1330 ospf_lsa_install (ospf, NULL, new);
1388 id, area->ospf->router_id);
1418 id = ospf_lsa_unique_id (area->ospf, area->lsdb, OSPF_ASBR_SUMMARY_LSA, p);
1435 new = ospf_lsa_install (area->ospf, NULL, new);
1438 area->ospf->lsa_originate_count++;
1454 ospf_summary_asbr_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa)
1472 ospf_lsa_install (ospf, NULL, new);
1492 ospf_external_lsa_nexthop_get (struct ospf *ospf, struct in_addr nexthop)
1512 for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
1550 for (ALL_LIST_ELEMENTS_RO (area->ospf->oiflist, node, oi))
1578 metric_type (struct ospf *ospf, u_char src)
1580 return (ospf->dmetric[src].type < 0 ?
1581 DEFAULT_METRIC_TYPE : ospf->dmetric[src].type);
1585 metric_value (struct ospf *ospf, u_char src)
1587 if (ospf->dmetric[src].value < 0)
1591 if (ospf->default_originate == DEFAULT_ORIGINATE_ZEBRA)
1596 else if (ospf->default_metric < 0)
1599 return ospf->default_metric;
1602 return ospf->dmetric[src].value;
1608 struct ospf *ospf)
1624 ROUTEMAP_METRIC_TYPE (ei) : metric_type (ospf, type);
1627 ROUTEMAP_METRIC (ei) : metric_value (ospf, type);
1636 fwd_addr = ospf_external_lsa_nexthop_get (ospf, ei->nexthop);
1647 ospf_external_lsa_new (struct ospf *ospf,
1672 id = ospf_lsa_unique_id (ospf, ospf->lsdb, OSPF_AS_EXTERNAL_LSA, &ei->p);
1688 id, ospf->router_id);
1691 ospf_external_lsa_body_set (s, ei, ospf);
1712 ospf_install_flood_nssa (struct ospf *ospf,
1742 for (ALL_LIST_ELEMENTS (ospf->areas, node, nnode, area))
1754 if (! IS_OSPF_ABR (ospf))
1760 draft-ietf-ospf-nssa-update-09.txt
1789 ospf_lsa_install (ospf, NULL, new); /* Remove Old, Lock New = 2 */
1792 ospf_flood_through_as (ospf, NULL, new); /* all attached NSSA's, no AS/STUBs */
1797 ospf_lsa_translated_nssa_new (struct ospf *ospf,
1817 if ( (new = ospf_external_lsa_new (ospf, &ei, &type7->data->id)) == NULL)
1843 ospf_translated_nssa_originate (struct ospf *ospf, struct ospf_lsa *type7)
1852 if ( (new = ospf_lsa_translated_nssa_new (ospf, type7)) == NULL)
1872 if ( (new = ospf_lsa_install (ospf, NULL, new)) == NULL)
1881 ospf->lsa_originate_count++;
1882 ospf_flood_through_as (ospf, NULL, new);
1889 ospf_translated_nssa_refresh (struct ospf *ospf, struct ospf_lsa *type7,
1902 assert (ospf->anyNSSA);
1916 type5 = ospf_external_info_find_lsa (ospf, &p);
1928 for (ALL_LIST_ELEMENTS (ospf->areas, ln, lnn, area))
1966 ospf_ls_retransmit_delete_nbr_as (ospf, type5);
1969 if ( (new = ospf_lsa_translated_nssa_new (ospf, type7)) == NULL)
1978 if ( !(new = ospf_lsa_install (ospf, NULL, new)) )
1988 ospf_flood_through_as (ospf, NULL, new);
2007 ospf_external_lsa_originate (struct ospf *ospf, struct external_info *ei)
2047 if (!ospf_redistribute_check (ospf, ei, NULL))
2051 if ((new = ospf_external_lsa_new (ospf, ei, NULL)) == NULL)
2060 ospf_lsa_install (ospf, NULL, new);
2063 ospf->lsa_originate_count++;
2066 ospf_flood_through_as (ospf, NULL, new);
2069 if (ospf->anyNSSA &&
2072 ospf_install_flood_nssa (ospf, new, ei); /* Install/Flood Type-7 to all NSSAs */
2089 struct ospf *ospf = THREAD_ARG (thread);
2095 ospf->t_external_lsa = NULL;
2102 if (!ospf_external_lsa_originate (ospf, ei))
2109 ospf_default_external_info (struct ospf *ospf)
2128 if (ospf_redistribute_check (ospf, rn->info, NULL))
2142 struct ospf *ospf;
2144 ospf = THREAD_ARG (thread);
2150 if (ospf->default_originate == DEFAULT_ORIGINATE_ALWAYS)
2158 if ((ei = ospf_default_external_info (ospf)))
2159 ospf_external_lsa_originate (ospf, ei);
2166 ospf_nssa_lsa_flush (struct ospf *ospf, struct prefix_ipv4 *p)
2172 for (ALL_LIST_ELEMENTS (ospf->areas, node, nnode, area))
2177 ospf->router_id)))
2187 ospf_refresher_unregister_lsa (ospf, lsa);
2196 ospf_external_lsa_flush (struct ospf *ospf,
2207 if (!(lsa = ospf_external_info_find_lsa (ospf, p)))
2218 if (IS_LSA_SELF(lsa) && (ospf->anyNSSA)
2220 ospf_nssa_lsa_flush (ospf, p);
2223 ospf_ls_retransmit_delete_nbr_as (ospf, lsa);
2234 ospf_refresher_unregister_lsa (ospf, lsa);
2237 ospf_lsa_flush_as (ospf, lsa);
2245 ospf_external_lsa_refresh_default (struct ospf *ospf)
2255 ei = ospf_default_external_info (ospf);
2256 lsa = ospf_external_info_find_lsa (ospf, &p);
2264 ospf_external_lsa_refresh (ospf, lsa, ei, LSA_REFRESH_FORCE);
2270 ospf_external_lsa_originate (ospf, ei);
2279 ospf_refresher_unregister_lsa (ospf, lsa);
2280 ospf_lsa_flush_as (ospf, lsa);
2286 ospf_external_lsa_refresh_type (struct ospf *ospf, u_char type, int force)
2300 if ((lsa = ospf_external_info_find_lsa (ospf, &ei->p)))
2301 ospf_external_lsa_refresh (ospf, lsa, ei, force);
2303 ospf_external_lsa_originate (ospf, ei);
2309 ospf_external_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa,
2316 if (!ospf_redistribute_check (ospf, ei, &changed))
2322 ospf_external_lsa_flush (ospf, ei->type, &ei->p,
2336 ospf_ls_retransmit_delete_nbr_as (ospf, lsa);
2339 ospf_refresher_unregister_lsa (ospf, lsa);
2341 new = ospf_external_lsa_new (ospf, ei, &lsa->data->id);
2353 ospf_lsa_install (ospf, NULL, new); /* As type-5. */
2356 ospf_flood_through_as (ospf, NULL, new);
2359 if (ospf->anyNSSA && !(CHECK_FLAG (new->flags, OSPF_LSA_LOCAL_XLT)))
2360 ospf_install_flood_nssa (ospf, new, ei); /* Install/Flood per new rules */
2367 ospf_refresher_register_lsa (ospf, new);
2385 ospf_router_lsa_install (struct ospf *ospf, struct ospf_lsa *new,
2409 ospf_refresher_register_lsa (ospf, new);
2412 ospf_spf_calculate_schedule (ospf, SPF_FLAG_ROUTER_LSA_INSTALL);
2422 ospf_network_lsa_install (struct ospf *ospf,
2443 ospf_refresher_register_lsa (ospf, new);
2446 ospf_spf_calculate_schedule (ospf, SPF_FLAG_NETWORK_LSA_INSTALL);
2453 ospf_summary_lsa_install (struct ospf *ospf, struct ospf_lsa *new,
2469 ospf_spf_calculate_schedule (ospf, SPF_FLAG_SUMMARY_LSA_INSTALL);
2475 ospf_refresher_register_lsa (ospf, new);
2482 ospf_summary_asbr_lsa_install (struct ospf *ospf, struct ospf_lsa *new,
2500 ospf_spf_calculate_schedule (ospf, SPF_FLAG_ASBR_SUMMARY_LSA_INSTALL);
2506 ospf_refresher_register_lsa (ospf, new);
2513 ospf_external_lsa_install (struct ospf *ospf, struct ospf_lsa *new,
2516 ospf_ase_register_external_lsa (new, ospf);
2526 ospf_ase_incremental_update (ospf, new);
2541 ospf_translated_nssa_refresh (ospf, new, NULL);
2549 ospf_refresher_register_lsa (ospf, new);
2555 ospf_discard_from_db (struct ospf *ospf,
2577 ospf_refresher_unregister_lsa (ospf, old);
2582 ospf_ase_unregister_external_lsa (old, ospf);
2583 ospf_ls_retransmit_delete_nbr_as (ospf, old);
2587 ospf_ls_retransmit_delete_nbr_as (ospf, old);
2592 ospf_ase_unregister_external_lsa (old, ospf);
2599 ospf_lsa_maxage_delete (ospf, old);
2604 ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
2620 lsdb = ospf->lsdb;
2626 lsdb = ospf->lsdb;
2678 if (ospf_lsa_is_self_originated(ospf, lsa))
2708 ospf_discard_from_db (ospf, lsdb, lsa);
2722 new = ospf_router_lsa_install (ospf, lsa, rt_recalc);
2726 new = ospf_network_lsa_install (ospf, oi, lsa, rt_recalc);
2729 new = ospf_summary_lsa_install (ospf, lsa, rt_recalc);
2732 new = ospf_summary_asbr_lsa_install (ospf, lsa, rt_recalc);
2735 new = ospf_external_lsa_install (ospf, lsa, rt_recalc);
2740 lsa->oi = oi; /* Specify outgoing ospf-interface for this LSA. */
2752 new = ospf_external_lsa_install (ospf, lsa, rt_recalc);
2796 ospf_lsa_maxage (ospf, lsa);
2804 ospf_check_nbr_status (struct ospf *ospf)
2809 for (ALL_LIST_ELEMENTS (ospf->oiflist, node, nnode, oi))
2832 struct ospf *ospf = THREAD_ARG (thread);
2837 ospf->t_maxage = NULL;
2842 reschedule = !ospf_check_nbr_status (ospf);
2845 for (rn = route_top(ospf->maxage_lsa); rn; rn = route_next(rn))
2864 OSPF_TIMER_ON (ospf->t_maxage, ospf_maxage_lsa_remover, 0);
2883 ospf_lsa_refresh (ospf, lsa);
2889 ospf_discard_from_db (ospf, lsa->lsdb, lsa);
2902 OSPF_TIMER_ON (ospf->t_maxage, ospf_maxage_lsa_remover,
2903 ospf->maxage_delay);
2909 ospf_lsa_maxage_delete (struct ospf *ospf, struct ospf_lsa *lsa)
2918 if ((rn = route_node_lookup(ospf->maxage_lsa,
2938 ospf_lsa_maxage (struct ospf *ospf, struct ospf_lsa *lsa)
2957 if ((rn = route_node_get (ospf->maxage_lsa,
2982 OSPF_TIMER_ON (ospf->t_maxage, ospf_maxage_lsa_remover,
2983 ospf->maxage_delay);
2987 ospf_lsa_maxage_walker_remover (struct ospf *ospf, struct ospf_lsa *lsa)
2996 if (!ospf_lsa_is_self_originated (ospf, lsa))
3019 ospf_ase_incremental_update (ospf, lsa);
3022 ospf_spf_calculate_schedule (ospf, SPF_FLAG_MAXAGE);
3025 ospf_lsa_maxage (ospf, lsa);
3028 if (IS_LSA_MAXAGE (lsa) && !ospf_lsa_is_self_originated (ospf, lsa))
3039 struct ospf *ospf = THREAD_ARG (thread);
3045 ospf->t_maxage_walker = NULL;
3047 for (ALL_LIST_ELEMENTS (ospf->areas, node, nnode, area))
3050 ospf_lsa_maxage_walker_remover (ospf, lsa);
3052 ospf_lsa_maxage_walker_remover (ospf, lsa);
3054 ospf_lsa_maxage_walker_remover (ospf, lsa);
3056 ospf_lsa_maxage_walker_remover (ospf, lsa);
3059 ospf_lsa_maxage_walker_remover (ospf, lsa);
3061 ospf_lsa_maxage_walker_remover (ospf, lsa);
3064 ospf_lsa_maxage_walker_remover (ospf, lsa);
3068 if (ospf->lsdb)
3070 LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
3071 ospf_lsa_maxage_walker_remover (ospf, lsa);
3073 LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa)
3074 ospf_lsa_maxage_walker_remover (ospf, lsa);
3078 OSPF_TIMER_ON (ospf->t_maxage_walker, ospf_lsa_maxage_walker,
3118 struct ospf *ospf = ospf_lookup();
3119 assert(ospf);
3137 return ospf_lsdb_lookup_by_id (ospf->lsdb, type, id, adv_router);
3336 ospf_lsa_flush_schedule (struct ospf *ospf, struct ospf_lsa *lsa)
3358 ospf_refresher_unregister_lsa (ospf, lsa);
3359 ospf_lsa_flush (ospf, lsa);
3367 ospf_flush_self_originated_lsas_now (struct ospf *ospf)
3377 for (ALL_LIST_ELEMENTS (ospf->areas, node, nnode, area))
3385 ospf_refresher_unregister_lsa (ospf, lsa);
3401 ospf_refresher_unregister_lsa (ospf, oi->network_lsa_self);
3413 ospf_lsa_flush_schedule (ospf, lsa);
3415 ospf_lsa_flush_schedule (ospf, lsa);
3418 ospf_lsa_flush_schedule (ospf, lsa);
3420 ospf_lsa_flush_schedule (ospf, lsa);
3426 LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
3427 ospf_lsa_flush_schedule (ospf, lsa);
3429 LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa)
3430 ospf_lsa_flush_schedule (ospf, lsa);
3438 if (ospf->t_maxage != NULL)
3440 OSPF_TIMER_OFF (ospf->t_maxage);
3441 thread_execute (master, ospf_maxage_lsa_remover, ospf, 0);
3451 ospf_lsa_is_self_originated (struct ospf *ospf, struct ospf_lsa *lsa)
3464 if (IPV4_ADDR_SAME (&lsa->data->adv_router, &ospf->router_id))
3469 IPV4_ADDR_SAME (&lsa->data->id, &ospf->router_id))
3474 for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
3492 ospf_lsa_unique_id (struct ospf *ospf,
3501 lsa = ospf_lsdb_lookup_by_id (lsdb, type, id, ospf->router_id);
3521 lsa = ospf_lsdb_lookup_by_id (ospf->lsdb, type,
3522 id, ospf->router_id);
3605 ospf_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa)
3623 new = ospf_summary_lsa_refresh (ospf, lsa);
3626 new = ospf_summary_asbr_lsa_refresh (ospf, lsa);
3636 new = ospf_external_lsa_refresh (ospf, lsa, ei, LSA_REFRESH_FORCE);
3638 ospf_lsa_flush_as (ospf, lsa);
3654 ospf_refresher_register_lsa (struct ospf *ospf, struct ospf_lsa *lsa)
3677 current_index = ospf->lsa_refresh_queue.index + (quagga_time (NULL)
3678 - ospf->lsa_refresher_started)/OSPF_LSA_REFRESHER_GRANULARITY;
3686 if (!ospf->lsa_refresh_queue.qs[index])
3687 ospf->lsa_refresh_queue.qs[index] = list_new ();
3688 listnode_add (ospf->lsa_refresh_queue.qs[index],
3699 ospf_refresher_unregister_lsa (struct ospf *ospf, struct ospf_lsa *lsa)
3705 struct list *refresh_list = ospf->lsa_refresh_queue.qs[lsa->refresh_list];
3710 ospf->lsa_refresh_queue.qs[lsa->refresh_list] = NULL;
3722 struct ospf *ospf = THREAD_ARG (t);
3731 i = ospf->lsa_refresh_queue.index;
3736 ospf->lsa_refresh_queue.index =
3737 ((unsigned long)(ospf->lsa_refresh_queue.index +
3738 (quagga_time (NULL) - ospf->lsa_refresher_started)
3744 ospf->lsa_refresh_queue.index);
3746 for (;i != ospf->lsa_refresh_queue.index;
3753 refresh_list = ospf->lsa_refresh_queue.qs [i];
3757 ospf->lsa_refresh_queue.qs [i] = NULL;
3777 ospf->t_lsa_refresher = thread_add_timer (master, ospf_lsa_refresh_walker,
3778 ospf, ospf->lsa_refresh_interval);
3779 ospf->lsa_refresher_started = quagga_time (NULL);
3783 ospf_lsa_refresh (ospf, lsa);