1 Commits

Author SHA1 Message Date
funman300 f4f33969f2 docs(frame): flag Fire2 header as an unvalidated FIFA23 guess vs the proven layout
frame.rs implements a 12-byte Fire2 header that was a pre-FIFA17-recon guess at
FIFA 23's variant; its docstring described it plainly, and it is wrong in every
field for the proven FIFA 17 Fire2 layout (16 bytes, u32 length, u24 msgNum,
(msgType<<5)|userIndex byte, options, reserved; no error field, no jumbo). Correct
the docstring to cite openfut-protocol-blaze::fire2 as authoritative and mark the
implemented 12-byte layout as an unvalidated capture-tool guess to reconcile once
a live FIFA 23 capture exists. Code unchanged: the server is a capture tool whose
documented behaviour is 'guess, then fall back to Raw', so its framing is not
rewritten to an assumption without FIFA 23 evidence.
2026-08-16 21:29:44 +00:00
+29 -7
View File
@@ -1,13 +1,35 @@
//! Blaze packet frame header. //! Blaze packet frame header (FIFA 23 capture-tool GUESS — not validated).
//! //!
//! Two framing variants exist ("Fire" and "Fire2"). FIFA 23's variant is UNKNOWN — //! FIFA 23's framing is UNKNOWN; this crate's server is a capture tool that
//! the capture tool will determine which it uses. This module implements Fire2 //! decodes with a best guess and falls back to `FramingVariant::Raw` (see
//! (the modern EA format, used by ME3, BF3, and most post-2012 titles) because //! `codec.rs`) when Fire2 decode fails. The layout implemented below is that
//! it is the most likely candidate. //! guess and it has NOT been validated against a live FIFA 23 client.
//! //!
//! Fire2 header layout (12 bytes, little-endian **big**-endian per wire): //! !!! It also DISAGREES with the proven FIFA 17 Fire2 layout. !!!
//!
//! The authoritative, live-driven layout is `openfut-protocol-blaze::fire2`
//! (byte-for-byte parity-tested; it drove a retail FIFA 17 client through login).
//! It is **16 bytes**, big-endian, with a `u32` length and NO error field and NO
//! jumbo escape:
//! ```text //! ```text
//! [0..2] u16 body length (low 16 bits; or full length if < 65536) //! [0..4] u32 payload length (bytes after header + metadata)
//! [4..6] u16 metadata length
//! [6..8] u16 component
//! [8..10] u16 command
//! [10..13] u24 msgNum
//! [13] u8 (msgType << 5) | (userIndex & 0x1F)
//! [14] u8 options
//! [15] u8 reserved
//! ```
//! If the project's "FIFA 23 uses the same wire format as FIFA 17" hypothesis is
//! confirmed by a live FIFA 23 capture, this module should adopt that 16-byte
//! layout (or depend on `openfut-protocol-blaze::fire2` directly). Until there is
//! FIFA 23 evidence, the guessed 12-byte layout below is retained as-is so the
//! capture tool keeps its documented "guess, then fall back to Raw" behaviour.
//!
//! Guessed Fire2 header layout THIS MODULE IMPLEMENTS (12 bytes, big-endian; unvalidated):
//! ```text
//! [0..2] u16 body length (low 16 bits)
//! [2..4] u16 component id //! [2..4] u16 component id
//! [4..6] u16 command id //! [4..6] u16 command id
//! [6..8] u16 error code //! [6..8] u16 error code