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 */
39 unsigned char addr
[6];
43 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
44 char action
; /* 1-create, 0- delete */
47 #define BR_CFG_STATE (1L << 0)
48 #define BR_CFG_PRIO (1L << 1)
49 #define BR_CFG_AGE (1L << 2)
50 #define BR_CFG_HELLO (1L << 3)
51 #define BR_CFG_DELAY (1L << 4)
52 #define BR_CFG_FORCE_VER (1L << 5)
53 #define BR_CFG_AGE_MODE (1L << 6)
54 #define BR_CFG_AGE_TIME (1L << 7)
55 #define BR_CFG_HOLD_TIME (1L << 8)
56 #define BR_CFG_ALL BR_CFG_STATE | \
68 unsigned long field_mask
; /* which fields to change */
69 UID_STP_MODE_T stp_enabled
;
70 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
83 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
84 unsigned long vlan_id
;
85 UID_STP_MODE_T stp_enabled
;
88 UID_BRIDGE_ID_T designated_root
;
89 unsigned long root_path_cost
;
91 unsigned long timeSince_Topo_Change
; /* 14.8.1.1.3.b: TBD */
92 unsigned long Topo_Change_Count
; /* 14.8.1.1.3.c: TBD */
93 unsigned char Topo_Change
; /* 14.8.1.1.3.d: TBD */
95 unsigned short root_port
;
99 UID_BRIDGE_ID_T bridge_id
;
103 UID_PORT_DISABLED
= 0,
111 typedef unsigned short UID_PORT_ID
;
119 #define PT_CFG_STATE (1L << 0)
120 #define PT_CFG_COST (1L << 1)
121 #define PT_CFG_PRIO (1L << 2)
122 #define PT_CFG_P2P (1L << 3)
123 #define PT_CFG_EDGE (1L << 4)
124 #define PT_CFG_MCHECK (1L << 5)
125 #define PT_CFG_NON_STP (1L << 6)
127 #define PT_CFG_DBG_SKIP_RX (1L << 16)
128 #define PT_CFG_DBG_SKIP_TX (1L << 17)
131 #define PT_CFG_ALL PT_CFG_STATE | \
139 #define ADMIN_PORT_PATH_COST_AUTO 0
143 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
;
161 char vlan_name
[NAME_LEN
]; /* name of the VLAN, key of the bridge */
162 unsigned int port_no
; /* key of the entry */
166 RSTP_PORT_STATE state
;
167 unsigned long path_cost
;
169 UID_BRIDGE_ID_T designated_root
;
170 unsigned long designated_cost
;
171 UID_BRIDGE_ID_T designated_bridge
;
172 UID_PORT_ID designated_port
;
176 unsigned short handshake_flags
;
179 unsigned long rx_cfg_bpdu_cnt
;
180 unsigned long rx_rstp_bpdu_cnt
;
181 unsigned long rx_tcn_bpdu_cnt
;
182 int fdWhile
; /* 17.15.1 */
183 int helloWhen
; /* 17.15.2 */
184 int mdelayWhile
; /* 17.15.3 */
185 int rbWhile
; /* 17.15.4 */
186 int rcvdInfoWhile
;/* 17.15.5 */
187 int rrWhile
; /* 17.15.6 */
188 int tcWhile
; /* 17.15.7 */
189 int txCount
; /* 17.18.40 */
192 unsigned long uptime
; /* 14.8.2.1.3.a */
193 unsigned long oper_port_path_cost
;
195 unsigned char oper_point2point
;
196 unsigned char oper_edge
;
197 unsigned char oper_stp_neigb
;
198 unsigned char top_change_ack
;
200 } UID_STP_PORT_STATE_T
;