Skip to content

Commit c143054

Browse files
committed
some network struct layout reversing I have had in my stash for a while
1 parent 27f8eda commit c143054

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
using System.Runtime.InteropServices;
2+
13
namespace FFXIVClientStructs.FFXIV.Application.Network;
24

35
[GenerateInterop]
6+
[Inherits<ClientBase>]
47
[StructLayout(LayoutKind.Explicit, Size = 0xA8)]
58
public unsafe partial struct ChatClient {
69
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System.Runtime.InteropServices;
2+
3+
namespace FFXIVClientStructs.FFXIV.Application.Network;
4+
5+
[GenerateInterop(true)]
6+
[StructLayout(LayoutKind.Explicit, Size = 0xA0)]
7+
public unsafe partial struct ClientBase
8+
{
9+
[FieldOffset(0x0)] public Utf8String Host;
10+
[FieldOffset(0x68)] public ushort Port;
11+
[FieldOffset(0x6C)] public TransportLayers TransportLayer;
12+
[FieldOffset(0x72)] private short Unk72; // value set to 333 in function E8 ?? ?? ?? ?? 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8D 8C 24 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 8F ?? ?? ?? ?? (7.41)
13+
/// <remarks>
14+
/// Contains the string bytes %u of LocalPlayer.EntityId
15+
/// </remarks>
16+
[FieldOffset(0x78)] public StdVector<byte> HostFullDetails;
17+
[FieldOffset(0x90)] public int KeepAliveZone;
18+
[FieldOffset(0x94)] public int KeepAliveInvervalZone;
19+
}
20+
21+
public enum TransportLayers
22+
{
23+
TCP = 0,
24+
// why does it seem like UDP should be in here
25+
RUDP = 2,
26+
RUDP2 = 3
27+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
using System.Runtime.InteropServices;
2+
13
namespace FFXIVClientStructs.FFXIV.Application.Network;
24

35
[GenerateInterop]
6+
[Inherits<ClientBase>]
47
[StructLayout(LayoutKind.Explicit, Size = 0xA0)]
58
public unsafe partial struct ZoneClient {
9+
610
[MemberFunction("48 83 EC ?? 48 8B 89 ?? ?? ?? ?? 48 85 C9 74 ?? 44 89 44 24 ?? 4C 8D 44 24 ?? 44 89 4C 24 ?? 44 0F B6 4C 24")]
711
public partial bool SendPacket(nint packet, uint a3, uint a4, bool a5);
812
}

0 commit comments

Comments
 (0)