Lines Matching refs:port

64   register PORT_T* port = this->owner.port;  in rcvBpdu()  local
66 if (port->msgBpduType == BPDU_TOPO_CHANGE_TYPE) { in rcvBpdu()
75 port->msgPortRole = RSTP_PORT_ROLE_UNKN; in rcvBpdu()
77 if (BPDU_RSTP == port->msgBpduType) { in rcvBpdu()
78 port->msgPortRole = (port->msgFlags & PORT_ROLE_MASK) >> PORT_ROLE_OFFS; in rcvBpdu()
81 if (RSTP_PORT_ROLE_DESGN == port->msgPortRole || in rcvBpdu()
82 BPDU_CONFIG_TYPE == port->msgBpduType) { in rcvBpdu()
83 bridcmp = STP_VECT_compare_vector (&port->msgPrio, &port->portPrio); in rcvBpdu()
86 (! STP_VECT_compare_bridge_id (&port->msgPrio.design_bridge, in rcvBpdu()
87 &port->portPrio.design_bridge) && in rcvBpdu()
88 port->msgPrio.design_port == port->portPrio.design_port && in rcvBpdu()
89 STP_compare_times (&port->msgTimes, &port->portTimes))) { in rcvBpdu()
99 if (BPDU_CONFIG_TYPE == port->msgBpduType || in rcvBpdu()
100 RSTP_PORT_ROLE_DESGN == port->msgPortRole) { in rcvBpdu()
101 if (! STP_VECT_compare_vector (&port->msgPrio, in rcvBpdu()
102 &port->portPrio) && in rcvBpdu()
103 ! STP_compare_times (&port->msgTimes, &port->portTimes)) { in rcvBpdu()
113 if (RSTP_PORT_ROLE_ROOT == port->msgBpduType && in rcvBpdu()
114 port->operPointToPointMac && in rcvBpdu()
115 ! STP_VECT_compare_bridge_id (&port->msgPrio.design_bridge, in rcvBpdu()
116 &port->portPrio.design_bridge) && in rcvBpdu()
117 AGREEMENT_BIT & port->msgFlags) { in rcvBpdu()
128 if (RSTP_PORT_ROLE_ROOT == port->msgBpduType) { in rcvBpdu()
129 if (!port->operPointToPointMac) { in rcvBpdu()
131 } else if (STP_VECT_compare_bridge_id (&port->msgPrio.design_bridge, in rcvBpdu()
132 &port->portPrio.design_bridge)) { in rcvBpdu()
133 STP_VECT_br_id_print("rcvBpdu: OtherMsg: msgPrio", &port->msgPrio.design_bridge, True); in rcvBpdu()
134 STP_VECT_br_id_print("rcvBpdu: portPrio", &port->portPrio.design_bridge, True); in rcvBpdu()
139 stp_trace ("rcvBpdu: OtherMsg: type %d", port->msgBpduType); in rcvBpdu()
150 register PORT_T* port = this->owner.port; in recordProposed() local
152 if (RSTP_PORT_ROLE_DESGN == port->msgPortRole && in recordProposed()
153 (PROPOSAL_BIT & port->msgFlags) && in recordProposed()
154 port->operPointToPointMac) { in recordProposed()
163 register PORT_T* port = this->owner.port; in setTcFlags() local
165 if (BPDU_TOPO_CHANGE_TYPE == port->msgBpduType) { in setTcFlags()
168 stp_trace ("port %s rx rcvdTcn", port->port_name); in setTcFlags()
171 port->rcvdTcn = True; in setTcFlags()
173 if (TOPOLOGY_CHANGE_BIT & port->msgFlags) { in setTcFlags()
177 port->owner->name, port->port_name, in setTcFlags()
178 (unsigned long) port->msgFlags); in setTcFlags()
181 port->rcvdTc = True; in setTcFlags()
183 if (TOPOLOGY_CHANGE_ACK_BIT & port->msgFlags) { in setTcFlags()
187 port->port_name, in setTcFlags()
188 (unsigned long) port->msgFlags); in setTcFlags()
191 port->rcvdTcAck = True; in setTcFlags()
199 register PORT_T* port = this->owner.port; in updtBPDUVersion() local
201 if (BPDU_TOPO_CHANGE_TYPE == port->msgBpduType) { in updtBPDUVersion()
202 port->rcvdSTP = True; in updtBPDUVersion()
205 if (port->msgBpduVersion < 2) { in updtBPDUVersion()
206 port->rcvdSTP = True; in updtBPDUVersion()
209 if (BPDU_RSTP == port->msgBpduType) { in updtBPDUVersion()
212 port->rcvdRSTP = True; in updtBPDUVersion()
221 register PORT_T* port = this->owner.port; in updtRcvdInfoWhile() local
223 eff_age = ( + port->portTimes.MaxAge) / 16; in updtRcvdInfoWhile()
225 eff_age += port->portTimes.MessageAge; in updtRcvdInfoWhile()
227 if (eff_age <= port->portTimes.MaxAge) { in updtRcvdInfoWhile()
228 hello3 = 3 * port->portTimes.HelloTime; in updtRcvdInfoWhile()
229 dm = port->portTimes.MaxAge - eff_age; in updtRcvdInfoWhile()
234 port->rcvdInfoWhile = dt; in updtRcvdInfoWhile()
241 port->rcvdInfoWhile = 0; in updtRcvdInfoWhile()
247 port->port_name, in updtRcvdInfoWhile()
248 (int) port->portTimes.MaxAge, in updtRcvdInfoWhile()
249 (int) port->portTimes.MessageAge, in updtRcvdInfoWhile()
250 (int) port->portTimes.HelloTime); in updtRcvdInfoWhile()
260 STP_info_rx_bpdu (PORT_T* port, struct stp_bpdu_t* bpdu, size_t len) in STP_info_rx_bpdu() argument
286 port->rx_cfg_bpdu_cnt++; in STP_info_rx_bpdu()
288 if (port->info->debug) in STP_info_rx_bpdu()
289 stp_trace ("CfgBpdu on port %s", port->port_name); in STP_info_rx_bpdu()
291 if (port->admin_non_stp) return; in STP_info_rx_bpdu()
292 port->rcvdBpdu = True; in STP_info_rx_bpdu()
295 port->rx_tcn_bpdu_cnt++; in STP_info_rx_bpdu()
297 if (port->info->debug) in STP_info_rx_bpdu()
298 stp_trace ("TcnBpdu on port %s", port->port_name); in STP_info_rx_bpdu()
300 if (port->admin_non_stp) return; in STP_info_rx_bpdu()
301 port->rcvdBpdu = True; in STP_info_rx_bpdu()
302 port->msgBpduVersion = bpdu->hdr.version; in STP_info_rx_bpdu()
303 port->msgBpduType = bpdu->hdr.bpdu_type; in STP_info_rx_bpdu()
309 port->rx_rstp_bpdu_cnt++; in STP_info_rx_bpdu()
310 if (port->admin_non_stp) return; in STP_info_rx_bpdu()
311 if (port->owner->ForceVersion >= NORMAL_RSTP) { in STP_info_rx_bpdu()
312 port->rcvdBpdu = True; in STP_info_rx_bpdu()
317 if (port->info->debug) in STP_info_rx_bpdu()
318 stp_trace ("BPDU_RSTP on port %s", port->port_name); in STP_info_rx_bpdu()
323 port->msgBpduVersion = bpdu->hdr.version; in STP_info_rx_bpdu()
324 port->msgBpduType = bpdu->hdr.bpdu_type; in STP_info_rx_bpdu()
325 port->msgFlags = bpdu->body.flags; in STP_info_rx_bpdu()
328 STP_VECT_get_vector (&bpdu->body, &port->msgPrio); in STP_info_rx_bpdu()
329 port->msgPrio.bridge_port = port->port_id; in STP_info_rx_bpdu()
332 STP_get_times (&bpdu->body, &port->msgTimes); in STP_info_rx_bpdu()
339 register PORT_T* port = this->owner.port; in STP_info_enter_state() local
343 port->rcvdMsg = OtherMsg; in STP_info_enter_state()
344 port->msgBpduType = (unsigned char)-1; in STP_info_enter_state()
345 port->msgPortRole = RSTP_PORT_ROLE_UNKN; in STP_info_enter_state()
346 port->msgFlags = 0; in STP_info_enter_state()
349 port->rx_cfg_bpdu_cnt = in STP_info_enter_state()
350 port->rx_rstp_bpdu_cnt = in STP_info_enter_state()
351 port->rx_tcn_bpdu_cnt = 0; in STP_info_enter_state()
354 port->rcvdBpdu = port->rcvdRSTP = port->rcvdSTP = False; in STP_info_enter_state()
355 port->updtInfo = port->proposing = False; /* In DISABLED */ in STP_info_enter_state()
356 port->agreed = port->proposed = False; in STP_info_enter_state()
357 port->rcvdInfoWhile = 0; in STP_info_enter_state()
358 port->infoIs = Disabled; in STP_info_enter_state()
359 port->reselect = True; in STP_info_enter_state()
360 port->selected = False; in STP_info_enter_state()
363 STP_VECT_copy (&port->portPrio, &port->designPrio); in STP_info_enter_state()
364 STP_copy_times (&port->portTimes, &port->designTimes); in STP_info_enter_state()
367 port->infoIs = Aged; in STP_info_enter_state()
368 port->reselect = True; in STP_info_enter_state()
369 port->selected = False; in STP_info_enter_state()
372 STP_VECT_copy (&port->portPrio, &port->designPrio); in STP_info_enter_state()
373 STP_copy_times (&port->portTimes, &port->designTimes); in STP_info_enter_state()
374 port->updtInfo = False; in STP_info_enter_state()
375 port->agreed = port->synced = False; /* In UPDATE */ in STP_info_enter_state()
376 port->proposed = port->proposing = False; /* in UPDATE */ in STP_info_enter_state()
377 port->infoIs = Mine; in STP_info_enter_state()
378 port->newInfo = True; in STP_info_enter_state()
382 &port->portPrio.design_bridge, True); in STP_info_enter_state()
384 &port->portPrio.root_bridge, True); in STP_info_enter_state()
391 port->rcvdMsg = rcvBpdu (this); in STP_info_enter_state()
394 port->rcvdBpdu = False; in STP_info_enter_state()
397 STP_VECT_copy (&port->portPrio, &port->msgPrio); in STP_info_enter_state()
398 STP_copy_times (&port->portTimes, &port->msgTimes); in STP_info_enter_state()
401 port->agreed = False; /* deleted due 802.y in SUPERIOR */ in STP_info_enter_state()
402 port->synced = False; /* due 802.y deleted in SUPERIOR */ in STP_info_enter_state()
404 port->proposing = False; /* in SUPERIOR */ in STP_info_enter_state()
405 port->proposed = recordProposed (this, "SUPERIOR"); in STP_info_enter_state()
406 port->infoIs = Received; in STP_info_enter_state()
407 port->reselect = True; in STP_info_enter_state()
408 port->selected = False; in STP_info_enter_state()
412 &port->portPrio.design_bridge, True); in STP_info_enter_state()
414 &port->portPrio.root_bridge, True); in STP_info_enter_state()
416 (int) port->proposed, port->port_name); in STP_info_enter_state()
421 port->proposed = recordProposed (this, "REPEAT"); in STP_info_enter_state()
426 if (port->roletrns->debug) { in STP_info_enter_state()
428 port->owner->name, port->port_name); in STP_info_enter_state()
432 port->agreed = True; in STP_info_enter_state()
433 port->proposing = False; /* In AGREEMENT */ in STP_info_enter_state()
441 register PORT_T* port = this->owner.port; in STP_info_check_conditions() local
443 if ((! port->portEnabled && port->infoIs != Disabled) || BEGIN == this->State) { in STP_info_check_conditions()
449 if (port->updtInfo) { in STP_info_check_conditions()
452 if (port->portEnabled && port->selected) { in STP_info_check_conditions()
455 if (port->rcvdBpdu) { in STP_info_check_conditions()
462 if (port->selected && port->updtInfo) { in STP_info_check_conditions()
469 if (port->selected && port->updtInfo) { in STP_info_check_conditions()
473 if (Received == port->infoIs && in STP_info_check_conditions()
474 ! port->rcvdInfoWhile && in STP_info_check_conditions()
475 ! port->updtInfo && in STP_info_check_conditions()
476 ! port->rcvdBpdu) { in STP_info_check_conditions()
479 if (port->rcvdBpdu && !port->updtInfo) { in STP_info_check_conditions()
484 switch (port->rcvdMsg) { in STP_info_check_conditions()