pcap update
This commit is contained in:
parent
3bda362626
commit
f3b3d70b2b
|
@ -22,6 +22,7 @@
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
|
|
@ -69,6 +69,12 @@ namespace AscNet.PcapParser
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
if (4 > bytes.Length - readLen)
|
||||||
|
{
|
||||||
|
buffer[packet.Ethernet.IpV4.Source] = bytes.AsSpan(readLen).ToArray();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
int len = (int)BinaryPrimitives.ReadUInt32LittleEndian(bytes.AsSpan(readLen));
|
int len = (int)BinaryPrimitives.ReadUInt32LittleEndian(bytes.AsSpan(readLen));
|
||||||
readLen += Marshal.SizeOf<int>();
|
readLen += Marshal.SizeOf<int>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue