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