Commit graph

41120 commits

Author SHA1 Message Date
Arkadiusz Lichwa
178482fdb1 Bluetooth: SDP: Add API to get SupportedFeature attribute
Adds API to allow user get SupportedFeatures attribute ID.

Jira: ZEP-1112

Change-Id: I91a1bf548d99c5c7cc75682aed19e89390350533
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2017-02-05 22:39:25 +02:00
Arkadiusz Lichwa
4f8641990c Bluetooth: shell: Add getting ProfileDescriptorList attribute
Makes use ProfileDescriptorList atribute API to get remote Hands-Free
profile version.

Jira: ZEP-1112

Change-Id: I3752691057e15c3a9a681dd3277ac160096792e9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2017-02-05 22:39:25 +02:00
Arkadiusz Lichwa
a7e4eaafaa Bluetooth: SDP: Add API to get ProfileDescriptorList attribute
Adds API enabling retrieve remote profile version.

Jira: ZEP-1112

Change-Id: I9b1a9a15848d5c485ec3dd2b405a6d51ce9b020e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2017-02-05 22:39:25 +02:00
Arkadiusz Lichwa
75421e0f53 Bluetooth: uuid: Fix assigned UDP uuid value
Change-Id: Ia004e77af064d24f5d5de7ab02d4bedaeb0bb079
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2017-02-05 22:39:25 +02:00
Arkadiusz Lichwa
7577a4ff7c Bluetooth: shell: Add SDP client support
Adds pool memory for storing SDP client query results and introduces
command allowing add HFPAG UUID to be resolved when connection to peer
is already set. When resolved data arrives, UUID callback handler
tries to identify RFCOMM protocol specific information, in this case
remote HFPAG Server Channel Number, stored in Protocol's Descriptor List
attribute data.

> HCI Event: Number of Completed Packets (0x13) plen
        Num handles: 1
        Handle: 77
        Count: 1
> ACL Data RX: Handle 77 flags 0x02 dlen 55
      Channel: 64 len 51 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Response (0x07) tid 2 len 46
        Attribute bytes: 43
        Continuation state: 0
        Combined attribute bytes: 96
          Attribute list: [len 91] {position 0}
            Attribute: Service Record Handle (0x0000) [len 2]
              0x00010003
            Attribute: Service Class ID List (0x0001) [len 2]
              UUID (3) with 2 bytes [0 extra bits] len 3
                Handsfree Audio Gateway (0x111f)
              UUID (3) with 2 bytes [0 extra bits] len 3
                Generic Audio (0x1203)
            Attribute: Protocol Descriptor List (0x0004) [len 2]
              Sequence (6) with 3 bytes [8 extra bits] len 5
                UUID (3) with 2 bytes [0 extra bits] len 3
                  L2CAP (0x0100)
              Sequence (6) with 5 bytes [8 extra bits] len 7
                UUID (3) with 2 bytes [0 extra bits] len 3
                  RFCOMM (0x0003)
                Unsigned Integer (1) with 1 byte [0 extra bits] len 2
                  0x03
            Attribute: Browse Group List (0x0005) [len 2]
              UUID (3) with 2 bytes [0 extra bits] len 3
                Public Browse Root (0x1002)
            Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
              Sequence (6) with 6 bytes [8 extra bits] len 8
                UUID (3) with 2 bytes [0 extra bits] len 3
                  Handsfree (0x111e)
                Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                  0x0106
            Attribute: Unknown (0x0100) [len 2]
              Handsfree Gateway [len 18]
            Attribute: Unknown (0x0301) [len 2]
              0x01
            Attribute: Unknown (0x0311) [len 2]
              0x0027
< ACL Data TX: Handle 77 flags 0x00 dlen 12
      L2CAP: Disconnection Request (0x06) ident 5 len 4
        Destination CID: 64
        Source CID: 64
> HCI Event: Number of Completed Packets (0x13) plen 5
        Num handles: 1
        Handle: 77
        Count: 1
> ACL Data RX: Handle 77 flags 0x02 dlen 12
      L2CAP: Disconnection Response (0x07) ident 5 len 4
        Destination CID: 64
        Source CID: 64

Jira: ZEP-1112

Change-Id: Ibda606fabe367ca3d0353f77c7093da8c4f175c8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2017-02-05 22:39:25 +02:00
Arkadiusz Lichwa
15520c5ce9 Bluetooth: SDP: Get ProtocolDescriptorList attribute internals
Adds API to get available specific information included in protocols UUID
tree during parsing Protocol Descriptor List attribute. Usually it's to
be remote Server Channel/PSM number operating on applicable protocol.
There're a few helper functions added to be able parse and retrieve such
information from raw record data.

Jira: ZEP-1112

Change-Id: I736a780b95ba54821d36e6011b739f5ff37cd64f
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2017-02-05 22:39:25 +02:00
Johan Hedberg
e5305f1ab5 Bluetooth: Fix using correct variable type for interrupt mask
The irq_lock() API returnes unsigned int.

Change-Id: I12d2e980dca621d44ac9776e2961f504cb747c94
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-05 22:39:25 +02:00
Johan Hedberg
54e34f4431 Bluetooth: Fix checking for invalid public address
Both all-zeroes and all-ones addresses are invalid. Fix the check for
this so that we fall back to a static random identity address when
needed.

Change-Id: I17cf903e0f3ed321311d86d09bed19343c2c801a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-05 22:39:25 +02:00
Jaganath Kanakkassery
43a5810793 Bluetooth: RFCOMM: Use common tx pool for control packets
This will reduce memory consumption by 23 bytes per session.

Change-Id: I1831b59881eaefb68f93c30e298b8f97d63c7428
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2017-02-05 22:39:25 +02:00
Jaganath Kanakkassery
c5bb728d66 Bluetooth: RFCOMM: Fix session timer during acl disc
Session idle timer should not be started in dlc destroy if
session is already disconnected (which can happen in scenarios
like acl disconnection where in dlc is detached from session and
destroy will be called from tx thread) otherwise timer function will
get invoked for a disconnected session.

This patch moves starting of idle timer from dlc destroy to
the point dlc disconnect is recieved from remote since idle
timer is to handle only that scenario.

Change-Id: I94501515a182ff0e2348ba4e2df63100f2f52209
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2017-02-05 22:39:25 +02:00
Carles Cufi
2093c1ccf0 Bluetooth: hci_core: Use nRF5x FICR address
The nRF5x come preprogrammed from manufacturing with either a public or
random static BLE address in the FICR register. Use the random static
one when present instead of generating one during Bluetooth
initialization.

Change-id: Ic733cb926e0414e56d6f8be65b033692e914b72a
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-02-05 22:39:25 +02:00
Johan Hedberg
f23acadffe Bluetooth: Fix trivial coding style issue
Change-Id: I8a50fb6fe46d7a7deb6538f6a23bf5e58db2d52d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-05 22:39:25 +02:00
Baohong Liu
fd74c0c5a6 samples: bmi160: reduce polling mode sampling frequency
Reduce the accelerometer sampling frequency for polling mode.
So, cpu has more time to fetch the sample.

Also add some waiting time for the new frequency setting to
take effect.

Jira: ZEP-1532

Change-Id: If5c1d8a2b5f30b232a212f2775306ca397b9f80c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04 20:08:16 +00:00
Baohong Liu
a96ec2351d ext: qmsi: fix an incomplete type issue
Incomplete type is not acceptable to LLVM. Let's use
pointer instead.

Jira: ZEP-1179

Change-Id: Ie6324b2e5076ae2b378fa270d0d9fdcbf29bf8ce
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 20:08:07 +00:00
Baohong Liu
42af60328d samples: spi_flash: remove an unnecessary config symbol
Remove CONFIG_GPIO from the prj config file. It is redundant.

Change-Id: Ife4301e7ce480a9002cadcddfd5eaa569900a391
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:45:44 +00:00
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