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
f3580f3a
Commit
f3580f3a
authored
Jul 05, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
cb0cde76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
BerkeleyPacketFilterTests.cs
...Net/src/PcapDotNet.Core.Test/BerkeleyPacketFilterTests.cs
+1
-1
BerkeleyPacketFilter.cpp
PcapDotNet/src/PcapDotNet.Core/BerkeleyPacketFilter.cpp
+1
-1
LivePacketCommunicator.h
PcapDotNet/src/PcapDotNet.Core/LivePacketCommunicator.h
+3
-0
PacketCommunicator.h
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.h
+3
-0
No files found.
PcapDotNet/src/PcapDotNet.Core.Test/BerkeleyPacketFilterTests.cs
View file @
f3580f3a
...
@@ -58,7 +58,7 @@ namespace PcapDotNet.Core.Test
...
@@ -58,7 +58,7 @@ namespace PcapDotNet.Core.Test
#
endregion
#
endregion
[
TestMethod
]
[
TestMethod
]
[
ExpectedException
(
typeof
(
InvalidOperation
Exception
))]
[
ExpectedException
(
typeof
(
Argument
Exception
))]
public
void
BadFilterErrorTest
()
public
void
BadFilterErrorTest
()
{
{
using
(
PacketCommunicator
communicator
=
LivePacketDeviceTests
.
OpenLiveDevice
())
using
(
PacketCommunicator
communicator
=
LivePacketDeviceTests
.
OpenLiveDevice
())
...
...
PcapDotNet/src/PcapDotNet.Core/BerkeleyPacketFilter.cpp
View file @
f3580f3a
...
@@ -85,7 +85,7 @@ void BerkeleyPacketFilter::Initialize(pcap_t* pcapDescriptor, String^ filterStri
...
@@ -85,7 +85,7 @@ void BerkeleyPacketFilter::Initialize(pcap_t* pcapDescriptor, String^ filterStri
{
{
if
(
pcap_compile
(
pcapDescriptor
,
_bpf
,
const_cast
<
char
*>
(
unmanagedFilterString
.
c_str
()),
1
,
netmaskValue
)
<
0
)
if
(
pcap_compile
(
pcapDescriptor
,
_bpf
,
const_cast
<
char
*>
(
unmanagedFilterString
.
c_str
()),
1
,
netmaskValue
)
<
0
)
{
{
gcnew
ArgumentException
(
"An error has occured when compiling the filter
: "
+
PcapError
::
GetErrorMessage
(
pcapDescriptor
));
throw
gcnew
ArgumentException
(
"An error has occured when compiling the filter <"
+
filterString
+
">
: "
+
PcapError
::
GetErrorMessage
(
pcapDescriptor
));
}
}
}
}
catch
(...)
catch
(...)
...
...
PcapDotNet/src/PcapDotNet.Core/LivePacketCommunicator.h
View file @
f3580f3a
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
namespace
PcapDotNet
{
namespace
Core
namespace
PcapDotNet
{
namespace
Core
{
{
/// <summary>
/// A network device packet communicator.
/// </summary>
public
ref
class
LivePacketCommunicator
:
PacketCommunicator
public
ref
class
LivePacketCommunicator
:
PacketCommunicator
{
{
public
:
public
:
...
...
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.h
View file @
f3580f3a
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
namespace
PcapDotNet
{
namespace
Core
namespace
PcapDotNet
{
namespace
Core
{
{
/// <summary>
/// Used to receive and send packets accross the network or to read and write packets to a pcap file.
/// </summary>
public
ref
class
PacketCommunicator
abstract
:
System
::
IDisposable
public
ref
class
PacketCommunicator
abstract
:
System
::
IDisposable
{
{
public
:
public
:
...
...
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