Loopback/CTP: Modernize packet parsing style.
The change made in commit
bdd97f54 was safe, but was slightly incorrect.
Before the change the decoder used the _declared_ end of packet (the
initial "cp" + the initial "len") as the target of how much data to try
to decode, and whilst trying to do that it could cross the _captured_ end
of packet (ndo_snapend) and give up complaining, so the output would
correctly indicate there was supposed to be more data beyond the
unexpected snapshot end.
After the change the decoder started to use the captured end of packet to
tell where the packet ends, so it would never cross ndo_snapend, but it
would interpret the packet data as if the missing part was never supposed
to be there and would thus decode truncated packets incorrectly.
In order to eliminate this space for misinterpretation, remove the "ep"
pointer and change the code both to advance "cp" and to decrease "len" as
it is going through the protocol structures, so the part of the packet
that is supposed to be present but has not been decoded yet can be
addressed by just "cp" and "len" (like it is done in many functions
elsewhere). Let the GET_ macros guard the snapshot end and use nd_trunc()
to handle the remaining ND_TCHECK_LEN() instances.
Articulate the part of the message sized by skipCount.