2019-10-12 19:26:28 +01:00
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
|
|
namespace DiscImageChef.Devices.Remote
|
|
|
|
|
{
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
2019-10-12 19:53:12 +01:00
|
|
|
public struct DicPacketHeader
|
2019-10-12 19:26:28 +01:00
|
|
|
{
|
2019-10-12 22:13:33 +01:00
|
|
|
public ulong id;
|
2019-10-12 19:26:28 +01:00
|
|
|
|
|
|
|
|
public uint len;
|
|
|
|
|
public byte version;
|
|
|
|
|
public DicPacketType packetType;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
|
|
|
|
public byte[] spare;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
2019-10-12 19:53:12 +01:00
|
|
|
public struct DicPacketHello
|
2019-10-12 19:26:28 +01:00
|
|
|
{
|
|
|
|
|
public DicPacketHeader hdr;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
|
|
|
|
|
public string application;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
|
|
|
|
|
public string version;
|
|
|
|
|
|
|
|
|
|
public byte maxProtocol;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
|
|
|
|
public byte[] spare;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
|
|
|
|
|
public string sysname;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
|
|
|
|
|
public string release;
|
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
|
|
|
|
|
public string machine;
|
|
|
|
|
}
|
|
|
|
|
}
|