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