- java.lang.Object
-
- org.pcap4j.packet.DnsRDataSoa
-
- All Implemented Interfaces:
java.io.Serializable,DnsResourceRecord.DnsRData
public final class DnsRDataSoa extends java.lang.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:
- RFC 1035, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDnsRDataSoa.Builder
-
Field Summary
Fields Modifier and Type Field Description private intexpireprivate intminimumprivate DnsDomainNamemNameprivate intrefreshprivate intretryprivate DnsDomainNamerNameprivate intserialprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateDnsRDataSoa(byte[] rawData, int offset, int length)privateDnsRDataSoa(DnsRDataSoa.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.StringconvertToString(java.lang.String indent, byte[] headerRawData)booleanequals(java.lang.Object obj)DnsRDataSoa.BuildergetBuilder()intgetExpire()longgetExpireAsLong()intgetMinimum()longgetMinimumAsLong()DnsDomainNamegetMName()byte[]getRawData()intgetRefresh()longgetRefreshAsLong()intgetRetry()longgetRetryAsLong()DnsDomainNamegetRName()intgetSerial()longgetSerialAsLong()inthashCode()intlength()static DnsRDataSoanewInstance(byte[] rawData, int offset, int length)A static factory method.java.lang.StringtoString()java.lang.StringtoString(java.lang.String indent)java.lang.StringtoString(java.lang.String indent, byte[] headerRawData)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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 Detail
-
DnsRDataSoa
private DnsRDataSoa(byte[] rawData, int offset, int length) throws IllegalRawDataException- Throws:
IllegalRawDataException
-
DnsRDataSoa
private DnsRDataSoa(DnsRDataSoa.Builder builder)
-
-
Method Detail
-
newInstance
public static DnsRDataSoa newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.- Parameters:
rawData- rawDataoffset- offsetlength- 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:
lengthin interfaceDnsResourceRecord.DnsRData- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawDatain interfaceDnsResourceRecord.DnsRData- Returns:
- raw data
-
getBuilder
public DnsRDataSoa.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String indent)
- Specified by:
toStringin interfaceDnsResourceRecord.DnsRData- Parameters:
indent- indent- Returns:
- String representation of this object.
-
toString
public java.lang.String toString(java.lang.String indent, byte[] headerRawData)- Specified by:
toStringin interfaceDnsResourceRecord.DnsRData- Parameters:
indent- indentheaderRawData- the raw data of the DNS header including this RDATA.- Returns:
- String representation of this object.
-
convertToString
private java.lang.String convertToString(java.lang.String indent, byte[] headerRawData)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-