From 59f9745c0487bc85fdfb0b0f34d82264fbb4b500 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Thu, 3 Aug 2017 15:22:08 +0200 Subject: [PATCH] debug.c: added media type names from RFC 8152 print_content_format() converts numeric Content-Format specifiers to readable media type names. This change adds the new content formats from RFC 8152 to this list. --- src/debug.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index da4dca04..c9b26c8f 100644 --- a/src/debug.c +++ b/src/debug.c @@ -345,7 +345,16 @@ print_content_format(unsigned int format_type, { COAP_MEDIATYPE_APPLICATION_OCTET_STREAM, "application/octet-stream" }, { COAP_MEDIATYPE_APPLICATION_EXI, "application/exi" }, { COAP_MEDIATYPE_APPLICATION_JSON, "application/json" }, - { COAP_MEDIATYPE_APPLICATION_CBOR, "application/cbor" } + { COAP_MEDIATYPE_APPLICATION_CBOR, "application/cbor" }, + { COAP_MEDIATYPE_APPLICATION_COSE_SIGN, "application/cose; cose-type=\"cose-sign\"" }, + { COAP_MEDIATYPE_APPLICATION_COSE_SIGN1, "application/cose; cose-type=\"cose-sign1\"" }, + { COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT, "application/cose; cose-type=\"cose-encrypt\"" }, + { COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT0, "application/cose; cose-type=\"cose-encrypt0\"" }, + { COAP_MEDIATYPE_APPLICATION_COSE_MAC, "application/cose; cose-type=\"cose-mac\"" }, + { COAP_MEDIATYPE_APPLICATION_COSE_MAC0, "application/cose; cose-type=\"cose-mac0\"" }, + { COAP_MEDIATYPE_APPLICATION_COSE_KEY, "application/cose-key" }, + { COAP_MEDIATYPE_APPLICATION_COSE_KEY_SET, "application/cose-key-set" }, + { 75, "application/dcaf+cbor" } }; size_t i;