本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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);
}