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

Commit

Permalink
Merge pull request #33 from miri64/sniffer/fix/rm-netif_hdr
Browse files Browse the repository at this point in the history
sniffer: remove gnrc_netif header; read LQI
  • Loading branch information
cgundogan committed Jun 19, 2018
2 parents 7d35c1d + 01c7c5b commit 1d21756
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sniffer/main.c
Expand Up @@ -53,11 +53,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

0 comments on commit 1d21756

Please sign in to comment.