Fixed next hop processing
[mpls-ldp-portable.git] / ldp / ldp_label_mapping.h
blobd26b8f696229b4a3daef4ddc885fe5f31db3eab6
2 /*
3 * Copyright (C) James R. Leu 2000
4 * jleu@mindspring.com
6 * This software is covered under the LGPL, for more
7 * info check out http://www.gnu.org/copyleft/lgpl.html
8 */
10 #ifndef _LDP_LABEL_MAPPING_H_
11 #define _LDP_LABEL_MAPPING_H_
12 #include "ldp_struct.h"
14 extern mpls_return_enum ldp_label_mapping_with_xc(ldp_global * g,
15 ldp_session * s, mpls_fec * fec, ldp_attr ** us_attr, ldp_attr * ds_attr);
17 extern void map2attr(mplsLdpLblMapMsg_t * map, ldp_attr * attr, uint32_t flag);
18 extern void attr2map(ldp_attr * attr, mplsLdpLblMapMsg_t * map);
20 extern void ldp_label_mapping_initial_callback(mpls_timer_handle timer,
21 void *extra, mpls_cfg_handle g);
23 extern void ldp_label_mapping_prepare_msg(ldp_mesg * msg, uint32_t msgid,
24 ldp_attr * s_attr);
25 extern mpls_return_enum ldp_label_mapping_send(ldp_global * g, ldp_session * s,
26 ldp_attr * us_attr, ldp_attr * ds_attr);
28 extern mpls_return_enum ldp_label_mapping_process(ldp_global * g,
29 ldp_session * s, ldp_adj * a, ldp_entity * e, ldp_attr * r_attr,
30 mpls_fec * fec);
32 extern mpls_return_enum Check_Received_Attributes(ldp_global * g,
33 ldp_session * s, ldp_attr * r_attr, uint16_t type);
35 extern mpls_return_enum ldp_get_next_hop_session_for_fec(ldp_global * g,
36 mpls_fec * fec, ldp_addr ** next_hop, ldp_session ** next_hop_session);
37 extern ldp_session *ldp_get_session_by_next_hop(ldp_global * g,
38 mpls_nexthop * a, ldp_addr ** next_hop);
40 extern void Prepare_Label_Mapping_Attributes(ldp_global * g, ldp_session * s,
41 mpls_fec * fec, ldp_attr * r_attr, ldp_attr * s_attr, mpls_bool propogating,
42 mpls_bool already, mpls_bool egress);
44 #endif