Commit 339bb612 authored by Brickner_cp's avatar Brickner_cp

Wireshark 1.12.3.

parent 44f22cf6
......@@ -156,6 +156,16 @@ namespace PcapDotNet.Core.Test
ComparePacketsToWireshark(packet);
}
[TestMethod]
public void CompareWiresharkSupportedDNSLocPacketTest()
{
Packet packet = Packet.FromHexadecimalString(
"0b1b92a8f700de93ce5ea8b68100c0cd08004ac50459df790000ea110b47541a980dd85201b0013408413c1ec33482820896810101010001000014eb45a8043100000b969551000400050002000506656f6c686c710000270000017604646a6c630377766d0970617969667874796e026278067771796d686d0000fb00fe046479696907636777686566780468636b6f027470066965746e6c6208706970677170766a09706176676974746a7902716a08777177697475746e00003b000100001f000102756c076d79667769686f046b6f676b04736c79690376627003767275086175666a726a657203786c79096c666964656271796f0000270004497b4aff002b09796b6364646d626e680765617776667369056d696a6a750266710665756c687174076b7470667578770004656468660000200003210deee900064ada961b83bb0476777275046e67646c046464726e0478666a63036b736f02686f0466756574026963000066000060c2b81d0023fa537aa79bafc900ba72baf5109e3cd3900a2fa97980d88cac526248b486c7e708d1220171076c65616371716c00002200ff06e1d59b00160095c474277a7aeefa494c804b33abd3ed3e7b567e43066a637663676402686b0175000063000445c8d093002a00056b67512e7b06fb4d96e0cb6f01440736025e9cf57be200000005d39c2779b00894d4ea17f164ea86087964636d70767961057274786277046c66666a08696b6f766966696e0974616561766a79647702776800800100fe404b8ca8002c8b8b07005909d78ce4c9b7582b0eb691904fe0f562a7356e188112e9d3d2420efb08f8aa9ec31a0ce73dfc5201740769767974786c71066566766d646400002300030ea3fe8700576cf8a57f094445474c50525355581749009cb5291318a58b11c13f1b67014114f984e9cb7cbb1647b4cded67aedb210dacedc13b42c4a6f9e11e4a61d60164046b687667076970736368626c02747902697103706a740008797965636b7763730171076d726b6865776c09686c6873737879766d066b766c766a70056177646a6c06686f757877680000000001716661fe002a7e21461c5c9fcc412e968302e8bd7966b1a9e4d69d5ac4d753a6a1bfa8b9c949edf944b0e75277dc307008636172746375706f0976666e6b617568616b03757467036a686e000005000062036c830003016e0003786470027364066b62716e747500001d00ff3adb54a5001000376774db335718878e747dc84fa05f0476736d79076e62646a706872077466627471656606736f6571696600001000fe2becff97002e014a08292c1e697201885d025b9101ed07758dffc47e5d5c020c6801230352df0b07d5296bab440b19041f23240a0474777579066e667478697509687269646176636e790001000001725d2830006963c39426563937c3dfa290cf45fd9bc7d2d13d2c502555bd94b8eda68e760974d18a23c25df1a4b207973f14cb7f2238e2b4e4eaca55780b2c294da64c903469991bfdbad9d869e02c8a25b8e540f21495b4c3da911eaa7c1118960da4fd667663d57aaf82675f0a4b",
DateTime.Now, DataLinkKind.Ethernet);
ComparePacketsToWireshark(packet);
}
[TestMethod]
public void CompareIpV4DataLinkToWiresharkTest()
{
......@@ -462,9 +472,6 @@ namespace PcapDotNet.Core.Test
process.WaitForExit();
Console.WriteLine(errorOutput);
File.WriteAllText(documentFilename, output);
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10651 is fixed.
if (process.ExitCode == 3)
return;
Assert.AreEqual(0, process.ExitCode);
}
......
......@@ -373,8 +373,7 @@ namespace PcapDotNet.Core.Test
break;
case "dns.wks.protocol":
// TODO: Uncomment this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10675 is fixed.
// dataField.AssertShowDecimal((byte)wksData.Protocol);
dataField.AssertShowDecimal((byte)wksData.Protocol);
break;
case "dns.wks.bits":
......@@ -567,8 +566,7 @@ namespace PcapDotNet.Core.Test
break;
case "dns.idsn.sa.address":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10650 is fixed.
// dataField.AssertValue(isdnData.Subaddress);
dataField.AssertValue(isdnData.Subaddress);
break;
default:
......@@ -820,9 +818,37 @@ namespace PcapDotNet.Core.Test
dataField.AssertShowDecimal(locData.Version);
break;
// TODO: Remove this case when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10960 is fixed.
case "dns.loc.unknown_data":
break;
case "dns.loc.size":
string sizeValue = dataField.Showname().Split(new[] {'(', ')'})[1];
Assert.AreEqual((locData.Size / 100) + " m", sizeValue);
break;
case "dns.loc.horizontal_precision":
string horizontalPrecisionValue = dataField.Showname().Split(new[] {'(', ')'})[1];
Assert.AreEqual((locData.HorizontalPrecision / 100).ToString(), horizontalPrecisionValue);
break;
case "dns.loc.vertial_precision":
string verticalPrecisionValue = dataField.Showname().Split(new[] {'(', ')'})[1];
Assert.AreEqual((locData.VerticalPrecision / 100).ToString(), verticalPrecisionValue);
break;
case "dns.loc.latitude":
dataField.AssertShowDecimal(locData.Latitude);
break;
case "dns.loc.longitude":
dataField.AssertShowDecimal(locData.Longitude);
break;
case "dns.loc.altitude":
dataField.AssertShowDecimal(locData.Altitude);
break;
default:
throw new InvalidOperationException("Invalid DNS data field " + dataFieldName);
}
......@@ -915,8 +941,7 @@ namespace PcapDotNet.Core.Test
break;
case "dns.naptr.replacement_length":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10700 is fixed.
// dataField.AssertShowDecimal(naPtrData.Replacement.NonCompressedLength);
dataField.AssertShowDecimal(naPtrData.Replacement.NonCompressedLength);
break;
case "dns.naptr.replacement":
......@@ -981,8 +1006,7 @@ namespace PcapDotNet.Core.Test
break;
case "dns.a6.address_suffix":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10652 is fixed.
// Assert.AreEqual(new IpV6Address(dataFieldShow), a6Data.AddressSuffix);
Assert.AreEqual(new IpV6Address(dataFieldShow), a6Data.AddressSuffix);
break;
case "dns.a6.prefix_name":
......@@ -1123,7 +1147,10 @@ namespace PcapDotNet.Core.Test
case "dns.apl.afdpart.ipv4":
case "dns.apl.afdpart.ipv6":
if (dataFieldName != "dns.apl.afdpart.data")
Assert.AreEqual(AddressFamily.IpV4, aplData.Items[_aplItemIndex - 1].AddressFamily);
{
Assert.AreEqual(dataFieldName == "dns.apl.afdpart.ipv4" ? AddressFamily.IpV4 : AddressFamily.IpV6,
aplData.Items[_aplItemIndex - 1].AddressFamily);
}
dataField.AssertValue(aplData.Items[_aplItemIndex - 1].AddressFamilyDependentPart);
break;
......
......@@ -31,7 +31,9 @@ namespace PcapDotNet.Core.Test
break;
case "eth.trailer":
field.AssertValue(ethernetDatagram.Trailer);
// TODO: Support RARP.
if (ethernetDatagram.EtherType != EthernetType.ReverseArp)
field.AssertValue(ethernetDatagram.Trailer);
break;
case "eth.fcs":
......
......@@ -156,6 +156,10 @@ namespace PcapDotNet.Core.Test
case "icmp.resptime":
break;
// TODO: Remove this case when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10939 is fixed.
case "icmp.length":
break;
default:
if (!field.Name().StartsWith("lt2p.") &&
field.Name() != "pweth" &&
......
......@@ -24,16 +24,7 @@ namespace PcapDotNet.Core.Test
if (field.Show() == "0")
return false; // TODO: support IGMP version 0.
if (field.Show() == "3" && igmpDatagram.Version == 1)
{
// TODO: Fix following https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10526
Assert.AreEqual(IgmpMessageType.MembershipQuery, igmpDatagram.MessageType);
Assert.AreEqual(8, igmpDatagram.Length);
}
else
{
field.AssertShowDecimal(igmpDatagram.Version);
}
field.AssertShowDecimal(igmpDatagram.Version);
break;
case "igmp.type":
......
......@@ -23,9 +23,6 @@ namespace PcapDotNet.Core.Test
switch (field.Name())
{
case "ip.version":
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10706 is fixed.
if (field.Show() != ipV4Datagram.Version.ToString())
return false;
field.AssertShowDecimal(ipV4Datagram.Version);
field.AssertNoFields();
break;
......@@ -140,14 +137,20 @@ namespace PcapDotNet.Core.Test
case "ip.dst":
case "ip.dst_host":
field.AssertShow(ipV4Datagram.Destination.ToString());
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10959 is fixed or (worst case) when MTU Reply option is supported.
if (ipV4Datagram.Options == null || !ipV4Datagram.Options.Any(option => option.OptionType == IpV4OptionType.MaximumTransmissionUnitReply))
field.AssertShow(ipV4Datagram.Destination.ToString());
field.AssertNoFields();
break;
case "ip.addr":
case "ip.host":
Assert.IsTrue(field.Show() == ipV4Datagram.Source.ToString() ||
field.Show() == ipV4Datagram.Destination.ToString());
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10959 is fixed or (worst case) when MTU Reply option is supported.
if (ipV4Datagram.Options == null || !ipV4Datagram.Options.Any(option => option.OptionType == IpV4OptionType.MaximumTransmissionUnitReply))
{
Assert.IsTrue(field.Show() == ipV4Datagram.Source.ToString() ||
field.Show() == ipV4Datagram.Destination.ToString());
}
field.AssertNoFields();
break;
......
......@@ -102,11 +102,18 @@ namespace PcapDotNet.Core.Test
if (_currentExtensionHeaderIndex >= ipV6Datagram.ExtensionHeaders.Headers.Count)
{
Assert.IsFalse(ipV6Datagram.ExtensionHeaders.IsValid);
int length = int.Parse(
field.Fields().Where(subfield => subfield.Name() == "" && subfield.Show().StartsWith("Length:")).Select(
subfield => subfield.Show().Split(new[] {':', '(', ' '}, StringSplitOptions.RemoveEmptyEntries)[2]).First());
int maxLength = ipV6Datagram.Length - IpV6Datagram.HeaderLength - ipV6Datagram.ExtensionHeaders.BytesLength;
MoreAssert.IsBigger(maxLength, length);
if (field.Fields().Any(subfield => subfield.Name() == ""))
{
int length = int.Parse(
field.Fields().Where(subfield => subfield.Name() == "" && subfield.Show().StartsWith("Length:")).Select(
subfield => subfield.Show().Split(new[] {':', '(', ' '}, StringSplitOptions.RemoveEmptyEntries)[2]).First());
MoreAssert.IsBigger(maxLength, length);
} else
{
Assert.AreEqual(6, maxLength);
}
}
else
{
......@@ -396,9 +403,9 @@ namespace PcapDotNet.Core.Test
case "ipv6.opt.calipso.cmpt_bitmap":
headerSubfield.AssertNoFields();
// TODO: Uncomment and avoid returning when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10561 is fixed.
// headerSubfield.AssertValue(optionCalipso.CompartmentBitmap);
return;
headerSubfield.AssertValue(optionCalipso.CompartmentBitmap);
++optionsIndex;
break;
case "ipv6.opt.router_alert":
headerSubfield.AssertNoFields();
......@@ -441,8 +448,14 @@ namespace PcapDotNet.Core.Test
case "ipv6.opt.qs_nonce":
headerSubfield.AssertNoFields();
// TODO: Stop returning and uncomment the code when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10575 is fixed.
return;
headerSubfield.AssertShowDecimal(optionQuickStart.Nonce);
break;
case "ipv6.opt.qs_reserved":
headerSubfield.AssertNoFields();
headerSubfield.AssertShowDecimal(0);
++optionsIndex;
break;
case "ipv6.opt.pad1":
headerSubfield.AssertNoFields();
......
......@@ -602,9 +602,6 @@ namespace PcapDotNet.Core.Test
break;
case "Mobility Options":
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10703 is fixed.
if (mobilityHeader.MobilityHeaderType == IpV6MobilityHeaderType.Experimental)
break;
int optionIndex = 0;
foreach (XElement optionField in field.Fields())
{
......@@ -660,16 +657,8 @@ namespace PcapDotNet.Core.Test
case IpV6MobilityOptionType.IpV4DefaultRouterAddress:
var ipV4DefaultRouterAddress = (IpV6MobilityOptionIpV4DefaultRouterAddress)option;
optionField.AssertShow("IPv4 Default-Router Address: " + ipV4DefaultRouterAddress.DefaultRouterAddress);
bool encounteredOptionTypeInIpV4DefaultRouterAddress = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10631 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionTypeInIpV4DefaultRouterAddress)
continue;
encounteredOptionTypeInIpV4DefaultRouterAddress = true;
}
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
optionSubfield.AssertNoFields();
......@@ -744,16 +733,8 @@ namespace PcapDotNet.Core.Test
case IpV6MobilityOptionType.IpV4HomeAddressRequest:
var ipV4HomeAddressRequest = (IpV6MobilityOptionIpV4HomeAddressRequest)option;
optionField.AssertShow("IPv4 Home Address Request: " + ipV4HomeAddressRequest.HomeAddress);
bool encounteredOptionTypeInIpV4HomeAddressRequest = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10618 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionTypeInIpV4HomeAddressRequest)
continue;
encounteredOptionTypeInIpV4HomeAddressRequest = true;
}
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
......@@ -875,16 +856,8 @@ namespace PcapDotNet.Core.Test
case IpV6MobilityOptionType.VendorSpecific:
Assert.IsTrue(optionField.Show().StartsWith("Vendor Specific: "));
IpV6MobilityOptionVendorSpecific vendorSpecific = (IpV6MobilityOptionVendorSpecific)option;
bool encounteredOptionType = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10618 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionType)
continue;
encounteredOptionType = true;
}
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
optionSubfield.AssertNoFields();
......@@ -1012,16 +985,8 @@ namespace PcapDotNet.Core.Test
optionField.AssertShow("Authorization Data");
IpV6MobilityOptionBindingAuthorizationData authorizationData =
(IpV6MobilityOptionBindingAuthorizationData)option;
bool encounteredOptionTypeInBindingAuthorizationData = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10623 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionTypeInBindingAuthorizationData)
continue;
encounteredOptionTypeInBindingAuthorizationData = true;
}
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
......@@ -1054,17 +1019,8 @@ namespace PcapDotNet.Core.Test
case IpV6MobilityOptionType.IpV4HomeAddress:
optionField.AssertShow("IPv4 Home Address");
IpV6MobilityOptionIpV4HomeAddress ipV4HomeAddress = (IpV6MobilityOptionIpV4HomeAddress)option;
bool encounteredOptionTypeInIpV4HomeAddress = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10618 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionTypeInIpV4HomeAddress)
continue;
encounteredOptionTypeInIpV4HomeAddress = true;
}
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
......@@ -1275,17 +1231,8 @@ namespace PcapDotNet.Core.Test
case IpV6MobilityOptionType.MobileNodeGroupIdentifier:
var mobileNodeGroupIdentifier = (IpV6MobilityOptionMobileNodeGroupIdentifier)option;
bool encounteredOptionTypeInMobileNodeGroupIdentifier = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10618 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionTypeInMobileNodeGroupIdentifier)
continue;
encounteredOptionTypeInMobileNodeGroupIdentifier = true;
}
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
......@@ -1326,8 +1273,7 @@ namespace PcapDotNet.Core.Test
break;
case "mip6.badff.auth":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10577 is fixed.
// optionSubfield.AssertValue(bindingAuthorizationDataForFmIpV6.Authenticator);
optionSubfield.AssertValue(bindingAuthorizationDataForFmIpV6.Authenticator);
break;
default:
......@@ -1352,8 +1298,7 @@ namespace PcapDotNet.Core.Test
break;
case "mip6.mnlli.lli":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10578 is fixed.
// optionSubfield.AssertValue(mobileNodeLinkLayerIdentifier.LinkLayerIdentifier);
optionSubfield.AssertValue(mobileNodeLinkLayerIdentifier.LinkLayerIdentifier);
break;
default:
......@@ -1438,8 +1383,7 @@ namespace PcapDotNet.Core.Test
switch (optionSubfield.Name())
{
case "mip6.phkt.phkt":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10619 is fixed.
// optionSubfield.AssertValue(permanentHomeKeygenToken.PermanentHomeKeygenToken);
optionSubfield.AssertValue(permanentHomeKeygenToken.PermanentHomeKeygenToken);
break;
default:
......@@ -1460,13 +1404,11 @@ namespace PcapDotNet.Core.Test
switch (optionSubfield.Name())
{
case "mip6.redir.k":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10622 is fixed.
// optionSubfield.AssertShowDecimal(redirect.LocalMobilityAddressIpV6 != null);
optionSubfield.AssertShowDecimal(redirect.LocalMobilityAddressIpV6 != null);
break;
case "mip6.redir.n":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10622 is fixed.
// optionSubfield.AssertShowDecimal(redirect.LocalMobilityAddressIpV4 != null);
optionSubfield.AssertShowDecimal(redirect.LocalMobilityAddressIpV4 != null);
break;
case "mip6.redir.reserved":
......@@ -1499,8 +1441,7 @@ namespace PcapDotNet.Core.Test
switch (optionSubfield.Name())
{
case "mip6.mocot.co_keygen_tok":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10624 is fixed.
// optionSubfield.AssertValue(careOfTest.CareOfKeygenToken);
optionSubfield.AssertValue(careOfTestOption.CareOfKeygenToken);
break;
default:
......@@ -1517,7 +1458,16 @@ namespace PcapDotNet.Core.Test
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
// TODO: Implement when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10625 is fixed.
switch (optionSubfield.Name())
{
case "mip6.mseg_id.timestamp":
optionSubfield.AssertValue(replayProtection.Timestamp);
break;
default:
throw new InvalidOperationException(string.Format("Invalid IPv6 Mobility option subfield {0}",
optionSubfield.Name()));
}
}
break;
......@@ -1536,8 +1486,7 @@ namespace PcapDotNet.Core.Test
break;
case "mip6.auth.mobility_spi":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10626 is fixed.
// optionSubfield.AssertShowDecimal(authentication.MobilitySecurityParameterIndex);
optionSubfield.AssertShowDecimal(authentication.MobilitySecurityParameterIndex);
break;
case "mip6.auth.auth_data":
......@@ -1579,16 +1528,8 @@ namespace PcapDotNet.Core.Test
case IpV6MobilityOptionType.IpV4DhcpSupportMode:
var ipV4DhcpSupportMode = (IpV6MobilityOptionIpV4DhcpSupportMode)option;
bool encounteredOptionTypeInIpV4DhcpSupportMode = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10618 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionTypeInIpV4DhcpSupportMode)
continue;
encounteredOptionTypeInIpV4DhcpSupportMode = true;
}
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
......@@ -1612,16 +1553,8 @@ namespace PcapDotNet.Core.Test
case IpV6MobilityOptionType.DnsUpdate:
var dnsUpdate = (IpV6MobilityOptionDnsUpdate)option;
bool encounteredOptionTypeInDnsUpdate = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10618 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionTypeInDnsUpdate)
continue;
encounteredOptionTypeInDnsUpdate = true;
}
if (HandleCommonMobilityOptionSubfield(optionSubfield, option))
continue;
......@@ -1637,8 +1570,7 @@ namespace PcapDotNet.Core.Test
break;
case "mip6.dnsu.mn_id":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10629 is fixed.
// optionSubfield.AssertValue(dnsUpdate.MobileNodeIdentity);
optionSubfield.AssertValue(dnsUpdate.MobileNodeIdentity);
break;
default:
......@@ -1659,22 +1591,20 @@ namespace PcapDotNet.Core.Test
switch (optionSubfield.Name())
{
case "mmip6.lmaa.opt_code":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10630 is fixed.
// optionSubfield.AssertShowDecimal((byte)localMobilityAnchorAddress.Code);
optionSubfield.AssertShowDecimal((byte)localMobilityAnchorAddress.Code);
break;
case "mmip6.lmaa.reserved":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10630 is fixed.
// optionSubfield.AssertShowDecimal(0);
optionSubfield.AssertShowDecimal(0);
break;
case "mip6.lmaa.ipv6":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10630 is fixed.
// optionSubfield.AssertValue(localMobilityAnchorAddress.LocalMobilityAnchorAddressIpV6.Value.ToValue());
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10961 is fixed.
// optionSubfield.AssertValue(localMobilityAnchorAddress.LocalMobilityAnchorAddressIpV6.Value.ToValue());
break;
case "mip6.lmaa.ipv4":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10630 is fixed.
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10961 is fixed.
// optionSubfield.AssertShow(localMobilityAnchorAddress.LocalMobilityAnchorAddressIpV4.Value.ToString());
break;
......@@ -1703,40 +1633,25 @@ namespace PcapDotNet.Core.Test
break;
case "mmip6.cr.req_type":
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10676 is fixed.
if (requestIndex == contextRequest.Requests.Count)
continue;
optionSubfield.AssertShowDecimal(contextRequest.Requests[requestIndex].RequestType);
break;
case "mmip6.cr.req_length":
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10676 is fixed.
if (requestIndex == contextRequest.Requests.Count)
continue;
optionSubfield.AssertShowDecimal(contextRequest.Requests[requestIndex].OptionLength);
if (contextRequest.Requests[requestIndex].OptionLength == 0)
++requestIndex;
break;
case "mip6.vsm.vendorId":
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10676 is fixed.
if (requestIndex == contextRequest.Requests.Count)
continue;
optionSubfield.AssertValue(contextRequest.Requests[requestIndex].Option.Subsegment(0, 4));
break;
case "mip6.vsm.subtype":
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10676 is fixed.
if (requestIndex == contextRequest.Requests.Count)
continue;
optionSubfield.AssertValue(contextRequest.Requests[requestIndex].Option.Subsegment(4, 1));
++requestIndex;
break;
case "":
// TODO: Remove this condition when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10676 is fixed.
if (requestIndex == contextRequest.Requests.Count)
continue;
optionSubfield.AssertValue(contextRequest.Requests[requestIndex].Option);
++requestIndex;
break;
......@@ -1780,8 +1695,7 @@ namespace PcapDotNet.Core.Test
switch (optionSubfield.Name())
{
case "mip6.sign.sign":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10653 is fixed.
// optionSubfield.AssertValue(signature.Signature);
optionSubfield.AssertValue(signature.Signature);
break;
default:
......@@ -1863,8 +1777,7 @@ namespace PcapDotNet.Core.Test
switch (optionSubfield.Name())
{
case "mip6.cgar.cga_par":
// TODO: Uncomment this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10654 is fixed.
// optionSubfield.AssertValue(cryptographicallyGeneratedAddressParameters.CryptographicallyGeneratedAddressParameters);
optionSubfield.AssertValue(cryptographicallyGeneratedAddressParameters.CryptographicallyGeneratedAddressParameters);
break;
default:
......@@ -1955,8 +1868,7 @@ namespace PcapDotNet.Core.Test
switch (optionSubfield.Name())
{
case "mip6.em.data":
// TODO: Uncomment when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10682 is fixed.
// optionSubfield.AssertValue(experimental.Data);
optionSubfield.AssertValue(experimental.Data);
break;
default:
......@@ -1989,16 +1901,8 @@ namespace PcapDotNet.Core.Test
case IpV6MobilityOptionType.CareOfTestInit:
optionField.AssertShow("Care-of Test Init");
bool encounteredOptionTypeInCareOfTestInit = false;
foreach (XElement optionSubfield in optionField.Fields())
{
// TODO: Remove this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10618 is fixed.
if (optionSubfield.Name() == "mip6.mobility_opt")
{
if (encounteredOptionTypeInCareOfTestInit)
continue;
encounteredOptionTypeInCareOfTestInit = true;
}
Assert.IsTrue(HandleCommonMobilityOptionSubfield(optionSubfield, option));
}
break;
......@@ -2106,8 +2010,7 @@ namespace PcapDotNet.Core.Test
{
case "mip6.mobility_opt":
optionSubfield.AssertNoFields();
// TODO: Uncomment this when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10618 is fixed.
// optionSubfield.AssertShowDecimal((byte)option.OptionType);
optionSubfield.AssertShowDecimal((byte)option.OptionType);
return true;
case "mip6.mobility_opt.len":
......
......@@ -508,7 +508,7 @@ namespace PcapDotNet.Core.Test
case (TcpOptionType)30:
// TODO: Support 30.
Assert.IsTrue(field.Show().StartsWith("Multipath TCP: "));
Assert.IsTrue(field.Show().StartsWith("Multipath TCP"));
break;
case (TcpOptionType)78:
......
......@@ -75,8 +75,12 @@ namespace PcapDotNet.Packets.TestUtils
if (maximumOptionLength >= IpV4OptionUnknown.OptionMinimumLength && random.Next(100) > 90)
return random.NextIpV4OptionUnknown(maximumOptionLength);
// TODO: Support MtuProbe.
List<IpV4OptionType> impossibleOptionTypes = new List<IpV4OptionType> {IpV4OptionType.MaximumTransmissionUnitProbe};
// TODO: Support MTU Probe and MTU Reply.
List<IpV4OptionType> impossibleOptionTypes = new List<IpV4OptionType>
{
IpV4OptionType.MaximumTransmissionUnitProbe,
IpV4OptionType.MaximumTransmissionUnitReply
};
if (maximumOptionLength < IpV4OptionBasicSecurity.OptionMinimumLength)
impossibleOptionTypes.Add(IpV4OptionType.BasicSecurity);
if (maximumOptionLength < IpV4OptionRoute.OptionMinimumLength)
......
......@@ -69,6 +69,13 @@ namespace PcapDotNet.Packets.IpV4
/// </summary>
MaximumTransmissionUnitProbe = 11,
/// <summary>
/// MTU Reply.
/// RFCs 1063, 1191.
/// Obsoleted.
/// </summary>
MaximumTransmissionUnitReply = 12,
/// <summary>
/// Quick Start (QS). RFC 4782.
/// </summary>
......
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