The caller is able to add and lookup network interface IPv6
addresses.
Change-Id: I7f43e18bd1fa69c7dcd2f6b46ad33043c28b92e9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
IPv6 utility functions that check if a given IPv6 address
belongs to one of host network interfaces, and whether
the address is a given type.
Change-Id: If251534ae0af41963d45e305e7ba505a940d2fdc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the source address is multicast, then drop the IPv6 packet.
Change-Id: Ibe733161d67f047469a25a5955c41c335e472945
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Check if we have received IPv6 packet and call a handler
function to process it.
Change-Id: I1226729685ae2a805128b587e2a37e0016d53ecc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Collect network statistics if CONFIG_NET_STATISTICS is
defined.
Change-Id: Id217daa3e19142c95396dc391ba2dc4123b18b22
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Currently all received packets are dropped as this is just
the initial patch enabling the receive support.
Change-Id: Ib06735f498a80edb8c9f7c5ec6f536a5ac1d362a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Tests have issues right now so these will be activated later.
Change-Id: Ib5549f9ed5600a20b2cfddbddcde8e7f7b297eef
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There is now Kconfig option to enable net_if debugging.
Also use NET_DBG() instead of directly calling syslog macros
so that we can print fiber id automatically.
Change-Id: I150d363006e4be358c38308a93771ba444b0835e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of directly calling printk/printf, the network printing
macros will use syslog macros defined in sys_log.h
Change-Id: I3f12f81557f50b24ca47a43f345162f9ffbd574c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The send() function is called from IP stack and it is used
when the network packet needs to be send via a specific
network interface.
Change-Id: Id6ce86b1748915fee73b62366dee13fcb7cf11a1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The native stack uses CONFIG_NET_IPV4 to compile IPv4 support.
Change-Id: Ia4a579591d6d2050e168c35e68546281043d53a8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This will return the network interface that has some specific
link address.
Change-Id: Iaebcf6e769d4f91f3cda6d3a0779324f89603b54
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User does not need to call net_init() as it is automatically
called when system is brought up.
Change-Id: I2cb10f4402088a0ca4feff226b65341f337194ea
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The native stack uses CONFIG_NET_IPV6 to compile IPv6 support.
Change-Id: I25c3b2d6775ed610fca43960a569ddab0ec470aa
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This macro can be used to check stack usage. It should only
be used when debugging is activated.
Change-Id: I99fe6f9db1f3e955152a91f3a18d031126172cfd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The NET_IF_INIT() macro used parameter pasting incorrectly.
Change-Id: I40a988ffb06ce135731cd69f18931b7507cd71cc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The SLIP driver is using UART pipe driver to communicate with
host when Zephyr is running in Qemu. Currently this is only
used by networking sub-system when testing the networking
stack.
Change-Id: I432b4136670766a7fc190f146057924c266f9bea
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User should use the net_nbuf API that is supporting a concept
of RX, TX and DATA buffers, instead of using directly the net_buf
low level API.
Change-Id: I3b8f5f13cd37d42d2322a58b35573e117d520c54
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Save 12 bytes per IP address if IPv4 is active and IPv6 is not.
Change-Id: Ia01d2feb83e6ba80b2775f9eed3065c956932632
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Network drivers should call this when new data has been
received from network.
Change-Id: Ife78fa0683b8c410c38358300a6a18e9325f0ef8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Network packets to be sent are placed to correct fifo that
is allocated to certain network interface.
Change-Id: Idd5eded42758c5bed2c18769122c38d9d03dc419
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This echo-server does not yet do anything useful.
Change-Id: I317051b3a2bfb0a80584ad385c2f308978a243cd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This will be used by the new network stack to relate a device to actual
network context, and used in the different layers (mac, ip ...).
Change-Id: I30c08fa975314544c36b71636fd9653d562891b3
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Use CONFIG_NET_... prefix for Kconfig options.
Change-Id: I3e882845e7c09ba910f108179208fcaf33360f21
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is a placeholder that compiles but does nothing else.
Change-Id: I9689fa26eb13bc23d29940938f7b3c11f32b2ff1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
getenv() returns an string of unknown size, so Coverity warns that it
might be used to overflow the stack in the call chain off
conf_read_simple().
To avoid that, wisdom says copy to an string of known size and pass
that.
Change-Id: I9e468de0ae66429062027f58fe0a0a4e1197218f
Coverity-ID: 150819
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
(cherry picked from commit 0307d6ea5f)
Certain structures and defines in this file are from
from mbed's implementation. The file header is updated
as per this.
Change-Id: I688917cdd17cfc8b27d5b78181ced90df73c9efd
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
The current ARC GCC compiler used in Zephyr SDK v0.8.2 generates
incorrect code when using the "-fno-omit-frame-pointer" option. This bug
should have been fixed in the 2016.03 release of the compiler.
Jira: ZEP-1243, ZEP-1403
Change-Id: I0901f55973c1ea37491b07bf625d0d1918803f3e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added new option to make sanitycheck script error on deprecation
warnings, to use:
sanitycheck --error-on-deprecations
For example, to find usage of legacy APIs in master, run the following:
sanitycheck -e legacy --error-on-deprecations
Change-Id: Ib83c266c8357475840dea03d62ceefed72b73f27
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The reversal of the meaning of a value of 0 from k_sem_take vs
nano_sem_take has caused some issue when porting code from the legacy
API to the new API, so put some emphasis on this difference.
- Add a note in the API description.
- Put the call to k_sem_take and the reversal of the return value inside
of nano_sem_take on one line so that grepping on it shows the
reversal.
Change-Id: I2f4ba58dc087176d68b55371fa6e367b72559e70
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This implements a modified version of CDC ACM class driver
in a WebUSB compatible way. It adds the WebUSB descriptors,
custom and vendor requests handlers so that the host OS and
browsers can get the required BOS descriptor and supported
origins from the device. It also adds a custom interface
class so that the interface will not be claimed by the host
CDC ACM driver.
A simple echo app also included in this commit to demonstrate
how to create and use a WebUSB interface, as well as the
communication between browser and WebUSB enabled device.
WebUSB Spec: https://wicg.github.io/webusb/
Origin: Based on CDC ACM device class driver in Zephyr
Jira: ZEP-744
Change-Id: I2eac10bd718e8fce35cda52e7c2ac425c3210e23
Signed-off-by: Sudarsana Nagineni <sudarsana.nagineni@intel.com>
Revise the document to reflect the latest changes including
the updated concept of SOC interface instead of PMA. Simplified
and enhanced areas that were known to cause confusion. Added
descriptions of new APIs and usages.
Jira: ZEP-1386
Change-Id: I5fa74d85245924f512c22d9d977dd0c9ea62b6ce
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>