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:
parent
501a5b951f
commit
9ad9265623
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user