]> git.proxmox.com Git - mirror_frr.git/blob - isisd/isis_mt.h
isisd: add MT configuration
[mirror_frr.git] / isisd / isis_mt.h
1 /*
2 * IS-IS Rout(e)ing protocol - Multi Topology Support
3 *
4 * Copyright (C) 2017 Christian Franke
5 *
6 * This file is part of FreeRangeRouting (FRR)
7 *
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
11 * later version.
12 *
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.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with FRR; see the file COPYING. If not, write to the Free
20 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
22 */
23 #ifndef ISIS_MT_H
24 #define ISIS_MT_H
25
26 #define ISIS_MT_IPV4_UNICAST 0
27 #define ISIS_MT_IPV4_MGMT 1
28 #define ISIS_MT_IPV6_UNICAST 2
29 #define ISIS_MT_IPV4_MULTICAST 3
30 #define ISIS_MT_IPV6_MULTICAST 4
31 #define ISIS_MT_IPV6_MGMT 5
32
33 #define ISIS_MT_NAMES \
34 "<ipv4-unicast" \
35 "|ipv4-mgmt" \
36 "|ipv6-unicast" \
37 "|ipv4-multicast" \
38 "|ipv6-multicast" \
39 "|ipv6-mgmt" \
40 ">"
41
42 #define ISIS_MT_DESCRIPTIONS \
43 "IPv4 unicast topology\n" \
44 "IPv4 management topology\n" \
45 "IPv6 unicast topology\n" \
46 "IPv4 multicast topology\n" \
47 "IPv6 multicast topology\n" \
48 "IPv6 management topology\n"
49
50 #define ISIS_MT_INFO_FIELDS \
51 uint16_t mtid;
52
53 struct isis_area_mt_setting {
54 ISIS_MT_INFO_FIELDS
55 bool enabled;
56 bool overload;
57 };
58
59 struct isis_circuit_mt_setting {
60 ISIS_MT_INFO_FIELDS
61 bool enabled;
62 };
63
64 const char *isis_mtid2str(uint16_t mtid);
65 uint16_t isis_str2mtid(const char *name);
66
67 struct isis_area;
68 struct isis_circuit;
69
70 struct isis_area_mt_setting* area_lookup_mt_setting(struct isis_area *area,
71 uint16_t mtid);
72 struct isis_area_mt_setting* area_new_mt_setting(struct isis_area *area,
73 uint16_t mtid);
74 void area_add_mt_setting(struct isis_area *area,
75 struct isis_area_mt_setting *setting);
76
77 void area_mt_init(struct isis_area *area);
78 void area_mt_finish(struct isis_area *area);
79 struct isis_area_mt_setting* area_get_mt_setting(struct isis_area *area,
80 uint16_t mtid);
81 int area_write_mt_settings(struct isis_area *area, struct vty *vty);
82
83 struct isis_circuit_mt_setting* circuit_lookup_mt_setting(
84 struct isis_circuit *circuit,
85 uint16_t mtid);
86 struct isis_circuit_mt_setting* circuit_new_mt_setting(
87 struct isis_circuit *circuit,
88 uint16_t mtid);
89 void circuit_add_mt_setting(struct isis_circuit *circuit,
90 struct isis_circuit_mt_setting *setting);
91 void circuit_mt_init(struct isis_circuit *circuit);
92 void circuit_mt_finish(struct isis_circuit *circuit);
93 struct isis_circuit_mt_setting* circuit_get_mt_setting(
94 struct isis_circuit *circuit,
95 uint16_t mtid);
96 int circuit_write_mt_settings(struct isis_circuit *circuit, struct vty *vty);
97 #endif