1 /************************************************************************
2 * RSTP library - Rapid Spanning Tree (802.1t, 802.1w)
3 * Copyright (C) 2001-2003 Optical Access
6 * This file is part of RSTP library.
8 * RSTP library is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by the
10 * Free Software Foundation; version 2.1
12 * RSTP library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
15 * General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with RSTP library; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 **********************************************************************/
23 /* External management communication API definitions */
37 unsigned char addr
[6];
41 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
42 char action
; /* 1-create, 0- delete */
45 #define BR_CFG_STATE (1L << 0)
46 #define BR_CFG_PRIO (1L << 1)
47 #define BR_CFG_AGE (1L << 2)
48 #define BR_CFG_HELLO (1L << 3)
49 #define BR_CFG_DELAY (1L << 4)
50 #define BR_CFG_FORCE_VER (1L << 5)
51 #define BR_CFG_AGE_MODE (1L << 6)
52 #define BR_CFG_AGE_TIME (1L << 7)
53 #define BR_CFG_HOLD_TIME (1L << 8)
54 #define BR_CFG_ALL BR_CFG_STATE | \
66 unsigned long field_mask
; /* which fields to change */
67 UID_STP_MODE_T stp_enabled
;
68 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
81 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
82 unsigned long vlan_id
;
83 UID_STP_MODE_T stp_enabled
;
86 UID_BRIDGE_ID_T designated_root
;
87 unsigned long root_path_cost
;
89 unsigned long timeSince_Topo_Change
; /* 14.8.1.1.3.b: TBD */
90 unsigned long Topo_Change_Count
; /* 14.8.1.1.3.c: TBD */
91 unsigned char Topo_Change
; /* 14.8.1.1.3.d: TBD */
93 unsigned short root_port
;
97 UID_BRIDGE_ID_T bridge_id
;
101 UID_PORT_DISABLED
= 0,
108 typedef unsigned short UID_PORT_ID
;
118 #define PT_CFG_STATE (1L << 0)
119 #define PT_CFG_COST (1L << 1)
120 #define PT_CFG_PRIO (1L << 2)
121 #define PT_CFG_P2P (1L << 3)
122 #define PT_CFG_EDGE (1L << 4)
123 #define PT_CFG_MCHECK (1L << 5)
124 #define PT_CFG_NON_STP (1L << 6)
126 #define PT_CFG_DBG_SKIP_RX (1L << 16)
127 #define PT_CFG_DBG_SKIP_TX (1L << 17)
130 #define PT_CFG_ALL PT_CFG_STATE | \
138 #define ADMIN_PORT_PATH_COST_AUTO 0
142 unsigned long field_mask
; /* which fields to change */
144 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
148 unsigned long admin_port_path_cost
; /* ADMIN_PORT_PATH_COST_AUTO - auto sence */
149 ADMIN_P2P_T admin_point2point
;
150 unsigned char admin_edge
;
151 unsigned char admin_non_stp
; /* 1- doesn't participate in STP, 1 - regular */
153 unsigned int skip_rx
;
154 unsigned int skip_tx
;
157 } UID_STP_PORT_CFG_T
;
162 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
163 unsigned int port_no
; /* key of the entry */
167 RSTP_PORT_STATE state
;
168 unsigned long path_cost
;
170 UID_BRIDGE_ID_T designated_root
;
171 unsigned long designated_cost
;
172 UID_BRIDGE_ID_T designated_bridge
;
173 UID_PORT_ID designated_port
;
177 unsigned short handshake_flags
;
180 unsigned long rx_cfg_bpdu_cnt
;
181 unsigned long rx_rstp_bpdu_cnt
;
182 unsigned long rx_tcn_bpdu_cnt
;
183 int fdWhile
; /* 17.15.1 */
184 int helloWhen
; /* 17.15.2 */
185 int mdelayWhile
; /* 17.15.3 */
186 int rbWhile
; /* 17.15.4 */
187 int rcvdInfoWhile
;/* 17.15.5 */
188 int rrWhile
; /* 17.15.6 */
189 int tcWhile
; /* 17.15.7 */
190 int txCount
; /* 17.18.40 */
193 unsigned long uptime
; /* 14.8.2.1.3.a */
194 unsigned long oper_port_path_cost
;
196 unsigned char oper_point2point
;
197 unsigned char oper_edge
;
198 unsigned char oper_stp_neigb
;
199 unsigned char top_change_ack
;
201 } UID_STP_PORT_STATE_T
;