1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/pkg_microcoap: use netifs_print_ipv6()

This commit is contained in:
Marian Buschsieweke 2022-06-02 12:39:08 +02:00
parent 501a5b951f
commit 9ad9265623
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94
2 changed files with 5 additions and 8 deletions

View File

@ -15,9 +15,6 @@ USEMODULE += xtimer
USEPKG += microcoap
# include this for printing IP addresses
USEMODULE += shell_commands
# Use different settings when compiling for one of the following (low-memory)
# boards
LOW_MEMORY_BOARDS := nucleo-f334r8

View File

@ -18,14 +18,13 @@
*/
#include <stdio.h>
#include "msg.h"
#include "net/netif.h"
#include "xtimer.h"
void microcoap_server_loop(void);
/* import "ifconfig" shell command, used for printing addresses */
extern int _gnrc_netif_config(int argc, char **argv);
int main(void)
{
puts("RIOT microcoap test application");
@ -34,8 +33,9 @@ int main(void)
xtimer_sleep(3);
/* print network addresses */
puts("Configured network interfaces:");
_gnrc_netif_config(0, NULL);
printf("{\"IPv6 addresses\": [\"");
netifs_print_ipv6("\", \"");
puts("\"]}");
/* start coap server loop */
microcoap_server_loop();