]>
git.proxmox.com Git - mirror_frr.git/blob - isisd/isis_routemap.c
2 * IS-IS Rout(e)ing protocol - isis_routemap.c
4 * Copyright (C) 2001,2002 Sampo Saaristo
5 * Tampere University of Technology
6 * Institute of Communications Engineering
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public Licenseas published by the Free
11 * Software Foundation; either version 2 of the License, or (at your option)
14 * This program is distributed in the hope that it will be useful,but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 #include "isis_constants.h"
39 #include "isis_common.h"
42 #include "isis_misc.h"
43 #include "isis_adjacency.h"
44 #include "isis_circuit.h"
49 #include "isis_route.h"
50 #include "isis_zebra.h"
52 extern struct isis
*isis
;
55 isis_route_map_upd (const char *name
)
62 for (i
= 0; i
<= ZEBRA_ROUTE_MAX
; i
++)
64 if (isis
->rmap
[i
].name
)
65 isis
->rmap
[i
].map
= isis
->rmap
[i
].map
=
66 route_map_lookup_by_name (isis
->rmap
[i
].name
);
68 isis
->rmap
[i
].map
= NULL
;
70 /* FIXME: do the address family sub-mode AF_INET6 here ? */
74 isis_route_map_event (route_map_event_t event
, const char *name
)
81 for (type
= 0; type
<= ZEBRA_ROUTE_MAX
; type
++)
83 if (isis
->rmap
[type
].name
&& isis
->rmap
[type
].map
&&
84 !strcmp (isis
->rmap
[type
].name
, name
))
86 isis_distribute_list_update (type
);
92 isis_route_map_init (void)
95 route_map_init_vty ();
97 route_map_add_hook (isis_route_map_upd
);
98 route_map_delete_hook (isis_route_map_upd
);
99 route_map_event_hook (isis_route_map_event
);