public OFSwitchConfig() { super(); super.setLengthU(OFSwitchConfig.MINIMUM_LENGTH); }
/** * Write this offending message into the payload of the Error message * * @param offendingMsg */ public void setOffendingMsg(final OFMessage offendingMsg) { if (offendingMsg == null) { super.setLengthU(OFError.MINIMUM_LENGTH); } else { this.error = new byte[offendingMsg.getLengthU()]; final ChannelBuffer data = ChannelBuffers.wrappedBuffer(this.error); data.writerIndex(0); offendingMsg.writeTo(data); super.setLengthU(OFError.MINIMUM_LENGTH + offendingMsg.getLengthU()); } }