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


C# DataSegment.ReadULong方法代码示例

本文整理汇总了C#中DataSegment.ReadULong方法的典型用法代码示例。如果您正苦于以下问题:C# DataSegment.ReadULong方法的具体用法?C# DataSegment.ReadULong怎么用?C# DataSegment.ReadULong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataSegment的用法示例。


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

示例1: CreateInstance

        internal override IpV6MobilityOption CreateInstance(DataSegment data)
        {
            if (data.Length != OptionDataLength)
                return null;

            ulong interfaceIdentifier = data.ReadULong(Offset.InterfaceIdentifier, Endianity.Big);
            return new IpV6MobilityOptionMobileNodeLinkLocalAddressInterfaceIdentifier(interfaceIdentifier);
        }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:8,代码来源:IpV6MobilityOptionMobileNodeLinkLocalAddressInterfaceIdentifier.cs

示例2: Read

        internal static bool Read(DataSegment data, out ulong value)
        {
            if (data.Length != OptionDataLength)
            {
                value = 0;
                return false;
            }

            value = data.ReadULong(0, Endianity.Big);
            return true;
        }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:11,代码来源:IpV6MobilityOptionULong.cs

示例3: ParseMessageData

        internal static IpV6ExtensionHeaderMobilityHomeTest ParseMessageData(IpV4Protocol nextHeader, ushort checksum, DataSegment messageData)
        {
            if (messageData.Length < MinimumMessageDataLength)
                return null;

            ushort homeNonceIndex = messageData.ReadUShort(MessageDataOffset.HomeNonceIndex, Endianity.Big);
            ulong homeInitCookie = messageData.ReadULong(MessageDataOffset.HomeInitCookie, Endianity.Big);
            ulong homeKeygenToken = messageData.ReadULong(MessageDataOffset.HomeKeygenToken, Endianity.Big);
            IpV6MobilityOptions options = new IpV6MobilityOptions(messageData.Subsegment(MessageDataOffset.Options, messageData.Length - MessageDataOffset.Options));
            return new IpV6ExtensionHeaderMobilityHomeTest(nextHeader, checksum, homeNonceIndex, homeInitCookie, homeKeygenToken, options);
        }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:11,代码来源:IpV6ExtensionHeaderMobilityHomeTest.cs

示例4: Read

        internal static DnsOptionLongLivedQuery Read(DataSegment data)
        {
            if (data.Length != ConstDataLength)
                return null;
            ushort version = data.ReadUShort(Offset.Version, Endianity.Big);
            DnsLongLivedQueryOpCode opCode = (DnsLongLivedQueryOpCode)data.ReadUShort(Offset.OpCode, Endianity.Big);
            DnsLongLivedQueryErrorCode errorCode = (DnsLongLivedQueryErrorCode)data.ReadUShort(Offset.ErrorCode, Endianity.Big);
            ulong id = data.ReadULong(Offset.Id, Endianity.Big);
            uint leaseLife = data.ReadUInt(Offset.LeaseLife, Endianity.Big);

            return new DnsOptionLongLivedQuery(version, opCode, errorCode, id, leaseLife);
        }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:12,代码来源:DnsOptionLongLivedQuery.cs

示例5: ParseMessageData

        internal static IpV6ExtensionHeaderMobilityCareOfTestInit ParseMessageData(IpV4Protocol nextHeader, ushort checksum, DataSegment messageData)
        {
            if (messageData.Length < MinimumMessageDataLength)
                return null;

            ulong careOfInitCookie = messageData.ReadULong(MessageDataOffset.CareOfInitCookie, Endianity.Big);
            IpV6MobilityOptions options = new IpV6MobilityOptions(messageData.Subsegment(MessageDataOffset.Options, messageData.Length - MessageDataOffset.Options));
            return new IpV6ExtensionHeaderMobilityCareOfTestInit(nextHeader, checksum, careOfInitCookie, options);
        }
开发者ID:amitla,项目名称:Pcap.Net,代码行数:9,代码来源:IpV6ExtensionHeaderMobilityCareOfTestInit.cs


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