Esempio n. 1
0
 public RecordSOA(RecordReader rr)
 {
     MNAME   = rr.ReadDomainName();
     RNAME   = rr.ReadDomainName();
     SERIAL  = rr.ReadUInt32();
     REFRESH = rr.ReadUInt32();
     RETRY   = rr.ReadUInt32();
     EXPIRE  = rr.ReadUInt32();
     MINIMUM = rr.ReadUInt32();
 }
Esempio n. 2
0
        public RecordTXT(RecordReader rr, int Length)
        {
            int pos = rr.Position;

            TXT = new List <string>();
            while ((rr.Position - pos) < Length)
            {
                TXT.Add(rr.ReadString());
            }
        }
Esempio n. 3
0
 public RecordLOC(RecordReader rr)
 {
     VERSION   = rr.ReadByte();           // must be 0!
     SIZE      = rr.ReadByte();
     HORIZPRE  = rr.ReadByte();
     VERTPRE   = rr.ReadByte();
     LATITUDE  = rr.ReadUInt32();
     LONGITUDE = rr.ReadUInt32();
     ALTITUDE  = rr.ReadUInt32();
 }
Esempio n. 4
0
 public RR(RecordReader rr)
 {
     TimeLived = 0;
     NAME      = rr.ReadDomainName();
     Type      = (Type)rr.ReadUInt16();
     Class     = (Class)rr.ReadUInt16();
     TTL       = rr.ReadUInt32();
     RDLENGTH  = rr.ReadUInt16();
     RECORD    = rr.ReadRecord(Type, RDLENGTH);
     RECORD.RR = this;
 }
Esempio n. 5
0
        public RecordDS(RecordReader rr)
        {
            ushort length = rr.ReadUInt16(-2);

            KEYTAG     = rr.ReadUInt16();
            ALGORITHM  = rr.ReadByte();
            DIGESTTYPE = rr.ReadByte();
            length    -= 4;
            DIGEST     = new byte[length];
            DIGEST     = rr.ReadBytes(length);
        }
Esempio n. 6
0
 public RecordTKEY(RecordReader rr)
 {
     ALGORITHM  = rr.ReadDomainName();
     INCEPTION  = rr.ReadUInt32();
     EXPIRATION = rr.ReadUInt32();
     MODE       = rr.ReadUInt16();
     ERROR      = rr.ReadUInt16();
     KEYSIZE    = rr.ReadUInt16();
     KEYDATA    = rr.ReadBytes(KEYSIZE);
     OTHERSIZE  = rr.ReadUInt16();
     OTHERDATA  = rr.ReadBytes(OTHERSIZE);
 }
Esempio n. 7
0
 public RecordTSIG(RecordReader rr)
 {
     ALGORITHMNAME = rr.ReadDomainName();
     TIMESIGNED    = rr.ReadUInt32() << 32 | rr.ReadUInt32();
     FUDGE         = rr.ReadUInt16();
     MACSIZE       = rr.ReadUInt16();
     MAC           = rr.ReadBytes(MACSIZE);
     ORIGINALID    = rr.ReadUInt16();
     ERROR         = rr.ReadUInt16();
     OTHERLEN      = rr.ReadUInt16();
     OTHERDATA     = rr.ReadBytes(OTHERLEN);
 }
Esempio n. 8
0
 public RecordSIG(RecordReader rr)
 {
     TYPECOVERED         = rr.ReadUInt16();
     ALGORITHM           = rr.ReadByte();
     LABELS              = rr.ReadByte();
     ORIGINALTTL         = rr.ReadUInt32();
     SIGNATUREEXPIRATION = rr.ReadUInt32();
     SIGNATUREINCEPTION  = rr.ReadUInt32();
     KEYTAG              = rr.ReadUInt16();
     SIGNERSNAME         = rr.ReadDomainName();
     SIGNATURE           = rr.ReadString();
 }
Esempio n. 9
0
 public RecordAAAA(RecordReader rr)
 {
     System.Net.IPAddress.TryParse(
         string.Format("{0:x}:{1:x}:{2:x}:{3:x}:{4:x}:{5:x}:{6:x}:{7:x}",
                       rr.ReadUInt16(),
                       rr.ReadUInt16(),
                       rr.ReadUInt16(),
                       rr.ReadUInt16(),
                       rr.ReadUInt16(),
                       rr.ReadUInt16(),
                       rr.ReadUInt16(),
                       rr.ReadUInt16()), out this.Address);
 }
Esempio n. 10
0
        public RecordWKS(RecordReader rr)
        {
            ushort length = rr.ReadUInt16(-2);

            ADDRESS = string.Format("{0}.{1}.{2}.{3}",
                                    rr.ReadByte(),
                                    rr.ReadByte(),
                                    rr.ReadByte(),
                                    rr.ReadByte());
            PROTOCOL = (int)rr.ReadByte();
            length  -= 5;
            BITMAP   = new byte[length];
            BITMAP   = rr.ReadBytes(length);
        }
Esempio n. 11
0
        public Response(IPEndPoint iPEndPoint, byte[] data)
        {
            Error       = "";
            Server      = iPEndPoint;
            TimeStamp   = DateTime.Now;
            MessageSize = data.Length;
            RecordReader rr = new RecordReader(data);

            Questions   = new List <Question>();
            Answers     = new List <AnswerRR>();
            Authorities = new List <AuthorityRR>();
            Additionals = new List <AdditionalRR>();

            header = new Header(rr);

            //if (header.RCODE != RCode.NoError)
            //	Error = header.RCODE.ToString();

            for (int intI = 0; intI < header.QDCOUNT; intI++)
            {
                Questions.Add(new Question(rr));
            }

            for (int intI = 0; intI < header.ANCOUNT; intI++)
            {
                Answers.Add(new AnswerRR(rr));
            }

            for (int intI = 0; intI < header.NSCOUNT; intI++)
            {
                Authorities.Add(new AuthorityRR(rr));
            }
            for (int intI = 0; intI < header.ARCOUNT; intI++)
            {
                Additionals.Add(new AdditionalRR(rr));
            }
        }
Esempio n. 12
0
 public AdditionalRR(RecordReader br)
     : base(br)
 {
 }
Esempio n. 13
0
 public AuthorityRR(RecordReader br)
     : base(br)
 {
 }
Esempio n. 14
0
 public AnswerRR(RecordReader br)
     : base(br)
 {
 }
Esempio n. 15
0
 public RecordMG(RecordReader rr)
 {
     MGMNAME = rr.ReadDomainName();
 }
Esempio n. 16
0
 public RecordDNAME(RecordReader rr)
 {
     TARGET = rr.ReadDomainName();
 }
Esempio n. 17
0
 public RecordMR(RecordReader rr)
 {
     NEWNAME = rr.ReadDomainName();
 }
Esempio n. 18
0
 public RecordMX(RecordReader rr)
 {
     PREFERENCE = rr.ReadUInt16();
     EXCHANGE   = rr.ReadDomainName();
 }
Esempio n. 19
0
 public RecordMINFO(RecordReader rr)
 {
     RMAILBX = rr.ReadDomainName();
     EMAILBX = rr.ReadDomainName();
 }
Esempio n. 20
0
 public RecordNS(RecordReader rr)
 {
     NSDNAME = rr.ReadDomainName();
 }
Esempio n. 21
0
 public RecordCNAME(RecordReader rr)
 {
     CNAME = rr.ReadDomainName();
 }
Esempio n. 22
0
 public RecordRP(RecordReader rr)
 {
     //MBOXDNAME = rr.ReadString();
     MBOXDNAME = rr.ReadDomainName();
     TXTDNAME  = rr.ReadDomainName();
 }
Esempio n. 23
0
 public RecordX25(RecordReader rr)
 {
     PSDNADDRESS = rr.ReadString();
 }
Esempio n. 24
0
 public RecordHINFO(RecordReader rr)
 {
     CPU = rr.ReadString();
     OS  = rr.ReadString();
 }
Esempio n. 25
0
 public RecordAFSDB(RecordReader rr)
 {
     SUBTYPE = rr.ReadUInt16();
     //HOSTNAME = rr.ReadString();
     HOSTNAME = rr.ReadDomainName();
 }
Esempio n. 26
0
 public RecordGPOS(RecordReader rr)
 {
     LONGITUDE = rr.ReadString();
     LATITUDE  = rr.ReadString();
     ALTITUDE  = rr.ReadString();
 }
Esempio n. 27
0
 public RecordRT(RecordReader rr)
 {
     PREFERENCE       = rr.ReadUInt16();
     INTERMEDIATEHOST = rr.ReadDomainName();
 }
Esempio n. 28
0
 public RecordNSAPPTR(RecordReader rr)
 {
     OWNER = rr.ReadString();
 }
Esempio n. 29
0
 public RecordMD(RecordReader rr)
 {
     MADNAME = rr.ReadDomainName();
 }
Esempio n. 30
0
		public RecordNSAP(RecordReader rr)
		{
			LENGTH = rr.ReadUInt16();
			NSAPADDRESS = rr.ReadBytes(LENGTH);
		}