/* capsule_blocks.h -- the block format of a .4th capsule payload. * * A .4th capsule is text: "Block " header lines, each followed by that * block's content lines (tools/mkcapsule.c, validate_forth_blocks). This is * the one place that says what a header line is. It depends on no VM, so * every loader of capsules can use it: the kernel's and the hosted v4 * system's (docs/v4.0.0/NUCLEUS.md 5.3). */ #ifndef STARKERNEL_CAPSULE_BLOCKS_H #define STARKERNEL_CAPSULE_BLOCKS_H #include /* Is the line that starts at p a "Block " header? If so, returns 1 * with the number in *out_num and the start of the next line in *out_after; * otherwise returns 0 and changes nothing. `end` is one past the payload's * last byte. */ int capsule_block_header(const uint8_t *p, const uint8_t *end, uint32_t *out_num, const uint8_t **out_after); #endif /* STARKERNEL_CAPSULE_BLOCKS_H */