]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
12e41d03 | 2 | /* |
896014f4 DL |
3 | * PIM for Quagga |
4 | * Copyright (C) 2008 Everton da Silva Marques | |
896014f4 | 5 | */ |
12e41d03 DL |
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" | |
bce0e645 | 14 | #include "prefix.h" |
12e41d03 DL |
15 | |
16 | #include "pim_tlv.h" | |
e34e07e6 | 17 | #include "pim_iface.h" |
ca7613e2 | 18 | #include "pim_str.h" |
12e41d03 DL |
19 | |
20 | struct pim_neighbor { | |
d62a17ae | 21 | int64_t creation; /* timestamp of creation */ |
ca7613e2 | 22 | pim_addr source_addr; |
d62a17ae | 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 */ | |
e6685141 | 30 | struct event *t_expire_timer; |
d62a17ae | 31 | struct interface *interface; |
982bff89 | 32 | |
e6685141 | 33 | struct event *jp_timer; |
d62a17ae | 34 | struct list *upstream_jp_agg; |
1f3e6bf5 | 35 | struct bfd_session_params *bfd_session; |
12e41d03 DL |
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, | |
3dbf370a | 41 | pim_addr source_addr, bool secondary); |
d62a17ae | 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); | |
99deb321 | 45 | |
1148de0a DS |
46 | |
47 | #define PIM_NEIGHBOR_SEND_DELAY 0 | |
48 | #define PIM_NEIGHBOR_SEND_NOW 1 | |
d62a17ae | 49 | struct pim_neighbor * |
9bb93fa0 | 50 | pim_neighbor_add(struct interface *ifp, pim_addr source_addr, |
d62a17ae | 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, | |
12e41d03 | 56 | const char *delete_message); |
d62a17ae | 57 | void pim_neighbor_delete_all(struct interface *ifp, const char *delete_message); |
12e41d03 | 58 | void pim_neighbor_update(struct pim_neighbor *neigh, |
d62a17ae | 59 | pim_hello_options hello_options, uint16_t holdtime, |
60 | uint32_t dr_priority, struct list *addr_list); | |
12e41d03 | 61 | struct prefix *pim_neighbor_find_secondary(struct pim_neighbor *neigh, |
07b17d59 | 62 | struct prefix *addr); |
dedccda6 | 63 | int pim_if_dr_election(struct interface *ifp); |
12e41d03 DL |
64 | |
65 | #endif /* PIM_NEIGHBOR_H */ |