/************************************************************************
* RSTP library - Rapid Spanning Tree (802.1t, 802.1w)
* Copyright (C) 2001-2003 Optical Access
* Author: Alex Rozin
*
* This file is part of RSTP library.
*
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation; version 2.1
*
* RSTP library 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 Lesser
* General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with RSTP library; see the file COPYING. If not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
**********************************************************************/
/* Port Role Transitions state machine : 17.24 */
#include "base.h"
#include "stpm.h"
#define STATES { \
CHOOSE(BLOCK_PORT), \
CHOOSE(BLOCKED_PORT), \
CHOOSE(BACKUP_PORT), \
CHOOSE(ROOT_PROPOSED), \
CHOOSE(ROOT_AGREED), \
CHOOSE(ROOT_LEARN), \
CHOOSE(ROOT_FORWARD), \
}
#include "choose.h"
static void
{
}
}
static void
{
}
}
static Bool
{
return False;
}
}
return True;
}
static Bool
{
return False;
}
}
return True;
}
void
{
case BEGIN:
case INIT_PORT:
#if 0 /* due 802.1y Z.4 */
#else
#endif
#ifdef STP_DBG
#endif
break;
case BLOCK_PORT:
break;
case BLOCKED_PORT:
break;
case BACKUP_PORT:
break;
/* 17.23.2 */
case ROOT_PROPOSED:
#ifdef STP_DBG
#endif
break;
case ROOT_AGREED:
#ifdef STP_DBG
#endif
break;
case REROOT:
#ifdef STP_DBG
#endif
break;
case ROOT_PORT:
#ifdef STP_DBG
#endif
break;
case REROOTED:
#ifdef STP_DBG
#endif
break;
case ROOT_LEARN:
#ifdef STP_DBG
#endif
break;
case ROOT_FORWARD:
#ifdef STP_DBG
#endif
break;
/* 17.23.3 */
case DESIGNATED_PROPOSE:
#ifdef STP_DBG
#endif
break;
case DESIGNATED_SYNCED:
#ifdef STP_DBG
#endif
break;
case DESIGNATED_RETIRED:
#ifdef STP_DBG
#endif
break;
case DESIGNATED_PORT:
#ifdef STP_DBG
#endif
break;
case DESIGNATED_LISTEN:
#ifdef STP_DBG
#endif
break;
case DESIGNATED_LEARN:
#ifdef STP_DBG
#endif
break;
case DESIGNATED_FORWARD:
#ifdef STP_DBG
#endif
break;
};
}
{
}
switch (port->selectedRole) {
case DisabledPort:
case AlternatePort:
case BackupPort:
#if 0 /* def STP_DBG */
stp_trace ("hop to BLOCK_PORT role=%d selectedRole=%d",
}
#endif
case RootPort:
case DesignatedPort:
default:
return False;
}
}
/* 17.23.1 */
case INIT_PORT:
case BLOCK_PORT:
}
break;
case BLOCKED_PORT:
}
}
break;
case BACKUP_PORT:
/* 17.23.2 */
case ROOT_PROPOSED:
case ROOT_AGREED:
case REROOT:
case ROOT_PORT:
}
}
}
}
}
}
}
break;
case REROOTED:
case ROOT_LEARN:
case ROOT_FORWARD:
/* 17.23.3 */
case DESIGNATED_PROPOSE:
case DESIGNATED_SYNCED:
case DESIGNATED_RETIRED:
case DESIGNATED_PORT:
}
}
}
}
}
}
}
}
}
break;
case DESIGNATED_LISTEN:
case DESIGNATED_LEARN:
case DESIGNATED_FORWARD:
};
return False;
}