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