X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fopenflow-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fcodec%2Fprotocol%2Faction%2FOFPActionNetworkTimeToLive.java;fp=third-party%2Fopenflow-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fcodec%2Fprotocol%2Faction%2FOFPActionNetworkTimeToLive.java;h=0000000000000000000000000000000000000000;hb=64fe0fbca1a6c2b77ad25f568d73a7eb64236d16;hp=f2090dfb4bac88780da14ac15bfee5d663f8c525;hpb=8b9a3ff2bbc83941254b46b818cbbae5cc1a3a5b;p=openflowjava.git diff --git a/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/action/OFPActionNetworkTimeToLive.java b/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/action/OFPActionNetworkTimeToLive.java deleted file mode 100644 index f2090dfb..00000000 --- a/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/action/OFPActionNetworkTimeToLive.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @author Yugandhar Sarraju (ysarraju@in.ibm.com) - July 20, 2013 - */ -package org.openflow.codec.protocol.action; - -import org.openflow.codec.io.IDataBuffer; - -/** - * Represents an action struct ofp_action_nw_ttl - */ -public class OFPActionNetworkTimeToLive extends OFPAction { - public static int MINIMUM_LENGTH = 8; - - protected byte networkTimeToLive; - - public OFPActionNetworkTimeToLive() { - super.setType(OFPActionType.SET_NW_TTL); - super.setLength((short) MINIMUM_LENGTH); - } - - /** - * @return the networkTimeToLive - */ - public short getNetworkTimeToLive() { - return networkTimeToLive; - } - - /** - * @param networkTimeToLive - * the networkTimeToLive to set - */ - public void setNetworkTimeToLive(byte networkTtl) { - this.networkTimeToLive = networkTtl; - } - - @Override - public void readFrom(IDataBuffer data) { - super.readFrom(data); - this.networkTimeToLive = data.get(); - data.getShort(); - data.get(); - } - - @Override - public void writeTo(IDataBuffer data) { - super.writeTo(data); - data.putShort(this.networkTimeToLive); - data.putShort((short) 0); - data.put((byte) 0); - } - - @Override - public int hashCode() { - final int prime = 373; - int result = super.hashCode(); - result = prime * result + networkTimeToLive; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!super.equals(obj)) { - return false; - } - if (!(obj instanceof OFPActionNetworkTimeToLive)) { - return false; - } - OFPActionNetworkTimeToLive other = (OFPActionNetworkTimeToLive) obj; - if (networkTimeToLive != other.networkTimeToLive) { - return false; - } - return true; - } -} \ No newline at end of file