Commit 65e2570e authored by Brickner_cp's avatar Brickner_cp

Refactoring.

parent 04f41c99
......@@ -17,7 +17,7 @@ namespace PcapDotNet.Core.Test
return "NOP";
case IpV4OptionType.BasicSecurity:
return "Security:";
return "Security";
case IpV4OptionType.LooseSourceRouting:
return "Loose source route (" + option.Length + " bytes)";
......
......@@ -310,7 +310,7 @@ namespace PcapDotNet.Core.Test
IpV4Option option = options[currentOptionIndex++];
if (option.OptionType == IpV4OptionType.BasicSecurity)
{
Assert.IsTrue(field.Show().StartsWith("Security"));
Assert.IsTrue(field.Show().StartsWith(option.GetWiresharkString()));
continue; // Wireshark doesn't support
}
field.AssertShow(option.GetWiresharkString());
......
......@@ -19,7 +19,7 @@ namespace PcapDotNet.Packets.IpV4
if (length + 1 < optionLength)
return null;
byte optionValueLength = (byte)(optionLength - 2);
byte optionValueLength = (byte)(optionLength - OptionHeaderLength);
switch (optionType)
{
......
......@@ -15,6 +15,9 @@ namespace PcapDotNet.Packets.IpV4
/// 1 = reserved for future use
/// 2 = debugging and measurement
/// 3 = reserved for future use
///
/// DoD Extended Security Option (133), RFC 1108, is not supported because it only defines abstract option and no concrete option RFC is available.
/// EIP: The Extended Internet Protocol, RFC 1385, is not supported because according iana.org its option type is 145 but according to the RFC its option type is 138 (0x8A).
/// </summary>
public enum IpV4OptionType : byte
{
......
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