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
66296bc9
Commit
66296bc9
authored
Dec 05, 2015
by
Boaz Brickner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wireshark 1.12.8
parent
99317efd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
19 deletions
+30
-19
WiresharkDatagramComparerIcmp.cs
...src/PcapDotNet.Core.Test/WiresharkDatagramComparerIcmp.cs
+25
-15
WiresharkDatagramComparerIgmp.cs
...src/PcapDotNet.Core.Test/WiresharkDatagramComparerIgmp.cs
+2
-3
WiresharkDatagramComparerTcp.cs
.../src/PcapDotNet.Core.Test/WiresharkDatagramComparerTcp.cs
+3
-1
No files found.
PcapDotNet/src/PcapDotNet.Core.Test/WiresharkDatagramComparerIcmp.cs
View file @
66296bc9
...
...
@@ -47,24 +47,34 @@ namespace PcapDotNet.Core.Test
var
icmpIpV4PayloadDatagram
=
icmpDatagram
as
IcmpIpV4PayloadDatagram
;
if
(
icmpIpV4PayloadDatagram
!=
null
)
{
if
(!
new
[]
{
IpV4Protocol
.
IpComp
,
// TODO: Support IpComp.
IpV4Protocol
.
Ax25
,
// TODO: Support Ax25.
IpV4Protocol
.
FibreChannel
,
// TODO: Support FibreChannel.
IpV4Protocol
.
MultiprotocolLabelSwitchingInIp
,
// TODO: Support MPLS.
IpV4Protocol
.
EtherIp
,
// TODO: Support EtherIP.
}.
Contains
(
icmpIpV4PayloadDatagram
.
IpV4
.
Protocol
))
IpV4Datagram
ipV4
=
icmpIpV4PayloadDatagram
.
IpV4
;
switch
(
ipV4
.
Protocol
)
{
if
(
icmpIpV4PayloadDatagram
.
IpV4
.
Protocol
==
IpV4Protocol
.
Udp
)
{
case
IpV4Protocol
.
Ip
:
if
(
ipV4
.
Payload
.
Length
<
IpV4Datagram
.
HeaderMinimumLength
)
field
.
AssertDataField
(
ipV4
.
Payload
);
else
field
.
AssertDataField
(
ipV4
.
IpV4
.
Payload
);
break
;
case
IpV4Protocol
.
Udp
:
// Uncomment this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10990 is fixed.
// field.AssertDataField(casted1.IpV4.Udp.Payload);
}
else
{
field
.
AssertDataField
(
icmpIpV4PayloadDatagram
.
IpV4
.
Payload
);
}
break
;
case
IpV4Protocol
.
IpComp
:
// TODO: Support IpComp.
case
IpV4Protocol
.
Ax25
:
// TODO: Support Ax25.
case
IpV4Protocol
.
FibreChannel
:
// TODO: Support FibreChannel.
case
IpV4Protocol
.
MultiprotocolLabelSwitchingInIp
:
// TODO: Support MPLS.
case
IpV4Protocol
.
EtherIp
:
// TODO: Support EtherIP.
case
IpV4Protocol
.
LayerTwoTunnelingProtocol
:
// TODO: Support LayerTwoTunnelingProtocol.
case
IpV4Protocol
.
AuthenticationHeader
:
// TODO: Support Authentication Header over IPv4.
break
;
default
:
field
.
AssertDataField
(
ipV4
.
Payload
);
break
;
}
}
else
...
...
PcapDotNet/src/PcapDotNet.Core.Test/WiresharkDatagramComparerIgmp.cs
View file @
66296bc9
...
...
@@ -72,8 +72,7 @@ namespace PcapDotNet.Core.Test
case
"Data"
:
if
(
field
.
Value
().
Length
>
0
)
{
// TODO: Change following https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=11582
field
.
AssertValue
(
field
.
Value
().
Length
/
2
==
igmpDatagram
.
Length
-
21
?
igmpDatagram
.
Skip
(
21
)
:
igmpDatagram
.
Skip
(
1
));
field
.
AssertValue
(
igmpDatagram
.
Skip
(
1
));
}
break
;
...
...
@@ -120,7 +119,7 @@ namespace PcapDotNet.Core.Test
break
;
case
"igmp.reply.pending"
:
if
(
igmpDatagram
.
MessageType
!=
IgmpMessageType
.
None
)
if
(
!
new
[]
{
IgmpMessageType
.
None
,
(
IgmpMessageType
)
12
}.
Contains
(
igmpDatagram
.
MessageType
)
)
field
.
AssertShowDecimal
(
igmpDatagram
.
RetryInThisManySeconds
);
break
;
...
...
PcapDotNet/src/PcapDotNet.Core.Test/WiresharkDatagramComparerTcp.cs
View file @
66296bc9
...
...
@@ -194,7 +194,9 @@ namespace PcapDotNet.Core.Test
{
case
"tcp.checksum_good"
:
checksumField
.
AssertNoFields
();
checksumField
.
AssertShowDecimal
(
tcpDatagram
.
Checksum
!=
0
&&
ipDatagram
.
IsTransportChecksumCorrect
);
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=11857 is fixed.
if
(!
field
.
Showname
().
EndsWith
(
" [unchecked, not all data available]"
))
checksumField
.
AssertShowDecimal
(
tcpDatagram
.
Checksum
!=
0
&&
ipDatagram
.
IsTransportChecksumCorrect
);
break
;
case
"tcp.checksum_bad"
:
...
...
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