Updated label mapping to better support the new fec -> nh relationship
[mpls-ldp-portable.git] / ldp / ldp_fec.h
blobae6e1632da4f90ee9bb858546f78292bbd44a96c
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_FEC_H_
11 #define _LDP_FEC_H_
13 extern ldp_fec *ldp_fec_find(ldp_global *g, mpls_fec *fec);
14 extern ldp_nexthop *ldp_fec_nexthop_find(ldp_fec *f, mpls_nexthop *n);
15 extern mpls_return_enum ldp_fec_find_nexthop_index(ldp_fec *f, int index,
16 ldp_nexthop **n);
17 extern ldp_fec *ldp_fec_insert(ldp_global *g, mpls_fec * fec);
18 extern mpls_return_enum ldp_fec_insert2(ldp_global *g, ldp_fec * fec);
19 extern void ldp_fec_remove(ldp_global *g, mpls_fec *fec);
20 extern mpls_bool ldp_fec_empty(ldp_fec *fec);
21 extern mpls_return_enum ldp_fec_add_nexthop(ldp_global *g, ldp_fec *f,
22 ldp_nexthop *n);
23 extern void ldp_fec_del_nexthop(ldp_global *g, ldp_fec *f, ldp_nexthop *n);
24 extern ldp_fec *ldp_fec_create();
25 extern ldp_fec *ldp_fec_create_prefix(mpls_inet_addr * prefix, int prefix_len);
26 extern ldp_fec *ldp_fec_create_host(mpls_inet_addr * host);
27 extern void ldp_fec_delete(ldp_fec * fec);
29 extern void mpls_fec2ldp_fec(mpls_fec * a, ldp_fec * b);
31 extern void fec_tlv2mpls_fec(mplsLdpFecTlv_t * tlv, int num, mpls_fec * lf);
32 extern void mpls_fec2fec_tlv(mpls_fec * lf, mplsLdpFecTlv_t * tlv, int num);
34 extern mpls_return_enum ldp_fec_process_add(ldp_global * g, ldp_fec * f,
35 ldp_nexthop *nh);
36 extern mpls_return_enum ldp_fec_process_change(ldp_global * g, ldp_fec * f,
37 ldp_nexthop *nh, ldp_session * nh_session_old);
39 #endif