]>
Commit | Line | Data |
---|---|---|
c2cf4b02 DS |
1 | /* |
2 | * PIM for FRR - PIM Instance | |
3 | * Copyright (C) 2017 Cumulus Networks, Inc. | |
4 | * Donald Sharp | |
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_INSTANCE_H__ | |
22 | #define __PIM_INSTANCE_H__ | |
23 | ||
24 | extern struct pim_instance *pimg; // Pim Global Instance | |
25 | ||
26 | enum pim_spt_switchover { | |
27 | PIM_SPT_IMMEDIATE, | |
28 | PIM_SPT_INFINITY, | |
29 | }; | |
30 | ||
31 | /* Per VRF PIM DB */ | |
32 | struct pim_instance { | |
33 | vrf_id_t vrf_id; | |
34 | struct vrf *vrf; | |
35 | ||
36 | struct { | |
37 | enum pim_spt_switchover switchover; | |
38 | char *plist; | |
39 | } spt; | |
40 | ||
41 | struct hash *rpf_hash; | |
42 | ||
43 | void *ssm_info; /* per-vrf SSM configuration */ | |
44 | ||
45 | int send_v6_secondary; | |
46 | ||
47 | struct thread *thread; | |
48 | int mroute_socket; | |
49 | int64_t mroute_socket_creation; | |
50 | int64_t mroute_add_events; | |
51 | int64_t mroute_add_last; | |
52 | int64_t mroute_del_events; | |
53 | int64_t mroute_del_last; | |
54 | ||
55 | struct interface *regiface; | |
4e0bc0f0 DS |
56 | |
57 | // List of static routes; | |
58 | struct list *static_routes; | |
c2cf4b02 DS |
59 | }; |
60 | ||
61 | void pim_vrf_init(void); | |
62 | void pim_vrf_terminate(void); | |
63 | ||
64 | struct pim_instance *pim_get_pim_instance(vrf_id_t vrf_id); | |
65 | ||
66 | #endif |