Commit c04ed979 authored by Brickner_cp's avatar Brickner_cp

IpV4

Code Analysis
parent f96304cf
......@@ -30,7 +30,27 @@
<WRAP_LIMIT>150</WRAP_LIMIT>
</FormatSettings>
<UsingsSettings />
<Naming2 />
<Naming2>
<ExceptionName IsNull="False">
</ExceptionName>
<OverrideDefaultSettings>True</OverrideDefaultSettings>
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
<PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
<PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
<PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
<PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
</Naming2>
</CSharp>
<VB>
<FormatSettings>
......
<?xml version="1.0" encoding="utf-8" ?>
<Dictionary>
<Words>
<Unrecognized>
<!--Word>cb</Word-->
</Unrecognized>
<Recognized>
<Word>pcap</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
......@@ -27,6 +27,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<DocumentationFile>..\..\bin\Debug\PcapDotNet.Base.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
......@@ -35,6 +37,8 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<DocumentationFile>..\..\bin\Release\PcapDotNet.Base.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
......@@ -57,6 +61,9 @@
<ItemGroup>
<None Include="..\PcapDotNet.snk" />
</ItemGroup>
<ItemGroup>
<CodeAnalysisDictionary Include="CodeAnalysisDictionary.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.
......
using System.Reflection;
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
......@@ -34,3 +35,5 @@ using System.Runtime.InteropServices;
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: CLSCompliant(true)]
\ No newline at end of file
......@@ -30,8 +30,34 @@ namespace PcapDotNet.Base
return _mostSignificant << 16 + _leastSignificant;
}
public bool Equals(UInt24 other)
{
return other._mostSignificant == _mostSignificant && other._leastSignificant == _leastSignificant;
}
public override bool Equals(object obj)
{
return (obj is UInt24) &&
Equals((UInt24)obj);
}
public static bool operator ==(UInt24 value1, UInt24 value2)
{
return value1.Equals(value2);
}
public static bool operator !=(UInt24 value1, UInt24 value2)
{
return !(value1 == value2);
}
public override int GetHashCode()
{
return this;
}
private readonly byte _mostSignificant;
private readonly ushort _leastSignificant;
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WinPcapDotNet.Console</RootNamespace>
<AssemblyName>WinPcapDotNet.Console</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PcapDotNet.Core\WinPCapDotNet.Core.vcproj">
<Project>{89C63BE1-AF9A-472E-B256-A4F56B1655A7}</Project>
<Name>PcapDotNet.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
<Visible>False</Visible>
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using PcapDotNet;
using PcapDotNet.Core;
namespace WinPcapDotNet.Console
{
class Program
{
/// <summary>
///
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PcapDotNet.Console")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PcapDotNet.Console")]
[assembly: AssemblyCopyright("Copyright © 2009")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("97b50e85-bf8b-4d86-8e5c-3f84732e9a3d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
......@@ -78,7 +78,7 @@ namespace PcapDotNet.Core.Test
byte ipV4TypeOfService = random.NextByte();
ushort ipV4Identification = random.NextUShort();
byte ipV4Ttl = random.NextByte();
IpV4FragmentationFlags ipV4FragmentationFlags = random.NextEnum<IpV4FragmentationFlags>();
IpV4FragmentationOptions ipV4FragmentationFlags = random.NextEnum<IpV4FragmentationOptions>();
ushort ipV4FragmentationOffset = random.NextUShort();
IpV4Fragmentation ipV4Fragmentation = new IpV4Fragmentation(ipV4FragmentationFlags, ipV4FragmentationOffset);
IpV4Protocol ipV4Protocol = random.NextEnum<IpV4Protocol>();
......@@ -90,7 +90,7 @@ namespace PcapDotNet.Core.Test
random.NextBytes(ipV4PayloadBuffer);
Datagram ipV4Payload = new Datagram(ipV4PayloadBuffer);
Packet packet = PacketBuilder.IpV4(DateTime.Now,
Packet packet = PacketBuilder.EthernetIpV4(DateTime.Now,
ethernetSource, ethernetDestination, ethernetType,
ipV4TypeOfService, ipV4Identification, ipV4Fragmentation, ipV4Ttl, ipV4Protocol,
ipV4Source, ipV4Destination, ipV4Options,
......
......@@ -93,7 +93,7 @@
/>
<Tool
Name="VCFxCopTool"
Rules="-Microsoft.Design#CA1021;-Microsoft.Design#CA1028;-Microsoft.Design#CA1027"
Rules="-Microsoft.Design#CA1021;-Microsoft.Design#CA1028;-Microsoft.Design#CA1027;-Microsoft.Reliability#CA2004"
EnableFxCop="true"
Dictionaries="CodeAnalysisDictionary.xml"
/>
......@@ -103,7 +103,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Build Release Files"
CommandLine="cd $(OutDir)&#x0D;&#x0A;zip Pcap.Net.Binary.zip $(TargetFileName) $(ProjectName).pdb $(ProjectName).xml"
CommandLine="cd $(OutDir)&#x0D;&#x0A;zip Pcap.Net.Binary.zip $(TargetFileName) $(ProjectName).pdb $(ProjectName).xml&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
......@@ -186,7 +186,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Build Release Files"
CommandLine="cd $(OutDir)&#x0D;&#x0A;zip Pcap.Net.Binary.zip $(TargetFileName) $(ProjectName).pdb $(ProjectName).xml"
CommandLine="cd $(OutDir)&#x0D;&#x0A;zip Pcap.Net.Binary.zip $(TargetFileName) $(ProjectName).pdb $(ProjectName).xml&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
......@@ -208,7 +208,7 @@
/>
<ProjectReference
ReferencedProjectIdentifier="{8A184AF5-E46C-482C-81A3-76D8CE290104}"
RelativePathToProject=".\Packets\Packets.csproj"
RelativePathToProject=".\PcapDotNet.Packets\PcapDotNet.Packets.csproj"
/>
</References>
<Files>
......
......@@ -82,7 +82,7 @@ namespace PcapDotNet.Packets.Test
Assert.AreEqual(IpV4Datagram.HeaderMinimumLength, packet.Ethernet.IpV4.HeaderLength, "IP HeaderLength");
Assert.AreEqual(0, packet.Ethernet.IpV4.TypeOfService, "IP TypeOfService");
Assert.AreEqual(packet.Length - EthernetDatagram.HeaderLength, packet.Ethernet.IpV4.TotalLength, "IP TotalLength");
Assert.AreEqual(new IpV4Fragmentation(IpV4FragmentationFlags.DontFragment, 0), packet.Ethernet.IpV4.Fragmentation, "IP Fragmentation");
Assert.AreEqual(new IpV4Fragmentation(IpV4FragmentationOptions.DoNotFragment, 0), packet.Ethernet.IpV4.Fragmentation, "IP Fragmentation");
Assert.AreEqual(128, packet.Ethernet.IpV4.Ttl, "IP Ttl");
Assert.AreEqual(IpV4Protocol.Tcp, packet.Ethernet.IpV4.Protocol, "IP Protocol");
Assert.AreEqual(0x9010, packet.Ethernet.IpV4.HeaderChecksum, "IP HeaderChecksum");
......@@ -106,9 +106,9 @@ namespace PcapDotNet.Packets.Test
byte ipV4TypeOfService = random.NextByte();
ushort ipV4Identification = random.NextUShort();
byte ipV4Ttl = random.NextByte();
IpV4FragmentationFlags ipV4FragmentationFlags = random.NextEnum<IpV4FragmentationFlags>();
IpV4FragmentationOptions ipV4FragmentationOptions = random.NextEnum<IpV4FragmentationOptions>();
ushort ipV4FragmentationOffset = random.NextUShort();
IpV4Fragmentation ipV4Fragmentation = new IpV4Fragmentation(ipV4FragmentationFlags, ipV4FragmentationOffset);
IpV4Fragmentation ipV4Fragmentation = new IpV4Fragmentation(ipV4FragmentationOptions, ipV4FragmentationOffset);
IpV4Protocol ipV4Protocol = random.NextEnum<IpV4Protocol>();
IpV4Address ipV4Source = new IpV4Address(random.NextUInt());
IpV4Address ipV4Destination = new IpV4Address(random.NextUInt());
......@@ -118,7 +118,7 @@ namespace PcapDotNet.Packets.Test
random.NextBytes(ipV4PayloadBuffer);
Datagram ipV4Payload = new Datagram(ipV4PayloadBuffer);
Packet packet = PacketBuilder.IpV4(DateTime.Now,
Packet packet = PacketBuilder.EthernetIpV4(DateTime.Now,
ethernetSource, ethernetDestination, ethernetType,
ipV4TypeOfService, ipV4Identification, ipV4Fragmentation, ipV4Ttl, ipV4Protocol,
ipV4Source, ipV4Destination, ipV4Options,
......@@ -139,7 +139,7 @@ namespace PcapDotNet.Packets.Test
Assert.AreEqual(packet.Length - EthernetDatagram.HeaderLength, packet.Ethernet.IpV4.TotalLength, "IP TotalLength");
Assert.AreEqual(ipV4Identification, packet.Ethernet.IpV4.Identification, "IP Identification");
Assert.AreEqual(ipV4Fragmentation, packet.Ethernet.IpV4.Fragmentation, "IP Fragmentation");
Assert.AreEqual(ipV4Fragmentation.Flags, packet.Ethernet.IpV4.Fragmentation.Flags, "IP Fragmentation");
Assert.AreEqual(ipV4Fragmentation.Options, packet.Ethernet.IpV4.Fragmentation.Options, "IP Fragmentation");
Assert.AreEqual(ipV4Fragmentation.Offset, packet.Ethernet.IpV4.Fragmentation.Offset, "IP Fragmentation");
Assert.AreEqual(ipV4Ttl, packet.Ethernet.IpV4.Ttl, "IP Ttl");
Assert.AreEqual(ipV4Protocol, packet.Ethernet.IpV4.Protocol, "IP Protocol");
......
......@@ -5,7 +5,35 @@
<!--Word>cb</Word-->
</Unrecognized>
<Recognized>
<Word>Endianity</Word>
<Word>pcap</Word>
<Word>endianity</Word>
<Word>prespecified</Word>
<Word>ttl</Word>
<Word>mmmm</Word> <!-- Still couldn't find out what this mean -->
<Word>satnet</Word>
<Word>bbn</Word> <!-- Probably BBN Technologies (originally Bolt, Beranek and Newman) -->
<Word>aris</Word>
<Word>ax</Word>
<Word>cbt</Word>
<Word>cftp</Word> <!-- maybe Configurable Fault Tolerant Processor -->
<Word>dcn</Word>
<Word>emcon</Word>
<Word>fibre</Word>
<Word>gmtp</Word>
<Word>iplt</Word>
<Word>ipsilon</Word> <!-- As in Ipsilon Networks -->
<Word>kryptolan</Word>
<Word>internodal</Word>
<Word>qnx</Word> <!-- www.qnx.com -->
<Word>expak</Word>
<Word>sitara</Word>
<Word>tcf</Word>
<Word>ttp</Word>
<Word>lite</Word>
<Word>uti</Word>
<Word>rcc</Word>
<Word>internetwork</Word>
<Word>multiprotocol</Word>
</Recognized>
<Deprecated>
<!--Term PreferredAlternate="EnterpriseServices">complus</Term-->
......@@ -20,6 +48,9 @@
<Acronyms>
<CasingExceptions>
<Acronym>Ip</Acronym>
<Acronym>Sm</Acronym>
<Acronym>Nd</Acronym>
<Acronym>Ns</Acronym>
</CasingExceptions>
</Acronyms>
</Dictionary>
\ No newline at end of file
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace PcapDotNet.Packets
{
public class Datagram : IEquatable<Datagram>
public class Datagram : IEquatable<Datagram>, IEnumerable<byte>
{
public Datagram(byte[] buffer)
: this(buffer, 0, buffer.Length)
......@@ -46,6 +49,17 @@ namespace PcapDotNet.Packets
return true;
}
public IEnumerator<byte> GetEnumerator()
{
for (int i = 0; i != Length; ++i)
yield return this[i];
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public bool Equals(Datagram other)
{
if (Length != other.Length)
......@@ -65,6 +79,13 @@ namespace PcapDotNet.Packets
return Equals(obj as Datagram);
}
public override int GetHashCode()
{
int i = 0;
return Length.GetHashCode() ^
this.Aggregate(0, (value, b) => value ^ (b << (8 * (i++ % 4))));
}
internal void Write(byte[] buffer, int offset)
{
System.Buffer.BlockCopy(_buffer, StartOffset, buffer, offset, Length);
......@@ -87,6 +108,7 @@ namespace PcapDotNet.Packets
return _buffer.ReadUShort(StartOffset + offset, endianity);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "uint")]
protected uint ReadUInt(int offset, Endianity endianity)
{
return _buffer.ReadUInt(StartOffset + offset, endianity);
......
using System.Globalization;
using System.Text;
namespace PcapDotNet.Packets
......@@ -12,10 +13,10 @@ namespace PcapDotNet.Packets
public IpV4Address(string value)
{
string[] values = value.Split('.');
_value = (uint)((byte.Parse(values[0]) << 24) +
(byte.Parse(values[1]) << 16) +
(byte.Parse(values[2]) << 8) +
(byte.Parse(values[3])));
_value = (uint)((byte.Parse(values[0], CultureInfo.InvariantCulture) << 24) +
(byte.Parse(values[1], CultureInfo.InvariantCulture) << 16) +
(byte.Parse(values[2], CultureInfo.InvariantCulture) << 8) +
(byte.Parse(values[3], CultureInfo.InvariantCulture)));
}
public static IpV4Address Zero
......@@ -48,14 +49,14 @@ namespace PcapDotNet.Packets
Equals((IpV4Address)obj));
}
public static bool operator ==(IpV4Address ipV4Address1, IpV4Address ipV4Address2)
public static bool operator ==(IpV4Address value1, IpV4Address value2)
{
return ipV4Address1.Equals(ipV4Address2);
return value1.Equals(value2);
}
public static bool operator !=(IpV4Address ipV4Address1, IpV4Address ipV4Address2)
public static bool operator !=(IpV4Address value1, IpV4Address value2)
{
return !(ipV4Address1 == ipV4Address2);
return !(value1 == value2);
}
public override int GetHashCode()
......
......@@ -9,14 +9,14 @@ namespace PcapDotNet.Packets
get { return _none; }
}
public IpV4Fragmentation(IpV4FragmentationFlags flags, ushort offset)
: this((ushort)((ushort)flags | (offset / 8)))
public IpV4Fragmentation(IpV4FragmentationOptions options, ushort offset)
: this((ushort)((ushort)options | (offset / 8)))
{
}
public IpV4FragmentationFlags Flags
public IpV4FragmentationOptions Options
{
get { return (IpV4FragmentationFlags)(_value & 0xE000); }
get { return (IpV4FragmentationOptions)(_value & 0xE000); }
}
public ushort Offset
......@@ -35,6 +35,21 @@ namespace PcapDotNet.Packets
Equals((IpV4Fragmentation)obj));
}
public static bool operator ==(IpV4Fragmentation value1, IpV4Fragmentation value2)
{
return value1.Equals(value2);
}
public static bool operator !=(IpV4Fragmentation value1, IpV4Fragmentation value2)
{
return !(value1 == value2);
}
public override int GetHashCode()
{
return _value;
}
internal IpV4Fragmentation(ushort value)
{
_value = value;
......@@ -45,7 +60,7 @@ namespace PcapDotNet.Packets
buffer.Write(offset, _value, Endianity.Big);
}
private static readonly IpV4Fragmentation _none = new IpV4Fragmentation(IpV4FragmentationFlags.None, 0);
private static readonly IpV4Fragmentation _none = new IpV4Fragmentation(IpV4FragmentationOptions.None, 0);
private readonly ushort _value;
}
}
\ No newline at end of file
......@@ -3,11 +3,11 @@ using System;
namespace PcapDotNet.Packets
{
[Flags]
public enum IpV4FragmentationFlags : ushort
public enum IpV4FragmentationOptions : ushort
{
None = 0x0 << 13,
Reserved = 0x4 << 13,
DontFragment = 0x2 << 13,
// Reserved = 0x4 << 13,
DoNotFragment = 0x2 << 13,
MoreFragments = 0x1 << 13
}
}
\ No newline at end of file
......@@ -36,6 +36,11 @@ namespace PcapDotNet.Packets
return Equals(obj as IpV4Option);
}
public override int GetHashCode()
{
return (byte)OptionType;
}
protected IpV4Option(IpV4OptionType type)
{
_type = type;
......
......@@ -38,6 +38,13 @@ namespace PcapDotNet.Packets
return Equals(other as IpV4OptionRoute);
}
public override int GetHashCode()
{
return base.GetHashCode() ^
PointedAddressIndex ^
_addresses.Aggregate(0, (value, address) => value ^ address.GetHashCode());
}
internal override void Write(byte[] buffer, ref int offset)
{
base.Write(buffer, ref offset);
......
......@@ -63,6 +63,14 @@ namespace PcapDotNet.Packets
return Equals(other as IpV4OptionSecurity);
}
public override int GetHashCode()
{
return base.GetHashCode() ^
(((ushort)Level << 16) | Compartments) ^
(HandlingRestrictions << 16) ^
TransmissionControlCode.GetHashCode();
}
internal static IpV4OptionSecurity ReadOptionSecurity(byte[] buffer, ref int offset, int length)
{
if (length < OptionLength - 1)
......
......@@ -4,9 +4,9 @@ namespace PcapDotNet.Packets
{
Unclassified = 0x0000,
Confidential = 0xF135,
EFTO = 0x789A,
MMMM = 0xBC4D,
PROG = 0x5E26,
EncryptedForTransmissionOnly = 0x789A,
Mmmm = 0xBC4D,
Prog = 0x5E26,
Restricted = 0xAF13,
Secret = 0xD788,
TopSecret = 0x6BC5
......
......@@ -39,6 +39,12 @@ namespace PcapDotNet.Packets
return Equals(other as IpV4OptionStreamIdentifier);
}
public override int GetHashCode()
{
return base.GetHashCode() ^
Identifier.GetHashCode();
}
internal static IpV4OptionStreamIdentifier ReadOptionStreamIdentifier(byte[] buffer, ref int offset, int length)
{
if (length < OptionLength - 1)
......
......@@ -53,6 +53,14 @@ namespace PcapDotNet.Packets
return Equals(other as IpV4OptionTimestamp);
}
public override int GetHashCode()
{
return base.GetHashCode() ^
((byte)TimestampType << 16) ^
(Overflow << 8) ^
PointedIndex;
}
internal static IpV4OptionTimestamp ReadOptionTimestamp(byte[] buffer, ref int offset, int length)
{
if (length < OptionMinimumLength - 1)
......
......@@ -12,6 +12,14 @@ namespace PcapDotNet.Packets
_addressesAndTimestamps = addressesAndTimestamps;
}
public override int GetHashCode()
{
return base.GetHashCode() ^
_addressesAndTimestamps.Aggregate(0, (value, pair) => value ^
pair.Key.GetHashCode() ^
pair.Value.GetHashCode());
}
internal static IpV4OptionTimestampAndAddress Read(IpV4OptionTimestampType timestampType, byte overflow, byte pointedIndex, byte[] buffer, ref int offset, int numValues)
{
if (numValues % 2 != 0)
......
......@@ -11,6 +11,12 @@ namespace PcapDotNet.Packets
_timestamps = timestamps;
}
public override int GetHashCode()
{
return base.GetHashCode() ^
_timestamps.Aggregate(0, (value, timestamp) => value ^ timestamp.GetHashCode());
}
internal static IpV4OptionTimestampOnly Read(byte overflow, byte pointedIndex, byte[] buffer, ref int offset, int numValues)
{
TimeSpan[] timestamps = new TimeSpan[numValues];
......
......@@ -2,7 +2,6 @@ using System;
namespace PcapDotNet.Packets
{
[Flags]
public enum IpV4OptionTimestampType : byte
{
TimestampOnly = 0,
......
......@@ -75,6 +75,12 @@ namespace PcapDotNet.Packets
return Equals(obj as IpV4Options);
}
public override int GetHashCode()
{
return Length.GetHashCode() ^
_options.Aggregate(0, (value, option) => value ^ option.GetHashCode());
}
internal void Write(byte[] buffer, int offset)
{
int offsetEnd = offset + Length;
......
......@@ -2,6 +2,565 @@ namespace PcapDotNet.Packets
{
public enum IpV4Protocol : byte
{
Tcp = 0x06
/// <summary>
/// IPv6 Hop-by-Hop Option RFC 2460
/// </summary>
IpV6HopByHopOption = 0x00,
/// <summary>
/// Internet Control Message Protocol RFC 792
/// </summary>
InternetControlMessageProtocol = 0x01,
/// <summary>
/// Internet Group Management Protocol RFC 1112
/// </summary>
InternetGroupManagementProtocol = 0x02,
/// <summary>
/// Gateway-to-Gateway Protocol RFC 823
/// </summary>
GatewayToGateway = 0x03,
/// <summary>
/// IP in IP (encapsulation) RFC 2003
/// </summary>
Ip = 0x04,
/// <summary>
/// Internet Stream Protocol RFC 1190, RFC 1819
/// </summary>
Stream = 0x05,
/// <summary>
/// Transmission Control Protocol RFC 793
/// </summary>
Tcp = 0x06,
/// <summary>
/// CBT
/// </summary>
Cbt = 0x07,
/// <summary>
/// Exterior Gateway Protocol RFC 888
/// </summary>
ExteriorGatewayProtocol = 0x08,
/// <summary>
/// Interior Gateway Protocol (any private interior gateway (used by Cisco for their IGRP))
/// </summary>
InteriorGatewayProtocol = 0x09,
/// <summary>
/// BBN RCC Monitoring
/// </summary>
BbnRccMonitoring = 0x0A,
/// <summary>
/// Network Voice Protocol RFC 741
/// </summary>
NetworkVoice = 0x0B,
/// <summary>
/// Xerox PUP
/// </summary>
Pup = 0x0C,
/// <summary>
/// ARGUS
/// </summary>
Argus = 0x0D,
/// <summary>
/// EMCON
/// </summary>
Emcon = 0x0E,
/// <summary>
/// Cross Net Debugger IEN 158
/// </summary>
CrossNetDebugger = 0x0F,
/// <summary>
/// Chaos
/// </summary>
Chaos = 0x10,
/// <summary>
/// User Datagram Protocol RFC 768
/// </summary>
Udp = 0x11,
/// <summary>
/// Multiplexing IEN 90
/// </summary>
Multiplexing = 0x12,
/// <summary>
/// DCN Measurement Subsystems
/// </summary>
DcnMeasurement = 0x13,
/// <summary>
/// Host Monitoring Protocol RFC 869
/// </summary>
HostMonitoringProtocol = 0x14,
/// <summary>
/// Packet Radio Measurement
/// </summary>
PacketRadioMeasurement = 0x15,
/// <summary>
/// XEROX NS IDP
/// </summary>
XeroxNsInternetDatagramProtocol = 0x16,
/// <summary>
/// Trunk-1
/// </summary>
Trunk1 = 0x17,
/// <summary>
/// Trunk-2
/// </summary>
Trunk2 = 0x18,
/// <summary>
/// Leaf-1
/// </summary>
Leaf1 = 0x19,
/// <summary>
/// Leaf-2
/// </summary>
Leaf2 = 0x1A,
/// <summary>
/// Reliable Datagram Protocol RFC 908
/// </summary>
ReliableDatagramProtocol = 0x1B,
/// <summary>
/// Internet Reliable Transaction Protocol RFC 938
/// </summary>
InternetReliableTransactionProtocol = 0x1C,
/// <summary>
/// ISO Transport Protocol Class 4 RFC 905
/// </summary>
IsoTransportProtocolClass4 = 0x1D,
/// <summary>
/// Bulk Data Transfer Protocol RFC 998
/// </summary>
BulkDataTransferProtocol = 0x1E,
/// <summary>
/// MFE Network Services Protocol
/// </summary>
MagneticFusionEnergyNetworkServicesProtocol = 0x1F,
/// <summary>
/// MERIT Internodal Protocol
/// </summary>
MeritInternodalProtocol = 0x20,
/// <summary>
/// Datagram Congestion Control Protocol RFC 4340
/// </summary>
DatagramCongestionControlProtocol = 0x21,
/// <summary>
/// Third Party Connect Protocol
/// </summary>
ThirdPartyConnect = 0x22,
/// <summary>
/// Inter-Domain Policy Routing Protocol RFC 1479
/// </summary>
InterDomainPolicyRoutingProtocol = 0x23,
/// <summary>
/// Xpress Transport Protocol
/// </summary>
XpressTransportProtocol = 0x24,
/// <summary>
/// Datagram Delivery Protocol
/// </summary>
DatagramDeliveryProtocol = 0x25,
/// <summary>
/// IDPR Control Message Transport Protocol
/// </summary>
InterDomainPolicyRoutingProtocolControlMessageTransportProtocol = 0x26,
/// <summary>
/// TP++ Transport Protocol
/// </summary>
TransportProtocolPlusPlus = 0x27,
/// <summary>
/// IL Transport Protocol
/// </summary>
Il = 0x28,
/// <summary>
/// IPv6 RFC 2460
/// </summary>
IpV6 = 0x29,
/// <summary>
/// Source Demand Routing Protocol
/// </summary>
SourceDemandRoutingProtocol = 0x2A,
/// <summary>
/// Routing Header for IPv6 RFC 2460
/// </summary>
IpV6Route = 0x2B,
/// <summary>
/// Fragment Header for IPv6 RFC 2460
/// </summary>
FragmentHeaderForIpV6 = 0x2C,
/// <summary>
/// Inter-Domain Routing Protocol
/// </summary>
InterDomainRoutingProtocol = 0x2D,
/// <summary>
/// Resource Reservation Protocol
/// </summary>
Rsvp = 0x2E,
/// <summary>
/// Generic Routing Encapsulation
/// </summary>
Gre = 0x2F,
/// <summary>
/// Mobile Host Routing Protocol
/// </summary>
MobileHostRoutingProtocol = 0x30,
/// <summary>
/// BNA
/// </summary>
Bna = 0x31,
/// <summary>
/// Encapsulating Security Payload RFC 2406
/// </summary>
Esp = 0x32,
/// <summary>
/// Authentication Header RFC 2402
/// </summary>
AuthenticationHeader = 0x33,
/// <summary>
/// Integrated Net Layer Security Protocol TUBA
/// </summary>
IntegratedNetLayerSecurityProtocol = 0x34,
/// <summary>
/// IP with Encryption
/// </summary>
Swipe = 0x35,
/// <summary>
/// NBMA Address Resolution Protocol RFC 1735
/// </summary>
NArp = 0x36,
/// <summary>
/// IP Mobility (Min Encap) RFC 2004
/// </summary>
Mobile = 0x37,
/// <summary>
/// Transport Layer Security Protocol (using Kryptonet key management)
/// </summary>
TransportLayerSecurityProtocol = 0x38,
/// <summary>
/// Simple Key-Management for Internet Protocol RFC 2356
/// </summary>
Skip = 0x39,
/// <summary>
/// ICMP for IPv6 RFC 2460
/// </summary>
InternetControlMessageProtocolForIpV6 = 0x3A,
/// <summary>
/// No Next Header for IPv6 RFC 2460
/// </summary>
NoNextHeaderForIpV6 = 0x3B,
/// <summary>
/// Destination Options for IPv6 RFC 2460
/// </summary>
IpV6Opts = 0x3C,
/// <summary>
/// Any host internal protocol
/// </summary>
AnyHostInternal = 0x3D,
/// <summary>
/// CFTP
/// </summary>
Cftp = 0x3E,
/// <summary>
/// Any local network
/// </summary>
AnyLocalNetwork = 0x3F,
/// <summary>
/// SATNET and Backroom EXPAK
/// </summary>
SatnetAndBackroomExpak = 0x40,
/// <summary>
/// Kryptolan
/// </summary>
Kryptolan = 0x41,
/// <summary>
/// MIT Remote Virtual Disk Protocol
/// </summary>
RemoteVirtualDiskProtocol = 0x42,
/// <summary>
/// Internet Pluribus Packet Core
/// </summary>
InternetPluribusPacketCore = 0x43,
/// <summary>
/// Any distributed file system
/// </summary>
AnyDistributedFileSystem = 0x44,
/// <summary>
/// SATNET Monitoring
/// </summary>
SatMon = 0x45,
/// <summary>
/// VISA Protocol
/// </summary>
Visa = 0x46,
/// <summary>
/// Internet Packet Core Utility
/// </summary>
InternetPacketCoreUtility = 0x47,
/// <summary>
/// Computer Protocol Network Executive
/// </summary>
ComputerProtocolNetworkExecutive = 0x48,
/// <summary>
/// Computer Protocol Heart Beat
/// </summary>
ComputerProtocolHeartbeat = 0x49,
/// <summary>
/// Wang Span Network
/// </summary>
WangSpanNetwork = 0x4A,
/// <summary>
/// Packet Video Protocol
/// </summary>
PacketVideoProtocol = 0x4B,
/// <summary>
/// Backroom SATNET Monitoring
/// </summary>
BackroomSatMon = 0x4C,
/// <summary>
/// SUN ND PROTOCOL-Temporary
/// </summary>
SunNd = 0x4D,
/// <summary>
/// WIDEBAND Monitoring
/// </summary>
WidebandMonitoring = 0x4E,
/// <summary>
/// WIDEBAND EXPAK
/// </summary>
WidebandExpak = 0x4F,
/// <summary>
/// International Organization for Standardization Internet Protocol
/// </summary>
IsoIp = 0x50,
/// <summary>
/// Versatile Message Transaction Protocol RFC 1045
/// </summary>
VersatileMessageTransactionProtocol = 0x51,
/// <summary>
/// Secure Versatile Message Transaction Protocol RFC 1045
/// </summary>
SecureVersatileMessageTransactionProtocol = 0x52,
/// <summary>
/// VINES
/// </summary>
Vines = 0x53,
/// <summary>
/// TTP
/// </summary>
Ttp = 0x54,
/// <summary>
/// NSFNET-IGP
/// </summary>
NationalScienceFoundationNetworkInteriorGatewayProtocol = 0x55,
/// <summary>
/// Dissimilar Gateway Protocol
/// </summary>
DissimilarGatewayProtocol = 0x56,
/// <summary>
/// TCF
/// </summary>
Tcf = 0x57,
/// <summary>
/// Enhanced Interior Gateway Routing Protocol
/// </summary>
EnhancedInteriorGatewayRoutingProtocol = 0x58,
/// <summary>
/// Open Shortest Path First RFC 1583
/// </summary>
OpenShortestPathFirst = 0x59,
/// <summary>
/// Sprite RPC Protocol
/// </summary>
SpriteRpc = 0x5A,
/// <summary>
/// Locus Address Resolution Protocol
/// </summary>
LArp = 0x5B,
/// <summary>
/// Multicast Transport Protocol
/// </summary>
MulticastTransportProtocol = 0x5C,
/// <summary>
/// AX.25
/// </summary>
Ax25 = 0x5D,
/// <summary>
/// IP-within-IP Encapsulation Protocol
/// </summary>
IpIp = 0x5E,
/// <summary>
/// Mobile Internetworking Control Protocol
/// </summary>
MobileInternetworkingControlProtocol = 0x5F,
/// <summary>
/// Semaphore Communications Sec. Pro
/// </summary>
SemaphoreCommunicationsSecondProtocol = 0x60,
/// <summary>
/// Ethernet-within-IP Encapsulation RFC 3378
/// </summary>
EtherIp = 0x61,
/// <summary>
/// Encapsulation Header RFC 1241
/// </summary>
EncapsulationHeader = 0x62,
/// <summary>
/// Any private encryption scheme
/// </summary>
AnyPrivateEncryptionScheme = 0x63,
/// <summary>
/// GMTP
/// </summary>
Gmtp = 0x64,
/// <summary>
/// Ipsilon Flow Management Protocol
/// </summary>
IpsilonFlowManagementProtocol = 0x65,
/// <summary>
/// PNNI over IP
/// </summary>
PrivateNetworkToNetworkInterface = 0x66,
/// <summary>
/// Protocol Independent Multicast
/// </summary>
Pin = 0x67,
/// <summary>
/// ARIS
/// </summary>
Aris = 0x68,
/// <summary>
/// SCPS (Space Communications Protocol Standards)
/// </summary>
SpaceCommunicationsProtocolStandards = 0x69,
/// <summary>
/// QNX
/// </summary>
Qnx = 0x6A,
/// <summary>
/// Active Networks
/// </summary>
ActiveNetworks = 0x6B,
/// <summary>
/// IP Payload Compression Protocol RFC 3173
/// </summary>
IpComp = 0x6C,
/// <summary>
/// Sitara Networks Protocol
/// </summary>
SitaraNetworksProtocol = 0x6D,
/// <summary>
/// Compaq Peer Protocol
/// </summary>
CompaqPeer = 0x6E,
/// <summary>
/// IPX in IP
/// </summary>
InternetworkPacketExchangeInIp = 0x6F,
/// <summary>
/// Virtual Router Redundancy Protocol, Common Address Redundancy Protocol (not IANA assigned) VRRP:RFC 3768
/// </summary>
VirtualRouterRedundancyProtocol = 0x70,
/// <summary>
/// PGM Reliable Transport Protocol RFC 3208
/// </summary>
PragmaticGeneralMulticastTransportProtocol = 0x71,
/// <summary>
/// Any 0-hop protocol
/// </summary>
Any0HopProtocol = 0x72,
/// <summary>
/// Layer Two Tunneling Protocol
/// </summary>
LayerTwoTunnelingProtocol = 0x73,
/// <summary>
/// D-II Data Exchange (DDX)
/// </summary>
DiiDataExchange = 0x74,
/// <summary>
/// Interactive Agent Transfer Protocol
/// </summary>
InteractiveAgentTransferProtocol = 0x75,
/// <summary>
/// Schedule Transfer Protocol
/// </summary>
ScheduleTransferProtocol = 0x76,
/// <summary>
/// SpectraLink Radio Protocol
/// </summary>
SpectraLinkRadioProtocol = 0x77,
/// <summary>
/// UTI
/// </summary>
Uti = 0x78,
/// <summary>
/// Simple Message Protocol
/// </summary>
SimpleMessageProtocol = 0x79,
/// <summary>
/// SM
/// </summary>
Sm = 0x7A,
/// <summary>
/// Performance Transparency Protocol
/// </summary>
PerformanceTransparencyProtocol = 0x7B,
/// <summary>
/// IS-IS over IPv4
/// </summary>
IsIsOverIpV4 = 0x7C,
/// <summary>
///
/// </summary>
Fire = 0x7D,
/// <summary>
/// Combat Radio Transport Protocol
/// </summary>
CombatRadioTransportProtocol = 0x7E,
/// <summary>
/// Combat Radio User Datagram
/// </summary>
CombatRadioUserDatagram = 0x7F,
/// <summary>
///
/// </summary>
ServiceSpecificConnectionOrientedProtocolInAMultilinkAndConnectionlessEnvironment = 0x80,
/// <summary>
///
/// </summary>
Iplt = 0x81,
/// <summary>
/// Secure Packet Shield
/// </summary>
SecurePacketShield = 0x82,
/// <summary>
/// Private IP Encapsulation within IP Expired I-D draft-petri-mobileip-pipe-00.txt
/// </summary>
Pipe = 0x83,
/// <summary>
/// Stream Control Transmission Protocol
/// </summary>
StreamControlTransmissionProtocol = 0x84,
/// <summary>
/// Fibre Channel
/// </summary>
FibreChannel = 0x85,
/// <summary>
/// RSVP-E2E-IGNORE RFC 3175
/// </summary>
RsvpE2EIgnore = 0x86,
/// <summary>
/// Mobility Header RFC 3775
/// </summary>
MobilityHeader = 0x87,
/// <summary>
/// UDP Lite RFC 3828
/// </summary>
UdpLite = 0x88,
/// <summary>
/// MPLS-in-IP RFC 4023
/// </summary>
MultiprotocolLabelSwitchingInIp = 0x89,
/// <summary>
/// MANET Protocols I-D draft-ietf-manet-iana-07.txt
/// </summary>
MobileAdHocNetwork = 0x8A,
/// <summary>
/// Host Identity Protocol RFC 5201
/// </summary>
Hip = 0x8B
}
}
\ No newline at end of file
......@@ -27,6 +27,7 @@ namespace PcapDotNet.Packets
return (ushort)ReadShort(buffer, offset, endianity);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "ushort")]
public static ushort ReadUShort(this byte[] buffer, ref int offset, Endianity endianity)
{
ushort result = ReadUShort(buffer, offset, endianity);
......@@ -55,6 +56,7 @@ namespace PcapDotNet.Packets
return (uint)ReadInt(buffer, offset, endianity);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "uint")]
public static uint ReadUInt(this byte[] buffer, ref int offset, Endianity endianity)
{
uint result = ReadUInt(buffer, offset, endianity);
......
......@@ -14,7 +14,7 @@ namespace PcapDotNet.Packets
return new Packet(buffer, timestamp, new DataLink(DataLinkKind.Ethernet));
}
public static Packet IpV4(DateTime timestamp,
public static Packet EthernetIpV4(DateTime timestamp,
MacAddress ethernetSource, MacAddress ethernetDestination, EthernetType ethernetType,
byte ipV4TypeOfService, ushort ipV4Identification, IpV4Fragmentation ipV4Fragmentation,
byte ipV4Ttl, IpV4Protocol ipV4Protocol,
......
......@@ -30,7 +30,8 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Design#CA1028</CodeAnalysisRules>
<CodeAnalysisRules>-Microsoft.Design#CA1021;-Microsoft.Design#CA1045;-Microsoft.Design#CA1028;-Microsoft.Naming#CA1710</CodeAnalysisRules>
<DocumentationFile>..\..\bin\Debug\PcapDotNet.Packets.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
......@@ -41,7 +42,8 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Design#CA1028</CodeAnalysisRules>
<CodeAnalysisRules>-Microsoft.Design#CA1021;-Microsoft.Design#CA1045;-Microsoft.Design#CA1028;-Microsoft.Naming#CA1710</CodeAnalysisRules>
<DocumentationFile>..\..\bin\Release\PcapDotNet.Packets.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
......@@ -68,7 +70,7 @@
<Compile Include="IpV4\IpV4Address.cs" />
<Compile Include="IpV4\IpV4Datagram.cs" />
<Compile Include="IpV4\IpV4Fragmentation.cs" />
<Compile Include="IpV4\IpV4FragmentationFlags.cs" />
<Compile Include="IpV4\IpV4FragmentationOptions.cs" />
<Compile Include="IpV4\IpV4Option.cs" />
<Compile Include="IpV4\IpV4OptionEndOfOptionsList.cs" />
<Compile Include="IpV4\IpV4OptionLooseSourceRouting.cs" />
......

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PcapDotNet.Console", "PcapDotNet.Console\PcapDotNet.Console.csproj", "{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PcapDotNet.Core", "PcapDotNet.Core\WinPCapDotNet.Core.vcproj", "{89C63BE1-AF9A-472E-B256-A4F56B1655A7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PcapDotNet.Core.Test", "PcapDotNet.Core.Test\PcapDotNet.Core.Test.csproj", "{045A6460-C260-4CDA-8030-FD19A0086C95}"
......@@ -26,34 +24,31 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PcapDotNet.Packets.Test", "
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 9
SccNumberOfProjects = 8
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs06.codeplex.com/
SccLocalPath0 = .
SccProjectUniqueName1 = PcapDotNet.Core\\WinPCapDotNet.Core.vcproj
SccProjectName1 = PcapDotNet.Core
SccLocalPath1 = PcapDotNet.Core
SccProjectUniqueName2 = PcapDotNet.Console\\PcapDotNet.Console.csproj
SccProjectName2 = PcapDotNet.Console
SccLocalPath2 = PcapDotNet.Console
SccProjectUniqueName3 = PcapDotNet.Core.Test\\PcapDotNet.Core.Test.csproj
SccProjectName3 = PcapDotNet.Core.Test
SccLocalPath3 = PcapDotNet.Core.Test
SccProjectUniqueName4 = PcapDotNet.TestUtils\\PcapDotNet.TestUtils.csproj
SccProjectName4 = PcapDotNet.TestUtils
SccLocalPath4 = PcapDotNet.TestUtils
SccProjectUniqueName5 = PcapDotNet.Packets.TestUtils\\PcapDotNet.Packets.TestUtils.csproj
SccProjectName5 = PcapDotNet.Packets.TestUtils
SccLocalPath5 = PcapDotNet.Packets.TestUtils
SccProjectUniqueName6 = PcapDotNet.Base\\PcapDotNet.Base.csproj
SccProjectName6 = PcapDotNet.Base
SccLocalPath6 = PcapDotNet.Base
SccProjectUniqueName7 = PcapDotNet.Packets.Test\\PcapDotNet.Packets.Test.csproj
SccProjectName7 = PcapDotNet.Packets.Test
SccLocalPath7 = PcapDotNet.Packets.Test
SccProjectUniqueName8 = PcapDotNet.Packets\\PcapDotNet.Packets.csproj
SccProjectName8 = PcapDotNet.Packets
SccLocalPath8 = PcapDotNet.Packets
SccProjectUniqueName2 = PcapDotNet.Core.Test\\PcapDotNet.Core.Test.csproj
SccProjectName2 = PcapDotNet.Core.Test
SccLocalPath2 = PcapDotNet.Core.Test
SccProjectUniqueName3 = PcapDotNet.TestUtils\\PcapDotNet.TestUtils.csproj
SccProjectName3 = PcapDotNet.TestUtils
SccLocalPath3 = PcapDotNet.TestUtils
SccProjectUniqueName4 = PcapDotNet.Packets.TestUtils\\PcapDotNet.Packets.TestUtils.csproj
SccProjectName4 = PcapDotNet.Packets.TestUtils
SccLocalPath4 = PcapDotNet.Packets.TestUtils
SccProjectUniqueName5 = PcapDotNet.Base\\PcapDotNet.Base.csproj
SccProjectName5 = PcapDotNet.Base
SccLocalPath5 = PcapDotNet.Base
SccProjectUniqueName6 = PcapDotNet.Packets.Test\\PcapDotNet.Packets.Test.csproj
SccProjectName6 = PcapDotNet.Packets.Test
SccLocalPath6 = PcapDotNet.Packets.Test
SccProjectUniqueName7 = PcapDotNet.Packets\\PcapDotNet.Packets.csproj
SccProjectName7 = PcapDotNet.Packets
SccLocalPath7 = PcapDotNet.Packets
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = PcapDotNet.vsmdi
......@@ -67,18 +62,6 @@ Global
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Debug|Win32.ActiveCfg = Debug|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Debug|Win32.Build.0 = Debug|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Release|Any CPU.Build.0 = Release|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Release|Win32.ActiveCfg = Release|Any CPU
{5B4E80EB-DED5-4F20-871A-D9567F3F79DD}.Release|Win32.Build.0 = Release|Any CPU
{89C63BE1-AF9A-472E-B256-A4F56B1655A7}.Debug|Any CPU.ActiveCfg = Debug|Win32
{89C63BE1-AF9A-472E-B256-A4F56B1655A7}.Debug|Any CPU.Build.0 = Debug|Win32
{89C63BE1-AF9A-472E-B256-A4F56B1655A7}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
......
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