@Override public void setHardwareAddress(final byte[] hardwareAddress) { super.setHardwareAddress(hardwareAddress); // no way to update MACAddress instances this.mac = new MACAddress(hardwareAddress); }
/** * Modifies the fields of a OVXPortStatus message so that it is consistent * with the configs of the corresponding OVXPort. * * @param portstat the virtual port status */ public void virtualizePortStat(OVXPortStatus portstat) { OFPhysicalPort desc = portstat.getDesc(); desc.setPortNumber(this.portNumber); desc.setHardwareAddress(this.hardwareAddress); desc.setCurrentFeatures(this.currentFeatures); desc.setAdvertisedFeatures(this.advertisedFeatures); desc.setSupportedFeatures(this.supportedFeatures); portstat.setDesc(desc); }
/** * Adds a default OpenFlow port to the give list of physical ports. * * @param ports the list of ports */ protected void addDefaultPort(final LinkedList<OFPhysicalPort> ports) { final OFPhysicalPort port = new OFPhysicalPort(); port.setPortNumber(OFPort.OFPP_LOCAL.getValue()); port.setName("OpenFlow Local Port"); port.setConfig(1); final byte[] addr = {(byte) 0xA4, (byte) 0x23, (byte) 0x05, (byte) 0x00, (byte) 0x00, (byte) 0x00}; port.setHardwareAddress(addr); port.setState(1); port.setAdvertisedFeatures(0); port.setCurrentFeatures(0); port.setSupportedFeatures(0); ports.add(port); }
ofPort.setName(ovxPort.getName()); ofPort.setConfig(ovxPort.getConfig()); ofPort.setHardwareAddress(ovxPort.getHardwareAddress()); ofPort.setState(ovxPort.getState()); ofPort.setAdvertisedFeatures(ovxPort.getAdvertisedFeatures());