Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
fota_http_download_params Struct Reference

Parameters of a download. More...

#include <fota_http.h>

Data Fields

const char * url
 Absolute URL of the form "http://host[:port]/path", or "https" when.
const char *const * headers
 Optional NULL terminated list of extra request headers.
const uint8_t * sha256
 Optional expected SHA-256 digest of the image, 32 bytes.
const sec_tag_t * sec_tags
 Optional TLS security tags to use instead of.
size_t sec_tag_count
 Number of entries in sec_tags.
const char * tls_hostname
 Optional host name to verify the server certificate against, when it differs from the URL host.
fota_http_progress_cb_t progress_cb
 Optional progress callback.
void * user_data
 Passed to the callbacks untouched.
uint8_t image_index
 Image to update in a multi-image layout, 0 for the only image.
bool resume
 Continue a previously interrupted download.

Detailed Description

Parameters of a download.

Field Documentation

◆ headers

const char* const* fota_http_download_params::headers

Optional NULL terminated list of extra request headers.

Each entry is a complete header line ending in "\r\n", for example "Authorization: Bearer token\r\n".

◆ image_index

uint8_t fota_http_download_params::image_index

Image to update in a multi-image layout, 0 for the only image.

◆ progress_cb

fota_http_progress_cb_t fota_http_download_params::progress_cb

Optional progress callback.

◆ resume

bool fota_http_download_params::resume

Continue a previously interrupted download.

The saved offset is only used when the URL and image index match the interrupted download, and the request carries If-Range when the server sent an ETag or Last-Modified header, so a file that changed on the server is fetched again from the start. Only present with

CONFIG_FOTA_HTTP_RESUME 

.

◆ sec_tag_count

size_t fota_http_download_params::sec_tag_count

Number of entries in sec_tags.

◆ sec_tags

const sec_tag_t* fota_http_download_params::sec_tags

Optional TLS security tags to use instead of.

CONFIG_FOTA_HTTP_TLS_SEC_TAG 

. Only present with

CONFIG_FOTA_HTTP_TLS 

.

◆ sha256

const uint8_t* fota_http_download_params::sha256

Optional expected SHA-256 digest of the image, 32 bytes.

Only present with

CONFIG_FOTA_HTTP_SHA256_CHECK 

.

◆ tls_hostname

const char* fota_http_download_params::tls_hostname

Optional host name to verify the server certificate against, when it differs from the URL host.

Needed when the URL carries an IP address and the certificate has no matching IP entry. Only present with

CONFIG_FOTA_HTTP_TLS 

.

◆ url

const char* fota_http_download_params::url

Absolute URL of the form "http://host[:port]/path", or "https" when.

CONFIG_FOTA_HTTP_TLS 

is enabled.

◆ user_data

void* fota_http_download_params::user_data

Passed to the callbacks untouched.


The documentation for this struct was generated from the following file: