3 * Copyright (C) 2008 Everton da Silva Marques
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 Preference value assigned to the unicast routing protocol that
31 provided the route to the multicast source or Rendezvous-Point.
34 The unicast routing table metric associated with the route used to
35 reach the multicast source or Rendezvous-Point. The metric is in
36 units applicable to the unicast routing protocol used.
40 long long last_lookup_time
;
41 struct interface
*interface
; /* RPF_interface(S) */
42 struct prefix mrib_nexthop_addr
; /* MRIB.next_hop(S) */
43 uint32_t mrib_metric_preference
; /* MRIB.pref(S) */
44 uint32_t mrib_route_metric
; /* MRIB.metric(S) */
45 struct pim_neighbor
*nbr
;
49 struct pim_nexthop source_nexthop
;
50 struct prefix rpf_addr
; /* RPF'(S,G) */
53 enum pim_rpf_result
{ PIM_RPF_OK
= 0, PIM_RPF_CHANGED
, PIM_RPF_FAILURE
};
57 unsigned int pim_rpf_hash_key(const void *arg
);
58 bool pim_rpf_equal(const void *arg1
, const void *arg2
);
60 bool pim_nexthop_lookup(struct pim_instance
*pim
, struct pim_nexthop
*nexthop
,
61 pim_addr addr
, int neighbor_needed
);
62 enum pim_rpf_result
pim_rpf_update(struct pim_instance
*pim
,
63 struct pim_upstream
*up
,
64 struct pim_rpf
*old
, const char *caller
);
65 void pim_upstream_rpf_clear(struct pim_instance
*pim
,
66 struct pim_upstream
*up
);
67 int pim_rpf_addr_is_inaddr_any(struct pim_rpf
*rpf
);
69 int pim_rpf_is_same(struct pim_rpf
*rpf1
, struct pim_rpf
*rpf2
);
70 void pim_rpf_set_refresh_time(struct pim_instance
*pim
);
71 #endif /* PIM_RPF_H */