mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/pkg: make use of nanocoap_resources
This commit is contained in:
parent
07152de04c
commit
67411db26f
@ -26,6 +26,7 @@ USEMODULE += sock_udp
|
||||
# Additional networking modules that can be dropped if not needed
|
||||
USEMODULE += gnrc_icmpv6_echo
|
||||
USEMODULE += nanocoap_sock
|
||||
USEMODULE += nanocoap_resources
|
||||
|
||||
# include this for printing IP addresses
|
||||
USEMODULE += shell_cmds_default
|
||||
|
@ -98,14 +98,10 @@ ssize_t _edhoc_handler(coap_pkt_t *pkt, uint8_t *buf, size_t len, coap_request_c
|
||||
return msg_len;
|
||||
}
|
||||
|
||||
/* must be sorted by path (ASCII order) */
|
||||
const coap_resource_t coap_resources[] = {
|
||||
COAP_WELL_KNOWN_CORE_DEFAULT_HANDLER,
|
||||
{ "/.well-known/edhoc", COAP_POST, _edhoc_handler, NULL },
|
||||
NANOCOAP_RESOURCE(edhoc) {
|
||||
.path = "/.well-known/edhoc", .methods = COAP_POST, .handler = _edhoc_handler
|
||||
};
|
||||
|
||||
const unsigned coap_resources_numof = ARRAY_SIZE(coap_resources);
|
||||
|
||||
int responder_cmd(int argc, char **argv)
|
||||
{
|
||||
if (argc < 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user