net.c: Update .well-known/core handling to use common logic

This removes a lot of code duplication by creating a pseudo resource
for .well-known/core that is not included in the .well-known/core output.
In particular specific Block2 option handling is no longer required.

Updated tests which now include checking that queries work.
This commit is contained in:
Jon Shallow authored and obgm committed 2022-06-17 12:12:45 +02:00
1 parent 6b32ed3de2
commit 41afb92141
5 files changed
+100 -273

No files matched your search

+1 -1
View File
@@ -136,7 +136,7 @@ void coap_delete_attr(coap_attr_t *attr);
coap_print_status_t coap_print_wellknown(coap_context_t *,
unsigned char *,
size_t *, size_t,
coap_opt_t *);
const coap_string_t *);
/** @} */
+3
View File
@@ -75,6 +75,9 @@ typedef void (*coap_method_handler_t)
*/
#define COAP_RESOURCE_FLAGS_NOTIFY_NON_ALWAYS 0x4
/* Place holder for other work - not tested against in this PR */
#define COAP_RESOURCE_FLAGS_HAS_MCAST_SUPPORT 0x8
/**
* Creates a new resource object and initializes the link field to the string
* @p uri_path. This function returns the new coap_resource_t object.