improve packet sniffer display

This commit is contained in:
Sebastien Lorquet 2015-08-07 12:26:06 +02:00
parent 853e9892b8
commit b9ae8069b7

View File

@ -258,7 +258,7 @@ static int status(int fd)
static int display(FAR struct ieee802154_packet_s *pack) static int display(FAR struct ieee802154_packet_s *pack)
{ {
int i; int i;
printf("Packet len=%u rssi=%u lqi=%u [\n", pack->len, pack->rssi, pack->lqi); printf("len=%3u rssi=%3u lqi=%3u [", pack->len, pack->rssi, pack->lqi);
for (i = 0; i < pack->len; i++) for (i = 0; i < pack->len; i++)
{ {
printf("%02X", pack->data[i]); printf("%02X", pack->data[i]);
@ -314,6 +314,13 @@ static int sniff(int fd, int chan)
return ret; return ret;
} }
/****************************************************************************
* Name : tx
*
* Description :
* Transmit a frame.
****************************************************************************/
static int tx(int fd, int chan, FAR struct ieee802154_packet_s *pack) static int tx(int fd, int chan, FAR struct ieee802154_packet_s *pack)
{ {
int i,ret; int i,ret;