]> git.proxmox.com Git - mirror_frr.git/blob - isisd/isis_redist.h
Merge pull request #12818 from imzyxwvu/fix/other-table-inactive
[mirror_frr.git] / isisd / isis_redist.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * IS-IS Rout(e)ing protocol - isis_redist.h
4 *
5 * Copyright (C) 2013-2015 Christian Franke <chris@opensourcerouting.org>
6 */
7
8 #ifndef ISIS_REDIST_H
9 #define ISIS_REDIST_H
10
11 #define REDIST_PROTOCOL_COUNT 2
12
13 #define DEFAULT_ROUTE ZEBRA_ROUTE_MAX
14 #define DEFAULT_ORIGINATE 1
15 #define DEFAULT_ORIGINATE_ALWAYS 2
16
17 struct isis_ext_info {
18 int origin;
19 uint32_t metric;
20 uint8_t distance;
21 route_tag_t tag;
22 };
23
24 struct isis_redist {
25 int redist;
26 uint32_t metric;
27 char *map_name;
28 struct route_map *map;
29 };
30
31 struct isis;
32 struct isis_area;
33 struct prefix;
34 struct prefix_ipv6;
35 struct vty;
36
37 afi_t afi_for_redist_protocol(int protocol);
38
39 struct route_table *get_ext_reach(struct isis_area *area, int family,
40 int level);
41 void isis_redist_add(struct isis *isis, int type, struct prefix *p,
42 struct prefix_ipv6 *src_p, uint8_t distance,
43 uint32_t metric, route_tag_t tag);
44 void isis_redist_delete(struct isis *isis, int type, struct prefix *p,
45 struct prefix_ipv6 *src_p);
46 int isis_redist_config_write(struct vty *vty, struct isis_area *area,
47 int family);
48 void isis_redist_init(void);
49 void isis_redist_area_finish(struct isis_area *area);
50
51 void isis_redist_set(struct isis_area *area, int level, int family, int type,
52 uint32_t metric, const char *routemap, int originate_type);
53 void isis_redist_unset(struct isis_area *area, int level, int family, int type);
54
55 void isis_redist_free(struct isis *isis);
56 #endif