Class BaseOptions

    • Field Detail

      • nextHeader

        protected byte nextHeader
      • headerExtLength

        protected byte headerExtLength
      • options

        protected byte[] options
      • type

        protected byte type
    • Constructor Detail

      • BaseOptions

        public BaseOptions()
    • Method Detail

      • getHeaderExtLength

        public byte getHeaderExtLength()
        Gets the extension length of this header.
        Returns:
        header length
      • setHeaderExtLength

        public BaseOptions setHeaderExtLength​(byte headerExtLength)
        Sets the extension length of this header.
        Parameters:
        headerExtLength - the header length to set
        Returns:
        this
      • getOptions

        public byte[] getOptions()
        Gets the options.
        Returns:
        the options
      • setOptions

        public BaseOptions setOptions​(byte[] options)
        Sets the options.
        Parameters:
        options - the options to set
        Returns:
        this
      • getType

        protected byte getType()
        Gets the type of this option.
        Returns:
        the type
      • setType

        protected BaseOptions setType​(byte type)
        Sets the type of this option. Must be either IPv6.PROTOCOL_HOPOPT or IPv6.PROTOCOL_DSTOPT
        Parameters:
        type - the type 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.
        Specified by:
        serialize in interface IPacket
        Returns:
        a byte[] containing this packet and payloads
      • deserializer

        public static Deserializer<BaseOptions> deserializer()
        Deserializer function for IPv6 base options.
        Returns:
        deserializer function