Commit graph

113 commits

Author SHA1 Message Date
Jukka Rissanen 04a65534e1 net: Change srctree to ZEPHYR_BASE in Makefiles
This is related to changes in commit 7dcbbc39e7
("build: move from srctree to ZEPHYR_BASE for app include paths")

Change-Id: Ie902ed66bb74188ed54aae44e2f4289f954ec351
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:17 +02:00
Tomasz Bursztyka a1fde2bff8 net: Fix dedicated IPv4 function for net_if
IPv4/6 functions follows this scheme: net_if_ipv<4/6>_<name>.
Applying that to net_if_set_gw/net_if_set_netmask which are IPv4
functions.

Change-Id: I2dcbb16ce81cfdffbfbb5cae24ad76ddf2b9919a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:14 +02:00
Tomasz Bursztyka b8e3415264 net: Let's use inline function for type checking for net_nbuf
Using macros does not let the compiler verifying about the type we are
providing, which usually give an error easier to understand.
Also, this will let the compiler deciding how to actually optimize
(inline or not) the code.

Change-Id: Iba49590b620ef0a1bd0ed5621453524fcfea747c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:13 +02:00
Jukka Rissanen b9b1dec6a3 net: tests: Turning off IPv6 for ARP tests
ARP is IPv4 only so no need to have IPv6 functionality.

Change-Id: Ie70242f5763ba4945c311898643414851f7e8660
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:12 +02:00
Jukka Rissanen a1a17d5a98 net: tests: Fix ARP test so that it will not crash
The driver_api pointer was set to NULL which will cause
a crash in TX fiber.

Change-Id: If1c9a1e44904970f3a0019741eaaad4bf62d2c73
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:12 +02:00
Jukka Rissanen 9818cc7b1d net: ARP unit test needs to be run from fiber
The ARP unit test is not able to pass packets between fiber
and task. Because of this the test is run from fiber.

Change-Id: I1825a0abdc1b04a78de76d58425f4d2a2ce26ab7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:10 +02:00
Jukka Rissanen 53caa13652 net: Refactored ARP packet header handling
The ARP packet header contained ethernet header. This is very
confusing so separate the link layer header. Fixed also the
unit tests to run properly.

Change-Id: I8b00bde280ad9f49494766370acb2a8e9cade033
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:10 +02:00
Jukka Rissanen f1532fe647 net: tests: Fix unit test for ARP
Change-Id: I962c00500c57f0f49314d10765b821976679e39b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:08 +02:00
Jukka Rissanen f6dc86c678 net: tests: Fixed the ARP test
Now uses net_nbuf_ll() to point to link layer header.
Also the ARP req test passes properly.

Change-Id: If649ff19a064490bff33d03b4ce70ef11bfa7cd5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:05 +02:00
Jukka Rissanen 7eff526e3b net: tests: Unit tests for the IPv4 ARP code
Change-Id: I607ffdbffc7348fae70272c7add57456fcaf79af
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:04 +02:00
Inaky Perez-Gonzalez 3e63a74514 net/yaip: revert merge
Follow up to TSC decission for further discussion in the networking
WIG.

Change-Id: I148b484dfe308661573e47ed3e60cceed673bddf
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-22 04:43:09 +00:00
Jukka Rissanen 99fd48acdd net: tests: Fixed the ARP test
Now uses net_nbuf_ll() to point to link layer header.
Also the ARP req test passes properly.

Change-Id: If649ff19a064490bff33d03b4ce70ef11bfa7cd5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:11 +00:00
Jukka Rissanen a5b96021a7 net: tests: Unit tests for IPv4 ARP code
Change-Id: I607ffdbffc7348fae70272c7add57456fcaf79af
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:08 +00:00