I changed all of the porting layer verify and compare
[mpls-ldp-portable.git] / ldp / ldp_global.h
blobbafd2f3c08302362fb6d2d0974694a86f80a6486
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);
38 extern mpls_return_enum ldp_global_find_inlabel_index(ldp_global * g, uint32_t,
39 ldp_inlabel ** inlabel);
40 extern mpls_return_enum ldp_global_find_outlabel_index(ldp_global * g, uint32_t,
41 ldp_outlabel ** outlabel);
43 extern mpls_return_enum ldp_global_find_tunnel_index(ldp_global * g,
44 uint32_t index, ldp_tunnel ** tunnel);
45 extern mpls_return_enum ldp_global_find_resource_index(ldp_global * g,
46 uint32_t index, ldp_resource ** resource);
47 extern mpls_return_enum ldp_global_find_hop_list_index(ldp_global * g,
48 uint32_t index, ldp_hop_list ** hop_list);
50 extern void _ldp_global_add_entity(ldp_global * g, ldp_entity * e);
51 extern void _ldp_global_del_entity(ldp_global * g, ldp_entity * e);
53 extern void _ldp_global_add_session(ldp_global * g, ldp_session * s);
54 extern void _ldp_global_del_session(ldp_global * g, ldp_session * s);
56 extern void _ldp_global_add_peer(ldp_global * g, ldp_peer * p);
57 extern void _ldp_global_del_peer(ldp_global * g, ldp_peer * p);
59 extern void _ldp_global_add_attr(ldp_global * g, ldp_attr * a);
60 extern void _ldp_global_del_attr(ldp_global * g, ldp_attr * a);
62 extern void _ldp_global_add_if(ldp_global * g, ldp_if * i);
63 extern void _ldp_global_del_if(ldp_global * g, ldp_if * i);
65 extern void _ldp_global_add_adj(ldp_global * g, ldp_adj * a);
66 extern void _ldp_global_del_adj(ldp_global * g, ldp_adj * a);
68 extern mpls_return_enum _ldp_global_add_inlabel(ldp_global * g, ldp_inlabel * i);
69 extern mpls_return_enum _ldp_global_del_inlabel(ldp_global * g, ldp_inlabel * i);
71 extern mpls_return_enum _ldp_global_add_outlabel(ldp_global * g,
72 ldp_outlabel * o);
73 extern mpls_return_enum _ldp_global_del_outlabel(ldp_global * g,
74 ldp_outlabel * o);
76 extern void _ldp_global_add_tunnel(ldp_global * g, ldp_tunnel * t);
77 extern void _ldp_global_del_tunnel(ldp_global * g, ldp_tunnel * t);
79 extern void _ldp_global_add_resource(ldp_global * g, ldp_resource * r);
80 extern void _ldp_global_del_resource(ldp_global * g, ldp_resource * r);
82 extern void _ldp_global_add_hop_list(ldp_global * g, ldp_hop_list * h);
83 extern void _ldp_global_del_hop_list(ldp_global * g, ldp_hop_list * h);
85 #endif