Commit afba2b7c authored by Brickner_cp's avatar Brickner_cp

1 warning left.

parent 72e02475
...@@ -247,12 +247,12 @@ namespace PcapDotNet.Core.Test ...@@ -247,12 +247,12 @@ namespace PcapDotNet.Core.Test
{ {
_hipRendezvousServersIndex = 0; _hipRendezvousServersIndex = 0;
_wksBitmapIndex = 0; _wksBitmapIndex = 0;
_nxtTypeIndex = 0; // TODO: Uncomment this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10615 is fixed.
// _nxtTypeIndex = 0;
_spfTypeIndex = 0; _spfTypeIndex = 0;
_txtTypeIndex = 0; _txtTypeIndex = 0;
_nSecTypeIndex = 0; _nSecTypeIndex = 0;
_nSec3TypeIndex = 0; _nSec3TypeIndex = 0;
_txtIndex = 0;
_aplItemIndex = 0; _aplItemIndex = 0;
_optOptionIndex = 0; _optOptionIndex = 0;
} }
...@@ -1753,12 +1753,12 @@ namespace PcapDotNet.Core.Test ...@@ -1753,12 +1753,12 @@ namespace PcapDotNet.Core.Test
private int _hipRendezvousServersIndex; private int _hipRendezvousServersIndex;
private int _wksBitmapIndex; private int _wksBitmapIndex;
private int _nxtTypeIndex; // TODO: Uncomment this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10615 is fixed.
// private int _nxtTypeIndex;
private int _spfTypeIndex; private int _spfTypeIndex;
private int _txtTypeIndex; private int _txtTypeIndex;
private int _nSecTypeIndex; private int _nSecTypeIndex;
private int _nSec3TypeIndex; private int _nSec3TypeIndex;
private int _txtIndex;
private int _aplItemIndex; private int _aplItemIndex;
private int _optOptionIndex; private int _optOptionIndex;
} }
......
using System; using System;
using System.Globalization;
using PcapDotNet.Packets.IpV4; using PcapDotNet.Packets.IpV4;
namespace PcapDotNet.Packets.Ip namespace PcapDotNet.Packets.Ip
...@@ -13,6 +14,9 @@ namespace PcapDotNet.Packets.Ip ...@@ -13,6 +14,9 @@ namespace PcapDotNet.Packets.Ip
/// </summary> /// </summary>
public const byte RateMaximumValue = 0x0F; public const byte RateMaximumValue = 0x0F;
/// <summary>
/// The maximum value for the nonce field.
/// </summary>
public const uint NonceMaximumValue = 0x3FFFFFFF; public const uint NonceMaximumValue = 0x3FFFFFFF;
internal const int DataLength = 6; internal const int DataLength = 6;
...@@ -42,14 +46,14 @@ namespace PcapDotNet.Packets.Ip ...@@ -42,14 +46,14 @@ namespace PcapDotNet.Packets.Ip
if (function != IpV4OptionQuickStartFunction.RateRequest && if (function != IpV4OptionQuickStartFunction.RateRequest &&
function != IpV4OptionQuickStartFunction.RateReport) function != IpV4OptionQuickStartFunction.RateReport)
{ {
throw new ArgumentException(string.Format("Illegal function {0}", function), "function"); throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Illegal function {0}", function), "function");
} }
if (rate > RateMaximumValue) if (rate > RateMaximumValue)
throw new ArgumentOutOfRangeException("rate", rate, string.Format("Rate maximum value is {0}", RateMaximumValue)); throw new ArgumentOutOfRangeException("rate", rate, string.Format(CultureInfo.InvariantCulture, "Rate maximum value is {0}", RateMaximumValue));
if (nonce > NonceMaximumValue) if (nonce > NonceMaximumValue)
throw new ArgumentException(string.Format("nonce cannot be bigger than {0}", NonceMaximumValue), "nonce"); throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "nonce cannot be bigger than {0}", NonceMaximumValue), "nonce");
} }
internal static int CalcRateKbps(byte rate) internal static int CalcRateKbps(byte rate)
......
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