]>
Commit | Line | Data |
---|---|---|
1bc98276 CS |
1 | /* |
2 | * PIM for Quagga | |
3 | * Copyright (C) 2017 Cumulus Networks, Inc. | |
4 | * Chirag Shah | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, but | |
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | * General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; see the file COPYING; if not, write to the | |
18 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | |
19 | * MA 02110-1301 USA | |
20 | */ | |
21 | #ifndef PIM_NHT_H | |
22 | #define PIM_NHT_H | |
23 | ||
24 | #include "prefix.h" | |
25 | #include <zebra.h> | |
26 | #include "zclient.h" | |
27 | #include "vrf.h" | |
28 | ||
29 | #include "pimd.h" | |
30 | #include "pim_rp.h" | |
31 | #include "pim_rpf.h" | |
32 | ||
33 | /* PIM nexthop cache value structure. */ | |
34 | struct pim_nexthop_cache | |
35 | { | |
36 | struct pim_rpf rpf; | |
37 | /* IGP route's metric. */ | |
38 | u_int32_t metric; | |
39 | uint32_t distance; | |
40 | /* Nexthop number and nexthop linked list. */ | |
41 | u_char nexthop_num; | |
42 | struct nexthop *nexthop; | |
43 | int64_t last_update; | |
44 | u_int16_t flags; | |
45 | #define PIM_NEXTHOP_VALID (1 << 0) | |
46 | ||
47 | struct list *rp_list; | |
48 | struct list *upstream_list; | |
49 | }; | |
50 | ||
8cb129e9 DS |
51 | int pim_parse_nexthop_update (int command, struct zclient *zclient, |
52 | zebra_size_t length, vrf_id_t vrf_id); | |
1bc98276 CS |
53 | int pim_find_or_track_nexthop (struct prefix *addr, struct pim_upstream *up, |
54 | struct rp_info *rp); | |
55 | void pim_delete_tracked_nexthop (struct prefix *addr, struct pim_upstream *up, | |
56 | struct rp_info *rp); | |
57 | struct pim_nexthop_cache *pim_nexthop_cache_add (struct pim_rpf *rpf_addr); | |
58 | struct pim_nexthop_cache *pim_nexthop_cache_find (struct pim_rpf *rpf); | |
59 | ||
60 | #endif |