void Load(DnsRecordHeader header, IntPtr dataPointer) { base.Load(header, dataPointer); Win32DnsSrvRecord record = (Win32DnsSrvRecord)Marshal.PtrToStructure(dataPointer, typeof(Win32DnsSrvRecord)); this.target = record.NameTarget; this.priority = record.Priority; this.weight = record.Weight; this.port = record.Port; }
/// <summary> /// Loads the DNS dnsRecord. /// </summary> /// <param name="header">The header.</param> /// <param name="dataPointer">The data pointer.</param> virtual void Load(DnsRecordHeader header, IntPtr dataPointer) { this.name = header.Name; this.timeToLive = Math.Max(1, header.Ttl); }