Commit 16498b62 authored by Brickner_cp's avatar Brickner_cp

DNS

Code coverage 93.95%
parent a31b8194
...@@ -291,6 +291,16 @@ namespace PcapDotNet.Packets.Dns ...@@ -291,6 +291,16 @@ namespace PcapDotNet.Packets.Dns
} }
} }
public IEnumerable<DnsResourceRecord> ResourceRecords
{
get { return Queries.Cast<DnsResourceRecord>().Concat(DataResourceRecords); }
}
public IEnumerable<DnsDataResourceRecord> DataResourceRecords
{
get { return Answers.Concat(Authorities).Concat(Additionals); }
}
public DnsOptResourceRecord OptionsRecord public DnsOptResourceRecord OptionsRecord
{ {
get get
......
...@@ -43,7 +43,7 @@ namespace PcapDotNet.Packets.Dns ...@@ -43,7 +43,7 @@ namespace PcapDotNet.Packets.Dns
{ {
if (hostIdentityTag.Length > byte.MaxValue) if (hostIdentityTag.Length > byte.MaxValue)
throw new ArgumentOutOfRangeException("hostIdentityTag", hostIdentityTag.Length, string.Format("Cannot be bigger than {0}.", byte.MaxValue)); throw new ArgumentOutOfRangeException("hostIdentityTag", hostIdentityTag.Length, string.Format("Cannot be bigger than {0}.", byte.MaxValue));
if (hostIdentityTag.Length > ushort.MaxValue) if (publicKey.Length > ushort.MaxValue)
throw new ArgumentOutOfRangeException("publicKey", publicKey.Length, string.Format("Cannot be bigger than {0}.", ushort.MaxValue)); throw new ArgumentOutOfRangeException("publicKey", publicKey.Length, string.Format("Cannot be bigger than {0}.", ushort.MaxValue));
HostIdentityTag = hostIdentityTag; HostIdentityTag = hostIdentityTag;
PublicKeyAlgorithm = publicKeyAlgorithm; PublicKeyAlgorithm = publicKeyAlgorithm;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment