]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sample: Add converts to parses MQTT messages
authorBaptiste Assmann <bedis9@gmail.com>
Tue, 27 Oct 2020 17:10:06 +0000 (18:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Nov 2020 18:27:03 +0000 (19:27 +0100)
commite279ca6bbeb0462cfd1a4c237f9bb6d2ccc34300
treeccec8f3c5941ba5ff2c5186bcd715b7b26c62a93
parent7983b8687eb04c5df4df674c7b9e53b8cb645692
MINOR: sample: Add converts to parses MQTT messages

This patch implements a couple of converters to validate and extract data from a
MQTT (Message Queuing Telemetry Transport) message. The validation consists of a
few checks as well as "packet size" validation. The extraction can get any field
from the variable header and the payload.

This is limited to CONNECT and CONNACK packet types only. All other messages are
considered as invalid. It is not a problem for now because only the first packet
on each side can be parsed (CONNECT for the client and CONNACK for the server).

MQTT 3.1.1 and 5.0 are supported.

Reviewed and Fixed by Christopher Faulet <cfaulet@haproxy.com>
Makefile
doc/configuration.txt
include/haproxy/mqtt-t.h [new file with mode: 0644]
include/haproxy/mqtt.h [new file with mode: 0644]
src/mqtt.c [new file with mode: 0644]
src/sample.c