Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
e1bebed5
Commit
e1bebed5
authored
6 years ago
by
Ken Bannister
Browse files
Options
Downloads
Patches
Plain Diff
net/nanocoap: make reply doc more specific
parent
7e77ac7a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys/include/net/nanocoap.h
+8
-3
8 additions, 3 deletions
sys/include/net/nanocoap.h
with
8 additions
and
3 deletions
sys/include/net/nanocoap.h
+
8
−
3
View file @
e1bebed5
...
...
@@ -322,8 +322,11 @@ int coap_parse(coap_pkt_t *pkt, uint8_t *buf, size_t len);
*
* This function can be used to create a reply to any CoAP request packet. It
* will create the reply packet header based on parameters from the request
* (e.g., id, token). Passing a non-zero @p payload_len will ensure the payload
* fits into the buffer along with the header.
* (e.g., id, token).
*
* Passing a non-zero @p payload_len will ensure the payload fits into the
* buffer along with the header. For this validation, payload_len must include
* any options, the payload marker, as well as the payload proper.
*
* @param[in] pkt packet to reply to
* @param[in] code reply code (e.g., COAP_CODE_204)
...
...
@@ -333,6 +336,7 @@ int coap_parse(coap_pkt_t *pkt, uint8_t *buf, size_t len);
*
* @returns size of reply packet on success
* @returns <0 on error
* @returns -ENOSPC if @p rbuf too small
*/
ssize_t
coap_build_reply
(
coap_pkt_t
*
pkt
,
unsigned
code
,
uint8_t
*
rbuf
,
unsigned
rlen
,
unsigned
payload_len
);
...
...
@@ -343,7 +347,7 @@ ssize_t coap_build_reply(coap_pkt_t *pkt, unsigned code,
* This is a simple wrapper that allows for building CoAP replies for simple
* use-cases.
*
* The reply will be written to @p buf. I
s
@p payload and @p payload_len
* The reply will be written to @p buf. I
f
@p payload and @p payload_len
are
* non-zero, the payload will be copied into the resulting reply packet.
*
* @param[in] pkt packet to reply to
...
...
@@ -356,6 +360,7 @@ ssize_t coap_build_reply(coap_pkt_t *pkt, unsigned code,
*
* @returns size of reply packet on success
* @returns <0 on error
* @returns -ENOSPC if @p buf too small
*/
ssize_t
coap_reply_simple
(
coap_pkt_t
*
pkt
,
unsigned
code
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment