Zephyr API Documentation  3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
coap_link_format.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
13#ifndef ZEPHYR_INCLUDE_NET_COAP_LINK_FORMAT_H_
14#define ZEPHYR_INCLUDE_NET_COAP_LINK_FORMAT_H_
15
21#ifdef __cplusplus
22extern "C" {
23#endif
24
30#define COAP_WELL_KNOWN_CORE_PATH \
31 ((const char * const[]) { ".well-known", "core", NULL })
32
45 const struct coap_packet *request,
46 struct coap_packet *response,
47 uint8_t *data, uint16_t data_len);
48
62 size_t resources_len,
63 const struct coap_packet *request,
64 struct coap_packet *response,
65 uint8_t *data, uint16_t data_len);
66
74 const char * const *attributes;
76 void *user_data;
77};
78
79#ifdef __cplusplus
80}
81#endif
82
87#endif /* ZEPHYR_INCLUDE_NET_COAP_LINK_FORMAT_H_ */
int coap_well_known_core_get(struct coap_resource *resource, const struct coap_packet *request, struct coap_packet *response, uint8_t *data, uint16_t data_len)
Build a CoAP response for a .well-known/core CoAP request.
int coap_well_known_core_get_len(struct coap_resource *resources, size_t resources_len, const struct coap_packet *request, struct coap_packet *response, uint8_t *data, uint16_t data_len)
Build a CoAP response for a .well-known/core CoAP request.
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
In case you want to add attributes to the resources included in the 'well-known/core' "virtual" resou...
Definition: coap_link_format.h:72
void * user_data
User specific data.
Definition: coap_link_format.h:76
const char *const * attributes
List of attributes to add.
Definition: coap_link_format.h:74
Representation of a CoAP Packet.
Definition: coap.h:295
Description of CoAP resource.
Definition: coap.h:263