Helper functions for CoAP server. More...
#include <stdlib.h>#include "coap/coap_server.h"#include "coap/coap_server_transport.h"#include "coap/coap_server_misc.h"#include "coap/coap_common.h"#include "coap/coap_debug.h"#include "debug.h"Go to the source code of this file.
Macros | |
| #define | TRACE_LEVEL COAP_TRACE_LEVEL | 
Functions | |
| void | coapServerTick (CoapServerContext *context) | 
| Handle periodic operations.  More... | |
| error_t | coapServerProcessRequest (CoapServerContext *context, const uint8_t *data, size_t length) | 
| Process CoAP request.  More... | |
| error_t | coapServerRejectRequest (CoapServerContext *context) | 
| Reject a CoAP request.  More... | |
| error_t | coapServerInitResponse (CoapServerContext *context) | 
| Initialize CoAP response message.  More... | |
| error_t | coapServerSendResponse (CoapServerContext *context, const void *data, size_t length) | 
| Send CoAP response.  More... | |
| error_t | coapServerFormatReset (CoapServerContext *context, uint16_t mid) | 
| Format Reset message.  More... | |
Detailed Description
Helper functions for CoAP server.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
 - 2.5.4
 
Definition in file coap_server_misc.c.
Macro Definition Documentation
◆ TRACE_LEVEL
| #define TRACE_LEVEL COAP_TRACE_LEVEL | 
Definition at line 32 of file coap_server_misc.c.
Function Documentation
◆ coapServerFormatReset()
| error_t coapServerFormatReset | ( | CoapServerContext * | context, | 
| uint16_t | mid | ||
| ) | 
Format Reset message.
- Parameters
 - 
  
[in] context Pointer to the CoAP server context [in] mid Message ID  
- Returns
 - Error code
 
Definition at line 412 of file coap_server_misc.c.
◆ coapServerInitResponse()
| error_t coapServerInitResponse | ( | CoapServerContext * | context | ) | 
Initialize CoAP response message.
- Parameters
 - 
  
[in] context Pointer to the CoAP server context  
- Returns
 - Error code
 
Definition at line 301 of file coap_server_misc.c.
◆ coapServerProcessRequest()
| error_t coapServerProcessRequest | ( | CoapServerContext * | context, | 
| const uint8_t * | data, | ||
| size_t | length | ||
| ) | 
Process CoAP request.
- Parameters
 - 
  
[in] context Pointer to the CoAP server context [in] data Pointer to the incoming CoAP message [in] length Length of the CoAP message, in bytes  
- Returns
 - Error code
 
Definition at line 114 of file coap_server_misc.c.
◆ coapServerRejectRequest()
| error_t coapServerRejectRequest | ( | CoapServerContext * | context | ) | 
Reject a CoAP request.
- Parameters
 - 
  
[in] context Pointer to the CoAP server context  
- Returns
 - Error code
 
Definition at line 255 of file coap_server_misc.c.
◆ coapServerSendResponse()
| error_t coapServerSendResponse | ( | CoapServerContext * | context, | 
| const void * | data, | ||
| size_t | length | ||
| ) | 
Send CoAP response.
- Parameters
 - 
  
[in] context Pointer to the CoAP server context [in] data Pointer to a buffer containing the response message [in] length Length of the response message, in bytes  
- Returns
 - Error code
 
Definition at line 349 of file coap_server_misc.c.
◆ coapServerTick()
| void coapServerTick | ( | CoapServerContext * | context | ) | 
Handle periodic operations.
- Parameters
 - 
  
[in] context Pointer to the CoAP server context  
Definition at line 52 of file coap_server_misc.c.
