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
ab01160e
Commit
ab01160e
authored
Jul 03, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
4239204c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
193 additions
and
94 deletions
+193
-94
LivePacketDeviceTests.cs
PcapDotNet/src/PcapDotNet.Core.Test/LivePacketDeviceTests.cs
+183
-94
PacketCommunicator.cpp
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.cpp
+8
-0
PacketCommunicator.h
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.h
+2
-0
No files found.
PcapDotNet/src/PcapDotNet.Core.Test/LivePacketDeviceTests.cs
View file @
ab01160e
This diff is collapsed.
Click to expand it.
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.cpp
View file @
ab01160e
...
...
@@ -170,7 +170,10 @@ PacketCommunicatorReceiveResult PacketCommunicator::GetSomePackets([Out] int% nu
if
(
numPacketsGot
==
-
1
)
throw
BuildInvalidOperation
(
"Failed reading from device"
);
if
(
numPacketsGot
==
-
2
)
{
numPacketsGot
=
0
;
return
PacketCommunicatorReceiveResult
::
BreakLoop
;
}
return
PacketCommunicatorReceiveResult
::
Ok
;
}
...
...
@@ -225,6 +228,11 @@ PacketCommunicatorReceiveResult PacketCommunicator::GetStatistics(int numStatist
return
PacketCommunicatorReceiveResult
::
Ok
;
}
void
PacketCommunicator
::
Break
()
{
pcap_breakloop
(
_pcapDescriptor
);
}
void
PacketCommunicator
::
SendPacket
(
Packet
^
packet
)
{
pin_ptr
<
Byte
>
unamangedPacketBytes
;
...
...
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.h
View file @
ab01160e
...
...
@@ -91,6 +91,8 @@ namespace PcapDotNet { namespace Core
PacketCommunicatorReceiveResult
GetNextStatistics
([
System
::
Runtime
::
InteropServices
::
Out
]
PacketSampleStatistics
^%
statistics
);
PacketCommunicatorReceiveResult
GetStatistics
(
int
numStatistics
,
HandleStatistics
^
callBack
);
void
Break
();
void
SendPacket
(
Packets
::
Packet
^
packet
);
void
Transmit
(
PacketSendQueue
^
sendQueue
,
bool
isSync
);
...
...
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