1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 2008 Everton da Silva Marques
19 Preference value assigned to the unicast routing protocol that
20 provided the route to the multicast source or Rendezvous-Point.
23 The unicast routing table metric associated with the route used to
24 reach the multicast source or Rendezvous-Point. The metric is in
25 units applicable to the unicast routing protocol used.
29 long long last_lookup_time
;
30 struct interface
*interface
; /* RPF_interface(S) */
31 pim_addr mrib_nexthop_addr
; /* MRIB.next_hop(S) */
32 uint32_t mrib_metric_preference
; /* MRIB.pref(S) */
33 uint32_t mrib_route_metric
; /* MRIB.metric(S) */
34 struct pim_neighbor
*nbr
;
38 struct pim_nexthop source_nexthop
;
39 pim_addr rpf_addr
; /* RPF'(S,G) */
42 enum pim_rpf_result
{ PIM_RPF_OK
= 0, PIM_RPF_CHANGED
, PIM_RPF_FAILURE
};
46 unsigned int pim_rpf_hash_key(const void *arg
);
47 bool pim_rpf_equal(const void *arg1
, const void *arg2
);
49 bool pim_nexthop_lookup(struct pim_instance
*pim
, struct pim_nexthop
*nexthop
,
50 pim_addr addr
, int neighbor_needed
);
51 enum pim_rpf_result
pim_rpf_update(struct pim_instance
*pim
,
52 struct pim_upstream
*up
,
53 struct pim_rpf
*old
, const char *caller
);
54 void pim_upstream_rpf_clear(struct pim_instance
*pim
,
55 struct pim_upstream
*up
);
56 int pim_rpf_addr_is_inaddr_any(struct pim_rpf
*rpf
);
58 int pim_rpf_is_same(struct pim_rpf
*rpf1
, struct pim_rpf
*rpf2
);
59 void pim_rpf_set_refresh_time(struct pim_instance
*pim
);
60 #endif /* PIM_RPF_H */