Commit Graph

43 Commits

Author SHA1 Message Date
Genaro Saucedo Tejada 4dc8078435 fix: net samples no longer include unneeded 802.15.4 files
Some samples were including nullsec.c, simplerdc.c and
framer-nullmac.c, those files are not needed but introduce some
symbol dependencies, causing link to fail when optimization is not
-Os, e.g. when compiling with CONFIG_DEBUG.

Change-Id: Id227470a4517e8e2c3b9af942b0893783075cd40
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-09-12 12:29:09 +00:00
Jukka Rissanen 33d92af1cf net: Initial trickle algorithm support for legacy IP stack
This commit only provides the Trickle algorithm support.
Some other entity must call its functions in order to be
useful.

Fixes: ZEP-627

Change-Id: Ice1fcfe9c57269309eeab06eab000622662e2929
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-09-12 02:00:12 +00:00
Ravi kumar Veeramally 0de956d53f net: dhcp: Add DHCP client support.
DHCP client support provided for IPv4 over ethernet.

Change-Id: Ia89bc4123842cf109813b80a90b70cf50cc52e0a
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-05-27 11:09:30 +00:00
Flavio Santes feb131fd6c net/ip: Fix Makefile typo
Change "Zypher" by "Zephyr".

Change-Id: Ifc10da5cb0de7904096a5c231b200cb3d495c587
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-11 21:18:56 +00:00
Jukka Rissanen ad2e661569 net: Enable TCP support
User can enable TCP server (listening socket) support in the
IP stack. This commit does not yet have TCP client (connecting
socket) support.

Change-Id: I75dd02a81addc1d1e026463b53631d56378157df
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-04-25 09:40:32 +03:00
Tomasz Bursztyka 8475956600 net: rdc: Make simplerdc a full replacement against nullrdc
Removing nullrdc altogether.

Change-Id: Ic8e73c57c3d469a3ca70a60fe10f5e2aed0ca118
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-18 07:40:56 +00:00
Tomasz Bursztyka 62fd66e240 net: ieee802154: Add a simpler but working default RDC driver
The legacy nullrdc driver is not meant to be power efficient, and
supports requesting ACK on all packets. However, it's logic was based on
former Radio API which let it to read packet synchronously. That's not
working anymore as the new cc2520 driver does not support any
synchronous packet reception.
Thus a new driver, simplerdc, is provided. It supports the same features
as nullrdc, is of course not power efficient and fits properly with
the new driver.

- simplerdc is selected by default.
- to enable ack request on all packet, Kconfig proposes a
  NETWORKING_WITH_15_4_ALWAYS_ACK option.
- simplerdc retransmissions is set to 3, as for nullrdc

Change-Id: I53880fcce5ce00f53831eaeb15d51329121314ec
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-18 07:40:55 +00:00
Jukka Rissanen 5cef4d13eb net: 802.15.4: User can select desired RDC plugin
User is able to use either sicslowmac or nullrdc plugin for
RDC (Radio Duty Cycle) layer. Default is sicslowmac.

Change-Id: I51f72f0d5de67a271178b51f29644bea39ffa19f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-16 15:25:35 +00:00
Vlad Lungu 20a4720b93 net: 802.15.4: Make MAC driver configurable, select nullmac as default
csma MAC driver queues outgoing frames, returning an OK status code immediately.
This defeats logic in sicslowpan fragmentation driver that drops remaining fragments
on send failure. The result is packets reported as sent successfully when they were
not, fragments sent that cannot be reassembled by receiver, packets dropped before
the first fragment even reached the radio driver.

nullmac MAC driver sends frames synchronously, resulting in sicslowpan driver working
as intended.

The MAC driver used by 802.15.4 is selectable now, nullmac is default but csma can be
used instead.

Change-Id: I261d551421a8f55634acb1c528f8f82bea49332d
Signed-off-by: Vlad Lungu <vlad.lungu@windriver.com>
2016-03-11 07:32:13 +00:00
Anas Nashif f6f81868f8 build: Remove PROJECTINCLUDE from application makefiles
PROJECTINCLUDE is not required in app makefiles.

Change-Id: I3751b7c51c453dfe47d207bb11d171138668c4e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Jukka Rissanen 64662703af net: Network driver for Bluetooth 6LoWPAN connections
This driver handles IPv6 traffic over Bluetooth LE connection.
The packet fragmentation is done inside BT stack, so this
driver only calls compression function.

Change-Id: Ib7f2356a1e88e78502239e54ef6e41f1f24ccd67
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:24:59 -05:00
Jukka Rissanen 20886743f6 net: 802.15.4: Add beacon support selection to Kconfig
User can select whether the beacon support is activated or not.

Change-Id: I8fd22af73cfca0dd4f2182bf98bc4b3571ac1f8f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:51 -05:00
Jukka Rissanen cc88aa3918 net: Rename net_init.c to net_core.c
As the file contains networking core routines and not just
init functions, the file is renamed.

Change-Id: Id633bae49296dfb4b14f1dd3a5064059f0418475
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:47 -05:00
Jukka Rissanen 0179583391 net: Fix the include paths in Contiki sources
Fix the include paths in Contiki sources so that we do not
have to create links to include directories during compilation.

Change-Id: I9316f1e90474e0ee563557deadd0bdc321cbb0fa
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:46 -05:00
Jukka Rissanen 31e5fccf30 net: Enable L2 buffers only when 802.15.4 is enabled
Because the L2 buffers are only used by 802.15.4 sub-system,
we must not compile and link them to the kernel.

Change-Id: Iab0352582ac1c57e0dd8f54ca8e757e47e4df3be
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:46 -05:00
Jukka Rissanen 2272312b8d net: Refactor code to use new generic net_buf API
Change-Id: Id008bbf43062ca0641a76edaabef47c650287444
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:46 -05:00
Michael LeMay 0927378a59 net: Add Ethernet support to the network stack
This patch adds support for Ethernet to the network stack, which
entails relying on the Ethernet device driver to set the MAC address,
invoking ARP routines at the appropriate points, configuring the
Contiki network stack to use the appropriate link-level header length,
etc.

Change-Id: I153a6f4c83c28ca7129ef5affa1e9a18b0f92913
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
2016-02-05 20:24:38 -05:00
Ravi kumar Veeramally 70681f6119 net: Change EXTRA_CFLAGS to ccflags-y
Sanitycheck script unable to find EXTRA_CFLAGS label.

Change-Id: Ic15a70dd385a555b443709d56a7e9a3af1c289cc
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:24:37 -05:00
Jukka Rissanen ea0d712ee1 net: Compile 6lowmac layer only if 6lowpan is enabled
No need to compile sicslowmac.c if we do not have 6lowpan.

Change-Id: I8624089f4b360fb12ef1c4a6d7104f0b190f048c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:26 -05:00
Jukka Rissanen 0ddb10f155 net: rpl: User can configure used objective function
User needs to be able to configure used OF as all RPL nodes
in DODAG need to use the same OF. Default OF is MRHOF RFC 6719.
Other alternative is OF0 RFC 6552.

Change-Id: I6d135a6a2c6880a919993e29b0985d4c686b8a9d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:25 -05:00
Jukka Rissanen ae97505279 net: contiki: If we do not have 802.15.4 then use nullrdc driver
For RDC (Radio Duty Cycling) we activate nullrdc driver
if 802.15.4 is not used.

Change-Id: I793b84ee8e81cdbc8315758f1b83f7ad3bd7555a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:24 -05:00
Jukka Rissanen 6ed897f907 net: coap: Initial client support
Adding CoAP client support to Kconfig and Makefile.

Change-Id: I857169feac8b6c4347af4369b0cdfb806c6aedb0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:39 -05:00
Jukka Rissanen 20b9a6f845 net: coap: Activate Erbium CoAP support
Add CoAP switches to Kconfig and enable them in Makefile.

Change-Id: I3d5e18f34c0ab0853838c2e883748dd4ae62aed2
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:39 -05:00
Jukka Rissanen a895e38ad2 net: Add tinyDTLS support activation
User is able to enable tinyDTLS support via Makefile.

Change-Id: I383bf69756fe3540b63bcd5793e2a1a31231d6b1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:23 -05:00
Jukka Rissanen 0dc19ba88a net: Allow network buffer tweaking from Kconfig
User is able to tweak the number of network buffers via
Kconfig file. Default value of network buffers is 2.
Each buffer will occupy 1280 bytes and can either hold
received or sent IPv6 or IPv4 packet.

Change-Id: I81c099bc5d97972ec9cc1cae775f891f8b8f887c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:15:22 -05:00
Ravi kumar Veeramally de67ecb58b net: 15.4: Add support for data Tx/Rx between two qemus
Add support for 802.15.4 dummy radio driver to send frames
through qemu uart and and receive frames through uart. So
two qemus can send and receive 802.15.4 frames.

Change-Id: I325281d04234f7ec07c66bf31691c18a9d7c4d93
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:14:40 -05:00
Jukka Rissanen e6020d1701 net: uip: Initial IPv4 support
Enabling IPv4 support and modifying code so that it compiles ok.

Change-Id: I605cd94adfda7675be2f2cf798588c69eb1f152e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:35 -05:00
Jukka Rissanen 3e4d890d72 net: slip: Add slip driver for testing purposes
This slip driver is needed for sending packets outside of qemu.

Change-Id: Ifc37181094ddebce08d97ae889f3a58c03d01ae1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:34 -05:00
Jukka Rissanen 540980e243 net: ip: Makefile re-structuring
Set the compiled files unambiguously so that we are always able
to see what object files are compiled from networking sub-system.

Change-Id: Ia763778e954195502281d63438b7e756adadd8a5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Jukka Rissanen 1af5132250 net: Do not compile slip if UART support is missing
Saves some memory if unnecessary slip functions are not
compiled into kernel.

Change-Id: If2316909b36b12cb4d163a5ca966e2e54f4e1159
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Jukka Rissanen 015b52f55c net: 15.4: Make it possible to disable 802.15.4 networking
It is now possible to fully remove 802.15.4 radio support
from generated kernel.

Change-Id: Ib7cf8f4bb400ae7e298bdc62e3b50b787a2ef06d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Ravi kumar Veeramally 56ccfb3785 net: 15.4: Add 802.15.4 driver and 802.15.4 loopback radio driver
Enable 802.15.4 driver that receives the IPv6 packet, does header
compression on it and writes it to the 15.4 stack Tx FIFO.
The 15.4 Tx fiber will pick up the header compressed IPv6
6LoWPAN packet and fragment it into suitable chunks ready
to be sent to the 15.4 hw driver. The 15.4 stack Rx fiber picks
15.4 frames from 15.4 Rx FIFO (which are fed by 15.4 driver)
and reassembles the all fragmented packets and uncompress the
header and writes to the IP Rx FIFO.

The 15.4 loopback radio driver receives the 15.4 frames and
put it back to 15.4 Rx Fifo.

Change-Id: I68d1c7ff6de0e8770616e574206c2091c69a28e6
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Jukka Rissanen 43593bcbf4 net: Use simple UART driver for handling slip (serial line IP) traffic
This commit uses the simple UART driver to pass slip data between
qemu and host.

User needs to create a network device (tun) in host that is
connected to qemu via slip protocol. The tunslip6 process
acts as a gateway and passes packets between qemu and host.
See net/ip/contiki/tools/README file for details how to use and
configure the slip in host.

This is meant for testing the uIP stack.

Change-Id: I82bb87a76485a07ddf5de9ae91fe3d49a0e20658
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:30 -05:00
Ravi kumar Veeramally 9431109cde net: Add separated compression and fragmentation files.
Change-Id: If639164d32dbebb0e23075b433739c56bf70163c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:29 -05:00
Ravi kumar Veeramally 575c89eacb net: Update 802.15.4 stack with net_mbuf and split sicslowpan
Move packetbuf from net_buf to net_mbuf, update 802.15.4 stack
with net_mbuf (which is smaller in size, and mostly wrapper for
packetbuf) and split sicslowpan(ipv6/sicslowpan.c|h) functionality
to compression and fragmentataion. This patch contains
null_compression and null_fragmentation which is exactly what
uip_driver.c|h does.

Change-Id: Ifee359e20aa57a50fb00c9ce049d9476b2ac67e3
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:29 -05:00
Patrik Flykt e26167cd4a net: Add loopback driver
Change-Id: If8ee848ed8519719b4ec3ad2e74167e0558709ef
Signed-off-by: Patrik Flykt <patrik.flykt@linux.intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:29 -05:00
Jukka Rissanen 620fb7eb6c net: 6lowpan: Enabled 6lowpan support
Created a kconf variable that is used to enable/disable 6LoWPAN
support.

Change-Id: Iaccfe01696ec7226d9a114924c1162fa35959ff9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:29 -05:00
Jukka Rissanen 7d7d4e4161 net: Enable logging in uIP stack
Allow the uIP stack to print information about its internal
status. By default the logging is disabled.

Change-Id: I55a03051d3f541b5f6ea950fdd6406814f937197
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:24 -05:00
Jukka Rissanen 8dcb1494a9 net: Fix the environment variable in Makefile
TIMO_ENV changed to ZEPHYR_ENV as that one is now in use.

Change-Id: Ia7d7729a7210401ea2191710c708985c0282257a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:24 -05:00
Jukka Rissanen 251a45b602 net: Use our network buffers instead of global ones in Contiki
This mega patch changes how Contiki uses buffers. In standard
Contiki there is only couple of static and global buffers.
This makes the stack non-reentrant and only usable in one
thread. This patch replaces the global buffer with buffer
supplied by caller (net_buf.h). The Contiki stack is still not
fully re-entrant after this (packet reassembly needs more TLC)
but it is a good start.

Change-Id: I63abc230b36b14f33f687d3ef64cffb0f3a69f5d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen da36c6371c net: Simple socket API introduced
The network context defines a network connection.

Change-Id: I29a186be6c9de9d824f10b6442fa1dfd3711d24d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen 4f5723a5d0 net: Network initialization and tx/rx functionality
Functions to receive data from apps and transmit it to network, and
receive from network and pass data to apps.

Change-Id: I1b1b8c041e6c5e20294081d2cd403636e9909cdc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen 75d4b3f0c2 net: Initial networking support
Base is from Contiki git tree at git://github.com/contiki-os/contiki.git
commit 6ac939bc58ea76aa37e9b86af55ad51cfc3434e9

This one does not do anything useful yet. It sets the baseline for
subsequent patches.

Change-Id: I7078c938dd59188beceaf47721afaa521d8bde1a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00