Merge pull request #75 from mrdeep1/libcoap_upgrade
coap: Update libcoap library to commit 8fbe440
This commit is contained in:
commit
cb19419c16
|
@ -9,37 +9,32 @@ endif()
|
||||||
set(include_dirs port/include port/include libcoap/include)
|
set(include_dirs port/include port/include libcoap/include)
|
||||||
|
|
||||||
set(srcs
|
set(srcs
|
||||||
"libcoap/src/address.c"
|
|
||||||
"libcoap/src/async.c"
|
|
||||||
"libcoap/src/block.c"
|
"libcoap/src/block.c"
|
||||||
|
"libcoap/src/coap_address.c"
|
||||||
"libcoap/src/coap_asn1.c"
|
"libcoap/src/coap_asn1.c"
|
||||||
|
"libcoap/src/coap_async.c"
|
||||||
"libcoap/src/coap_cache.c"
|
"libcoap/src/coap_cache.c"
|
||||||
"libcoap/src/coap_debug.c"
|
"libcoap/src/coap_debug.c"
|
||||||
"libcoap/src/coap_event.c"
|
"libcoap/src/coap_event.c"
|
||||||
"libcoap/src/coap_hashkey.c"
|
"libcoap/src/coap_hashkey.c"
|
||||||
"libcoap/src/coap_io.c"
|
"libcoap/src/coap_io.c"
|
||||||
"libcoap/src/coap_notls.c"
|
"libcoap/src/coap_notls.c"
|
||||||
|
"libcoap/src/coap_option.c"
|
||||||
"libcoap/src/coap_prng.c"
|
"libcoap/src/coap_prng.c"
|
||||||
"libcoap/src/coap_session.c"
|
"libcoap/src/coap_session.c"
|
||||||
|
"libcoap/src/coap_subscribe.c"
|
||||||
"libcoap/src/coap_tcp.c"
|
"libcoap/src/coap_tcp.c"
|
||||||
"libcoap/src/coap_time.c"
|
"libcoap/src/coap_time.c"
|
||||||
"libcoap/src/encode.c"
|
"libcoap/src/encode.c"
|
||||||
"libcoap/src/mem.c"
|
"libcoap/src/mem.c"
|
||||||
"libcoap/src/net.c"
|
"libcoap/src/net.c"
|
||||||
"libcoap/src/option.c"
|
|
||||||
"libcoap/src/pdu.c"
|
"libcoap/src/pdu.c"
|
||||||
"libcoap/src/resource.c"
|
"libcoap/src/resource.c"
|
||||||
"libcoap/src/str.c"
|
"libcoap/src/str.c"
|
||||||
"libcoap/src/subscribe.c"
|
|
||||||
"libcoap/src/uri.c"
|
"libcoap/src/uri.c"
|
||||||
"port/src/coap_mbedtls.c")
|
"libcoap/src/coap_mbedtls.c")
|
||||||
|
|
||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
INCLUDE_DIRS "${include_dirs}"
|
INCLUDE_DIRS "${include_dirs}"
|
||||||
REQUIRES lwip mbedtls)
|
REQUIRES lwip mbedtls)
|
||||||
|
|
||||||
# Needed for coap headers in public builds, also.
|
|
||||||
#
|
|
||||||
# TODO: find a way to move this to a port header
|
|
||||||
target_compile_definitions(${COMPONENT_LIB} PUBLIC WITH_POSIX)
|
|
||||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
|
||||||
|
|
37
coap/Kconfig
37
coap/Kconfig
|
@ -29,6 +29,10 @@ menu "CoAP Configuration"
|
||||||
at runtime in order to enable CoAP debug output via the ESP
|
at runtime in order to enable CoAP debug output via the ESP
|
||||||
log mechanism.
|
log mechanism.
|
||||||
|
|
||||||
|
Note: The Mbed TLS library logging is controlled by the mbedTLS
|
||||||
|
configuration, but logging level mbedTLS must be set for CoAP
|
||||||
|
to log it.
|
||||||
|
|
||||||
choice COAP_MBEDTLS_DEBUG_LEVEL
|
choice COAP_MBEDTLS_DEBUG_LEVEL
|
||||||
bool "Set CoAP debugging level"
|
bool "Set CoAP debugging level"
|
||||||
depends on COAP_MBEDTLS_DEBUG
|
depends on COAP_MBEDTLS_DEBUG
|
||||||
|
@ -69,4 +73,37 @@ menu "CoAP Configuration"
|
||||||
default 7 if COAP_LOG_DEBUG
|
default 7 if COAP_LOG_DEBUG
|
||||||
default 9 if COAP_LOG_MBEDTLS
|
default 9 if COAP_LOG_MBEDTLS
|
||||||
|
|
||||||
|
config COAP_TCP_SUPPORT
|
||||||
|
bool "Enable TCP within CoAP"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Enable TCP functionality for CoAP. This is required if TLS sessions
|
||||||
|
are to be used.
|
||||||
|
|
||||||
|
If this option is disabled, redundent CoAP TCP code is removed.
|
||||||
|
|
||||||
|
config COAP_CLIENT_SUPPORT
|
||||||
|
bool "Enable Client functionality within CoAP"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable client functionality (ability to make requests and receive
|
||||||
|
responses) for CoAP. If the server is going to act as a proxy, then
|
||||||
|
this needs to be enabled to support the ongoing session going to
|
||||||
|
the next hop.
|
||||||
|
|
||||||
|
If this option is disabled, redundent CoAP client only code is removed.
|
||||||
|
If both this option and COAP_SERVER_SUPPORT are disabled, then both
|
||||||
|
are automatically enabled for backwards compatability.
|
||||||
|
|
||||||
|
config COAP_SERVER_SUPPORT
|
||||||
|
bool "Enable Server functionality within CoAP"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable server functionality (ability to receive requests and send
|
||||||
|
responses) for CoAP.
|
||||||
|
|
||||||
|
If this option is disabled, redundent CoAP server only code is removed.
|
||||||
|
If both this option and COAP_CLIENT_SUPPORT are disabled, then both
|
||||||
|
are automatically enabled for backwards compatability.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
version: "4.3.0~2"
|
version: "4.3.0~3"
|
||||||
description: Constrained Application Protocol (CoAP) C Library
|
description: Constrained Application Protocol (CoAP) C Library
|
||||||
url: https://github.com/espressif/idf-extra-components/tree/master/coap
|
url: https://github.com/espressif/idf-extra-components/tree/master/coap
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3aa11612c143c9734d72022720f33e12506f7a2c
|
Subproject commit 8fbe440f8aaa68d6bfcb25e2ad8e68404a38f0ef
|
|
@ -24,24 +24,24 @@ extern "C" {
|
||||||
#include "coap3/libcoap.h"
|
#include "coap3/libcoap.h"
|
||||||
|
|
||||||
#include "coap3/coap_forward_decls.h"
|
#include "coap3/coap_forward_decls.h"
|
||||||
#include "coap3/address.h"
|
|
||||||
#include "coap3/async.h"
|
|
||||||
#include "coap3/block.h"
|
#include "coap3/block.h"
|
||||||
|
#include "coap3/coap_address.h"
|
||||||
|
#include "coap3/coap_async.h"
|
||||||
#include "coap3/coap_cache.h"
|
#include "coap3/coap_cache.h"
|
||||||
|
#include "coap3/coap_debug.h"
|
||||||
#include "coap3/coap_dtls.h"
|
#include "coap3/coap_dtls.h"
|
||||||
#include "coap3/coap_event.h"
|
#include "coap3/coap_event.h"
|
||||||
#include "coap3/coap_io.h"
|
#include "coap3/coap_io.h"
|
||||||
|
#include "coap3/coap_option.h"
|
||||||
|
#include "coap3/coap_prng.h"
|
||||||
|
#include "coap3/coap_subscribe.h"
|
||||||
#include "coap3/coap_time.h"
|
#include "coap3/coap_time.h"
|
||||||
#include "coap3/coap_debug.h"
|
|
||||||
#include "coap3/encode.h"
|
#include "coap3/encode.h"
|
||||||
#include "coap3/mem.h"
|
#include "coap3/mem.h"
|
||||||
#include "coap3/net.h"
|
#include "coap3/net.h"
|
||||||
#include "coap3/option.h"
|
|
||||||
#include "coap3/pdu.h"
|
#include "coap3/pdu.h"
|
||||||
#include "coap3/coap_prng.h"
|
|
||||||
#include "coap3/resource.h"
|
#include "coap3/resource.h"
|
||||||
#include "coap3/str.h"
|
#include "coap3/str.h"
|
||||||
#include "coap3/subscribe.h"
|
|
||||||
#include "coap3/uri.h"
|
#include "coap3/uri.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -39,4 +39,20 @@
|
||||||
|
|
||||||
#define COAP_RESOURCES_NOHASH
|
#define COAP_RESOURCES_NOHASH
|
||||||
|
|
||||||
|
/* Note: If neither of COAP_CLIENT_SUPPORT or COAP_SERVER_SUPPORT is set,
|
||||||
|
then libcoap sets both for backward compatability */
|
||||||
|
#ifdef CONFIG_COAP_CLIENT_SUPPORT
|
||||||
|
#define COAP_CLIENT_SUPPORT 1
|
||||||
|
#endif /* CONFIG_COAP_CLIENT_SUPPORT */
|
||||||
|
|
||||||
|
#ifdef CONFIG_COAP_SERVER_SUPPORT
|
||||||
|
#define COAP_SERVER_SUPPORT 1
|
||||||
|
#endif /* CONFIG_COAP_SERVER_SUPPORT */
|
||||||
|
|
||||||
|
#ifdef CONFIG_COAP_TCP_SUPPORT
|
||||||
|
#define COAP_DISABLE_TCP 0
|
||||||
|
#else /* ! CONFIG_COAP_TCP_SUPPORT */
|
||||||
|
#define COAP_DISABLE_TCP 1
|
||||||
|
#endif /* ! CONFIG_COAP_TCP_SUPPORT */
|
||||||
|
|
||||||
#endif /* _CONFIG_H_ */
|
#endif /* _CONFIG_H_ */
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#define HAVE_STRUCT_CMSGHDR
|
#define HAVE_STRUCT_CMSGHDR
|
||||||
#define HAVE_PTHREAD_H
|
#define HAVE_PTHREAD_H
|
||||||
#define HAVE_PTHREAD_MUTEX_LOCK
|
#define HAVE_PTHREAD_MUTEX_LOCK
|
||||||
#define COAP_DISABLE_TCP 0
|
|
||||||
|
|
||||||
#define ipi_spec_dst ipi_addr
|
#define ipi_spec_dst ipi_addr
|
||||||
struct in6_pktinfo {
|
struct in6_pktinfo {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue