Commit Graph

23 Commits

Author SHA1 Message Date
Guy Harris 5cf5c87abc From Joerg Mayer: get rid of some unused arguments, and make some
routines not used outside the file in which they're defined static.

svn path=/trunk/; revision=5144
2002-04-11 09:38:03 +00:00
Guy Harris 03e5890761 Label the data source for various forms of reassembled data with the
protocol that fragmented them, rather than just calling them
"Reassembled".  Do the same with uncompressed WCP data.

svn path=/trunk/; revision=4822
2002-02-27 05:45:48 +00:00
Guy Harris 6a21dc7e44 Don't give tvbuffs names; instead, give data sources names, where a
"data source" has a name and a top-level tvbuff, and frames can have a
list of data sources associated with them.

Use the tvbuff pointer to determine which data source is the data source
for a given field; this means we don't have to worry about multiple data
sources with the same name - the only thing the name does is label the
notebook tab for the display of the data source, and label the hex dump
of the data source in print/Tethereal output.

Clean up a bunch of things discovered in the process of doing the above.

svn path=/trunk/; revision=4749
2002-02-18 01:08:44 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4370
2001-12-10 00:26:21 +00:00
Guy Harris bced8711f6 Make "dissector_add()", "dissector_delete()", and "dissector_change()"
take a dissector handle as an argument, rather than a pointer to a
dissector function and a protocol ID.  Associate dissector handles with
dissector table entries.

svn path=/trunk/; revision=4308
2001-12-03 04:00:26 +00:00
Guy Harris 9161ba8e7f Make "fr_subdissector_table" static - it's not used outside the Frame
Relay dissector.

svn path=/trunk/; revision=4298
2001-11-30 04:39:45 +00:00
Guy Harris 95267f647a Get rid of some code to set "pinfo->current_proto"; let the Ethereal
infrastructure do it for the dissectors.

Make some WCP dissector routines static.

svn path=/trunk/; revision=4283
2001-11-27 07:36:23 +00:00
Guy Harris 07b2709f8a Change "conversation_set_dissector()" to take a dissector handle, rather
than a pointer to a dissector function, as an argument.

This means that the conversation dissector is called through
"call_dissector()", so the dissector itself doesn't have to worry about
checking whether the protocol is enabled or setting
"pinfo->current_proto", so get rid of the code that does that in
conversation dissectors.  Also, make the conversation dissectors static.

Get rid of some direct calls to dissectors; replace them with calls
through handles, and, again, get rid of code to check whether a protocol
is enabled and set "pinfo->current_proto" where that code isn't needed.
Make those dissectors static if they aren't already static.

Add a routine "create_dissector_handle()" to create a dissector handle
without registering it by name, if the dissector isn't used outside the
module in which it's defined.

svn path=/trunk/; revision=4281
2001-11-27 07:13:32 +00:00
Guy Harris bd90493d46 If we have to worry about subdissectors changing the "packet_info"
structure, we may have to worry about it in more places than the places
that *used* to set "pi.len" and "pi.captured_len", so there's no point
in just saving and restoring it there.  We'll remove those
saves/restores, and worry about saves and restores when we find a
problem.

svn path=/trunk/; revision=4245
2001-11-21 21:37:26 +00:00
Guy Harris 2f10c7f630 Get rid of the "len" and "captured_len" members of the "packet_info"
structure; they're no longer used.

svn path=/trunk/; revision=4236
2001-11-20 22:29:07 +00:00
Guy Harris 4a5538085f Get rid of NullTVB, the "compat_top_tvb" member of the "packet_info"
structure, the check for a null tvbuff pointer in "alloc_field_info()",
and the "tvb_create_from_top()" macro; they're no longer needed, as
there's no non-tvbuffified dissector code remaining.

svn path=/trunk/; revision=4205
2001-11-15 10:58:51 +00:00
Guy Harris 3388bde488 Instead of having a single datum attached to a conversation, have a list
of protocol-id-plus-datum pairs, so that multiple protocols can attach
information to the same conversation.

Dissectors that attach information to a conversation should not assume
that if they find a conversation it has one of its data attached to it;
the conversation might've been created by another dissector.

svn path=/trunk/; revision=3901
2001-09-03 10:33:12 +00:00
Guy Harris 8412393197 From Joerg Mayer: explicitly fill in all members of a
"header_field_info" structure, including the ones that are later set by
the routines to register fields.

svn path=/trunk/; revision=3561
2001-06-18 02:18:27 +00:00
Guy Harris 7f0aaa324d If the tvbuff pointer is null in "alloc_field_info()", get the data
source name from "pi.compat_top_tvb", which should always be set to the
tvbuff that refers to the data that old-style dissectors are currently
working on.

Arrange that it be so set in those dissectors that create alternate data
sources and call other dissectors, and also arrange that "pi.len" and
"pi.captured_len" be set appropriately as well.

svn path=/trunk/; revision=3286
2001-04-10 19:10:10 +00:00
Guy Harris a8cbb073d4 NLPID's of 0x08 and 0x09 should be labeled as Q.933 and LMI,
respectively, not Q.931 and Q.2931, in Frame Relay.

When dissecting Q.933-style multiprotocol encapsulated Frame Relay
frames, use the "osinl" dissector table to check for OSI network layer
protocols, include the NLPID in the tvbuff you hand to
"dissector_try_port()" with that dissector table, and put the NLPID into
the protocol tree as an invisible item - the NLPID is considered part of
the PDU for those protocols, so you have to include it in the tvbuff,
and the dissector will put it into the protocol tree.

Also, make sure the top-level entry for the Frame Relay protocol
includes all the bytes preceding the payload, and none of the payload
bytes.

Export a routine to do Q.933-style dissection, and have the WCP
dissector call it, rather than duplicating that code in the WCP
dissector.

Don't register OSI network layer protocols with the "fr.ietf" dissector
table; it's now sufficient to register them with the "osinl" dissector
table, as the Frame Relay dissector now checks that.

Get rid of unnecessary checks for protocols being enabled (if the
dissector is always called through handles or dissector tables, the
common code for handles and dissector tables will do the checks for
you).

Get rid of some unnecessary #includes.

svn path=/trunk/; revision=3211
2001-03-30 10:51:50 +00:00
Guy Harris 41904dc303 Add WCP to the list of Ethernet types in "etype_vals[]", and add
"compressed" to the list of NLPIDs in "nlpid_vals[]".

Use "nlpid_vals" for the Frame Relay NLPID field.

svn path=/trunk/; revision=3206
2001-03-29 08:05:07 +00:00
Guy Harris 1eadf2b520 An NLPID of 0xb0 is defined by ISO/IEC TR 9577 to be "Data compression
protocol"; give it a more generic name than NLPID_WCP.

svn path=/trunk/; revision=3204
2001-03-29 06:09:50 +00:00
Jeff Foster 963080eb33 Added the created tvbuff into the original tvbuff chain so clean-up is performed.
svn path=/trunk/; revision=3192
2001-03-26 18:55:27 +00:00
Guy Harris d0ac50e4e7 Add "volatile" qualifiers so that variables survive a setjmp/longjmp
operation.

svn path=/trunk/; revision=3175
2001-03-23 21:58:37 +00:00
Guy Harris 5632391770 Pull the NLPID for Wellfleet compression into "nlpid.h".
svn path=/trunk/; revision=3173
2001-03-23 21:49:23 +00:00
Jeff Foster 41a89b2b91 Fixed problem in wcp_uncompress. If the proto_tree was null the program
would segfault when creating the sub-tree.

svn path=/trunk/; revision=3170
2001-03-23 20:47:17 +00:00
Jeff Foster c400685ad6 Updated the frame relay dissector - dissect-fr.c
Added the LMI dissector for frame relay - dissect-lmi.c
Added Wellfleet compression dissector - dissect-wcp.c

svn path=/trunk/; revision=3168
2001-03-23 19:22:02 +00:00