1 package org.openflow.protocol;
3 import java.nio.ByteBuffer;
5 import org.openflow.util.U16;
8 * Represents an ofp_echo_request message
10 * @author Rob Sherwood (rob.sherwood@stanford.edu)
13 public class OFEchoRequest extends OFMessage {
14 public static int MINIMUM_LENGTH = 8;
17 public OFEchoRequest() {
19 this.type = OFType.ECHO_REQUEST;
20 this.length = U16.t(MINIMUM_LENGTH);
24 public void readFrom(ByteBuffer bb) {
26 int datalen = this.getLengthU() - MINIMUM_LENGTH;
28 this.payload = new byte[datalen];
36 public byte[] getPayload() {
44 public void setPayload(byte[] payload) {
45 this.payload = payload;
49 public void writeTo(ByteBuffer bb) {