/// <summary> /// Creates an instance from next header, checksum, status, home address and options. /// </summary> /// <param name="nextHeader"> /// Identifies the type of header immediately following this extension header. /// </param> /// <param name="checksum"> /// Contains the checksum of the Mobility Header. /// The checksum is calculated from the octet string consisting of a "pseudo-header" /// followed by the entire Mobility Header starting with the Payload Proto field. /// The checksum is the 16-bit one's complement of the one's complement sum of this string. /// </param> /// <param name="status">Indicating the reason for this message.</param> /// <param name="homeAddress"> /// The home address that was contained in the Home Address destination option. /// The mobile node uses this information to determine which binding does not exist, in cases where the mobile node has several home addresses. /// </param> /// <param name="options"> /// Zero or more TLV-encoded mobility options. /// </param> public IpV6ExtensionHeaderMobilityBindingError(IpV4Protocol?nextHeader, ushort checksum, IpV6BindingErrorStatus status, IpV6Address homeAddress, IpV6MobilityOptions options) : base(nextHeader, checksum, options, MessageDataOffset.Options) { Status = status; HomeAddress = homeAddress; }
/// <summary> /// Creates an instance from next header, checksum, status, home address and options. /// </summary> /// <param name="nextHeader"> /// Identifies the type of header immediately following this extension header. /// </param> /// <param name="checksum"> /// Contains the checksum of the Mobility Header. /// The checksum is calculated from the octet string consisting of a "pseudo-header" /// followed by the entire Mobility Header starting with the Payload Proto field. /// The checksum is the 16-bit one's complement of the one's complement sum of this string. /// </param> /// <param name="status">Indicating the reason for this message.</param> /// <param name="homeAddress"> /// The home address that was contained in the Home Address destination option. /// The mobile node uses this information to determine which binding does not exist, in cases where the mobile node has several home addresses. /// </param> /// <param name="options"> /// Zero or more TLV-encoded mobility options. /// </param> public IpV6ExtensionHeaderMobilityBindingError(IpV4Protocol? nextHeader, ushort checksum, IpV6BindingErrorStatus status, IpV6Address homeAddress, IpV6MobilityOptions options) : base(nextHeader, checksum, options, MessageDataOffset.Options) { Status = status; HomeAddress = homeAddress; }
internal static IpV6ExtensionHeaderMobilityBindingError ParseMessageData(IpV4Protocol nextHeader, ushort checksum, DataSegment messageData) { if (messageData.Length < MinimumMessageDataLength) { return(null); } IpV6BindingErrorStatus status = (IpV6BindingErrorStatus)messageData[MessageDataOffset.Status]; IpV6Address homeAddress = messageData.ReadIpV6Address(MessageDataOffset.HomeAddress, Endianity.Big); IpV6MobilityOptions options = new IpV6MobilityOptions(messageData.Subsegment(MessageDataOffset.Options, messageData.Length - MessageDataOffset.Options)); return(new IpV6ExtensionHeaderMobilityBindingError(nextHeader, checksum, status, homeAddress, options)); }