1 /* 2 * Copyright (c) 2018 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * 10 * @brief CoAP implementation for Zephyr. 11 */ 12 13 #ifndef ZEPHYR_INCLUDE_NET_COAP_LINK_FORMAT_H_ 14 #define ZEPHYR_INCLUDE_NET_COAP_LINK_FORMAT_H_ 15 16 /** 17 * @addtogroup coap COAP Library 18 * @{ 19 */ 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 /** 26 * This resource should be added before all other resources that should be 27 * included in the responses of the .well-known/core resource. 28 */ 29 #define COAP_WELL_KNOWN_CORE_PATH \ 30 ((const char * const[]) { ".well-known", "core", NULL }) 31 32 int coap_well_known_core_get(struct coap_resource *resource, 33 struct coap_packet *request, 34 struct coap_packet *response, 35 uint8_t *data, uint16_t len); 36 37 /** 38 * In case you want to add attributes to the resources included in the 39 * 'well-known/core' "virtual" resource, the 'user_data' field should point 40 * to a valid coap_core_metadata structure. 41 */ 42 struct coap_core_metadata { 43 const char * const *attributes; 44 void *user_data; 45 }; 46 47 #ifdef __cplusplus 48 } 49 #endif 50 51 /** 52 * @} 53 */ 54 55 #endif /* ZEPHYR_INCLUDE_NET_COAP_LINK_FORMAT_H_ */ 56