Changed the relationship between entity-adj-sessios (again)
[mpls-ldp-portable.git] / ldp / ldp_session.h
blobc56cf48d94b99685b4b5fc8d390c6b24b8f94b29
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_SESSION_H_
11 #define _LDP_SESSION_H_
13 #include "ldp_struct.h"
15 extern mpls_return_enum ldp_session_backoff_start(ldp_global * g,
16 ldp_session * s);
17 extern mpls_return_enum ldp_session_backoff_stop(ldp_global * g,
18 ldp_session * s);
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_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_session * s, ldp_outlabel * o);
33 extern mpls_return_enum ldp_session_add_inlabel(ldp_session * s,
34 ldp_inlabel * i);
35 extern void ldp_session_del_inlabel(ldp_session * s, ldp_inlabel * i);
37 extern mpls_return_enum ldp_session_add_addr(ldp_session * s, ldp_addr * a);
38 extern void ldp_session_del_addr(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 #endif