internal static IpV6ExtensionHeaderRouting ParseData(IpV4Protocol nextHeader, DataSegment data)
        {
            if (data.Length < DataMinimumLength)
            {
                return(null);
            }
            IpV6RoutingType routingType  = (IpV6RoutingType)data[DataOffset.RoutingType];
            byte            segmentsLeft = data[DataOffset.SegmentsLeft];
            DataSegment     routingData  = data.Subsegment(DataOffset.TypeSpecificData, data.Length - DataOffset.TypeSpecificData);

            switch (routingType)
            {
            case IpV6RoutingType.SourceRoute:
                return(IpV6ExtensionHeaderRoutingSourceRoute.ParseRoutingData(nextHeader, segmentsLeft, routingData));

            case IpV6RoutingType.Nimrod:
                // Unused.
                return(null);

            case IpV6RoutingType.Type2RoutingHeader:
                return(IpV6ExtensionHeaderRoutingHomeAddress.ParseRoutingData(nextHeader, segmentsLeft, routingData));

            case IpV6RoutingType.RoutingProtocolLowPowerAndLossyNetworksSourceRouteHeader:
                return(IpV6ExtensionHeaderRoutingProtocolLowPowerAndLossyNetworks.ParseRoutingData(nextHeader, segmentsLeft, routingData));

            default:
                return(null);
            }
        }
 private bool EqualsRoutingData(IpV6ExtensionHeaderRoutingHomeAddress other)
 {
     return(other != null &&
            HomeAddress.Equals(other.HomeAddress));
 }
 private bool EqualsRoutingData(IpV6ExtensionHeaderRoutingHomeAddress other)
 {
     return other != null &&
            HomeAddress.Equals(other.HomeAddress);
 }