FECs are now added to the global list as part of creation, and
[mpls-ldp-portable.git] / ldp / ldp_fec.h
blobc0977feea43cdd85d0105a56b8b8095c4e1ff133
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_fec *ldp_fec_find2(ldp_global *g, mpls_fec *fec);
15 extern ldp_nexthop *ldp_fec_nexthop_find(ldp_fec *f, mpls_nexthop *n);
16 extern mpls_return_enum ldp_fec_find_nexthop_index(ldp_fec *f, int index,
17 ldp_nexthop **n);
18 extern ldp_fec *ldp_fec_insert(ldp_global *g, mpls_fec * fec);
19 extern mpls_return_enum ldp_fec_insert2(ldp_global *g, ldp_fec * fec);
20 extern void ldp_fec_remove(ldp_global *g, mpls_fec *fec);
21 extern mpls_bool ldp_fec_empty(ldp_fec *fec);
22 extern mpls_return_enum ldp_fec_add_nexthop(ldp_global *g, ldp_fec *f,
23 ldp_nexthop *n);
24 extern void ldp_fec_del_nexthop(ldp_global *g, ldp_fec *f, ldp_nexthop *n);
25 extern ldp_fec *ldp_fec_create(ldp_global *g);
26 extern void ldp_fec_delete(ldp_global *g, ldp_fec * fec);
28 extern void mpls_fec2ldp_fec(mpls_fec * a, ldp_fec * b);
30 extern void fec_tlv2mpls_fec(mplsLdpFecTlv_t * tlv, int num, mpls_fec * lf);
31 extern void mpls_fec2fec_tlv(mpls_fec * lf, mplsLdpFecTlv_t * tlv, int num);
33 extern mpls_return_enum ldp_fec_process_add(ldp_global * g, ldp_fec * f,
34 ldp_nexthop *nh);
35 extern mpls_return_enum ldp_fec_process_change(ldp_global * g, ldp_fec * f,
36 ldp_nexthop *nh, ldp_session * nh_session_old);
38 #endif