oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Data Fields
ove_mqtt_config_t Struct Reference

MQTT connection configuration. More...

#include <net_mqtt.h>

Data Fields

const char * host
 
uint16_t port
 
const char * client_id
 
const char * username
 
const char * password
 
uint16_t keep_alive_s
 
int use_tls
 
const unsigned char * tls_ca_cert
 
size_t tls_ca_cert_len
 
int tls_allow_insecure
 
ove_mqtt_msg_cb on_message
 
void * user_data
 

Detailed Description

MQTT connection configuration.

Note
When use_tls is non-zero the broker certificate is verified against tls_ca_cert. If no CA cert is supplied the handshake refuses to continue unless tls_allow_insecure is also set.

Field Documentation

◆ host

const char* ove_mqtt_config_t::host

Broker hostname or IP.

◆ port

uint16_t ove_mqtt_config_t::port

Broker port (1883 or 8883).

◆ client_id

const char* ove_mqtt_config_t::client_id

Client identifier.

◆ username

const char* ove_mqtt_config_t::username

Username (may be NULL).

◆ password

const char* ove_mqtt_config_t::password

Password (may be NULL).

◆ keep_alive_s

uint16_t ove_mqtt_config_t::keep_alive_s

Keep-alive interval in seconds.

◆ use_tls

int ove_mqtt_config_t::use_tls

Non-zero to use TLS.

◆ tls_ca_cert

const unsigned char* ove_mqtt_config_t::tls_ca_cert

PEM/DER CA cert used when use_tls is set (may be NULL).

◆ tls_ca_cert_len

size_t ove_mqtt_config_t::tls_ca_cert_len

Length of tls_ca_cert in bytes.

◆ tls_allow_insecure

int ove_mqtt_config_t::tls_allow_insecure

Non-zero to allow unverified TLS when tls_ca_cert is NULL.

◆ on_message

ove_mqtt_msg_cb ove_mqtt_config_t::on_message

Message callback.

◆ user_data

void* ove_mqtt_config_t::user_data

Opaque pointer for callback.


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