zephyr/include/net
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
..
arp.h net: Refactored ARP packet header handling 2016-12-02 12:40:10 +02:00
buf.h net: buf: Change NET_BUF_DEBUG to NET_BUF_LOG and add a level option 2017-01-02 10:03:17 +01:00
dhcpv4.h net: Make native IP stack the default 2016-12-02 12:41:17 +02:00
dns_client.h net: Restructure network protocols 2017-01-02 10:03:19 +01:00
ethernet.h net: l2: ethernet: Handle Ethernet II minimal frame size relevantly 2016-12-16 19:14:54 +01:00
http_parser.h net: Restructure network protocols 2017-01-02 10:03:19 +01:00
ieee802154_radio.h net: Make native IP stack the default 2016-12-02 12:41:17 +02:00
ieee802154.h net: ieee802154: Add PAN disassociation request 2017-01-06 09:11:44 +01:00
mii.h net: Definitions for IEEE 802.3, Section 2 MII compatible PHY transceivers 2016-12-02 12:41:05 +02:00
mqtt_types.h net: Restructure network protocols 2017-01-02 10:03:19 +01:00
mqtt.h net/mqtt: Allow an MQTT publisher app to receive msgs 2017-01-06 09:11:45 +01:00
nbuf.h net/nbuf: Introduce the net_nbuf_linear_copy routine 2017-01-06 09:11:44 +01:00
net_context.h net: statistics: Make statistics calculation fully private 2017-01-02 10:03:18 +01:00
net_core.h net: ip: Improve logging by adding a dedicated sys_log level 2017-01-02 10:03:20 +01:00
net_event.h net: event: Notify on interface being put down or up 2017-01-06 09:11:43 +01:00
net_if.h net: if: Add NET_IF_UP flag 2017-01-06 09:11:42 +01:00
net_ip.h net: ip: Improve logging by adding a dedicated sys_log level 2017-01-02 10:03:20 +01:00
net_l2.h net: l2: Add enable callback 2017-01-06 09:11:42 +01:00
net_linkaddr.h net: Add ll address checker function 2016-12-02 12:40:19 +02:00
net_mgmt.h net: Make native IP stack the default 2016-12-02 12:41:17 +02:00
net_stats.h net: statistics: Expose relevant information through net mgmt API 2017-01-02 10:03:18 +01:00
offload_ip.h net: Make native IP stack the default 2016-12-02 12:41:17 +02:00
trickle.h net: Make native IP stack the default 2016-12-02 12:41:17 +02:00
zoap_link_format.h net: Restructure network protocols 2017-01-02 10:03:19 +01:00
zoap.h net: Restructure network protocols 2017-01-02 10:03:19 +01:00