This file should have been deleted what ldp-portable was
[mpls-ldp-portable.git] / lsr / lsr_struct.h
blob2031a096bf8196ffa585e8f91a1fe2384c9a6e0c
1 /*
2 * Copyright (C) James R. Leu 2002
3 * jleu@mindspring.com
5 * This software is covered under the LGPL, for more
6 * info check out http://www.gnu.org/copyleft/lgpl.html
7 */
9 #ifndef _LSR_STRUCT_H_
10 #define _LSR_STRUCT_H_
12 #include "mpls_list.h"
13 #include "mpls_refcnt.h"
14 #include "mpls_struct.h"
15 #include "lsr_handle_type.h"
17 MPLS_LIST_ROOT(lsr_outsegment_list, lsr_outsegment);
18 MPLS_LIST_ROOT(lsr_insegment_list, lsr_insegment);
19 MPLS_LIST_ROOT(lsr_xconnect_list, lsr_xconnect);
20 MPLS_LIST_ROOT(lsr_ftn_list, lsr_ftn);
21 MPLS_LIST_ROOT(lsr_if_list, lsr_if);
23 typedef enum {
24 LSR_TRACE_FLAG_INSEGMENT = 0x00000001,
25 LSR_TRACE_FLAG_OUTSEGMENT = 0x00000002,
26 LSR_TRACE_FLAG_XCONNECT = 0x00000003
27 } lsr_trace_flags;
29 #include "lsr_defaults.h"
30 #include "mpls_handle_type.h"
32 typedef struct lsr_insegment {
33 MPLS_REFCNT_FIELD;
34 MPLS_LIST_ELEM(lsr_outsegment) _outsegment;
35 MPLS_LIST_ELEM(lsr_insegment) _global;
36 struct lsr_xconnect_list xconnect_root;
38 uint32_t index;
39 struct mpls_insegment info;
41 } lsr_insegment;
43 typedef struct lsr_outsegment {
44 MPLS_REFCNT_FIELD;
45 MPLS_LIST_ELEM(lsr_outsegment) _global;
46 MPLS_LIST_ELEM(lsr_outsegment) _if;
47 struct lsr_xconnect_list xconnect_root;
48 struct lsr_ftn_list ftn_root;
50 uint32_t index;
51 struct mpls_outsegment info;
52 struct lsr_if *iff;
54 /* only valid in sets and gets */
55 uint32_t if_index;
56 } lsr_outsegment;
58 typedef struct lsr_xconnect {
59 MPLS_REFCNT_FIELD;
60 MPLS_LIST_ELEM(lsr_xconnect) _outsegment;
61 MPLS_LIST_ELEM(lsr_xconnect) _insegment;
62 MPLS_LIST_ELEM(lsr_xconnect) _global;
64 uint32_t index;
65 struct mpls_xconnect info;
66 struct lsr_outsegment *outsegment;
67 struct lsr_insegment *insegment;
69 /* only valid in sets and gets */
70 uint32_t outsegment_index;
71 uint32_t insegment_index;
72 } lsr_xconnect;
74 typedef struct lsr_ftn {
75 MPLS_REFCNT_FIELD;
76 MPLS_LIST_ELEM(lsr_ftn) _outsegment;
77 MPLS_LIST_ELEM(lsr_ftn) _global;
79 uint32_t index;
80 mpls_fec fec;
81 struct lsr_outsegment *outsegment;
83 /* only valid in sets and gets */
84 uint32_t outsegment_index;
85 } lsr_ftn;
87 typedef struct lsr_if {
88 MPLS_REFCNT_FIELD;
89 MPLS_LIST_ELEM(lsr_if) _global;
90 struct lsr_outsegment_list outsegment_root;
92 uint32_t index;
93 char name[MPLS_MAX_IF_NAME];
94 mpls_oper_state_enum oper_state;
95 mpls_if_handle handle;
97 } lsr_if;
99 typedef struct lsr_global {
100 struct lsr_outsegment_list outsegment;
101 struct lsr_insegment_list insegment;
102 struct lsr_xconnect_list xconnect;
103 struct lsr_ftn_list ftn;
104 struct lsr_if_list iff;
106 mpls_lock_handle global_lock;
107 mpls_instance_handle user_data;
109 mpls_ifmgr_handle ifmgr_handle;
110 mpls_mpls_handle mpls_handle;
112 mpls_admin_state_enum admin_state;
113 } lsr_global;
115 #endif