Commit Graph

13 Commits

Author SHA1 Message Date
Guy Harris 43ccfd8054 Add an additional "protocol index" argument to "{old_}dissector_add()",
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and
"register_dissector()", so that an entry in those tables has associated
with it the protocol index of the protocol the dissector handles (or -1,
if there is no protocol index for it).

This is for future use in a number of places.

(Arguably, "proto_register_protocol()" should take a dissector pointer
as an argument, but

	1) it'd have to handle both regular and heuristic dissectors;

	2) making it take either a "dissector_t" or a union of that and
	   a "heur_dissector_t" introduces some painful header-file
	   interdependencies

so I'm punting on that for now.  As with other Ethereal internal APIs,
these APIs are subject to change in the future, at least until Ethereal
1.0 comes out....)

svn path=/trunk/; revision=2849
2001-01-09 06:32:10 +00:00
Guy Harris 3613c121fe Add a new "prefs_register_protocol()" routine, which is like
"prefs_register_module()" except that it takes a protocol index as
returned by "proto_register_protocol()" as its first argument, rather
than taking two character strings as arguments as its first two
arguments, and uses the protocol's abbreviation as the name to use for
preferences in the preferences file and the "-o" flag and uses the
protocol's short name as the name to use in the tabs in the
"Edit->Preferences" window.

svn path=/trunk/; revision=2812
2001-01-03 07:53:48 +00:00
Guy Harris 0e7c1de08a Have "proto_register_protocol()" build a list of data structures for
protocols, in addition to adding structures to the list of filterable
fields.  Give it an extra argument that specifies a "short name" for the
protocol, for use in such places as

	pinfo->current_proto;

	the dialog box for constructing filters;

	the preferences tab for the protocol;

and so on (although we're not yet using it in all those places).

Make the preference name that appears in the preferences file and the
command line for the DIAMETER protocol "diameter", not "Diameter"; the
convention is that the name in question be all-lower-case.

Make some routines and variables that aren't exported static.

Update a comment in the ICP dissector to make it clear that the
dissector won't see fragments other than the first fragment of a
fragmented datagram.

svn path=/trunk/; revision=2810
2001-01-03 06:56:03 +00:00
Richard Sharpe f8aed7c659 Fix egregious error with AF_ types. I relied on a Linux header file rather
than checking RFC1700.

svn path=/trunk/; revision=2745
2000-12-04 13:40:11 +00:00
Guy Harris 35bf0b2abc Don't loop infinitely if we see a Host Address or unknown Forwarding
Equivalence Class.

Set "pinfo->current_proto", so that if we run past the end of the data
the problem is noted as being with LDP.

svn path=/trunk/; revision=2743
2000-12-04 06:05:49 +00:00
Richard Sharpe 6d30ba2b97 Stealing time again to compulsively code this beast.
Still more TLVs to code ...

svn path=/trunk/; revision=2734
2000-12-03 02:37:56 +00:00
Richard Sharpe 8482bcd0ab Dissect Common Hello Params TLV ...
Still more work to do though ...

svn path=/trunk/; revision=2733
2000-12-02 14:23:04 +00:00
Guy Harris 0ab8e159b9 Some tvbuffified dissectors weren't setting "pinfo->current_proto", so
that if they threw an exception, the wrong protocol would be blamed.
Add the missing assignments.

Clean up the extraction of the null-encapsulation header.

svn path=/trunk/; revision=2730
2000-12-02 08:41:08 +00:00
Richard Sharpe 7c5911a9c6 Fix one small type WRT Forwarding Equivalence Classes and handle the
illegal padding by trying to skip it.

svn path=/trunk/; revision=2727
2000-12-01 09:40:12 +00:00
Richard Sharpe 1aa04e3836 A much more complete LDP dissector.
Still more work to do though, as I want to dissect the various message
types correctly, and to dissect TLVs much more as well.

The dissector currently handles multiple messages in a PDU, as the trace
file I have has some of those.

I think that the equipment that generated the LDP trace I have has a bug.

It seems to think that TLVs must be alligned on 4-byte boundaries, while the
spec (draft) says that there are no alignment requirements :-)

Don't know what generated the trace :-)

svn path=/trunk/; revision=2726
2000-12-01 09:05:46 +00:00
Richard Sharpe 749e87cb6f Step-wise improvement on this thing ... next to dissect each message type
more fully.

Apparently, LDP allows multiple messages per PDU. Has anyone seen such an
implementation?

svn path=/trunk/; revision=2724
2000-11-30 20:27:40 +00:00
Richard Sharpe 8af1fc6550 More work in progress on the Label Distribution Protocol dissector ...
Bit more work to do, and a list of TLV values, and I am away :-)

svn path=/trunk/; revision=2720
2000-11-30 06:24:53 +00:00
Richard Sharpe 88f954cfa2 Initial coding of the dissector for the Label Distribution Protocol.
It registers the same dissector for the LDP port for both TCP and UDP.

Still a lot of work to do, but we can see the header now.

svn path=/trunk/; revision=2714
2000-11-29 13:15:01 +00:00