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_SESSION_H_
11 #define _LDP_SESSION_H_
13 #include "ldp_struct.h"
15 extern mpls_return_enum
ldp_session_backoff_start(ldp_global
* g
,
17 extern mpls_return_enum
ldp_session_backoff_stop(ldp_global
* g
,
19 extern mpls_return_enum
ldp_session_create_active(ldp_global
* g
, ldp_adj
* a
);
20 extern ldp_session
*ldp_session_create_passive(ldp_global
* g
,
21 mpls_socket_handle socket
, mpls_dest
* from
);
22 extern ldp_session
*ldp_session_create();
23 extern void ldp_session_delete(ldp_session
* s
);
24 extern mpls_return_enum
ldp_session_startup(ldp_global
* g
, ldp_session
* s
);
25 extern void ldp_session_shutdown(ldp_global
* g
, ldp_session
* s
, mpls_bool
);
27 extern void _ldp_session_add_attr(ldp_session
* s
, ldp_attr
* a
);
28 extern void _ldp_session_del_attr(ldp_global
*g
, ldp_session
* s
, ldp_attr
* a
);
30 extern void ldp_session_add_outlabel(ldp_session
* s
, ldp_outlabel
* o
);
31 extern void ldp_session_del_outlabel(ldp_global
* g
, ldp_session
* s
, ldp_outlabel
* o
);
33 extern mpls_return_enum
ldp_session_add_inlabel(ldp_global
* g
, ldp_session
* s
,
35 extern void ldp_session_del_inlabel(ldp_global
*g
, ldp_session
* s
, ldp_inlabel
* i
);
37 extern mpls_return_enum
ldp_session_add_addr(ldp_global
*g
, ldp_session
* s
, ldp_addr
* a
);
38 extern void ldp_session_del_addr(ldp_global
*g
, ldp_session
* s
, ldp_addr
* a
);
40 extern void _ldp_session_add_adj(ldp_session
* s
, ldp_adj
* a
);
41 extern void _ldp_session_del_adj(ldp_session
* s
, ldp_adj
* a
);
43 extern uint32_t _ldp_session_get_next_index();
44 extern mpls_return_enum
ldp_session_maintain_timer(ldp_global
* g
,
45 ldp_session
* s
, int flag
);
47 extern mpls_return_enum
ldp_session_find_raddr_index(ldp_session
* s
,
48 uint32_t index
, ldp_addr
** addr
);
50 extern ldp_session
*ldp_session_for_nexthop(ldp_nexthop
*nh
);