/// <inheritdoc /> public override void ReadData(WireReader reader, int length) { PrimaryName = reader.ReadDomainName(); Mailbox = reader.ReadDomainName(); SerialNumber = reader.ReadUInt32(); Refresh = reader.ReadTimeSpan32(); Retry = reader.ReadTimeSpan32(); Expire = reader.ReadTimeSpan32(); Minimum = reader.ReadTimeSpan32(); }
/// <inheritdoc /> public override IWireSerialiser Read(WireReader reader) { // Read standard properties of a resource record. Name = reader.ReadDomainName(); Type = (DnsType)reader.ReadUInt16(); Class = (DnsClass)reader.ReadUInt16(); TTL = reader.ReadTimeSpan32(); int length = reader.ReadUInt16(); // Find a specific class for the TYPE or default // to UnknownRecord. var specific = ResourceRegistry.Create(Type); specific.Name = Name; specific.Type = Type; specific.Class = Class; specific.TTL = TTL; // Read the specific properties of the resource record. var end = reader.Position + length; specific.ReadData(reader, length); if (reader.Position != end) { throw new InvalidDataException("Found extra data while decoding RDATA."); } return(specific); }
/// <inheritdoc /> public override void ReadData(WireReader reader, int length) { var end = reader.Position + length; TypeCovered = (DnsType)reader.ReadUInt16(); Algorithm = (SecurityAlgorithm)reader.ReadByte(); Labels = reader.ReadByte(); OriginalTTL = reader.ReadTimeSpan32(); SignatureExpiration = reader.ReadDateTime32(); SignatureInception = reader.ReadDateTime32(); KeyTag = reader.ReadUInt16(); SignerName = reader.ReadDomainName(); Signature = reader.ReadBytes(end - reader.Position); }