#include "stdint.h"
#include "stdbool.h"
Go to the source code of this file.
|
uint32_t | sbr_compute_checksum (const void *buffer, uint32_t size) |
|
uint32_t | sbr_compute_checksum_prev (const void *buffer, uint32_t size, uint32_t prev_checksum) |
|
uint32_t | sbr_initial_checksum () |
|
int | sbr_parse (const void *buffer, uint32_t size, SBR *sbr) |
|
bool | sbr_section_get_bootable (const SBR_SECTION *sbr_section) |
|
SBR_COMPRESSION | sbr_section_get_compression (const SBR_SECTION *sbr_section) |
|
bool | sbr_section_get_ignore_checksum (const SBR_SECTION *sbr_section) |
|
bool | sbr_section_is_valid (const SBR_SECTION *sbr_section) |
|
void | sbr_section_set_bootable (SBR_SECTION *sbr_section, bool bootable) |
|
void | sbr_section_set_checksum (SBR_SECTION *sbr_section, uint32_t checksum) |
|
void | sbr_section_set_compression (SBR_SECTION *sbr_section, SBR_COMPRESSION compression) |
|
void | sbr_section_set_ignore_checksum (SBR_SECTION *sbr_section, bool ignore_checksum) |
|
void | sbr_section_set_name (SBR_SECTION *sbr_section, const char *name) |
|
void | sbr_section_set_offset (SBR_SECTION *sbr_section, uint32_t offset) |
|
void | sbr_section_set_size (SBR_SECTION *sbr_section, uint32_t size) |
|
void | sbr_section_set_type (SBR_SECTION *sbr_section, uint8_t type) |
|
int | sbr_serialize (const SBR *sbr, void *buffer, uint32_t max_size) |
|
◆ SBR_IDENTIFIER_SIZE
#define SBR_IDENTIFIER_SIZE (2) |
Definition at line 13 of file SBR.h.
◆ SBR_MAX_NUM_SECTIONS
#define SBR_MAX_NUM_SECTIONS (17) |
Definition at line 11 of file SBR.h.
◆ SBR_RAW_SIZE
Definition at line 55 of file SBR.h.
◆ SBR_SECTION_FLAG_BOOTABLE
#define SBR_SECTION_FLAG_BOOTABLE (1 << 0) |
Definition at line 15 of file SBR.h.
◆ SBR_SECTION_FLAG_COMPRESSION_MASK
#define SBR_SECTION_FLAG_COMPRESSION_MASK (0x7 << 2) |
Definition at line 17 of file SBR.h.
◆ SBR_SECTION_FLAG_IGNORE_CHECKSUM
#define SBR_SECTION_FLAG_IGNORE_CHECKSUM (1 << 1) |
Definition at line 16 of file SBR.h.
◆ SBR_SECTION_NAME_MAX_SIZE
#define SBR_SECTION_NAME_MAX_SIZE (16) |
Definition at line 12 of file SBR.h.
◆ SBR_COMPRESSION
Enumerator |
---|
SBR_NO_COMPRESSION | |
SBR_COMPRESSION_ZLIB | |
SBR_COMPRESSION_GZ | |
SBR_COMPRESSION_XZ | |
Definition at line 18 of file SBR.h.
◆ sbr_compute_checksum()
uint32_t sbr_compute_checksum |
( |
const void * |
buffer, |
|
|
uint32_t |
size |
|
) |
| |
◆ sbr_compute_checksum_prev()
uint32_t sbr_compute_checksum_prev |
( |
const void * |
buffer, |
|
|
uint32_t |
size, |
|
|
uint32_t |
prev_checksum |
|
) |
| |
◆ sbr_initial_checksum()
uint32_t sbr_initial_checksum |
( |
| ) |
|
◆ sbr_parse()
int sbr_parse |
( |
const void * |
buffer, |
|
|
uint32_t |
size, |
|
|
SBR * |
sbr |
|
) |
| |
Definition at line 57 of file SBR.c.
◆ sbr_section_get_bootable()
bool sbr_section_get_bootable |
( |
const SBR_SECTION * |
sbr_section | ) |
|
◆ sbr_section_get_compression()
◆ sbr_section_get_ignore_checksum()
bool sbr_section_get_ignore_checksum |
( |
const SBR_SECTION * |
sbr_section | ) |
|
◆ sbr_section_is_valid()
bool sbr_section_is_valid |
( |
const SBR_SECTION * |
sbr_section | ) |
|
◆ sbr_section_set_bootable()
void sbr_section_set_bootable |
( |
SBR_SECTION * |
sbr_section, |
|
|
bool |
bootable |
|
) |
| |
◆ sbr_section_set_checksum()
void sbr_section_set_checksum |
( |
SBR_SECTION * |
sbr_section, |
|
|
uint32_t |
checksum |
|
) |
| |
◆ sbr_section_set_compression()
◆ sbr_section_set_ignore_checksum()
void sbr_section_set_ignore_checksum |
( |
SBR_SECTION * |
sbr_section, |
|
|
bool |
ignore_checksum |
|
) |
| |
◆ sbr_section_set_name()
void sbr_section_set_name |
( |
SBR_SECTION * |
sbr_section, |
|
|
const char * |
name |
|
) |
| |
◆ sbr_section_set_offset()
void sbr_section_set_offset |
( |
SBR_SECTION * |
sbr_section, |
|
|
uint32_t |
offset |
|
) |
| |
◆ sbr_section_set_size()
void sbr_section_set_size |
( |
SBR_SECTION * |
sbr_section, |
|
|
uint32_t |
size |
|
) |
| |
◆ sbr_section_set_type()
void sbr_section_set_type |
( |
SBR_SECTION * |
sbr_section, |
|
|
uint8_t |
type |
|
) |
| |
◆ sbr_serialize()
int sbr_serialize |
( |
const SBR * |
sbr, |
|
|
void * |
buffer, |
|
|
uint32_t |
max_size |
|
) |
| |
Definition at line 84 of file SBR.c.
◆ SBR_IDENTIFIER
Definition at line 25 of file SBR.h.