Class DhcpOption

    • Field Detail

      • code

        protected byte code
      • length

        protected byte length
      • data

        protected byte[] data
    • Constructor Detail

      • DhcpOption

        public DhcpOption()
    • Method Detail

      • 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<DhcpOption> deserializer()
        Deserializer function for DHCP option.
        Returns:
        deserializer function
      • getCode

        public byte getCode()
        Returns:
        the code
      • setCode

        public DhcpOption setCode​(byte code)
        Parameters:
        code - the code to set
        Returns:
        this
      • getLength

        public byte getLength()
        Returns:
        the length
      • setLength

        public DhcpOption setLength​(byte length)
        Parameters:
        length - the length to set
        Returns:
        this
      • getData

        public byte[] getData()
        Returns:
        the data
      • setData

        public DhcpOption setData​(byte[] data)
        Parameters:
        data - the data to set
        Returns:
        this