Were referencing a file that should have been dead for a long
[mpls-ldp-portable.git] / ldp / ldp_cfg.h
blob93e8ea13e99eb68841fe99bf79d8d27b401915c2
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_CFG_H_
11 #define _LDP_CFG_H_
13 #include "ldp_struct.h"
14 #include "ldp_entity.h"
15 #include "ldp_session.h"
17 #define LDP_CFG_ADD 0x00000001
18 #define LDP_CFG_DEL 0x10000000
20 #define LDP_GLOBAL_CFG_ADMIN_STATE 0x00000002
21 #define LDP_GLOBAL_CFG_CONTROL_MODE 0x00000004
22 #define LDP_GLOBAL_CFG_RETENTION_MODE 0x00000008
23 #define LDP_GLOBAL_CFG_REPAIR_MODE 0x00000010
24 #define LDP_GLOBAL_CFG_PROPOGATE_RELEASE 0x00000020
25 #define LDP_GLOBAL_CFG_LABEL_MERGE 0x00000040
26 #define LDP_GLOBAL_CFG_LOOP_DETECTION_MODE 0x00000080
27 #define LDP_GLOBAL_CFG_TTLLESS_DOMAIN 0x00000100
28 #define LDP_GLOBAL_CFG_LOCAL_TCP_PORT 0x00000200
29 #define LDP_GLOBAL_CFG_LOCAL_UDP_PORT 0x00000400
30 #define LDP_GLOBAL_CFG_LSR_IDENTIFIER 0x00000800
31 #define LDP_GLOBAL_CFG_TRANS_ADDR 0x00001000
32 #define LDP_GLOBAL_CFG_KEEPALIVE_TIMER 0x00002000
33 #define LDP_GLOBAL_CFG_KEEPALIVE_INTERVAL 0x00004000
34 #define LDP_GLOBAL_CFG_HELLOTIME_TIMER 0x00008000
35 #define LDP_GLOBAL_CFG_HELLOTIME_INTERVAL 0x00010000
36 #define LDP_GLOBAL_CFG_LSR_HANDLE 0x00020000
38 #define LDP_GLOBAL_CFG_WHEN_DOWN (LDP_GLOBAL_CFG_LOCAL_TCP_PORT|\
39 LDP_GLOBAL_CFG_LOCAL_UDP_PORT|\
40 LDP_GLOBAL_CFG_LSR_IDENTIFIER)
42 #define LDP_ENTITY_CFG_TRANS_ADDR 0x00000002
43 #define LDP_ENTITY_CFG_PROTO_VER 0x00000004
44 #define LDP_ENTITY_CFG_REMOTE_TCP 0x00000008
45 #define LDP_ENTITY_CFG_REMOTE_UDP 0x00000010
46 #define LDP_ENTITY_CFG_MAX_PDU 0x00000020
47 #define LDP_ENTITY_CFG_KEEPALIVE_TIMER 0x00000040
48 #define LDP_ENTITY_CFG_KEEPALIVE_INTERVAL 0x00000080
49 #define LDP_ENTITY_CFG_HELLOTIME_TIMER 0x00000100
50 #define LDP_ENTITY_CFG_HELLOTIME_INTERVAL 0x00000200
51 #define LDP_ENTITY_CFG_SESSION_SETUP_COUNT 0x00000400
52 #define LDP_ENTITY_CFG_SESSION_BACKOFF_TIMER 0x00000800
53 #define LDP_ENTITY_CFG_DISTRIBUTION_MODE 0x00001000
54 #define LDP_ENTITY_CFG_PATHVECTOR_LIMIT 0x00002000
55 #define LDP_ENTITY_CFG_HOPCOUNT_LIMIT 0x00004000
56 #define LDP_ENTITY_CFG_REQUEST_TIMER 0x00008000
57 #define LDP_ENTITY_CFG_REQUEST_COUNT 0x00010000
58 #define LDP_ENTITY_CFG_ADMIN_STATE 0x00020000
59 #define LDP_ENTITY_CFG_ADJ_COUNT 0x00040000
60 #define LDP_ENTITY_CFG_TYPE 0x00080000
61 #define LDP_ENTITY_CFG_SUB_INDEX 0x00100000
62 #define LDP_ENTITY_CFG_INHERIT_FLAG 0x00200000
63 #define LDP_ENTITY_CFG_MESG_TX 0x00400000
64 #define LDP_ENTITY_CFG_MESG_RX 0x00800000
65 #define LDP_ENTITY_CFG_ADJ_INDEX 0x01000000
67 #define LDP_ENTITY_CFG_WHEN_DOWN (LDP_CFG_DEL|\
68 LDP_ENTITY_CFG_TRANS_ADDR|\
69 LDP_ENTITY_CFG_PROTO_VER|\
70 LDP_ENTITY_CFG_REMOTE_TCP|\
71 LDP_ENTITY_CFG_REMOTE_UDP|\
72 LDP_ENTITY_CFG_DISTRIBUTION_MODE|\
73 LDP_ENTITY_CFG_TYPE|\
74 LDP_ENTITY_CFG_SUB_INDEX)
76 #define LDP_IF_CFG_LABEL_SPACE 0x00000002
77 #define LDP_IF_CFG_INDEX 0x00000004
78 #define LDP_IF_CFG_ENTITY_INDEX 0x00000008
79 #define LDP_IF_CFG_OPER_STATE 0x00000010
80 #define LDP_IF_CFG_LOCAL_SOURCE_ADDR 0x00000020
81 #define LDP_IF_CFG_NAME 0x00000040
83 #define LDP_IF_CFG_WHEN_DOWN (LDP_CFG_DEL|\
84 LDP_IF_CFG_LABEL_SPACE|\
85 LDP_IF_CFG_INDEX)
87 #define LDP_PEER_CFG_LABEL_SPACE 0x00000002
88 #define LDP_PEER_CFG_DEST_ADDR 0x00000004
89 #define LDP_PEER_CFG_TARGET_ROLE 0x00000008
90 #define LDP_PEER_CFG_ENTITY_INDEX 0x00000010
91 #define LDP_PEER_CFG_OPER_STATE 0x00000020
92 #define LDP_PEER_CFG_PEER_NAME 0x00000040
93 #define LDP_PEER_CFG_LOCAL_SOURCE_ADDR 0x00000080
95 #define LDP_PEER_CFG_WHEN_DOWN (LDP_CFG_DEL|\
96 LDP_PEER_CFG_LABEL_SPACE|\
97 LDP_PEER_CFG_DEST_ADDR|\
98 LDP_PEER_CFG_TARGET_ROLE)
100 #define LDP_SESSION_CFG_INDEX 0x00000002
101 #define LDP_SESSION_CFG_STATE 0x00000004
102 #define LDP_SESSION_CFG_MAX_PDU 0x00000008
103 #define LDP_SESSION_CFG_KEEPALIVE 0x00000010
104 #define LDP_SESSION_CFG_PATH_LIMIT 0x00000020
105 #define LDP_SESSION_CFG_DIST_MODE 0x00000040
106 #define LDP_SESSION_CFG_LOOP_DETECTION 0x00000080
107 #define LDP_SESSION_CFG_REMOTE_MAX_PDU 0x00000100
108 #define LDP_SESSION_CFG_REMOTE_KEEPALIVE 0x00000200
109 #define LDP_SESSION_CFG_REMOTE_PATH_LIMIT 0x00000400
110 #define LDP_SESSION_CFG_REMOTE_DIST_MODE 0x00000800
111 #define LDP_SESSION_CFG_REMOTE_LOOP_DETECTION 0x00001000
112 #define LDP_SESSION_CFG_REMOTE_ADDR 0x00002000
113 #define LDP_SESSION_CFG_REMOTE_PORT 0x00004000
114 #define LDP_SESSION_CFG_LABEL_RESOURCE_STATE_LOCAL 0x00008000
115 #define LDP_SESSION_CFG_LABEL_RESOURCE_STATE_REMOTE 0x00010000
116 #define LDP_SESSION_CFG_ENTITY_INDEX 0x00020000
117 #define LDP_SESSION_CFG_ADJ_INDEX 0x00040000
118 #define LDP_SESSION_CFG_MESG_TX 0x00080000
119 #define LDP_SESSION_CFG_MESG_RX 0x00100000
120 #define LDP_SESSION_CFG_OPER_UP 0x00200000
122 #define LDP_SESSION_RADDR_CFG_ADDR 0x00000002
123 #define LDP_SESSION_RADDR_CFG_INDEX 0x00000004
125 #define LDP_ATTR_CFG_STATE 0x00000002
126 #define LDP_ATTR_CFG_FEC 0x00000004
127 #define LDP_ATTR_CFG_LABEL 0x00000008
128 #define LDP_ATTR_CFG_HOP_COUNT 0x00000010
129 #define LDP_ATTR_CFG_PATH 0x00000020
130 #define LDP_ATTR_CFG_SESSION_INDEX 0x00000040
131 #define LDP_ATTR_CFG_INLABEL_INDEX 0x00000080
132 #define LDP_ATTR_CFG_OUTLABEL_INDEX 0x00000100
133 #define LDP_ATTR_CFG_INGRESS 0x00000200
135 #define LDP_ADJ_CFG_REMOTE_TRADDR 0x00000002
136 #define LDP_ADJ_CFG_REMOTE_SRCADDR 0x00000004
137 #define LDP_ADJ_CFG_REMOTE_LSRADDR 0x00000008
138 #define LDP_ADJ_CFG_REMOTE_CSN 0x00000010
139 #define LDP_ADJ_CFG_REMOTE_LABELSPACE 0x00000020
140 #define LDP_ADJ_CFG_REMOTE_HELLOTIME 0x00000040
141 #define LDP_ADJ_CFG_ENTITY_INDEX 0x00000080
142 #define LDP_ADJ_CFG_REMOTE_SESSION_INDEX 0x00000100
143 #define LDP_ADJ_CFG_ROLE 0x00000200
145 #define LDP_INLABEL_CFG_LABELSPACE 0x00000002
146 #define LDP_INLABEL_CFG_LABEL 0x00000004
147 #define LDP_INLABEL_CFG_OUTLABEL_INDEX 0x00000008
149 #define LDP_OUTLABEL_CFG_ADDR_INDEX 0x00000002
150 #define LDP_OUTLABEL_CFG_SESSION_INDEX 0x00000004
151 #define LDP_OUTLABEL_CFG_LABEL 0x00000008
152 #define LDP_OUTLABEL_CFG_MERGE_COUNT 0x00000010
154 #define LDP_TUNNEL_CFG_INDEX 0x00000002
155 #define LDP_TUNNEL_CFG_INSTANCE 0x00000004
156 #define LDP_TUNNEL_CFG_INGRESS 0x00000008
157 #define LDP_TUNNEL_CFG_EGRESS 0x00000010
158 #define LDP_TUNNEL_CFG_NAME 0x00000020
159 #define LDP_TUNNEL_CFG_IS_IF 0x00000040
160 #define LDP_TUNNEL_CFG_OUTLABEL 0x00000080
161 #define LDP_TUNNEL_CFG_SETUP_PRIO 0x00000100
162 #define LDP_TUNNEL_CFG_HOLD_PRIO 0x00000200
163 #define LDP_TUNNEL_CFG_INSTANCE_PRIO 0x00000400
164 #define LDP_TUNNEL_CFG_LOCAL_PROTECT 0x00000800
165 #define LDP_TUNNEL_CFG_RESOURCE_INDEX 0x00001000
166 #define LDP_TUNNEL_CFG_HOP_LIST_INDEX 0x00002000
167 #define LDP_TUNNEL_CFG_ROLE 0x00004000
168 #define LDP_TUNNEL_CFG_ADMIN_STATE 0x00008000
169 #define LDP_TUNNEL_CFG_FEC 0x00010000
171 #define LDP_TUNNEL_CFG_WHEN_DOWN (LDP_CFG_DEL|\
172 LDP_TUNNEL_CFG_OUTLABEL|\
173 LDP_TUNNEL_CFG_RESOURCE_INDEX|\
174 LDP_TUNNEL_CFG_HOP_LIST_INDEX)
176 #define LDP_RESOURCE_CFG_INDEX 0x00000002
177 #define LDP_RESOURCE_CFG_MAXBPS 0x00000004
178 #define LDP_RESOURCE_CFG_MEANBPS 0x00000008
179 #define LDP_RESOURCE_CFG_BURSTSIZE 0x00000010
181 #define LDP_RESOURCE_CFG_WHEN_DOWN (LDP_CFG_DEL|\
182 LDP_RESOURCE_CFG_MAXBPS|\
183 LDP_RESOURCE_CFG_MEANBPS|\
184 LDP_RESOURCE_CFG_BURSTSIZE)
186 #define LDP_HOP_CFG_INDEX 0x00000002
187 #define LDP_HOP_CFG_LIST_INDEX 0x00000004
188 #define LDP_HOP_CFG_PATH_OPTION 0x00000008
189 #define LDP_HOP_CFG_ADDR 0x00000010
190 #define LDP_HOP_CFG_TYPE 0x00000020
192 #define LDP_HOP_CFG_WHEN_DOWN (LDP_CFG_DEL|\
193 LDP_HOP_CFG_INDEX|\
194 LDP_HOP_CFG_LIST_INDEX|\
195 LDP_HOP_CFG_ADDR|\
196 LDP_HOP_CFG_TYPE)
198 extern mpls_cfg_handle ldp_cfg_open(mpls_instance_handle data);
199 extern void ldp_cfg_close(mpls_cfg_handle handle);
201 extern mpls_return_enum ldp_cfg_global_get(mpls_cfg_handle handle, ldp_global * g,
202 uint32_t flag);
203 extern mpls_return_enum ldp_cfg_global_set(mpls_cfg_handle handle, ldp_global * g,
204 uint32_t flag);
206 extern mpls_return_enum ldp_cfg_entity_get(mpls_cfg_handle handle, ldp_entity * e,
207 uint32_t flag);
208 extern mpls_return_enum ldp_cfg_entity_getnext(mpls_cfg_handle handle,
209 ldp_entity * e, uint32_t flag);
210 extern mpls_return_enum ldp_cfg_entity_test(mpls_cfg_handle handle,
211 ldp_entity * e, uint32_t flag);
212 extern mpls_return_enum ldp_cfg_entity_set(mpls_cfg_handle handle, ldp_entity * e, uint32_t flag);
213 extern mpls_return_enum ldp_cfg_entity_adj_getnext(mpls_cfg_handle handle,
214 ldp_entity * e);
216 extern mpls_return_enum ldp_cfg_attr_get(mpls_cfg_handle handle, ldp_attr * a,
217 uint32_t flag);
218 extern mpls_return_enum ldp_cfg_attr_getnext(mpls_cfg_handle handle, ldp_attr * a,
219 uint32_t flag);
221 extern mpls_return_enum ldp_cfg_peer_get(mpls_cfg_handle handle, ldp_peer * p,
222 uint32_t flag);
223 extern mpls_return_enum ldp_cfg_peer_getnext(mpls_cfg_handle handle, ldp_peer * p,
224 uint32_t flag);
225 extern mpls_return_enum ldp_cfg_peer_test(mpls_cfg_handle handle, ldp_peer * p,
226 uint32_t flag);
227 extern mpls_return_enum ldp_cfg_peer_set(mpls_cfg_handle handle, ldp_peer * p,
228 uint32_t flag);
230 extern mpls_return_enum ldp_cfg_if_get(mpls_cfg_handle handle, ldp_if * i,
231 uint32_t flag);
232 extern mpls_return_enum ldp_cfg_if_getnext(mpls_cfg_handle handle, ldp_if * i,
233 uint32_t flag);
234 extern mpls_return_enum ldp_cfg_if_test(mpls_cfg_handle handle, ldp_if * i,
235 uint32_t flag);
236 extern mpls_return_enum ldp_cfg_if_set(mpls_cfg_handle handle, ldp_if * i,
237 uint32_t flag);
239 extern mpls_return_enum ldp_cfg_labelrange_get(mpls_cfg_handle handle,
240 mpls_range * r, uint32_t flag);
241 extern mpls_return_enum ldp_cfg_labelrange_test(mpls_cfg_handle handle,
242 mpls_range * r, uint32_t flag);
243 extern mpls_return_enum ldp_cfg_labelrange_set(mpls_cfg_handle handle,
244 mpls_range * r, uint32_t flag);
246 extern mpls_return_enum ldp_cfg_adj_get(mpls_cfg_handle handle, ldp_adj * a,
247 uint32_t flag);
248 extern mpls_return_enum ldp_cfg_adj_getnext(mpls_cfg_handle handle, ldp_adj * a,
249 uint32_t flag);
250 extern mpls_return_enum ldp_cfg_adj_entity_getnext(mpls_cfg_handle handle,
251 ldp_adj * a);
253 extern mpls_return_enum ldp_cfg_session_get(mpls_cfg_handle handle,
254 ldp_session * s, uint32_t flag);
255 extern mpls_return_enum ldp_cfg_session_getnext(mpls_cfg_handle handle,
256 ldp_session * s, uint32_t flag);
258 extern mpls_return_enum ldp_cfg_session_raddr_get(mpls_cfg_handle handle,
259 ldp_session * s, ldp_addr * a, uint32_t flag);
260 extern mpls_return_enum ldp_cfg_session_raddr_getnext(mpls_cfg_handle handle,
261 ldp_session * s, ldp_addr * a, uint32_t flag);
263 extern mpls_return_enum ldp_cfg_inlabel_get(mpls_cfg_handle handle,
264 ldp_inlabel * i, uint32_t flag);
265 mpls_return_enum ldp_cfg_inlabel_getnext(mpls_cfg_handle handle, ldp_inlabel * i,
266 uint32_t flag);
267 extern mpls_return_enum ldp_cfg_outlabel_get(mpls_cfg_handle handle,
268 ldp_outlabel * o, uint32_t flag);
269 mpls_return_enum ldp_cfg_outlabel_getnext(mpls_cfg_handle handle,
270 ldp_outlabel * o, uint32_t flag);
272 extern mpls_return_enum ldp_cfg_range_set(mpls_cfg_handle handle, mpls_range * r,
273 uint32_t flag);
274 extern mpls_return_enum ldp_cfg_range_test(mpls_cfg_handle handle, mpls_range * r,
275 uint32_t flag);
276 extern mpls_return_enum ldp_cfg_range_get(mpls_cfg_handle handle, mpls_range * r,
277 uint32_t flag);
279 extern mpls_return_enum ldp_cfg_tunnel_set(mpls_cfg_handle handle, ldp_tunnel * r,
280 uint32_t flag);
281 extern mpls_return_enum ldp_cfg_tunnel_test(mpls_cfg_handle handle,
282 ldp_tunnel * r, uint32_t flag);
283 extern mpls_return_enum ldp_cfg_tunnel_get(mpls_cfg_handle handle, ldp_tunnel * r,
284 uint32_t flag);
286 extern mpls_return_enum ldp_cfg_resource_set(mpls_cfg_handle handle,
287 ldp_resource * r, uint32_t flag);
288 extern mpls_return_enum ldp_cfg_resource_test(mpls_cfg_handle handle,
289 ldp_resource * r, uint32_t flag);
290 extern mpls_return_enum ldp_cfg_resource_get(mpls_cfg_handle handle,
291 ldp_resource * r, uint32_t flag);
293 extern mpls_return_enum ldp_cfg_hop_set(mpls_cfg_handle handle, ldp_hop * r,
294 uint32_t flag);
295 extern mpls_return_enum ldp_cfg_hop_test(mpls_cfg_handle handle, ldp_hop * r,
296 uint32_t flag);
297 extern mpls_return_enum ldp_cfg_hop_get(mpls_cfg_handle handle, ldp_hop * r,
298 uint32_t flag);
300 #endif