Lines Matching refs:port
38 void stp_dbg_break_point (PORT_T * port, STPM_T* stpm)
44 _is_backup_port (PORT_T* port, STPM_T* this)
47 (&port->portPrio.design_bridge, &this->BrId)) {
49 if (port->info->debug) {
51 &port->portPrio.design_bridge, True);
55 stp_dbg_break_point (port, this);
65 setRoleSelected (char* reason, STPM_T* stpm, PORT_T* port,
72 port->selectedRole = newRole;
74 if (newRole == port->role)
107 port->role = newRole;
111 stp_trace ("%s-%s:port %s => Unknown (%d ?)",
112 reason, stpm->name, port->port_name, (int) newRole);
120 if (port->roletrns->debug)
122 reason, stpm->name, port->port_name, new_role_name);
129 register PORT_T *port;
131 for (port = this->ports; port; port = port->next) {
132 port->selectedRole = DisabledPort;
139 register PORT_T *port;
141 for (port = this->ports; port; port = port->next) {
142 port->reselect = False;
150 register PORT_T *port;
156 for (port = stpm->ports; port; port = port->next) {
157 if (port->admin_non_stp) {
161 if (Disabled == port->infoIs)
163 if (Aged == port->infoIs)
165 if (Mine == port->infoIs) {
167 stp_dbg_break_point (port); /* for debugger break point */
172 STP_VECT_copy (&rootPathPrio, &port->portPrio);
173 rootPathPrio.root_path_cost += port->operPCost;
177 STP_copy_times (&stpm->rootTimes, &port->portTimes);
183 if (port->roletrns->debug)
184 stp_trace ("updtRootPrio: dm=%d rootTimes.MessageAge=%d on port %s",
186 port->port_name);
195 register PORT_T* port;
198 PORT_ID old_root_port; /* for tracing of root port changing */
212 for (port = stpm->ports; port; port = port->next) {
213 if (port->admin_non_stp) {
216 STP_VECT_create (&port->designPrio,
219 &stpm->BrId, port->port_id, port->port_id);
220 STP_copy_times (&port->designTimes, &stpm->rootTimes);
224 if (port->roletrns->debug) {
226 &port->designPrio.design_bridge, True);
239 stp_trace ("bridge %s new root port: %s",
246 for (port = stpm->ports; port; port = port->next) {
247 if (port->admin_non_stp) {
248 setRoleSelected ("Non", stpm, port, NonStpPort);
249 port->forward = port->learn = True;
253 switch (port->infoIs) {
255 setRoleSelected ("Dis", stpm, port, DisabledPort);
258 setRoleSelected ("Age", stpm, port, DesignatedPort);
259 port->updtInfo = True;
262 setRoleSelected ("Mine", stpm, port, DesignatedPort);
263 if (0 != STP_VECT_compare_vector (&port->portPrio,
264 &port->designPrio) ||
265 0 != STP_compare_times (&port->portTimes,
266 &port->designTimes)) {
267 port->updtInfo = True;
271 if (stpm->rootPortId == port->port_id) {
272 setRoleSelected ("Rec", stpm, port, RootPort);
273 } else if (STP_VECT_compare_vector (&port->designPrio, &port->portPrio) < 0) {
276 setRoleSelected ("Rec", stpm, port, DesignatedPort);
277 port->updtInfo = True;
280 if (_is_backup_port (port, stpm)) {
281 setRoleSelected ("rec", stpm, port, BackupPort);
283 setRoleSelected ("rec", stpm, port, AlternatePort);
286 port->updtInfo = False;
289 stp_trace ("undef infoIs=%d", (int) port->infoIs);
300 register PORT_T* port;
302 for (port = this->ports; port; port = port->next) {
303 if (port->reselect) {
305 stp_trace ("setSelectedBridge: TRUE=reselect on port %s", port->port_name);
311 for (port = this->ports; port; port = port->next) {
312 port->selected = True;
342 register PORT_T* port;
362 for (port = stpm->ports; port; port = port->next) {
363 if (port->reselect) {
364 /* stp_trace ("reselect on port %s", port->port_name); */
377 register PORT_T* port;
388 for (port = this->ports; port; port = port->next) {
389 STP_VECT_create (&port->designPrio,
392 &this->BrId, port->port_id, port->port_id);
393 if (Received != port->infoIs || this->rootPortId == port->port_id) {
394 STP_VECT_copy (&port->portPrio, &port->designPrio);
396 port->reselect = True;
397 port->selected = False;