Skip to main content

Module header

Module header 

Source
Expand description

FAFB Header Implementation

The 32-byte header that identifies and describes a .fafb file.

Layout:

Offset  Size  Field
------  ----  -----
0       4     magic (b"FAFB")
4       1     version_major
5       1     version_minor
6       2     flags
8       4     source_checksum (CRC32)
12      8     created_timestamp (Unix)
20      2     section_count
22      4     section_table_offset
26      2     string_table_index
28      4     total_size
------  ----
Total: 32 bytes

Structs§

FafbHeader
The 32-byte FAFB file header

Constants§

HEADER_SIZE
Header size in bytes
MAGIC
Magic number identifying FAFB files: “FAFB” in ASCII
MAGIC_U32
Magic number as u32 (little-endian)
MAX_FILE_SIZE
Maximum allowed file size (DoS protection): 10MB
MAX_SECTIONS
Maximum allowed section count (DoS protection)
VERSION_MAJOR
Format major version
VERSION_MINOR
Current format minor version (additive changes)