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
60966205
Commit
60966205
authored
Jul 24, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
9fc934bc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
5 deletions
+38
-5
CodeAnalysisDictionary.xml
PcapDotNet/src/Packets/CodeAnalysisDictionary.xml
+25
-0
Datagram.cs
PcapDotNet/src/Packets/Datagram.cs
+1
-0
EthernetType.cs
PcapDotNet/src/Packets/EthernetType.cs
+1
-1
IpV4Address.cs
PcapDotNet/src/Packets/IpV4Address.cs
+2
-2
MoreByteArray.cs
PcapDotNet/src/Packets/MoreByteArray.cs
+4
-0
Packets.csproj
PcapDotNet/src/Packets/Packets.csproj
+3
-0
BerkeleyPacketFilter.cpp
PcapDotNet/src/PcapDotNet.Core/BerkeleyPacketFilter.cpp
+1
-1
WinPCapDotNet.Core.vcproj
PcapDotNet/src/PcapDotNet.Core/WinPCapDotNet.Core.vcproj
+1
-1
No files found.
PcapDotNet/src/Packets/CodeAnalysisDictionary.xml
0 → 100644
View file @
60966205
<?xml version="1.0" encoding="utf-8" ?>
<Dictionary>
<Words>
<Unrecognized>
<!--Word>cb</Word-->
</Unrecognized>
<Recognized>
<Word>
Endianity
</Word>
</Recognized>
<Deprecated>
<!--Term PreferredAlternate="EnterpriseServices">complus</Term-->
</Deprecated>
<Compound>
<!--Term CompoundAlternate="DataStore">datastore</Term-->
</Compound>
<DiscreteExceptions>
<!--Term>netmask</Term-->
</DiscreteExceptions>
</Words>
<Acronyms>
<CasingExceptions>
<Acronym>
Ip
</Acronym>
</CasingExceptions>
</Acronyms>
</Dictionary>
\ No newline at end of file
PcapDotNet/src/Packets/Datagram.cs
View file @
60966205
...
@@ -40,6 +40,7 @@ namespace Packets
...
@@ -40,6 +40,7 @@ namespace Packets
get
{
return
_startOffset
;
}
get
{
return
_startOffset
;
}
}
}
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Naming"
,
"CA1720:IdentifiersShouldNotContainTypeNames"
,
MessageId
=
"ushort"
)]
protected
ushort
ReadUShort
(
int
offset
,
Endianity
endianity
)
protected
ushort
ReadUShort
(
int
offset
,
Endianity
endianity
)
{
{
return
_buffer
.
ReadUShort
(
StartOffset
+
offset
,
endianity
);
return
_buffer
.
ReadUShort
(
StartOffset
+
offset
,
endianity
);
...
...
PcapDotNet/src/Packets/EthernetType.cs
View file @
60966205
...
@@ -5,7 +5,7 @@ namespace Packets
...
@@ -5,7 +5,7 @@ namespace Packets
None
,
None
,
IpV4
=
0x0800
,
IpV4
=
0x0800
,
Arp
=
0x0806
,
Arp
=
0x0806
,
Ieee802
_
1Q
=
0x8100
,
Ieee8021Q
=
0x8100
,
IpV6
=
0x86DD
IpV6
=
0x86DD
}
}
}
}
\ No newline at end of file
PcapDotNet/src/Packets/IpV4Address.cs
View file @
60966205
...
@@ -9,7 +9,7 @@ namespace Packets
...
@@ -9,7 +9,7 @@ namespace Packets
_value
=
value
;
_value
=
value
;
}
}
public
uint
To
UInt
()
public
uint
To
Value
()
{
{
return
_value
;
return
_value
;
}
}
...
@@ -25,7 +25,7 @@ namespace Packets
...
@@ -25,7 +25,7 @@ namespace Packets
public
bool
Equals
(
IpV4Address
other
)
public
bool
Equals
(
IpV4Address
other
)
{
{
return
To
UInt
()
==
other
.
ToUInt
();
return
To
Value
()
==
other
.
ToValue
();
}
}
public
override
bool
Equals
(
object
obj
)
public
override
bool
Equals
(
object
obj
)
...
...
PcapDotNet/src/Packets/MoreByteArray.cs
View file @
60966205
...
@@ -11,6 +11,7 @@ namespace Packets
...
@@ -11,6 +11,7 @@ namespace Packets
public
static
class
MoreByteArray
public
static
class
MoreByteArray
{
{
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Naming"
,
"CA1720:IdentifiersShouldNotContainTypeNames"
,
MessageId
=
"short"
)]
public
static
short
ReadShort
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
public
static
short
ReadShort
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
{
{
short
value
=
ReadShort
(
buffer
,
offset
);
short
value
=
ReadShort
(
buffer
,
offset
);
...
@@ -19,16 +20,19 @@ namespace Packets
...
@@ -19,16 +20,19 @@ namespace Packets
return
value
;
return
value
;
}
}
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Naming"
,
"CA1720:IdentifiersShouldNotContainTypeNames"
,
MessageId
=
"ushort"
)]
public
static
ushort
ReadUShort
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
public
static
ushort
ReadUShort
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
{
{
return
(
ushort
)
ReadShort
(
buffer
,
offset
,
endianity
);
return
(
ushort
)
ReadShort
(
buffer
,
offset
,
endianity
);
}
}
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Naming"
,
"CA1720:IdentifiersShouldNotContainTypeNames"
,
MessageId
=
"uint"
)]
public
static
uint
ReadUInt
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
public
static
uint
ReadUInt
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
{
{
return
(
uint
)
ReadInt
(
buffer
,
offset
,
endianity
);
return
(
uint
)
ReadInt
(
buffer
,
offset
,
endianity
);
}
}
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Naming"
,
"CA1720:IdentifiersShouldNotContainTypeNames"
,
MessageId
=
"int"
)]
public
static
int
ReadInt
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
public
static
int
ReadInt
(
this
byte
[]
buffer
,
int
offset
,
Endianity
endianity
)
{
{
int
value
=
ReadInt
(
buffer
,
offset
);
int
value
=
ReadInt
(
buffer
,
offset
);
...
...
PcapDotNet/src/Packets/Packets.csproj
View file @
60966205
...
@@ -73,6 +73,9 @@
...
@@ -73,6 +73,9 @@
<ItemGroup>
<ItemGroup>
<None
Include=
"..\PcapDotNet.snk"
/>
<None
Include=
"..\PcapDotNet.snk"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<CodeAnalysisDictionary
Include=
"CodeAnalysisDictionary.xml"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Other similar extension points exist, see Microsoft.Common.targets.
...
...
PcapDotNet/src/PcapDotNet.Core/BerkeleyPacketFilter.cpp
View file @
60966205
...
@@ -77,7 +77,7 @@ void BerkeleyPacketFilter::Initialize(pcap_t* pcapDescriptor, String^ filterStri
...
@@ -77,7 +77,7 @@ void BerkeleyPacketFilter::Initialize(pcap_t* pcapDescriptor, String^ filterStri
unsigned
int
netmaskValue
=
0
;
unsigned
int
netmaskValue
=
0
;
if
(
netmask
!=
nullptr
)
if
(
netmask
!=
nullptr
)
netmaskValue
=
netmask
->
Address
.
To
UInt
();
netmaskValue
=
netmask
->
Address
.
To
Value
();
_bpf
=
new
bpf_program
();
_bpf
=
new
bpf_program
();
...
...
PcapDotNet/src/PcapDotNet.Core/WinPCapDotNet.Core.vcproj
View file @
60966205
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<Tool
<Tool
Name=
"VCLinkerTool"
Name=
"VCLinkerTool"
AdditionalDependencies=
"wpcap.lib $(NOINHERIT)"
AdditionalDependencies=
"wpcap.lib $(NOINHERIT)"
LinkIncremental=
"
2
"
LinkIncremental=
"
1
"
AdditionalLibraryDirectories=
"..\..\3rdParty\WpdPack\Lib"
AdditionalLibraryDirectories=
"..\..\3rdParty\WpdPack\Lib"
AddModuleNamesToAssembly=
""
AddModuleNamesToAssembly=
""
GenerateDebugInformation=
"true"
GenerateDebugInformation=
"true"
...
...
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