aboutsummaryrefslogtreecommitdiffstats
path: root/packet-isis.c
Commit message (Collapse)AuthorAgeFilesLines
* Move dissectors to epan/dissectors directory.Gilbert Ramirez2004-07-181-329/+0
| | | | | | | | | | Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410
* Set the svn:eol-style property on all text files to "native", so thatGuy Harris2004-07-181-1/+1
| | | | | | | | | they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
* Don't use hardwired offsets when dissecting the ISIS header - we'reGuy Harris2003-03-311-8/+8
| | | | | | already advancing "offset" through the header, so use it. svn path=/trunk/; revision=7386
* From Hannes Gredler: make the IS-IS dissector more verbose in the INFOGuy Harris2002-08-291-5/+5
| | | | | | | | | | | | | | field - specifically for IIHs the System-ID of the Hello; LSPs the LSP-ID, Sequence #, Lifetime; CSNPs the LAN-ID, Start LSP-ID, End LSP-ID. and change the display of some IDs. Clean up white space. svn path=/trunk/; revision=6128
* Removed trailing whitespaces from .h and .c files using theJörg Mayer2002-08-281-17/+17
| | | | | | | winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
* Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer2002-08-021-5/+1
| | | | | | | | equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
* Get rid of unused "pinfo" arguments.Guy Harris2002-04-071-10/+10
| | | | svn path=/trunk/; revision=5112
* Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inGuy Harris2002-01-241-5/+3
| | | | | | | | | | | | arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. svn path=/trunk/; revision=4605
* Include files from the "epan" directory and subdirectories thereof withGuy Harris2002-01-211-2/+2
| | | | | | | | | | | | | "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
* Put the Hello, LSP, and {C,P}SNP ISIS stuff into the ISIS protocol,Guy Harris2001-12-201-1/+10
| | | | | | rather than having them each have their own protocol. svn path=/trunk/; revision=4432
* Move the pointer to the "column_info" structure in the "frame_data"Guy Harris2001-12-101-9/+9
| | | | | | | | | | | | | | | 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
* Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris2001-12-031-4/+5
| | | | | | | | 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
* Get rid of a now-unused variable; it's the only variable of typeGuy Harris2001-07-021-2/+1
| | | | | | "isis_hdr_t", so we can get rid of the definition of that as well. svn path=/trunk/; revision=3630
* Fetch fields from the ISIS header one at a time, rather than snarfingGuy Harris2001-07-021-52/+79
| | | | | | | | the entire ISIS header into a structure - that way, if we run out of packet data in the middle of the header, we at least dissect the stuff for which we have packet data. svn path=/trunk/; revision=3629
* Fix the file name in the comment, and update Gerald's e-mail address.Guy Harris2001-07-021-4/+3
| | | | svn path=/trunk/; revision=3627
* Tvbuffified ISIS dissector, from Ronnie Sahlberg.Guy Harris2001-07-021-106/+65
| | | | svn path=/trunk/; revision=3626
* From Joerg Mayer: explicitly fill in all members of aGuy Harris2001-06-181-9/+9
| | | | | | | "header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
* Get rid of an extra colon on a field name, and display that field usingGuy Harris2001-05-231-3/+3
| | | | | | that name. svn path=/trunk/; revision=3438
* NLPID's of 0x08 and 0x09 should be labeled as Q.933 and LMI,Guy Harris2001-03-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make the stuff to handle SNAP frames (OUI, PID, payload) a routine ofGuy Harris2001-01-101-1/+2
| | | | | | | | | | | | | | its own; it's used not only by LLC, but by Frame Relay with RFC 2427 and ATM with RFC 2684. Support for RFC 2427-encapsulation Frame Relay packets, from Paul Ionescu. Get rid of the CISCO_IP PPP protocol type - Cisco HDLC uses, in most cases, Ethernet packet types, so use ETHERTYPE_IP instead (they're both 0x0800). svn path=/trunk/; revision=2854
* Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris2001-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | "{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
* Have "proto_register_protocol()" build a list of data structures forGuy Harris2001-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* For each column, have both a buffer into which strings for that columnGuy Harris2000-11-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | can be put, and a pointer to the string for the column, which might or might not point to that buffer. Add a routine "col_set_str()", which sets the string for the column to the string passed to it as an argument; it should only be handed a static string (a string constant would be ideal). It doesn't do any copying, so it's faster than "col_add_str()". Make the routines that append to columns check whether the pointer to the string for the column points to the buffer for the column and, if not, copy the string for the column to the buffer for the column so that you can append to it (so you can use "col_set_str()" and then use "col_append_str()" or "col_append_fstr()"). Convert a bunch of "col_add_str()" calls that take a string constant as an argument to "col_set_str()" calls. Convert some "col_add_fstr()" calls that take a string constant as the only argument - i.e., the format string doesn't have any "%" slots into which to put strings for subsequent arguments to "col_set_str()" calls (those calls are just like "col_add_str()" calls). Replace an END_OF_FRAME reference in a tvbuffified dissector with a "tvb_length(tvb)" call. svn path=/trunk/; revision=2670
* Add the "Edit:Protocols..." feature which currently only implementsLaurent Deniel2000-08-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* - add proto_tree_add_text_valistLaurent Deniel2000-08-101-2/+2
| | | | | | | - remove stdarg.h include in proto.c and add a more correct one in proto.h - fix esis_dissect_unknown and isis_dissect_unknown svn path=/trunk/; revision=2245
* Allow either old-style (pre-tvbuff) or new-style (tvbuffified)Guy Harris2000-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make the "isis_hello.source_id" an FT_BYTES field rather than anGuy Harris2000-06-191-10/+32
| | | | | | | | | | | | | | | | FT_ETHER field; the ISIS spec doesn't say it's necessarily a 6-byte Ethernet address (and, if it's FT_BYTES, you can test it in a filter much the same way you test an Ethernet address). Make "isis_hello.lan_id" an FT_BYTES field rather than an FT_STRING field - it's an array of bytes, not a character string. Don't require that "system ID" fields be 6 octets; use the size value from the ISIS PDU header. (This means that PDUs containing "system ID" fields can't be described as C structures; dissect them by stepping the offset instead.) svn path=/trunk/; revision=2080
* Add routines for adding items to a protocol tree that take arguments ofGuy Harris2000-05-311-9/+9
| | | | | | | | | | | | | | | | | 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
* Add tvbuff class.Gilbert Ramirez2000-05-111-11/+11
| | | | | | | | | | | | | | | 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
* Register an "osinl" dissector table for ISO/IEC TR 9577 NLPID values,Guy Harris2000-04-171-2/+8
| | | | | | | | | | 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
* Ralf Schneider's changes to enhance to OSI CLNP, CLTP, and ISIS supportGuy Harris2000-04-151-116/+75
| | | | | | and to add OSI ESIS support. svn path=/trunk/; revision=1865
* Set the COL_PROTOCOL column to "ISIS" in the ISIS dissector, rather thanGuy Harris2000-04-131-1/+4
| | | | | | | | | | | | | | in its caller. Set the COL_PROTOCOL column to "COTP" in the COTP dissector, rather than in the dissectors it calls, so that it's done for all frames we hand to that dissector. Set the COL_INFO field for COTP packets we don't dissect because the length indicator is zero, or the frame is too short, or the PDU type is bogus. svn path=/trunk/; revision=1842
* Change dfilter_init() to check for empty-string abbreviations and forGilbert Ramirez2000-03-201-2/+2
| | | | | | | duplicate abbreviations. All mods to packet-*.c files are fixes to remove those cases. svn path=/trunk/; revision=1733
* Break proto_tree_add_item_format() into multiple functions:Gilbert Ramirez2000-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proto_tree_add_protocol_format() proto_tree_add_uint_format() proto_tree_add_ipxnet_format() proto_tree_add_ipv4_format() proto_tree_add_ipv6_format() proto_tree_add_bytes_format() proto_tree_add_string_format() proto_tree_add_ether_format() proto_tree_add_time_format() proto_tree_add_double_format() proto_tree_add_boolean_format() If using GCC 2.x, we can check the print-format against the variable args passed in. Regardless of compiler, we can now check at run-time that the field type passed into the function corresponds to what that function expects (FT_UINT, FT_BOOLEAN, etc.) Note that proto_tree_add_protocol_format() does not require a value field, since the value of a protocol is always NULL. It's more intuitive w/o the vestigial argument. Fixed a proto_tree_add_item_format-related bug in packet-isis-hello.c Fixed a variable usage bug in packet-v120.c. (ett_* was used instead of hf_*) Checked in Guy's fix for the function declearation for proto_tree_add_text() and proto_tree_add_notext(). svn path=/trunk/; revision=1713
* Fix a bunch of dissectors to use "pi.captured_len" rather thanGuy Harris2000-01-241-9/+9
| | | | | | | | | | "fd->cap_len" for the frame length - or to use macros such as "BYTES_ARE_IN_FRAME()", "IS_DATA_IN_FRAME()", and "END_OF_FRAME", which use "pi.captured_len" - so that they correctly handle frames where the actual data length of the packet is less than the size of the raw frame, e.g. with encapsulations such as ISL. svn path=/trunk/; revision=1530
* Get the NLPID value for ISIS from "nlpid.h", and report the NLPID valueGuy Harris2000-01-131-9/+4
| | | | | | | | in ISIS packets with "nlpid_vals". Report the NLPID value in CLNP packets with "nlpid_vals" as well. svn path=/trunk/; revision=1462
* Stuart Stanley's ISIS dissection support.Guy Harris1999-12-151-0/+354
svn path=/trunk/; revision=1340