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_addr_index(ldp_global
* g
,
30 uint32_t index
, ldp_addr
** addr
);
31 extern mpls_return_enum
ldp_global_find_attr_index(ldp_global
* g
,
32 uint32_t index
, ldp_attr
**);
33 extern mpls_return_enum
ldp_global_find_session_index(ldp_global
* g
,
34 uint32_t index
, ldp_session
**);
35 extern mpls_return_enum
ldp_global_find_peer_index(ldp_global
* g
,
36 uint32_t index
, ldp_peer
** peer
);
37 extern mpls_return_enum
ldp_global_find_entity_index(ldp_global
* g
,
38 uint32_t index
, ldp_entity
** entity
);
39 extern mpls_return_enum
ldp_global_find_fec_index(ldp_global
* g
,
40 uint32_t index
, ldp_fec
** fec
);
41 extern mpls_return_enum
ldp_global_find_fec(ldp_global
* g
, mpls_fec
* m
,
44 extern mpls_return_enum
ldp_global_find_inlabel_index(ldp_global
* g
, uint32_t,
45 ldp_inlabel
** inlabel
);
46 extern mpls_return_enum
ldp_global_find_outlabel_index(ldp_global
* g
, uint32_t,
47 ldp_outlabel
** outlabel
);
48 extern ldp_outlabel
*ldp_global_find_outlabel_handle(ldp_global
* g
,
49 mpls_outsegment_handle handle
);
51 extern mpls_return_enum
ldp_global_find_tunnel_index(ldp_global
* g
,
52 uint32_t index
, ldp_tunnel
** tunnel
);
53 extern mpls_return_enum
ldp_global_find_resource_index(ldp_global
* g
,
54 uint32_t index
, ldp_resource
** resource
);
55 extern mpls_return_enum
ldp_global_find_hop_list_index(ldp_global
* g
,
56 uint32_t index
, ldp_hop_list
** hop_list
);
58 extern void _ldp_global_add_entity(ldp_global
* g
, ldp_entity
* e
);
59 extern void _ldp_global_del_entity(ldp_global
* g
, ldp_entity
* e
);
61 extern void _ldp_global_add_session(ldp_global
* g
, ldp_session
* s
);
62 extern void _ldp_global_del_session(ldp_global
* g
, ldp_session
* s
);
64 extern void _ldp_global_add_peer(ldp_global
* g
, ldp_peer
* p
);
65 extern void _ldp_global_del_peer(ldp_global
* g
, ldp_peer
* p
);
67 extern void _ldp_global_add_fec(ldp_global
* g
, ldp_fec
* l
);
68 extern void _ldp_global_del_fec(ldp_global
* g
, ldp_fec
* l
);
70 extern void _ldp_global_add_nexthop(ldp_global
* g
, ldp_nexthop
* l
);
71 extern void _ldp_global_del_nexthop(ldp_global
* g
, ldp_nexthop
* l
);
73 extern void _ldp_global_add_attr(ldp_global
* g
, ldp_attr
* a
);
74 extern void _ldp_global_del_attr(ldp_global
* g
, ldp_attr
* a
);
76 extern void _ldp_global_add_if(ldp_global
* g
, ldp_if
* i
);
77 extern void _ldp_global_del_if(ldp_global
* g
, ldp_if
* i
);
79 extern void _ldp_global_add_addr(ldp_global
* g
, ldp_addr
* a
);
80 extern void _ldp_global_del_addr(ldp_global
* g
, ldp_addr
* a
);
82 extern void _ldp_global_add_adj(ldp_global
* g
, ldp_adj
* a
);
83 extern void _ldp_global_del_adj(ldp_global
* g
, ldp_adj
* a
);
85 extern mpls_return_enum
_ldp_global_add_inlabel(ldp_global
* g
, ldp_inlabel
* i
);
86 extern mpls_return_enum
_ldp_global_del_inlabel(ldp_global
* g
, ldp_inlabel
* i
);
88 extern mpls_return_enum
_ldp_global_add_outlabel(ldp_global
* g
,
90 extern mpls_return_enum
_ldp_global_del_outlabel(ldp_global
* g
,
93 extern void _ldp_global_add_tunnel(ldp_global
* g
, ldp_tunnel
* t
);
94 extern void _ldp_global_del_tunnel(ldp_global
* g
, ldp_tunnel
* t
);
96 extern void _ldp_global_add_resource(ldp_global
* g
, ldp_resource
* r
);
97 extern void _ldp_global_del_resource(ldp_global
* g
, ldp_resource
* r
);
99 extern void _ldp_global_add_hop_list(ldp_global
* g
, ldp_hop_list
* h
);
100 extern void _ldp_global_del_hop_list(ldp_global
* g
, ldp_hop_list
* h
);