|
|
|
|
|
Therefore:
|
|
** Bridge receives a configuration message on port Port;
/* =====================================================
How to detect the last node in an even cycle
===================================================== */
if ( ( RootID in the control message == myRoot ) AND
( Distance in message == myDistance - 1 ) )
then
{
if ( Status(Port) != Root )
Status(Port) = BLOCKED; // Block the non-root port !
}
|
|
|
|
|
Caveat:
|
Graphically:
|
(You must not block both bridges, or else you will disconnect some LAN !!!)
|
Example:
|
Bridge received a configuration message Msg on port Port;
/* ================================================
How to detect the last node in an odd cycle
================================================ */
if ( ( Msg(RootID) == myRoot ) AND
( Msg(Distance) == myDistance ) )
{
/* ================================================
Block the port of the bridge with the large ID
================================================ */
if ( myID > Msg(SourceID) )
Status(Port) = BLOCKED;
}
|
|