Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pcap-Net
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Pcap-Net
Commits
0b18658d
Commit
0b18658d
authored
Nov 11, 2011
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNS
parent
9a460573
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
404 additions
and
5 deletions
+404
-5
RandomDnsExtensions.cs
...t/src/PcapDotNet.Packets.TestUtils/RandomDnsExtensions.cs
+28
-1
DnsResourceData.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsResourceData.cs
+375
-4
DnsType.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsType.cs
+1
-0
No files found.
PcapDotNet/src/PcapDotNet.Packets.TestUtils/RandomDnsExtensions.cs
View file @
0b18658d
...
@@ -258,12 +258,39 @@ namespace PcapDotNet.Packets.TestUtils
...
@@ -258,12 +258,39 @@ namespace PcapDotNet.Packets.TestUtils
random
.
NextDataSegment
(
random
.
Next
(
50
)));
random
.
NextDataSegment
(
random
.
Next
(
50
)));
case
DnsType
.
SshFp
:
case
DnsType
.
SshFp
:
return
new
DnsResourceDataSshFingerprint
(
random
.
NextEnum
<
DnsAlgorithm
>(),
random
.
NextEnum
<
DnsFingerprintType
>(),
return
new
DnsResourceDataSshFingerprint
(
random
.
NextEnum
<
Dns
FingerprintPublicKey
Algorithm
>(),
random
.
NextEnum
<
DnsFingerprintType
>(),
random
.
NextDataSegment
(
random
.
Next
(
20
)));
random
.
NextDataSegment
(
random
.
Next
(
20
)));
case
DnsType
.
IpSecKey
:
return
new
DnsResourceDataIpSecKey
(
random
.
NextByte
(),
random
.
NextDnsGateway
(),
random
.
NextEnum
<
DnsGatewayPublicKeyAlgorithm
>(),
random
.
NextDataSegment
(
random
.
Next
(
100
)));
default
:
default
:
return
new
DnsResourceDataAnything
(
random
.
NextDataSegment
(
random
.
Next
(
100
)));
return
new
DnsResourceDataAnything
(
random
.
NextDataSegment
(
random
.
Next
(
100
)));
}
}
}
}
public
static
DnsGateway
NextDnsGateway
(
this
Random
random
)
{
DnsGatewayType
gatewayType
=
random
.
NextEnum
<
DnsGatewayType
>();
switch
(
gatewayType
)
{
case
DnsGatewayType
.
None
:
return
DnsGateway
.
None
;
case
DnsGatewayType
.
IpV4
:
return
new
DnsGatewayIpV4
(
random
.
NextIpV4Address
());
case
DnsGatewayType
.
IpV6
:
return
new
DnsGatewayIpV6
(
random
.
NextIpV6Address
());
case
DnsGatewayType
.
DomainName
:
return
new
DnsGatewayDomainName
(
random
.
NextDnsDomainName
());
default
:
throw
new
InvalidOperationException
(
string
.
Format
(
"Invalid gateway type: {0}"
,
gatewayType
));
}
}
}
}
}
}
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsResourceData.cs
View file @
0b18658d
This diff is collapsed.
Click to expand it.
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsType.cs
View file @
0b18658d
...
@@ -321,6 +321,7 @@
...
@@ -321,6 +321,7 @@
/// <summary>
/// <summary>
/// RFC 4025.
/// RFC 4025.
/// IPSECKEY.
/// IPSECKEY.
/// Payload type: DnsResourceDataIpSecKey.
/// </summary>
/// </summary>
IpSecKey
=
45
,
IpSecKey
=
45
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment