From ac94964b45ffefcad32b30c539a44c6eee38b38a Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Tue, 28 Mar 2017 15:45:12 +0200 Subject: [PATCH] pdu.h: new methods FETCH, PATCH, iPATCH from RFC 8132 --- include/coap/pdu.h | 3 +++ src/debug.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/coap/pdu.h b/include/coap/pdu.h index 7ed482de..2ac55b97 100644 --- a/include/coap/pdu.h +++ b/include/coap/pdu.h @@ -51,6 +51,9 @@ #define COAP_REQUEST_POST 2 #define COAP_REQUEST_PUT 3 #define COAP_REQUEST_DELETE 4 +#define COAP_REQUEST_FETCH 5 /* RFC 8132 */ +#define COAP_REQUEST_PATCH 6 /* RFC 8132 */ +#define COAP_REQUEST_IPATCH 7 /* RFC 8132 */ /* CoAP option types (be sure to update check_critical when adding options */ diff --git a/src/debug.c b/src/debug.c index 87880c29..cc611fe4 100644 --- a/src/debug.c +++ b/src/debug.c @@ -271,7 +271,8 @@ msg_type_string(unsigned short t) { /** Returns a textual description of the method or response code. */ static const char * msg_code_string(unsigned short c) { - static char *methods[] = { "0.00", "GET", "POST", "PUT", "DELETE", "PATCH" }; + static char *methods[] = { "0.00", "GET", "POST", "PUT", "DELETE", + "FETCH", "PATCH", "iPATCH" }; static char buf[5]; if (c < sizeof(methods)/sizeof(char *)) {