📄 ospf_structures.h
字号:
OSPF_LS_HEADER ls_header;} OSPF_LS_HEADER_QUEUE;typedef struct OSPF_INTERFACE{ struct OSPF_INTERFACE *sptr_forward_link; struct OSPF_INTERFACE *sptr_backward_link; struct ifnet *vx_ospf_interface; USHORT ifnet_index; /* if_index from struct ifnet */ USHORT ifnet_flags; M_BLK_ID pSpfInmMblk; /* for OSPF_ADDR_ALLSPF */ M_BLK_ID pDrInmMblk; /* for OSPF_ADDR_ALLDR */ ULONG interface_index; ULONG area_id; BYTE_ENUM (BOOLEAN) port_enabled; enum OSPF_INTERFACE_TYPE type; enum OSPF_INTERFACE_STATE state; ULONG events; /* Number of state changes */ ULONG address; ULONG netmask; ULONG mtu; struct OSPF_AREA_ENTRY *sptr_area; /* The area this interface is in */ struct OSPF_AREA_ENTRY *sptr_transit_area; ULONG source_area_id_for_virtual_link; ULONG router_dead_interval; /* Number of seconds before the router's sptr_neighbors will declare it down */ ULONG transmit_delay; /* Estimated number of seconds it takes to transmit a link state update packet over this interface */ USHORT priority; /* If set to 0, this router is not eligible to become designated router on the attached network */ OSPF_NEIGHBOR *sptr_neighbor; OSPF_NEIGHBOR potential_neighbor; ULONG virtual_neighbor_rid; USHORT number_of_neighbors_in_init_state; USHORT number_of_neighbors_in_exchange_state; USHORT number_of_neighbors_in_full_state; OSPF_DESIGNATED_ROUTER_NODE designated_router; OSPF_DESIGNATED_ROUTER_NODE backup_designated_router; USHORT cost; /* One for each type of service */ ULONG hello_interval; /* Length of time, in seconds, between Hello packets sent on this interface */ ULONG poll_interval; /* the default poll interval is 4 * the hello interval */ ULONG periodic_hello_time_counter; BYTE_ENUM (BOOLEAN) hello_timer_enabled; /* SPR 85432 -- Begin */ ULONG last_hello_time; /* SPR 85432 -- End */ ULONG retransmit_interval; ULONG periodic_retransmit_time_counter; BYTE_ENUM (BOOLEAN) retransmit_timer_enabled; ULONG periodic_wait_time_counter; /* single shot timer */ BYTE_ENUM (BOOLEAN) wait_timer_enabled; ULONG periodic_delayed_acknowledgement_time_counter; /* single shot timer - sort of */ BYTE_ENUM (BOOLEAN) delayed_acknowledgement_timer_enabled; OSPF_AUTHENTICATION authentication; OSPF_AUTHENTICATION authentication2; /* Alternate authentication */ OSPF_AUTHENTICATION_KEY *sptr_authentication_key; UNION_OSPF_INTERFACE_FLAGS flags; OSPF_LS_HEADER_QUEUE *sptr_head_of_delayed_acknowledgement_list; ULONG number_of_acknowledgements_on_delayed_acknowledgement_list; ULONG lock_time; ULONG up_time; /* Time interface came up */ BYTE_ENUM (BOOLEAN) point_timer_enabled; ULONG port_number; /* Unnumbered link support jkw */ BYTE_ENUM (BOOLEAN) passive; ULONG unnumbered_dest_ip; /* unnumbered link dest ip */ ULONG unnumbered_router_id; /* unnumbered link router id */ ULONG nbma_ptmp_neighbor_address; /* __NBMA_PTMP__ */} OSPF_INTERFACE;typedef struct OSPF_INTERFACE_NODE{ struct OSPF_INTERFACE_NODE *sptr_forward_link; struct OSPF_INTERFACE_NODE *sptr_backward_link; OSPF_INTERFACE *sptr_interface;} OSPF_INTERFACE_NODE ;typedef struct OSPF_HOSTS{ struct OSPF_HOSTS *sptr_forward_link; struct OSPF_HOSTS *sptr_backward_link; ULONG interface_address; ULONG type_of_service; USHORT cost; BYTE_ENUM (BOOLEAN) status; ULONG area_id;} OSPF_HOSTS;typedef struct OSPF_SHORTEST_PATH_NODE{ struct OSPF_SHORTEST_PATH_NODE *sptr_forward_link; struct OSPF_SHORTEST_PATH_NODE *sptr_backward_link; ULONG vertex; BYTE_ENUM (OSPF_LS_TYPE) vertex_type; OSPF_LS_DATABASE_ENTRY *sptr_database_entry; ULONG cost; ULONG intervening_router; OSPF_NEXT_HOP_BLOCK *sptr_next_hop;} OSPF_SHORTEST_PATH_NODE;#if (_BYTE_ORDER == _LITTLE_ENDIAN )typedef _struct{ BIT_FIELD (enum, BOOLEAN) transit:1; /* This is a transit area */ BIT_FIELD (enum, BOOLEAN) virtual_up:1; /* One or more virtual links in this area are up */ BIT_FIELD (enum, BOOLEAN) stub:1; /* This is a area (no external routes) */ BIT_FIELD (enum, BOOLEAN) nssa:1; /* This is a not so stubby area */ BIT_FIELD (enum, BOOLEAN) stub_default:1; /* Inject default into this stub area */ BIT_FIELD (enum,BOOLEAN) not_used:3;} _pack OSPF_AREA_FLAGS;#else /* _BYTE_ORDER == _BIG_ENDIAN */typedef _struct OSPF_AREA_FLAGS{ BIT_FIELD (enum,BOOLEAN) not_used:3; BIT_FIELD (enum, BOOLEAN) stub_default:1; /* Inject default into this stub area */ BIT_FIELD (enum, BOOLEAN) nssa:1; /* This is a not so stubby area */ BIT_FIELD (enum, BOOLEAN) stub:1; /* This is a area (no external routes) */ BIT_FIELD (enum, BOOLEAN) virtual_up:1; /* One or more virtual links in this area are up */ BIT_FIELD (enum, BOOLEAN) transit:1; /* This is a transit area */} _pack OSPF_AREA_FLAGS;#endif /* _BYTE_ORDER == _LITTLE_ENDIAN */typedef _union UNION_OSPF_AREA_FLAGS{ OSPF_AREA_FLAGS _bit; BYTE _byte;} _pack UNION_OSPF_AREA_FLAGS;typedef struct OSPF_LS_DATABASE_HEAD { /* SPR#76812 */ AVL_NODE * sptr_avl_database_entry; OSPF_LS_DATABASE_ENTRY * sptr_linear_database_entry; BYTE_ENUM (BOOLEAN) rerun; /* rerun this row - partial update */ } OSPF_LS_DATABASE_HEAD;typedef struct OSPF_ADDRESS_RANGE_LIST_ENTRY /* list of networks associated with an area (section 6 of OSPF Version 2 specification, dated June 1995) */{ struct OSPF_ADDRESS_RANGE_LIST_ENTRY *sptr_forward_link; struct OSPF_ADDRESS_RANGE_LIST_ENTRY *sptr_backward_link; ULONG area_id; ULONG network; ULONG mask; BYTE_ENUM (BOOLEAN) advertise; BYTE_ENUM (BOOLEAN) active; ULONG cost; struct OSPF_ROUTING_TABLE_NODE *sptr_discard_entries;} OSPF_ADDRESS_RANGE_LIST_ENTRY;typedef struct OSPF_AREA_ENTRY{ struct OSPF_AREA_ENTRY *sptr_forward_link; struct OSPF_AREA_ENTRY *sptr_backward_link; ULONG area_id; /* area address ranges */ ULONG number_of_address_ranges; /* for this area */ OSPF_ADDRESS_RANGE_LIST_ENTRY *sptr_address_ranges; /* associated router interfaces */ OSPF_INTERFACE *sptr_interfaces; /* this is setup at configuration time */ /* summary links advertisements */ struct OSPF_ADVERTISEMENT_NODE *sptr_summary_advertisement_list_head; UNION_OSPF_AREA_FLAGS flags; /* Various state bits */ ULONG stub_default_cost; /* shortest-path tree */ OSPF_SHORTEST_PATH_NODE shortest_path_first_tree; /* area's shortest path first tree; head is this router */ ULONG shortest_path_first_run_count; /* # times spf has been run for this area */ BYTE_ENUM (BOOLEAN) run_shortest_path_calculation; ULONG shortest_path_calculation_time_counter; OSPF_SHORTEST_PATH_NODE *sptr_candidate; /* area's candidate list for dijkstra */ OSPF_LS_DATABASE_HEAD ls_database_hash_table[TYPE_7_LSA + 1][OSPF_HASH_TABLE_SIZE]; /* opaque lsa new lsdb for opaque lsa jkw*/ OSPF_LS_DATABASE_HEAD opaque_ls_database_hash_table[MAX_OPAQUE_NUM + 1][OSPF_HASH_TABLE_SIZE]; USHORT number_of_autonomous_system_boundary_routers; OSPF_ROUTING_TABLE_ENTRY autonomous_system_boundary_routers; USHORT number_of_area_border_routers; OSPF_ROUTING_TABLE_ENTRY area_border_routers; USHORT number_of_neighbors_in_init_state; USHORT number_of_neighbors_in_exchange_state; USHORT number_of_neighbors_in_full_state; USHORT number_of_interfaces_in_up_state; ULONG lock_time; BYTE build_router; BYTE_ENUM (BOOLEAN) bring_up_virtual_links; ULONG periodic_MinLSInterval_time_counter; BYTE_ENUM (BOOLEAN) MinLSInterval_timer_enabled; BYTE_ENUM (BOOLEAN) inject_summary_lsa_into_stub_area; USHORT mib_number_of_link_state_advertisements; ULONG mib_checksum_sum; ULONG mib_stub_metric_type; /* 1 = ospf metric, 2 = comparable cost, 3 = non comparable */ USHORT mib_number_of_type10_lsa; ULONG mib_type10_checksum_sum; ULONG nssa_abr_to_convert_type_7_to_type_5;} OSPF_AREA_ENTRY;typedef struct OSPF_STUB_AREA_ENTRY{ struct OSPF_STUB_AREA_ENTRY *sptr_forward_link; struct OSPF_STUB_AREA_ENTRY *sptr_backward_link; struct OSPF_AREA_ENTRY *sptr_area;} OSPF_STUB_AREA_ENTRY;typedef struct OSPF_NSSA_AREA_ENTRY{ struct OSPF_NSSA_AREA_ENTRY *sptr_forward_link; struct OSPF_NSSA_AREA_ENTRY *sptr_backward_link; struct OSPF_AREA_ENTRY *sptr_area;} OSPF_NSSA_AREA_ENTRY;typedef struct OSPF_TRANSIT_AREA_ENTRY{ struct OSPF_TRANSIT_AREA_ENTRY *sptr_forward_link; struct OSPF_TRANSIT_AREA_ENTRY *sptr_backward_link; struct OSPF_AREA_ENTRY *sptr_area;} OSPF_TRANSIT_AREA_ENTRY;/**********************************//* Link State Database Structures *//**********************************/typedef struct OSPF_ADVERTISEMENT_NODE{ struct OSPF_ADVERTISEMENT_NODE *sptr_forward_link; struct OSPF_ADVERTISEMENT_NODE *sptr_backward_link; UNION_OSPF_LINK_STATE_ADVERTISEMENT advertisement;} OSPF_ADVERTISEMENT_NODE;typedef struct OSPF_NEIGHBOR_LIST{ struct OSPF_NEIGHBOR_LIST *sptr_forward_link; struct OSPF_NEIGHBOR_LIST *sptr_backward_link; struct OSPF_NEIGHBOR *sptr_neighbor;} OSPF_NEIGHBOR_LIST;typedef struct OSPF_PORT_CONFIGURATION_CLASS{ BYTE_ENUM (BOOLEAN) port_enabled; USHORT virtual_port_number; ULONG ip_address; ULONG subnetmask; ULONG area_id; ULONG transit_area_id; ULONG source_area_id_for_virtual_link; /* The area to which VLink belongs */ ULONG type; USHORT authentication_type; USHORT md5_authentication_key_ID; BYTE simple_plain_text_or_md5_password[OSPF_AUTHENTICATION_SIZE]; ULONG router_dead_interval; ULONG transmit_delay; USHORT priority; USHORT cost; ULONG hello_interval; ULONG virtual_neighbor_rid; /* Router ID */ BYTE_ENUM (BOOLEAN) rfc1042_enabled; enum LSL_PACKET_TYPE lsl_packet_type; BYTE_ENUM (BOOLEAN) point_to_point_link;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -