]>
git.proxmox.com Git - mirror_frr.git/blob - isisd/isis_mt.h
95aa99dba0bd6be1b87be4bb9028020b24512e70
2 * IS-IS Rout(e)ing protocol - Multi Topology Support
4 * Copyright (C) 2017 Christian Franke
6 * This file is part of FreeRangeRouting (FRR)
8 * FRR is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
13 * FRR is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #define ISIS_MT_MASK 0x0fff
26 #define ISIS_MT_OL_MASK 0x8000
27 #define ISIS_MT_AT_MASK 0x4000
29 #define ISIS_MT_IPV4_UNICAST 0
30 #define ISIS_MT_IPV4_MGMT 1
31 #define ISIS_MT_IPV6_UNICAST 2
32 #define ISIS_MT_IPV4_MULTICAST 3
33 #define ISIS_MT_IPV6_MULTICAST 4
34 #define ISIS_MT_IPV6_MGMT 5
36 #define ISIS_MT_NAMES \
45 #define ISIS_MT_DESCRIPTIONS \
46 "IPv4 unicast topology\n" \
47 "IPv4 management topology\n" \
48 "IPv6 unicast topology\n" \
49 "IPv4 multicast topology\n" \
50 "IPv6 multicast topology\n" \
51 "IPv6 management topology\n"
53 #define ISIS_MT_INFO_FIELDS uint16_t mtid;
57 struct isis_area_mt_setting
{
63 struct isis_circuit_mt_setting
{
68 const char *isis_mtid2str(uint16_t mtid
);
69 uint16_t isis_str2mtid(const char *name
);
71 struct isis_adjacency
;
78 uint16_t isis_area_ipv6_topology(struct isis_area
*area
);
80 struct isis_area_mt_setting
*area_lookup_mt_setting(struct isis_area
*area
,
82 struct isis_area_mt_setting
*area_new_mt_setting(struct isis_area
*area
,
84 void area_add_mt_setting(struct isis_area
*area
,
85 struct isis_area_mt_setting
*setting
);
87 void area_mt_init(struct isis_area
*area
);
88 void area_mt_finish(struct isis_area
*area
);
89 struct isis_area_mt_setting
*area_get_mt_setting(struct isis_area
*area
,
91 int area_write_mt_settings(struct isis_area
*area
, struct vty
*vty
);
92 bool area_is_mt(struct isis_area
*area
);
93 struct isis_area_mt_setting
**area_mt_settings(struct isis_area
*area
,
94 unsigned int *mt_count
);
96 struct isis_circuit_mt_setting
*
97 circuit_lookup_mt_setting(struct isis_circuit
*circuit
, uint16_t mtid
);
98 struct isis_circuit_mt_setting
*
99 circuit_new_mt_setting(struct isis_circuit
*circuit
, uint16_t mtid
);
100 void circuit_add_mt_setting(struct isis_circuit
*circuit
,
101 struct isis_circuit_mt_setting
*setting
);
102 void circuit_mt_init(struct isis_circuit
*circuit
);
103 void circuit_mt_finish(struct isis_circuit
*circuit
);
104 struct isis_circuit_mt_setting
*
105 circuit_get_mt_setting(struct isis_circuit
*circuit
, uint16_t mtid
);
106 int circuit_write_mt_settings(struct isis_circuit
*circuit
, struct vty
*vty
);
107 struct isis_circuit_mt_setting
**
108 circuit_mt_settings(struct isis_circuit
*circuit
, unsigned int *mt_count
);
109 bool tlvs_to_adj_mt_set(struct isis_tlvs
*tlvs
, bool v4_usable
, bool v6_usable
,
110 struct isis_adjacency
*adj
);
111 bool adj_has_mt(struct isis_adjacency
*adj
, uint16_t mtid
);
112 void adj_mt_finish(struct isis_adjacency
*adj
);
113 void tlvs_add_mt_bcast(struct isis_tlvs
*tlvs
, struct isis_circuit
*circuit
,
114 int level
, uint8_t *id
, uint32_t metric
,
115 uint8_t *subtlvs
, uint8_t subtlv_len
);
116 void tlvs_add_mt_p2p(struct isis_tlvs
*tlvs
, struct isis_circuit
*circuit
,
117 uint8_t *id
, uint32_t metric
, uint8_t *subtlvs
,