aboutsummaryrefslogtreecommitdiffstats
path: root/packet-clnp.c
AgeCommit message (Collapse)AuthorFilesLines
2000-08-13Add the "Edit:Protocols..." feature which currently only implementsLaurent Deniel1-1/+4
the following: It is now possible to enable/disable a particular protocol decoding (i.e. the protocol dissector is void or not). When a protocol is disabled, it is displayed as Data and of course, all linked sub-protocols are disabled as well. Disabling a protocol could be interesting: - in case of buggy dissectors - in case of wrong heuristics - for performance reasons - to decode the data as another protocol (TODO) Currently (if I am not wrong), all dissectors but NFS can be disabled (and dissectors that do not register protocols :-) I do not like the way the RPC sub-dissectors are disabled (in the sub-dissectors) since this could be done in the RPC dissector itself, knowing the sub-protocol hfinfo entry (this is why, I've not modified the NFS one yet). Two functions are added in proto.c : gboolean proto_is_protocol_enabled(int n); void proto_set_decoding(int n, gboolean enabled); and two MACROs which can be used in dissectors: OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree) CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree) See also the XXX in proto_dlg.c and proto.c around the new functions. svn path=/trunk/; revision=2267
2000-08-07Allow either old-style (pre-tvbuff) or new-style (tvbuffified)Guy Harris1-19/+19
dissectors to be registered as dissectors for particular ports, registered as heuristic dissectors, and registered as dissectors for conversations, and have routines to be used both by old-style and new-style dissectors to call registered dissectors. Have the code that calls those dissectors translate the arguments as necessary. (For conversation dissectors, replace "find_conversation_dissector()", which just returns a pointer to the dissector, with "old_try_conversation_dissector()" and "try_conversation_dissector()", which actually call the dissector, so that there's a single place at which we can do that translation. Also make "dissector_lookup()" static and, instead of calling it and, if it returns a non-null pointer, calling that dissector, just use "old_dissector_try_port()" or "dissector_try_port()", for the same reason.) This allows some dissectors that took old-style arguments and immediately translated them to new-style arguments to just take new-style arguments; make them do so. It also allows some new-style dissectors not to have to translate arguments before calling routines to look up and call dissectors; make them not do so. Get rid of checks for too-short frames in new-style dissectors - the tvbuff code does those checks for you. Give the routines to register old-style dissectors, and to call dissectors from old-style dissectors, names beginning with "old_", with the routines for new-style dissectors not having the "old_". Update the dissectors that use those routines appropriately. Rename "dissect_data()" to "old_dissect_data()", and "dissect_data_tvb()" to "dissect_data()". svn path=/trunk/; revision=2218
2000-08-06Add some preferences in OSI CLNP/COTP/CLTP module to allow the user to:Laurent Deniel1-2/+20
- specify the NSAP selector for OSI transport decoding (default is still 0x21 which is valid for DECNet-OSI at least). - force the OSI C{L,O}TP decoding whatever the NSAP is (option disabled by default). svn path=/trunk/; revision=2217
2000-07-10Treat only ASCII characters as printable in TSAPs; otherwise, as 0xffGuy Harris1-3/+10
and 0xfe, for example, are printable characters in many locales (they're printable in ISO 8859/x, for example), a TSAP of 0xfffffffefffffffe will be treated as printable if your locale is one of those, even though the chances that the TSAP is should be read as a string of y-with-diaresis and lower-case thorn are pretty slim. svn path=/trunk/; revision=2131
2000-07-01Add support for OSI CLTP.Guy Harris1-723/+761
Redo the way the variable part of COTP and CLTP packets are handled, by having a single routine to handle it for all packets, rather than having the dissector for each type of packet handle the parameters those packets are supposed to have. Fix "is_LI_NORMAL_AK()" to test (heuristically) whether an AK COTP packet is normal rather than extended, rather than testing whether it's normal, and invert the test where it's used (i.e. make what it does correspond to what its name says, which means we invert the test it does, and then change the code that uses it appropriately). Add support for the "preferred maximum TPDU size" and "inactivity timer" parameters, and fix various problems in the dissection of particular parameters. svn path=/trunk/; revision=2100
2000-05-31Add routines for adding items to a protocol tree that take arguments ofGuy Harris1-19/+19
a particular type, rather than taking a varargs list, along the lines of the "proto_tree_add_XXX_format()" routines. Replace most calls to "proto_tree_add_item()" and "proto_tree_add_item_hidden()" with calls to those routines. Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that don't take the item to be added as an argument - instead, they fetch the argument from the packet whose tvbuff was handed to them, from the offset handed to them. svn path=/trunk/; revision=2031
2000-05-11Add tvbuff class.Gilbert Ramirez1-181/+181
Add exceptions routines. Convert proto_tree_add_*() routines to require tvbuff_t* argument. Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as the tvbuff_t* argument to proto_tree_add_*() routines. dissect_packet() creates a tvbuff_t, wraps the next dissect call in a TRY block, will print "Short Frame" on the proto_tree if a BoundsError exception is caught. The FDDI dissector is converted to use tvbuff's. svn path=/trunk/; revision=1939
2000-05-05Add routines to:Guy Harris1-5/+10
register lists of "heuristic" dissectors, which are handed a frame that may or may contain a payload for the protocol they dissect, and that return FALSE if it's not or dissect the packet and return TRUE if it is; add a dissector to such a list; go through such a list, calling each dissector until either a dissector returns TRUE, in which case the routine returns TRUE, or it runs out of entries in the list, in which case the routine returns FALSE. Have lists of heuristic dissectors for TCP and for COTP when used with the Inactive Subset of CLNP, and add the GIOP and Yahoo Messenger dissectors to the first list and the Sinec H1 dissector to the second list. Make the dissector name argument to "dissector_add()" and "dissector_delete()" a "const char *" rarther than just a "char *". Add "heur_dissector_add()", the routine to add a heuristic dissector to a list of heuristic dissectors, to the set of routines we can export to plugins through a table on platforms where dynamically-loaded code can't call stuff in the main program, and initialize the element in the table in question for "dissector_add()" (which we'd forgotten to do). svn path=/trunk/; revision=1909
2000-04-28Changes from Gerrit Gehnen toGuy Harris1-3/+7
1) fix some problems with the SINEC H1 dissector; 2) make it easier to plug in other dissectors atop OSI transport protocols (by making the H1 dissector return an indication of whether it recognizes the packet as an H1 packet or not, so that, if it doesn't, additional dissectors can be tried). svn path=/trunk/; revision=1895
2000-04-18 Fix the checksum option decoding in the CC/CR TPDU variable part.Laurent Deniel1-3/+3
svn path=/trunk/; revision=1879
2000-04-17Register an "osinl" dissector table for ISO/IEC TR 9577 NLPID values,Guy Harris1-2/+9
and have dissectors for protocols that run at the OSI network layer register themselves with it using "dissector_add()". Make various dissectors static if they can be, and remove from header files declarations of those dissectors. svn path=/trunk/; revision=1873
2000-04-16 Remove TODO comments about NSAP and ISIS decodings sinceLaurent Deniel1-8/+1
this is implemented now. svn path=/trunk/; revision=1868
2000-04-15Ralf Schneider's changes to enhance to OSI CLNP, CLTP, and ISIS supportGuy Harris1-0/+1777
and to add OSI ESIS support. svn path=/trunk/; revision=1865