pcap.net

Casting a byte array to a managed structure

醉酒当歌 提交于 2019-11-27 12:10:31
Update: Answers to this question helped me code the open sourced project AlicanC's Modern Warfare 2 Tool on GitHub . You can see how I am reading these packets in MW2Packets.cs and the extensions I've coded to read big endian data in Extensions.cs . I am capturing UDP packets of Call of Duty: Modern Warfare 2 using Pcap.Net in my C# application. I receive a byte[] from the library. I tried to parse it like a string, but that didn't work well. The byte[] I have has a generic packet header, then another header specific to the packet type then info about each player in the lobby. A helpful person

Casting a byte array to a managed structure

亡梦爱人 提交于 2019-11-26 15:55:42
问题 Update: Answers to this question helped me code the open sourced project AlicanC's Modern Warfare 2 Tool on GitHub. You can see how I am reading these packets in MW2Packets.cs and the extensions I've coded to read big endian data in Extensions.cs. I am capturing UDP packets of Call of Duty: Modern Warfare 2 using Pcap.Net in my C# application. I receive a byte[] from the library. I tried to parse it like a string, but that didn't work well. The byte[] I have has a generic packet header, then