1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 2008 Everton da Silva Marques
17 #include "pim_iface.h"
21 int64_t creation
; /* timestamp of creation */
23 pim_hello_options hello_options
;
25 uint16_t propagation_delay_msec
;
26 uint16_t override_interval_msec
;
28 uint32_t generation_id
;
29 struct list
*prefix_list
; /* list of struct prefix */
30 struct thread
*t_expire_timer
;
31 struct interface
*interface
;
33 struct thread
*jp_timer
;
34 struct list
*upstream_jp_agg
;
35 struct bfd_session_params
*bfd_session
;
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
, bool secondary
);
42 struct pim_neighbor
*pim_neighbor_find_by_secondary(struct interface
*ifp
,
44 struct pim_neighbor
*pim_neighbor_find_if(struct interface
*ifp
);
47 #define PIM_NEIGHBOR_SEND_DELAY 0
48 #define PIM_NEIGHBOR_SEND_NOW 1
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
,
63 int pim_if_dr_election(struct interface
*ifp
);
65 #endif /* PIM_NEIGHBOR_H */