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
6a6c0fc5
Commit
6a6c0fc5
authored
Jun 26, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
3360a520
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
118 additions
and
37 deletions
+118
-37
BpfFilter.cpp
PcapDotNet/src/PcapDotNet.Core/BpfFilter.cpp
+1
-4
BpfFilter.h
PcapDotNet/src/PcapDotNet.Core/BpfFilter.h
+1
-3
PacketHeader.cpp
PcapDotNet/src/PcapDotNet.Core/PacketHeader.cpp
+13
-0
PacketHeader.h
PcapDotNet/src/PcapDotNet.Core/PacketHeader.h
+12
-0
Pcap.h
PcapDotNet/src/PcapDotNet.Core/Pcap.h
+6
-0
PcapAddress.cpp
PcapDotNet/src/PcapDotNet.Core/PcapAddress.cpp
+1
-3
PcapAddress.h
PcapDotNet/src/PcapDotNet.Core/PcapAddress.h
+1
-2
PcapDeclarations.cpp
PcapDotNet/src/PcapDotNet.Core/PcapDeclarations.cpp
+1
-1
PcapDeclarations.h
PcapDotNet/src/PcapDotNet.Core/PcapDeclarations.h
+11
-0
PcapDeviceHandler.cpp
PcapDotNet/src/PcapDotNet.Core/PcapDeviceHandler.cpp
+1
-3
PcapDumpFile.cpp
PcapDotNet/src/PcapDotNet.Core/PcapDumpFile.cpp
+3
-7
PcapDumpFile.h
PcapDotNet/src/PcapDotNet.Core/PcapDumpFile.h
+1
-1
PcapLiveDevice.cpp
PcapDotNet/src/PcapDotNet.Core/PcapLiveDevice.cpp
+1
-3
PcapOfflineDevice.cpp
PcapDotNet/src/PcapDotNet.Core/PcapOfflineDevice.cpp
+1
-4
PcapSendQueue.cpp
PcapDotNet/src/PcapDotNet.Core/PcapSendQueue.cpp
+21
-0
PcapSendQueue.h
PcapDotNet/src/PcapDotNet.Core/PcapSendQueue.h
+19
-0
Timestamp.cpp
PcapDotNet/src/PcapDotNet.Core/Timestamp.cpp
+1
-3
Timestamp.h
PcapDotNet/src/PcapDotNet.Core/Timestamp.h
+1
-1
WinPCapDotNet.Core.vcproj
PcapDotNet/src/PcapDotNet.Core/WinPCapDotNet.Core.vcproj
+22
-2
No files found.
PcapDotNet/src/PcapDotNet.Core/BpfFilter.cpp
View file @
6a6c0fc5
#include "BpfFilter.h"
#include <stdio.h>
#include <pcap.h>
#include "Pcap.h"
#include "MarshalingServices.h"
using
namespace
System
;
...
...
PcapDotNet/src/PcapDotNet.Core/BpfFilter.h
View file @
6a6c0fc5
#pragma once
#include "PcapTypedefs.h"
#include "PcapAddress.h"
struct
bpf_program
;
#include "PcapDeclarations.h"
namespace
PcapDotNet
{
...
...
PcapDotNet/src/PcapDotNet.Core/PacketHeader.cpp
0 → 100644
View file @
6a6c0fc5
#include "PacketHeader.h"
#include "Pcap.h"
#include "Timestamp.h"
using
namespace
PcapDotNet
;
// static
void
PacketHeader
::
GetPcapHeader
(
pcap_pkthdr
&
header
,
BPacket
::
Packet
^
packet
)
{
Timestamp
::
DateTimeToPcapTimestamp
(
packet
->
Timestamp
,
header
.
ts
);
header
.
len
=
packet
->
Length
;
header
.
caplen
=
packet
->
Length
;
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core/PacketHeader.h
0 → 100644
View file @
6a6c0fc5
#pragma once
#include "PcapDeclarations.h"
namespace
PcapDotNet
{
private
ref
class
PacketHeader
{
public
:
static
void
GetPcapHeader
(
pcap_pkthdr
&
header
,
BPacket
::
Packet
^
packet
);
};
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core/Pcap.h
0 → 100644
View file @
6a6c0fc5
#pragma once
#include <stdio.h>
#include <pcap.h>
#include <remote-ext.h>
#include <Win32-Extensions.h>
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core/PcapAddress.cpp
View file @
6a6c0fc5
#include "PcapAddress.h"
#include <stdio.h>
#include <pcap.h>
#include "Pcap.h"
using
namespace
System
;
using
namespace
System
::
Text
;
...
...
PcapDotNet/src/PcapDotNet.Core/PcapAddress.h
View file @
6a6c0fc5
#pragma once
struct
sockaddr
;
typedef
struct
pcap_addr
pcap_addr_t
;
#include "PcapDeclarations.h"
namespace
PcapDotNet
{
...
...
PcapDotNet/src/PcapDotNet.Core/Pcap
Typedef
s.cpp
→
PcapDotNet/src/PcapDotNet.Core/Pcap
Declaration
s.cpp
View file @
6a6c0fc5
#include "Pcap
Typedef
s.h"
#include "Pcap
Declaration
s.h"
struct
pcap
{};
struct
pcap_dumper
{};
...
...
PcapDotNet/src/PcapDotNet.Core/Pcap
Typedef
s.h
→
PcapDotNet/src/PcapDotNet.Core/Pcap
Declaration
s.h
View file @
6a6c0fc5
#pragma once
struct
bpf_program
;
struct
pcap_pkthdr
;
struct
pcap_send_queue
;
struct
sockaddr
;
struct
timeval
;
typedef
struct
pcap_addr
pcap_addr_t
;
typedef
struct
pcap_dumper
pcap_dumper_t
;
typedef
struct
pcap
pcap_t
;
PcapDotNet/src/PcapDotNet.Core/PcapDeviceHandler.cpp
View file @
6a6c0fc5
#include "PcapDeviceHandler.h"
#include <stdio.h>
#include <pcap.h>
#include "MarshalingServices.h"
#include "PcapDumpFile.h"
#include "Timestamp.h"
#include "Pcap.h"
using
namespace
System
;
using
namespace
BPacket
;
...
...
PcapDotNet/src/PcapDotNet.Core/PcapDumpFile.cpp
View file @
6a6c0fc5
#include "PcapDumpFile.h"
#include <stdio.h>
#include <pcap.h>
#include "Timestamp.h"
#include "PacketHeader.h"
#include "MarshalingServices.h"
#include "Pcap.h"
using
namespace
System
;
using
namespace
PcapDotNet
;
...
...
@@ -19,9 +17,7 @@ PcapDumpFile::PcapDumpFile(pcap_dumper_t* handler, System::String^ filename)
void
PcapDumpFile
::
Dump
(
Packet
^
packet
)
{
pcap_pkthdr
header
;
Timestamp
::
DateTimeToPcapTimestamp
(
packet
->
Timestamp
,
header
.
ts
);
header
.
len
=
packet
->
Length
;
header
.
caplen
=
packet
->
Length
;
PacketHeader
::
GetPcapHeader
(
header
,
packet
);
std
::
string
unmanagedFilename
=
MarshalingServices
::
ManagedToUnmanagedString
(
_filename
);
pin_ptr
<
Byte
>
unamangedPacketBytes
=
&
packet
->
Buffer
[
0
];
...
...
PcapDotNet/src/PcapDotNet.Core/PcapDumpFile.h
View file @
6a6c0fc5
#pragma once
#include "Pcap
Typedef
s.h"
#include "Pcap
Declaration
s.h"
namespace
PcapDotNet
{
...
...
PcapDotNet/src/PcapDotNet.Core/PcapLiveDevice.cpp
View file @
6a6c0fc5
#include "PcapLiveDevice.h"
#include <stdio.h>
#include <pcap.h>
#include <remote-ext.h>
#include <string>
#include "MarshalingServices.h"
#include "Pcap.h"
using
namespace
System
;
using
namespace
System
::
Collections
::
Generic
;
...
...
PcapDotNet/src/PcapDotNet.Core/PcapOfflineDevice.cpp
View file @
6a6c0fc5
#include "PcapOfflineDevice.h"
#include <stdio.h>
#include <pcap.h>
#include <remote-ext.h>
#include <string>
#include "Pcap.h"
#include "MarshalingServices.h"
using
namespace
System
;
using
namespace
System
::
Collections
::
Generic
;
using
namespace
PcapDotNet
;
...
...
PcapDotNet/src/PcapDotNet.Core/PcapSendQueue.cpp
0 → 100644
View file @
6a6c0fc5
#include "PcapSendQueue.h"
#include "Pcap.h"
using
namespace
PcapDotNet
;
using
namespace
BPacket
;
PcapSendQueue
::
PcapSendQueue
(
unsigned
int
size
)
{
_pcapSendQueue
=
pcap_sendqueue_alloc
(
size
);
}
void
PcapSendQueue
::
Enqueue
(
Packet
^
packet
)
{
//pcap_sendqueue_queue(_pcapSendQueue,
}
PcapSendQueue
::~
PcapSendQueue
()
{
pcap_sendqueue_destroy
(
_pcapSendQueue
);
}
PcapDotNet/src/PcapDotNet.Core/PcapSendQueue.h
0 → 100644
View file @
6a6c0fc5
#pragma once
#include "PcapDeclarations.h"
namespace
PcapDotNet
{
public
ref
class
PcapSendQueue
:
System
::
IDisposable
{
public
:
PcapSendQueue
(
unsigned
int
size
);
void
Enqueue
(
BPacket
::
Packet
^
packet
);
~
PcapSendQueue
();
private
:
pcap_send_queue
*
_pcapSendQueue
;
};
}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core/Timestamp.cpp
View file @
6a6c0fc5
#include "Timestamp.h"
#include <stdio.h>
#include <pcap.h>
#include "Pcap.h"
using
namespace
System
;
using
namespace
PcapDotNet
;
...
...
PcapDotNet/src/PcapDotNet.Core/Timestamp.h
View file @
6a6c0fc5
#pragma once
struct
timeval
;
#include "PcapDeclarations.h"
namespace
PcapDotNet
{
...
...
PcapDotNet/src/PcapDotNet.Core/WinPCapDotNet.Core.vcproj
View file @
6a6c0fc5
...
...
@@ -218,6 +218,18 @@
RelativePath=
".\MarshalingServices.h"
>
</File>
<File
RelativePath=
".\PacketHeader.cpp"
>
</File>
<File
RelativePath=
".\PacketHeader.h"
>
</File>
<File
RelativePath=
".\Pcap.h"
>
</File>
<File
RelativePath=
".\PcapAddress.cpp"
>
...
...
@@ -226,6 +238,14 @@
RelativePath=
".\PcapAddress.h"
>
</File>
<File
RelativePath=
".\PcapDeclarations.cpp"
>
</File>
<File
RelativePath=
".\PcapDeclarations.h"
>
</File>
<File
RelativePath=
".\PcapDevice.cpp"
>
...
...
@@ -267,11 +287,11 @@
>
</File>
<File
RelativePath=
".\Pcap
Typedefs
.cpp"
RelativePath=
".\Pcap
SendQueue
.cpp"
>
</File>
<File
RelativePath=
".\Pcap
Typedefs
.h"
RelativePath=
".\Pcap
SendQueue
.h"
>
</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