|
oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
|
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 |
MQTT connection configuration.
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. | const char* ove_mqtt_config_t::host |
Broker hostname or IP.
| uint16_t ove_mqtt_config_t::port |
Broker port (1883 or 8883).
| const char* ove_mqtt_config_t::client_id |
Client identifier.
| const char* ove_mqtt_config_t::username |
Username (may be NULL).
| const char* ove_mqtt_config_t::password |
Password (may be NULL).
| uint16_t ove_mqtt_config_t::keep_alive_s |
Keep-alive interval in seconds.
| int ove_mqtt_config_t::use_tls |
Non-zero to use TLS.
| const unsigned char* ove_mqtt_config_t::tls_ca_cert |
PEM/DER CA cert used when use_tls is set (may be NULL).
| size_t ove_mqtt_config_t::tls_ca_cert_len |
Length of tls_ca_cert in bytes.
| int ove_mqtt_config_t::tls_allow_insecure |
Non-zero to allow unverified TLS when tls_ca_cert is NULL.
| ove_mqtt_msg_cb ove_mqtt_config_t::on_message |
Message callback.
| void* ove_mqtt_config_t::user_data |
Opaque pointer for callback.