Package org.pcap4j.packet
Class DnsRDataSoa
- 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
- Author:
- Kaito Yamada
- See Also:
- RFC 1035, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DnsRDataSoa.Builder
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
DnsRDataSoa.Builder
getBuilder()
int
getExpire()
long
getExpireAsLong()
int
getMinimum()
long
getMinimumAsLong()
DnsDomainName
getMName()
byte[]
getRawData()
int
getRefresh()
long
getRefreshAsLong()
int
getRetry()
long
getRetryAsLong()
DnsDomainName
getRName()
int
getSerial()
long
getSerialAsLong()
int
hashCode()
int
length()
static DnsRDataSoa
newInstance(byte[] rawData, int offset, int length)
A static factory method.java.lang.String
toString()
java.lang.String
toString(java.lang.String indent)
java.lang.String
toString(java.lang.String indent, byte[] headerRawData)
-
-
-
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:
length
in interfaceDnsResourceRecord.DnsRData
- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawData
in 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:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String indent)
- Specified by:
toString
in 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:
toString
in interfaceDnsResourceRecord.DnsRData
- Parameters:
indent
- indentheaderRawData
- the raw data of the DNS header including this RDATA.- Returns:
- String representation of this object.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-