Commit 60966205 authored by Brickner_cp's avatar Brickner_cp

--no commit message

--no commit message
parent 9fc934bc
<?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
...@@ -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);
......
...@@ -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
...@@ -9,7 +9,7 @@ namespace Packets ...@@ -9,7 +9,7 @@ namespace Packets
_value = value; _value = value;
} }
public uint ToUInt() public uint ToValue()
{ {
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 ToUInt() == other.ToUInt(); return ToValue() == other.ToValue();
} }
public override bool Equals(object obj) public override bool Equals(object obj)
......
...@@ -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);
......
...@@ -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.
......
...@@ -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.ToUInt(); netmaskValue = netmask->Address.ToValue();
_bpf = new bpf_program(); _bpf = new bpf_program();
......
...@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment