ZebraQugga OSPF IMPLEMENTION 1

xiaoxiao2021-03-05  52

1. start an ospf processa data structureospf_master {} | --ospf - ospf {} b main routinesrouter_ospf |.. --Ospf_get | --ospf_new | --ospf_lsa_maxage_walker | --ospf_lsa_refresh_walker | --ospf_sock_init | --ospf_read c. Notes -There Is Only One Router Ospf Process, But Cisco Can Have Many Ospf Process.

2. Set a network areaa. Data structureospf {} <- | <- | | --NETWORKS - OSPF_NETWORK {} | | | - ar osPF_AREA {} --- | | | --Oiflist-- ospf_interface {} --- | | --nbrs - ospf_neighbor {} |. --nbr_self - ospf_neighbor {} b main routines ospf_network_area | --ospf_network_set | --ospf_if_new | --ospf_nbr_add_self | --ospf_network_run | --ospf_if_up | --SPF_ISM_EVENT_SCHEDULE (ISM_INTERFACEUP) | --SPF_ISM_EVENT (ISM_DOWN -> ISM_WAITI)

ospf_if_new: construct an ospf_interface and a pseudo self ospf_neighbor (its state is always NSM_TwoWay) ospf_nbr_add_self: add self ospf_neighbor to ospf_interface {} - nbrs ospf_ism_event (ISM_Down -> ISM_Waiting) | --ism_interface_up | --ism_change_state | --ospf_check_abr_status | --ospf_router_lsa_timer_add | --ism_timer_set (ISM_Waiting) | --OSPF_ISM_TIMER_ON (ospf_hello_timer) | --OSPF_ISM_TIMER_ON (ospf_wait_timer) ospf_wait_timer | --OSPF_ISM_EVENT_SCHEDULE (ISM_WaitTimer) | --ospf_ism_event (ISM_Waiting -> ISM_DR) | --ism_wait_timer | - ospf_dr_election | --ism_change_state | --ospf_network_lsa_timer_add | --ism_timer_set (ISM_DR) | --OSPF_ISM_TIMER_ON (ospf_hello_timer) | --OSPF_ISM_TIMER_ON (ospf_ls_ack_timer); 3. interact with a neighborsituation: after the router become DR, start the other router

a. Data Structure

b. main routines

转载请注明原文地址:https://www.9cbs.com/read-36688.html

New Post(0)