2 * @author Yugandhar Sarraju (ysarraju@in.ibm.com) - July 20, 2013
4 package org.openflow.codec.protocol.action;
6 import org.openflow.codec.io.IDataBuffer;
9 * Represents an action struct ofp_action_push
11 public class OFPActionPush extends OFPAction {
12 public static int MINIMUM_LENGTH = 8;
14 protected short etherType;
17 * @return the etherType
19 public short getEtherType() {
25 * the etherType to set
27 public void setEtherType(short etherType) {
28 this.etherType = etherType;
32 public void readFrom(IDataBuffer data) {
34 this.etherType = data.getShort();
39 public void writeTo(IDataBuffer data) {
41 data.putShort(this.etherType);
42 data.putShort((short) 0);
46 public int hashCode() {
47 final int prime = 389;
48 int result = super.hashCode();
49 result = prime * result + etherType;
54 public boolean equals(Object obj) {
58 if (!super.equals(obj)) {
61 if (!(obj instanceof OFPActionPush)) {
64 OFPActionPush other = (OFPActionPush) obj;
65 if (etherType != other.etherType) {