-
Notifications
You must be signed in to change notification settings - Fork 36
sniffer: remove gnrc_netif header; read LQI #33
Conversation
Since the device is in raw mode, we don't have any network layer modules included and we subscribe to `GNRC_NETTYPE_UNDEF` it is safe to assume that `pkt->next` in `dump_pkt()` is the `gnrc_netif` header. This only contains GNRC-internal information and should thus be removed from the dump (though Wireshark seems to be okay with the extra bytes, a reader of the raw data might be confused). Since this header however contains the LQI, which the sniffer claims to output but always returns 0, the LQI value in the `gnrc_netif` header is read and set before the deletion of that header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
untested ACK
@cgundogan are you still planning to test? |
@miri64 nope:
It probably is just a config error somewhere on my side, @pyropeter do you want to test? It seems to work for you. |
I will test this. By the way: I got the same error as @cgundogan until I lowered the baud rate to |
Looks like the sniffer script needs better input sanitation for when there are garbage characters in the stream. |
Yeah... the LQI isn't even parsed by the script, so this PR shouldn't make the problem (and it doesn't make sense to test this PR with that script either then ;-)). |
(as a "try to get it to fail" test, yes, but not as functionality test. There it is enough if with |
@cgundogan @pyropeter @gebart but regarding input sanitation: have a look at #35 |
This seems to work. The output shows some values as LQI, and wireshark still shows the traffic. |
@pyropeter thanks a bunch! |
To add LQI information to the packet dump, we should wait for IETF-OPSAWG-WG/draft-ietf-opsawg-pcap#48 |
Question is, if developments to PCAPNG are backported to PCAP ;-) |
…-netif_hdr sniffer: remove gnrc_netif header; read LQI
Since the device is in raw mode, we don't have any network layer
modules included and we subscribe to
GNRC_NETTYPE_UNDEF
it is safeto assume that
pkt->next
indump_pkt()
is thegnrc_netif
header.This only contains GNRC-internal information and should thus be removed
from the dump (though Wireshark seems to be okay with the extra bytes,
a reader of the raw data might be confused).
Since this header however contains the LQI, which the sniffer claims to
output but always returns 0, the LQI value in the
gnrc_netif
headeris read and set before the deletion of that header.