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

Private HTTP classification shared by downloader network backends. More...

#include "mdl_net.h"
#include "ra8_attributes.h"
Include dependency graph for mdl_net_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ra8_err_t priv_mdl_net_classify_http (long status)
 Classify one observed HTTP response status.

Detailed Description

Private HTTP classification shared by downloader network backends.

Keeps backend-neutral response policy in one portable seam while concrete backends retain ownership of their transport-specific failures.

Definition in file mdl_net_internal.h.

Function Documentation

◆ priv_mdl_net_classify_http()

ra8_err_t priv_mdl_net_classify_http ( long status)

Classify one observed HTTP response status.

Applies the downloader's shared throttle, server-error, and client-error rules after a concrete backend completes its transport.

Parameters
[in]statusFinished HTTP status in the inclusive range 100..599.
Returns
Canonical downloader result for the response status.
Return values
k_ra8_err_busyStatus 429 or 503 requires governor backoff.
k_ra8_failAny other status at or above 500.
k_ra8_err_not_foundAny other status at or above 400.
k_ra8_okStatus below 400.
Precondition
status was obtained from a syntactically valid HTTP response.
Transport, capacity, and sink failures were handled before this call.
Postcondition
The status is classified without mutating caller or backend state.
Equal statuses always produce equal canonical results.
Note
This is private policy shared by curl and C6link backends.
Since
0.1.0

Definition at line 31 of file mdl_net.c.

References k_mdl_http_client_error, k_mdl_http_server_error, k_mdl_http_too_many, k_mdl_http_unavailable, k_ra8_err_busy, k_ra8_err_not_found, k_ra8_fail, k_ra8_ok, and RA8_PRIV.

Referenced by internal_c6_get(), and priv_mdl_net_curl_classify().