Skip to content

Commit 7d2a771

Browse files
committed
Ether_header struct added
1 parent bc3ff9c commit 7d2a771

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

LibcSharp/Structs.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System.Runtime.InteropServices;
2+
3+
namespace LibcSharp;
4+
5+
[StructLayout(LayoutKind.Sequential, Pack = 1)]
6+
public struct Ether_header
7+
{
8+
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.ETH_ALEN)]
9+
public byte[] ether_dhost; // destination eth addr
10+
11+
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.ETH_ALEN)]
12+
public byte[] ether_shost; // source ether addr
13+
14+
public ushort ether_type; // packet type ID field
15+
}

0 commit comments

Comments
 (0)