Print out sender IPv6 address when receiving data. When sending data, include a counter in the message.

This commit is contained in:
Adam Dunkels 2011-09-01 09:19:26 +02:00
parent 6220e231a2
commit 722b6e0b96
2 changed files with 6 additions and 2 deletions

View file

@ -67,7 +67,9 @@ receiver(struct simple_udp_connection *c,
const uint8_t *data,
uint16_t datalen)
{
printf("Data received on port %d from port %d with length %d: '%s'\n",
printf("Data received from ");
uip_debug_ipaddr_print(sender_addr);
printf(" on port %d from port %d with length %d: '%s'\n",
receiver_port, sender_port, datalen, data);
}
/*---------------------------------------------------------------------------*/