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
0e1c3ebe
Commit
0e1c3ebe
authored
6 years ago
by
Ken Bannister
Browse files
Options
Downloads
Patches
Plain Diff
net/gcoap: make options buf macros configurable
parent
6a4c764c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sys/include/net/gcoap.h
+30
-0
30 additions, 0 deletions
sys/include/net/gcoap.h
sys/net/application_layer/gcoap/gcoap.c
+0
-9
0 additions, 9 deletions
sys/net/application_layer/gcoap/gcoap.c
with
30 additions
and
9 deletions
sys/include/net/gcoap.h
+
30
−
0
View file @
0e1c3ebe
...
@@ -258,6 +258,36 @@ extern "C" {
...
@@ -258,6 +258,36 @@ extern "C" {
#define GCOAP_PDU_BUF_SIZE (128)
#define GCOAP_PDU_BUF_SIZE (128)
#endif
#endif
/**
* @brief Reduce payload length by this value for a request
*
* Accommodates writing Content-Format option in gcoap_finish(). May set to
* zero if function not used.
*/
#ifndef GCOAP_REQ_OPTIONS_BUF
#define GCOAP_REQ_OPTIONS_BUF (4)
#endif
/**
* @brief Reduce payload length by this value for a response
*
* Accommodates writing Content-Format option in gcoap_finish(). May set to
* zero if function not used.
*/
#ifndef GCOAP_RESP_OPTIONS_BUF
#define GCOAP_RESP_OPTIONS_BUF (4)
#endif
/**
* @brief Reduce payload length by this value for an observe notification
*
* Accommodates writing Content-Format option in gcoap_finish(). May set to
* zero if function not used.
*/
#ifndef GCOAP_OBS_OPTIONS_BUF
#define GCOAP_OBS_OPTIONS_BUF (4)
#endif
/**
/**
* @brief Maximum number of requests awaiting a response
* @brief Maximum number of requests awaiting a response
*/
*/
...
...
This diff is collapsed.
Click to expand it.
sys/net/application_layer/gcoap/gcoap.c
+
0
−
9
View file @
0e1c3ebe
...
@@ -38,15 +38,6 @@
...
@@ -38,15 +38,6 @@
#define GCOAP_RESOURCE_WRONG_METHOD -1
#define GCOAP_RESOURCE_WRONG_METHOD -1
#define GCOAP_RESOURCE_NO_PATH -2
#define GCOAP_RESOURCE_NO_PATH -2
/*
* Reduce payload length by this value for a request created with
* gcoap_req_init(), gcoap_resp_init(), and gcoap_obs_init(), respectively.
* Accommodates writing Content-Format option in gcoap_finish().
*/
#define GCOAP_REQ_OPTIONS_BUF (4)
#define GCOAP_RESP_OPTIONS_BUF (4)
#define GCOAP_OBS_OPTIONS_BUF (4)
/* Internal functions */
/* Internal functions */
static
void
*
_event_loop
(
void
*
arg
);
static
void
*
_event_loop
(
void
*
arg
);
static
void
_listen
(
sock_udp_t
*
sock
);
static
void
_listen
(
sock_udp_t
*
sock
);
...
...
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