1d5010e126
nanocoap: make separate tree handling function
...
This refactors nanocoap to seperate out the resource tree parsing. It
allows for calling the tree handler with custom resource trees. The
advantage is that a resource with COAP_MATCH_SUBTREE can parse a new
separate resource tree.
2020-03-23 15:08:53 +01:00
Ken Bannister
c55837d809
net/nanocoap: add query option directly
2020-03-12 08:44:26 -04:00
Aiman Ismail
64f9658472
nanocoap: add coap_opt_add_uquery2()
2020-03-05 19:06:14 +01:00
Ken Bannister
0ed4fe2da6
net/coap: move/rename function to add query option
2020-01-29 09:23:47 -05:00
d4f3747705
sys/net: fix typos
2019-11-23 22:39:38 +01:00
8b06560c02
sys/net/nanocoap: correctly initialize array
2019-10-30 17:03:06 +01:00
95da51bd7f
sys/net/nanocoap: fix potential use of uinitialized variable
2019-10-30 17:03:06 +01:00
5d1480a4b8
sys/net/nanocoap: fail when start data cannot be parsed
2019-10-30 17:03:06 +01:00
1aa1e2c8cc
sys/net/nanocoap: return ENOENT if parsing option failed
...
This fixes a potential use of uninitialized len in subsequent function calls.
This was reported by scan-build
2019-10-30 17:03:06 +01:00
Ken Bannister
2dc4209c0e
net/nanocoap: optimize determination of exponent for block szx
2019-10-03 13:17:09 -04:00
Ken Bannister
e22d4729e1
net/nanocoap: initialize offset attribute
2019-10-02 05:51:59 -04:00
Ken Bannister
2abcbc0d20
net/coap: add generic get block function
2019-10-02 05:51:59 -04:00
Ken Bannister
5eaa51e426
net/nanocoap: remove unused function
2019-10-02 05:51:59 -04:00
Ken Bannister
efb75c5c4c
net/coap: improve slicer to block helper
2019-10-02 05:51:59 -04:00
Ken Bannister
dae9c4ab89
net/nanocoap: use coap_opt_add_uint() and remove unused
2019-10-02 05:51:59 -04:00
Ken Bannister
233dd31e17
net/nanocoap: add generic uint block option
2019-10-02 05:51:59 -04:00
benpicco
e942f86837
Merge pull request #11056 from kb2ma/coap/pkt_api_block_write
...
net/gcoap: add/use Packet API Block implementation
2019-09-24 21:43:33 +02:00
Ken Bannister
39eddce078
net/nanocoap: add function to retrieve opaque option
2019-09-11 05:40:14 -04:00
Sebastian Meiling
9f5951d216
Merge pull request #10214 from bergzand/pr/nanocoap/flags_uint32t
...
nanocoap: change method flag type to uint16_t
2019-09-09 12:33:17 +03:00
4d399bf444
nanocoap: change method flag type to uint32_t
2019-09-09 09:40:14 +02:00
Ken Bannister
4e89741b79
net/nanocoap: add function to iterate over options
2019-08-24 06:51:29 -04:00
Ken Bannister
6c8e646b83
net/nanocoap: check for payload marker when parse option
2019-08-24 06:51:29 -04:00
Ken Bannister
513ddfd79c
net/nanocoap: add Packet API block write functions
2019-08-02 09:46:24 -04:00
Ken Bannister
64b4e0ad2d
net/nanocoap: add block slicer init function
2019-07-30 13:10:10 -04:00
Ken Bannister
a6f919ef3e
net/nanocoap: refactor block2_finish()
2019-07-30 13:10:10 -04:00
Ken Bannister
86edea81be
net/nanocoap: use block init helper internally
2019-07-30 13:10:10 -04:00
Ken Bannister
69efaa1d56
net/nanocoap: add block init helper function
2019-07-30 13:10:10 -04:00
Ken Bannister
9dce54b54b
net/nanocoap: refactor block option control use
2019-07-22 05:42:08 -04:00
Ken Bannister
4311f17e81
net/nanocoap: refactor block option put
2019-07-22 05:42:08 -04:00
Ken Bannister
64ba8e4ea9
net/nanocoap: document internal option functions
2019-07-18 05:21:40 -04:00
6c02521591
nanocoap: make coap_get_block2() actually fill struct
2019-07-05 15:29:58 +02:00
0ec9c57b2b
add copyrights from IOTPUSH project
2019-05-02 12:09:37 +02:00
chrysn
09dc930d3a
nanocoap: add some const qualifiers
2019-04-12 11:04:47 +02:00
chrysn
a51460984b
nanocoap: Add coap_opt_add_opaque
...
This option complements the existing coap_opt_add_{uint,string} and even
more special-purpose functions; its implementation is trivial given the
existing static _add_opt_pkt function.
The method is useful when working with ETags (ETag, If-Match options).
2019-04-12 11:04:47 +02:00
88171698e0
Merge pull request #10931 from kb2ma/nanocoap/pktapi_opt_enospc
...
net/nanocoap: Packet API return error if buffer full
2019-04-03 14:49:44 +02:00
Ken Bannister
5bf2fc6227
net/nanocoap: return error from coap_opt_finish if no space
2019-03-19 05:30:04 -04:00
Ken Bannister
3cdf43607c
net/nanocoap: Return error from coap_opt_add_xxx() if no space
2019-03-19 05:30:04 -04:00
Leandro Lanzieri
6bb4158c31
sys/net/application_layer/nanocoap: Add path prefix opt
...
This adds a prefix option for the methods field of a coap resource and
modifies the way the path is matched on a request to accept prefix
matching.
2019-03-17 14:26:11 +01:00
Sebastian Meiling
a65fede8c4
Merge pull request #10855 from kb2ma/nanocoap/simple_reply_safety
...
net/nanocoap: verify simple reply buffer
2019-01-24 12:08:31 +01:00
Ken Bannister
3343ed3674
net/nanocoap: verify reply length before write
2019-01-24 05:18:12 -05:00
Ken Bannister
e35bcb6853
net/nanocoap: fix remaining space calculation
...
The space calculation must use the same length as the eventual
return value.
2019-01-23 16:36:20 -05:00
Ken Bannister
85a658634f
net/nanocoap: validate option length before write
2019-01-18 12:34:55 -05:00
Ken Bannister
b9f6354067
net/nanocoap: document function that writes option header
2019-01-18 12:34:55 -05:00
4b1b0aa84e
sys/net/nanocoap: fix possible option_count overflow
2019-01-14 12:30:06 +01:00
Ken Bannister
424a01ddc1
net/gcoap: remove gcoap attributes from coap_pkt_t
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
18ae8ef90d
net/nanocoap: use coap_data_ptr instead of hdr.data
2018-11-02 16:33:29 +01: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
551b3513db
nanocoap: Add server-side block2 support
2018-10-14 14:30:29 +02:00
Hauke Petersen
f3f673eb45
net/nanocoap: factor out generic CoAP defines
2018-09-26 14:31:57 +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
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
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
4897222e7e
nanocoap: add server-side block1 support
2018-04-16 12:31:56 +02:00
dee793d29f
nanocoap: rework option handling
2018-04-10 20:58:06 +02:00
0729259390
nanocoap: add context ptr to coap_resource_t
2018-02-02 18:54:29 +01:00
Ken Bannister
c9b6e990f7
net/nanocoap: message ID received in host order
2018-01-12 05:58:52 -05: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