/*
- PIM for Quagga
- Copyright (C) 2008 Everton da Silva Marques
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING; if not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1301 USA
-*/
+ * PIM for Quagga
+ * Copyright (C) 2008 Everton da Silva Marques
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
#include <zebra.h>
lost_assert(S,G) =
{ all interfaces I such that
- lost_assert(S,G,I) == TRUE }
+ lost_assert(S,G,I) == true }
bool lost_assert(S,G,I) {
if ( RPF_interface(S) == I ) {
- return FALSE
+ return false
} else {
return ( AssertWinner(S,G,I) != NULL AND
AssertWinner(S,G,I) != me AND
pim_include(S,G) =
{ all interfaces I such that:
- ( (I_am_DR( I ) AND lost_assert(S,G,I) == FALSE )
+ ( (I_am_DR( I ) AND lost_assert(S,G,I) == false )
OR AssertWinner(S,G,I) == me )
AND local_receiver_include(S,G,I) }
return (
/* I_am_DR( I ) ? */
PIM_I_am_DR(pim_ifp) &&
- /* lost_assert(S,G,I) == FALSE ? */
+ /* lost_assert(S,G,I) == false ? */
(!pim_macro_ch_lost_assert(ch)));
}
return 0; /* false */
}
- /* SPTbit(S,G) == TRUE */
+ /* SPTbit(S,G) == true */
if (ch->upstream->sptbit == PIM_UPSTREAM_SPTBIT_FALSE)
return 0; /* false */
following pseudocode:
assert_metric my_assert_metric(S,G,I) {
- if( CouldAssert(S,G,I) == TRUE ) {
+ if( CouldAssert(S,G,I) == true ) {
return spt_assert_metric(S,I)
- } else if( CouldAssert(*,G,I) == TRUE ) {
+ } else if( CouldAssert(*,G,I) == true ) {
return rpt_assert_metric(G,I)
} else {
return infinite_assert_metric()
}
}
- return qpim_infinite_assert_metric;
+ return router->infinite_assert_metric;
}
/*
(+) ( pim_include(*,G) (-) pim_exclude(S,G) )
(-) lost_assert(*,G)
(+) joins(S,G) ) )
- OR (local_receiver_include(S,G,I) == TRUE
+ OR (local_receiver_include(S,G,I) == true
AND (I_am_DR(I) OR (AssertWinner(S,G,I) == me)))
- OR ((RPF_interface(S) == I) AND (JoinDesired(S,G) == TRUE))
- OR ((RPF_interface(RP(G)) == I) AND (JoinDesired(*,G) == TRUE)
- AND (SPTbit(S,G) == FALSE))
+ OR ((RPF_interface(S) == I) AND (JoinDesired(S,G) == true))
+ OR ((RPF_interface(RP(G)) == I) AND (JoinDesired(*,G) == true)
+ AND (SPTbit(S,G) == false))
AssertTrackingDesired(S,G,I) is true on any interface in which an
(S,G) assert might affect our behavior.