Class DnsRDataCaa

java.lang.Object
org.pcap4j.packet.DnsRDataCaa
All Implemented Interfaces:
Serializable, DnsResourceRecord.DnsRData

public final class DnsRDataCaa extends Object implements DnsResourceRecord.DnsRData
DNS CAA RDATA
+0-1-2-3-4-5-6-7-|0-1-2-3-4-5-6-7-|
| Flags          | Tag Length = n |
+----------------+----------------+...+---------------+
| Tag char 0     | Tag char 1     |...| Tag char n-1  |
+----------------+----------------+...+---------------+
+----------------+----------------+.....+----------------+
| Value byte 0   | Value byte 1   |.....| Value byte m-1 |
+----------------+----------------+.....+----------------+
(m = d - n - 2) where d is the length of the RDATA section.)

where:
Flags: One octet containing bit flags for record. See rfc for details.

   Bit 0, Issuer Critical Flag
   All other bit positions are reserved for future use.

Tag: The property identifier, a sequence of US-ASCII characters.
Value: A sequence of octets representing the property value.
Since:
pcap4j 1.7.2
See Also:
  • Field Details

    • CAA_RR_MIN_LEN

      private static final int CAA_RR_MIN_LEN
      See Also:
    • serialVersionUID

      private static final long serialVersionUID
      A serial UID for serialization.
      See Also:
    • critical

      private final boolean critical
    • reservedFlags

      private final byte reservedFlags
    • tag

      private final String tag
    • value

      private final String value
  • Constructor Details

  • Method Details

    • newInstance

      public static DnsRDataCaa newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
      A static factory method. This method validates the arguments by ByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.
      Parameters:
      rawData - rawData
      offset - offset
      length - length
      Returns:
      a new DnsRDataCaa object.
      Throws:
      IllegalRawDataException - if parsing the raw data fails.
    • isCritical

      public boolean isCritical()
      Returns:
      true if the Issuer Critical Flag is set to 1; false otherwise.
    • getReservedFlags

      public byte getReservedFlags()
      Returns:
      reservedFlags (Bit 1 to 7 of the Flags field)
    • getTag

      public String getTag()
      Returns:
      tag
    • getValue

      public String getValue()
      Returns:
      value
    • length

      public int length()
      Specified by:
      length in interface DnsResourceRecord.DnsRData
      Returns:
      length
    • getRawData

      public byte[] getRawData()
      Specified by:
      getRawData in interface DnsResourceRecord.DnsRData
      Returns:
      raw data
    • getBuilder

      public DnsRDataCaa.Builder getBuilder()
      Returns:
      a new Builder object populated with this object's fields.
    • toString

      public String toString(String indent)
      Specified by:
      toString in interface DnsResourceRecord.DnsRData
      Parameters:
      indent - indent
      Returns:
      String representation of this object.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(String indent, byte[] headerRawData)
      Specified by:
      toString in interface DnsResourceRecord.DnsRData
      Parameters:
      indent - indent
      headerRawData - the raw data of the DNS header including this RDATA.
      Returns:
      String representation of this object.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object