Exemple #1
0
 public void IpV6AccessNetworkIdentifierSubOptionUnknown()
 {
     IpV6AccessNetworkIdentifierSubOptionUnknown subOption =
         new IpV6AccessNetworkIdentifierSubOptionUnknown((IpV6AccessNetworkIdentifierSubOptionType)100, DataSegment.Empty);
     Packet packet = PacketBuilder.Build(
         DateTime.Now,
         new EthernetLayer(),
         new IpV6Layer
         {
             ExtensionHeaders = new IpV6ExtensionHeaders(
                 new IpV6ExtensionHeaderMobilityBindingError(
                     IpV4Protocol.Skip, 0, IpV6BindingErrorStatus.UnrecognizedMobilityHeaderTypeValue, IpV6Address.Zero,
                     new IpV6MobilityOptions(
                         new IpV6MobilityOptionAccessNetworkIdentifier(
                             new IpV6AccessNetworkIdentifierSubOptions(subOption)))))
         });
     Assert.IsTrue(packet.IsValid);
     IpV6AccessNetworkIdentifierSubOption actualSubOption =
         ((IpV6MobilityOptionAccessNetworkIdentifier)((IpV6ExtensionHeaderMobility)packet.Ethernet.IpV6.ExtensionHeaders[0]).MobilityOptions[0]).
             SubOptions[0];
     Assert.AreEqual(subOption, actualSubOption);
     Assert.AreEqual(subOption.GetHashCode(), actualSubOption.GetHashCode());
 }
 private bool EqualsData(IpV6AccessNetworkIdentifierSubOptionUnknown other)
 {
     return other != null &&
            Data.Equals(other.Data);
 }
Exemple #3
0
 private bool EqualsData(IpV6AccessNetworkIdentifierSubOptionUnknown other)
 {
     return(other != null &&
            Data.Equals(other.Data));
 }