Beispiel #1
0
void BcmPort::setPortStatus(bool up) {
  int enabled = 1;
  int rv = opennsl_port_enable_get(unit_, port_, &enabled);
  // We ignore the return value.  If we fail to get the port status
  // we just tell the platformPort_ that it is enabled.

  platformPort_->linkStatusChanged(up, enabled);
}
Beispiel #2
0
bool BcmPort::isEnabled() {
  int enabled;
  auto rv = opennsl_port_enable_get(unit_, port_, &enabled);
  bcmCheckError(rv, "Failed to determine if port is already disabled");
  return static_cast<bool>(enabled);
}