java.lang.Object
org.pcap4j.packet.DnsRDataWks
- All Implemented Interfaces:
Serializable,DnsResourceRecord.DnsRData
DNS WKS RDATA
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ADDRESS |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| PROTOCOL | |
+--+--+--+--+--+--+--+--+ |
| |
/ <BIT MAP> /
/ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
where:
ADDRESS An 32 bit Internet address
PROTOCOL An 8 bit IP protocol number
<BIT MAP> A variable length bit map. The bit map must be a
multiple of 8 bits long.
- Since:
- pcap4j 1.7.1
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Inet4Addressprivate final byte[]private final IpNumberprivate static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDnsRDataWks(byte[] rawData, int offset, int length) privateDnsRDataWks(DnsRDataWks.Builder builder) -
Method Summary
Modifier and TypeMethodDescriptionprivate StringconvertToString(String indent, byte[] headerRawData) booleanbyte[]byte[]inthashCode()intlength()static DnsRDataWksnewInstance(byte[] rawData, int offset, int length) A static factory method.toPortNumbers(byte[] bitMap) toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
address
-
protocol
-
bitMap
private final byte[] bitMap -
portNumbers
-
-
Constructor Details
-
DnsRDataWks
- Throws:
IllegalRawDataException
-
DnsRDataWks
-
-
Method Details
-
newInstance
public static DnsRDataWks 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 DnsRDataWks object.
- Throws:
IllegalRawDataException- if parsing the raw data fails.
-
toPortNumbers
-
getAddress
- Returns:
- address
-
getProtocol
- Returns:
- protocol
-
getBitMap
public byte[] getBitMap()- Returns:
- bitMap. Another view of portNumbers.
- See Also:
-
getPortNumbers
- Returns:
- portNumbers. Another view of bitMap.
- See Also:
-
length
public int length()- Specified by:
lengthin interfaceDnsResourceRecord.DnsRData- Returns:
- length
-
getRawData
public byte[] getRawData()- Specified by:
getRawDatain interfaceDnsResourceRecord.DnsRData- Returns:
- raw data
-
getBuilder
- Returns:
- a new Builder object populated with this object's fields.
-
toString
-
toString
- Specified by:
toStringin interfaceDnsResourceRecord.DnsRData- Parameters:
indent- indent- Returns:
- String representation of this object.
-
toString
- 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
-
hashCode
public int hashCode() -
equals
-