Пример #1
0
 internal SoaRecord(SmartPointer pointer)
 {
     _primaryNameServer = pointer.ReadDomain();
     _responsibleMailAddress = pointer.ReadDomain();
     _serial = pointer.ReadInt();
     _refresh = pointer.ReadInt();
     _retry = pointer.ReadInt();
     _expire = pointer.ReadInt();
     _defaultTTL = pointer.ReadInt();
 }
Пример #2
0
 internal SoaRecord(SmartPointer pointer)
 {
     _primaryNameServer      = pointer.ReadDomain();
     _responsibleMailAddress = pointer.ReadDomain();
     _serial     = pointer.ReadInt();
     _refresh    = pointer.ReadInt();
     _retry      = pointer.ReadInt();
     _expire     = pointer.ReadInt();
     _defaultTTL = pointer.ReadInt();
 }
Пример #3
0
        internal ResourceRecord(SmartPointer pointer)
        {
            _domain   = pointer.ReadDomain();
            _dnsType  = (DnsType)pointer.ReadShort();
            _dnsClass = (DnsClass)pointer.ReadShort();
            _ttl      = pointer.ReadInt();

            int recordLength = pointer.ReadShort();

            switch (_dnsType)
            {
            case DnsType.ANAME: _record = new ANameRecord(pointer); break;

            case DnsType.MX: _record = new MxRecord(pointer); break;

            case DnsType.NS: _record = new NsRecord(pointer); break;

            case DnsType.SOA: _record = new NsRecord(pointer); break;

            case DnsType.CNAME: _record = new CNameRecord(pointer); break;

            case DnsType.PTR: _record = new CNameRecord(pointer); break;

            default:
                pointer += recordLength;
                break;
            }
        }
Пример #4
0
        internal ResourceRecord(SmartPointer pointer)
        {
            _domain = pointer.ReadDomain();
            _dnsType = (DnsType)pointer.ReadShort();
            _dnsClass = (DnsClass)pointer.ReadShort();
            _ttl = pointer.ReadInt();

            int recordLength = pointer.ReadShort();

            switch (_dnsType)
            {
                case DnsType.ANAME: _record = new ANameRecord(pointer); break;
                case DnsType.MX: _record = new MxRecord(pointer); break;
                case DnsType.NS: _record = new NsRecord(pointer); break;
                case DnsType.SOA: _record = new NsRecord(pointer); break;
                case DnsType.CNAME: _record = new CNameRecord(pointer); break;
                case DnsType.PTR: _record = new CNameRecord(pointer); break;
                default:
                    pointer += recordLength;
                    break;
            }
        }