Commit graph

19237 commits

Author SHA1 Message Date
Anas Nashif
f6e039062a kernel: remove dependency on CONFIG_NANO_TIMERS/TIMEOUTS
Remove legacy option and use SYS_CLOCK_EXISTS where appropriate.

Change-Id: I3d524ea2776e638683f0196c0cc342359d5d810f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-08 18:09:52 +00:00
Anas Nashif
e161d08756 trivial: fix typo
Change-Id: Id6f486bf151c3fb1065e9dcfae445ec120e83a62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-08 16:17:00 +00:00
Marcus Shawcroft
f0da59b062 sensor: Fix samples that assume incorrect sensor_value type.
Various sensor samples are hardwired to expect returned sensor values
are represented as doubles.  In each case this assumption is incorrect.

Introduce a generic sensor_value to double helper function and adjust
the samples to use it.

Change-Id: I89c788686576562b84e07a36064640231340c33b
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-01-08 16:16:15 +00:00
Anas Nashif
e54e66a3d0 doc: add template for sample documentation
Change-Id: I2396f4f95d5ad9abd7ca9a718e0d16bba86a437e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-08 08:48:16 -05:00
Baohong Liu
da17225d63 drivers: aio: remove aio disabling before invoking callback
Remove aio disabling code before calling callback. If aio is
disabled before callback is invoked, calling pending
interrupt check API in the callback will get negative result.
If user wants to disable the aio, it can do this in callback
instead of this being done blindly before callback.

Jira: ZEP-1437

Change-Id: I42ebe4584af6396ac2360152f9b0e2c389c44145
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-01-07 14:14:29 +00:00
Qiu Peiyang
ed0e5e6fd5 driver: gpio: remove nano_timer code
drivers/gpio/gpio_pcal9535a.c defines a nano_timer,
but never uses it. So delete it.
gpio_sch.c uses a k_timer, but gpio_sch.h defines a
nano_timer. So change the variable poll_timer to
type k_timer.

Jira: ZEP-1525

Change-Id: I884e4703c1ace61da5be7d9c63e58e7c3bce7f68
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2017-01-07 12:16:06 +00:00
Inaky Perez-Gonzalez
62ebe7200e zephyr-env: don't fail unnecesarily when 'set -e'
The way the PATH modification bit was set was failing unnecesarily
when the shell is being ran with -e (fail on error), which is leading
to unnecessary (and dangerous) workarounds in integration scripts.

So wrap it in an if sentence, so the shell doesn't bail out when the
grep fails to find the scripts_path in PATH.

Change-Id: Ia88a5f430e08ef4c186d11834f4cd840ccd29f7f
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-01-07 02:40:04 +00:00
Anas Nashif
a1d7794647 samples: minor documentation tweaks
Change-Id: I9efe25dbc808c635d895ffe2893afb68f4088ad1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 18:49:24 -05:00
Anas Nashif
fc6137001b doc: move documetnation context to root directory
This will allow inclusion of documentation files that exist outside of
doc/ and will make it possible to add rst files across the tree,
especially for boards, samples and tests.

Change-Id: I7afcf92d99f504b2bc0b2b7e3452acb2f8e08294
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 22:51:31 +00:00
Anas Nashif
eaa06ac40a net: do not skip sanitycheck on samples
Change-Id: I781a908ad998211b34d5f05f53fbf3471e6b9f1b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 22:08:14 +00:00
Michael Scott
249cfb682f net: l2: bluetooth: Fix build break in ipsp_disconnected
In commit bf4fb51f44, "net: if: Add NET_IF_UP flag"
a reference to ctxt->iface was added in the ipsp_disconnected function.

Let's add the ctxt variable definition to fix the build break.

Change-Id: Ib06047e333504f3db4fe175fb3ef1dce347e1916
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-01-06 22:08:13 +00:00
Anas Nashif
a6997bbc17 samples: sensors: fix documentation layout of MCP9808 sample
Change-Id: Iab5426a0689fd7ac22933e3c61e22d217af7f067
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 16:32:31 -05:00
Anas Nashif
813df21713 samples: sensors: fix documentation layout of TH02 sample
Change-Id: I140fdd96eea74aaeb0216829024a46f2430fc9c6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 16:32:31 -05:00
Anas Nashif
a2e7706140 samples: disco: convert to rst and expand documentation
Change-Id: I1252e3d95aaee877fa7f8bb4768e07ec75f8769a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 16:32:31 -05:00
Anas Nashif
2b72ff397c samples: button: convert to rst and expand documentation
Change-Id: I8839d565325659ec1c00c9eb513a4dfa29cd6e2d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 16:32:31 -05:00
Anas Nashif
4a7c46dc05 Merge "Merge net branch into master" 2017-01-06 21:19:58 +00:00
Benjamin Walsh
09a14d4173 samples: put philosophers stacks in noinit section
Change-Id: Ic17d28ca9b27b2b0c4f9d82221e4d93750870b27
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:38:21 +00:00
Benjamin Walsh
4634871832 samples: speed up philosophers demo
Cut wait times by 4, in chunks in 25ms instead of 100ms. This allows to
see what is going on, but with much faster transitions, which makes the
demo slightly less boring.

Change-Id: I32fdd6e41a9af1fe9aa8a8f186de7945986b3a71
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:56 +00:00
Benjamin Walsh
66b99f1486 kernel: add _timeout_q dump before and after adding timeout
Kernel debugging aid.

Change-Id: I852ba2f626f133d943be2ecac41354fecca478d6
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:27 +00:00
Benjamin Walsh
99eef25815 kernel: do not use sys_dlist_insert_at() in _add_timeout()
Similar to _pend_queue, it's more efficient to do the logic inline.

Change-Id: I68ac4fbc26c97b6ec9322caef98504ff6ccc8727
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:26 +00:00
Benjamin Walsh
b8c2160a2b kernel: do not use sys_dlist_insert_at() in _pend_thread()
It's calling a function on every iteration, it's more efficient to just
do the logic inline.

Change-Id: I166e377d4ffb3056749fd625cb789173030904ac
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:26 +00:00
Benjamin Walsh
8ecd3e071b dlist: add sys_dlist_peek_tail()
Change-Id: I8f9335169531e61324d88bf98cdc002a9c24711e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:25 +00:00
Benjamin Walsh
1774f62eda nios2: remove unused INT_ACTIVE/EXC_ACTIVE thread flags
Change-Id: I884e87107cf30a6b8a064bc1da3c1ea26380fe03
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:25 +00:00
Benjamin Walsh
d779f3d240 kernel/arch: streamline thread flag bits used
Use least significant bits for common flags and high bits for
arch-specific ones.

Change-Id: I982719de4a24d3588c19a0d30bbe7a27d9a99f13
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:24 +00:00
Benjamin Walsh
e6a69cae54 kernel/arch: reverse polarity on sched_locked
This will allow for an enhancement when checking if the thread is
preemptible when exiting an interrupt.

Change-Id: If93ccd1916eacb5e02a4d15b259fb74f9800d6f4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:24 +00:00
Benjamin Walsh
04ed860c68 kernel: make _thread.sched_locked a non-atomic operator variable
Not needed, since only the thread itself can modifiy its own
sched_locked count.

Change-Id: I3d3d8be548d2b24ca14f51637cc58bda66f8b9ee
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:23 +00:00
Tomasz Bursztyka
53d8555430 Merge net branch into master
Main changes:

- MQTT improvements
- TCP fixes
- IEEE 802.15.4 RFD preliminary features (active/passive scan,
  association, disassociation), plus a dedicated "ieee15_4" shell
  module.

----------------------------------------------------------------
Andy Ross (3):
      net: tcp: Select correct source address for SYNACK packets
      net: tcp: Swap tcp->context backpointers
      net: tcp: Precompute appdata properly

Flavio Santes (14):
      net/protocols: Remove unnecessary assignement in Makefiles
      net/nbuf: Introduce the net_nbuf_linear_copy routine
      net/mqtt: Make input arguments const
      net/mqtt: Improve indentation
      net/mqtt: Use the right data type
      net/mqtt: Add missing function prototypes
      net/mqtt: Add the mqtt_rx_publish routine
      net/mqtt: Improve buffer error handling in mqtt_tx routines
      net/mqtt: Improve error handling in mqtt_rx_connack routine
      net/mqtt: Add the reception callback
      net/mqtt: Allow an MQTT publisher app to receive msgs
      net/mqtt: Allow an MQTT subscriber app to receive msgs
      net/dns: Introduce the qname_copy routine
      net/dns: Fix documentation issues

Leandro Pereira (4):
      net: tcp: Be more consistent with namespaces for private funcs
      net: tcp: Remove unused `retransmit_timer` field from `net_tcp`
      net: tcp: Store return value of net_buf_frags_len() on a size_t
      net: tcp: Use appdatalen when acknowledging packets

Luiz Augusto von Dentz (2):
      net: if: Add NET_IF_UP flag
      net: l2: Add enable callback

Maureen Helm (1):
      net: samples: Fix stale yaip references

Tomasz Bursztyka (15):
      net: event: Fix misplaced comment
      net: event: Notify on interface being put down or up
      net: ieee802154: Add grounds for passive scan
      net: ieee802154: Integrate beacon frame handling
      samples: net: ieee802154: Once cc2520 is up, let's initiate a scan
      net: ieee802154: Add PAN association request
      net: ieee802154: Integrate MAC Command frames handling
      net: ieee80215: Add Active Scan request
      net: ieee802154: Add PAN disassociation request
      net: ieee802154: Handle disassocation notification from PAN coordinator
      samples: ieee802154: Let's proceed with an active scan
      net: ieee802154: Fix logging primitive in mgmt part
      net: ieee802154: Expose basic network parameters through net mgmt API
      net: ieee802154: Add a shell module named 'ieee15_4'
      samples: net: Add IEEE 802.15.4 shell module on cc2520 sample

 include/net/dns_client.h                           |   7 +-
 include/net/ieee802154.h                           | 116 +++++-
 include/net/mqtt.h                                 |  60 +++-
 include/net/nbuf.h                                 |  16 +
 include/net/net_event.h                            |  21 +-
 include/net/net_if.h                               |  47 ++-
 include/net/net_l2.h                               |   9 +-
 samples/net/dhcpv4_client/src/Makefile             |   1 -
 samples/net/ieee802154/cc2520/prj.conf             |   6 +-
 .../net/ieee802154/cc2520/src/ieee802154_test.c    |  57 ++-
 samples/net/zperf/src/Makefile                     |   2 +-
 subsys/net/ip/ipv4.c                               |  14 +-
 subsys/net/ip/ipv4.h                               |   4 +-
 subsys/net/ip/ipv6.c                               |  16 +-
 subsys/net/ip/ipv6.h                               |   2 +
 subsys/net/ip/l2/bluetooth.c                       |  22 +-
 subsys/net/ip/l2/dummy.c                           |   2 +-
 subsys/net/ip/l2/ethernet.c                        |   2 +-
 subsys/net/ip/l2/ieee802154/Kconfig                |   9 +
 subsys/net/ip/l2/ieee802154/Makefile               |   1 +
 subsys/net/ip/l2/ieee802154/ieee802154.c           |  22 +-
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.c      | 390 +++++++++++++++++++++
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.h      |  66 ++++
 subsys/net/ip/l2/ieee802154/ieee802154_shell.c     | 289 +++++++++++++++
 subsys/net/ip/nbuf.c                               |  39 +++
 subsys/net/ip/net_context.c                        |  77 +++-
 subsys/net/ip/net_if.c                             |  89 ++++-
 subsys/net/ip/tcp.c                                |  33 +-
 subsys/net/ip/tcp.h                                |  10 +-
 subsys/net/lib/dns/Makefile                        |   2 -
 subsys/net/lib/dns/dns_client.c                    |  62 +---
 subsys/net/lib/dns/dns_pack.c                      |  66 ++++
 subsys/net/lib/dns/dns_pack.h                      |  22 ++
 subsys/net/lib/mqtt/Makefile                       |   2 -
 subsys/net/lib/mqtt/mqtt.c                         | 351 ++++++++++++++++---
 subsys/net/lib/mqtt/mqtt_pkt.c                     |  16 +-
 subsys/net/lib/mqtt/mqtt_pkt.h                     |   4 +-
 tests/net/tcp/src/main.c                           |  26 +-
 38 files changed, 1746 insertions(+), 234 deletions(-)
 create mode 100644 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.h
 create mode 100644 subsys/net/ip/l2/ieee802154/ieee802154_shell.c

Change-Id: I72434b20cec53c004d7e7c03a24eab03a1d52c25
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 18:29:55 +01:00
Leandro Pereira
fb02efb1c9 net: tcp: Use appdatalen when acknowledging packets
If the length of all fragments is used instead, the TCP header is also
considered; sequence numbers do not consider the header.

Change-Id: I19e77ac0fe62ca619b0903dd0265f8ea4878cdf7
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-01-06 14:27:48 +00:00
Leandro Pereira
162843f90a net: tcp: Store return value of net_buf_frags_len() on a size_t
The net_buf_frags_len() function returns a size_t, which is an unsigned
integer.  Store on an appropriate size_t variable instead.

Change-Id: I98aa4c0ddd7c464737436aa9ce13bdc86c11da2b
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-01-06 14:27:35 +00:00
Leandro Pereira
342f81b7e1 net: tcp: Remove unused retransmit_timer field from net_tcp
`retry_timer` is being used instead.

Change-Id: I53f8e724b48eca5e17bc9fec38f25c457b1492c9
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-01-06 14:27:25 +00:00
Leandro Pereira
84b68b8b21 net: tcp: Be more consistent with namespaces for private funcs
Change-Id: Ie2699e01c5cc19cd04eed8383d6c73769366a55e
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 14:27:13 +00:00
Andy Ross
3a8b73067d net: tcp: Precompute appdata properly
TCP packets need the computed packet length early so they can fill in
a correct sequence number in their generated ACKs.  Waiting for
packet_received() is too late.  Precompute it before needed, and skip
the evaluation later.

Change-Id: I25547009f88277e0042c74f2005a141819797886
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-01-06 14:25:58 +00:00
Andy Ross
02174b8e0f net: tcp: Swap tcp->context backpointers
On accepting a new connection, the stack does an odd "swap" trick
where it updates the struct net_tcp record on the *listening* context
with the values from the new connection, and then swaps it with the
empty one that got allocated for the *new* context.

Unfortunately this swap forgot to swap the net_tcp "context" field
backpointers, so the net_context retrieved at runtime was for the
wrong connection.  Surprisingly, this actually almost worked for a
long time, except that the destination address would be wrong in the
newer setup.

Change-Id: I0c1812ddb9f9ff3e7deb60d1fd67cafd9ba96997
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-01-06 13:56:02 +00:00
Andy Ross
a5b694fbbc net: tcp: Select correct source address for SYNACK packets
The source address for a TCP SYNACK must (obviously) be the same as
the destination address of the SYN that produced it.  But the existing
IP packet creation routines would simply fill in a default address
from the net_context struct, which is correct for *established*
connections, but for the listening socket is generally INADDR_ANY
(i.e. all zeroes) and will result in an arbitrary choice for source
address (e.g. a link-local address on the same interface) which can
easily be wrong.

So we need to pass the correct address all the way down from the SYN
packet handler code through the net_ipv*_create() packet creation
functions.  This requires lots of API plumbing, but relatively little
logic change.

Change-Id: Ic368f8cef6689f8a27cbafd5933a4964d5cc457e
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-01-06 08:21:15 -05:00
Tomasz Bursztyka
20404131aa samples: net: Add IEEE 802.15.4 shell module on cc2520 sample
This is easier to test the 15.4 layer instead of hard-coding sample
logic.

Change-Id: I2376dec3dad9e2ceca3f61bd88bf5709f1bc1390
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 12:27:01 +01:00
Tomasz Bursztyka
336e3f8721 net: ieee802154: Add a shell module named 'ieee15_4'
This one exposes IEEE 802.15.4 net mgmt requests through the shell. User
has then the ability to directly make relevant requests like raising a
scan, associating, etc...

For now, it assumes the 15.4 interface is the only one on the system and
thus will rely on net_if_get_default().

Change-Id: I8eb20565b8231e6cfcba6c1479179cc85ff1d8e5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 12:27:01 +01:00
Tomasz Bursztyka
6b41aecd99 net: ieee802154: Expose basic network parameters through net mgmt API
It is then possible to set the channel, pan_id and short address through
this API. Such features are mainly useful for testing purposes.

Change-Id: I41aeb397afdb231458a3b13638f3e13d3ac28a6c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 12:27:01 +01:00
Tomasz Bursztyka
415afe130e net: ieee802154: Fix logging primitive in mgmt part
Change-Id: I9a97acfc06b7836cce622e374e21efcecbd99bd5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 11:02:26 +01:00
Flavio Santes
30225d5ef1 net/dns: Fix documentation issues
Fix some documentation issues found at the dns_client.h file.

Change-Id: I3c1138f55b182ad2507b2cc3a4a50dc874a0d730
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
e86b6c23af net/dns: Introduce the qname_copy routine
When a CNAME is part of the DNS answer RR, sometimes a label with
a pointer is found. The CNAME must be reused to create a new DNS
query and that CNAME will become the new DNS Query QNAME. This new
QNAME must not include pointers.

This patch introduces the qname_copy routine that "linearizes" a
given QNAME (perhaps with pointers).

The dns_read routine is also updated to reflect these changes.

Change-Id: I8e8f64e85e2cbf494fd589e2b7a67d470d34604b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
e8eb62b87b net/mqtt: Allow an MQTT subscriber app to receive msgs
This patch adds the mqtt_subscriber_parser routine and modifies the
mqtt_init routine to allow an MQTT subscriber app to receive MQTT msgs.

Change-Id: Ie54ab892dacbc4386acab78a8991eba1850d8171
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
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
Flavio Santes
bf88fe5118 net/mqtt: Add the reception callback
The reception cb: internal use only cb that will be set according to
the application profile: PUBLISHER, SUBSCRIBER, PUBLISHER & SUBSCRIBER
or SERVER.

Change-Id: Ib36b0686deb9220e507f9e468aae1b1191c35d31
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
8619d9d625 net/mqtt: Improve error handling in mqtt_rx_connack routine
Avoid undesired behaviors by exiting once an error is detected.

Change-Id: Id8e6accd6cd096274fe1c40a615d290967f1d4b9
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
e4e74be208 net/mqtt: Improve buffer error handling in mqtt_tx routines
This commit improves the buffer error handling in the mqtt_tx
routines.

Change-Id: Ic8e5761d927fe881b2376b6ac948a412e3b1168a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
d490ff27ad net/mqtt: Add the mqtt_rx_publish routine
The mqtt_rx_publish is used to process incoming MQTT PUBLISH
messages. This routine performes the following steps:

- take ownership of the rx buffer containing the MQTT PUBLISH msg,
- call the MQTT parser routine, and
- determine, based on the incoming message's MQTT QoS,
  the next action.

Change-Id: I3cc011cf0c280205161d0484f12a2cfa79fdf44a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
ab042f2997 net/mqtt: Add missing function prototypes
Some public function prototypes are missing, so this commit adds
them to the mqtt.h header.

Change-Id: I57a50ce346f086f55e499bfc8c815fd161a52f7b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
edfaeba73d net/mqtt: Use the right data type
Use the appropriate data type for some variables:

- const input arguments
- int32_t instead of uint32_t for timeout
- uint8_t instead of int for variables that take just a few
  possitive values.

Change-Id: Id7d762b400fa17e6751829ac401cd7c13aabb7b2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:44 +01:00
Flavio Santes
4cfd7f7fe2 net/mqtt: Improve indentation
Replace tabs by spaces to improve code alignment in mqtt_pkt.c.

Change-Id: If586b91ba67b8075ddc7e0203dc538420e96b49a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:44 +01:00
Flavio Santes
51a48d2d07 net/mqtt: Make input arguments const
This commit changes some function signatures found at the private
MQTT Packet Lib. Input arguments representing arrays can be considered
'const', avoiding compiler warnings when passing "const arrays" in
MQTT applications.

Change-Id: I3ebaa9c7ff5fba74324bf79c55027cdd82669eaa
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:44 +01:00