Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-tpkt.c packet-tpkt.h packet-q931.c
guy 2002/02/01 20:51:21 CST
Modified files:
. packet-tpkt.c packet-tpkt.h packet-q931.c
Log:
Clean up the heuristic code in the Q.931 dissector. If it's a heuristic
dissector, it's looking for Q.931 encapsulated inside TPKT, so it
shouldn't check whether the first byte is NLPID_Q_931 or not, as it
*won't* be NLPID_Q_931, it'll be 3, for the TPKT version. It should
first check whether "is_tpkt()" thinks it's a TPKT packet, and then
check that the packet has at least 3 bytes past the TPKT header, then
check the first byte in the payload to see whether it's NLPID_Q_931. If
that all succeeds, treat it as Q.931 inside TPKT.
Make "is_tpkt()" return the length from the TPKT header on success, and
-1 on failure, and return the offset past the TPKT header via a pointer
(so clients don't have to know that the TPKT header is 4 bytes long).
Revision Changes Path
1.11 +37 -31 ethereal/packet-tpkt.c
1.5 +7 -6 ethereal/packet-tpkt.h
1.36 +38 -70 ethereal/packet-q931.c