Lines Matching refs:port
126 register PORT_T* port; in _stpapi_port_find() local
128 for (port = this->ports; port; port = port->next) in _stpapi_port_find()
129 if (port_index == port->port_index) { in _stpapi_port_find()
130 return port; in _stpapi_port_find()
200 register PORT_T* port; in _stp_in_enable_port_on_stpm() local
202 port = _stpapi_port_find (stpm, port_index); in _stp_in_enable_port_on_stpm()
203 if (! port) return; in _stp_in_enable_port_on_stpm()
204 if (port->portEnabled == enable) {/* nothing to do :) */ in _stp_in_enable_port_on_stpm()
208 port->uptime = 0; in _stp_in_enable_port_on_stpm()
210 port->rx_cfg_bpdu_cnt = in _stp_in_enable_port_on_stpm()
211 port->rx_rstp_bpdu_cnt = in _stp_in_enable_port_on_stpm()
212 port->rx_tcn_bpdu_cnt = 0; in _stp_in_enable_port_on_stpm()
216 if (port->edge->debug) { in _stp_in_enable_port_on_stpm()
218 port->port_name, enable ? "enable" : "disable", in _stp_in_enable_port_on_stpm()
219 port->adminEdge ? 'Y' : 'N'); in _stp_in_enable_port_on_stpm()
223 port->adminEnable = enable; in _stp_in_enable_port_on_stpm()
224 STP_port_init (port, stpm, False); in _stp_in_enable_port_on_stpm()
226 port->reselect = True; in _stp_in_enable_port_on_stpm()
227 port->selected = False; in _stp_in_enable_port_on_stpm()
292 register PORT_T* port; in STP_IN_port_get_cfg() local
302 port = _stpapi_port_find (this, port_index); in STP_IN_port_get_cfg()
303 if (! port) {/* port is absent in the stpm :( */ in STP_IN_port_get_cfg()
310 uid_cfg->port_priority = port->port_id >> 8; in STP_IN_port_get_cfg()
314 uid_cfg->admin_port_path_cost = port->adminPCost; in STP_IN_port_get_cfg()
318 uid_cfg->admin_point2point = port->adminPointToPointMac; in STP_IN_port_get_cfg()
322 uid_cfg->admin_edge = port->adminEdge; in STP_IN_port_get_cfg()
326 uid_cfg->admin_non_stp = port->admin_non_stp; in STP_IN_port_get_cfg()
330 if (port->mcheck) in STP_IN_port_get_cfg()
341 register PORT_T* port; in STP_IN_port_get_state() local
351 port = _stpapi_port_find (this, entry->port_no); in STP_IN_port_get_state()
352 if (! port) {/* port is absent in the stpm :( */ in STP_IN_port_get_state()
357 entry->port_id = port->port_id; in STP_IN_port_get_state()
358 if (DisabledPort == port->role) { in STP_IN_port_get_state()
360 } else if (! port->forward && ! port->learn) { in STP_IN_port_get_state()
362 } else if (! port->forward && port->learn) { in STP_IN_port_get_state()
368 entry->uptime = port->uptime; in STP_IN_port_get_state()
369 entry->path_cost = port->operPCost; in STP_IN_port_get_state()
370 _conv_br_id_2_uid (&port->portPrio.root_bridge, &entry->designated_root); in STP_IN_port_get_state()
371 entry->designated_cost = port->portPrio.root_path_cost; in STP_IN_port_get_state()
372 _conv_br_id_2_uid (&port->portPrio.design_bridge, &entry->designated_bridge); in STP_IN_port_get_state()
373 entry->designated_port = port->portPrio.design_port; in STP_IN_port_get_state()
375 switch (port->role) { in STP_IN_port_get_state()
385 if (DisabledPort == port->role || NonStpPort == port->role) { in STP_IN_port_get_state()
389 entry->designated_port = port->port_id; in STP_IN_port_get_state()
392 if (DisabledPort == port->role) { in STP_IN_port_get_state()
393 entry->oper_point2point = (P2P_FORCE_FALSE == port->adminPointToPointMac) ? 0 : 1; in STP_IN_port_get_state()
394 entry->oper_edge = port->adminEdge; in STP_IN_port_get_state()
397 entry->oper_point2point = port->operPointToPointMac ? 1 : 0; in STP_IN_port_get_state()
398 entry->oper_edge = port->operEdge ? 1 : 0; in STP_IN_port_get_state()
399 entry->oper_stp_neigb = port->sendRSTP ? 0 : 1; in STP_IN_port_get_state()
401 entry->oper_port_path_cost = port->operPCost; in STP_IN_port_get_state()
403 entry->rx_cfg_bpdu_cnt = port->rx_cfg_bpdu_cnt; in STP_IN_port_get_state()
404 entry->rx_rstp_bpdu_cnt = port->rx_rstp_bpdu_cnt; in STP_IN_port_get_state()
405 entry->rx_tcn_bpdu_cnt = port->rx_tcn_bpdu_cnt; in STP_IN_port_get_state()
407 entry->fdWhile = port->fdWhile; /* 17.15.1 */ in STP_IN_port_get_state()
408 entry->helloWhen = port->helloWhen; /* 17.15.2 */ in STP_IN_port_get_state()
409 entry->mdelayWhile = port->mdelayWhile; /* 17.15.3 */ in STP_IN_port_get_state()
410 entry->rbWhile = port->rbWhile; /* 17.15.4 */ in STP_IN_port_get_state()
411 entry->rcvdInfoWhile = port->rcvdInfoWhile;/* 17.15.5 */ in STP_IN_port_get_state()
412 entry->rrWhile = port->rrWhile; /* 17.15.6 */ in STP_IN_port_get_state()
413 entry->tcWhile = port->tcWhile; /* 17.15.7 */ in STP_IN_port_get_state()
414 entry->txCount = port->txCount; /* 17.18.40 */ in STP_IN_port_get_state()
415 entry->lnkWhile = port->lnkWhile; in STP_IN_port_get_state()
417 entry->rcvdInfoWhile = port->rcvdInfoWhile; in STP_IN_port_get_state()
418 entry->top_change_ack = port->tcAck; in STP_IN_port_get_state()
419 entry->tc = port->tc; in STP_IN_port_get_state()
509 register PORT_T* port; in STP_IN_changed_port_speed() local
515 port = _stpapi_port_find (stpm, port_index); in STP_IN_changed_port_speed()
516 if (! port) continue; in STP_IN_changed_port_speed()
517 port->operSpeed = speed; in STP_IN_changed_port_speed()
519 if (port->pcost->debug) { in STP_IN_changed_port_speed()
520 stp_trace ("changed operSpeed=%lu", port->operSpeed); in STP_IN_changed_port_speed()
524 port->reselect = True; in STP_IN_changed_port_speed()
525 port->selected = False; in STP_IN_changed_port_speed()
535 register PORT_T* port; in STP_IN_changed_port_duplex() local
541 port = _stpapi_port_find (stpm, port_index); in STP_IN_changed_port_duplex()
542 if (! port) continue; in STP_IN_changed_port_duplex()
544 if (port->p2p->debug) { in STP_IN_changed_port_duplex()
545 stp_trace ("STP_IN_changed_port_duplex(%s)", port->port_name); in STP_IN_changed_port_duplex()
548 port->p2p_recompute = True; in STP_IN_changed_port_duplex()
549 port->reselect = True; in STP_IN_changed_port_duplex()
550 port->selected = False; in STP_IN_changed_port_duplex()
603 register PORT_T* port; in STP_IN_rx_bpdu() local
625 port = _stpapi_port_find (this, port_index); in STP_IN_rx_bpdu()
626 if (! port) {/* port is absent in the stpm :( */ in STP_IN_rx_bpdu()
635 if (port->skip_rx > 0) { in STP_IN_rx_bpdu()
636 if (1 == port->skip_rx) in STP_IN_rx_bpdu()
638 port->port_name); in STP_IN_rx_bpdu()
641 port->port_name, port->skip_rx); in STP_IN_rx_bpdu()
642 port->skip_rx--; in STP_IN_rx_bpdu()
648 if (port->operEdge && ! port->lnkWhile && port->portEnabled) { in STP_IN_rx_bpdu()
650 if (port->topoch->debug) { in STP_IN_rx_bpdu()
651 stp_trace ("port %s tc=TRUE by operEdge", port->port_name); in STP_IN_rx_bpdu()
654 port->tc = True; /* IEEE 802.1y, 17.30 */ in STP_IN_rx_bpdu()
658 if (! port->portEnabled && in STP_IN_rx_bpdu()
659 STP_OUT_get_port_link_status (port->port_index)) { in STP_IN_rx_bpdu()
660 _stp_in_enable_port_on_stpm (this, port->port_index, True); in STP_IN_rx_bpdu()
664 if (port->edge->debug && port->operEdge) { in STP_IN_rx_bpdu()
665 stp_trace ("port %s not operEdge !", port->port_name); in STP_IN_rx_bpdu()
669 port->operEdge = False; in STP_IN_rx_bpdu()
670 port->wasInitBpdu = True; in STP_IN_rx_bpdu()
672 iret = STP_port_rx_bpdu (port, bpdu, len); in STP_IN_rx_bpdu()
811 register PORT_T* port; in STP_IN_port_set_cfg() local
821 port = _stpapi_port_find (this, port_index); in STP_IN_port_set_cfg()
822 if (! port) {/* port is absent in the stpm :( */ in STP_IN_port_set_cfg()
828 port->mcheck = True; in STP_IN_port_set_cfg()
832 port->adminPCost = uid_cfg->admin_port_path_cost; in STP_IN_port_set_cfg()
836 port->port_id = (uid_cfg->port_priority << 8) + port_index; in STP_IN_port_set_cfg()
840 port->adminPointToPointMac = uid_cfg->admin_point2point; in STP_IN_port_set_cfg()
841 port->p2p_recompute = True; in STP_IN_port_set_cfg()
845 port->adminEdge = uid_cfg->admin_edge; in STP_IN_port_set_cfg()
846 port->operEdge = port->adminEdge; in STP_IN_port_set_cfg()
848 if (port->edge->debug) { in STP_IN_port_set_cfg()
850 port->port_name, in STP_IN_port_set_cfg()
851 port->operEdge ? 'Y' : 'n'); in STP_IN_port_set_cfg()
858 if (port->roletrns->debug && port->admin_non_stp != uid_cfg->admin_non_stp) { in STP_IN_port_set_cfg()
860 port->port_name, in STP_IN_port_set_cfg()
864 port->admin_non_stp = uid_cfg->admin_non_stp; in STP_IN_port_set_cfg()
869 port->skip_rx = uid_cfg->skip_rx; in STP_IN_port_set_cfg()
873 port->skip_tx = uid_cfg->skip_tx; in STP_IN_port_set_cfg()
878 port->reselect = True; in STP_IN_port_set_cfg()
879 port->selected = False; in STP_IN_port_set_cfg()
895 register PORT_T* port; in STP_IN_dbg_set_port_trace() local
906 port = _stpapi_port_find (this, port_no); in STP_IN_dbg_set_port_trace()
907 if (! port) {/* port is absent in the stpm :( */ in STP_IN_dbg_set_port_trace()
910 rc = STP_port_trace_state_machine (port, mach_name, enadis); in STP_IN_dbg_set_port_trace()
939 PORT_T *port; in STP_IN_port_add() local
950 port = this->ports; in STP_IN_port_add()
959 if (!port) in STP_IN_port_add()
971 PORT_T *port; in STP_IN_port_remove() local
981 port = _stpapi_port_find (this, port_index); in STP_IN_port_remove()
982 if (! port) {/* port is absent in the stpm :( */ in STP_IN_port_remove()
987 STP_port_delete (port); in STP_IN_port_remove()