Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

sniffer: remove gnrc_netif header; read LQI #33

Merged
merged 1 commit into from
Jun 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sniffer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@ static char rawdmp_stack[THREAD_STACKSIZE_MAIN];
void dump_pkt(gnrc_pktsnip_t *pkt)
{
gnrc_pktsnip_t *snip = pkt;
gnrc_netif_hdr_t *netif_hdr = pkt->next->data;
uint8_t lqi = netif_hdr->lqi;

pkt = gnrc_pktbuf_remove_snip(pkt, pkt->next);
uint64_t now_us = xtimer_usec_from_ticks64(xtimer_now64());

printf("rftest-rx --- len 0x%02x lqi 0x%02x rx_time 0x%08" PRIx32 "%08" PRIx32 "\n\n",
gnrc_pkt_len(pkt), 0, (uint32_t)(now_us >> 32), (uint32_t)(now_us & 0xffffffff));
gnrc_pkt_len(pkt), lqi, (uint32_t)(now_us >> 32), (uint32_t)(now_us & 0xffffffff));

while (snip) {
for (size_t i = 0; i < snip->size; i++) {
Expand Down