Skip to content

Support for wolfIP with MQTT client and broker#463

Merged
danielinux merged 4 commits intowolfSSL:masterfrom
dgarske:broker_wolfip
Feb 24, 2026
Merged

Support for wolfIP with MQTT client and broker#463
danielinux merged 4 commits intowolfSSL:masterfrom
dgarske:broker_wolfip

Conversation

@dgarske
Copy link
Contributor

@dgarske dgarske commented Feb 12, 2026

  • Fixed mqtt_types.h - changed empty PRINTF macro to proper no-op: do { (void)0; } while(0)
  • Fixed mqtt_broker.c - moved BrokerTls_Init outside #elif block for wolfIP compatibility
  • Fixed mqtt_broker.c - wrapped file-based cert functions in #ifndef NO_FILESYSTEM
  • Fixed mqtt_broker.c - suppressed unused parameter warning in BrokerUsage()

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for the wolfIP TCP/IP stack to the wolfMQTT client and broker, enabling wolfMQTT to run on embedded systems using wolfIP for networking. The changes include fixing the PRINTF macro to be a proper no-op, adding wolfIP-specific network backend implementations, refactoring broker initialization to separate start-up from the main loop, and wrapping file-based certificate operations for NO_FILESYSTEM compatibility.

Changes:

  • Fixed PRINTF macro in mqtt_types.h to use proper do-while(0) pattern for no-op
  • Added wolfIP network backend support for both MQTT client and broker
  • Refactored MqttBroker_Run to extract initialization logic into new MqttBroker_Start function for embedded systems

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wolfmqtt/mqtt_types.h Fixed empty PRINTF macro to be a proper no-op statement using do-while(0) pattern
wolfmqtt/mqtt_socket.h Added blank line for improved formatting
wolfmqtt/mqtt_broker.h Added MqttBroker_Start API and MqttBrokerNet_wolfIP_Init function, updated MqttBrokerNet_Init availability
src/mqtt_socket.c Added wolfIP-specific errno handling with WOLFIP_EAGAIN mappings
src/mqtt_broker.c Major changes: moved BrokerTls_Init outside POSIX backend, added wolfIP network backend implementation, wrapped file-based cert functions in NO_FILESYSTEM checks, added BROKER_SLEEP_MS and time abstractions for wolfIP, refactored MqttBroker_Run to use new MqttBroker_Start, updated TLS cleanup logic, suppressed unused parameter warning in BrokerUsage
examples/mqttport.h Added wolfIP socket type definitions and NO_FILESYSTEM define
examples/mqttnet.h Added wolfIP stack pointer to SocketContext
examples/mqttnet.c Implemented wolfIP network callbacks (NetConnect, NetRead, NetWrite, NetDisconnect) and stack initialization
examples/mqttexample.h Added wolfIP stack pointer to MQTTCtx structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

danielinux
danielinux previously approved these changes Feb 24, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dgarske dgarske assigned wolfSSL-Bot and unassigned dgarske Feb 24, 2026
@danielinux danielinux merged commit 6a5f3d1 into wolfSSL:master Feb 24, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants