/// <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 IWireSerialiser Read(WireReader reader) { Name = reader.ReadDomainName(); Type = (DnsType)reader.ReadUInt16(); Class = (DnsClass)reader.ReadUInt16(); return(this); }
/// <inheritdoc /> public override void ReadData(WireReader reader, int length) { Algorithm = reader.ReadDomainName(); TimeSigned = reader.ReadDateTime48(); Fudge = reader.ReadTimeSpan16(); MAC = reader.ReadUInt16LengthPrefixedBytes(); OriginalMessageId = reader.ReadUInt16(); Error = (MessageStatus)reader.ReadUInt16(); OtherData = reader.ReadUInt16LengthPrefixedBytes(); }
/// <inheritdoc /> public override void ReadData(WireReader reader, int length) { var end = reader.Position + length; NextOwnerName = reader.ReadDomainName(); while (reader.Position < end) { Types.AddRange(reader.ReadBitmap().Select(t => (DnsType)t)); } }
/// <inheritdoc /> public override void ReadData(WireReader reader, int length) { Algorithm = reader.ReadDomainName(); Inception = reader.ReadDateTime32(); Expiration = reader.ReadDateTime32(); Mode = (KeyExchangeMode)reader.ReadUInt16(); Error = (MessageStatus)reader.ReadUInt16(); Key = reader.ReadUInt16LengthPrefixedBytes(); OtherData = reader.ReadUInt16LengthPrefixedBytes(); }
/// <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); }