Minor fix up to label release and withdrawl processing. Main change
[mpls-ldp-portable.git] / ldp / ldp_global.h
blob7e48999548afa29b61f6656eedcc839e9a9cbf86
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_GLOBAL_H_
11 #define _LDP_GLOBAL_H_
13 #include "ldp_struct.h"
15 extern ldp_global *ldp_global_create(mpls_instance_handle data);
16 extern mpls_return_enum ldp_global_delete(ldp_global * g);
17 extern mpls_return_enum ldp_global_startup(ldp_global * g);
18 extern mpls_return_enum ldp_global_shutdown(ldp_global * g);
20 extern ldp_peer *ldp_global_find_peer_addr(ldp_global * g,
21 mpls_inet_addr * addr);
22 extern ldp_if *ldp_global_find_if_handle(ldp_global * g, mpls_if_handle handle);
23 extern ldp_adj *ldp_global_find_adj_ldpid(ldp_global * g,
24 mpls_inet_addr * lsraddr, int labelspace);
26 extern mpls_return_enum ldp_global_find_adj_index(ldp_global * g, uint32_t index, ldp_adj ** adj);
27 extern mpls_return_enum ldp_global_find_if_index(ldp_global * g, uint32_t index,
28 ldp_if **);
29 extern mpls_return_enum ldp_global_find_attr_index(ldp_global * g,
30 uint32_t index, ldp_attr **);
31 extern mpls_return_enum ldp_global_find_session_index(ldp_global * g,
32 uint32_t index, ldp_session **);
33 extern mpls_return_enum ldp_global_find_peer_index(ldp_global * g,
34 uint32_t index, ldp_peer ** peer);
35 extern mpls_return_enum ldp_global_find_entity_index(ldp_global * g,
36 uint32_t index, ldp_entity ** entity);
37 extern mpls_return_enum ldp_global_find_fec_index(ldp_global * g,
38 uint32_t index, ldp_fec ** fec);
39 extern mpls_return_enum ldp_global_find_fec(ldp_global * g, mpls_fec * m,
40 ldp_fec ** fec);
42 extern mpls_return_enum ldp_global_find_inlabel_index(ldp_global * g, uint32_t,
43 ldp_inlabel ** inlabel);
44 extern mpls_return_enum ldp_global_find_outlabel_index(ldp_global * g, uint32_t,
45 ldp_outlabel ** outlabel);
46 extern ldp_outlabel *ldp_global_find_outlabel_handle(ldp_global * g,
47 mpls_outsegment_handle handle);
49 extern mpls_return_enum ldp_global_find_tunnel_index(ldp_global * g,
50 uint32_t index, ldp_tunnel ** tunnel);
51 extern mpls_return_enum ldp_global_find_resource_index(ldp_global * g,
52 uint32_t index, ldp_resource ** resource);
53 extern mpls_return_enum ldp_global_find_hop_list_index(ldp_global * g,
54 uint32_t index, ldp_hop_list ** hop_list);
56 extern void _ldp_global_add_entity(ldp_global * g, ldp_entity * e);
57 extern void _ldp_global_del_entity(ldp_global * g, ldp_entity * e);
59 extern void _ldp_global_add_session(ldp_global * g, ldp_session * s);
60 extern void _ldp_global_del_session(ldp_global * g, ldp_session * s);
62 extern void _ldp_global_add_peer(ldp_global * g, ldp_peer * p);
63 extern void _ldp_global_del_peer(ldp_global * g, ldp_peer * p);
65 extern void _ldp_global_add_fec(ldp_global * g, ldp_fec * l);
66 extern void _ldp_global_del_fec(ldp_global * g, ldp_fec * l);
68 extern void _ldp_global_add_nexthop(ldp_global * g, ldp_nexthop * l);
69 extern void _ldp_global_del_nexthop(ldp_global * g, ldp_nexthop * l);
71 extern void _ldp_global_add_attr(ldp_global * g, ldp_attr * a);
72 extern void _ldp_global_del_attr(ldp_global * g, ldp_attr * a);
74 extern void _ldp_global_add_if(ldp_global * g, ldp_if * i);
75 extern void _ldp_global_del_if(ldp_global * g, ldp_if * i);
77 extern void _ldp_global_add_addr(ldp_global * g, ldp_addr * a);
78 extern void _ldp_global_del_addr(ldp_global * g, ldp_addr * a);
80 extern void _ldp_global_add_adj(ldp_global * g, ldp_adj * a);
81 extern void _ldp_global_del_adj(ldp_global * g, ldp_adj * a);
83 extern mpls_return_enum _ldp_global_add_inlabel(ldp_global * g, ldp_inlabel * i);
84 extern mpls_return_enum _ldp_global_del_inlabel(ldp_global * g, ldp_inlabel * i);
86 extern mpls_return_enum _ldp_global_add_outlabel(ldp_global * g,
87 ldp_outlabel * o);
88 extern mpls_return_enum _ldp_global_del_outlabel(ldp_global * g,
89 ldp_outlabel * o);
91 extern void _ldp_global_add_tunnel(ldp_global * g, ldp_tunnel * t);
92 extern void _ldp_global_del_tunnel(ldp_global * g, ldp_tunnel * t);
94 extern void _ldp_global_add_resource(ldp_global * g, ldp_resource * r);
95 extern void _ldp_global_del_resource(ldp_global * g, ldp_resource * r);
97 extern void _ldp_global_add_hop_list(ldp_global * g, ldp_hop_list * h);
98 extern void _ldp_global_del_hop_list(ldp_global * g, ldp_hop_list * h);
100 #endif