⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ospf_structures.h

📁 vxworks下ospf协议栈
💻 H
📖 第 1 页 / 共 5 页
字号:
        BYTE_ENUM (BOOLEAN)                     remote_access_enabled;        USHORT                                  lan_port_number;        ULONG                                   point_to_point_remote_ip_address;         /* should be changed also by PPP */        USHORT                                  mtu;    /* IP level Maximum Transmit Unit size, minimum 28 bytes - 20 bytes IP header, 8 bytes data */        USHORT                                  metric;        USHORT                                  hardware_address_length;        OSPF_AUTHENTICATION_KEY                         *sptr_authentication_key;        BYTE_ENUM (BOOLEAN)                     passive;        ULONG                                   unnumbered_dest_ip;                                                     /* unnumbered dest ip*/        ULONG                                   poll_interval;        ULONG                                   retransmit_interval;        ULONG                                   nbma_ptmp_neighbor_address;   /* __NBMA_PTMP__ */} OSPF_PORT_CONFIGURATION_CLASS;typedef struct OSPF_PORT_CLASS{        OSPF_PORT_CONFIGURATION_CLASS                   config;                                 /* this portion is configured by NVRAM */        ULONG                                                                   net_address;                    /* this portion is configured by ip */        ULONG                                                                   subnet_address;        ULONG                                                                   rip_subnetmask;        ULONG                                                                   netmask;        ULONG                                                                   net_broadcast_address;        ULONG                                                                   subnet_broadcast_address;        MAC_ADDRESS                                                             mac_address;             /* in Big Endian format, i.e. Most Sig. Bit in high order bit */        BYTE_ENUM (BOOLEAN)                                                     allow_broadcast;        BYTE_ENUM (BOOLEAN)                                                     port_is_loopback;        BYTE_ENUM (BOOLEAN)                                                     is_point_to_point;        BYTE_ENUM (BOOLEAN)                                                     allow_multicast;        BYTE_ENUM (BOOLEAN)                                                     has_subnet;        BYTE_ENUM (BOOLEAN)                                                     do_no_aging;        BYTE_ENUM (BOOLEAN)                                                     local_interface;        BYTE_ENUM (BOOLEAN)                                                     remote_interface;        BYTE_ENUM (BOOLEAN)                                                     port_is_up;} OSPF_PORT_CLASS;typedef struct OSPF_AREA_CONFIGURATION_CLASS{        ULONG                                   area_id;        ULONG                                   ip_address;        ULONG                                   subnetmask;        BYTE_ENUM (BOOLEAN)                     address_range_active;        BYTE_ENUM (BOOLEAN)                     advertise_address_range;        ULONG                                   address_range_cost;        BYTE_ENUM (BOOLEAN)                     external_routing_capability_enabled;        BYTE_ENUM (BOOLEAN)      nssa_enabled;        BYTE_ENUM (BOOLEAN)                     inject_summary_lsa_into_stub_area;        ULONG                                   stub_default_cost;        ULONG                                   number_of_area_address_ranges;                                                                          /* number of areas, 0 will always be the backbone */} OSPF_AREA_CONFIGURATION_CLASS;typedef struct OSPF_AREA_CLASS{        OSPF_AREA_CONFIGURATION_CLASS                   config;                                 /* this portion is configured by NVRAM */} OSPF_AREA_CLASS;/* RFC 2178 G.3 */typedef struct OSPF_AREA_ADDRESS_RANGE_CONFIGURATION_CLASS{        ULONG                                                           network;        ULONG                                                           mask;        BYTE_ENUM (BOOLEAN)                                     advertise;        BYTE_ENUM (BOOLEAN)                                     active;        ULONG                                                           cost;        ULONG                                                           area_id;} OSPF_AREA_ADDRESS_RANGE_CONFIGURATION_CLASS;/* RFC 2178 G.3 */typedef struct OSPF_AREA_ADDRESS_RANGE_CLASS{        OSPF_AREA_ADDRESS_RANGE_CONFIGURATION_CLASS config;} OSPF_AREA_ADDRESS_RANGE_CLASS;typedef struct OSPF_EXTERNAL_ROUTE{        struct OSPF_EXTERNAL_ROUTE      *sptr_forward_link;        struct OSPF_EXTERNAL_ROUTE      *sptr_backward_link;        ULONG                                           destination_network;        ULONG                                           destination_mask;        ULONG                                           metric;        ULONG                                           forwarding_address;        ULONG                                           tag;        ULONG                                           time_stamp;        ULONG                                                           advertising_router;        /* SPR 85050 */        /* asr: Changed route_proto to route_protocol as route_proto               has conflicts in virtual stack builds        */        ULONG                           route_protocol;} OSPF_EXTERNAL_ROUTE;typedef struct OSPF_MIB_GENERAL_ENTRY{        ULONG                                   ospfVersionNumber;        BYTE_ENUM (BOOLEAN)     ospfAreaBdrRtrStatus;        ULONG                                   ospfExternLsaCount;        ULONG                                   ospfExternLsaCksumSum;        ULONG                                   ospfOriginateNewLsas;        ULONG                                   ospfRxNewLsas;} OSPF_MIB_GENERAL_ENTRY;typedef struct WRN_OSPF_MIB_GENERAL_ENTRY{    BYTE_ENUM (BOOLEAN)    wrnOspfRFC1583Compatibility;    BYTE_ENUM (BOOLEAN)    wrnOspfOpaqueLsaSupport;    ULONG                  wrnOspfOriginateNewOpaqueLsas;    ULONG                  wrnOspfRxNewOpaqueLsas;    ULONG                  wrnOspfType9LsaCount;    ULONG                  wrnOspfType9LsaCksumSum;    ULONG                  wrnOspfType11LsaCount;    ULONG                  wrnOspfType11LsaCksumSum;} WRN_OSPF_MIB_GENERAL_ENTRY;typedef struct OSPF_ADDRESS_MASK_PAIRS{        struct OSPF_ADDRESS_MASK_PAIRS *sptr_forward_link;        struct OSPF_ADDRESS_MASK_PAIRS *sptr_backward_link;        ULONG network_address;        ULONG network_mask;/* SPR 83418 -- Begin */        ULONG metric_type;        ULONG metric_value;/* SPR 83418 -- End */} OSPF_ADDRESS_MASK_PAIRS;typedef struct OSPF_REDISTRIBUTION_CONFIGURATION{        enum BOOLEAN redistribute_all_bgp;        enum BOOLEAN redistribute_all_rip;        enum BOOLEAN redistribute_all_static;        enum BOOLEAN redistribute_ip_default_route;        enum BOOLEAN allow_bgp_default;        OSPF_GENERIC_NODE ospf_imported_rip_subnets;        OSPF_GENERIC_NODE ospf_imported_static_subnets;        OSPF_GENERIC_NODE ospf_imported_bgp_subnets;        USHORT number_of_do_not_allow_neighbors;        USHORT do_not_allow_neighbor_as[0xff];        USHORT number_of_do_not_allow_origins;        USHORT do_not_allow_origin_as[0xff];} OSPF_REDISTRIBUTION_CONFIGURATION;typedef struct OSPF_ROUTE_QUEUE_ENTRY{        struct OSPF_ROUTE_QUEUE_ENTRY *sptr_forward_link;        struct OSPF_ROUTE_QUEUE_ENTRY *sptr_backward_link;        enum OSPF_ROUTING_TABLE_UPDATE_ACTION action;        IP_ROUTE_ENTRY ip_route_entry;}       OSPF_ROUTE_QUEUE_ENTRY;typedef struct OSPF_OPAQUE_CALLBACK{        struct OSPF_OPAQUE_CALLBACK     *sptr_forward_link;        struct OSPF_OPAQUE_CALLBACK     *sptr_backward_link;        BYTE lsa_type;        BYTE opaque_type;        int (* new_interface_hook)(struct OSPF_INTERFACE *interface);        int (* delete_interface_hook)(struct OSPF_INTERFACE *interface);        void (* interface_state_machine_change_hook)(enum OSPF_INTERFACE_EVENT event,enum OSPF_INTERFACE_STATE state,struct OSPF_INTERFACE *interface);        void (* neighbor_state_machine_change_hook)(enum OSPF_NEIGHBOR_EVENT event,enum OSPF_NEIGHBOR_STATE state,struct OSPF_INTERFACE *sptr_interface, struct OSPF_NEIGHBOR *neighbor);        int (* opaque_lsa_originate_hook)(void *arg, BYTE lsa_type, BYTE opaque_type, USHORT age);        void (* opaque_lsa_refresh_hook)(void *arg, BYTE lsa_type, ULONG opaque_lsid, USHORT age);        void (* opaque_lsa_received_hook)(UNION_OSPF_LINK_STATE_ADVERTISEMENT *opaque_advertisement);} OSPF_OPAQUE_CALLBACK;#define OSPF_TASK_NAME_SIZE   11 /* 10 chars + null terminator */typedef struct OSPF_TASK_DESCRIPTOR{    int                 task_id;    int                 task_priority;    int                 task_stack_size;    FUNCPTR             task_start_func;    OSPF_TASK_STATES    task_state;    char                task_name[OSPF_TASK_NAME_SIZE];} OSPF_TASK_DESCRIPTOR;/*********************OSPF Meta STRUCTURE ***********************************/typedef struct OSPF_CLASS{    enum BOOLEAN    protocol_enabled;    /* asr: added to ensure that if ospf_init is called twice,       we dont' go through initialization sequence again     */    enum BOOLEAN    protocol_initialized;    ULONG           tid;          /* ospf task ID */    ULONG           ospf_vsid;    /* ID for virtual stack on which OSPF will run */    ULONG           router_id;    /* uniquely identifies this router in the Autonomous System */    enum BOOLEAN    type_of_service_capability;     /* TRUE means this router will calculate separate routes based on type of service */    enum BOOLEAN    autonomous_system_border_router;    enum BOOLEAN    ip_multicast;    enum BOOLEAN    default_values_have_been_set;    /* NOTE: port[] shall only be used during startup for processing configuration     *       read from ospf_cfg()     */    OSPF_PORT_CLASS port[NUMBER_OF_OSPF_PORTS];    /* make sptr_interface linked list visible here. Was in OSPF_PORT_CLASS */    OSPF_INTERFACE   *sptr_interface_list;    ULONG            number_of_ports;    ULONG            starting_port_number;    ULONG            number_of_interfaces;    /* areas */    ULONG            number_of_areas;    /* number of areas */    ULONG            number_of_area_address_ranges;  /* total number of area address ranges for all areas */    ULONG            number_of_stub_areas;    ULONG            number_of_nssa_areas;    /* NOTE: areat[] shall only be used during startup for processing configuration     *       read from ospf_cfg()     */    OSPF_AREA_CLASS         area[NUMBER_OF_OSPF_AREAS];    struct OSPF_AREA_ENTRY  *sptr_area_list;    /* an array of areas connected to this router which will be                                                 * allocated at initialization time, area 0 is the backbone */    /* RFC 2178 G.3 */    OSPF_AREA_ADDRESS_RANGE_CLASS area_address_range[NUMBER_OF_OSPF_AREA_ADDRESS_RANGES]; /* area address ranges for a particular area */    struct OSPF_AREA_ENTRY          *sptr_backbone_area;    struct OSPF_STUB_AREA_ENTRY     *sptr_stub_area_list;    struct OSPF_NSSA_AREA_ENTRY     *sptr_nssa_area_list;    /* virtual links */    ULONG             number_of_virtual_links;    ULONG             number_of_virtual_links_in_Up_state;    OSPF_INTERFACE_NODE     *sptr_configured_virtual_links;    enum BOOLEAN          nssa_enabled;    OSPF_OPAQUE_CALLBACK    *sptr_type_9_callback_list_head;    OSPF_OPAQUE_CALLBACK    *sptr_type_10_callback_list_head;    OSPF_OPAQUE_CALLBACK    *sptr_type_11_callback_list_head;    OSPF_EXTERNAL_ROUTE     *sptr_configured_external_routes;    OSPF_EXTERNAL_ROUTE     *sptr_originated_external_routes;    OSPF_CONTAINER            *sptr_external_route_queue;    ULONG                  external_lsa_queue_process_interval;    /* SPR#76812 */    ULONG                  external_route_queue_counter;    /* neighbors */    ULONG                  number_of_neighbors;       /* number of neighbors known to this router */    ULONG                  number_of_neighbors_in_init_state;    ULONG                  number_of_neighbors_in_exchange_state;    ULONG                  number_of_neighbors_in_full_state;    OSPF_ROUTING_TABLE_NODE *   sptr_routing_table_head[OSPF_ROUTE_TABLE_MAX][OSPF_RT_HASH_TABLE_SIZE];    enum BOOLEAN           build_routing_table;    ULONG                  routing_table_build_time_counter;    enum BOOLEAN           initialization_breakpoint;    enum BOOLEAN           configuration_breakpoint;    enum BOOLEAN           runtime_breakpoint;    enum BOOLEAN           timer_enabled;    ULONG                  _1_second_counter;    ULONG                  clock_ticks_per_second;    OSPF_MIB_GENERAL_ENTRY ospfGeneralGroupEntry;    WRN_OSPF_MIB_GENERAL_ENTRY wrnOspfGeneralGroupEntry;    OSPF_HOSTS             *sptr_host_list;    enum BOOLEAN           printing_enabled;    enum BOOLEAN           interface_printing_enabled;    enum BOOLEAN           neighbor_printing_enabled;    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -