Class RIPng

  • All Implemented Interfaces:
    IPacket

    public class RIPng
    extends BasePacket
    Representation of an RIPng Packet.
    • Field Detail

      • MIN_HEADER_LENGTH

        public static final int MIN_HEADER_LENGTH
        Routing Information Protocol Next Generation packet. ------------------------------------------ |cmdType (1) | version(1) | ------------------------------------------ |reserved (2) | ------------------------------------------ | route entries (n*20) | ------------------------------------------
        See Also:
        Constant Field Values
      • cmdType

        protected byte cmdType
      • version

        protected byte version
      • reserved

        protected short reserved
    • Constructor Detail

      • RIPng

        public RIPng()
    • Method Detail

      • getCmdType

        public byte getCmdType()
        Returns:
        the cmdType
      • setCmdType

        public RIPng setCmdType​(byte cmdType)
        Parameters:
        cmdType - the cmdType to set
        Returns:
        this
      • getVersion

        public byte getVersion()
        Returns:
        the version
      • setVersion

        public RIPng setVersion​(byte version)
        Parameters:
        version - the version to set
        Returns:
        this
      • getReserved

        public short getReserved()
        Returns:
        the reserved short
      • setReserved

        public RIPng setReserved​(short reserved)
        Parameters:
        reserved - the reserved short to set
        Returns:
        this
      • getRtEntries

        public List<RIPngEntry> getRtEntries()
        Returns:
        the route entries
      • setRtEntries

        public RIPng setRtEntries​(List<RIPngEntry> entries)
        Parameters:
        entries - the route entries to set
        Returns:
        this
      • serialize

        public byte[] serialize()
        Description copied from interface: IPacket
        Sets all payloads parent packet if applicable, then serializes this packet and all payloads.
        Returns:
        a byte[] containing this packet and payloads
      • deserializer

        public static Deserializer<RIPng> deserializer()
        Deserializer function for RIPng packets.
        Returns:
        deserializer function