Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Check for end of packet?

From: "Kevin A. Noll" <spamknoll@xxxxxxxxxxxxx>
Date: Wed, 09 May 2007 14:53:25 -0400

I know this should be easy to do, but I can't find it written down in
anything I can readily find...

I'm trying to decode a packet that has TLVs at the end of it. One of the
possible TLVs is a "NULL" TLV, which is simply one or more bytes with the
zero value. However, if it's any other kind of TLV, it is likely to start
with a zero and then be followed by another value that indicates the actual
type.

How do I check for that second byte without reading past the end of the
packet buffer?

--kan--
--
Kevin A. Noll, KD4WOZ
CCIE, CCDP
Versatile, Inc.		
Kevin.Noll@xxxxxxxxxxxxx
+1-717-796-1936