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
c79cf844
Commit
c79cf844
authored
Nov 19, 2011
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNS
parent
306d0252
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
323 additions
and
64 deletions
+323
-64
RandomDnsExtensions.cs
...t/src/PcapDotNet.Packets.TestUtils/RandomDnsExtensions.cs
+12
-2
DnsResourceData.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsResourceData.cs
+310
-62
DnsType.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsType.cs
+1
-0
No files found.
PcapDotNet/src/PcapDotNet.Packets.TestUtils/RandomDnsExtensions.cs
View file @
c79cf844
...
@@ -268,17 +268,27 @@ namespace PcapDotNet.Packets.TestUtils
...
@@ -268,17 +268,27 @@ namespace PcapDotNet.Packets.TestUtils
random
.
NextDataSegment
(
random
.
Next
(
100
)));
random
.
NextDataSegment
(
random
.
Next
(
100
)));
case
DnsType
.
NSec
:
case
DnsType
.
NSec
:
return
new
DnsResourceDataNextDomainSecure
(
random
.
NextDnsDomainName
(),
return
new
DnsResourceDataNextDomainSecure
(
random
.
NextDnsDomainName
(),
random
.
NextDnsTypeArray
(
random
.
Next
(
100
))
((
Func
<
DnsType
>)(()
=>
random
.
NextEnum
<
DnsType
>())).
GenerateArray
(
random
.
Next
(
100
))
);
);
case
DnsType
.
DnsKey
:
case
DnsType
.
DnsKey
:
return
new
DnsResourceDataDnsKey
(
random
.
NextBool
(),
random
.
NextBool
(),
random
.
NextByte
(),
random
.
NextEnum
<
DnsAlgorithm
>(),
random
.
NextDataSegment
(
random
.
Next
(
100
)));
return
new
DnsResourceDataDnsKey
(
random
.
NextBool
(),
random
.
NextBool
(),
random
.
NextByte
(),
random
.
NextEnum
<
DnsAlgorithm
>(),
random
.
NextDataSegment
(
random
.
Next
(
100
)));
case
DnsType
.
NSec3
:
return
new
DnsResourceDataNextDomainSecure3
(
random
.
NextEnum
<
DnsSecNSec3HashAlgorithm
>(),
random
.
NextFlags
<
DnsSecNSec3Flags
>(),
random
.
NextUShort
(),
random
.
NextDataSegment
(
random
.
Next
(
10
)),
random
.
NextDataSegment
(
10
),
random
.
NextDnsTypeArray
(
random
.
Next
(
100
)));
default
:
default
:
return
new
DnsResourceDataAnything
(
random
.
NextDataSegment
(
random
.
Next
(
100
)));
return
new
DnsResourceDataAnything
(
random
.
NextDataSegment
(
random
.
Next
(
100
)));
}
}
}
}
public
static
DnsType
[]
NextDnsTypeArray
(
this
Random
random
,
int
length
)
{
return
((
Func
<
DnsType
>)(()
=>
random
.
NextEnum
<
DnsType
>())).
GenerateArray
(
length
);
}
public
static
DnsGateway
NextDnsGateway
(
this
Random
random
)
public
static
DnsGateway
NextDnsGateway
(
this
Random
random
)
{
{
DnsGatewayType
gatewayType
=
random
.
NextEnum
<
DnsGatewayType
>();
DnsGatewayType
gatewayType
=
random
.
NextEnum
<
DnsGatewayType
>();
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsResourceData.cs
View file @
c79cf844
This diff is collapsed.
Click to expand it.
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsType.cs
View file @
c79cf844
...
@@ -358,6 +358,7 @@
...
@@ -358,6 +358,7 @@
/// <summary>
/// <summary>
/// RFC 5155.
/// RFC 5155.
/// NSEC3.
/// NSEC3.
/// Payload type: DnsResourceDataNextDomainSecure3.
/// </summary>
/// </summary>
NSec3
=
50
,
NSec3
=
50
,
...
...
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