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
2d605154
Commit
2d605154
authored
Oct 20, 2011
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNS
parent
3bfe71e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
294 additions
and
2 deletions
+294
-2
RandomDnsExtensions.cs
...t/src/PcapDotNet.Packets.TestUtils/RandomDnsExtensions.cs
+5
-0
DnsResourceData.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsResourceData.cs
+285
-1
DnsType.cs
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsType.cs
+1
-0
RandomExtensions.cs
PcapDotNet/src/PcapDotNet.TestUtils/RandomExtensions.cs
+3
-1
No files found.
PcapDotNet/src/PcapDotNet.Packets.TestUtils/RandomDnsExtensions.cs
View file @
2d605154
...
...
@@ -137,6 +137,11 @@ namespace PcapDotNet.Packets.TestUtils
random
.
NextUInt
(),
random
.
NextUInt
(),
random
.
NextUShort
(),
random
.
NextDnsDomainName
(),
random
.
NextDataSegment
(
random
.
Next
(
100
)));
case
DnsType
.
Key
:
return
new
DnsResourceDataKey
(
random
.
NextBool
(),
random
.
NextBool
(),
random
.
NextEnum
<
DnsKeyNameType
>(),
random
.
NextFlags
<
DnsKeySignatory
>(),
random
.
NextEnum
<
DnsKeyProtocol
>(),
random
.
NextEnum
<
DnsAlgorithm
>(),
random
.
NextBool
()
?
(
ushort
?)
random
.
NextUShort
()
:
null
,
random
.
NextDataSegment
(
random
.
Next
(
100
)));
default
:
return
new
DnsResourceDataAnything
(
random
.
NextDataSegment
(
random
.
Next
(
100
)));
}
...
...
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsResourceData.cs
View file @
2d605154
This diff is collapsed.
Click to expand it.
PcapDotNet/src/PcapDotNet.Packets/Dns/DnsType.cs
View file @
2d605154
...
...
@@ -180,6 +180,7 @@
/// <summary>
/// RFCs 2535, 3755, 4034.
/// For security key.
/// Payload type: DnsResourceDataKey.
/// </summary>
Key
=
25
,
...
...
PcapDotNet/src/PcapDotNet.TestUtils/RandomExtensions.cs
View file @
2d605154
...
...
@@ -156,7 +156,9 @@ namespace PcapDotNet.TestUtils
List
<
object
>
enumValuesAsUnderlyingType
=
new
List
<
object
>(
enumValues
.
Select
(
value
=>
Convert
.
ChangeType
(
value
,
underlyingType
)));
List
<
ulong
>
enumValuesAsULong
;
if
(
underlyingType
==
typeof
(
ushort
))
if
(
underlyingType
==
typeof
(
byte
))
enumValuesAsULong
=
new
List
<
ulong
>(
enumValuesAsUnderlyingType
.
Cast
<
byte
>().
Select
(
value
=>
(
ulong
)
value
));
else
if
(
underlyingType
==
typeof
(
ushort
))
enumValuesAsULong
=
new
List
<
ulong
>(
enumValuesAsUnderlyingType
.
Cast
<
ushort
>().
Select
(
value
=>
(
ulong
)
value
));
else
throw
new
ArgumentException
(
"Type "
+
underlyingType
+
" is not supported"
);
...
...
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