Ejemplo n.º 1
0
 public SOARecord(DnsReader br)
 {
     _mname      = br.ReadDomain();
     _rname      = br.ReadDomain();
     _serial     = br.ReadInt32();
     _refresh    = br.ReadInt32();
     _retry      = br.ReadInt32();
     _expire     = br.ReadInt32();
     _minimumTtl = br.ReadInt32();
 }
Ejemplo n.º 2
0
 public SOARecord(DnsReader br)
 {
     _mname = br.ReadDomain();
     _rname = br.ReadDomain();
     _serial = br.ReadInt32();
     _refresh = br.ReadInt32();
     _retry = br.ReadInt32();
     _expire = br.ReadInt32();
     _minimumTtl = br.ReadInt32();
 }
Ejemplo n.º 3
0
        public ResourceRecord(DnsReader br)
        {
            _domain = br.ReadDomain();
            _qtype = (RecordType)br.ReadInt16();
            _qclass = (RecordClass)br.ReadInt16();
            _ttl = br.ReadInt32();

            int recordLength = br.ReadInt16();
            if (recordLength != 0)
            {
                switch (_qtype)
                {
                    case RecordType.A:     _record = new ARecord(br);      break;
                    case RecordType.CNAME: _record = new CNAMERecord(br);  break;
                    case RecordType.MX:    _record = new MXRecord(br);     break;
                    case RecordType.NS:    _record = new NSRecord(br);     break;
                    case RecordType.SOA:   _record = new SOARecord(br);    break;
                    case RecordType.TXT:   _record = new TXTRecord(br);    break;
                    case RecordType.PTR:   _record = new PTRERecord(br);	break;

                    // NetBIOS related records
                    case RecordType.NB:    _record = new NBRecord(br);     break;

                    default:
                        br += recordLength;
                        break;
                }
            }
        }
Ejemplo n.º 4
0
        public ResourceRecord(DnsReader br)
        {
            _domain = br.ReadDomain();
            _qtype = (RecordType)br.ReadInt16();
            _qclass = (RecordClass)br.ReadInt16();
            _ttl = br.ReadInt32();

            int recordLength = br.ReadInt16();
            if (recordLength != 0)
            {
                switch (_qtype)
                {
                    case RecordType.A:     _record = new ARecord(br);      break;
                    case RecordType.CNAME: _record = new CNAMERecord(br);  break;
                    case RecordType.MX:    _record = new MXRecord(br);     break;
                    case RecordType.NS:    _record = new NSRecord(br);     break;
                    case RecordType.SOA:   _record = new SOARecord(br);    break;
                    case RecordType.TXT:   _record = new TXTRecord(br);    break;
					case RecordType.PTR:   _record = new PTRERecord(br);	break;

                    // NetBIOS related records
                    case RecordType.NB:    _record = new NBRecord(br);     break;
                    
                    default:
                        br += recordLength;
                        break;
                }
            }
        }