]>
git.proxmox.com Git - mirror_frr.git/blob - pimd/pim_routemap.c
721e96c01cbce03463e7ef658727a807bedec9c6
2 * Copyright (C) 2016 Cumulus Networks <sharpd@cumulusnetworks.com>
3 * Copyright (C) 1999 Kunihiro Ishiguro <kunihiro@zebra.org>
5 * This file is part of Quagga
7 * Quagga is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
12 * Quagga is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Quagga; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31 static void pim_route_map_mark_update(const char *rmap_name
)
37 static void pim_route_map_add(const char *rmap_name
)
39 if (route_map_mark_updated(rmap_name
, 0) == 0)
40 pim_route_map_mark_update(rmap_name
);
42 route_map_notify_dependencies(rmap_name
, RMAP_EVENT_MATCH_ADDED
);
45 static void pim_route_map_delete(const char *rmap_name
)
47 if (route_map_mark_updated(rmap_name
, 1) == 0)
48 pim_route_map_mark_update(rmap_name
);
50 route_map_notify_dependencies(rmap_name
, RMAP_EVENT_MATCH_DELETED
);
53 static void pim_route_map_event(route_map_event_t event
, const char *rmap_name
)
55 if (route_map_mark_updated(rmap_name
, 0) == 0)
56 pim_route_map_mark_update(rmap_name
);
58 route_map_notify_dependencies(rmap_name
, RMAP_EVENT_MATCH_ADDED
);
61 void pim_route_map_init(void)
65 route_map_add_hook(pim_route_map_add
);
66 route_map_delete_hook(pim_route_map_delete
);
67 route_map_event_hook(pim_route_map_event
);
70 void pim_route_map_terminate(void)
72 route_map_add_hook(NULL
);
73 route_map_delete_hook(NULL
);
74 route_map_event_hook(NULL
);