]> The Tcpdump Group git mirrors - tcpdump/commit
realtek: redo the checks for different protocols.
authorGuy Harris <[email protected]>
Wed, 26 Jan 2022 07:43:57 +0000 (23:43 -0800)
committerGuy Harris <[email protected]>
Wed, 26 Jan 2022 07:43:57 +0000 (23:43 -0800)
commit1af6dea4120b6d566f7c4e6eff0179b6fa819ba9
treeff889c329e5ad9a72509f86e1a21626b7efd10a3
parentb7fac5e13dc1a85caf92d0c22d7f83feeae8f656
realtek: redo the checks for different protocols.

Do it iwth an if chain, which is somewhat the equivalent of what
Wireshark does (it uses heuristic dissectors; our ifs do the same checks
that Wireshark's heuristic dissectors do).

That makes it a bit more obvious that the necessary tests are somewhat
weird, thanks to Realtek not just deciding to make the first octet a
protocol discriminator *even for switch tags*.

We also treat a first octet of 0x23 as meanin RLDP, just as Wireshark
does, as some switch chips use 0x23 for loop detection packets.

Shuffle some comments while we're at it (and epand the one for RLDP to
match all the stuff going on with various RLDP packets).
print-realtek.c