mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-16 14:04:59 -05:00
Add PTR record parsing
This commit is contained in:
parent
bc621bfcfb
commit
f13813186f
@ -9,6 +9,7 @@ import de.measite.minidns.record.AAAA;
|
|||||||
import de.measite.minidns.record.CNAME;
|
import de.measite.minidns.record.CNAME;
|
||||||
import de.measite.minidns.record.Data;
|
import de.measite.minidns.record.Data;
|
||||||
import de.measite.minidns.record.NS;
|
import de.measite.minidns.record.NS;
|
||||||
|
import de.measite.minidns.record.PTR;
|
||||||
import de.measite.minidns.record.SRV;
|
import de.measite.minidns.record.SRV;
|
||||||
import de.measite.minidns.util.NameUtil;
|
import de.measite.minidns.util.NameUtil;
|
||||||
|
|
||||||
@ -250,6 +251,9 @@ public class Record {
|
|||||||
case CNAME:
|
case CNAME:
|
||||||
this.payloadData = new CNAME();
|
this.payloadData = new CNAME();
|
||||||
break;
|
break;
|
||||||
|
case PTR:
|
||||||
|
this.payloadData = new PTR();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
System.out.println("Unparsed type " + type);
|
System.out.println("Unparsed type " + type);
|
||||||
this.payloadData = null;
|
this.payloadData = null;
|
||||||
|
19
src/main/java/de/measite/minidns/record/PTR.java
Normal file
19
src/main/java/de/measite/minidns/record/PTR.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
package de.measite.minidns.record;
|
||||||
|
|
||||||
|
import java.io.DataInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import de.measite.minidns.Record.TYPE;
|
||||||
|
import de.measite.minidns.util.NameUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A PTR record is handled like a CNAME
|
||||||
|
*/
|
||||||
|
public class PTR extends CNAME {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TYPE getType() {
|
||||||
|
return TYPE.PTR;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user