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
791fb2ce
Commit
791fb2ce
authored
May 16, 2014
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPv6
Code coverage 94.03%
parent
f0d31ab0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
WiresharkDatagramComparerIpV6MobilityHeader.cs
....Core.Test/WiresharkDatagramComparerIpV6MobilityHeader.cs
+2
-0
IpV6Tests.cs
PcapDotNet/src/PcapDotNet.Packets.Test/IpV6Tests.cs
+23
-0
No files found.
PcapDotNet/src/PcapDotNet.Core.Test/WiresharkDatagramComparerIpV6MobilityHeader.cs
View file @
791fb2ce
...
...
@@ -99,6 +99,8 @@ namespace PcapDotNet.Core.Test
protocol
==
IpV4Protocol
.
IsIsOverIpV4
||
protocol
==
IpV4Protocol
.
ComputerProtocolNetworkExecutive
||
protocol
==
IpV4Protocol
.
EncapsulationHeader
||
protocol
==
IpV4Protocol
.
GatewayToGateway
||
protocol
==
IpV4Protocol
.
SatMon
||
protocol
==
IpV4Protocol
.
RemoteVirtualDiskProtocol
))
return
false
;
...
...
PcapDotNet/src/PcapDotNet.Packets.Test/IpV6Tests.cs
View file @
791fb2ce
...
...
@@ -92,5 +92,28 @@ namespace PcapDotNet.Packets.Test
// Assert.AreEqual(payloadLayer.Data, packet.Ethernet.IpV6.Payload, "IP Payload");
}
}
[
TestMethod
]
public
void
AutomaticIpV6NextHeader
()
{
Packet
packet
=
PacketBuilder
.
Build
(
DateTime
.
Now
,
new
EthernetLayer
(),
new
IpV6Layer
(),
new
UdpLayer
());
Assert
.
AreEqual
(
IpV4Protocol
.
Udp
,
packet
.
Ethernet
.
IpV6
.
NextHeader
);
}
[
TestMethod
]
[
ExpectedException
(
typeof
(
ArgumentException
),
AllowDerivedTypes
=
false
)]
public
void
AutomaticIpV6NextHeaderNoNextLayer
()
{
PacketBuilder
.
Build
(
DateTime
.
Now
,
new
EthernetLayer
(),
new
IpV6Layer
());
Assert
.
Fail
();
}
[
TestMethod
]
[
ExpectedException
(
typeof
(
ArgumentException
),
AllowDerivedTypes
=
false
)]
public
void
AutomaticIpV6NextHeaderUnknownNextLayer
()
{
PacketBuilder
.
Build
(
DateTime
.
Now
,
new
EthernetLayer
(),
new
IpV6Layer
(),
new
PayloadLayer
());
Assert
.
Fail
();
}
}
}
\ No newline at end of file
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