public class PTRextends RRWithTarget
DNS PTR (Pointer) record payload.
Used for reverse DNS lookups, mapping IP addresses to domain names. Functionally similar to CNAME but used for reverse resolution.
  • Constructor Details

    • PTR

      PTR(String name)
      Create a PTR record pointing at a domain name given in text form.
      Parameters:
      name - the domain name
    • PTR

      PTR(DnsName name)
      Create a PTR record pointing at an already parsed domain name.
      Parameters:
      name - the domain name
  • Method Details

    • parse

      public static PTR parse(DataInputStream dis, byte[] data) throws IOException
      Parse a PTR record from a data stream.
      Parameters:
      dis - the data input stream
      data - the raw DNS message data
      Returns:
      the parsed PTR record
      Throws:
      IOException - if parsing fails
    • getType

      public Record.TYPE getType()
      Description copied from class: Data
      The payload type.
      Specified by:
      getType in class Data
      Returns:
      The DNS record type of this payload.