/// This option indicates the end of the option list.
/// This might not coincide with the end of the internet header according to the internet header length.
/// This is used at the end of all options, not the end of each option, and need only be used if the end of the options would not otherwise coincide with the end of the internet header.
/// May be copied, introduced, or deleted on fragmentation, or for any other reason.
///</summary>
publicstaticIpV4OptionSimpleEnd
publicstaticIpV4OptionSimpleEnd
{
{
get{return_end;}
get{return_end;}
}
}
/// <summary>
/// This option may be used between options, for example, to align the beginning of a subsequent option on a 32 bit boundary.
/// May be copied, introduced, or deleted on fragmentation, or for any other reason.
/// </summary>
publicstaticIpV4OptionSimpleNop
publicstaticIpV4OptionSimpleNop
{
{
get{return_nop;}
get{return_nop;}
}
}
/// <summary>
/// The type of the ip option.
/// </summary>
publicIpV4OptionTypeOptionType
publicIpV4OptionTypeOptionType
{
{
get{return_type;}
get{return_type;}
}
}
/// <summary>
/// The number of bytes this option will take.
/// </summary>
publicabstractintLength
publicabstractintLength
{
{
get;
get;
}
}
/// <summary>
/// True iff this option may appear at most once in a datagram.
/// </summary>
publicabstractboolIsAppearsAtMostOnce
publicabstractboolIsAppearsAtMostOnce
{
{
get;
get;
}
}
/// <summary>
/// Checks whether two options have equivalent type.
/// Useful to check if an option that must appear at most once appears in the list.
/// </summary>
publicboolEquivalent(IpV4Optionoption)
publicboolEquivalent(IpV4Optionoption)
{
{
returnOptionType==option.OptionType;
returnOptionType==option.OptionType;
}
}
/// <summary>
/// Checks if the two options are exactly the same - including type and value.
/// </summary>
publicvirtualboolEquals(IpV4Optionother)
publicvirtualboolEquals(IpV4Optionother)
{
{
if(other==null)
if(other==null)
...
@@ -41,16 +70,33 @@ namespace PcapDotNet.Packets
...
@@ -41,16 +70,33 @@ namespace PcapDotNet.Packets
returnEquivalent(other);
returnEquivalent(other);
}
}
/// <summary>
/// Checks if the two options are exactly the same - including type and value.
/// </summary>
publicoverrideboolEquals(objectobj)
publicoverrideboolEquals(objectobj)
{
{
returnEquals(objasIpV4Option);
returnEquals(objasIpV4Option);
}
}
/// <summary>
/// Serves as a hash function for a particular type.
/// </summary>
/// <returns>
/// A hash code for the current <see cref="T:System.Object"/>.
/// </returns>
/// <filterpriority>2</filterpriority>
publicoverrideintGetHashCode()
publicoverrideintGetHashCode()
{
{
return(byte)OptionType;
return(byte)OptionType;
}
}
/// <summary>
/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
/// </summary>
/// <returns>
/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.