Skip to content

Commit

Permalink
TcpHeader取消Explicit布局
Browse files Browse the repository at this point in the history
  • Loading branch information
xljiulang committed Oct 24, 2022
1 parent d24fb86 commit f4ec83a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions WindivertDotnet/TcpHeader.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Buffers.Binary;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace WindivertDotnet
{
Expand All @@ -11,7 +10,6 @@ namespace WindivertDotnet
public struct TcpHeader
{
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[FieldOffset(0)]
private ushort srcPort;

/// <summary>
Expand All @@ -24,7 +22,6 @@ public ushort SrcPort
}

[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[FieldOffset(2)]
private ushort dstPort;

/// <summary>
Expand All @@ -38,7 +35,6 @@ public ushort DstPort


[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[FieldOffset(4)]
private uint seqNum;

/// <summary>
Expand All @@ -52,7 +48,6 @@ public uint SeqNum


[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[FieldOffset(8)]
private uint ackNum;

/// <summary>
Expand All @@ -65,7 +60,6 @@ public uint AckNum
}

[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[FieldOffset(12)]
private byte bitfield;


Expand All @@ -91,7 +85,6 @@ public byte HdrLength
/// <summary>
/// 标记位
/// </summary>
[FieldOffset(13)]
public TcpFlag Flags;


Expand Down Expand Up @@ -150,7 +143,6 @@ public bool Urg
}

[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[FieldOffset(14)]
private ushort window;

/// <summary>
Expand All @@ -163,7 +155,6 @@ public ushort Window
}

[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[FieldOffset(16)]
private ushort checksum;

/// <summary>
Expand All @@ -176,7 +167,6 @@ public ushort Checksum
}

[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[FieldOffset(18)]
private ushort urgPtr;

/// <summary>
Expand Down

0 comments on commit f4ec83a

Please sign in to comment.