port.h revision 4eaa471005973e11a6110b69fe990530b3b95a38
/************************************************************************
* 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.
**********************************************************************/
/* STP PORT instance : 17.18, 17.15 */
#ifndef _STP_PORT_H__
#define _STP_PORT_H__
#include "statmch.h"
#define TIMERS_NUMBER 9
typedef unsigned int PORT_TIMER_T;
typedef enum {
Mine,
Aged,
} INFO_IS_T;
typedef enum {
} RCVD_MSG_T;
typedef enum {
DisabledPort = 0,
} PORT_ROLE_T;
typedef struct port_t {
/* per Port state machines */
/* per port Timers */
/* message information */
unsigned char msgBpduVersion;
unsigned char msgBpduType;
unsigned char msgPortRole;
unsigned char msgFlags;
unsigned long adminPCost; /* may be ADMIN_PORT_PATH_COST_AUTO */
unsigned long operPCost;
unsigned long operSpeed;
unsigned long usedSpeed;
int LinkDelay; /* TBD: LinkDelay may be managed ? */
/* statistics */
unsigned long rx_cfg_bpdu_cnt;
unsigned long rx_rstp_bpdu_cnt;
unsigned long rx_tcn_bpdu_cnt;
unsigned long uptime; /* 14.8.2.1.3.a */
int port_index;
char* port_name;
#ifdef STP_DBG
unsigned int skip_rx;
unsigned int skip_tx;
#endif
} PORT_T;
void
int
void
#ifdef STP_DBG
int
void
#endif
#endif /* _STP_PORT_H__ */