ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mdl_net_c6link.h File Reference

Media network backend over the ESP32-C6 raw HTTPS transport. More...

#include <stdint.h>
#include "mdl_net.h"
#include "ra8_c6link_mdl_transfer.h"
Include dependency graph for mdl_net_c6link.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

 Caller-owned state for one serialized C6 media network backend. More...

Functions

ra8_err_t mdl_net_c6link_init (mdl_net_iface_t *net, mdl_net_c6link_t *backend, ra8_c6link_t *link, const ra8_mdl_sha256_iface_t *sha256, uint16_t chunk_bytes, uint32_t max_chunks)
 Bind an open C6 link as a portable media network backend.

Detailed Description

Media network backend over the ESP32-C6 raw HTTPS transport.

Binds the downloader's portable mdl_net_iface_t to an already-open ra8_c6link_t. The backend verifies the C6 terminal digest independently through caller-supplied SHA-256 callbacks before exposing bytes to the downloader. Artifact selection remains RA8-side policy through mdl_format_t; the transport never relabels raw bytes as a container.

Protocol version 3 carries the artifact identity, bounded request headers, timeout, final HTTP status, and selected response headers. This generic network adapter deliberately requests loose: downloader policy still owns whether raw image bytes are later formatted and saved as RABOOK.

Since
0.1.0

Definition in file mdl_net_c6link.h.

Function Documentation

◆ mdl_net_c6link_init()

ra8_err_t mdl_net_c6link_init ( mdl_net_iface_t * net,
mdl_net_c6link_t * backend,
ra8_c6link_t * link,
const ra8_mdl_sha256_iface_t * sha256,
uint16_t chunk_bytes,
uint32_t max_chunks )
nodiscard

Bind an open C6 link as a portable media network backend.

Parameters
[out]netInterface returned to downloader/session code.
[out]backendCaller-owned backend state retained by net.
[in,out]linkAlready-open exclusively owned C6 link.
[in]sha256Complete caller-owned streaming SHA-256 seam.
[in]chunk_bytesRequested bytes per pull.
[in]max_chunksHard maximum pulls per response.
Returns
Binding status.
Return values
k_ra8_okThe interface is ready for policy-preserving HTTPS requests.
k_ra8_err_null_ptrA required pointer or SHA callback is null.
k_ra8_err_invalid_sizeA transfer bound is zero or excessive.
Precondition
No request is active on link or backend.
SHA context storage remains live until the interface is destroyed.
Postcondition
Success initializes both caller-owned output objects.
Failure leaves net and backend zeroed after pointer validation.
Note
The binding owns neither the link nor SHA context.
Since
0.1.0

Immutable method table for caller-owned C6 backend state.

Definition at line 280 of file mdl_net_c6link.c.

References ra8_mdl_sha256_iface::ctx, ra8_mdl_sha256_iface::final, ra8_mdl_sha256_iface::init, internal_c6_destroy(), internal_c6_get_body(), internal_c6_get_buf(), k_ra8_err_invalid_size, k_ra8_err_null_ptr, k_ra8_mdl_chunk_data_max, k_ra8_ok, and ra8_mdl_sha256_iface::update.