List of usage examples for io.netty.buffer ByteBuf skipBytes
public abstract ByteBuf skipBytes(int length);
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF10SetNwDstActionDeserializer.java
License:Open Source License
@Override public Action deserialize(final ByteBuf input) { ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); SetNwDstCaseBuilder caseBuilder = new SetNwDstCaseBuilder(); SetNwDstActionBuilder actionBuilder = new SetNwDstActionBuilder(); actionBuilder.setIpAddress(ByteBufUtils.readIetfIpv4Address(input)); caseBuilder.setSetNwDstAction(actionBuilder.build()); builder.setActionChoice(caseBuilder.build()); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF10SetNwSrcActionDeserializer.java
License:Open Source License
@Override public Action deserialize(final ByteBuf input) { ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); SetNwSrcCaseBuilder caseBuilder = new SetNwSrcCaseBuilder(); SetNwSrcActionBuilder actionBuilder = new SetNwSrcActionBuilder(); actionBuilder.setIpAddress(ByteBufUtils.readIetfIpv4Address(input)); caseBuilder.setSetNwSrcAction(actionBuilder.build()); builder.setActionChoice(caseBuilder.build()); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF10SetNwTosActionDeserializer.java
License:Open Source License
@Override public Action deserialize(ByteBuf input) { ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); SetNwTosCaseBuilder caseBuilder = new SetNwTosCaseBuilder(); SetNwTosActionBuilder tosBuilder = new SetNwTosActionBuilder(); tosBuilder.setNwTos(input.readUnsignedByte()); caseBuilder.setSetNwTosAction(tosBuilder.build()); builder.setActionChoice(caseBuilder.build()); input.skipBytes(ActionConstants.PADDING_IN_SET_NW_TOS_ACTION); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF10SetTpDstActionDeserializer.java
License:Open Source License
@Override public Action deserialize(ByteBuf input) { ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); SetTpDstCaseBuilder caseBuilder = new SetTpDstCaseBuilder(); SetTpDstActionBuilder actionBuilder = new SetTpDstActionBuilder(); actionBuilder.setPort(new PortNumber((long) input.readUnsignedShort())); caseBuilder.setSetTpDstAction(actionBuilder.build()); builder.setActionChoice(caseBuilder.build()); input.skipBytes(ActionConstants.PADDING_IN_TP_PORT_ACTION); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF10SetTpSrcActionDeserializer.java
License:Open Source License
@Override public Action deserialize(ByteBuf input) { ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); SetTpSrcCaseBuilder caseBuilder = new SetTpSrcCaseBuilder(); SetTpSrcActionBuilder actionBuilder = new SetTpSrcActionBuilder(); actionBuilder.setPort(new PortNumber((long) input.readUnsignedShort())); caseBuilder.setSetTpSrcAction(actionBuilder.build()); builder.setActionChoice(caseBuilder.build()); input.skipBytes(ActionConstants.PADDING_IN_TP_PORT_ACTION); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF10SetVlanPcpActionDeserializer.java
License:Open Source License
@Override public Action deserialize(ByteBuf input) { org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); SetVlanPcpCaseBuilder caseBuilder = new SetVlanPcpCaseBuilder(); SetVlanPcpActionBuilder actionBuilder = new SetVlanPcpActionBuilder(); actionBuilder.setVlanPcp(input.readUnsignedByte()); caseBuilder.setSetVlanPcpAction(actionBuilder.build()); builder.setActionChoice(caseBuilder.build()); input.skipBytes(ActionConstants.PADDING_IN_SET_VLAN_PCP_ACTION); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF10SetVlanVidActionDeserializer.java
License:Open Source License
@Override public Action deserialize(ByteBuf input) { org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); SetVlanVidCaseBuilder caseBuilder = new SetVlanVidCaseBuilder(); SetVlanVidActionBuilder actionBuilder = new SetVlanVidActionBuilder(); actionBuilder.setVlanVid(input.readUnsignedShort()); caseBuilder.setSetVlanVidAction(actionBuilder.build()); builder.setActionChoice(caseBuilder.build()); input.skipBytes(ActionConstants.PADDING_IN_SET_VLAN_VID_ACTION); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF10StripVlanActionDeserializer.java
License:Open Source License
@Override public Action deserialize(ByteBuf input) { ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); builder.setActionChoice(getType());/*from www. j a v a 2s . c o m*/ input.skipBytes(ActionConstants.PADDING_IN_ACTION_HEADER); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF13GroupActionDeserializer.java
License:Open Source License
@Override public Action deserialize(ByteBuf input) { org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); GroupCaseBuilder caseBuilder = new GroupCaseBuilder(); GroupActionBuilder actionBuilder = new GroupActionBuilder(); actionBuilder.setGroupId(input.readUnsignedInt()); caseBuilder.setGroupAction(actionBuilder.build()); builder.setActionChoice(caseBuilder.build()); return builder.build(); }
From source file:org.opendaylight.openflowjava.protocol.impl.deserialization.action.OF13OutputActionDeserializer.java
License:Open Source License
@Override public Action deserialize(ByteBuf input) { org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder(); input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES); OutputActionCaseBuilder caseBuilder = new OutputActionCaseBuilder(); OutputActionBuilder actionBuilder = new OutputActionBuilder(); actionBuilder.setPort(new PortNumber(input.readUnsignedInt())); actionBuilder.setMaxLength(input.readUnsignedShort()); caseBuilder.setOutputAction(actionBuilder.build()); builder.setActionChoice(caseBuilder.build()); input.skipBytes(ActionConstants.OUTPUT_PADDING); return builder.build(); }