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
78cafa9a
Commit
78cafa9a
authored
Nov 15, 2014
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wireshark 1.12.1
parent
74149b5a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
38 deletions
+3
-38
IpV4OptionExtensions.cs
PcapDotNet/src/PcapDotNet.Core.Test/IpV4OptionExtensions.cs
+0
-20
PcapDotNet.Core.Test.csproj
...tNet/src/PcapDotNet.Core.Test/PcapDotNet.Core.Test.csproj
+0
-1
WiresharkDatagramComparerIpV4.cs
...src/PcapDotNet.Core.Test/WiresharkDatagramComparerIpV4.cs
+2
-16
WiresharkDatagramComparerTcp.cs
.../src/PcapDotNet.Core.Test/WiresharkDatagramComparerTcp.cs
+1
-1
No files found.
PcapDotNet/src/PcapDotNet.Core.Test/IpV4OptionExtensions.cs
deleted
100644 → 0
View file @
74149b5a
using
System
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Linq
;
using
System.Text
;
using
PcapDotNet.Base
;
using
PcapDotNet.Packets.IpV4
;
namespace
PcapDotNet.Core.Test
{
internal
static
class
IpV4OptionExtensions
{
public
static
bool
IsBadForWireshark
(
this
IpV4Options
options
)
{
// TODO: This shouldn't be a factor once https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7043 is fixed.
return
options
.
OptionsCollection
.
Any
(
option
=>
option
.
OptionType
==
IpV4OptionType
.
InternetTimestamp
&&
option
.
Length
<
5
||
option
.
OptionType
==
IpV4OptionType
.
BasicSecurity
&&
option
.
Length
!=
11
);
}
}
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core.Test/PcapDotNet.Core.Test.csproj
View file @
78cafa9a
...
@@ -138,7 +138,6 @@
...
@@ -138,7 +138,6 @@
<Compile
Include=
"LivePacketDeviceExtensionsTests.cs"
/>
<Compile
Include=
"LivePacketDeviceExtensionsTests.cs"
/>
<Compile
Include=
"LivePacketDeviceTests.cs"
/>
<Compile
Include=
"LivePacketDeviceTests.cs"
/>
<Compile
Include=
"MarshalingServicesTests.cs"
/>
<Compile
Include=
"MarshalingServicesTests.cs"
/>
<Compile
Include=
"IpV4OptionExtensions.cs"
/>
<Compile
Include=
"NetworkInterfaceExtensionsTests.cs"
/>
<Compile
Include=
"NetworkInterfaceExtensionsTests.cs"
/>
<Compile
Include=
"PacketTimestampTests.cs"
/>
<Compile
Include=
"PacketTimestampTests.cs"
/>
<Compile
Include=
"TcpOptionExtensions.cs"
/>
<Compile
Include=
"TcpOptionExtensions.cs"
/>
...
...
PcapDotNet/src/PcapDotNet.Core.Test/WiresharkDatagramComparerIpV4.cs
View file @
78cafa9a
...
@@ -140,28 +140,14 @@ namespace PcapDotNet.Core.Test
...
@@ -140,28 +140,14 @@ namespace PcapDotNet.Core.Test
case
"ip.dst"
:
case
"ip.dst"
:
case
"ip.dst_host"
:
case
"ip.dst_host"
:
if
(
field
.
Show
()
!=
ipV4Datagram
.
Destination
.
ToString
())
field
.
AssertShow
(
ipV4Datagram
.
Destination
.
ToString
());
{
// TODO: Remove this fallback once https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7043 is fixed.
field
.
AssertShow
(
ipV4Datagram
.
CurrentDestination
.
ToString
());
Assert
.
IsTrue
(
ipV4Datagram
.
Options
.
IsBadForWireshark
(),
string
.
Format
(
"Expected destination: {0}. Destination: {1}. Current destination: {2}."
,
field
.
Show
(),
ipV4Datagram
.
Destination
,
ipV4Datagram
.
CurrentDestination
));
}
field
.
AssertNoFields
();
field
.
AssertNoFields
();
break
;
break
;
case
"ip.addr"
:
case
"ip.addr"
:
case
"ip.host"
:
case
"ip.host"
:
Assert
.
IsTrue
(
field
.
Show
()
==
ipV4Datagram
.
Source
.
ToString
()
||
Assert
.
IsTrue
(
field
.
Show
()
==
ipV4Datagram
.
Source
.
ToString
()
||
field
.
Show
()
==
ipV4Datagram
.
Destination
.
ToString
()
||
field
.
Show
()
==
ipV4Datagram
.
Destination
.
ToString
());
// TODO: Remove this fallback once https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7043 is fixed.
field
.
Show
()
==
ipV4Datagram
.
CurrentDestination
.
ToString
()
&&
ipV4Datagram
.
Options
.
IsBadForWireshark
(),
string
.
Format
(
"Expected ip: {0}. "
,
field
.
Show
())
+
(
ipV4Datagram
.
IsValid
?
string
.
Format
(
"Source: {0}. Destination: {1}. Current destination: {2}."
,
ipV4Datagram
.
Source
,
ipV4Datagram
.
Destination
,
ipV4Datagram
.
CurrentDestination
)
:
""
));
field
.
AssertNoFields
();
field
.
AssertNoFields
();
break
;
break
;
...
...
PcapDotNet/src/PcapDotNet.Core.Test/WiresharkDatagramComparerTcp.cs
View file @
78cafa9a
...
@@ -188,7 +188,7 @@ namespace PcapDotNet.Core.Test
...
@@ -188,7 +188,7 @@ namespace PcapDotNet.Core.Test
case
"tcp.checksum"
:
case
"tcp.checksum"
:
field
.
AssertShowDecimal
(
tcpDatagram
.
Checksum
);
field
.
AssertShowDecimal
(
tcpDatagram
.
Checksum
);
IpV4Datagram
ipV4Datagram
=
ipDatagram
as
IpV4Datagram
;
IpV4Datagram
ipV4Datagram
=
ipDatagram
as
IpV4Datagram
;
if
(
ipV4Datagram
!=
null
&&
!
ipV4Datagram
.
Options
.
IsBadForWireshark
()
)
if
(
ipV4Datagram
!=
null
)
{
{
foreach
(
var
checksumField
in
field
.
Fields
())
foreach
(
var
checksumField
in
field
.
Fields
())
{
{
...
...
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