diff --git a/sys/include/net/nanocoap.h b/sys/include/net/nanocoap.h index ab2b3502403eb523e9e4c2ea59ee909192ca1b95..5e3ffb4b9a78bd85ac88a02baf05c476c5f5b67f 100644 --- a/sys/include/net/nanocoap.h +++ b/sys/include/net/nanocoap.h @@ -175,7 +175,7 @@ extern "C" { /** * @brief Nanocoap-specific value to indicate no format specified */ -#define COAP_FORMAT_NONE (65535) +#define COAP_FORMAT_NONE (UINT16_MAX) /** * @name Nanocoap specific maximum values diff --git a/sys/net/application_layer/gcoap/gcoap.c b/sys/net/application_layer/gcoap/gcoap.c index ac0f770337874ef85aa8147469b79acb3fd3caed..fe7236e6f443b6d4eed5e903c5e9f3eed2d1d547 100644 --- a/sys/net/application_layer/gcoap/gcoap.c +++ b/sys/net/application_layer/gcoap/gcoap.c @@ -38,6 +38,12 @@ #define GCOAP_RESOURCE_WRONG_METHOD -1 #define GCOAP_RESOURCE_NO_PATH -2 +/* + * gcoap internal Content-Format option value. Not intended for use in a + * transmitted packet. Must be a 3-byte unsigned value. + */ +#define COAP_FORMAT_NO_PAYLOAD (UINT16_MAX + 1) + /* Internal functions */ static void *_event_loop(void *arg); static void _listen(sock_udp_t *sock);