]> git.proxmox.com Git - mirror_frr.git/blob - pimd/pim_neighbor.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / pimd / pim_neighbor.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * PIM for Quagga
4 * Copyright (C) 2008 Everton da Silva Marques
5 */
6
7 #ifndef PIM_NEIGHBOR_H
8 #define PIM_NEIGHBOR_H
9
10 #include <zebra.h>
11
12 #include "if.h"
13 #include "linklist.h"
14 #include "prefix.h"
15
16 #include "pim_tlv.h"
17 #include "pim_iface.h"
18 #include "pim_str.h"
19
20 struct pim_neighbor {
21 int64_t creation; /* timestamp of creation */
22 pim_addr source_addr;
23 pim_hello_options hello_options;
24 uint16_t holdtime;
25 uint16_t propagation_delay_msec;
26 uint16_t override_interval_msec;
27 uint32_t dr_priority;
28 uint32_t generation_id;
29 struct list *prefix_list; /* list of struct prefix */
30 struct thread *t_expire_timer;
31 struct interface *interface;
32
33 struct thread *jp_timer;
34 struct list *upstream_jp_agg;
35 struct bfd_session_params *bfd_session;
36 };
37
38 void pim_neighbor_timer_reset(struct pim_neighbor *neigh, uint16_t holdtime);
39 void pim_neighbor_free(struct pim_neighbor *neigh);
40 struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
41 pim_addr source_addr);
42 struct pim_neighbor *pim_neighbor_find_by_secondary(struct interface *ifp,
43 struct prefix *src);
44 struct pim_neighbor *pim_neighbor_find_if(struct interface *ifp);
45
46
47 #define PIM_NEIGHBOR_SEND_DELAY 0
48 #define PIM_NEIGHBOR_SEND_NOW 1
49 struct pim_neighbor *
50 pim_neighbor_add(struct interface *ifp, pim_addr source_addr,
51 pim_hello_options hello_options, uint16_t holdtime,
52 uint16_t propagation_delay, uint16_t override_interval,
53 uint32_t dr_priority, uint32_t generation_id,
54 struct list *addr_list, int send_hello_now);
55 void pim_neighbor_delete(struct interface *ifp, struct pim_neighbor *neigh,
56 const char *delete_message);
57 void pim_neighbor_delete_all(struct interface *ifp, const char *delete_message);
58 void pim_neighbor_update(struct pim_neighbor *neigh,
59 pim_hello_options hello_options, uint16_t holdtime,
60 uint32_t dr_priority, struct list *addr_list);
61 struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh,
62 struct prefix *addr);
63 int pim_if_dr_election(struct interface *ifp);
64
65 #endif /* PIM_NEIGHBOR_H */