1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

487 Commits

Author SHA1 Message Date
Ken Bannister
0e1c3ebe50 net/gcoap: make options buf macros configurable 2019-01-16 12:41:06 -05:00
Sebastian Meiling
a0e143d09f
Merge pull request #10721 from nmeum/asymcute-out-of-bounds
asymcute: check for minimum packet length early
2019-01-16 13:53:49 +01:00
Sören Tempel
2a6354b07d asymcute: check for minimum packet length early
Without this patch _len_get reads one byte beyond the con->rxbuf
if the incoming packet consists only of the byte 0x01.
2019-01-16 10:06:38 +01:00
4b1b0aa84e sys/net/nanocoap: fix possible option_count overflow 2019-01-14 12:30:06 +01:00
Martine Lenders
894ad29322 sock_dns: remove out-of-place puts() call 2019-01-10 18:07:29 +01:00
Martine Lenders
8ad5e44cba sock_dns: remove some magic numbers 2019-01-10 18:07:29 +01:00
Martine Lenders
2840b3825e sock_dns: fix out-of-bound errors
Fixes #10739
2019-01-10 18:07:29 +01:00
Ken Bannister
86ff4d3dc5 net/nanocoap: fix request retry countdown 2019-01-10 06:21:47 -05:00
Sören Tempel
d70a94f139 nanocoap: fix sock_udp return value checks 2019-01-08 19:01:39 +01:00
Sebastian Meiling
139b5dba3c
Merge pull request #10501 from kb2ma/gcoap/req_path_null
net/gcoap: allow NULL path in gcoap_req_init()
2018-12-21 14:36:04 +01:00
Ken Bannister
bd457aee2b net/nanocoap: fix includes for nanocoap sock 2018-12-20 00:37:18 -05:00
Ken Bannister
bec94b0b7a net/gcoap: allow NULL path in gcoap_req_init() 2018-11-28 13:20:22 -05:00
Ken Bannister
8fa6f10f97 cord/ep: Update for gcoap API change 2018-11-24 07:09:25 -05:00
Ken Bannister
424a01ddc1 net/gcoap: remove gcoap attributes from coap_pkt_t 2018-11-24 07:09:25 -05:00
Ken Bannister
034c78d51c net/gcoap: move macros to implementation file 2018-11-24 07:09:25 -05:00
Ken Bannister
f0b966d65d net/gcoap: Use nanocoap options API
Observe still uses coap_pkt_t attribute.
2018-11-24 07:09:25 -05:00
Ken Bannister
fa5ab4eeb6 net/gcoap: Add format option to nanocoap 2018-11-24 07:09:25 -05:00
Martine Lenders
78164977d8
Merge pull request #10223 from kb2ma/nanocoap/string_opt_first_char
net/nanocoap: fix string option separator write handling
2018-11-22 16:43:45 +01:00
Ken Bannister
fa77929cc7 net/nanocoap: fix string option separator handling
Assumed initial character was a separator when writing the option,
and skipped over it.
2018-11-22 09:25:05 -05:00
Lasse Lueder
34a6e384c2 net/gcoap: use coap_data_ptr instead of hdr.data 2018-11-02 16:33:29 +01:00
Lasse Lueder
18ae8ef90d net/nanocoap: use coap_data_ptr instead of hdr.data 2018-11-02 16:33:29 +01:00
afb7d6e1fc
cord/epsim: enable THREAD_CREATE_STACKTEST for thread 2018-10-18 14:17:07 +02:00
be1dc15655
cord/ep: enable THREAD_CREATE_STACKTEST for thread 2018-10-18 14:09:32 +02:00
Hauke Petersen
18cc7ee3ed net/rdcli: rename to cord_ep 2018-10-17 15:21:49 +02:00
Hauke Petersen
226b9fa383 net/rdcli_simple: rename to cord_epsim 2018-10-17 15:21:49 +02:00
Hauke Petersen
152623577e net/rdcli_config: rename to cord_config 2018-10-17 09:29:19 +02:00
Hauke Petersen
787524400c net/rdcli_common: rename to cord_common 2018-10-17 09:29:19 +02:00
Hauke Petersen
f0b0e25254 net/rdcli: new module structure and high-level doc 2018-10-17 09:29:19 +02:00
Ken Bannister
ad38dd9a6f net/nanocoap: fix non-confirmable response type 2018-10-15 06:42:37 -04:00
726ebf3dad coap: use COAP_FORMAT style content-format defines
Replaces all occurences of COAP_CT_.* with COAP_FORMAT_.*
2018-10-15 09:44:17 +02:00
Ken Bannister
14c9b3062b
Merge pull request #8932 from bergzand/pr/nanocoap/block2
nanocoap: add server-side block2 support
2018-10-14 13:03:08 +00:00
551b3513db nanocoap: Add server-side block2 support 2018-10-14 14:30:29 +02:00
Hauke Petersen
9acce40aad net: added full RD endpoint implementation 2018-10-12 14:41:40 +02:00
Hauke Petersen
6ba1991a8e net/rdcli_simple: do not send CF opt in POST msg 2018-10-10 11:07:17 +02:00
Hauke Petersen
f3f673eb45 net/nanocoap: factor out generic CoAP defines 2018-09-26 14:31:57 +02:00
Hauke Petersen
4a59113963 net/nanocoap: use correct type param for _bulid_hdr() 2018-09-26 13:00:39 +02:00
05b6af466c sys: add missig <string.h> includes 2018-09-20 23:47:40 +02:00
Hauke Petersen
becfce247d net/nanocoap: allow empty uri/location path option
For CoAP, there is actually a difference between
`/some/path` and `/some/path/`. This needs to be reflected
when parsing the URI and location path options from a given
string.
2018-09-11 10:06:57 +02:00
Hauke Petersen
f2b1c5c87d net/gcoap: use sock_udp_ep_equal() 2018-09-07 12:03:19 +02:00
Hauke Petersen
a3b8c90485 net/gcoap: adjust to nanocoap changes 2018-08-30 10:31:03 +02:00
Hauke Petersen
4c08e77d00 net/nanocoap: improve option handling
- add generic string put and get functions
- add location path and location query options
- add dedicated functions for getting and setting
  URI query, URI path, location query, and location path
  options
2018-08-30 10:31:03 +02:00
Pekka Nikander
8f10d65ad5 net/gcoap: Make references to coap_resource_t const in gcoap
A CoAP resource is a primary object between the application
    and CoAP library.  The Library needs the paths, methods,
    and handlers from it, so that it can call the right handler.
    However, it never needs to change any of them.

    The application also needs the resources.  The application
    may want to declare the resources as const, since it may
    want to store them in flash.
2018-07-30 09:00:21 +03:00
Hauke Petersen
ad20c4f1cc net: add Asymcute (asynchronous MQTT-SN client) 2018-07-05 15:44:16 +02:00
Martine Lenders
5361c4cfff sock_dns: return error if DNS server is not set 2018-07-05 11:09:34 +02:00
Martine Lenders
fbf216f864 gnrc_sock_dns: Move DNS server end point to implementation 2018-07-05 11:01:22 +02:00
Hauke Petersen
1bfb3c8534 net/emcute: adapted to changes byteorder functions 2018-07-04 17:41:04 +02:00
ddfc5843bb
Merge pull request #9086 from bergzand/pr/nanocoap_sock/client_split
nanocoap_sock: split generic request function of from nanocoap_get
2018-06-20 23:31:05 +02:00
Ken Bannister
4f8c3b7d18
Merge pull request #9310 from miri64/gcoap/enh/clients-without-response-handlers
gcoap: don't allocate memo for clients without response handlers
2018-06-15 10:28:30 -04:00
Martine Lenders
b03aa528e8 gcoap: don't allocate memo for clients without response handlers 2018-06-15 09:46:50 +02:00
Martine Lenders
e91e0a7807
Merge pull request #9261 from kb2ma/gcoap/refine_re-register
net/gcoap: Refine Observe re-registration
2018-06-13 16:05:40 +02:00
7d013eb2b6 sys: fix doxygen grouping 2018-06-11 19:12:02 +02:00
Ken Bannister
43db2715cd net/nanocoap: create pkt-based request
Includes string and uint options.
2018-06-10 08:44:16 -04:00
Hauke Petersen
36ecaa6e4b net/emcute: use global byteorder functions 2018-06-07 12:10:58 +02:00
Ken Bannister
2c02ed2093 net/gcoap: refine observe re-registration
Fix re-register when using the same token.
Handle edge cases when change token for a resource.
Only set observer and resource on initial registration.
Discuss re-registration in documentation.
2018-06-05 09:23:16 -04:00
Martine Lenders
57d3c4698c gcoap: don't drop observer on re-register
With #9209 gCoAP got the ability to re-register and OBSERVE with a new
token, sadly the `observer` variable wasn't set in that fix, so a
re-registration actually led to the deletion of the observer (because it
is still `NULL` when the old registration is overwritten in l. 317)
2018-05-30 23:05:25 +02:00
Ken Bannister
341debd5e0
Merge pull request #9209 from kb2ma/gcoap/observe_change_token
net/gcoap: Observer re-register with new token
2018-05-29 18:06:07 +00:00
Ken Bannister
d7dde2dded net/gcoap: observer re-register with new token 2018-05-29 13:30:05 -04:00
Hauke Petersen
7f2fb5e0a3 net/emcute: use correct number of retries
syncsend() is used also for the initial packet, so resending
while (retries <= EMCUTE_N_RETRY) is the correct behavior.
2018-05-28 11:41:20 +02:00
6bb8a5c145
nanocoap_sock: split request function from get
The nanocoap_get function is refactored to split of the request part
into a separate function for reuse by other modules. Support for
retransmissions when the received frame is malformed is dropped as it
was broken anyway.
2018-05-25 09:40:20 +02:00
smlng
b9ca8f466f gcoap: add asserts for path in gcoap_req_init 2018-05-22 21:28:58 +02:00
smlng
c9e9f72454 gcoap: use const path parameter 2018-05-22 21:28:58 +02:00
Martine Lenders
8a46cf611e gcoap: make message queue size configurable 2018-05-06 16:41:43 +02:00
8475844213 sys/net/uhcpc: add missing stdio.h include 2018-04-16 23:06:15 +02:00
635e72db23
Merge pull request #8788 from kaspar030/nanocoap_add_serverside_block1
nanocoap: add serverside block1 support
2018-04-16 12:49:06 +02:00
4897222e7e nanocoap: add server-side block1 support 2018-04-16 12:31:56 +02:00
Hauke Petersen
2e6ccfa13f net/rdcli_simple_standalone: fix error handling 2018-04-12 14:00:32 +02:00
Hauke Petersen
bd25cf5902 net/rdcli_simple: parse RD address from string
this makes the configuration of the RD server much simpler, as it
does not require the user to 'binary-code' the RD server's address
anymore.
2018-04-12 14:00:32 +02:00
Hauke Petersen
faab006631 net/rdcli_simple: improved doc and error handling 2018-04-12 13:48:09 +02:00
012c016b74
Merge pull request #8772 from kaspar030/rework_nanocoap_option_handling
net/nanocoap: rework option handling
2018-04-10 21:11:18 +02:00
dee793d29f nanocoap: rework option handling 2018-04-10 20:58:06 +02:00
Hauke Petersen
7dd897c6d7 net/rdcli_common: fix EP name generation 2018-04-10 10:55:03 +02:00
Hauke Petersen
108284670c net: added RD client for simplified registration 2018-04-09 10:37:10 +02:00
Hauke Petersen
f12d85d032 net/rdcli: added common rdcli module 2018-04-09 10:37:10 +02:00
Martine Lenders
3c93ebc86e
Merge pull request #7699 from nmeum/gcoap-method-not-allowed
gcoap: return Method Not Allowed if appropriate
2018-04-06 15:35:05 +02:00
Ken Bannister
3da9145018 net/gcoap: Internalize definition of state struct 2018-03-31 06:46:05 -04:00
Hauke Petersen
a63f92a7a6 net/gcoap: allow to not define a response handler 2018-03-19 11:56:58 +01:00
Ken Bannister
d7004ebcd8
Merge pull request #8513 from kaspar030/nanocoap_add_context_to_resources
nanocoap: add context pointer to resources
2018-02-22 18:30:43 +00:00
Ken Bannister
81ecd37a5e net/gcoap: fix sock send return type 2018-02-17 06:20:38 -05:00
aa52f5334b sys/net/gcoap: adapt to resource context ptr 2018-02-02 19:01:58 +01:00
0729259390 nanocoap: add context ptr to coap_resource_t 2018-02-02 18:54:29 +01:00
3f990480d1
Merge pull request #7162 from kb2ma/nanocoap/msgid_byte_order
nanocoap: fix byte order of request message ID, and add test application
2018-01-17 22:59:07 +01:00
Sebastian Meiling
50f3d6a427
Merge pull request #7337 from kb2ma/gcoap/confirm_piggy_client
net/gcoap: Confirmable request with piggybacked ACK response
2018-01-16 20:35:32 +01:00
Sebastian Meiling
0d1f40393f
Merge pull request #8362 from beduino-project/gcoap-check-for-ndebug
gcoap: check if NDEBUG is defined
2018-01-16 13:18:41 +01:00
Ken Bannister
4223de6b8b net/gcoap: automate retries for confirm timeout 2018-01-16 06:37:29 -05:00
Sören Tempel
89edc437d5 gcoap: remove the #ifdef DEVELHELP
To make sure the cf variable doesn't trigger an `unsed variable` warning
when compile with `-DNDEBUG`.
2018-01-16 11:06:28 +01:00
Ken Bannister
d5e4da74bf net/gcoap: improve validation of incoming message 2018-01-15 23:21:05 -05:00
Ken Bannister
4062b1f660 net/gcoap: populate confirm request attributes
Also, create resend_bufs array to store PDU for resend.
2018-01-15 23:21:05 -05:00
af991deeb2 sys: net: gcoap: DEBUG fixes 2018-01-15 14:37:04 +01:00
Ken Bannister
c9b6e990f7 net/nanocoap: message ID received in host order 2018-01-12 05:58:52 -05:00
Sören Tempel
35fea645c1 gcoap: return Method Not Allowed if appropriate 2017-12-26 18:17:45 +01:00
Ken Bannister
062bc15f00 net/gcoap: Track remote endpoint for all requests 2017-12-18 06:24:58 -05:00
3367840fa2 sys/net/nanocoap: use submodules 2017-12-01 12:55:45 +01:00
84bc849014 sys: net: nanocoap: ignore Uri-Host option 2017-12-01 12:55:45 +01:00
16bdbe5d32 sys: net: add nanocoap 2017-12-01 12:55:44 +01:00
Ken Bannister
37f272bf2c net/gcoap: Refactor lookup for outstanding request
Add support for a confirmable request and standardize token match.
2017-11-10 06:54:38 -05:00
Ken Bannister
70be8cd5bb net/gcoap: Update copyright for 2017 2017-11-10 06:54:38 -05:00
Ken Bannister
0e93566814 net/gcoap: Update request memo struct for a confirmable request 2017-11-10 06:54:38 -05:00
e7df513567 gcoap: fix resource separator inserting 2017-09-20 11:33:15 +02:00
Hauke Petersen
8908cebe42 net/gcoap: renamed source folder s/coap/gocap/ 2017-08-08 16:39:48 +02:00
Hauke Petersen
8f577eca4c net/gcoap: add Uri-Query handling for requests 2017-08-08 16:22:05 +02:00
Hauke Petersen
32ab8cf724 net/gcoap: expose creation of resource list to API
Creating the resource list is useful outside the /.well-known/core
handler, e.g. for the registration to resource directories.
2017-08-08 16:00:15 +02:00
Hauke Petersen
2290a9f69b net/gcoap: added remote sock ep to resp handler cb
When receiving a response to a request send our earlier, it is in
some cases essential, to know something about who send the reponse.
This is needed for example when sending requests to multicast
addresses to be able to react to different incoming responses.
2017-07-31 11:11:06 +02:00
Hauke Petersen
36322e95b7 net/gcoap: collection of simple fixes (#7413)
* net/gcoap: fixed request state when getting a resp

The request state should be set to GCOAP_MEMO_RESP before calling
the response handler in case we actually go a response...

* net/gcoap: make test for 0.00 code more efficient

This optimization saves the computation of the code and compares
the raw field to `0`.
2017-07-28 14:15:17 +02:00
Hauke Petersen
91ff52a897 net/emcute: use size_t for length comparisons 2017-06-28 22:52:34 +02:00
Hauke Petersen
ae367e5537 net/emcute: check value of length field before use 2017-06-28 22:51:39 +02:00
Ken Bannister
7c0374b975 Reject incoming empty message type as not handled yet 2017-06-22 12:57:34 -04:00
Ken Bannister
19ba56b96f net/gcoap: Add server piggybacked ACK response to a CON request 2017-06-21 22:47:08 -04:00
Ken Bannister
aa2f97c80f net/gcoap: Protect update to open requests with mutex. 2017-06-18 06:29:43 -04:00
Ken Bannister
24b21dbfbc net/gcoap: Protect message ID state with atomic updates.
Also changed semantics for storage of message ID, from last ID to next ID.
This change provides idiomatic use of the return value of the atomic
function, without other side effects on gcoap.
2017-06-18 06:16:15 -04:00
Cenk Gündoğan
935292ce44 gcoap: make stack size configurable 2017-06-07 08:20:35 +02:00
Hauke Petersen
7ba22cfbf8 net/gcoap: added some additional debug output 2017-06-01 11:13:15 +02:00
Hauke Petersen
bb90e293a2 net/gcoap: make input parameters const 2017-05-26 16:34:40 +02:00
Ken Bannister
9d37be2729 gcoap: Add server-side Observe registration and notifications. 2017-05-23 17:55:04 -04:00
Hauke Petersen
ba5635889c net/gcoap: make gcoap_op_state return count directly 2017-05-22 13:50:59 +02:00
Hauke Petersen
cd4109100f net/gcoap: fixed coding style issue 2017-05-22 13:47:36 +02:00
Ken Bannister
7c19ad65e2 gcoap: Fix compilation error when client token length macro set to 0. 2017-04-24 22:21:53 -04:00
cfd10c394a adapt to changed byteorder.h 2017-04-13 11:35:35 +02:00
Martine Lenders
33991832d1 Merge pull request #6694 from kaspar030/add_sock_dns_client
sys: net: add sock dns client
2017-03-29 10:14:38 +02:00
7af03ab624 sys: net: introduce simple sock DNS client 2017-03-28 20:49:53 +02:00
Martine Lenders
c513eb1027 sntp: fix for new xtimer API and some bugs 2017-03-06 13:38:25 +01:00
Hauke Petersen
bb71986ecf net: added emCute - introducing MQTT-SN support 2017-02-28 16:58:29 +01:00
Ken Bannister
af1eca907f gcoap: Rebase messaging on sock API 2017-01-20 22:00:25 -05:00
Ken Bannister
fa815993ae gcoap: Move from gnrc directory up to net directory 2017-01-20 16:14:13 -05:00
Oleg Hahm
4f4214235b timex: unambiguous time conversion macros 2017-01-19 13:18:08 +01:00
3af5e3e315 sys: net: uhcpc: port to sock 2016-11-14 14:50:04 +01:00
Luminita
cf3f02c2e1 sntp: initial import 2016-10-30 22:00:02 +01:00
4fb07a852d sys: net: add UHCP protocol code and gnrc client implementation 2016-04-11 17:03:28 +02:00
Martine Lenders
58ff31bfe9 gnrc: make all gnrc modules sub-modules of gnrc 2015-08-18 23:00:07 +02:00
Martine Lenders
b969eeb217 gnrc: rename ng_netbase to gnrc 2015-08-18 16:11:55 +02:00
Martine Lenders
203561e741 ipv6_addr: remove ng_ prefix 2015-08-11 13:27:07 +02:00
Martine Lenders
9cf5e5fb6a ieee802154: remove ng_ prefix 2015-08-07 14:36:04 +02:00
Hauke Petersen
38956457a1 sys: adapted to renamed netopt header 2015-08-06 15:37:11 +02:00
Martine Lenders
3d9945667f Merge pull request #3496 from authmillenon/ng_pktbuf/enh/new_default
ng_pktbuf: new default packet buffer implementation
2015-07-29 02:08:46 +02:00
Martine Lenders
377f5ccbee gnrc: replace ng_pktbuf_add() with ng_pktbuf_mark() where it's needed 2015-07-29 00:47:30 +02:00
Martine Lenders
6f56b983f0 gnrc: replace all instances of ng_netconf with ng_netopt 2015-07-28 13:33:12 +02:00
Joakim Gebart
aaeaa968e6 sys/net/application_layer/ng_zep: Add missing inttypes.h includes 2015-07-07 00:53:26 +02:00
Martine Lenders
c5318336ae net: intial import of the ZEP protocol 2015-07-02 15:47:19 +02:00