Added debugging to help figure out why FEC were disappearing.
[mpls-ldp-portable.git] / ldp / ldp_attr.h
blob35c33bf78465b1dc87562a619d9a31b438600d6b
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_ATTR_H_
11 #define _LDP_ATTR_H_
12 #include "ldp_struct.h"
14 #define LDP_ATTR_LABEL 0x01
15 #define LDP_ATTR_HOPCOUNT 0x02
16 #define LDP_ATTR_PATH 0x04
17 #define LDP_ATTR_FEC 0x08
18 #define LDP_ATTR_MSGID 0x10
19 #define LDP_ATTR_LSPID 0x20
20 #define LDP_ATTR_TRAFFIC 0x40
21 #define LDP_ATTR_STATUS 0x80
22 #define LDP_ATTR_ALL 0xFF
24 extern void ldp_attr_action_callback(mpls_timer_handle timer, void *extra,
25 mpls_cfg_handle g);
27 extern void ldp_attr_add_fec(ldp_attr *a, ldp_fec *fec);
28 extern void ldp_attr_del_fec(ldp_attr *a);
30 extern void ldp_attr_add_us2ds(ldp_attr * us, ldp_attr * ds);
31 extern void ldp_attr_del_us2ds(ldp_attr * us, ldp_attr * ds);
32 extern mpls_bool ldp_attr_us_partof_ds(ldp_attr * us, ldp_attr * ds);
33 extern int ldp_attr_num_us2ds(ldp_attr * ds);
35 extern ldp_attr *ldp_attr_create(mpls_fec * fec);
36 extern void ldp_attr_delete(ldp_attr * a);
37 extern void ldp_attr2ldp_attr(ldp_attr * a, ldp_attr * b, uint32_t flag);
38 extern void ldp_attr_remove_complete(ldp_global * g, ldp_attr * attr, mpls_bool);
40 extern ldp_attr *ldp_attr_find_downstream_state2(ldp_global * g,ldp_session * s,
41 ldp_fec * f, ldp_lsp_state state);
42 extern ldp_attr *ldp_attr_find_downstream_state(ldp_global * g, ldp_session * s,
43 mpls_fec * f, ldp_lsp_state state);
44 extern ldp_attr *ldp_attr_find_upstream_state2(ldp_global * g, ldp_session * s,
45 ldp_fec * f, ldp_lsp_state state);
46 extern ldp_attr *ldp_attr_find_upstream_state(ldp_global * g, ldp_session * s,
47 mpls_fec * f, ldp_lsp_state state);
49 extern ldp_attr *ldp_attr_find_downstream_state_any2(ldp_global *g, ldp_fec *f,
50 ldp_lsp_state state);
51 extern ldp_attr *ldp_attr_find_downstream_state_any(ldp_global *g, mpls_fec *f,
52 ldp_lsp_state state);
53 extern ldp_attr *ldp_attr_find_upstream_state_any2(ldp_global * g, ldp_fec * f,
54 ldp_lsp_state state);
55 extern ldp_attr *ldp_attr_find_upstream_state_any(ldp_global * g, mpls_fec * f,
56 ldp_lsp_state state);
58 extern mpls_return_enum ldp_attr_del_outlabel(ldp_attr * a);
59 extern mpls_return_enum ldp_attr_add_outlabel(ldp_attr * a, ldp_outlabel * o);
60 extern mpls_return_enum ldp_attr_add_inlabel(ldp_attr * a, ldp_inlabel * i);
61 extern mpls_return_enum ldp_attr_del_inlabel(ldp_attr * a);
62 extern mpls_return_enum ldp_attr_add_session(ldp_attr * a, ldp_session * s);
63 extern mpls_return_enum ldp_attr_del_session(ldp_attr * a);
65 extern mpls_bool ldp_attr_is_equal(ldp_attr * a, ldp_attr * b, uint32_t flag);
66 extern ldp_attr_list *ldp_attr_find_upstream_all2(ldp_global * g,
67 ldp_session * s, ldp_fec * f);
68 extern ldp_attr_list *ldp_attr_find_upstream_all(ldp_global * g,
69 ldp_session * s, mpls_fec * f);
70 extern ldp_attr_list *ldp_attr_find_downstream_all2(ldp_global * g,
71 ldp_session * s, ldp_fec * f);
72 extern ldp_attr_list *ldp_attr_find_downstream_all(ldp_global * g,
73 ldp_session * s, mpls_fec * f);
74 extern void ldp_attr_delete_upstream(ldp_global *, ldp_session *, ldp_attr *);
75 extern void ldp_attr_delete_downstream(ldp_global *, ldp_session *, ldp_attr *);
76 extern mpls_return_enum ldp_attr_insert_upstream2(ldp_global *g,ldp_session *s,
77 ldp_attr * a, ldp_fec *f);
78 extern mpls_return_enum ldp_attr_insert_upstream(ldp_global *g, ldp_session *s,
79 ldp_attr * a);
80 extern mpls_return_enum ldp_attr_insert_downstream2(ldp_global * g,
81 ldp_session * s, ldp_attr * a, ldp_fec *f);
82 extern mpls_return_enum ldp_attr_insert_downstream(ldp_global * g,
83 ldp_session * s, ldp_attr * a);
85 extern void mpls_label_struct2ldp_attr(mpls_label_struct * l, ldp_attr * a);
86 extern void ldp_attr2mpls_label_struct(ldp_attr * a, mpls_label_struct * l);
88 #endif