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).boolean
equals(java.lang.Object obj)
byte
getFlag()
Return flags.int
getVni()
Returns VNI(VXLAN Network Identifier).int
hashCode()
byte[]
serialize()
Serializes the packet.VXLAN
setFlag(byte flags)
Set flags.VXLAN
setVni(int vni)
Set VNI.java.lang.String
toString()
-
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:
hashCode
in classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in 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:
toString
in classjava.lang.Object
-
-