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
8e7ca0a9
Commit
8e7ca0a9
authored
May 19, 2010
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code Analysis
parent
03f5e460
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
CodeAnalysisDictionary.xml
PcapDotNet/src/PcapDotNet.Core/CodeAnalysisDictionary.xml
+1
-1
OfflinePacketCommunicator.cpp
PcapDotNet/src/PcapDotNet.Core/OfflinePacketCommunicator.cpp
+1
-1
PacketCommunicator.cpp
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.cpp
+1
-1
PacketSendBuffer.cpp
PcapDotNet/src/PcapDotNet.Core/PacketSendBuffer.cpp
+1
-1
PcapDataLink.cpp
PcapDotNet/src/PcapDotNet.Core/PcapDataLink.cpp
+4
-4
No files found.
PcapDotNet/src/PcapDotNet.Core/CodeAnalysisDictionary.xml
View file @
8e7ca0a9
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<Word>
datakit
</Word>
<Word>
datakit
</Word>
<Word>
ccitt
</Word>
<Word>
ccitt
</Word>
<Word>
iclfxbm
</Word>
<Word>
iclfxbm
</Word>
<Word>
enqueueing
</Word>
</Recognized>
</Recognized>
<Deprecated>
<Deprecated>
<!--Term PreferredAlternate="EnterpriseServices">complus</Term-->
<!--Term PreferredAlternate="EnterpriseServices">complus</Term-->
...
@@ -29,7 +30,6 @@
...
@@ -29,7 +30,6 @@
</Words>
</Words>
<Acronyms>
<Acronyms>
<CasingExceptions>
<CasingExceptions>
<!-->Acronym>Eof</Acronym-->
<Acronym>
Ip
</Acronym>
<Acronym>
Ip
</Acronym>
<Acronym>
Ms
</Acronym>
<Acronym>
Ms
</Acronym>
</CasingExceptions>
</CasingExceptions>
...
...
PcapDotNet/src/PcapDotNet.Core/OfflinePacketCommunicator.cpp
View file @
8e7ca0a9
...
@@ -5,7 +5,7 @@ using namespace PcapDotNet::Core;
...
@@ -5,7 +5,7 @@ using namespace PcapDotNet::Core;
PacketTotalStatistics
^
OfflinePacketCommunicator
::
TotalStatistics
::
get
()
PacketTotalStatistics
^
OfflinePacketCommunicator
::
TotalStatistics
::
get
()
{
{
throw
gcnew
InvalidOperationException
(
"Can't get
TotalStatistics
for offline devices"
);
throw
gcnew
InvalidOperationException
(
"Can't get
"
+
PacketTotalStatistics
::
typeid
->
Name
+
"
for offline devices"
);
}
}
void
OfflinePacketCommunicator
::
Transmit
(
PacketSendBuffer
^
,
bool
)
void
OfflinePacketCommunicator
::
Transmit
(
PacketSendBuffer
^
,
bool
)
...
...
PcapDotNet/src/PcapDotNet.Core/PacketCommunicator.cpp
View file @
8e7ca0a9
...
@@ -27,7 +27,7 @@ void PacketCommunicator::DataLink::set(PcapDataLink value)
...
@@ -27,7 +27,7 @@ void PacketCommunicator::DataLink::set(PcapDataLink value)
ReadOnlyCollection
<
PcapDataLink
>^
PacketCommunicator
::
SupportedDataLinks
::
get
()
ReadOnlyCollection
<
PcapDataLink
>^
PacketCommunicator
::
SupportedDataLinks
::
get
()
{
{
throw
gcnew
NotSupportedException
(
"
Supported DataLinks is unsupported to avoid winp
cap memory leak"
);
throw
gcnew
NotSupportedException
(
"
Unsupported property to avoid WinP
cap memory leak"
);
// pcap_free_datalinks(NULL);
// pcap_free_datalinks(NULL);
/*
/*
int* dataLinks;
int* dataLinks;
...
...
PcapDotNet/src/PcapDotNet.Core/PacketSendBuffer.cpp
View file @
8e7ca0a9
...
@@ -21,7 +21,7 @@ void PacketSendBuffer::Enqueue(Packet^ packet)
...
@@ -21,7 +21,7 @@ void PacketSendBuffer::Enqueue(Packet^ packet)
PacketHeader
::
GetPcapHeader
(
pcapHeader
,
packet
);
PacketHeader
::
GetPcapHeader
(
pcapHeader
,
packet
);
pin_ptr
<
Byte
>
unmanagedPacketBytes
=
&
packet
->
Buffer
[
0
];
pin_ptr
<
Byte
>
unmanagedPacketBytes
=
&
packet
->
Buffer
[
0
];
if
(
pcap_sendqueue_queue
(
_pcapSendQueue
,
&
pcapHeader
,
unmanagedPacketBytes
)
!=
0
)
if
(
pcap_sendqueue_queue
(
_pcapSendQueue
,
&
pcapHeader
,
unmanagedPacketBytes
)
!=
0
)
throw
gcnew
InvalidOperationException
(
"Failed enqueueing to
SendQ
ueue"
);
throw
gcnew
InvalidOperationException
(
"Failed enqueueing to
q
ueue"
);
}
}
PacketSendBuffer
::~
PacketSendBuffer
()
PacketSendBuffer
::~
PacketSendBuffer
()
...
...
PcapDotNet/src/PcapDotNet.Core/PcapDataLink.cpp
View file @
8e7ca0a9
...
@@ -37,7 +37,7 @@ DataLinkKind PcapDataLink::Kind::get()
...
@@ -37,7 +37,7 @@ DataLinkKind PcapDataLink::Kind::get()
case
1
:
case
1
:
return
DataLinkKind
::
Ethernet
;
return
DataLinkKind
::
Ethernet
;
default
:
default
:
throw
gcnew
NotSupportedException
(
"PcapDataLink
"
+
Value
.
ToString
(
CultureInfo
::
InvariantCulture
)
+
" - "
+
ToString
()
+
" is unsupported"
);
throw
gcnew
NotSupportedException
(
PcapDataLink
::
typeid
->
Name
+
"
"
+
Value
.
ToString
(
CultureInfo
::
InvariantCulture
)
+
" - "
+
ToString
()
+
" is unsupported"
);
}
}
}
}
...
@@ -51,7 +51,7 @@ String^ PcapDataLink::Name::get()
...
@@ -51,7 +51,7 @@ String^ PcapDataLink::Name::get()
{
{
const
char
*
name
=
pcap_datalink_val_to_name
(
Value
);
const
char
*
name
=
pcap_datalink_val_to_name
(
Value
);
if
(
name
==
NULL
)
if
(
name
==
NULL
)
throw
gcnew
InvalidOperationException
(
"datalink
"
+
Value
.
ToString
(
CultureInfo
::
InvariantCulture
)
+
" has no name"
);
throw
gcnew
InvalidOperationException
(
PcapDataLink
::
typeid
->
Name
+
"
"
+
Value
.
ToString
(
CultureInfo
::
InvariantCulture
)
+
" has no name"
);
return
gcnew
String
(
name
);
return
gcnew
String
(
name
);
}
}
...
@@ -60,7 +60,7 @@ String^ PcapDataLink::Description::get()
...
@@ -60,7 +60,7 @@ String^ PcapDataLink::Description::get()
{
{
const
char
*
description
=
pcap_datalink_val_to_description
(
Value
);
const
char
*
description
=
pcap_datalink_val_to_description
(
Value
);
if
(
description
==
NULL
)
if
(
description
==
NULL
)
throw
gcnew
InvalidOperationException
(
"datalink
"
+
Value
.
ToString
(
CultureInfo
::
InvariantCulture
)
+
" has no description"
);
throw
gcnew
InvalidOperationException
(
PcapDataLink
::
typeid
->
Name
+
"
"
+
Value
.
ToString
(
CultureInfo
::
InvariantCulture
)
+
" has no description"
);
return
gcnew
String
(
description
);
return
gcnew
String
(
description
);
}
}
...
@@ -110,6 +110,6 @@ int PcapDataLink::KindToValue(DataLinkKind kind)
...
@@ -110,6 +110,6 @@ int PcapDataLink::KindToValue(DataLinkKind kind)
case
DataLinkKind
:
:
Ethernet
:
case
DataLinkKind
:
:
Ethernet
:
return
1
;
return
1
;
default
:
default
:
throw
gcnew
NotSupportedException
(
"PcapDataLink
kind "
+
kind
.
ToString
()
+
" is unsupported"
);
throw
gcnew
NotSupportedException
(
PcapDataLink
::
typeid
->
Name
+
"
kind "
+
kind
.
ToString
()
+
" is unsupported"
);
}
}
}
}
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