diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-03 06:56:03 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-03 06:56:03 +0000 |
commit | 0e7c1de08a9e6b453b47c60a698a24387d63719a (patch) | |
tree | 3d72ae6a3dba0301ae7eb98baf0c993eec9500d6 /packet-frame.c | |
parent | 6c75aa83f9559312b7a3d3bf5989ab6668dbd076 (diff) |
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
Diffstat (limited to 'packet-frame.c')
-rw-r--r-- | packet-frame.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/packet-frame.c b/packet-frame.c index 8e225bf62a..bd04a7de29 100644 --- a/packet-frame.c +++ b/packet-frame.c @@ -2,7 +2,7 @@ * * Top-most dissector. Decides dissector based on Wiretap Encapsulation Type. * - * $Id: packet-frame.c,v 1.5 2000/12/29 04:16:57 guy Exp $ + * $Id: packet-frame.c,v 1.6 2001/01/03 06:55:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -185,11 +185,20 @@ proto_register_frame(void) wtap_encap_dissector_table = register_dissector_table("wtap_encap"); - proto_frame = proto_register_protocol("Frame", "frame"); + proto_frame = proto_register_protocol("Frame", "Frame", "frame"); proto_register_field_array(proto_frame, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - proto_short = proto_register_protocol("Short Frame", "short"); - proto_malformed = proto_register_protocol("Malformed Frame", "malformed"); + /* You can't disable dissection of "Frame", as that would be + tantamount to not doing any dissection whatsoever. */ + proto_set_cant_disable(proto_frame); + proto_short = proto_register_protocol("Short Frame", "Short frame", "short"); + proto_malformed = proto_register_protocol("Malformed Frame", + "Malformed frame", "malformed"); + + /* "Short Frame" and "Malformed Frame" aren't really protocols, + they're error indications; disabling them makes no sense. */ + proto_set_cant_disable(proto_short); + proto_set_cant_disable(proto_malformed); } |