📄 ldp_struct.h
字号:
mpls_bool is_p2p; /* only used for cfg gets */ uint32_t entity_index;} ldp_if;typedef struct ldp_peer { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_peer) _global; struct ldp_entity *entity; mpls_timer_handle no_route_to_peer_timer; mpls_timer_handle hellotime_send_timer; int hellotime_send_timer_duration; int label_space; uint32_t index; struct ldp_mesg *tx_message; struct ldp_buf *tx_buffer; struct ldp_mesg *hello; /* YES this is a dest, it is what we use for sendto */ struct mpls_dest dest; ldp_role_enum target_role; char peer_name[MPLS_MAX_IF_NAME]; mpls_oper_state_enum oper_state; /* only used for cfg gets */ uint32_t entity_index;} ldp_peer;typedef struct ldp_session { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_session) _global; struct ldp_outlabel_list outlabel_root; struct mpls_link_list inlabel_root; struct mpls_link_list addr_root; struct ldp_attr_list attr_root; struct ldp_adj_list adj_root; mpls_timer_handle initial_distribution_timer; mpls_timer_handle keepalive_recv_timer; mpls_timer_handle keepalive_send_timer; uint32_t index; ldp_state_enum state; uint32_t oper_up; ldp_notif_status shutdown_notif; mpls_bool shutdown_fatal; mpls_socket_handle socket; mpls_timer_handle backoff_timer; int backoff; /* operational values learned from initialization */ int oper_max_pdu; int oper_keepalive; int oper_keepalive_interval; int oper_path_vector_limit; ldp_distribution_mode oper_distribution_mode; ldp_loop_detection_mode oper_loop_detection; /* these values are learned form the remote peer */ ldp_distribution_mode remote_distribution_mode; mpls_bool remote_loop_detection; int remote_path_vector_limit; int remote_keepalive; int remote_max_pdu; mpls_dest remote_dest; uint8_t session_name[20]; /* xxx.xxx.xxx.xxx:yyy\0 */ mpls_bool no_label_resource_sent; mpls_bool no_label_resource_recv; mpls_bool on_global; /* various message and buffers used for tx and rx */ struct ldp_mesg *keepalive; struct ldp_mesg *tx_message; struct ldp_buf *tx_buffer; /* cached from adj's */ ldp_role_enum oper_role; /* these are config values come from entity */ ldp_loop_detection_mode cfg_loop_detection_mode; ldp_distribution_mode cfg_distribution_mode; mpls_bool cfg_remote_in_ttl_less_domain; int cfg_label_request_count; int cfg_label_request_timer; uint16_t cfg_peer_tcp_port; int cfg_path_vector_limit; int cfg_hop_count_limit; int cfg_label_space; int cfg_keepalive; int cfg_max_pdu; /* mesg counters */ uint32_t mesg_tx; uint32_t mesg_rx; /* only used by cfg gets */ uint32_t adj_index; mpls_dest local_name; mpls_dest remote_name;} ldp_session;typedef struct ldp_adj { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_adj) _global; MPLS_LIST_ELEM(ldp_adj) _session; MPLS_LIST_ELEM(ldp_adj) _entity; struct ldp_session *session; struct ldp_entity *entity; mpls_timer_handle hellotime_recv_timer; mpls_oper_state_enum state; ldp_role_enum role; uint32_t index; /* these values are learned form the remote peer */ struct mpls_inet_addr remote_transport_address; struct mpls_inet_addr remote_source_address; struct mpls_inet_addr remote_lsr_address; int remote_label_space; int remote_hellotime; uint32_t remote_csn; /* only used by cfg gets */ uint32_t session_index; uint32_t entity_index;} ldp_adj;typedef struct ldp_addr { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_addr) _global; MPLS_LIST_ELEM(ldp_addr) _if; struct ldp_session *session; struct ldp_nexthop_list nh_root; struct mpls_inet_addr address; struct ldp_if *iff; /* * if an address has a if_handle it is locally attached */ mpls_if_handle if_handle; uint32_t index; /* * only used durring gets */ uint32_t session_index; uint32_t nexthop_index; uint32_t if_index;} ldp_addr;struct ldp_outlabel;typedef struct ldp_nexthop { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_nexthop) _global; MPLS_LIST_ELEM(ldp_nexthop) _fec; MPLS_LIST_ELEM(ldp_nexthop) _addr; MPLS_LIST_ELEM(ldp_nexthop) _if; MPLS_LIST_ELEM(ldp_nexthop) _outlabel; struct ldp_outlabel_list outlabel_root; struct ldp_fec *fec; struct ldp_addr *addr; struct ldp_if *iff; struct ldp_outlabel *outlabel; struct mpls_nexthop info; uint32_t index;} ldp_nexthop;typedef struct ldp_outlabel { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_outlabel) _global; MPLS_LIST_ELEM(ldp_outlabel) _session; MPLS_LIST_ELEM(ldp_outlabel) _nexthop; struct ldp_inlabel_list inlabel_root; struct ldp_tunnel_list tunnel_root; struct ldp_nexthop_list nh_root; uint32_t merge_count; struct ldp_attr *attr; struct ldp_session *session; struct ldp_nexthop *nh; struct mpls_outsegment info; uint32_t index; mpls_bool switching; /* only used by get() */ uint32_t session_index; uint32_t nh_index; uint32_t attr_index;} ldp_outlabel;typedef struct ldp_inlabel { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_inlabel) _global; MPLS_LIST_ELEM(ldp_inlabel) _outlabel; struct mpls_link_list session_root; struct mpls_link_list attr_root; struct ldp_outlabel *outlabel; uint32_t reuse_count; uint32_t index; struct mpls_insegment info; /* only used by get() */ uint32_t outlabel_index;} ldp_inlabel;typedef struct ldp_fec { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_fec) _global; MPLS_LIST_ELEM(ldp_fec) _inlabel; MPLS_LIST_ELEM(ldp_fec) _outlabel; MPLS_LIST_ELEM(ldp_fec) _tree; MPLS_LIST_ELEM(ldp_fec) _addr; MPLS_LIST_ELEM(ldp_fec) _fec; MPLS_LIST_ELEM(ldp_fec) _if; struct ldp_fs_list fs_root_us; struct ldp_fs_list fs_root_ds; /* ECMP */ struct ldp_nexthop_list nh_root; struct mpls_fec info; mpls_bool is_route; uint32_t index;} ldp_fec;typedef struct ldp_fs { struct ldp_attr_list attr_root; MPLS_LIST_ELEM(ldp_fs) _fec; struct ldp_session *session;} ldp_fs;typedef struct ldp_attr { MPLS_REFCNT_FIELD; uint32_t index; uint32_t msg_id; struct ldp_attr_list us_attr_root; struct ldp_attr *ds_attr; ldp_lsp_state state; mpls_bool ingress; mpls_bool filtered; mpls_bool in_tree; struct ldp_session *session; uint32_t attempt_count; mpls_timer_handle action_timer; ldp_lsp_state action; ldp_fec *fec; MPLS_LIST_ELEM(ldp_attr) _session; MPLS_LIST_ELEM(ldp_attr) _global; MPLS_LIST_ELEM(ldp_attr) _ds_attr; MPLS_LIST_ELEM(ldp_attr) _fs; mplsLdpFecTlv_t fecTlv; mplsLdpGenLblTlv_t genLblTlv; mplsLdpAtmLblTlv_t atmLblTlv; mplsLdpFrLblTlv_t frLblTlv; mplsLdpHopTlv_t hopCountTlv; mplsLdpPathTlv_t pathVecTlv; mplsLdpLblMsgIdTlv_t lblMsgIdTlv; mplsLdpLspIdTlv_t lspidTlv; mplsLdpTrafficTlv_t trafficTlv; mplsLdpStatusTlv_t statusTlv; mplsLdpRetMsgTlv_t retMsgTlv; uint8_t fecTlvExists:1; uint8_t genLblTlvExists:1; uint8_t atmLblTlvExists:1; uint8_t frLblTlvExists:1; uint8_t hopCountTlvExists:1; uint8_t pathVecTlvExists:1; uint8_t lblMsgIdTlvExists:1; uint8_t lspidTlvExists:1; uint8_t trafficTlvExists:1; uint8_t statusTlvExists:1; uint8_t retMsgTlvExists:1; struct ldp_outlabel *outlabel; struct ldp_inlabel *inlabel; /* only used for get() */ uint32_t inlabel_index; uint32_t outlabel_index; uint32_t session_index;} ldp_attr;typedef struct ldp_resource { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_resource) _global; struct ldp_tunnel *tunnel; uint32_t index; uint32_t max_rate; uint32_t mean_rate; uint32_t burst_size;} ldp_resource;typedef struct ldp_hop { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_hop) _hop_list; struct ldp_hop_list *hop_list; uint32_t index; uint32_t hop_list_index; uint32_t path_option; mpls_inet_addr addr; uint32_t type;} ldp_hop;typedef struct ldp_hop_list { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_hop_list) _global; struct _ldp_hop_list hop; struct ldp_tunnel *tunnel; uint32_t index;} ldp_hop_list;typedef struct ldp_tunnel { MPLS_REFCNT_FIELD; MPLS_LIST_ELEM(ldp_tunnel) _global; MPLS_LIST_ELEM(ldp_tunnel) _outlabel; uint32_t index; mpls_inet_addr ingress_lsrid; ldp_addr egress_lsrid; char name[MPLS_MAX_IF_NAME]; mpls_bool is_interface; uint32_t outlabel_index; struct ldp_outlabel *outlabel; uint32_t setup_prio; uint32_t hold_prio; uint32_t instance_prio; uint32_t resource_index; struct ldp_resource *resource; uint32_t hop_list_index; struct ldp_hop_list *hop_list; ldp_fec fec; mpls_admin_state_enum admin_state; uint32_t primary_instance; uint32_t any_affinity; uint32_t all_affinity; uint32_t no_all_affinity; uint32_t path_in_use; uint32_t protocol; mpls_bool local_protect; uint32_t session_attr; uint32_t owner;} ldp_tunnel;typedef void (*ldp_tree_callback) (void *);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -