Examples of PTRRecord


Examples of org.cipango.dns.record.PtrRecord

  }
 
  @Test
  public void testPtr() throws Exception
  {
    List<Record> records = _dnsService.lookup(new PtrRecord(InetAddress.getByName(IPV4_ADDR)));
    assertEquals(1, records.size());
    PtrRecord ptr = (PtrRecord) records.get(0);
    assertEquals("46-105-46-188.ovh.net", ptr.getPrtdName().toString());
    //System.out.println(records);
  }
View Full Code Here

Examples of org.cipango.dns.record.PtrRecord

 

  public void testPtrIpv6() throws Exception
  {
    //new PtrRecord(InetAddress.getByName(IPV6_ADDR));
    List<Record> records = _dnsService.lookup(new PtrRecord(InetAddress.getByName(IPV6_ADDR)));
    assertEquals(1, records.size());
    PtrRecord ptr = (PtrRecord) records.get(0);
    assertEquals("46-105-46-188.ovh.net", ptr.getPrtdName().toString());
    //System.out.println(records);
  }
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

                                        if (!((String) value).endsWith(".")) {
                                            value = ((String) value)+".";
                                        }
                                        if ("PTR".equals(type)) {
                                            records
                                                    .add(new PTRRecord(
                                                            hostname,
                                                            DClass.IN,
                                                            3600,
                                                            Name
                                                                    .fromString((String) value)));
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

                    case Type.MX:
                        MXRecord mx = (MXRecord) rr[i];
                        records.add(mx.getTarget().toString());
                        break;
                    case Type.PTR:
                        PTRRecord ptr = (PTRRecord) rr[i];
                        records.add(IPAddr.stripDot(ptr.getTarget().toString()));
                        break;
                    case Type.TXT:
                        TXTRecord txt = (TXTRecord) rr[i];
                        if (txt.getStrings().size() == 1) {
                            records.add(txt.getStrings().get(0));
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

                        case MX:
                            MXRecord mx = (MXRecord) rr[i];
                            res = mx.getTarget().toString();
                            break;
                        case PTR:
                            PTRRecord ptr = (PTRRecord) rr[i];
                            res = IPAddr.stripDot(ptr.getTarget().toString());
                            break;
                        case TXT:
                            TXTRecord txt = (TXTRecord) rr[i];
                            res = txt.rdataToString();
                            break;
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

                                        if (!((String) value).endsWith(".")) {
                                            value = ((String) value)+".";
                                        }
                                        if ("PTR".equals(type)) {
                                            records
                                                    .add(new PTRRecord(
                                                            hostname,
                                                            DClass.IN,
                                                            3600,
                                                            Name
                                                                    .fromString((String) value)));
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

        Record[] records = lookupNoException(name.toString(), Type.PTR, "PTR");

        if (records == null) {
            result = addr.getHostAddress();
        } else {
            PTRRecord ptr = (PTRRecord) records[0];
            result = ptr.getTarget().toString();
        }
        return result;
    }
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

    else if (rec instanceof AAAARecord) {
      AAAARecord arec = (AAAARecord) rec;
      rmap.put("addrv6", arec.getAddress().getHostAddress());
    }
    else if (rec instanceof PTRRecord) {
      PTRRecord ptr = (PTRRecord) rec;
      rmap.put("target", ptr.getTarget().toString());
    }
    else if (rec instanceof TXTRecord) {
      TXTRecord textRec = (TXTRecord) rec;
      rmap.put("text", textRec.toString());
    }
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

                                        if (!((String) value).endsWith(".")) {
                                            value = ((String) value)+".";
                                        }
                                        if ("PTR".equals(type)) {
                                            records
                                                    .add(new PTRRecord(
                                                            hostname,
                                                            DClass.IN,
                                                            3600,
                                                            Name
                                                                    .fromString((String) value)));
View Full Code Here

Examples of org.xbill.DNS.PTRRecord

                    case Type.MX:
                        MXRecord mx = (MXRecord) rr[i];
                        records.add(mx.getTarget().toString());
                        break;
                    case Type.PTR:
                        PTRRecord ptr = (PTRRecord) rr[i];
                        records.add(IPAddr.stripDot(ptr.getTarget().toString()));
                        break;
                    case Type.TXT:
                        TXTRecord txt = (TXTRecord) rr[i];
                        if (txt.getStrings().size() == 1) {
                            records.add((String)txt.getStrings().get(0));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.