zephyr/include
Flavio Santes 76e479974a net/mqtt: Allow an MQTT publisher app to receive msgs
Changes applied by this patch:

- Add the mqtt_publisher_parser routine
- Add the MQTT_PACKET_TYPE macro to get the MQTT msg packet type
  (required by mqtt_publisher_parser)
- Add the mqtt_linearize_buffer (required by mqtt_publisher_parser)
- Add the mqtt_recv callback for reception
- Modify the mqtt_init routine to install the reception callback

The mqtt_publisher_parser routine is a callback used internally
to execute the appropriate mqtt_rx routine. Only the following
messages are handled by this routine:

MQTT_CONNACK, MQTT_PUBACK, MQTT_PUBREC, MQTT_PUBCOMP and MQTT_PINGRESP.

On error, it executes the ctx->malformed cb, if defined.

This commit also introduces the mqtt_linearize_buffer routine that
will be used to linearize an IP stack fragmented buffer. This patch
makes use of the net_nbuf_linear_copy routine to linearize the
incoming buffer. mqtt_rx_xxxx routines are also updated to handle
linear buffers (no fragmentation).

Currently, all the network protocol routines assume that the input
buffer is not fragmented. Future versions will remove that assumption
and the mqtt_linearize_buffer routine will be removed as well.

Public MQTT API is not affected by this patch.

Change-Id: I02fece67052ffbc7cb393d5ca545c503da463c4b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
..
arch arm: Cortex-M0: Adapt core register code to M0 2017-01-03 22:44:35 +00:00
bluetooth Bluetooth: hci_ecc: Verify LE Generate DHKey command parameters 2017-01-05 08:49:17 +02:00
debug kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
display
drivers Bluetooth: Create separate bt_recv_prio() API 2017-01-05 08:49:17 +02:00
fs
linker net: Declare a macro to define stacks used by networking 2016-12-02 12:41:14 +02:00
logging logging: move event_logger to subsys/logging 2016-12-25 14:34:43 -05:00
misc shell: move shell to its own subsystem 2016-12-25 19:35:11 +00:00
net net/mqtt: Allow an MQTT publisher app to receive msgs 2017-01-06 09:11:45 +01:00
shell shell: move shell to its own subsystem 2016-12-25 19:35:11 +00:00
toolchain toolchain: Add a popcount macro for GCC 2016-12-12 20:07:53 +00:00
usb
adc.h
aio_comparator.h
atomic.h doc: Various corrections to doxygen info for Kernel APIs 2016-11-16 21:43:16 +00:00
cache.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
clock_control.h
counter.h counter: Fix interface 2016-11-30 14:39:10 +00:00
device.h device: do not set struct as deprecated 2016-12-11 06:36:14 -05:00
disk_access.h
dma.h
eth.h
flash.h
fs.h
gpio.h gpio: Fix spelling mistake. 2017-01-03 09:30:55 +00:00
i2c.h i2c: Add doxygen markup for internal only definitions. 2016-12-04 12:49:43 +00:00
init.h
ipm.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
irq_offload.h
irq.h doc: Fix up API description for IRQ_CONNECT() 2016-11-18 02:31:33 +00:00
kernel_version.h
kernel.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
legacy.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
linker-defs.h kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
linker-tool-gcc.h
linker-tool.h
microkernel.h
nanokernel.h
pinmux.h
power.h power_mgmt: Rename _sys_soc_resume notification disabling API 2016-11-11 20:40:54 +00:00
pwm.h
random.h random: Introduce random device API. 2016-12-24 16:40:11 +00:00
rtc.h
section_tags.h arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
sections.h arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
sensor.h sensor: Introduce tap and double tap triggers 2016-12-21 08:06:56 -06:00
shared_irq.h
spi.h
sw_isr_table.h
sys_clock.h doc: Add descriptions for clock-related helper macros 2016-11-18 02:31:35 +00:00
sys_io.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
toolchain.h
uart.h serial: fix up uart_poll_in docstring 2016-11-16 22:57:30 +00:00
watchdog.h
zephyr.h