]>
git.proxmox.com Git - mirror_frr.git/blob - isisd/isis_te.h
2 * IS-IS Rout(e)ing protocol - isis_te.c
4 * This is an implementation of RFC5305, RFC 5307 and RFC 7810
6 * Author: Olivier Dugeon <olivier.dugeon@orange.com>
8 * Copyright (C) 2014 - 2019 Orange Labs http://www.orange.com
10 * This file is part of GNU Zebra.
12 * GNU Zebra is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2, or (at your option) any
17 * GNU Zebra is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with this program; see the file COPYING; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 #ifndef _ZEBRA_ISIS_MPLS_TE_H
28 #define _ZEBRA_ISIS_MPLS_TE_H
31 * Traffic Engineering information are transport through LSP:
32 * - Extended IS Reachability TLV = 22
33 * - Traffic Engineering Router ID TLV = 134
34 * - Extended IP Reachability TLV = 135
35 * - Inter-AS Reachability Information TLV = 141
37 * and support following sub-TLV:
40 * _________________________________________________
41 * Administartive group (color) 3 RFC5305
42 * Link Local/Remote Identifiers 4 RFC5307
43 * IPv4 interface address 6 RFC5305
44 * IPv4 neighbor address 8 RFC5305
45 * Maximum link bandwidth 9 RFC5305
46 * Reservable link bandwidth 10 RFC5305
47 * Unreserved bandwidth 11 RFC5305
48 * TE Default metric 18 RFC5305
49 * Link Protection Type 20 RFC5307
50 * Interface Switching Capability 21 RFC5307
51 * Remote AS number 24 RFC5316
52 * IPv4 Remote ASBR identifier 25 RFC5316
54 * NOTE: RFC5316 is not fully supported in this version
55 * only subTLVs decoding is provided
58 /* Following define the type of TE link regarding the various RFC */
67 #define IS_STD_TE(x) (x & STD_TE)
68 #define IS_INTER_AS(x) (x & INTER_AS)
69 #define IS_EMULATED(x) (x & EMULATED)
70 #define IS_FLOOD_L1(x) (x & FLOOD_L1)
71 #define IS_FLOOD_L2(x) (x & FLOOD_L2)
72 #define IS_FLOOD_AS(x) (x & FLOOD_AS)
73 #define IS_INTER_AS_EMU(x) (x & INTER_AS & EMULATED)
74 #define IS_INTER_AS_AS(x) (x & INTER_AS & FLOOD_AS)
77 * Note (since release 7.2), subTLVs definition, serialization
78 * and de-serialization have mode to isis_tlvs.[c,h]
81 /* Following declaration concerns the MPLS-TE and LINk-TE management */
82 typedef enum _status_t
{ disable
, enable
, learn
} status_t
;
84 /* Mode for Inter-AS LSP */ /* TODO: Check how if LSP is flooded in RFC5316 */
85 typedef enum _interas_mode_t
{ off
, region
, as
, emulate
} interas_mode_t
;
87 #define IS_EXT_TE(e) (e && e->status != 0 \
88 && e->status != EXT_ADJ_SID \
89 && e->status != EXT_LAN_ADJ_SID)
90 #define IS_MPLS_TE(a) (a && a->status == enable)
92 /* Per area MPLS-TE parameters */
94 /* Status of MPLS-TE: enable or disable */
97 /* L1, L1-L2, L2-Only */
101 interas_mode_t inter_as
;
102 struct in_addr interas_areaid
;
104 /* MPLS_TE router ID */
105 struct in_addr router_id
;
109 void isis_mpls_te_init(void);
110 void isis_link_params_update(struct isis_circuit
*, struct interface
*);
111 int isis_mpls_te_update(struct interface
*);
113 #endif /* _ZEBRA_ISIS_MPLS_TE_H */