Class VXLAN

  • All Implemented Interfaces:
    IPacket

    public class VXLAN
    extends BasePacket
    Representation of a VXLAN(Virtual eXtensible Local Area Network) packet.
    • Field Detail

      • flags

        protected byte flags
      • rsvd1

        protected byte[] rsvd1
      • vni

        protected byte[] vni
      • rsvd2

        protected byte rsvd2
    • Constructor Detail

      • VXLAN

        public VXLAN()
    • 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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class BasePacket
      • 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 class java.lang.Object