internal override void ParseData(ReadOnlySpan <byte> resultData, int startPosition, int length) { if (length == 4) { SoaExpire = DnsMessageBase.ParseInt(resultData, ref startPosition); } }
internal override void ParseRecordData(byte[] resultData, int currentPosition, int length) { Version = resultData[currentPosition++]; Size = ConvertPrecision(resultData[currentPosition++]); HorizontalPrecision = ConvertPrecision(resultData[currentPosition++]); VerticalPrecision = ConvertPrecision(resultData[currentPosition++]); Latitude = ConvertDegree(DnsMessageBase.ParseInt(resultData, ref currentPosition)); Longitude = ConvertDegree(DnsMessageBase.ParseInt(resultData, ref currentPosition)); Altitude = ConvertAltitude(DnsMessageBase.ParseInt(resultData, ref currentPosition)); }
internal override void ParseRecordData(byte[] resultData, int startPosition, int length) { MasterName = DnsMessageBase.ParseDomainName(resultData, ref startPosition); ResponsibleName = DnsMessageBase.ParseDomainName(resultData, ref startPosition); SerialNumber = DnsMessageBase.ParseUInt(resultData, ref startPosition); RefreshInterval = DnsMessageBase.ParseInt(resultData, ref startPosition); RetryInterval = DnsMessageBase.ParseInt(resultData, ref startPosition); ExpireInterval = DnsMessageBase.ParseInt(resultData, ref startPosition); NegativeCachingTTL = DnsMessageBase.ParseInt(resultData, ref startPosition); }
internal override void ParseRecordData(byte[] resultData, int startPosition, int length) { int currentPosition = startPosition; TypeCovered = (RecordType)DnsMessageBase.ParseUShort(resultData, ref currentPosition); Algorithm = (DnsSecAlgorithm)resultData[currentPosition++]; Labels = resultData[currentPosition++]; OriginalTimeToLive = DnsMessageBase.ParseInt(resultData, ref currentPosition); SignatureExpiration = ParseDateTime(resultData, ref currentPosition); SignatureInception = ParseDateTime(resultData, ref currentPosition); KeyTag = DnsMessageBase.ParseUShort(resultData, ref currentPosition); SignersName = DnsMessageBase.ParseDomainName(resultData, ref currentPosition); Signature = DnsMessageBase.ParseByteData(resultData, ref currentPosition, length + startPosition - currentPosition); }
private static DateTime ParseDateTime(byte[] buffer, ref int currentPosition) { int timeStamp = DnsMessageBase.ParseInt(buffer, ref currentPosition); return(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(timeStamp).ToLocalTime()); }
internal override void ParseData(ReadOnlySpan <byte> resultData, int startPosition, int length) { LeaseTime = TimeSpan.FromSeconds(DnsMessageBase.ParseInt(resultData, ref startPosition)); }