Lines Matching refs:stpm
38 void stp_dbg_break_point (PORT_T * port, STPM_T* stpm)
65 setRoleSelected (char* reason, STPM_T* stpm, PORT_T* port, in setRoleSelected() argument
112 reason, stpm->name, port->port_name, (int) newRole); in setRoleSelected()
122 reason, stpm->name, port->port_name, new_role_name); in setRoleSelected()
151 register STPM_T *stpm; in updtRootPrio() local
154 stpm = this->owner.stpm; in updtRootPrio()
156 for (port = stpm->ports; port; port = port->next) { in updtRootPrio()
175 if (STP_VECT_compare_vector (&rootPathPrio, &stpm->rootPrio) < 0) { in updtRootPrio()
176 STP_VECT_copy (&stpm->rootPrio, &rootPathPrio); in updtRootPrio()
177 STP_copy_times (&stpm->rootTimes, &port->portTimes); in updtRootPrio()
178 dm = (8 + stpm->rootTimes.MaxAge) / 16; in updtRootPrio()
181 stpm->rootTimes.MessageAge += dm; in updtRootPrio()
185 (int) dm, (int) stpm->rootTimes.MessageAge, in updtRootPrio()
196 register STPM_T* stpm; in updtRolesBridge() local
201 stpm = this->owner.stpm; in updtRolesBridge()
203 old_root_port = stpm->rootPortId; in updtRolesBridge()
206 STP_VECT_create (&stpm->rootPrio, &stpm->BrId, 0, &stpm->BrId, 0, 0); in updtRolesBridge()
207 STP_copy_times (&stpm->rootTimes, &stpm->BrTimes); in updtRolesBridge()
208 stpm->rootPortId = 0; in updtRolesBridge()
212 for (port = stpm->ports; port; port = port->next) { in updtRolesBridge()
217 &stpm->rootPrio.root_bridge, in updtRolesBridge()
218 stpm->rootPrio.root_path_cost, in updtRolesBridge()
219 &stpm->BrId, port->port_id, port->port_id); in updtRolesBridge()
220 STP_copy_times (&port->designTimes, &stpm->rootTimes); in updtRolesBridge()
232 stpm->rootPortId = stpm->rootPrio.bridge_port; in updtRolesBridge()
235 if (old_root_port != stpm->rootPortId) { in updtRolesBridge()
236 if (! stpm->rootPortId) { in updtRolesBridge()
237 stp_trace ("bridge %s became root", stpm->name); in updtRolesBridge()
240 stpm->name, in updtRolesBridge()
241 STP_stpm_get_port_name_by_id (stpm, stpm->rootPortId)); in updtRolesBridge()
246 for (port = stpm->ports; port; port = port->next) { in updtRolesBridge()
248 setRoleSelected ("Non", stpm, port, NonStpPort); in updtRolesBridge()
255 setRoleSelected ("Dis", stpm, port, DisabledPort); in updtRolesBridge()
258 setRoleSelected ("Age", stpm, port, DesignatedPort); in updtRolesBridge()
262 setRoleSelected ("Mine", stpm, port, DesignatedPort); in updtRolesBridge()
271 if (stpm->rootPortId == port->port_id) { in updtRolesBridge()
272 setRoleSelected ("Rec", stpm, port, RootPort); in updtRolesBridge()
276 setRoleSelected ("Rec", stpm, port, DesignatedPort); in updtRolesBridge()
280 if (_is_backup_port (port, stpm)) { in updtRolesBridge()
281 setRoleSelected ("rec", stpm, port, BackupPort); in updtRolesBridge()
283 setRoleSelected ("rec", stpm, port, AlternatePort); in updtRolesBridge()
321 STPM_T* stpm; in STP_rolesel_enter_state() local
323 stpm = this->owner.stpm; in STP_rolesel_enter_state()
328 updtRoleDisableBridge (stpm); in STP_rolesel_enter_state()
331 clearReselectBridge (stpm); in STP_rolesel_enter_state()
333 (void) setSelectedBridge (stpm); in STP_rolesel_enter_state()
341 STPM_T* stpm; in STP_rolesel_check_conditions() local
361 stpm = s->owner.stpm; in STP_rolesel_check_conditions()
362 for (port = stpm->ports; port; port = port->next) { in STP_rolesel_check_conditions()