Package org.onlab.packet
Class VXLAN
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.VXLAN
-
- All Implemented Interfaces:
IPacket
public class VXLAN extends BasePacket
Representation of a VXLAN(Virtual eXtensible Local Area Network) packet.
-
-
Constructor Summary
Constructors Constructor Description VXLAN()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<VXLAN>deserializer()Returns the deserializer closure (used by upper layer deserializer).booleanequals(java.lang.Object obj)bytegetFlag()Return flags.intgetVni()Returns VNI(VXLAN Network Identifier).inthashCode()byte[]serialize()Serializes the packet.VXLANsetFlag(byte flags)Set flags.VXLANsetVni(int vni)Set VNI.java.lang.StringtoString()-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Method Detail
-
serialize
public byte[] serialize()
Serializes the packet.- Returns:
- a byte[] containing this packet and payloads
-
getVni
public int getVni()
Returns VNI(VXLAN Network Identifier).- Returns:
- the VNI
-
setVni
public VXLAN setVni(int vni)
Set VNI.- Parameters:
vni- the VNI to set( 24 bits )- Returns:
- this
-
getFlag
public byte getFlag()
Return flags.- Returns:
- the flags
-
setFlag
public VXLAN setFlag(byte flags)
Set flags.- Parameters:
flags- the flags to set( 8 bits )- Returns:
- this
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classBasePacket
-
deserializer
public static Deserializer<VXLAN> deserializer()
Returns the deserializer closure (used by upper layer deserializer).- Returns:
- the deserializer closure
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-