Commit 5c5d2b2f authored by Brickner_cp's avatar Brickner_cp

200 warnings left.

Code Coverage 96.13%
parent 46613819
......@@ -18,6 +18,7 @@
<Word>ax</Word>
<Word>axfr</Word>
<Word>bbn</Word> <!-- Probably BBN Technologies (originally Bolt, Beranek and Newman) -->
<Word>calipso</Word>
<Word>cbt</Word>
<Word>ccitt</Word>
<Word>cftp</Word> <!-- maybe Configurable Fault Tolerant Processor -->
......@@ -53,6 +54,7 @@
<Word>ipsilon</Word> <!-- As in Ipsilon Networks -->
<Word>ipx</Word>
<Word>ixfr</Word>
<Word>keygen</Word>
<Word>kryptolan</Word>
<Word>lite</Word>
<Word>llq</Word>
......@@ -62,6 +64,7 @@
<Word>multiprotocol</Word>
<Word>nca</Word>
<Word>netmask</Word>
<Word>nonces</Word>
<Word>nsa</Word>
<Word>osi</Word>
<Word>pcap</Word>
......@@ -87,7 +90,9 @@
<Word>unicast</Word>
<Word>uti</Word>
<Word>vpn</Word>
<Word>wi</Word>
<Word>wiegand</Word>
<Word>wo</Word>
<Word>xtp</Word>
<Word>yx</Word> <!--Yet exists?-->
</Recognized>
......
......@@ -289,8 +289,8 @@ namespace PcapDotNet.Packets.Test
new IpV6Layer
{
ExtensionHeaders = new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(option)))
new IpV6ExtensionHeaderMobilityBindingError(IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue,
IpV6Address.Zero, new IpV6MobilityOptions(option)))
});
Assert.IsTrue(packet.IsValid);
Assert.AreEqual(option, ((IpV6ExtensionHeaderMobility)packet.Ethernet.IpV6.ExtensionHeaders[0]).MobilityOptions[0]);
......@@ -308,7 +308,7 @@ namespace PcapDotNet.Packets.Test
{
ExtensionHeaders = new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionAccessNetworkIdentifier(
new IpV6AccessNetworkIdentifierSubOptions(subOption)))))
......@@ -331,7 +331,7 @@ namespace PcapDotNet.Packets.Test
{
ExtensionHeaders = new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionFlowIdentification(0, 0, IpV6FlowIdentificationStatus.FlowIdentifierNotFound,
new IpV6FlowIdentificationSubOptions(subOption)))))
......@@ -410,14 +410,14 @@ namespace PcapDotNet.Packets.Test
[TestMethod]
[ExpectedException(typeof(ArgumentOutOfRangeException), AllowDerivedTypes = false)]
public void IpV6AccessNetworkIdentifierSubOptionGeoLocationLongtitudeIntegerTooBig()
public void IpV6AccessNetworkIdentifierSubOptionGeoLocationLongitudeIntegerTooBig()
{
Assert.IsNull(new IpV6AccessNetworkIdentifierSubOptionGeoLocation(0, (UInt24)0x7FFFFF));
}
[TestMethod]
[ExpectedException(typeof(ArgumentOutOfRangeException), AllowDerivedTypes = false)]
public void IpV6AccessNetworkIdentifierSubOptionGeoLocationLongtitudeIntegerTooSmall()
public void IpV6AccessNetworkIdentifierSubOptionGeoLocationLongitudeIntegerTooSmall()
{
Assert.IsNull(new IpV6AccessNetworkIdentifierSubOptionGeoLocation(0, (UInt24)0x800000));
}
......@@ -438,14 +438,14 @@ namespace PcapDotNet.Packets.Test
[TestMethod]
[ExpectedException(typeof(ArgumentOutOfRangeException), AllowDerivedTypes = false)]
public void IpV6AccessNetworkIdentifierSubOptionGeoLocationCreateFromRealValuesLongtitudeTooBig()
public void IpV6AccessNetworkIdentifierSubOptionGeoLocationCreateFromRealValuesLongitudeTooBig()
{
Assert.IsNull(IpV6AccessNetworkIdentifierSubOptionGeoLocation.CreateFromRealValues(0, 180.1));
}
[TestMethod]
[ExpectedException(typeof(ArgumentOutOfRangeException), AllowDerivedTypes = false)]
public void IpV6AccessNetworkIdentifierSubOptionGeoLocationCreateFromRealValuesLongtitudeTooSmall()
public void IpV6AccessNetworkIdentifierSubOptionGeoLocationCreateFromRealValuesLongitudeTooSmall()
{
Assert.IsNull(IpV6AccessNetworkIdentifierSubOptionGeoLocation.CreateFromRealValues(0, -180.1));
}
......@@ -475,7 +475,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionAccessNetworkIdentifier(
new IpV6AccessNetworkIdentifierSubOptions(
......@@ -498,7 +498,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionAccessNetworkIdentifier(
new IpV6AccessNetworkIdentifierSubOptions(
......@@ -521,7 +521,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionAccessNetworkIdentifier(
new IpV6AccessNetworkIdentifierSubOptions(
......@@ -774,7 +774,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionRedirect(IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -794,7 +794,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionRedirect(IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -814,7 +814,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionRedirect(IpV6Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -834,7 +834,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionRedirect(IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -943,7 +943,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionLocalMobilityAnchorAddress(IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -963,7 +963,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionLocalMobilityAnchorAddress(IpV6Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -983,7 +983,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionLocalMobilityAnchorAddress(IpV4Address.Zero),
new IpV6MobilityOptionPadN(10))))
......@@ -1005,7 +1005,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionLocalMobilityAnchorAddress(IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1025,7 +1025,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionMobileNodeIdentifier((IpV6MobileNodeIdentifierSubtype)2, DataSegment.Empty))))
});
......@@ -1046,7 +1046,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionMobileNodeIdentifier(IpV6MobileNodeIdentifierSubtype.NetworkAccessIdentifier,
new DataSegment(new byte[1])))))
......@@ -1227,7 +1227,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionCareOfTest(0))))
});
......@@ -1248,7 +1248,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionIpV4CareOfAddress(IpV4Address.Zero))))
});
......@@ -1269,7 +1269,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionReplayProtection(0))))
});
......@@ -1290,7 +1290,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionCareOfTestInit())))
});
......@@ -1311,7 +1311,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionAlternateCareOfAddress(IpV6Address.Zero))))
});
......@@ -1332,7 +1332,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionMobileAccessGatewayIpV6Address(IpV6Address.Zero))))
});
......@@ -1353,7 +1353,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionMobileAccessGatewayIpV6Address(IpV6Address.Zero))))
});
......@@ -1374,7 +1374,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionHomeNetworkPrefix(0, IpV6Address.Zero))))
});
......@@ -1471,7 +1471,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionFlowSummary(new ushort[1]))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1491,7 +1491,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionBindingIdentifier(0, IpV6BindingAcknowledgementStatus.InsufficientResources, false,
0))))
});
......@@ -1512,7 +1512,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionBindingIdentifier(0, IpV6BindingAcknowledgementStatus.InsufficientResources, false,
0, IpV6Address.Zero))))
});
......@@ -1533,7 +1533,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionContextRequest(new IpV6MobilityOptionContextRequestEntry(0, DataSegment.Empty)))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1553,7 +1553,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionContextRequest(new IpV6MobilityOptionContextRequestEntry(0, new DataSegment(new byte[10]))))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1611,7 +1611,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionAlternateIpV4CareOfAddress(IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1631,7 +1631,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionAuthentication(IpV6AuthenticationSubtype.HomeAgent, 0, DataSegment.Empty))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1651,7 +1651,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionBindingAuthorizationDataForFmIpV6(0, DataSegment.Empty))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1671,7 +1671,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionBindingRefreshAdvice(0))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1691,7 +1691,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionDnsUpdate(IpV6DnsUpdateStatus.ReasonUnspecified, false, DataSegment.Empty))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1711,7 +1711,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionFlowIdentification(0, 0, IpV6FlowIdentificationStatus.FlowBindingSuccessful, IpV6FlowIdentificationSubOptions.None))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1731,7 +1731,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionGreKey(0))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1751,7 +1751,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionIpV4AddressAcknowledgement(IpV6AddressAcknowledgementStatus.Success, 0, IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1771,7 +1771,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionIpV4DhcpSupportMode(false))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1791,7 +1791,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionIpV4HomeAddress(0, false, IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1811,7 +1811,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionIpV4HomeAddressReply(IpV6IpV4HomeAddressReplyStatus.Success, 0, IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1831,7 +1831,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionIpV4HomeAddressRequest(0, IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1851,7 +1851,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionIpV6AddressPrefix(IpV6MobilityIpV6AddressPrefixCode.NewCareOfAddress, 0,
IpV6Address.Zero))))
});
......@@ -1872,7 +1872,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionLinkLayerAddress(IpV6MobilityLinkLayerAddressCode.MobilityNode, DataSegment.Empty))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1892,7 +1892,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionLoadInformation(0, 0, 0, 0, 0))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1912,7 +1912,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionMobileNodeGroupIdentifier(IpV6MobileNodeGroupIdentifierSubType.BulkBindingUpdateGroup, 0))))
});
......@@ -1933,7 +1933,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionMobileNodeLinkLayerIdentifier(DataSegment.Empty))))
});
......@@ -1954,7 +1954,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionMobileNodeLinkLocalAddressInterfaceIdentifier(0))))
});
......@@ -1975,7 +1975,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionNatDetection(false, 0))))
});
Assert.IsTrue(packet.IsValid);
......@@ -1995,7 +1995,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionNonceIndices(0, 0))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2015,7 +2015,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionAccessTechnologyType(IpV6AccessTechnologyType.Ethernet))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2035,7 +2035,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionRestartCounter(0))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2055,7 +2055,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionServiceSelection(new DataSegment(new byte[1])))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2075,7 +2075,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionTransientBinding(false, 0))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2095,7 +2095,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionVendorSpecific(0, 0, DataSegment.Empty))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2115,7 +2115,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionCgaParametersRequest())))
});
Assert.IsTrue(packet.IsValid);
......@@ -2135,7 +2135,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionHandoffIndicator(IpV6HandoffIndicator.HandoffBetweenTwoDifferentInterfacesOfTheMobileNode))))
});
......@@ -2156,7 +2156,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionIpV4DefaultRouterAddress(IpV4Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2176,7 +2176,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionLinkLocalAddress(IpV6Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2196,7 +2196,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionMobileNetworkPrefix(0, IpV6Address.Zero))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2216,7 +2216,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionRedirectCapability())))
});
Assert.IsTrue(packet.IsValid);
......@@ -2236,7 +2236,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(new IpV6MobilityOptionTimestamp(0))))
});
Assert.IsTrue(packet.IsValid);
......@@ -2415,7 +2415,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionFlowIdentification(
0, 0, IpV6FlowIdentificationStatus.FlowBindingSuccessful,
......@@ -2440,7 +2440,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionAccessNetworkIdentifier(
new IpV6AccessNetworkIdentifierSubOptions(new IpV6AccessNetworkIdentifierSubOptionGeoLocation(0, 0))))))
......@@ -2462,7 +2462,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionAccessNetworkIdentifier(
new IpV6AccessNetworkIdentifierSubOptions(
......@@ -2486,7 +2486,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionAccessNetworkIdentifier(
new IpV6AccessNetworkIdentifierSubOptions(
......@@ -2510,7 +2510,7 @@ namespace PcapDotNet.Packets.Test
ExtensionHeaders =
new IpV6ExtensionHeaders(
new IpV6ExtensionHeaderMobilityBindingError(
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMhTypeValue, IpV6Address.Zero,
IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
new IpV6MobilityOptions(
new IpV6MobilityOptionAccessNetworkIdentifier(
new IpV6AccessNetworkIdentifierSubOptions(
......
......@@ -559,7 +559,7 @@ namespace PcapDotNet.Packets.TestUtils
public static IpV6AccessNetworkIdentifierSubOption NextIpV6AccessNetworkIdentifierSubOption(this Random random)
{
IpV6AccessNetworkIdentifierSubOptionType optionType = random.NextEnum<IpV6AccessNetworkIdentifierSubOptionType>();
IpV6AccessNetworkIdentifierSubOptionType optionType = random.NextEnum(IpV6AccessNetworkIdentifierSubOptionType.None);
switch (optionType)
{
case IpV6AccessNetworkIdentifierSubOptionType.NetworkIdentifier:
......@@ -568,8 +568,8 @@ namespace PcapDotNet.Packets.TestUtils
case IpV6AccessNetworkIdentifierSubOptionType.GeoLocation:
double latitude = random.NextDouble() * 180 - 90;
double longtitude = random.NextDouble() * 360 - 180;
return IpV6AccessNetworkIdentifierSubOptionGeoLocation.CreateFromRealValues(latitude, longtitude);
double longitude = random.NextDouble() * 360 - 180;
return IpV6AccessNetworkIdentifierSubOptionGeoLocation.CreateFromRealValues(latitude, longitude);
case IpV6AccessNetworkIdentifierSubOptionType.OperatorIdentifier:
return new IpV6AccessNetworkIdentifierSubOptionOperatorIdentifier(random.NextEnum<IpV6AccessNetworkIdentifierOperatorIdentifierType>(),
......
......@@ -107,12 +107,12 @@ namespace PcapDotNet.Packets.Dns
internal override void WriteDataSimple(byte[] buffer, int offset)
{
byte[] longtitudeBytes = Encoding.ASCII.GetBytes(Longitude);
byte[] longitudeBytes = Encoding.ASCII.GetBytes(Longitude);
byte[] latitudeBytes = Encoding.ASCII.GetBytes(Latitude);
byte[] altitudeBytes = Encoding.ASCII.GetBytes(Altitude);
buffer.Write(ref offset, (byte)longtitudeBytes.Length);
buffer.Write(ref offset, longtitudeBytes);
buffer.Write(ref offset, (byte)longitudeBytes.Length);
buffer.Write(ref offset, longitudeBytes);
buffer.Write(ref offset, (byte)latitudeBytes.Length);
buffer.Write(ref offset, latitudeBytes);
buffer.Write(ref offset, (byte)altitudeBytes.Length);
......@@ -124,11 +124,11 @@ namespace PcapDotNet.Packets.Dns
if (data.Length < 3)
return null;
int longtitudeNumBytes = data[0];
if (data.Length < longtitudeNumBytes + 3)
int longitudeNumBytes = data[0];
if (data.Length < longitudeNumBytes + 3)
return null;
string longtitude = data.Subsegment(1, longtitudeNumBytes).Decode(Encoding.ASCII);
data = data.Subsegment(longtitudeNumBytes + 1, data.Length - longtitudeNumBytes - 1);
string longitude = data.Subsegment(1, longitudeNumBytes).Decode(Encoding.ASCII);
data = data.Subsegment(longitudeNumBytes + 1, data.Length - longitudeNumBytes - 1);
int latitudeNumBytes = data[0];
if (data.Length < latitudeNumBytes + 2)
......@@ -141,7 +141,7 @@ namespace PcapDotNet.Packets.Dns
return null;
string altitude = data.Subsegment(1, altitudeNumBytes).Decode(Encoding.ASCII);
return new DnsResourceDataGeographicalPosition(longtitude, latitude, altitude);
return new DnsResourceDataGeographicalPosition(longitude, latitude, altitude);
}
}
}
\ No newline at end of file
......@@ -63,22 +63,22 @@ namespace PcapDotNet.Packets.IpV4
/// Converts the string representation of an IPv4 address (1.2.3.4) to its IPv4 address equivalent.
/// A return value indicates whether the conversion succeeded.
/// </summary>
/// <param name="ipV6AddressString">A string containing the IPv4 address to convert (1.2.3.4).</param>
/// <param name="value">A string containing the IPv4 address to convert (1.2.3.4).</param>
/// <param name="result">
/// When this method returns, contains the IPv4 address value equivalent of the IPv4 address contained in s, if the conversion succeeded,
/// or zero IPv4 address if the conversion failed.
/// The conversion fails if the s parameter is null or String.Empty or is not of the correct format. This parameter is passed uninitialized.
/// </param>
/// <returns>True iff parsing was successful.</returns>
public static bool TryParse(string ipV6AddressString, out IpV4Address result)
public static bool TryParse(string value, out IpV4Address result)
{
if (ipV6AddressString == null)
if (value == null)
{
result = Zero;
return false;
}
string[] valuesStrings = ipV6AddressString.Split('.');
string[] valuesStrings = value.Split('.');
if (valuesStrings.Length != 4)
{
result = Zero;
......
......@@ -5,6 +5,11 @@ namespace PcapDotNet.Packets.IpV6
/// </summary>
public enum IpV6BindingErrorStatus : byte
{
/// <summary>
/// Invalid value.
/// </summary>
None = 0,
/// <summary>
/// RFC 6275.
/// </summary>
......@@ -12,7 +17,8 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 6275.
/// Unrecognized MH Type value.
/// </summary>
UnrecognizedMhTypeValue = 2,
UnrecognizedMobilityHeaderTypeValue = 2,
}
}
\ No newline at end of file
......@@ -159,7 +159,7 @@ namespace PcapDotNet.Packets.IpV6
/// </summary>
public string ToString(IFormatProvider provider)
{
return ToString("X4", CultureInfo.InvariantCulture);
return ToString("X4", provider);
}
/// <summary>
......
......@@ -25,22 +25,23 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 5845.
/// </summary>
GreTunnelingButTlvHeaderNotSupported = 3,
GreTunnelingButTypeLengthValueHeaderNotSupported = 3,
/// <summary>
/// RFC 5648.
/// </summary>
McoaNotComplete = 4,
MultipleCareOfAddressesNotComplete = 4,
/// <summary>
/// RFC 5648.
/// </summary>
McoaReturnHomeWoNdp = 5,
MultipleCareOfAddressesReturnHomeWoNeighborDiscoveryProtocol = 5,
/// <summary>
/// RFC 6058.
/// PBU_ACCEPTED_TB_IGNORED_SETTINGSMISMATCH.
/// </summary>
PbuAcceptedTbIgnoredSettingsMistmatch = 6,
ProxyBindingUpdateAcceptedTransientBindingIgnoredSettingsMismatch = 6,
/// <summary>
/// RFCs 5568, 6275.
......@@ -132,7 +133,7 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 4285.
/// </summary>
MIpV6MesgIdReqd = 145,
MIpV6MessageIdRequired = 145,
/// <summary>
/// RFC 4285.
......@@ -147,7 +148,7 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 4866.
/// </summary>
CgaAndSignatureVerificationFailed = 148,
CryptographicallyGeneratedAddressAndSignatureVerificationFailed = 148,
/// <summary>
/// RFC 4866.
......@@ -171,13 +172,14 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 5213.
/// NOT_LMA_FOR_THIS_MOBILE_NODE.
/// </summary>
NotLmaForThisMobileNode = 153,
NotLocalMobilityAnchorForThisMobileNode = 153,
/// <summary>
/// RFC 5213.
/// </summary>
MagNotAuthorizedForProxyReg = 154,
MobileAccessGatewayNotAuthorizedForProxyReg = 154,
/// <summary>
/// RFC 5213.
......@@ -191,8 +193,9 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 5213.
/// TIMESTAMP_LOWER_THAN_PREV_ACCEPTED.
/// </summary>
TimestampLowerThanPrevAccepted = 157,
TimestampLowerThanPreviousAccepted = 157,
/// <summary>
/// RFC 5213.
......@@ -202,12 +205,13 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 5213.
/// </summary>
BcePbuPrefixSetDoNotMatch = 159,
BceProxyBindingUpdatePrefixSetDoNotMatch = 159,
/// <summary>
/// RFC 5213.
/// MISSING_MN_IDENTIFIER_OPTION.
/// </summary>
MissingMnIdentifierOption = 160,
MissingMobileNodeIdentifierOption = 160,
/// <summary>
/// RFC 5213.
......@@ -227,32 +231,32 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 5648.
/// </summary>
McoaMalformed = 164,
MultipleCareOfAddressesMalformed = 164,
/// <summary>
/// RFC 5648.
/// </summary>
McoaNonMcoaBindingExists = 165,
MultipleCareOfAddressesNonMultipleCareOfAddressesBindingExists = 165,
/// <summary>
/// RFC 5648.
/// </summary>
McoaProhibited = 166,
MultipleCareOfAddressesProhibited = 166,
/// <summary>
/// RFC 5648.
/// </summary>
McoaUnknownCoa = 167,
MultipleCareOfAddressesUnknownCareOfAddress = 167,
/// <summary>
/// RFC 5648.
/// </summary>
McoaBulkRegistarationProhiited = 168,
MultipleCareOfAddressesBulkRegistrationProhibited = 168,
/// <summary>
/// RFC 5648.
/// </summary>
McoaSimultaneousHomeAndForeignProhibited = 169,
MultipleCareOfAddressesSimultaneousHomeAndForeignProhibited = 169,
/// <summary>
/// RFC 5844.
......@@ -286,7 +290,8 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// RFC 6618.
/// REINIT_SA_WITH_HAC.
/// </summary>
ReinitSaWithHac = 176,
ReinitializeSecurityAssociationWithHomeAgentController = 176,
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ namespace PcapDotNet.Packets.IpV6
public const int OptionDataLength = Offset.LongitudeDegrees + UInt24.SizeOf;
/// <summary>
/// Creates an instance from latitude and longtitude degrees using integer numbers encoded as a two's complement, fixed point number with 9 whole bits.
/// Creates an instance from latitude and longitude degrees using integer numbers encoded as a two's complement, fixed point number with 9 whole bits.
/// See <see cref="IpV6AccessNetworkIdentifierSubOptionGeoLocation.CreateFromRealValues"/> for using real numbers for the degrees.
/// </summary>
/// <param name="latitudeDegrees">
......@@ -63,33 +63,37 @@ namespace PcapDotNet.Packets.IpV6
string.Format(CultureInfo.InvariantCulture, "LatitudeDegreesReal is {0} and must be in [-90, 90] range.",
latitudeDegreesReal));
double longtitudeDegreesReal = LongitudeDegreesReal;
if (longtitudeDegreesReal < -180 || longtitudeDegreesReal > 180)
double longitudeDegreesReal = LongitudeDegreesReal;
if (longitudeDegreesReal < -180 || longitudeDegreesReal > 180)
throw new ArgumentOutOfRangeException("longitudeDegrees", longitudeDegrees,
string.Format(CultureInfo.InvariantCulture,
"LongitudeDegreesReal is {0} and must be in [-180, 180] range.", longtitudeDegreesReal));
"LongitudeDegreesReal is {0} and must be in [-180, 180] range.", longitudeDegreesReal));
}
/// <summary>
/// Creates an instance from latitude and longtitude degrees using real numbers.
/// Creates an instance from latitude and longitude degrees using real numbers.
/// </summary>
/// <param name="latitudeDegreesReal">
/// Positive degrees correspond to the Northern Hemisphere and negative degrees correspond to the Southern Hemisphere.
/// The value ranges from -90 to +90 degrees.
/// </param>
/// <param name="longtitudeDegreesReal">
/// <param name="longitudeDegreesReal">
/// The value ranges from -180 to +180 degrees.
/// </param>
/// <returns>An instance created from the given real degrees values.</returns>
public static IpV6AccessNetworkIdentifierSubOptionGeoLocation CreateFromRealValues(double latitudeDegreesReal, double longtitudeDegreesReal)
public static IpV6AccessNetworkIdentifierSubOptionGeoLocation CreateFromRealValues(double latitudeDegreesReal, double longitudeDegreesReal)
{
if (latitudeDegreesReal < -90 || latitudeDegreesReal > 90)
throw new ArgumentOutOfRangeException("latitudeDegreesReal", latitudeDegreesReal, string.Format("LatitudeDegreesReal is {0} and must be in [-90, 90] range.", latitudeDegreesReal));
throw new ArgumentOutOfRangeException("latitudeDegreesReal", latitudeDegreesReal,
string.Format(CultureInfo.InvariantCulture, "LatitudeDegreesReal is {0} and must be in [-90, 90] range.",
latitudeDegreesReal));
if (longtitudeDegreesReal < -180 || longtitudeDegreesReal > 180)
throw new ArgumentOutOfRangeException("longtitudeDegreesReal", longtitudeDegreesReal, string.Format("LongitudeDegreesReal is {0} and must be in [-180, 180] range.", longtitudeDegreesReal));
if (longitudeDegreesReal < -180 || longitudeDegreesReal > 180)
throw new ArgumentOutOfRangeException("longitudeDegreesReal", longitudeDegreesReal,
string.Format(CultureInfo.InvariantCulture,
"LongitudeDegreesReal is {0} and must be in [-180, 180] range.", longitudeDegreesReal));
return new IpV6AccessNetworkIdentifierSubOptionGeoLocation(ToInteger(latitudeDegreesReal), ToInteger(longtitudeDegreesReal));
return new IpV6AccessNetworkIdentifierSubOptionGeoLocation(ToInteger(latitudeDegreesReal), ToInteger(longitudeDegreesReal));
}
/// <summary>
......
......@@ -79,6 +79,11 @@ namespace PcapDotNet.Packets.IpV6
public IpV6AccessNetworkIdentifierSubOptionNetworkIdentifier(bool isNetworkNameUtf8, DataSegment networkName, DataSegment accessPointName)
: base(IpV6AccessNetworkIdentifierSubOptionType.NetworkIdentifier)
{
if (networkName == null)
throw new ArgumentNullException("networkName");
if (accessPointName == null)
throw new ArgumentNullException("accessPointName");
if (networkName.Length > byte.MaxValue)
throw new ArgumentOutOfRangeException("networkName", networkName,
string.Format(CultureInfo.InvariantCulture, "Network Name cannot be longer than {0} bytes.", byte.MaxValue));
......
......@@ -5,6 +5,11 @@ namespace PcapDotNet.Packets.IpV6
/// </summary>
public enum IpV6AccessNetworkIdentifierSubOptionType : byte
{
/// <summary>
/// Invalid value.
/// </summary>
None = 0,
/// <summary>
/// Network-Identifier sub-option.
/// </summary>
......
......@@ -8,7 +8,7 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// Reserved.
/// </summary>
Reserved = 0,
None = 0,
/// <summary>
/// Virtual.
......
......@@ -5,6 +5,11 @@ namespace PcapDotNet.Packets.IpV6
/// </summary>
public enum IpV6AuthenticationSubtype : byte
{
/// <summary>
/// Invalid value.
/// </summary>
None = 0,
/// <summary>
/// Used to authenticate the Binding Update and Binding Acknowledgement messages based on the shared-key-based security association
/// between the Mobile Node and the Home Agent.
......
......@@ -42,7 +42,7 @@ namespace PcapDotNet.Packets.IpV6
}
private IpV6MobilityOptionAccessTechnologyType()
: this(IpV6AccessTechnologyType.Reserved)
: this(IpV6AccessTechnologyType.None)
{
}
}
......
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