Class DnsRDataSoa

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

public final class DnsRDataSoa extends Object implements DnsResourceRecord.DnsRData
DNS SOA RDATA
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/                     MNAME                     /
/                                               /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/                     RNAME                     /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    SERIAL                     |
|                                               |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    REFRESH                    |
|                                               |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                     RETRY                     |
|                                               |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    EXPIRE                     |
|                                               |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    MINIMUM                    |
|                                               |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

where:

MNAME           The <domain-name> of the name server that was the
                original or primary source of data for this zone.

RNAME           A <domain-name> which specifies the mailbox of the
                person responsible for this zone.

SERIAL          The unsigned 32 bit version number of the original copy
                of the zone.  Zone transfers preserve this value.  This
                value wraps and should be compared using sequence space
                arithmetic.

REFRESH         A 32 bit time interval before the zone should be
                refreshed.

RETRY           A 32 bit time interval that should elapse before a
                failed refresh should be retried.

EXPIRE          A 32 bit time value that specifies the upper limit on
                the time interval that can elapse before the zone is no
                longer authoritative.

MINIMUM         The unsigned 32 bit minimum TTL field that should be
                exported with any RR from this zone.
Since:
pcap4j 1.7.1
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • mName

      private final DnsDomainName mName
    • rName

      private final DnsDomainName rName
    • serial

      private final int serial
    • refresh

      private final int refresh
    • retry

      private final int retry
    • expire

      private final int expire
    • minimum

      private final int minimum
  • Constructor Details

  • Method Details

    • newInstance

      public static DnsRDataSoa 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 DnsRDataSoa object.
      Throws:
      IllegalRawDataException - if parsing the raw data fails.
    • getMName

      public DnsDomainName getMName()
      Returns:
      mName
    • getRName

      public DnsDomainName getRName()
      Returns:
      rName
    • getSerial

      public int getSerial()
      Returns:
      serial
    • getSerialAsLong

      public long getSerialAsLong()
      Returns:
      serial
    • getRefresh

      public int getRefresh()
      Returns:
      refresh
    • getRefreshAsLong

      public long getRefreshAsLong()
      Returns:
      refresh
    • getRetry

      public int getRetry()
      Returns:
      retry
    • getRetryAsLong

      public long getRetryAsLong()
      Returns:
      retry
    • getExpire

      public int getExpire()
      Returns:
      expire
    • getExpireAsLong

      public long getExpireAsLong()
      Returns:
      expire
    • getMinimum

      public int getMinimum()
      Returns:
      minimum
    • getMinimumAsLong

      public long getMinimumAsLong()
      Returns:
      minimum
    • 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 DnsRDataSoa.Builder getBuilder()
      Returns:
      a new Builder object populated with this object's fields.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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(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.
    • convertToString

      private String convertToString(String indent, byte[] headerRawData)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object