mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:52:44 +01:00
pkg/tinydtls: allow to set buffer size from application again
This commit is contained in:
parent
4b1b0a9257
commit
252ec91782
@ -19,21 +19,6 @@ ifeq (llvm,$(TOOLCHAIN))
|
|||||||
CFLAGS += -Wno-format-nonliteral
|
CFLAGS += -Wno-format-nonliteral
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter gcoap,$(USEMODULE)))
|
|
||||||
# Configuring the buffer large enough that a full Gcoap packet can be
|
|
||||||
# encrypted or decrypted.
|
|
||||||
|
|
||||||
# This is the default in gcoap.h, which we don't have access to, so it is copied over.
|
|
||||||
CONFIG_GCOAP_PDU_BUF_SIZE := $(or $(CONFIG_GCOAP_PDU_BUF_SIZE),128)
|
|
||||||
|
|
||||||
# If there were another way to set up DTLS_MAX_BUF, we'd need to set the
|
|
||||||
# maximum of these here.
|
|
||||||
#
|
|
||||||
# 29 bytes are the overhead measured with Wireshark on packets exchanged in
|
|
||||||
# default configuration; adding some to be safe against variable size fields.
|
|
||||||
CFLAGS += "-DDTLS_MAX_BUF=($(CONFIG_GCOAP_PDU_BUF_SIZE) + 36)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
# TinyDTLS emits several messages during connection establishment at the info
|
# TinyDTLS emits several messages during connection establishment at the info
|
||||||
# level; this is way more verbose than common in RIOT.
|
# level; this is way more verbose than common in RIOT.
|
||||||
TINYDTLS_LOG_LEVEL ?= LOG_WARNING
|
TINYDTLS_LOG_LEVEL ?= LOG_WARNING
|
||||||
|
@ -75,3 +75,6 @@ HANDSHAKE_MAX := $(or $(CONFIG_DTLS_HANDSHAKE_MAX),$(patsubst -DCONFIG_DTLS_HAND
|
|||||||
ifneq (,$(HANDSHAKE_MAX))
|
ifneq (,$(HANDSHAKE_MAX))
|
||||||
CFLAGS += -DDTLS_HANDSHAKE_MAX=$(HANDSHAKE_MAX)
|
CFLAGS += -DDTLS_HANDSHAKE_MAX=$(HANDSHAKE_MAX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
DTLS_MAX_BUF ?= 200
|
||||||
|
CFLAGS += "-DDTLS_MAX_BUF=$(DTLS_MAX_BUF)"
|
||||||
|
Loading…
Reference in New Issue
Block a user