3 * Copyright (C) James R. Leu 2000
6 * This software is covered under the LGPL, for more
7 * info check out http://www.gnu.org/copyleft/lgpl.html
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
,
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_l2cc_index(ldp_global
* g
,
38 uint32_t index
, ldp_l2cc
** l2cc
);
40 extern mpls_return_enum
ldp_global_find_inlabel_index(ldp_global
* g
, uint32_t,
41 ldp_inlabel
** inlabel
);
42 extern mpls_return_enum
ldp_global_find_outlabel_index(ldp_global
* g
, uint32_t,
43 ldp_outlabel
** outlabel
);
45 extern mpls_return_enum
ldp_global_find_tunnel_index(ldp_global
* g
,
46 uint32_t index
, ldp_tunnel
** tunnel
);
47 extern mpls_return_enum
ldp_global_find_resource_index(ldp_global
* g
,
48 uint32_t index
, ldp_resource
** resource
);
49 extern mpls_return_enum
ldp_global_find_hop_list_index(ldp_global
* g
,
50 uint32_t index
, ldp_hop_list
** hop_list
);
52 extern void _ldp_global_add_entity(ldp_global
* g
, ldp_entity
* e
);
53 extern void _ldp_global_del_entity(ldp_global
* g
, ldp_entity
* e
);
55 extern void _ldp_global_add_session(ldp_global
* g
, ldp_session
* s
);
56 extern void _ldp_global_del_session(ldp_global
* g
, ldp_session
* s
);
58 extern void _ldp_global_add_peer(ldp_global
* g
, ldp_peer
* p
);
59 extern void _ldp_global_del_peer(ldp_global
* g
, ldp_peer
* p
);
61 extern void _ldp_global_add_l2cc(ldp_global
* g
, ldp_l2cc
* l
);
62 extern void _ldp_global_del_l2cc(ldp_global
* g
, ldp_l2cc
* l
);
64 extern void _ldp_global_add_attr(ldp_global
* g
, ldp_attr
* a
);
65 extern void _ldp_global_del_attr(ldp_global
* g
, ldp_attr
* a
);
67 extern void _ldp_global_add_if(ldp_global
* g
, ldp_if
* i
);
68 extern void _ldp_global_del_if(ldp_global
* g
, ldp_if
* i
);
70 extern void _ldp_global_add_adj(ldp_global
* g
, ldp_adj
* a
);
71 extern void _ldp_global_del_adj(ldp_global
* g
, ldp_adj
* a
);
73 extern mpls_return_enum
_ldp_global_add_inlabel(ldp_global
* g
, ldp_inlabel
* i
);
74 extern mpls_return_enum
_ldp_global_del_inlabel(ldp_global
* g
, ldp_inlabel
* i
);
76 extern mpls_return_enum
_ldp_global_add_outlabel(ldp_global
* g
,
78 extern mpls_return_enum
_ldp_global_del_outlabel(ldp_global
* g
,
81 extern void _ldp_global_add_tunnel(ldp_global
* g
, ldp_tunnel
* t
);
82 extern void _ldp_global_del_tunnel(ldp_global
* g
, ldp_tunnel
* t
);
84 extern void _ldp_global_add_resource(ldp_global
* g
, ldp_resource
* r
);
85 extern void _ldp_global_del_resource(ldp_global
* g
, ldp_resource
* r
);
87 extern void _ldp_global_add_hop_list(ldp_global
* g
, ldp_hop_list
* h
);
88 extern void _ldp_global_del_hop_list(ldp_global
* g
, ldp_hop_list
* h
);