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
5d2a937d
Commit
5d2a937d
authored
Jul 18, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
90150a2e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
4 deletions
+10
-4
LivePacketDeviceTests.cs
PcapDotNet/src/PcapDotNet.Core.Test/LivePacketDeviceTests.cs
+1
-1
PcapDataLinkTests.cs
PcapDotNet/src/PcapDotNet.Core.Test/PcapDataLinkTests.cs
+4
-1
MarshalingServices.h
PcapDotNet/src/PcapDotNet.Core/MarshalingServices.h
+1
-0
PacketCommunicator.h
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.h
+1
-1
PacketDeviceOpenAttributes.h
PcapDotNet/src/PcapDotNet.Core/PacketDeviceOpenAttributes.h
+0
-0
PacketHeader.h
PcapDotNet/src/PcapDotNet.Core/PacketHeader.h
+1
-0
PcapLibrary.h
PcapDotNet/src/PcapDotNet.Core/PcapLibrary.h
+1
-0
WinPCapDotNet.Core.vcproj
PcapDotNet/src/PcapDotNet.Core/WinPCapDotNet.Core.vcproj
+1
-1
No files found.
PcapDotNet/src/PcapDotNet.Core.Test/LivePacketDeviceTests.cs
View file @
5d2a937d
...
@@ -645,6 +645,7 @@ namespace PcapDotNet.Core.Test
...
@@ -645,6 +645,7 @@ namespace PcapDotNet.Core.Test
PacketCommunicator
communicator
=
device
.
Open
();
PacketCommunicator
communicator
=
device
.
Open
();
try
try
{
{
Assert
.
AreEqual
(
new
PacketTotalStatistics
(
0
,
0
,
0
,
0
),
communicator
.
TotalStatistics
);
communicator
.
SetKernelBufferSize
(
2
*
1024
*
1024
);
// 2 MB instead of 1
communicator
.
SetKernelBufferSize
(
2
*
1024
*
1024
);
// 2 MB instead of 1
communicator
.
SetKernelMinimumBytesToCopy
(
10
);
// 10 bytes minimum to copy
communicator
.
SetKernelMinimumBytesToCopy
(
10
);
// 10 bytes minimum to copy
communicator
.
SetSamplingMethod
(
new
SamplingMethodNone
());
communicator
.
SetSamplingMethod
(
new
SamplingMethodNone
());
...
@@ -656,7 +657,6 @@ namespace PcapDotNet.Core.Test
...
@@ -656,7 +657,6 @@ namespace PcapDotNet.Core.Test
Assert
.
AreEqual
(
PacketCommunicatorMode
.
Capture
,
communicator
.
Mode
);
Assert
.
AreEqual
(
PacketCommunicatorMode
.
Capture
,
communicator
.
Mode
);
Assert
.
IsFalse
(
communicator
.
NonBlocking
);
Assert
.
IsFalse
(
communicator
.
NonBlocking
);
Assert
.
AreEqual
(
PacketDevice
.
DefaultSnapshotLength
,
communicator
.
SnapshotLength
);
Assert
.
AreEqual
(
PacketDevice
.
DefaultSnapshotLength
,
communicator
.
SnapshotLength
);
Assert
.
AreEqual
(
new
PacketTotalStatistics
(
0
,
0
,
0
,
0
),
communicator
.
TotalStatistics
);
return
communicator
;
return
communicator
;
}
}
catch
(
Exception
)
catch
(
Exception
)
...
...
PcapDotNet/src/PcapDotNet.Core.Test/PcapDataLinkTests.cs
View file @
5d2a937d
...
@@ -57,7 +57,7 @@ namespace PcapDotNet.Core.Test
...
@@ -57,7 +57,7 @@ namespace PcapDotNet.Core.Test
#
endregion
#
endregion
[
TestMethod
]
[
TestMethod
]
public
void
ConstructorsTest
()
public
void
TestValidDataLinks
()
{
{
PcapDataLink
dataLink
=
new
PcapDataLink
();
PcapDataLink
dataLink
=
new
PcapDataLink
();
Assert
.
AreEqual
(
new
PcapDataLink
(
"NULL"
),
dataLink
);
Assert
.
AreEqual
(
new
PcapDataLink
(
"NULL"
),
dataLink
);
...
@@ -76,8 +76,11 @@ namespace PcapDotNet.Core.Test
...
@@ -76,8 +76,11 @@ namespace PcapDotNet.Core.Test
}
}
Assert
.
AreEqual
(
new
PcapDataLink
(
dataLinkName
),
dataLink
);
Assert
.
AreEqual
(
new
PcapDataLink
(
dataLinkName
),
dataLink
);
Assert
.
IsTrue
(
new
PcapDataLink
(
dataLinkName
)
==
dataLink
);
Assert
.
IsFalse
(
new
PcapDataLink
(
dataLinkName
)
!=
dataLink
);
Assert
.
IsNotNull
(
dataLink
.
Description
);
Assert
.
IsNotNull
(
dataLink
.
Description
);
Assert
.
AreEqual
(
i
,
dataLink
.
Value
);
Assert
.
AreEqual
(
i
,
dataLink
.
Value
);
Assert
.
AreEqual
(
dataLink
.
Value
.
GetHashCode
(),
dataLink
.
GetHashCode
());
}
}
}
}
...
...
PcapDotNet/src/PcapDotNet.Core/MarshalingServices.h
View file @
5d2a937d
...
@@ -12,6 +12,7 @@ namespace PcapDotNet { namespace Core
...
@@ -12,6 +12,7 @@ namespace PcapDotNet { namespace Core
static
array
<
System
::
Byte
>^
UnamangedToManagedByteArray
(
const
unsigned
char
*
unmanagedByteArray
,
int
offset
,
int
count
);
static
array
<
System
::
Byte
>^
UnamangedToManagedByteArray
(
const
unsigned
char
*
unmanagedByteArray
,
int
offset
,
int
count
);
private
:
private
:
[
System
::
Diagnostics
::
DebuggerNonUserCode
]
MarshalingServices
(){}
MarshalingServices
(){}
};
};
}}
}}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.h
View file @
5d2a937d
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include "DeviceAddress.h"
#include "DeviceAddress.h"
#include "BerkeleyPacketFilter.h"
#include "BerkeleyPacketFilter.h"
#include "PacketDumpFile.h"
#include "PacketDumpFile.h"
#include "PacketDeviceOpen
Flag
s.h"
#include "PacketDeviceOpen
Attribute
s.h"
#include "PacketSampleStatistics.h"
#include "PacketSampleStatistics.h"
#include "PacketTotalStatistics.h"
#include "PacketTotalStatistics.h"
#include "PcapDataLink.h"
#include "PcapDataLink.h"
...
...
PcapDotNet/src/PcapDotNet.Core/PacketDeviceOpen
Flag
s.h
→
PcapDotNet/src/PcapDotNet.Core/PacketDeviceOpen
Attribute
s.h
View file @
5d2a937d
File moved
PcapDotNet/src/PcapDotNet.Core/PacketHeader.h
View file @
5d2a937d
...
@@ -10,6 +10,7 @@ namespace PcapDotNet { namespace Core
...
@@ -10,6 +10,7 @@ namespace PcapDotNet { namespace Core
static
void
GetPcapHeader
(
pcap_pkthdr
&
header
,
Packets
::
Packet
^
packet
);
static
void
GetPcapHeader
(
pcap_pkthdr
&
header
,
Packets
::
Packet
^
packet
);
private
:
private
:
[
System
::
Diagnostics
::
DebuggerNonUserCode
]
PacketHeader
(){}
PacketHeader
(){}
};
};
}}
}}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core/PcapLibrary.h
View file @
5d2a937d
...
@@ -11,6 +11,7 @@ namespace PcapDotNet { namespace Core
...
@@ -11,6 +11,7 @@ namespace PcapDotNet { namespace Core
}
}
private
:
private
:
[
System
::
Diagnostics
::
DebuggerNonUserCode
]
PcapLibrary
(){}
PcapLibrary
(){}
};
};
}}
}}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core/WinPCapDotNet.Core.vcproj
View file @
5d2a937d
...
@@ -258,7 +258,7 @@
...
@@ -258,7 +258,7 @@
>
>
</File>
</File>
<File
<File
RelativePath=
".\PacketDeviceOpen
Flag
s.h"
RelativePath=
".\PacketDeviceOpen
Attribute
s.h"
>
>
</File>
</File>
<File
<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