Commit 4e34fd27 authored by Brickner_cp's avatar Brickner_cp

Rename IIpV4NextLayer to IIpNextLayer.

Rename IIpV4NextTransportLayer to IIpNextTransportLayer.
parent 343e7103
......@@ -11,7 +11,7 @@ namespace PcapDotNet.Packets.Gre
/// Represents a GRE layer.
/// <seealso cref="GreDatagram"/>
/// </summary>
public sealed class GreLayer : EthernetBaseLayer, IIpV4NextLayer, IEquatable<GreLayer>
public sealed class GreLayer : EthernetBaseLayer, IIpNextLayer, IEquatable<GreLayer>
{
/// <summary>
/// The GRE Version Number.
......
......@@ -7,7 +7,7 @@ namespace PcapDotNet.Packets.Icmp
/// Represents an ICMP layer.
/// <seealso cref="IcmpDatagram"/>
/// </summary>
public abstract class IcmpLayer : SimpleLayer, IIpV4NextLayer
public abstract class IcmpLayer : SimpleLayer, IIpNextLayer
{
/// <summary>
/// The value of this field determines the format of the remaining data.
......
......@@ -8,7 +8,7 @@ namespace PcapDotNet.Packets.Igmp
/// The base of all IGMP layers.
/// <seealso cref="IgmpDatagram"/>
/// </summary>
public abstract class IgmpLayer : SimpleLayer, IIpV4NextLayer
public abstract class IgmpLayer : SimpleLayer, IIpNextLayer
{
/// <summary>
/// The type of the IGMP message of concern to the host-router interaction.
......
namespace PcapDotNet.Packets.IpV4
{
/// <summary>
/// A layer under an IPv4 layer.
/// A layer under an IP layer.
/// Must provide the IPv4 Protocol.
/// </summary>
public interface IIpV4NextLayer : ILayer
public interface IIpNextLayer : ILayer
{
/// <summary>
/// The protocol that should be written in the previous (IPv4) layer.
......
namespace PcapDotNet.Packets.IpV4
{
/// <summary>
/// A Transport layer under an IPv4 layer.
/// A Transport layer under an IP layer.
/// Must supply information about the Transport layer checksum.
/// </summary>
public interface IIpV4NextTransportLayer : IIpV4NextLayer
public interface IIpNextTransportLayer : IIpNextLayer
{
/// <summary>
/// Checksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header,
......
......@@ -8,7 +8,7 @@ namespace PcapDotNet.Packets.IpV4
/// Represents IPv4 layer.
/// <seealso cref="IpV4Datagram"/>
/// </summary>
public sealed class IpV4Layer : Layer, IEthernetNextLayer, IIpV4NextLayer
public sealed class IpV4Layer : Layer, IEthernetNextLayer, IIpNextLayer
{
/// <summary>
/// Creates an IPv4 layer with all zero values.
......@@ -131,10 +131,10 @@ namespace PcapDotNet.Packets.IpV4
{
if (nextLayer == null)
throw new ArgumentException("Can't determine protocol automatically from next layer because there is no next layer");
IIpV4NextLayer ipV4NextLayer = nextLayer as IIpV4NextLayer;
if (ipV4NextLayer == null)
IIpNextLayer ipNextLayer = nextLayer as IIpNextLayer;
if (ipNextLayer == null)
throw new ArgumentException("Can't determine protocol automatically from next layer (" + nextLayer.GetType() + ")");
protocol = ipV4NextLayer.PreviousLayerProtocol;
protocol = ipNextLayer.PreviousLayerProtocol;
}
else
protocol = Protocol.Value;
......@@ -156,7 +156,7 @@ namespace PcapDotNet.Packets.IpV4
/// <param name="nextLayer">The layer that comes after this layer. null if this is the last layer.</param>
public override void Finalize(byte[] buffer, int offset, int payloadLength, ILayer nextLayer)
{
IIpV4NextTransportLayer nextTransportLayer = nextLayer as IIpV4NextTransportLayer;
IIpNextTransportLayer nextTransportLayer = nextLayer as IIpNextTransportLayer;
if (nextTransportLayer == null || !nextTransportLayer.CalculateChecksum)
return;
......
......@@ -12,7 +12,7 @@ namespace PcapDotNet.Packets.IpV6
/// Represents IPv6 layer.
/// <seealso cref="IpV6Datagram"/>
/// </summary>
public sealed class IpV6Layer : Layer, IEthernetNextLayer, IIpV4NextLayer
public sealed class IpV6Layer : Layer, IEthernetNextLayer, IIpNextLayer
{
/// <summary>
/// Creates an IPv6 layer with all zero values.
......@@ -118,10 +118,10 @@ namespace PcapDotNet.Packets.IpV6
{
if (nextLayer == null)
throw new ArgumentException("Can't determine protocol automatically from next layer because there is no next layer");
IIpV4NextLayer ipV4NextLayer = nextLayer as IIpV4NextLayer;
if (ipV4NextLayer == null)
IIpNextLayer ipNextLayer = nextLayer as IIpNextLayer;
if (ipNextLayer == null)
throw new ArgumentException("Can't determine protocol automatically from next layer (" + nextLayer.GetType() + ")");
nextHeader = ipV4NextLayer.PreviousLayerProtocol;
nextHeader = ipNextLayer.PreviousLayerProtocol;
}
}
else
......
......@@ -502,8 +502,8 @@
<Compile Include="Ip\V4Option.cs" />
<Compile Include="Ip\IIpOptionQuickStart.cs" />
<Compile Include="IpV4\IpV4OptionTypeRegistrationAttribute.cs" />
<Compile Include="IpV4\IIpV4NextLayer.cs" />
<Compile Include="IpV4\IIpV4NextTransportLayer.cs" />
<Compile Include="Ip\IIpNextLayer.cs" />
<Compile Include="Ip\IIpNextTransportLayer.cs" />
<Compile Include="ILayer.cs" />
<Compile Include="Ip\IOptionUnknownFactory.cs" />
<Compile Include="IpV4\IpV4Layer.cs" />
......
......@@ -8,7 +8,7 @@ namespace PcapDotNet.Packets.Transport
/// Contains the common part of UDP and TCP layers.
/// <seealso cref="TransportDatagram"/>
/// </summary>
public abstract class TransportLayer : Layer, IIpV4NextTransportLayer, IEquatable<TransportLayer>
public abstract class TransportLayer : Layer, IIpNextTransportLayer, IEquatable<TransportLayer>
{
/// <summary>
/// Checksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header,
......
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