3 * Copyright (C) James R. Leu 2002
6 * This software is covered under the LGPL, for more
7 * info check out http://www.gnu.org/copyleft/lgpl.html
10 #ifndef _MPLS_STRUCT_H_
11 #define _MPLS_STRUCT_H_
13 #define MPLS_MAX_IF_NAME 16
14 #define MPLS_MAX_LABELSTACK 4
16 #include "mpls_handle_type.h"
37 } mpls_oper_state_enum
;
40 MPLS_TIMER_ONESHOT
= 1,
41 MPLS_TIMER_REOCCURRING
,
42 } mpls_timer_type_enum
;
49 } mpls_time_unit_enum
;
52 MPLS_ADMIN_ENABLE
= 1,
54 } mpls_admin_state_enum
;
57 MPLS_LABEL_RANGE_GENERIC
= 1,
58 MPLS_LABEL_RANGE_ATM_VP
,
59 MPLS_LABEL_RANGE_ATM_VC
,
60 MPLS_LABEL_RANGE_ATM_VP_VC
,
61 MPLS_LABEL_RANGE_FR_10
,
62 MPLS_LABEL_RANGE_FR_24
63 } mpls_label_range_type
;
67 MPLS_LABEL_TYPE_GENERIC
,
78 MPLS_SOCKET_UDP_DATA
= 1,
79 MPLS_SOCKET_TCP_LISTEN
,
80 MPLS_SOCKET_TCP_CONNECT
,
82 MPLS_SOCKET_ROUTE_UPDATE
,
86 MPLS_SOCKOP_NONBLOCK
= 0x1,
87 MPLS_SOCKOP_REUSE
= 0x2,
88 } mpls_socket_option_type
;
91 MPLS_TRACE_STATE_SEND
,
92 MPLS_TRACE_STATE_RECV
,
103 typedef struct mpls_label_struct
{
104 mpls_label_type type
;
118 typedef enum mpls_family_enum
{
124 typedef struct mpls_inet_addr
{
125 enum mpls_family_enum type
;
132 typedef struct mpls_dest
{
133 struct mpls_inet_addr addr
;
135 mpls_if_handle if_handle
;
138 typedef struct mpls_range
{
140 mpls_label_range_type type
;
141 struct mpls_label_struct min
, max
;
144 typedef enum mpls_nexthop_enum
{
148 MPLS_NH_OUTSEGMENT
= 0x4
151 typedef enum mpls_fec_enum
{
158 typedef struct mpls_nexthop
{
163 struct mpls_inet_addr ip
;
164 mpls_if_handle if_handle
;
165 mpls_outsegment_handle outsegment_handle
;
168 typedef struct mpls_fec
{
169 enum mpls_fec_enum type
;
172 struct mpls_inet_addr network
;
175 struct mpls_inet_addr host
;
177 uint32_t connection_id
;
182 struct mpls_nexthop nh
;
185 typedef struct mpls_insegment
{
186 struct mpls_label_struct label
;
190 mpls_insegment_handle handle
;
191 mpls_owners_enum owner
;
194 typedef struct mpls_outsegment
{
195 struct mpls_label_struct label
;
196 mpls_bool push_label
;
197 struct mpls_nexthop nexthop
;
198 mpls_outsegment_handle handle
;
199 mpls_owners_enum owner
;
202 typedef struct mpls_xconnect
{
205 struct mpls_label_struct stack
[MPLS_MAX_LABELSTACK
];
206 mpls_bool is_persistent
;
207 mpls_xconnect_handle handle
;
208 mpls_owners_enum owner
;
211 typedef void *mpls_cfg_handle
;