Commit Graph

12305 Commits

Author SHA1 Message Date
Baohong Liu 08f5c26115 drivers: bmi160: add sample ready check
Add sensor sample ready check before fetching the sample.
Otherwise, invalid value will be returned.

Jira: ZEP-1532 ZEP-1358

Change-Id: I570151c8ae93fbb744dac857521f596fd63806a6
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:45:31 +00:00
Sharron LIU de7435a73f tests: kernel: mem_heap: added api and concept tests
<kernel.h> APIs covered:
    k_malloc
    k_free
Concept TESTPOINTs extracted from
https://www.zephyrproject.org/doc/kernel/memory/heap.html#concepts

ZEP-1242

Change-Id: I39edc809119984585d78d6abbe33f5be707c5818
Signed-off-by: Sharron LIU <sharron.liu@intel.com>
2017-02-04 19:36:50 +00:00
Tim Nordell 93801c6447 arm: Adjust entry point of XIP kernels to the __reset function
The entry point specified in the elf file should always point to
executable code, and not to the interrupt vector table.  Pointing to the
vector table as the entry point in the elf file presents problems with
running the kernel against a debugger as the debugger starts the program
counter at the top of the interrupt vector table.

Change-Id: I76051f6e99a44bab72936670bead5fb8191a6ec7
Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
2017-02-04 19:32:40 +00:00
jing wang 61e5438c51 tests: add zephyr i2c driver api test
the commit verify below i2c apis by sensor
GY271 or HMC58831
    i2c_configure()
    i2c_write()
    i2c_read()
    i2c_burst_write()
    i2c_burst_read()

Change-Id: I072a9897a45636613e811baa7ff79b57206e4130
Signed-off-by: jing wang <jing.j.wang@intel.com>
2017-02-04 19:31:31 +00:00
Anas Nashif 4fb12ae988 kernel: k_timer_stop: remove assert when called from an ISR
Change-Id: I596e0323a7aafc9d7f3834a8d1b655ad2540d4ef
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 19:25:11 +00:00
Andrew Boie c2a91b1b2e libc: minimal: rename private macro
As it turns out Xtensa SDK headers also define _Restrict, causing
havoc. As this was intended to be a private macro, rename it to something
less likely to cause a collision.

Change-Id: I0a7501a1af8cf87efb096872a91a7b44bd2bbdca
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-04 19:22:07 +00:00
Baohong Liu 6b5af856d3 boards: arduino_101_sss: use new gpio device name
Use new gpio device name for bmi160 device.

Change-Id: I0154173aa13f8e578b81469ee161d9aa9b378a65
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:21:08 +00:00
Baohong Liu a1b8ed0ac6 quark_se: sensor: use consistent device names for GPIO, SPI and I2C
Rename devices. For example, the two i2c devices in the
quark se sensor sub-system will have name string "I2C_0"
and "I2C_1", while the other two i2c devices accessible to
both x86 and arc will have name string "I2C_2" and "I2C_3".
This is valid only when you build arc binary. 

It does not apply if you build x86 or arm binary. Similar change is
also made for GPIO and SPI.

Jira: ZEP-1588 ZEP-1614

Change-Id: Ibad4486e70e0aaf287763514a5a9d28b43bca094
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:21:08 +00:00
Anas Nashif 19e56a049a boards: sam e70: add openocd file for SAM E70
This works with openocd 0.10 only.

Change-Id: I0a56701976ac01f3a80e73f00da9c75b4b0e123d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 02:58:07 +00:00
Anas Nashif 648ecef7bd sanitcheck: add sam_e70_xplained
Change-Id: Ic16f6132b701b4e2079939302473e5e5b295dc59
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 02:57:49 +00:00
Piotr Mienkowski 9670dc582d ext: Atmel ASF: remove unused and broken preprocesor macros
Header files from Atmel ASF define several preprocesor macros
which are unused and break compilation with some toolchains.
This patch removes those macros. Currently only from same70q21.h
header file which is used by SAM E70 Xplained target board.

Jira: ZEP-976
Change-Id: I13adb92c73773815c6df221ef33b0f56795f1d8c
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-02-04 02:53:08 +00:00
Anas Nashif 268fa152f2 scripts: add configuration file for uncrustify
Use this configuration file with the uncrustify tool to fix style
issues. the configuration should apply the zephyr coding style on
source code files with a few minor excrption. Do not take the output for
granted, always check for correctness after running.

To use, for example:

uncrustify --replace --no-backup -l C -c $ZEPHYR_BASE/scripts/uncrustify.conf

This will do the changes inline.

Change-Id: Iecfd2e10bc7e475ca83de0d921ebb5d72156d286
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 01:46:29 +00:00
David B. Kinder e23099bcc4 doc: add cross-references to hello_world sample
Change-Id: I23c4d361251251cce8887dd67be2e548f7365491
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-02-03 22:57:05 +00:00
Jean-Paul Etienne aa58ba2e92 MAINTAINERS: added maintainer for riscv32
Change-Id: Iceecb77e9a537e142235147cd2c91a8aeccb52ca
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-02-03 19:31:41 +01:00
Jean-Paul Etienne 47e2f4e3d7 riscv32: added a generic linker script for the riscv32 platform
Added a linker script that shall be common to most riscv SOCs.
Linker script also accounts for execution in place in ROM, when
CONFIG_XIP is set.

Nonetheless, riscv32 SOCs (like pulpino) requiring a different
system layout can still define their own linker script.

Change-Id: I3ad670446d439772c29a8204e307ac79643dc650
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-02-03 19:20:52 +01:00
Jean-Paul Etienne c989f0b408 riscv32: timer: replace riscv_qemu_driver by the generic riscv_machine_driver
riscv defines the machine-mode timer registers that are implemented
by the all riscv SOCs that follow the riscv privileged architecture
specification.

The timer registers implemented in riscv-qemu follow this specification.
To account for future riscv SOCs, reimplement the riscv_qemu_driver by
the riscv_machine_driver.

Change-Id: I645b03c91b4e07d0f2609908decc27ba9b8240d4
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-02-03 19:20:52 +01:00
Andrew Boie e01dd87377 x86: implement direct interrupts
Change-Id: Icac461a361dde969f023e7aa11f0605a97a3c009
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-03 18:18:30 +00:00
Flavio Santes 5a4ae76eaa MAINTAINERS: Update network applications section
Update the network applications section now that the http_server
and mqtt_publisher sample apps were merged.

Change-Id: I65dd568b7f92a1f7c89f7aa4f876f53a32ecb878
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-03 17:55:52 +00:00
Anas Nashif 57683bc01f doc: reference bluetooth section of Arduino 101
Change-Id: Ide11ac9e22c175603791c6a3b65a64fa12fe6d5c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-03 17:55:04 +00:00
Johan Hedberg dc42b2df43 net: buf: Fix timeout parameter documentation
The timeout given to APIs is in milliseconds and not ticks.

Change-Id: Iae198ca3aee326c19d0894a22f6e5cfca19ba131
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-03 15:24:07 +00:00
Jukka Rissanen 792c0209f1 Merge net branch into master
Main changes:

- Documentation enhancements and fixes
- TCP fixes
- MQTT fixes
- HTTP server sample application
- IRC sample application
- DNS sample application fixes
- Zperf sample application fixes
- IEEE 802.15.4 fixes
- ZoAP server fixes
- BT IPSP fixes

----------------------------------------------------------------
Anas Nashif (3):
      doc: update networking with Qemu section
      doc: net: use Qemu setup section in current documentation
      doc: net: restructure networking documentation

Andy Ross (5):
      net: tcp: Clean up net_context lifecycle
      net: tcp: Don't send active close FIN packets synchronously
      net: tcp: Clean up FIN handling
      net: net_context: Drop callbacks in net_context_put()
      net: tcp: Add optional TIME_WAIT support

Flavio Santes (11):
      net/mqtt: Move upwards buffer size validation
      net/mqtt: Simplify the MQTT high-level API
      net/mqtt: Add the "malformed" callback to the MQTT ctx structure
      net/mqtt: Validate null or app level zero-length rx buffers
      net/mqtt: Add the MQTT Publisher sample application
      net/mqtt: Remove redundant line
      samples/net/dns: Add the FRDM_K64F board to the testcase.ini file
      samples/net/dns: Move conf variables to config.h and delete unused defines
      samples/net/dns: Improve network configuration
      samples/net/dns: Update README file
      samples/net/http: Add the HTTP server sample application

Jorge Ramirez-Ortiz (1):
      net/mqtt: Check function return value

Jukka Rissanen (16):
      net: tcp: Call connect callback later
      net: Increasing the default number of network contexts
      samples: zperf: Use native IP stack for TCP support
      samples: zperf: Enable TCP for zperf configuration
      doc: net: Migrate from Zephyr 1.6 to 1.7
      net: nbuf: Removing dead code from net_nbuf_compact()
      net: tests: Add unit tests for net_nbuf_compact()
      tests: net: rpl: Fix unicast NS sending
      tests: net: Add tests for network interface
      net: nbuf: Do no use timeout if called from isr
      net: stats: Collect bytes sent and received
      net: ipv6: Use the nexthop when sending the packet
      samples: net: zperf: Initialize address family properly
      samples: net: zperf: Fix udp.upload command
      samples: net: zperf: Fix compiler warnings
      samples: net: zperf: Set the proper UDP payload

Julien Chevrier (1):
      net: iface: Fix bad comparisons in net_if

Kumar Gala (1):
      net: ip: stat: fix typo in rpl.dio.sent stat

Leandro Pereira (1):
      samples: net: Add IRC bot example

Luiz Augusto von Dentz (5):
      net: bt: Fix failing to resolve link-local address
      net: Add ll addresses on net_if_send_data
      net: Introduce NET_IF_POINTOPOINT flag
      net: bt: Add Kconfig to interoperate with Linux
      net: samples: Add CONFIG_NET_L2_BLUETOOTH_ZEP1656

Michael Scott (24):
      net: correct in*_addr parameter of net_addr_pton()
      samples: net: irc_bot: run sample process as a thread
      samples: net: irc_bot: establish privmsg callback typedef
      samples: net: irc_bot: release net_context reference upon error
      samples: net: irc_bot: remove unneeded typecasts and extra var
      samples: net: irc_bot: add helper function in_addr_set()
      samples: net: irc_bot: remove sockaddr globals
      samples: net: irc_bot: make panic() more accessible
      samples: net: irc_bot: use #defines for server and port
      samples: net: irc_bot: make some functions more accessible
      samples: net: irc_bot: simplify connect path
      samples: net: irc_bot: expand some char buffers
      samples: net: irc_bot: fix null pointer deref
      samples: net: irc_bot: use irc parameter's connection
      samples: net: irc_bot: dont hardcode NET_SYS_LOG_LEVEL
      samples: net: irc_bot: modify disco check in on_context_recv()
      samples: net: irc_bot: create semi-unique IRC user names
      samples: net: irc_bot: handle messages across multiple fragments
      samples: net: irc_bot: add Linaro copyright
      samples: net: irc_bot: add FRDM K64F project .conf
      samples: net: irc_bot: add IPv4 support
      samples: net: irc_bot: add DNS support
      samples: net: irc_bot: add DHCPv4 support
      net: tcp: Only return -ETIMEDOUT if timeout!=0 in connect

Paul Sokolovsky (1):
      net: echo_server: Enable TCP for frdm_k64f

Ravi kumar Veeramally (5):
      net: tests: Add unit tests for net_addr_pton() utils function
      net: utils: Add net_addr_ntop() helper function
      net: tests: Add unit tests for net_addr_ntop() utils function
      net: context: Skip reserved ports
      net: context: Assign a random port number when context is created

Sergio Rodriguez (1):
      driver: ethernet: Fix typo on enc28j60 driver Kconfig

Tomasz Bursztyka (10):
      samples/net: Fix a tiny mistake in dhcpv4_client README.rst
      samples/net: Add a simple telnet sample
      doc: Include main Network APIs doxygen documentation
      doc/api/networking: Add existing network protocol libraries APIs
      net/ieee802154: Set IEEE extended address whatever runtime mode it is
      net/ieee802154: Setting short address is about local node
      net/ieee802154/mgmt: Add getters/setters for various radio network info
      net/ieee802154/shell: Add commands to set/get radio network info
      net/ieee802154: Fixing active scan buffer reference counting
      net/ipv6: Updating ll reserve should be done for all IPv6 packet.

Vinicius Costa Gomes (5):
      samples/zoap_server: Enable support for 802.15.4
      samples/zoap_server: Allow overriding the BOARD variable
      samples/zoap_server: Add a 802.15.4 case to the test suite
      iot/zoap: Fix the return value of zoap_packet_get_payload()
      samples/zoap_server: Fix errors for GET requests without payloads

 .known-issues/doc/networking.conf                |  49 ++
 doc/api/api.rst                                  |   1 +
 doc/api/networking.rst                           |  66 ++
 doc/subsystems/networking/ip-stack-migrate.rst   |  61 ++
 doc/subsystems/networking/networking.rst         |  61 +-
 doc/subsystems/networking/overview.rst           |  58 ++
 doc/subsystems/networking/qemu_setup.rst         | 158 ++++
 drivers/ethernet/Kconfig.enc28j60                |   2 +-
 include/net/dhcpv4.h                             |  10 +
 include/net/dns_client.h                         |  10 +
 include/net/ieee802154.h                         |  33 +-
 include/net/mqtt.h                               |  74 +-
 include/net/mqtt_types.h                         |  10 +
 include/net/net_context.h                        |  79 +-
 include/net/net_if.h                             |  20 +
 include/net/net_ip.h                             |  28 +-
 include/net/net_mgmt.h                           |  11 +
 include/net/net_stats.h                          |  17 +
 include/net/zoap.h                               |  15 +-
 include/net/zoap_link_format.h                   |  10 +
 samples/bluetooth/ipsp/prj.conf                  |   1 +
 samples/bluetooth/ipsp/src/main.c                |   2 +-
 samples/net/coaps_client/README.rst              |   4 -
 samples/net/coaps_client/src/udp.c               |   2 +-
 samples/net/coaps_server/README.rst              |   1 -
 samples/net/coaps_server/src/coaps_server.c      |   2 +-
 samples/net/dhcpv4_client/README.rst             |  19 +-
 samples/net/dns_client/README.rst                |  44 +-
 samples/net/dns_client/prj_arduino_101.conf      |  11 +-
 samples/net/dns_client/prj_frdm_k64f.conf        |  10 +-
 samples/net/dns_client/prj_qemu_x86.conf         |  10 +-
 samples/net/dns_client/src/config.h              |  29 +-
 samples/net/dns_client/src/main.c                | 170 ++--
 samples/net/dns_client/testcase.ini              |   2 +-
 samples/net/echo_client/src/echo-client.c        |   8 +-
 samples/net/echo_server/prj_bt.conf              |   1 +
 samples/net/echo_server/prj_frdm_k64f.conf       |   1 +
 samples/net/echo_server/src/echo-server.c        |   4 +-
 samples/net/http_server/Makefile                 |  13 +
 samples/net/http_server/README.rst               | 232 ++++++
 samples/net/http_server/prj_frdm_k64f.conf       |  29 +
 samples/net/http_server/src/Makefile             |  10 +
 samples/net/http_server/src/config.h             |  28 +
 samples/net/http_server/src/http_server.c        | 409 ++++++++++
 samples/net/http_server/src/http_server.h        |  51 ++
 samples/net/http_server/src/http_types.h         |  98 +++
 samples/net/http_server/src/http_utils.c         |  51 ++
 samples/net/http_server/src/http_utils.h         |  18 +
 samples/net/http_server/src/http_write_utils.c   | 183 +++++
 samples/net/http_server/src/http_write_utils.h   |  63 ++
 samples/net/http_server/src/main.c               | 142 ++++
 samples/net/http_server/testcase.ini             |   4 +
 samples/net/irc_bot/Makefile                     |  24 +
 samples/net/irc_bot/prj_frdm_k64f.conf           |  36 +
 samples/net/irc_bot/prj_qemu_x86.conf            |  33 +
 samples/net/irc_bot/src/Makefile                 |   1 +
 samples/net/irc_bot/src/irc-bot.c                | 940 +++++++++++++++++++++++
 samples/net/mbedtls_dtlsclient/README.rst        |   4 -
 samples/net/mbedtls_dtlsclient/src/dtls_client.c |   4 +-
 samples/net/mbedtls_dtlsclient/src/udp.c         |   4 +-
 samples/net/mbedtls_dtlsserver/README.rst        |   1 -
 samples/net/mbedtls_dtlsserver/src/dtls_server.c |   4 +-
 samples/net/mqtt_publisher/Makefile              |  14 +
 samples/net/mqtt_publisher/README.rst            | 236 ++++++
 samples/net/mqtt_publisher/prj_frdm_k64f.conf    |  36 +
 samples/net/mqtt_publisher/src/Makefile          |   8 +
 samples/net/mqtt_publisher/src/config.h          |  37 +
 samples/net/mqtt_publisher/src/main.c            | 410 ++++++++++
 samples/net/mqtt_publisher/testcase.ini          |   4 +
 samples/net/net.rst                              |   1 -
 samples/net/qemu_setup.rst                       |  31 -
 samples/net/telnet/Makefile                      |  14 +
 samples/net/telnet/README.rst                    | 137 ++++
 samples/net/telnet/prj_frdm_k64f.conf            |  44 ++
 samples/net/telnet/prj_qemu_x86.conf             |  43 ++
 samples/net/telnet/prj_qemu_x86_iamcu.conf       |  43 ++
 samples/net/telnet/src/Makefile                  |   2 +
 samples/net/telnet/src/telnet.c                  | 150 ++++
 samples/net/telnet/testcase.ini                  |   5 +
 samples/net/zoap_client/prj_bt.conf              |   1 +
 samples/net/zoap_server/Makefile                 |   2 +-
 samples/net/zoap_server/README.rst               |   7 +
 samples/net/zoap_server/prj_bt.conf              |   1 +
 samples/net/zoap_server/prj_cc2520.conf          |  15 +
 samples/net/zoap_server/src/zoap-server.c        |  30 +-
 samples/net/zoap_server/testcase.ini             |   6 +
 samples/net/zperf/README.rst                     |  38 +-
 samples/net/zperf/prj_bt.conf                    |   1 +
 samples/net/zperf/prj_frdm_k64f.conf             |   2 +-
 samples/net/zperf/src/zperf.h                    |   1 +
 samples/net/zperf/src/zperf_internal.h           |   1 +
 samples/net/zperf/src/zperf_shell.c              | 141 +++-
 samples/net/zperf/src/zperf_tcp_receiver.c       | 282 +++++--
 samples/net/zperf/src/zperf_tcp_uploader.c       |  89 ++-
 samples/net/zperf/src/zperf_udp_uploader.c       |  28 +-
 subsys/net/ip/Kconfig                            |  14 +-
 subsys/net/ip/ipv6.c                             | 106 ++-
 subsys/net/ip/l2/Kconfig                         |  11 +
 subsys/net/ip/l2/bluetooth.c                     |  41 +-
 subsys/net/ip/l2/ethernet.c                      |  63 +-
 subsys/net/ip/l2/ieee802154/ieee802154.c         |  24 +-
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.c    |  80 +-
 subsys/net/ip/l2/ieee802154/ieee802154_shell.c   | 101 +++
 subsys/net/ip/nbuf.c                             |  19 +-
 subsys/net/ip/net_context.c                      | 467 +++++------
 subsys/net/ip/net_core.c                         |  12 +-
 subsys/net/ip/net_if.c                           |  45 +-
 subsys/net/ip/net_private.h                      |  25 +-
 subsys/net/ip/net_shell.c                        |  11 +-
 subsys/net/ip/net_stats.c                        |  11 +-
 subsys/net/ip/net_stats.h                        |  12 +
 subsys/net/ip/tcp.c                              |  65 +-
 subsys/net/ip/tcp.h                              |  11 +-
 subsys/net/ip/utils.c                            |  44 +-
 subsys/net/lib/mqtt/mqtt.c                       |  53 +-
 subsys/net/lib/zoap/zoap.c                       |   7 +-
 tests/net/iface/Makefile                         |   4 +
 tests/net/iface/prj.conf                         |  22 +
 tests/net/iface/src/Makefile                     |   4 +
 tests/net/iface/src/main.c                       | 376 +++++++++
 tests/net/iface/testcase.ini                     |   4 +
 tests/net/nbuf/src/main.c                        | 172 +++++
 tests/net/rpl/src/main.c                         |  18 +-
 tests/net/utils/src/main.c                       | 377 ++++++++-
 124 files changed, 6560 insertions(+), 975 deletions(-)
 create mode 100644 .known-issues/doc/networking.conf
 create mode 100644 doc/api/networking.rst
 create mode 100644 doc/subsystems/networking/ip-stack-migrate.rst
 create mode 100644 doc/subsystems/networking/overview.rst
 create mode 100644 doc/subsystems/networking/qemu_setup.rst
 create mode 100644 samples/net/http_server/Makefile
 create mode 100644 samples/net/http_server/README.rst
 create mode 100644 samples/net/http_server/prj_frdm_k64f.conf
 create mode 100644 samples/net/http_server/src/Makefile
 create mode 100644 samples/net/http_server/src/config.h
 create mode 100644 samples/net/http_server/src/http_server.c
 create mode 100644 samples/net/http_server/src/http_server.h
 create mode 100644 samples/net/http_server/src/http_types.h
 create mode 100644 samples/net/http_server/src/http_utils.c
 create mode 100644 samples/net/http_server/src/http_utils.h
 create mode 100644 samples/net/http_server/src/http_write_utils.c
 create mode 100644 samples/net/http_server/src/http_write_utils.h
 create mode 100644 samples/net/http_server/src/main.c
 create mode 100644 samples/net/http_server/testcase.ini
 create mode 100644 samples/net/irc_bot/Makefile
 create mode 100644 samples/net/irc_bot/prj_frdm_k64f.conf
 create mode 100644 samples/net/irc_bot/prj_qemu_x86.conf
 create mode 100644 samples/net/irc_bot/src/Makefile
 create mode 100644 samples/net/irc_bot/src/irc-bot.c
 create mode 100644 samples/net/mqtt_publisher/Makefile
 create mode 100644 samples/net/mqtt_publisher/README.rst
 create mode 100644 samples/net/mqtt_publisher/prj_frdm_k64f.conf
 create mode 100644 samples/net/mqtt_publisher/src/Makefile
 create mode 100644 samples/net/mqtt_publisher/src/config.h
 create mode 100644 samples/net/mqtt_publisher/src/main.c
 create mode 100644 samples/net/mqtt_publisher/testcase.ini
 delete mode 100644 samples/net/qemu_setup.rst
 create mode 100644 samples/net/telnet/Makefile
 create mode 100644 samples/net/telnet/README.rst
 create mode 100644 samples/net/telnet/prj_frdm_k64f.conf
 create mode 100644 samples/net/telnet/prj_qemu_x86.conf
 create mode 100644 samples/net/telnet/prj_qemu_x86_iamcu.conf
 create mode 100644 samples/net/telnet/src/Makefile
 create mode 100644 samples/net/telnet/src/telnet.c
 create mode 100644 samples/net/telnet/testcase.ini
 create mode 100644 samples/net/zoap_server/prj_cc2520.conf
 create mode 100644 tests/net/iface/Makefile
 create mode 100644 tests/net/iface/prj.conf
 create mode 100644 tests/net/iface/src/Makefile
 create mode 100644 tests/net/iface/src/main.c
 create mode 100644 tests/net/iface/testcase.ini

Change-Id: Ie477c0aed33d281319afa27c10ec7d42a84346b8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 16:13:42 +02:00
Tomasz Bursztyka 93ed88a670 net/ipv6: Updating ll reserve should be done for all IPv6 packet.
Doing it only in net_context, prevented to do it once NS succesfully
finished. This generated an error in 15.4, where pending data had wrong
ll reserve size.

Change-Id: I0f917fb76171457e5dff2c29e44edb8f00662150
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-03 15:59:20 +02:00
Jukka Rissanen 2612b04d80 samples: net: zperf: Set the proper UDP payload
Use a static buffer for sending UDP payload instead of reading
values from memory.

Change-Id: I037db5cd9b8784966d481c36e8cbe92d19760475
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:20 +02:00
Jukka Rissanen 517fb19586 samples: net: zperf: Fix compiler warnings
Compiler was giving "Unused variables" warnings if IPv6 was
enabled and IPv4 was not, and vice versa.

Change-Id: I3b17534bb8bdef207512ea5b618e138edb420871
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:20 +02:00
Jukka Rissanen 47685ef71f samples: net: zperf: Fix udp.upload command
The IP address and port number were incorrectly parsed if
user used udp.upload command.

Change-Id: Ib37d481012af5e186a1e342c92d10ddef9fe35b1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:20 +02:00
Jukka Rissanen 1ec6038c48 samples: net: zperf: Initialize address family properly
The IP address family was not set correctly when setting up
the connection. This lead to connectivity error in udp.upload
command.

Change-Id: I598ff2675f97e10e2033763a497f7583c94f3840
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:20 +02:00
Jukka Rissanen 1301d3f6d3 net: ipv6: Use the nexthop when sending the packet
We must use the nexthop instead of destination address
when sending the packet. The current code mixed destination
and nexthop addresses and ignored the nexthop when sending
neighbor solicitation message.

Change-Id: I53887c16ef6fcf8365f1f47ab5792cb208dd273e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:20 +02:00
Flavio Santes 53e9245b33 samples/net/http: Add the HTTP server sample application
Add the HTTP server sample application on top of the
HTTP Parser Library.

This sample application is based on TCP and HTTP chunk
transfer code found at:

https://gerrit.zephyrproject.org/r/#/c/9977/

A README file with sample output and a detailed
description of this application is also provided.

Jira: ZEP-820
Jira: ZEP-1542
Jira: ZEP-1556

Change-Id: I649104a256190577000bbac118136d5bc21f83bf
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-03 15:59:20 +02:00
Jukka Rissanen 6930f93fd3 net: stats: Collect bytes sent and received
Keep track of amount of bytes that are sent or received from
all network interfaces.

Change-Id: I706481aab1a7e0cf2bc78d032f2ef4ebbabe3184
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:20 +02:00
Ravi kumar Veeramally df201a0e4b net: context: Assign a random port number when context is created
Current behaviour has an issue when UDP context is created with local
port number 0, net_conn_input() happens to treat zero port as
a wildcard ("receive packets for all ports"). net_context_bind()
for a UDP context doesn't affect its existing connection in any way.

Proposed solution is, context should be created with a random free
port assigned and bind() updates connection information from context.

Jira: ZEP-1644

Change-Id: Idb3592b58c831d986763312077b0dcdd95850bc9
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-03 15:59:20 +02:00
Ravi kumar Veeramally f6c8b0b89a net: context: Skip reserved ports
The port numbers in the range from 0 to 1023 are the well-known ports
or system ports. Do not allocate them for users.

Change-Id: I4d7b4e1314759e4d8b260669946b9880282642c0
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-03 15:59:20 +02:00
Tomasz Bursztyka 3aa6b21c07 net/ieee802154: Fixing active scan buffer reference counting
Commit-ID 83ed3a29be changed the way
fragments are managed after being sent, and this brought a bug in the
active scan logic. Up to active scan to keep the buffer referenced
relevantly now, which is simpler than it used to be.

Reported-by: Johann Fischer <j.fischer@phytec.de>

Change-Id: I23db4bab878328b1ca3cb313e737de819177c281
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-03 15:59:20 +02:00
Luiz Augusto von Dentz e89aebc4d5 net: samples: Add CONFIG_NET_L2_BLUETOOTH_ZEP1656
This enables these samples to interoperate with Linux 6LoWPAN over
Bluetooth implementation while that is being fixed, in the long term
we might remove it from the samples once Linux is fixed.

Jira: ZEP-1656

Change-Id: I8ca9fe5a27f43cebc75b6fe5a436a5e8fcee26d5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-02-03 15:59:20 +02:00
Luiz Augusto von Dentz affcac5a2d net: bt: Add Kconfig to interoperate with Linux
This adds a NET_L2_BLUETOOTH_ZEP1656 which sets NET_IF_POINTOPOINT to
avoid using nbr cache with Linux peers as they send wrong link
addresses.

Jira: ZEP-1656

Change-Id: I842f4cbb99ae9d9c004494739c07189c191929fe
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-02-03 15:59:19 +02:00
Luiz Augusto von Dentz 2c1bef4d09 net: Introduce NET_IF_POINTOPOINT flag
This flag can be used by driver to indicate pointopoint links which should
not require destination link address to be resolved.

Jira: ZEP-1656

Change-Id: I58dd3bf48485d6203e75373497e00668317b9825
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-02-03 15:59:19 +02:00
Flavio Santes 20bf36601b samples/net/dns: Update README file
The DNS client sample application was updated to use IP addresses
from the prj_*.conf files. This patch updates the README file to
reflect those changes.

Change-Id: Ic72510be8da208aef19fb188560221e1c2386457
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-03 15:59:19 +02:00
Anas Nashif 3c8000cca5 doc: net: restructure networking documentation
Change-Id: Ic5dd009f0e890fa152e92e6c96b6a76b4a3df5a9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-03 15:59:19 +02:00
Anas Nashif 9051e1ab1d doc: net: use Qemu setup section in current documentation
Fix references to Qemu section and references to boards.

Change-Id: Ib2174ff698d57d3272073eecc71209e047961aaa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-03 15:59:19 +02:00
Anas Nashif f75462984f doc: update networking with Qemu section
Copy the documentation from the Wiki over here, the cross linking
between online documentation and Wiki and duplication of information was
inconsistent and confusing. Put everything in one place.

Change-Id: Ia3aaec1b431477e2ec54dbec2ccaa655870b0ee3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-03 15:59:19 +02:00
Jukka Rissanen 16d8f59c83 net: nbuf: Do no use timeout if called from isr
The net_nbuf_get*() functions were calling net_buf_alloc()
with K_FOREVER. This can cause issue if called from isr
context. The fix is to check if we are in isr and then try
to alloc net_buf with K_NO_WAIT.

Change-Id: I809170f2cd059480d436763e19a35386d9bdf048
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:19 +02:00
Vinicius Costa Gomes 88405fcd17 samples/zoap_server: Fix errors for GET requests without payloads
It doesn't really make sense for GET requests to have payloads, we
shouldn't even be checking if they have any payloads.

Change-Id: I4bb8cccd6c733a5825c2ca5067a990937c7045a6
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-03 15:59:19 +02:00
Vinicius Costa Gomes 2d852f47d2 iot/zoap: Fix the return value of zoap_packet_get_payload()
The returning 'len' was always informing the remaining available space
in that net_buf fragment. This not the expected behaviour for
incoming packets, in this case, we really want the size for the
payload already present in the packet.

When this function is called with a packet without a payload, with
will return the available space in the packet, when the payload is
already set, it will return the size of that payload.

Change-Id: Ia4643b8c2a015ad2316bed037e457b186e420b19
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-03 15:59:19 +02:00
Tomasz Bursztyka 55751eed47 net/ieee802154/shell: Add commands to set/get radio network info
Channel, PAN-ID, short and extended address

Change-Id: Icdf94dff6f59cd155a072a609290197b37bd084c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-03 15:59:19 +02:00
Tomasz Bursztyka f2872e60ad net/ieee802154/mgmt: Add getters/setters for various radio network info
Channel, pan-id, short and extended addresses.

Change-Id: Ib63dadac37d649df3efc8fdd67f5312d3a7c8e20
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-03 15:59:19 +02:00
Tomasz Bursztyka 2e5de5b44c net/ieee802154: Setting short address is about local node
Fix setting short address through net mgmt API. It's not about
coordinator's short address, but local one.

Change-Id: I320143e40d336a1085bf12b17a88a2c35da83504
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-03 15:59:19 +02:00
Tomasz Bursztyka 8d7eb6ed2b net/ieee802154: Set IEEE extended address whatever runtime mode it is
ORFD or RFD does not matter: the extended address should be set
according to device's MAC address.

Change-Id: I39d09c3a953283eeaa30b908ea159638604bd72b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-03 15:59:18 +02:00
Jukka Rissanen cc8eb4144b tests: net: Add tests for network interface
Change-Id: I35f0b3f1794c65b08d32ca561b6189ee59a7a76c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03 15:59:18 +02:00
Flavio Santes 76785f0bcd samples/net/dns: Improve network configuration
- Reorganize some CONF variables and add the CONFIG_NET_SAMPLES_xxx
  variables to the DNS sample application.
- Remove all the numeric IP addresses
- Use the CONFIG_NET_SAMPLES_xxx variables to define the IP addresses

Change-Id: Ib294d338f163f03ea1b47143b489d916578c532d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-03 15:59:18 +02:00
Flavio Santes 3a05189284 samples/net/dns: Move conf variables to config.h and delete unused defines
- Move the MAX_ADDRESSES macro to config.h.
  Document the meaning and usage of this macro

- Delete unused defines

Change-Id: I035feb605611e564db15cba77d6a3dce8409ca18
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-03 15:59:18 +02:00
Flavio Santes 660b0324e0 samples/net/dns: Add the FRDM_K64F board to the testcase.ini file
Add the FRDM_K64F board to the DNS sample app testcase.ini

Change-Id: Iea8f7d09ed0d793711a5807f4bb67ed35ebf52c1
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-03 15:59:18 +02:00