Made the first argument to uip_connect() const, to ensure it isn't altered
Importing patch daef1ea252feca2ae540c2c06f5f49496231a209 from Contiki.
Original commit by Adam Dunkels <adam@thingsquare.com>
Change-Id: I92a8c389b0331c2cddcdac0190965209a4488eb3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch daef1ea252feca2ae540c2c06f5f49496231a209 from Contiki.
Original commit by Adam Dunkels <adam@thingsquare.com>
Cast the addresses when copying IPv4 and IPv6 addresses using
the IPv4 and IPv6 copy macros.
Change-Id: Id34a294c653ec3310ef8152e600db3eb39778ae1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 06daa08ffc4da0f0e2e5d32c222c0f513d273cec from Contiki.
Original commit by Adam Dunkels <adam@thingsquare.com>
Change-Id: I20b69b440923061f1993f7063c668351ee304a77
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 6a5f238255a3a3450db2588cba7383d1be8529a0 from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: I4684d403a8a3d65f442f11f2d66f53c6968709aa
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Will now probe the least recently updated parent from time to time.
Importing patch 2dd182f4a8a322867f90cdbc8f1a983b972ac7cd from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: Ifa87485a3a5fdb895cf3fc375ef9589cbbb950f6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 47ba4c0c4bd81fd429ba23557aa44ee75daa2b3a from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: I30da9aac6f1057239fc3689996aa45b0a019f6f6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 529376be7758eec8320e695c1efb5e416f2d8c1c from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: I21aebbdff3687e6d29c4c28afa7d8095e185dc8b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 8344290e0898bb54a68d0e417a7a1c6dee992200 from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: I46ab31bbba06a54f020ec792a4e12ef60ae3caff
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 9d94c4efae9c7604790034264d22e6cbf7fb61cd from Contiki.
Original commit by Laurent Deru <laurent.deru@cetic.be>
Change-Id: Iffd51ce5b4e68acf7e15b4559843f128cf5f13d0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 49bfb1308db8eff186677bcd8f1dd3861d9b26d8 from Contiki.
Original commit by Laurent Deru <laurent.deru@cetic.be>
Change-Id: I307fbec3ff6325a06c895411b83b811c2a392d44
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Now uses net_receive() with a proper timeout. Removed also
extra waits when sending data. Removed extra semaphores
and streamlined the code to act as fast as possible.
Change-Id: I577d4d5ff85bf13400fb6e157bc0023267658ba4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure to use the correct fifo wait function for microkernel.
Change-Id: Ie3e365a2e24836485d028c05c936c30dfce91ba4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This debug print will flood the console is certain scenarios
so remove it.
Change-Id: I9e1d04ef48d9a6acf21c360c5ebb0dfa15c0173f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added comment how UDP packet is handled when receiving it.
Change-Id: If1e10c5bde55cb2cf7a8928b0f1ec38dd6ab84b4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Fixed the description of what happens if there is a timeout.
Change-Id: Id19a791193b527a8ee086f069e103f42d2d9b0f4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The echo-client app will run in Zephyr and will send network
packets to host process (echo-server) via SLIP.
Change-Id: Icaf941ce883aec82136ef909db67e43ab6b981f7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This echo-server app is run in the host side. It will
connect to Zephyr via UART using SLIP. The app will
listen data in socket 4242 and will reverse the returned
bytes and send them back to the sender. The application
supports both IPv4 and IPv6 protocols and it will also
listen multicast packets sent to it.
Change-Id: Icf0805794a16842e70fbb5e8a3f843a3782e1968
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We must not touch uip_len(buf) value as Contiki IP stack
will use it to determine what it should do with the
received packet. So after we have received the packet,
we update separate datalen variable in net_buf that will
store the correct length of the packet.
Change-Id: Iab79b741508e95e581d1727645e6b1d1eacded4c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We were clearing too many contexts in net_context_put().
Change-Id: Ie65fc7d4f3949cca4035bc459c0127179038bd85
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow caller to specify a timeout in ticks while waiting
network data. The timeout value has following meaning:
TICKS_UNLIMITED wait forever
TICKS_NONE do not wait
value > 0 timeout value (only applicaple if
CONFIG_NANO_TIMEOUTS is defined)
Change-Id: Icbb33fa0eeb462659d4006dd9d948a04f39a87a9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
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>
Useful in order to see what is going on in the stack.
Change-Id: I9fa7d12d836d449b253a0339c70bb25f471059df
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
UDP reply handler was not freeing net_buf properly if the
context was not passed properly to the callback. This
happened because the callback user data pointer was having
incorrect value.
Change-Id: Idfefd37b29674129252aa8f903fa9fe55de191cb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When sending data to network, make sure to check the return
code from network driver. The driver should return these codes:
0 : If packet could not be sent. In this case buf should
not be released.
1 : If the packet was sent successfully. In this case the buf
should be released by either the send() or some other
lower layer function.
<0: If there is an error, the buf should not be released by
send() function.
Fixed the relevant part in Contiki code so that the tcpip_output()
return correct value
0 = packet was not sent, caller needs to free it
1 = packet was sent, network driver will free the net_buf
after sending it to medium
Change-Id: I4380d7747985fc057f5ef73ca97b76f6e9888a55
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make the debug prints a bit more useful by printing also
the relevant IP addresses.
Change-Id: I2029f7a7bc5e888d184467dee19802af9621e36e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This adds offset to gatt-write which can be used as following:
btshell> gatt-write 0011 0001 01
bt: gatt_prepare_write (0x0010f680): handle 0x0011 offset 1 len 1
Write pending
btshell> bt: bt_att_recv (0x00111918): Received ATT code 0x17 len 6
bt: att_handle_prepare_write_rsp (0x00111918):
bt: att_prepare_write_rsp (0x00111918): err 0x00
bt: gatt_exec_write (0x00111918):
bt: bt_att_recv (0x00111918): Received ATT code 0x19 len 1
bt: att_handle_exec_write_rsp (0x00111918):
bt: att_write_rsp (0x00111918): err 0x00
Write complete: err 0
Change-Id: I4d3c038ea572da92efe0de8ce426ffca15506440
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This enables writing from offset using Prepare Write + Execute Write
procedures including Long Write procedure when the data is bigger than
the MTU.
Change-Id: Id35d66c011ba582a4ba92ffe75444226e479335a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This can be used to check what is the configured MTU for the given
connection.
Change-Id: I292b06dbe079fbd567cd8d39615cfbc3dad6b2a5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sample project README.txt files are supposed to follow a particular format
AND have a "Sample Output:" section.
Change-Id: I91fff1057e56bc222ab82d680018a673e19e479d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Assigns more descriptive titles to the sample project README.txt files.
Change-Id: I4a0efdac481a8ed75a847871dbfe686e74a9f113
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Standardize README.txt files on using "Sample Output:".
Change-Id: I3a8dc18b37f36067b9f343ef443b6d35e85db6b4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Since file got relocated, path needs to be corrected.
Change-Id: Ic56b7ec23704ab4f71c95f8cefb273866c398fb8
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Point to Bluetooth applications location.
Change-Id: I3595a7f2403933d372f020099693a03e1197015b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The inline versions are renamed to remove the _inline suffix, and the
non-inline versions are removed from the code base.
Change-Id: I7314b96c42835f15df4c537ec11ab7961d4ee60f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Standardize on using the irq_lock/irq_unlock (non-inline) symbols
everywhere.
The non-inline versions provide absolutely no benefits, so they will be
removed in a subsequent commit, and the inline versions will have their
_inline suffix removed.
Change-Id: Ib0b55f450447366468723e065a60adbadf7067a9
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Basically, this does not work anymore:
task_timer_start(<timer>, 0, X, <sem>);
since it does not make much sense to have a timer with an expiry of 0
ticks. The code internally was setting the duration to be equal to the
period anyway. So, to achieve the same behaviour, do this:
task_timer_start(<timer>, X, X, <sem>);
This has the positive side-effect of removing a small block of logic
that was handling the cases where duration was 0.
Change-Id: Ic4af4a17a129f14af4fea445bcaddabe89c27131
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
They use the same logic and _k_server handler, so only have one
implementation of the user-facing API.
Instead of using ENDLIST, create a new internal _USE_CURRENT_SEM symbol
that reflects what the implementation is doing.
Change-Id: I5c50efd15f4e97b778b4b5efd5ec931384a8631f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Reflect the fact that they are not used.
Change-Id: I6ea83cb2c7532e10988cbf4350edccb78f444328
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Align with the newer terminology used for microkernel internal symbols.
Change-Id: I623b383f90d9e37a49429a79774c7f7a4953bd5f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
irq_handler_set, irq_priority_set and irq_disconnect have been made
private by prepending an underscore to their names:
irq_handler_set -> irq_handler_set
irq_priority_set -> irq_priority_set
irq_disconnect -> irq_disconnect
The prototypes have been removed from header files when possible, and
extern statements used in C code where they were called.
_irq_priority_set() for ARM is still in the header file because
IRQ_CONFIG() relies on it.
Change-Id: I2ad585f8156ff80250f6d9eeca4a249a4477fd9d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
These macros have C language-isms and cannot be used from assembly code.
Change-Id: I07ffc27411300339e08ae7ef9c19249903be4774
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Doing those checks went against the Zephyr philosophy of no error
checking unless absolutely necessary. Users should ensure themselves the
validity of their inputs to kernel APIs.
Change-Id: I21e5cd07ff9424ad61e81fd9d52ceef0c9584a8c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
task_event_set_handler -> task_event_handler_set
Align with the "verb at the end" convention.
Change-Id: I8b72d41a20a7fdd4756f90765682e317289a241b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
task_pipe_put_async -> task_pipe_block_put
task_mbox_put_async -> task_mbox_block_put
task_mbox_data_get_async_block -> task_mbox_data_block_get
task_mbox_data_get_async_block_wait -> task_mbox_data_block_get_wait
task_mbox_data_get_async_block_wait_timeout ->
task_mbox_data_block_get_wait_timeout
Previous names, focusing on 'async', were misleading, because:
- some of those APIs can be used synchronously as well
- other APIs can also do asynchronous transfer, and don't have 'async'
in their names
- the key concept of these APIs is that they use memory pool blocks
rather than raw data buffers.
Change-Id: I0c08a6cf950ab23bb4172ce25eb6f9886b037649
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This will allow building of external components and linking
them at the end of the build process to the main kernel.
add a Makefile.app to the project directory with the required
targets, for example
Makefile.app:
KBUILD_ZEPHYR_APP := /tmp/libapp.a
/tmp/libapp.a:
@touch /tmp/libapp.a
Change-Id: If2ba6b3ee59023acc5f85c5701b65c4d096d5059
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This will move autogeneated html files to the final directory
which is copied by CI into the online documentation making the
raw doxygen html files accessible via <url>/api/
Change-Id: I79bc211377840358acfb94d4de839ce25d2830e0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>