Up to the part declaring mgmt request to define such handler. This is
meant to avoid such warning:
warning: implicit declaration of function ...
Change-Id: Ide6e9abf886169c26d81fe6b5c7bc280e1ac4e4d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Since "22e919872206b1d net: Adapt to new behavior of net_buf_frag_add"
net_buf_frag_add() takes onwership of the fragment, so this _unref()
after a net_buf_frag_add() is wrong.
Change-Id: I1559c2978cf8d800891d6e752478537fbee7c02b
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This enables the tests for the observer feature to be run using the
native IP stack.
Change-Id: I325dcd1f5d9fffe3821eed1bd950a717e5f17b67
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
As we use STXONCCA, RX will be stopped and reinstated afterwards.
We would be using STXON, since FRMCTRL1_SET_RXENMASK_ON_TX bit is set,
behavior would be the same.
Recalibrating the RX will uselessly abort any received frames before TX
or right after RX got reinstated. So, let's not do that and trust that
RX is anyway properly calibrated after TX.
Change-Id: Iac4fa03a175f8d139c1fc821de01caab1ec86e6b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Print TCP flags in a similar fashion to tcpdump, where uppercase
characters mean a particular flag is set, and lowercase characters mean
a particular flag is unset.
Supported flags by net_tcp_trace() remain the same: FIN, SYN, RST, PSH,
ACK, and URG, respectively represented by the letters 'f', 's', 'r',
'p', 'a', and 'u'.
Change-Id: Iaeb0b5c4fa5b4ab2b877d523b155dc431e9fc909
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This fixes the following build warning:
net/yaip/ipv6.c:333:9: warning: 'nexthdr' is used unin-
itialized in this function [-Wuninitialized]
This relies on net_context_get_ip_proto() providing the correct
protocol given a certain context. Currently, it only returns either
TCP or UDP, which is sufficient for net_ipv6_create(). However, enum
net_ip_protocol contains other unhandled protocols (ICMP and ICMPv6,
respectively), which might or might not need to be handled in the
future.
Change-Id: I1f7af54612c3e1c978e734fc0e6b2ff1a61089f8
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
When a connection is being established, the ack sequence number in the
SYN+ACK segment must be the sequence number from the SYN packet + 1.
Change-Id: I91df986f1f1b7cf8eaff0171921ab4c8cf1ddf93
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The fragment count value was incorrectly printed. All
the values > 9 had their last digit chopped off.
Change-Id: I8304b8047baa97995c3927809e4616653c87928b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This change is related to patch called
"net: Adapt to new behavior of net_buf_frag_add"
This version removes extra net_nbuf_unref() from
the code. The unref was done because net_buf_frag_del()
did not remove the double ref from the list element.
Because of the other patch, the list does not have
double ref any more, so we need to remove the extra
unref in couple of extra places.
Change-Id: If90e01c24b9b4e68afbfa283850d2a1ecb3065ed
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
net_buf_frag_add takes the ownership of the reference passed to it so it
is no longer needed to unref when deleting fragments.
Change-Id: I73f44ba313819a176b6a64b7644c80a83d86000e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Earlier test results was updated as soon as test server ACK client
dhcpv4 request. But update results on IPv4 address add event on
interface.
Change-Id: I212309a4d1d2eae88f73470e00754db1d6fecda5
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Change definition name suffix to WPANUSB
Change-Id: I3456ebff061866a67b7a07b33f6ff83a31a2d7a8
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
It should go to LISTEN state as soon as possible, to service another
connection. The client connection, though, should be in the
ESTABLISHED state.
Change-Id: I98708e67bd969f09b84e60ac2fecc284bf82a79f
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
When an incoming TCP connection is accepted, a net_context for the
client is allocated. However, some steps prior to calling the
user-defined accept callback can fail, without freeing the
newly-allocated client context.
Change-Id: I94ed03d2f3b69eb3edd23c990da5842fa4605a29
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Only TCP sockets are supported by net_context_listen(), so check if the
socket family is TCP rather than UDP in order to return success or
error.
Change-Id: I2ab5e9985d448811da2e1414d3ecafd9b3b3e475
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This keeps the semantics of the low-level network stack API closer to
the BSD sockets API. Prior to this change, listen() primitive was a
no-op, and accept() would change the connection state to LISTEN; this
changes the functions so that calling listen() is required before
calling accept().
Change-Id: Icd89eb8d76439d63339fc99277d5d3dad66fa5f5
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Instead of defining the poorly-named a2u32() and a2u16() functions
inside tcp.c, use macros provided in <misc/byteorder.h> to obtain
unsigned 32- and 16-bit values instead.
Change-Id: I344fe0e495c574cb8cc717036154221e912b4406
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Adjust the DHCPv4 client configuration wording to distinguish the
option that enables dhcpv4 client from the option that enables its
debug. Provide help text for the latter.
Change-Id: Iadb115bc93f56e7dd3f1c0824f57a9cfc4453e75
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Adjust the workding of NET_DBG() diagnostic to emphasize that the
contents of a received dhcpv4 message where not expected, rather than
incorrect.
Change-Id: Iee29e1b93c6a4876effa2e968bf77d9a0ada4ff0
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Add a NET_INFO diagnostic to output the allocated IP address.
Change-Id: If6854467cfddc5b3fbe18f48d4639e6ff0c84fff
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Add NET_DBG() output itemizing the parsed context of a dhcp request.
Change-Id: Ic4b2586314aa749d46c25a02d512057a3372e975
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
RFC2131 requires that a client must choose XIDs in order to minimize
the chance of collision with another client. Selection of a random
XID at boot is a valid approach. Adjust the XID representation from
array of bytes to the more convenient uint32_t representation,
initialize the XID to a random number and increment for each request.
Refactor the dhcp test case to generate response messages with the XID
from the received message.
Change-Id: I93f180e6aa02430f807e0a97186577dc956fb653
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
net_l2 is the proper name, looked by sanitycheck.
Change-Id: I08548865df21a57c8198fe0a801aa8c2a81b7fb0
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The test "Test block sized transfer" does not work with
new IP stack so disable it temporarily for new stack.
This needs to be fixed later.
Change-Id: Ie89dd101270ab9b8a9b056757de79cd3da009180
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add support for inserting data into an arbitrary location in fragment.
Change-Id: Iaecdc4e980a73e0f66c208315d342e05762cd6f5
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add support for nbuf write to an arbitrary location in fragment.
Change-Id: I686c6d86feb8545603edd7c7a9ef6fde1c909a72
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
net_l2_init sections used to exist in early stage of the native IP stack
but got removed since.
Change-Id: I189d6e6f7aa05a6e5a62a28973c714d0367b0c5a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit updates the README files to reflect that ZEP-1036
is already solved.
Information about ZEP-1097 and ZEP-1098 is now included.
Change-Id: I3c83160962d308d374823e086bbf083dca988606
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit modifies the conf and Makefile files of the DNS client
application.
Inside the Makefile, the CONF_FILE variable is updated to include
the BOARD name, therefore prj_'board_name'.conf is used from now on
to refer to the conf file. The right conf file is selected by passing
BOARD='board_name' to make.
Configuration variables at the conf files are also homogenized.
Change-Id: I6f5aaad0b52d458bceb90b315aba2b31f085c0a0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
A bunch of if's are a poor substitute for straightforward interval
checking. You just have to be careful about the sign.
Also the seq_equal() routine was unused.
Change-Id: Id3a627ff75c8ab9889f226c733faa3fcb38207a7
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Move the IN_USE clear in net_tcp_release() to the END of the function
after the destruction is complete so someone else doesn't allocate it
while we're still cleaning it up.
Also, operations on the IN_USE flag need to be atomic for correctness.
Stick an irq_lock() around them.
Change-Id: I9d7557244fc8de5b0c69fd0bc749a9e28fa19a54
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Big chunks of this struct were essentially unused:
+ The prev_state field was stored at state change but never inspected.
+ The send_wnd, send_max_wnd, send_cwnd, send_pcount and
send_ss_threshold fields were simply unused.
+ The recv_scale field was never initialized to anything but zero,
remove the support. Windows greater than 64k seem very unlikely to
be useful to Zephyr anyway; if we actually want window scaling (in
either direction -- there are large memory costs!) it should
probably be optional via Kconfig. We surely don't want to carry
this for all builds.
+ The buf_max_len field was hard-coded static, replace with a #define
+ Double-memset of the ack_timer field in initialization
Change-Id: I223665518529dc6a7f267bbc6992a645a30f5735
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Rename project configuration to be architecture independent and do not use ARCH
in Makefile.
Change-Id: Ic793751e3187bc74fd14cec929754d691b01a799
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Implement serial-radio protocol used in Contiki-based border routers
to interact with 802.15.4 devices connected over serial or USB-serial.
Change-Id: I938b34ca32ae7a08e5d48e3bea585cda6c98c113
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Change DBG to ERR for error cases to get errors when only errors are
selected.
Change-Id: I51fd15900b1efb96d5dff36367afcdf380f11b88
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This prepends logs instead of [general] with [cc2520].
Change-Id: I148159a451981fbe3da638732f0e97900f76bc58
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This provides only initial set of functionality tests
for TCP. More tests are to be written.
Change-Id: I157fed85f561523bf063732ce86eaae551c2d384
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This creates initial TCP handling logic but does not yet
enable fully working TCP connection.
Some of the connection logic is taken from FNET TCP
implementation.
Origin: FNET 3.6.1
URL: https://github.com/butok/FNET/blob/master/fnet_stack/stack/fnet_tcp.c
Change-Id: I1e100d9fa9c91437562b933d94d0bd3db1a5885e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>