当前位置: 首页>>代码示例>>C#>>正文


C# IpV4Protocol类代码示例

本文整理汇总了C#中IpV4Protocol的典型用法代码示例。如果您正苦于以下问题:C# IpV4Protocol类的具体用法?C# IpV4Protocol怎么用?C# IpV4Protocol使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IpV4Protocol类属于命名空间,在下文中一共展示了IpV4Protocol类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IpV6ExtensionHeaderMobilityBindingError

 /// <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;
 }
开发者ID:JackWangCUMT,项目名称:WiFiSpy,代码行数:27,代码来源:IpV6ExtensionHeaderMobilityBindingError.cs

示例2: IpV6ExtensionHeaderOptions

 internal IpV6ExtensionHeaderOptions(IpV4Protocol? nextHeader, IpV6Options options)
     : base(nextHeader)
 {
     if (options.BytesLength % 8 != 6)
         options = options.Pad((14 - options.BytesLength % 8) % 8);
     Options = options;
 }
开发者ID:JackWangCUMT,项目名称:WiFiSpy,代码行数:7,代码来源:IpV6ExtensionHeaderOptions.cs

示例3: IpV6ExtensionHeaderMobilityHandoverAcknowledgeMessage

 /// <summary>
 /// Creates an instance from next header, checksum, sequence number, code 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="sequenceNumber">
 /// Copied from the corresponding field in the Handover Initiate message to which this message is a response,
 /// to enable the receiver to match this Handover Acknowledge message with an outstanding Handover Initiate message.
 /// </param>
 /// <param name="code">Describes whether the handover was accepted or not and more details.</param>
 /// <param name="options">Zero or more TLV-encoded mobility options.</param>
 public IpV6ExtensionHeaderMobilityHandoverAcknowledgeMessage(IpV4Protocol? nextHeader, ushort checksum, ushort sequenceNumber,
                                                              IpV6MobilityHandoverAcknowledgeCode code, IpV6MobilityOptions options)
     : base(nextHeader, checksum, options, MessageDataOffset.Options)
 {
     SequenceNumber = sequenceNumber;
     Code = code;
 }
开发者ID:JackWangCUMT,项目名称:WiFiSpy,代码行数:23,代码来源:IpV6ExtensionHeaderMobilityHandoverAcknowledgeMessage.cs

示例4: ConnId

 public ConnId(ushort lPort, IpV4Address rIp, ushort rPort, IpV4Protocol protocol)
 {
     this.lPort = lPort;
     this.rIp = rIp;
     this.rPort = rPort;
     this.protocol = protocol;
 }
开发者ID:ddonny,项目名称:Network-Manager,代码行数:7,代码来源:RoutingTable.cs

示例5: IpV6ExtensionHeaderMobilityLocalizedRouting

 internal IpV6ExtensionHeaderMobilityLocalizedRouting(IpV4Protocol? nextHeader, ushort checksum, ushort sequenceNumber, ushort lifetime,
                                                    IpV6MobilityOptions options)
     : base(nextHeader, checksum, options, MessageDataOffset.Options)
 {
     SequenceNumber = sequenceNumber;
     Lifetime = lifetime;
 }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:7,代码来源:IpV6ExtensionHeaderMobilityLocalizedRouting.cs

示例6: ParseData

        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;
            }
        }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:26,代码来源:IpV6ExtensionHeaderRouting.cs

示例7: CreateStandardInstance

        private static IpV6ExtensionHeader CreateStandardInstance(IpV4Protocol nextHeader, DataSegment extensionHeaderData, out int numBytesRead)
        {
            numBytesRead = 0;
            if (extensionHeaderData.Length < MinimumLength)
                return null;
            IpV4Protocol nextNextHeader = (IpV4Protocol)extensionHeaderData[Offset.NextHeader];
            int length = (extensionHeaderData[Offset.HeaderExtensionLength] + 1) * 8;
            if (extensionHeaderData.Length < length)
                return null;

            DataSegment data = extensionHeaderData.Subsegment(Offset.Data, length - Offset.Data);
            numBytesRead = data.Length;

            switch (nextHeader)
            {
                case IpV4Protocol.IpV6HopByHopOption: // 0
                    return IpV6ExtensionHeaderHopByHopOptions.ParseData(nextNextHeader, data);

                case IpV4Protocol.IpV6Route: // 43
                    return IpV6ExtensionHeaderRouting.ParseData(nextNextHeader, data);

                case IpV4Protocol.FragmentHeaderForIpV6: // 44
                    return IpV6ExtensionHeaderFragmentData.ParseData(nextNextHeader, data);
                
                case IpV4Protocol.IpV6Opts:                     // 60
                    return IpV6ExtensionHeaderDestinationOptions.ParseData(nextNextHeader, data);

                case IpV4Protocol.MobilityHeader:        // 135
                    return IpV6ExtensionHeaderMobility.ParseData(nextNextHeader, data);

                default:
                    throw new InvalidOperationException("Invalid nextHeader value" + nextHeader);
            }
        }
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:34,代码来源:IpV6ExtensionHeader.cs

示例8: IpV6ExtensionHeaderAuthentication

 public IpV6ExtensionHeaderAuthentication(IpV4Protocol nextHeader, uint securityParametersIndex, uint sequenceNumber, DataSegment authenticationData)
     : base(nextHeader)
 {
     SecurityParametersIndex = securityParametersIndex;
     SequenceNumber = sequenceNumber;
     AuthenticationData = authenticationData;
 }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:7,代码来源:IpV6ExtensionHeaderAuthentication.cs

示例9: IpV6ExtensionHeaderMobilityBindingRevocationAcknowledgementMessage

 /// <summary>
 /// Creates an instance from next header, checksum, status, sequence number, proxy binding, IPv4 home address binding only, global 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 result of processing the Binding Revocation Indication message by the responder.
 /// </param>
 /// <param name="sequenceNumber">
 /// Copied from the Sequence Number field in the Binding Revocation Indication.
 /// It is used by the initiator, e.g., HA, LMA, MAG, in matching this Binding Revocation Acknowledgement 
 /// with the outstanding Binding Revocation Indication.
 /// </param>
 /// <param name="proxyBinding">
 /// Set if set in the corresponding Binding Revocation Indication message.
 /// </param>
 /// <param name="ipV4HomeAddressBindingOnly">
 /// Set if the it is set in the corresponding Binding Revocation Indication message.
 /// </param>
 /// <param name="global">
 /// Set if it is set in the corresponding Binding Revocation Indication message.
 /// </param>
 /// <param name="options">
 /// Zero or more TLV-encoded mobility options.
 /// </param>
 public IpV6ExtensionHeaderMobilityBindingRevocationAcknowledgementMessage(IpV4Protocol? nextHeader, ushort checksum,
                                                                           Ipv6MobilityBindingRevocationStatus status, ushort sequenceNumber,
                                                                           bool proxyBinding, bool ipV4HomeAddressBindingOnly, bool global,
                                                                           IpV6MobilityOptions options)
     : base(nextHeader, checksum, sequenceNumber, proxyBinding, ipV4HomeAddressBindingOnly, global, options)
 {
     Status = status;
 }
开发者ID:JackWangCUMT,项目名称:WiFiSpy,代码行数:40,代码来源:IpV6ExtensionHeaderMobilityBindingRevocationAcknowledgementMessage.cs

示例10: IpV6ExtensionHeaderMobilityCareOfTest

 /// <summary>
 /// Creates an instance from next header, checksum, care of nonce index, care of init cookie, care of keygen token 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="careOfNonceIndex">Will be echoed back by the mobile node to the correspondent node in a subsequent Binding Update.</param>
 /// <param name="careOfInitCookie">Contains the care-of init cookie.</param>
 /// <param name="careOfKeygenToken">Contains the 64-bit care-of keygen token used in the return routability procedure.</param>
 /// <param name="options">Zero or more TLV-encoded mobility options.</param>
 public IpV6ExtensionHeaderMobilityCareOfTest(IpV4Protocol? nextHeader, ushort checksum, ushort careOfNonceIndex, ulong careOfInitCookie,
                                              ulong careOfKeygenToken, IpV6MobilityOptions options)
     : base(nextHeader, checksum, options, MessageDataOffset.Options)
 {
     CareOfNonceIndex = careOfNonceIndex;
     CareOfInitCookie = careOfInitCookie;
     CareOfKeygenToken = careOfKeygenToken;
 }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:22,代码来源:IpV6ExtensionHeaderMobilityCareOfTest.cs

示例11: IpV6ExtensionHeaderMobilityHeartbeatMessage

 /// <summary>
 /// Creates an instance from next header, checksum, is unsolicited heartbeat response, is response, sequence number 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="isUnsolicitedHeartbeatResponse">Set to true in Unsolicited Heartbeat Response.</param>
 /// <param name="isResponse">
 /// Indicates whether the message is a request or a response. 
 /// When it's set to false, it indicates that the Heartbeat message is a request.
 /// When it's set to true, it indicates that the Heartbeat message is a response.
 /// </param>
 /// <param name="sequenceNumber">Sequence number used for matching the request to the reply.</param>
 /// <param name="options">Zero or more TLV-encoded mobility options.</param>
 public IpV6ExtensionHeaderMobilityHeartbeatMessage(IpV4Protocol? nextHeader, ushort checksum, bool isUnsolicitedHeartbeatResponse, bool isResponse,
                                                    uint sequenceNumber, IpV6MobilityOptions options)
     : base(nextHeader, checksum, options, MessageDataOffset.MobilityOptions)
 {
     IsUnsolicitedHeartbeatResponse = isUnsolicitedHeartbeatResponse;
     IsResponse = isResponse;
     SequenceNumber = sequenceNumber;
 }
开发者ID:JackWangCUMT,项目名称:WiFiSpy,代码行数:26,代码来源:IpV6ExtensionHeaderMobilityHeartbeatMessage.cs

示例12: IpV6ExtensionHeaderMobilityLocalizedRoutingAcknowledgement

 /// <summary>
 /// Creates an instance from next header, checksum, sequence number, unsolicited, status, lifetime 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="sequenceNumber">Copied from the sequence number field of the LRI message being responded to.</param>
 /// <param name="unsolicited">
 /// When true, the LRA message is sent unsolicited.
 /// The Lifetime field indicates a new requested value.
 /// The MAG must wait for the regular LRI message to confirm that the request is acceptable to the LMA.
 /// </param>
 /// <param name="status">The acknowledgement status.</param>
 /// <param name="lifetime">
 /// The time in seconds for which the local forwarding is supported.
 /// Typically copied from the corresponding field in the LRI message.
 /// </param>
 /// <param name="options">Zero or more TLV-encoded mobility options.</param>
 public IpV6ExtensionHeaderMobilityLocalizedRoutingAcknowledgement(IpV4Protocol? nextHeader, ushort checksum, ushort sequenceNumber, bool unsolicited,
                                                                   IpV6MobilityLocalizedRoutingAcknowledgementStatus status, ushort lifetime,
                                                                   IpV6MobilityOptions options)
     : base(nextHeader, checksum, sequenceNumber, lifetime, options)
 {
     Status = status;
     Unsolicited = unsolicited;
 }
开发者ID:JackWangCUMT,项目名称:WiFiSpy,代码行数:30,代码来源:IpV6ExtensionHeaderMobilityLocalizedRoutingAcknowledgement.cs

示例13: IpV6ExtensionHeaderMobilityBindingRevocationIndicationMessage

 /// <summary>
 /// Creates an instance from next header, checksum, revocation trigger, sequence number, proxy binding, IPv4 home address binding only, global 
 /// 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="revocationTrigger">
 /// Indicating the event that triggered the initiator to send the BRI message.
 /// </param>
 /// <param name="sequenceNumber">
 /// Used by the initiator to match a returned Binding Revocation Acknowledgement with this Binding Revocation Indication.
 /// This sequence number could be a random number.
 /// At any time, implementations must ensure there is no collision between the sequence numbers of all outstanding Binding Revocation Indication 
 /// Messages.
 /// </param>
 /// <param name="proxyBinding">
 /// Set by the initiator to indicate that the revoked binding(s) is a PMIPv6 binding.
 /// </param>
 /// <param name="ipV4HomeAddressBindingOnly">
 /// Set by the initiator, home agent, or local mobility anchor to indicate to the receiving mobility entity the termination
 /// of the IPv4 Home Address binding only as in Home Agent Operation and Local Mobility Anchor Operation.
 /// </param>
 /// <param name="global">
 /// Set by the initiator, LMA or MAG, to indicate the termination of all Per-Peer mobility Bindings or Multiple Bindings that share 
 /// a common identifier(s) and are served by the initiator and responder as in Local Mobility Anchor Operation and Mobile Access Gateway Operation.
 /// </param>
 /// <param name="options">
 /// Zero or more TLV-encoded mobility options.
 /// </param>
 public IpV6ExtensionHeaderMobilityBindingRevocationIndicationMessage(IpV4Protocol? nextHeader, ushort checksum,
                                                                      Ipv6MobilityBindingRevocationTrigger revocationTrigger, ushort sequenceNumber,
                                                                      bool proxyBinding, bool ipV4HomeAddressBindingOnly, bool global,
                                                                      IpV6MobilityOptions options)
     : base(nextHeader, checksum, sequenceNumber, proxyBinding, ipV4HomeAddressBindingOnly, global, options)
 {
     RevocationTrigger = revocationTrigger;
 }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:44,代码来源:IpV6ExtensionHeaderMobilityBindingRevocationIndicationMessage.cs

示例14: Write

 internal sealed override void Write(byte[] buffer, ref int offset, IpV4Protocol nextHeader)
 {
     buffer.Write(offset + Offset.NextHeader, (byte)nextHeader);
     int length = Length;
     buffer.Write(offset + Offset.HeaderExtensionLength, (byte)((length / 8) - 1));
     WriteData(buffer, offset + Offset.Data);
     offset += length;
 }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:8,代码来源:IpV6ExtensionHeaderStandard.cs

示例15: IpV6ExtensionHeaderMobilityHomeTest

 /// <summary>
 /// Creates an instance from next header, checksum, home nonce index, home init cookie, home keygen token 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="homeNonceIndex">Will be echoed back by the mobile node to the correspondent node in a subsequent Binding Update.</param>
 /// <param name="homeInitCookie">Contains the home init cookie.</param>
 /// <param name="homeKeygenToken">Contains the 64-bit home keygen token used in the return routability procedure.</param>
 /// <param name="options">Zero or more TLV-encoded mobility options.</param>
 public IpV6ExtensionHeaderMobilityHomeTest(IpV4Protocol? nextHeader, ushort checksum, ushort homeNonceIndex, ulong homeInitCookie, ulong homeKeygenToken,
                                            IpV6MobilityOptions options)
     : base(nextHeader, checksum, options, MessageDataOffset.Options)
 {
     HomeNonceIndex = homeNonceIndex;
     HomeInitCookie = homeInitCookie;
     HomeKeygenToken = homeKeygenToken;
 }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:22,代码来源:IpV6ExtensionHeaderMobilityHomeTest.cs


注:本文中的IpV4Protocol类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。