aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
AgeCommit message (Collapse)AuthorFilesLines
1999-10-30Warren Young's patch to add a "Print" button to the "Follow TCP Stream"Guy Harris1-2/+70
data window. Some (belated) man page updates. svn path=/trunk/; revision=950
1999-10-29Uwe Girlich's ONC RPC and NFS dissectors.Guy Harris1-1/+3
svn path=/trunk/; revision=945
1999-10-24Kojak's ICQ dissector.Guy Harris1-1/+2
svn path=/trunk/; revision=919
1999-10-22Generalize the "ip_src" and "ip_dst" members of the "packet_info"Guy Harris1-9/+1
structure to "dl_src"/"dl_dst", "net_src"/"net_dst", and "src"/"dst" addresses, where an address is an address type, an address length in bytes, and a pointer to that many bytes. "dl_{src,dst}" are the link-layer source/destination; "net_{src,dst}" are the network-layer source/destination; "{src,dst}" are the source/destination from the highest of those two layers that we have in the packet. Add a port type to "packet_info" as well, specifying whether it's a TCP or UDP port. Don't set the address and port columns in the dissector functions; just set the address and port members of the "packet_info" structure. Set the columns in "fill_in_columns()"; this means that if we're showing COL_{DEF,RES,UNRES}_SRC" or "COL_{DEF,RES,UNRES}_DST", we only generate the string from "src" or "dst", we don't generate a string for the link-layer address and then overwrite it with a string for the network-layer address (generating those strings costs CPU). Add support for "conversations", where a "conversation" is (at present) a source and destination address and a source and destination port. (In the future, we may support "conversations" above the transport layer, e.g. a TFTP conversation, where the first packet goes from the client to the TFTP server port, but the reply comes back from a different port, and all subsequent packets go between the client address/port and the server address/new port, or an NFS conversation, which might include lock manager, status monitor, and mount packets, as well as NFS packets.) Currently, all we support is a call that takes the source and destination address/port pairs, looks them up in a hash table, and: if nothing is found, creates a new entry in the hash table, and assigns it a unique 32-bit conversation ID, and returns that conversation ID; if an entry is found, returns its conversation ID. Use that in the SMB and AFS code to keep track of individual SMB or AFS conversations. We need to match up requests and replies, as, for certain replies, the operation code for the request to which it's a reply doesn't show up in the reply - you have to find the request with a matching transaction ID. Transaction IDs are per-conversation, so the hash table for requests should include a conversation ID and transaction ID as the key. This allows SMB and AFS decoders to handle IPv4 or IPv6 addresses transparently (and should allow the SMB decoder to handle NetBIOS atop other protocols as well, if the source and destination address and port values in the "packet_info" structure are set appropriately). In the "Follow TCP Connection" code, check to make sure that the addresses are IPv4 addressses; ultimately, that code should be changed to use the conversation code instead, which will let it handle IPv6 transparently. svn path=/trunk/; revision=909
1999-10-22Additional NTP changes:Guy Harris1-1/+2
added misc. constants for parsing flags, and converting time stamps; added flags and primary sources explanations; added function for converting time stamps; improved item analysis; new item definitions; from Tomislav Vujec. svn path=/trunk/; revision=908
1999-10-21Have Ethereal check for a first command-line argument of "-G", ratherGuy Harris1-15/+31
than a command name of "ethereal-dump-fields", to decide whether to run as normal Ethereal or to just dump out the list of fields that can be used in a display filter. This allows us to continue to make that check without doing the regular command line flag parsing (which we don't want to do, as we don't want to call "gtk_init()" before making that check, as "gtk_init()" tries to open an X display, and some people want not to have to have X running in order to build Ethereal, or want not to have Ethereal try to open an X connection over a slow line if it's just going to print field names to the standard output), without having to make a link to "../ethereal" from the "doc" directory (said link couldn't be a hard link, as ATK apparently disallows hard links between directories, and I have the vague impression that a symbolic link might cause other problems). svn path=/trunk/; revision=902
1999-10-20And add the new file to the list of gtk/libui.a sources, for distribution.Gilbert Ramirez1-1/+2
svn path=/trunk/; revision=898
1999-10-20Move GTK-related stuff out of globals.h and put it in gtk/gtkglobals.hGilbert Ramirez2-1/+43
svn path=/trunk/; revision=896
1999-10-19Add ASCII/EBCDIC conversion to TCP Follow window. Also add Close buttonGilbert Ramirez1-14/+129
for ease-of-use with window managers w/o "destroy" buttons (twm). svn path=/trunk/; revision=884
1999-10-18Move display.[ch] --> gtk/display_opts.[ch]Gilbert Ramirez4-3/+318
svn path=/trunk/; revision=883
1999-10-15Phil Techau's patch to add "col_append_str()".Guy Harris1-2/+5
svn path=/trunk/; revision=845
1999-10-15avoid mistakingly commit dynamically generated files, like "Makefile".Jun-ichiro itojun Hagino1-0/+3
svn path=/trunk/; revision=837
1999-10-14Nathan Neulinger's dissector for the Yahoo messenger and pagerGuy Harris1-1/+2
protocols. svn path=/trunk/; revision=824
1999-10-12Have "dfilter_compile()" return 0 on success and 1 on failure, andGuy Harris2-10/+12
return the pointer to the compiled filter through a pointer argument. Have it check whether the filter is a null filter and, if so, free up the filter and supply a filter pointer, rather than obliging its callers to check whether the filter actually has any code. (Well, they may want to check if the filter is null, so that they don't save a pointer to the filter text, e.g. so that the display filter displays as "none" rather than as a blank string in the summary box.) In the process, fix the check in "gtk/file_dlg.c" that tests whether the read filter compiled successfully. svn path=/trunk/; revision=812
1999-10-11Oops! Forgot to commit the change that adds Christophe Tronche to theGuy Harris1-1/+2
list of authors. svn path=/trunk/; revision=809
1999-10-11When a new display filter is to be applied, don't set "cf.dfilter" orGuy Harris2-30/+13
"cf.dfcode" if the new filter doesn't compile, because the filter currently in effect will be the one that was last applied - just free up the text of the new filter, and whatever memory was allocated for the new filter code. This means we allocate a new dfilter when a new filter is to be applied, rather than recycling stuff from the old filter, as we want the old filter code to remain around if the new filter doesn't compile. This means that "cf.dfilter" and "cf.dfcode" will be null if there's no filter in effect. svn path=/trunk/; revision=803
1999-10-09- fix a segmentation violation with big "match selected" filters.Laurent Deniel1-2/+3
- fix a memory leak. svn path=/trunk/; revision=795
1999-10-08Include "main.h", to pull in the external declarations of severalGuy Harris1-1/+5
routines defined in this file. svn path=/trunk/; revision=786
1999-10-08Fix the include-guard #define to be "__MAIN_H__", matching the name ofGuy Harris1-4/+4
the file. svn path=/trunk/; revision=785
1999-10-02Don't initialize the file name field in the "File/Open" dialog box withGuy Harris1-14/+1
the name of the current save file - we no longer have the "-F" flag, and "-S" automatically reads from the capture file as packets arrive, so there's no need to manually open the capture file. svn path=/trunk/; revision=757
1999-10-02Get rid of "-F" - "-S" works, and has a more convenient UI.Guy Harris2-12/+12
Print a usage message if an illegal command-line flag is seen. Clean up the usage message a bit. svn path=/trunk/; revision=755
1999-10-02Wrap stufff that's used only if we have "libpcap" in "#ifdefGuy Harris2-4/+12
HAVE_LIBPCAP"/"#endif". svn path=/trunk/; revision=754
1999-10-02Move the declaration of global variables involved with packet captureGuy Harris1-1/+5
from "globals.h" to "capture.h". Only "capture.c" needs to include <pcap.h>; move the include of <pcap.h> from "capture.h" to "capture.c". We no longer need any DLT_ defines (that's handled inside Wiretap); remove the defines of DLT_ from "capture.h". svn path=/trunk/; revision=753
1999-10-02Add a file name field to the "Capture/Start" dialog box; if it's blank,Guy Harris1-21/+92
the capture will be done to a temporary file, otherwise it'll be done to the specified file. svn path=/trunk/; revision=749
1999-10-02Have "do_capture()" take, as an argument, a pointer to the name of theGuy Harris2-31/+8
file to which to write the capture; if it's NULL, create a temporary file and use that. Have "-w" set a local variable, which starts out null, and, for "-k" captures, call "do_capture()" and pass it that local variable as an argument; this lets you do "-k" without "-w", which makes it use a temporary file for the capture. This means "run_capture()" no longer serves a useful purpose, as its only caller is "do_capture()"; swallow it into "do_capture()". svn path=/trunk/; revision=748
1999-10-02A child process for a "-S" or "-F" capture should *always* exit when theGuy Harris1-8/+12
capture is done; make it do so, and don't bother passing it a "-Q" flag to tell it to do so. "capture()" is called in two places; in one place, it's in a child process, and it shouldn't read in the capture file. Move the reading of the capture file out of "capture()" itself to the place where we *should* read in the capture file after it returns. Also, have it return an indication of whether it succeeded or failed, so we know whether we should read in the capture file. svn path=/trunk/; revision=747
1999-10-01Move the definitions of "sync_mode", "sync_pipe", "fork_mode",Guy Harris1-9/+1
"quit_after_cap", and "capture_child" from "gtk/main.c" to "capture.c", so that the definitions don't have to be duplicated in "main.c" for other UIs if, as, and when we do versions of Ethereal with other UIs. svn path=/trunk/; revision=746
1999-09-30If we specify a save file name with "-w", mark it as "user saved", soGuy Harris1-1/+2
that we don't delete it if we later start a new capture. svn path=/trunk/; revision=742
1999-09-30Add a new global flag "capture_child", which is TRUE if we're a childGuy Harris1-29/+44
process for a sync mode or fork mode capture. Have that flag control whether we do things that *only* the parent or *only* the child should do, rather than basing it solely on the setting of "sync_mode" or "fork_mode" (or, in the case of stuff done in the child process either in sync mode or fork mode, rather than basing it on the setting of those flags at all). Split "do_capture()" into a "run_capture()" routine that starts a capture (possibly by forking off and execing a child process, if we're supposed to do sync mode or fork mode captures), and that assumes the file to which the capture is to write has already been opened and that "cf.save_file_fd" is the file descriptor for that file, and a "do_capture()" routine that creates a temporary file, getting an FD for it, and calls "run_capture()". Use "run_capture()", rather than "capture()", for "-k" captures, so that it'll do the capture in a child process if "-S" or "-F" was specified ("do_capture()" won't do because "-k" captures should write to the file specified by the "-w" flag, not some random temporary file). For child process captures, however, just use "capture()" - the child process shouldn't itself fork off a child if we're in sync or fork mode, and should just write to the file whose file descriptor was specified by the "-W" flag on the command line. All this allows you to do "ethereal -S -w <file> -i <interface> -k" to start a sync mode capture from the command line. svn path=/trunk/; revision=740
1999-09-30If we're given the "-k" flag, don't start the capture until after we've:Guy Harris2-47/+63
popped up the top-level window (so that it looks like a capture started from "Capture/Start"); initialized the colors (so that we don't dump core when reading in the capture file); popped up any message box for failure to read the preferences file. This means we start the capture in "main()", rather than in the realize callback for the main window, so get rid of that callback. If we're a child process that's just capturing to a file for our parent to read, however, we shouldn't pop up the top-level window, because that's our parent's job; when running that child, set its "argv[0]" to a special name, so that 1) it shows up in a "ps" with a special name; 2) we don't have to invent Yet Another Flag to say "you're the child". (We may want to use the name to turn on *all* behaviors that the capture child, and only the capture child, should exhibit.) If "-w" and "-k" were both specified, attempt to open the file specified by "-w" and, if that succeeds, set "cf.save_file_fd" to refer to it, so that "-w" plus "-k" works again, rather than popping up a "The file to which the capture would be saved ... could not be opened: Bad file descriptor." message box. svn path=/trunk/; revision=739
1999-09-30GTK 1.2.5 version (not that it matters, given that GLib declaresGuy Harris1-1/+1
"gboolean" to be a typedef of "gint"). svn path=/trunk/; revision=738
1999-09-29Enable "Print hex" only if "Print detail" is on.Guy Harris1-2/+7
svn path=/trunk/; revision=737
1999-09-29Add an item to the "File/Print" dialog box to ask that the full hex dataGuy Harris2-15/+37
of the packet be printed (this is only done if "Print detail" is selected; it should be grayed out of "Print summary" is selected). If that item is selected, suppress the hex printing of uninterpreted data items in the protocol tree. Move some GTK+ keys not used outside of "gtk/print_dlg.c" from "gtk/keys.h" into "gtk/print_dlg.c". svn path=/trunk/; revision=736
1999-09-26Added name resolution in GUI part:Laurent Deniel1-3/+12
- Capture->Start->"Active name resolution" Allows the user to turn on/off name resolution during a live capture. - Display->Options->"Name resolution" Turn on/off name resolution for the displayed data (or during the -S mode). E.g. clicking on a packet captured with resolution disabled will resolve names in the detailed list if this option is set. And applying or resetting a display filter allows the update of the packet list as well. svn path=/trunk/; revision=726
1999-09-24Packaging changesGilbert Ramirez1-27/+0
svn path=/trunk/; revision=715
1999-09-23Close the capture file in "do_capture()", right before unlinking theGuy Harris1-1/+5
current capture file if it's a temporary file, out of paranoia (so that we don't get into a state where we have a capture file open but unlinked - it's probably harmless to be in that state, as the file will remain around until close, modulo NFS fun, and we may never be in that state for very long, but I'd rather have it obviously stated in the code). Remove the close in "capture()", and put one before the other call to "capture()", in "main_realize_cb()" (is that call necessary, e.g. if you pass "-r <filename>" *and* "-k", for some perverse reason, as command-line arguments?). If "cf.save_file" is non-null, free it before setting it, regardless of whether it refers to a temporary file name or not. svn path=/trunk/; revision=712
1999-09-23If we forcibly turn off "fork_mode" if the user doesn't enable "UpdateGuy Harris3-12/+9
list of packets in real time" in the "Capture/Start" dialog box, "ethereal -F" won't work - you get your choice of non-forked capture or "-S". Don't have "fork_mode" track "sync_mode"; instead, in those places where we check for "fork_mode", check for "sync_mode" as well. svn path=/trunk/; revision=711
1999-09-23Move the toolkit-independent code to create a temporary capture file,Guy Harris2-100/+29
and to fork off and run a separate copy of "ethereal" for "-S" and "-F" captures or just call "capture()" otherwise, out of "gtk/capture_dlg.c" and into a routine in "capture.c". If the attempt to create said temporary capture file fails, pop up a dialog box and don't do the capture. Have the child capture process send a message upstream after it either successfully starts the capture and syncs out the header of the capture file, or fails to start the capture; the message indicates whether it succeeded or failed, and, if it failed, includes a failure message. This: avoids the use of a signal, and thus means we don't have to worry about whether to capture the signal, or whether to start or stop capturing depending on whether this particular capture is in sync mode or not; lets us pop up the message box for the error in the parent process if we're in sync mode, rather than doing it in the child, which didn't work well. Add a check button to the Capture/Start dialog box, so that we can control, for each capture, whether it's to be done in sync mode or not. svn path=/trunk/; revision=708
1999-09-22This commit contains support for reading capture files compressed usingAshok Narayanan1-2/+2
gzip. The zLib library is used for this purpose. If zLib is not available (or it's use is disabled by the --disable-zlib option to configure), you can still compile Ethereal but it will be unable to read compressed capture files. IMPORTANT: Now all file accesses to capture files should be done through special macros. Specifically, for any use of the following functions on capture files, replace them. The arguments for the right-side functions are exactly the same as for the original stdio functions. fopen file_open fdopen filed_open fread file_read fwrite file_write fseek file_seek fclose file_close ferror file_error svn path=/trunk/; revision=695
1999-09-19Fixed a bug found by Derek W Poon <dpoon@uclink.berkeley.edu>, where deletedGerald Combs1-2/+2
filter list items were improperly removed from the filter list. svn path=/trunk/; revision=690
1999-09-14Peter Torvals' Internet Cache Protocol dissector.Guy Harris1-1/+2
svn path=/trunk/; revision=677
1999-09-12Make "Expand all levels" and "Print as displayed" radioGuy Harris2-11/+41
buttons insensitive if "Print summary" is selected, and make them sensitive if "Print detail" is selected, as they apply only to the "print detail" output. svn path=/trunk/; revision=672
1999-09-12Add a "Expand all levels"/"Print as displayed" pair of radio buttons toGuy Harris3-26/+65
the "File/Print" dialog box; "Expand all levels" means that all levels of the protocol tree should be printed, while "Print as displayed" means that only those levels shown in the display should be printed. Free the table of column widths once printing is done. svn path=/trunk/; revision=671
1999-09-12Add summary-vs-detail radio buttons to the print dialog box; detailGuy Harris3-31/+45
prints the protocol tree, and summary prints the fields in the summary clist, with a header line at the beginning of the printout. Print only packets selected by the current packet filter. Just have "ARP" and "RARP" in the "Protocol" field for ARP packets; whether it's a request or a reply can be seen in the "Info" field. Add to the "Frame" section of the protocol tree the time between the current packet and the previous displayed packet, and the packet number. Have FT_RELATIVE_TIME fields be a "struct timeval", and display them as seconds and fractional seconds (we didn't have any fields of that type, and that type of time fits the delta time above). Add an FT_DOUBLE field type (although we don't yet have anything using it). svn path=/trunk/; revision=666
1999-09-11Collapse/Expand All protocol tree added in Display menu.Laurent Deniel5-7/+44
svn path=/trunk/; revision=660
1999-09-11"capture.c" doesn't do socket "ioctl"s any more - the code to do that isGuy Harris1-1/+14
now in "gtk/capture_dlg.c" - so it doesn't need to include <sys/sockio.h> on, for example, Solaris... ...but "gtk/capture_dlg.c" does need to include it. "gtk/capture_dlg.c" also may need to include "snprintf.h", as it uses "snprintf()". svn path=/trunk/; revision=655
1999-09-10Give "globals.h" an RCS ID and copyright/GPL notice.Guy Harris1-24/+1
Move some defines that would be used even by a non-GTK+-based Ethereal from "gtk/main.h" to "globals.h". Remove the byte-order #defines from "packet.h", as they're now in "globals.h" (having been moved there from "gtk/main.h"). Fix up some files that use those #defines to include "globals.h". "resolv.c" doesn't use any GTK stuff, so it needn't include <gtk/gtk.h> nor "gtk/main.h" - it only did so to get the byte-order #defines for the benefit of "packet-ipv6.h", and "packet-ipv6.h" now includes them itself. svn path=/trunk/; revision=649
1999-09-10We need to catch a "window delete" event for the preferences dialog boxGuy Harris5-28/+56
- that event happens if, say, you nuke the dialog box from a window manager - and call "delete" routines for each of the preferences tabs, so that, for preferences tabs that include list widgets, we can set a flag on the preferences tab widget telling the selection callback for the list widget that the buttons it would normally set the sensitivity of, based on whether any row in the list is selected or not, have Joined the Choir Invisible, and therefore that we shouldn't change their sensitivity because GTK+ will whine at us if we do, just as is the case if we press the "OK" or "Cancel" button (which also cause the window to go away). Can we just do this in the "window delete" handler? I.e., does that get called if we explicitly destroy the widget? Or should we catch a "destroy" event instead? (There must be a better way to do this....) svn path=/trunk/; revision=647
1999-09-10Make stuff used only in "filter_prefs.c" static to it.Guy Harris1-4/+4
svn path=/trunk/; revision=646
1999-09-09Put RCS IDs (and a copyright notice and GPL notice) in several files,Guy Harris7-6/+130
and fix up the introductory comment on some other files. svn path=/trunk/; revision=640