aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2000-08-11Miscellaneous code cleaningLaurent Deniel159-595/+885
- add <stdarg.h> or <varargs.h> in snprintf.h and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes - remove the check of multiple inclusions in source (.c) code (there is a bit loss of _cpp_ performance, but I prefer the gain of code reading and maintenance; and nowadays, disk caches and VM are correctly optimized ;-). - protect all (well almost) header files against multiple inclusions - add header (i.e. GPL license) in some include files - reorganize a bit the way header files are included: First: #include <system_include_files> #include <external_package_include_files (e.g. gtk, glib etc.)> Then #include "ethereal_include_files" with the correct HAVE_XXX or NEED_XXX protections. - add some HAVE_XXX checks before including some system header files - add the same HAVE_XXX in wiretap as in ethereal Please forgive me, if I break something (I've only compiled and regression tested on Linux). svn path=/trunk/; revision=2254
2000-08-11Not all compilers like zero-length arrays; comment out the definition ofGuy Harris1-1/+5
"hf[]", and the reference to it, for now. svn path=/trunk/; revision=2253
2000-08-11Don't bump "offset" in the non-SNAP case - it hasn't been set, and weGuy Harris1-3/+1
don't use it there. svn path=/trunk/; revision=2252
2000-08-11If we have a random stream open for a compressed Sniffer file, have theGuy Harris2-174/+354
sequential pass through the file build a list of information about the compressed blobs, with the starting offset in the compressed file and in the uncompressed byte stream for each blob. When seeking on the random stream, check whether the target location is within the uncompressed buffer we currently have; if not, use that list to figure out which blob contains the target location, and read that blob into the buffer. Then, as we now know that the target location is within the uncompressed buffer we currently have, just move the current pointer into that buffer to the target location. This means we don't have to read forwards through any uninteresting blobs in order to seek forwards, and don't have to go all the way back to the beginning and seek forwards in order to seek backwards. svn path=/trunk/; revision=2251
2000-08-11Kerberos 5 dissector, from Wes Hardaker.Guy Harris6-2/+994
svn path=/trunk/; revision=2250
2000-08-10- remove debugging #ifdefLaurent Deniel1-37/+35
- protect expensive calls (getXXXbyYYY) with g_resolving_actif check, that solves a problem with add_ether_byip which was too expensive due to IP address resolution even when g_resolving_actif was disabled. I need to clean further. Do you think that having inexpensive name resolution (i.e. from hash table only which can be filled by dissectors or file reading) even if name resolution is disabled (g_resolving_actif = FALSE) is preferable than having no name resolution at all (which is currently the case). I may change to the first solution in the future if there is no objection. svn path=/trunk/; revision=2249
2000-08-10- rename is_name_from_file to is_dummy_entry since now a realLaurent Deniel3-17/+87
name can be added from file reading but also from the dissectors. - add is_dummy_entry in the hosts hashtable. - check in add_xxx that the entry is not already there, if so do nothing except if this is a dummy entry (in this case, it is simply replaced). - add found boolean parameter to host_name_lookup[6] - add the add_ether_byip procedure which adds a new ether entry knowing the IP address (if the IP address can be resolved). - and finally call this new procedure from ARP dissector. (ipxnets (among other things) to be updated). svn path=/trunk/; revision=2248
2000-08-10"test -e" is documented in the Solaris 2.6 man page, but doesn't seem toGuy Harris1-4/+4
work, and it's not even documented in the Solaris 2.5.1 man page; don't use "-e" to test for the existence of a file, use "-f", which is documented in the 2.5.1 man page and works. svn path=/trunk/; revision=2247
2000-08-10We must include "snprintf.h" *after* including <stdarg.h>, andGuy Harris1-5/+5
<stdarg.h> is now included by "proto.h", so we must include "snprintf.h" after including "proto.h". svn path=/trunk/; revision=2246
2000-08-10- add proto_tree_add_text_valistLaurent Deniel4-8/+31
- 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
2000-08-10Fix decoding of short ISIS CLV data frames.Laurent Deniel1-2/+2
But there is still a problem with the isis_dissect_unknown procedure which calls proto_tree_add_text: the va_list arguments are incorrectly decoded in proto.c. I suspect a problem with inclusion of stdarg.h vs. varargs.h but for now, I can't figure out where ... (problem on Linux intel with gcc 2.91.66). svn path=/trunk/; revision=2244
2000-08-10If G_HAVE_GINT64 is defined, so that we can use "gint64" and "guint64"Guy Harris3-49/+130
to refer to 64-bit integral quantities, add "pntohll()" and "phtonll()" macros, and "tvb_get_ntohll()" and "tvb_get_letohll()" routines, for fetching 64-bit integral quantities. (They're still a pain to *print*, as there's no standard "printf" format code for them - some systems use "%ll[dox]", some use "%q[dox]", and I think some use formats different from all of them.) svn path=/trunk/; revision=2243
2000-08-09Add some ethertypes (which were captured on my network, so inuse ;-).Laurent Deniel2-19/+69
svn path=/trunk/; revision=2242
2000-08-09- make-reg-dotLaurent Deniel2-50/+74
Do not assume that all dissectors are in the source directory. This is the case for instance for packet-ncp2222.c which is generated in the production directory (current). This is particularly important when the generation is not made in the source directory. - ncp2222.py Remove tabs in generated source to make the generated code nicer and to make work the make-reg-dotc. Without that fix, all NCP packet dissections dump core ... svn path=/trunk/; revision=2241
2000-08-09Add #defines for class values, and use them rather than using theGuy Harris1-5/+14
numeric values. (Also, just for laughs and for completeness, turn the CS class into "csnet", even though it's obsolete and supposedly used only in some examples in obsolete RFCs.) svn path=/trunk/; revision=2240
2000-08-09Give the Help menu the more-or-less canonical style from mostGuy Harris1-3/+4
Motif/KDE/GNOME(?) and Windows applications, with "Help" above "About", and separated from "About" by a separator line. (This also makes "Help->Help" the default, which is probably what most users would want, especially if, as, and when we fill out the help.) svn path=/trunk/; revision=2239
2000-08-09Update the man pages to reflectGuy Harris2-20/+44
the addition of support for Cisco Secure Intrusion Detection System IPlog output; support for selecting only one side of a conversation, for showing a conversation in hex, and for saving the displayed data to a file, in the "Filter TCP Stream" window. svn path=/trunk/; revision=2238
2000-08-09Make copy_binary_file() static since follow_dlg.c no longer uses it.Gilbert Ramirez2-5/+4
svn path=/trunk/; revision=2237
2000-08-09Phil Techau's fix to BOOTP when client address not supplied.Guy Harris3-3/+10
Give Phil credit for the other stuff he added as well. svn path=/trunk/; revision=2236
2000-08-09Make "editcap -h" give the usage message without an error message (i.e.,Guy Harris1-2/+2
specify it in the argument to "getopt()"). svn path=/trunk/; revision=2235
2000-08-09Document that ranges of packet numbers can be specified.Guy Harris1-1/+4
svn path=/trunk/; revision=2234
2000-08-09Small fix for initialization of new follow_info struct.Gilbert Ramirez1-1/+2
svn path=/trunk/; revision=2233
2000-08-09In TCP Follow window, allow the optional showing of:Gilbert Ramirez3-422/+592
Entire Conversation Client -> Server packets Server -> Client packets Have "Save As" button work as a "Print to File" button; it asks for a filename and uses the same routine that "Print" uses to save the file. What you see in the window is what you get in the file. So, you can get any of the above conversations/soliloquies combined with: ASCII EBCDIC Hex Dump svn path=/trunk/; revision=2232
2000-08-08Added wiretap support to read the Cisco Secure Intrusion Detection System ↵Mike Hall7-6/+298
IPLog format. svn path=/trunk/; revision=2231
2000-08-08Fix display of IPv6 frag header display in proto tree, fromGilbert Ramirez1-1/+36
Santeri Paavolainen. svn path=/trunk/; revision=2230
2000-08-08Convert comments to docstrings.Gilbert Ramirez1-319/+329
svn path=/trunk/; revision=2229
2000-08-08- improve/fix add_host_nameLaurent Deniel2-2/+11
- add hostname/IP in host hashtable from DNS answers (currently only type A RR). svn path=/trunk/; revision=2228
2000-08-08Add a Help window that contains:Laurent Deniel5-3/+495
- short overview - list of known protocols - list of display filters - short capture filter help The display filter help can be extended in the future when we will have a GUI for filter construction. But this is better than nothing ;-) And cut & paste from the text help window and the filter input field works... svn path=/trunk/; revision=2227
2000-08-08NLM v1 dissector filled with some actual dissectors.Uwe Girlich1-18/+252
svn path=/trunk/; revision=2226
2000-08-08Several new RPC dissecting function introduced. Interface toUwe Girlich3-17/+103
existing functions changed. So NFS was also necessary to change. svn path=/trunk/; revision=2225
2000-08-08Added another tool to generate lists of protocols from Ethereal for theRichard Sharpe1-0/+95
documentation/user guide ... svn path=/trunk/; revision=2224
2000-08-07Cast arguments to "isxdigit()", "isdigit()", and "isflag()" to "unsignedGuy Harris1-4/+4
char" so that if it has the 8th bit set it won't get sign-extended; this squelches a GCC complaint. svn path=/trunk/; revision=2223
2000-08-07Cast an argument to "isspace()" to "guchar" so that if it has the 8thGuy Harris1-2/+2
bit set it won't get sign-extended; this squelches a GCC complaint, and may keep weird things from happening if there're non-ASCII ISO 8859/n characters in a filter file. svn path=/trunk/; revision=2222
2000-08-07Cast an argument to "isspace()" to "guchar" so that if it has the 8thGuy Harris1-2/+2
bit set it won't get sign-extended; this squelches a GCC complaint, and may keep weird things from happening if there're non-ASCII ISO 8859/n characters in a preferences file. svn path=/trunk/; revision=2221
2000-08-07A small set of patches to fix one small problem and start working on theRichard Sharpe1-12/+280
filtering in packet-smb.c ... svn path=/trunk/; revision=2220
2000-08-07Fix compilation problem.Laurent Deniel1-2/+2
svn path=/trunk/; revision=2219
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