aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2000-08-07Allow either old-style (pre-tvbuff) or new-style (tvbuffified)Guy Harris100-640/+781
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-08-06Use "BYTES_ARE_IN_FRAME()" rather than explicitly checking an offset andGuy Harris3-23/+28
packet length. Use "IS_DATA_IN_FRAME()", rather than checking if "offset+1" is greater than "pi.captured_len", to check whether there's any data left in the packet. Check whether data is in the packet *before* extracting it and stuffing an item into the tree with it. svn path=/trunk/; revision=2216
2000-08-06Use "BYTES_ARE_IN_FRAME()" rather than explicitly checking an offset andGuy Harris1-22/+47
packet length. Use "IS_DATA_IN_FRAME()" rather than checking the value of "END_OF_FRAME" when checking whether there's any data left in the packet. Before putting the initial login sequence, or any part of it, into the tree, make sure it's actually in the packet. When looking for the end of a '\0'-terminated string, don't run past the end of the captured data in the frame. Before putting the terminal information into the tree, make sure it's actually in the packet. svn path=/trunk/; revision=2215
2000-08-06Don't use "fd->pkt_len" when checking to see if you've run off the endGuy Harris8-28/+28
of the packet, use "pi.captured_len" - "fd->pkt_len" may include data that isn't in the capture, due to a short snapshot length. Don't use "fd->cap_len" when checking to see if you've run off the end of the packe, use "pi.captured_len" - "fd->cap_len" isn't adjusted to reflect any length fields, but "pi.captured_len" is (removing, for example, Ethernet padding from the packet). Use "END_OF_FRAME" rather than "pi.captured_len - offset", to make it a bit clearer what's being done. In the V.120 dissector, use "tvb_length()" when adding the top-level protocol tree entry for V.120, as it's a tvbuffified dissector. svn path=/trunk/; revision=2214
2000-08-06There is *no* guarantee that the "fd" argument to a dissector uniquelyGuy Harris1-11/+6
identifies a frame; it may do so for Ethereal, which has to allocate a data structure for each frame, but it doesn't do so for Tethereal, which looks at a frame once and never does so again. Use, instead, the "num" member of the structure to which "fd" points as a unique identifier; it's the ordinal number of the frame within a capture (frame number, not display row number, so it doesn't change as the display is filtered), and is thus different for all frames. svn path=/trunk/; revision=2213
2000-08-05Arrange that filter dialog boxes have an "Apply" button only if one canGuy Harris3-21/+36
apply the filter, i.e. only if the dialog box is attached to the filter text entry in the main window. svn path=/trunk/; revision=2212
2000-08-05Make the ICMP top-of-protocol-tree item cover the entire rest of theGuy Harris1-2/+2
packet, not just the first 4 bytes of the ICMP packet. svn path=/trunk/; revision=2211
2000-08-05Make "ip_checksum()" take just pointer and length arguments, and makeGuy Harris1-31/+37
"ip_checksum_shouldbe()" compute the correct checksum given the computed whole-packet checksum and the value of the checksum field; that scheme can be better extended in the future to handle checksums other than the IP header checksum, e.g. ICMP, UDP, and TCP checksums (although we'd want a somewhat more optimized checksumming routine for that, and perhaps have an option to control whether to do checksum checking on TCP and UDP packets, as that could be expensive). That requires that we remember the value of the computed checksum, not just check it against 0; that renders "ip_checksum_state()" uninteresting, as we can just compare the value against 0 in line. svn path=/trunk/; revision=2210
2000-08-05More changes from Peter Kjellerstedt.Guy Harris1-10/+8
svn path=/trunk/; revision=2209
2000-08-04ICQ improvements from Peter Kjellerstedt.Guy Harris2-32/+84
svn path=/trunk/; revision=2208
2000-08-04Fix to the SRVLOC dissector to correctly handle the error field of theGuy Harris3-7/+12
Service Reply (i.e., treat it as the 16-bit field that it is), from Peter Kjellerstedt. svn path=/trunk/; revision=2207
2000-08-04Clean up the checksumming stuff a bit:Guy Harris1-27/+29
have "ip_checksum()" compute the checksum of the IP header; have "ip_checksum_state()" call "ip_checksum()" and then return TRUE if the result is 0 and FALSE otherwise; have "ip_checksum_shouldbe()" save the current value of the checksum field in the header, set that field to 0, call "ip_checksum()" to get the checksum, restore the value of the checksum field in the header to the saved value, and then return what "ip_checksum()" returned; rather than having duplicated code to compute checksums. svn path=/trunk/; revision=2206
2000-08-04Re-organize the README so that people who just want to run ethereal, notGilbert Ramirez1-36/+75
compile it, find their info at the top of the file. Explain the generated sources for developers, and the Unix-ish tools that are needed. svn path=/trunk/; revision=2205
2000-08-04Fix a number of problems, and do some checking to make sure we don't runGuy Harris1-37/+132
past the end of the frame. svn path=/trunk/; revision=2204
2000-08-04Mention IDSN4BSD's i4btrace utility as a supported trace file format.Gilbert Ramirez1-1/+6
svn path=/trunk/; revision=2203
2000-08-04If IP checksum is incorrect, show what correct value should be.Gilbert Ramirez1-9/+37
From "Johannes Hennecke" <Johannes.Hennecke@elsa.de> svn path=/trunk/; revision=2202
2000-08-03Add some error values that, whilst they're not in the NFS V2 spec, are,Guy Harris1-1/+6
as I remember, issued by some NFS V2 servers (EXDEV, for one, can almost certainly be issued by most V2 servers). svn path=/trunk/; revision=2201
2000-08-03Add a "Save As" feature to the TCP Follow dialogue, to save the streamGilbert Ramirez14-505/+674
file to a user-specified file. Move the file-copy routine in save_cap_file() to an indepenent function in file.c (copy_binary_file()) so that follow_dlg.c can use it. Remove #include "follow.h" from the C files that don't need it. svn path=/trunk/; revision=2200
2000-08-03Replace calls to sprintf() with snprintf() in file_*_error_message routines,Gilbert Ramirez1-6/+11
as a long filename may overflow the buffer. svn path=/trunk/; revision=2199
2000-08-03Fix typo in description of Diameter.tcp.port preference.Gilbert Ramirez1-2/+2
From Jakob Schlyter <jakob@crt.se> svn path=/trunk/; revision=2198
2000-08-03Move to version 0.8.11Gilbert Ramirez7-26/+82
svn path=/trunk/; revision=2196
2000-08-02All 4 protocol versions included (as templates but not as decodings).Uwe Girlich1-23/+95
svn path=/trunk/; revision=2195
2000-08-02Procedure numbers as constants are much better.Uwe Girlich1-1/+31
svn path=/trunk/; revision=2194
2000-08-01Allow filtering on strings.Gilbert Ramirez5-5/+170
svn path=/trunk/; revision=2193
2000-07-31There is a <sys/stat.h> available on Win32, and, in fact, we now includeGuy Harris1-1/+4
it in "util.c", so we have to define HAVE_SYS_STAT_H in Win32. svn path=/trunk/; revision=2192
2000-07-31Dissector now knows the actual game data communication too.Uwe Girlich1-46/+88
svn path=/trunk/; revision=2191
2000-07-31Add a routine to check whether a file is a directory or not.Guy Harris3-30/+77
To test whether a file the user selected to be opened from the file selection box is really a directory (so that we can point the file selection box at it, rather than trying to open the directory as a capture file, which wouldn't work), use the routine in question. To make the GTK+ file selection box start out in the last directory from which we opened a file, use "gtk_file_selection_complete()", rather than "chdir()"ing to that directory. Those changes keep us from "chdir()"ing all over the place; that way, if Ethereal dumps core, the core dump shows up in the directory from which it was run, rather than in the directory from which you last opened or into which you last saved a file. svn path=/trunk/; revision=2190
2000-07-31Add a comment explaining why we're defining S_ISDIR and company.Guy Harris1-1/+7
svn path=/trunk/; revision=2189
2000-07-31It appears that, at least with Visual C++ 6.0, the "stat()" supplied inGuy Harris1-4/+15
the C run-time library sets "statb.st_mode" appropriately, at least for plain files and directories; it just doesn't offer the POSIX "S_ISxxx()" macros to test the file type. If those macros aren't defined (which might also be the case on really ancient UNIX systems), define them appropriately, and use them even on Win32 systems, so that we can properly report attempts by a user to read from a directory on Win32, just as we do on UNIX. svn path=/trunk/; revision=2188
2000-07-31In "buffer.h", include <winsock.h> if we have it, so that "u_char" isGuy Harris2-5/+9
defined on Win32 systems - it's not defined in <sys/types.h> on those systems. In "buffer.c", include "config.h", to cause HAVE_WINSOCK_H to be defined, on systems that have it, so that we include it in <buffer.h>. svn path=/trunk/; revision=2187
2000-07-31Include "packet.h", not <packet.h> - the latter, at least on Win32,Guy Harris1-9/+2
causes a system <packet.h> header to be includes, which causes the compiler to get quite upset. svn path=/trunk/; revision=2186
2000-07-31Include <time.h> to declare "localtime()" and "strftime()", and useGuy Harris1-2/+3
"guint32" rather than "uint32_t" so that it'll compile on systems (e.g., Win32, and probably some UNIX flavors) that don't declare "uint32_t". svn path=/trunk/; revision=2185
2000-07-31Fix it to compile on non-Linux UNIX-flavored systems and Win32 systems.Guy Harris1-6/+22
svn path=/trunk/; revision=2184
2000-07-31Include "ptvcursor.obj" in the list of object that have to be linked in.Guy Harris1-1/+2
svn path=/trunk/; revision=2183
2000-07-30Add missing function prototypes.Olivier Abad1-1/+7
svn path=/trunk/; revision=2182
2000-07-30Support for capturing packet data from a pipe (a FIFO, or standard input).Olivier Abad5-117/+396
capture.c : - modified capture() to try to open an interface as a pipe if pcap_open_live() failed, and then read data in libpcap format from this pipe ; - add new functions used by capture() : pipe_open_live() and pipe_dispatch() which are equivalents to the pcap_ functions. libpcap.[ch] : - moved the MAGIC and headers definitions from libpcap.c to libpcap.h because capture() now needs it. svn path=/trunk/; revision=2181
2000-07-30A small change to SMB dissector so it lists near the other SMB-relatedRichard Sharpe1-2/+2
dissectors when you do 'ethereal -G' ... svn path=/trunk/; revision=2180
2000-07-30Update and add ".cvsignore" files to reduce the level of noise from CVS.Guy Harris4-0/+10
svn path=/trunk/; revision=2179
2000-07-30In TCP segments with RST and data, display the data as text, labeling itGuy Harris1-3/+24
as a cause for the RST, as per RFC 1122: 4.2.2.12 RST Segment: RFC-793 Section 3.4 A TCP SHOULD allow a received RST segment to include data. DISCUSSION It has been suggested that a RST segment could contain ASCII text that encoded and explained the cause of the RST. No standard has yet been established for such data. Thanks and a tip of the Hatlo hat to Kevin Steves of HP for mentioning this on the tcpdump-workers list (he contributed a tcpdump patch to do the same). svn path=/trunk/; revision=2178
2000-07-30"rd_match_strval()" just does what "val_to_str()" does with a formatGuy Harris1-9/+2
argument of "Undefined(%d)"; just use "val_to_str()" (and use "%u" rather than "%d", as the value passed to it is unsigned). svn path=/trunk/; revision=2177
2000-07-30David Frascone's DIAMETER dissector.Guy Harris8-4/+1635
svn path=/trunk/; revision=2176
2000-07-30Squelch a GCC complaint.Guy Harris1-1/+2
svn path=/trunk/; revision=2175
2000-07-29Added changes so Edit->Filters...->Apply works as I thinkRichard Sharpe3-2/+141
it should. Also added the two files I need to generate an sgml list of fields that the UserGuide etc needs. svn path=/trunk/; revision=2174
2000-07-28Add the re-write of the NetWare Core Protocol dissector. It's mostlyGilbert Ramirez13-824/+2060
a framework for the dissector; of the more than 400 NCP packet types, only a handful are defined. But this dissector framework is much better than the previous one. svn path=/trunk/; revision=2173
2000-07-28... and remove the old dfilter2pod.in template.Gilbert Ramirez1-98/+0
svn path=/trunk/; revision=2172
2000-07-28Don't create dfilter2pod from dfilter2pod.in just for @PERL_PATH@; it'sGilbert Ramirez4-9/+108
a waste of time. Instead, set $(PERL) to @PERL_PATH@ in the Makefile and call dfilter2pod.pl via $(PERL) $(src_dir)/dfilter2pod.pl svn path=/trunk/; revision=2171
2000-07-27For packets with GIOP versions that are not supported by the dissector,Gilbert Ramirez1-6/+19
identify the packet as GIOP, but let the user know that the version is not supported. svn path=/trunk/; revision=2170
2000-07-27Quake dissector packet-quake.c added.Uwe Girlich2-2/+4
svn path=/trunk/; revision=2169
2000-07-27A Quake dissector. It can only dissect Quake 1 packets to UDP port 26000,Uwe Girlich1-0/+714
which are the connection establishing phase. The actual game data are not covered yet. svn path=/trunk/; revision=2168