aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/main.c
AgeCommit message (Collapse)AuthorFilesLines
2003-11-18Check the environment variables SSH_CONNECTION, SSH_CLIENT, REMOTEHOST,Gerald Combs1-1/+8
DISPLAY, and CLIENTNAME (in that order). If any of them are set, create a capture filter that excludes their traffic and set it as the default. The longer filters should be efficient without being overly long; they may need some tweaking. svn path=/trunk/; revision=8994
2003-11-02The recent link-layer type additions broke "-r". Make it work again.Gerald Combs1-2/+2
svn path=/trunk/; revision=8857
2003-11-01Return FALSE from the configure event handler, so that anybody elseGuy Harris1-2/+2
who's registered for it can get notified about it. svn path=/trunk/; revision=8849
2003-11-01Based on a patch from Brian Fundakowski Feldman, add support for settingGuy Harris1-44/+126
link-layer type when capturing, using the "pcap_set_datalink()" and related APIs. svn path=/trunk/; revision=8848
2003-10-20If a tap menu item doesn't have a "selected_packet_enabled()" orGuy Harris1-6/+2
"selected_tree_row_enabled()" routine, enable it by default, so that tap windows can be popped up even if you have no capture file. Assorted code cleanups. svn path=/trunk/; revision=8740
2003-10-16- use stock icons in the toolbar when using GTK2Olivier Abad1-1/+2
- use GTK1/2 compatibility macros [GS]ET_OBJECT_DATA where needed - add a set_toolbar_object_data() function which associates the display filter entry (from the main window) with the E_DFILTER_TE_KEY for the open and reload buttons (it is needed by the open and reload callbacks). The function is called in create_main_window() - reindent svn path=/trunk/; revision=8718
2003-10-16There doesn't seem to be any need to set "cfile.dfilter" to the contentsGuy Harris1-2/+1
of the filter text entry when reloading the file, and: 1) that doesn't work with the toolbar "reload" button (the widget passed in for that button doesn't have a E_DFILTER_TE_KEY data item pointing to the text entry); 2) that causes the Tools > Summary dialog box to report what you've typed in that box, not the filter that's actually in effect (i.e., it causes "cfile.dfilter" to reflect what's been typed, not what's been applied); so don't bother doing so. That also means that the "/File/Reload" menu item doesn't need a E_DFILTER_TE_KEY data item, so don't give it one. svn path=/trunk/; revision=8713
2003-10-15From Ulf Lamping: toolbar.Guy Harris1-2/+6
svn path=/trunk/; revision=8707
2003-10-14From Ian Schorr:Guy Harris1-39/+79
Add a preference to control whether the "File > Open" dialog box should start out in the last directory in which it looked - and save that in the preferences file across invocations - or should always start out in a user-specified directory, and add another preference to specify that directory. Write out section name comments into the preferences file. Clean up white space a bit. svn path=/trunk/; revision=8699
2003-10-10Updates to TimeReference FramesRonnie Sahlberg1-8/+26
Add a Goto Next/Previous time reference menu option svn path=/trunk/; revision=8657
2003-10-07Make the window geometry information static - it's not used outside thisGuy Harris1-65/+77
file. Fetch the geometry information whenever we get a configure_notify event, i.e. if it actually changes, rather than doing so when we get asked to delete the main window or we exit. Don't save the geometry if we've never gotten such an event, as it presumably means the size and position haven't changed. svn path=/trunk/; revision=8634
2003-09-24In packet_list_button_pressed_cb (gtk2 version) :Olivier Abad1-8/+7
- put back the event_button->window == GTK_CLIST(w)->clist_window test now that we use the correct structure definition for GtkCList (from the right include file, not from our version of gtkclist.h). svn path=/trunk/; revision=8528
2003-09-24Pass a pointer to a "capture_file" structure toGuy Harris1-2/+2
"set_menus_for_selected_packet()" and "set_menus_for_selected_tree_row()", and have them decide whether to enable or disable menu items based on whether that structure indicates that a packet or field is selected and, if one is, on its properties. Pass to the "selected packet enabled" routine for a menu item the "frame_data" and "edt" members of the "capture_file" structure, and pass to the "selected tree row enabled" routine the "field_info" member of that structure. Clear "cf->current_frame" if no packet is selected. svn path=/trunk/; revision=8525
2003-09-24Make "finfo_selected" a member of a "capture_file" structure rather thanGuy Harris1-35/+32
an independent global variable. svn path=/trunk/; revision=8524
2003-09-23Temporary patch for the packet_list column resize problem in gtk2.Olivier Abad1-5/+1
We should use the same test (event_button->window == GTK_CLIST(w)->clist_window) we already use in gtk v1.2 code but in doesn't seem to work in gtk2. svn path=/trunk/; revision=8515
2003-09-15Clean up an error message.Guy Harris1-3/+3
svn path=/trunk/; revision=8481
2003-09-15Don't pop up tap windows specified with "-z" options until we have aGuy Harris1-9/+21
capture file open. svn path=/trunk/; revision=8480
2003-09-15Rename various capture file routines to have names starting with "cf_".Guy Harris1-7/+7
svn path=/trunk/; revision=8479
2003-09-15Don't allow -k and a capture file to both be specified on the commandGuy Harris1-3/+10
line - either we're doing a live capture or we're reading a saved capture file, we can't do both at the same time. svn path=/trunk/; revision=8475
2003-09-12Added TimeReference frames.Ronnie Sahlberg1-1/+24
One can now select a packet and mark it as a TimeReference packet using the menu. A TimeReference packet will be indicated by having all timestamp related column entries replaced by the string *REF* A TimeReference packet will always be displayed in the packet pane, and overrides any display filters. When a frame is a TimeReference frame, all later frames will calculate the TimeRelativeToFirstPacket relative to the timestamp of the TimeReference frame instead of the first frame of the capture. You can have any number of TimeReference frames you like. svn path=/trunk/; revision=8459
2003-09-10Have "get_interface_list()" return a list of "if_info_t" structuresGuy Harris1-2/+4
containing a pointer to an interface name and possibly a pointer to an interface description (although that pointer might be null if no description is available), rather than having the Windows version glue together the name and description into a single string. Supply for the Linux "any" device the same description that libpcap's "pcap_findalldevs()" returns. svn path=/trunk/; revision=8440
2003-09-03Check for "wtap_seek_read()" failing.Guy Harris1-4/+7
svn path=/trunk/; revision=8364
2003-09-03And for Cal,Ronnie Sahlberg1-2/+2
Ethereal presents a column to display culmulative bytes into the capture. A new column type is added : Culmulative Bytes. While PacketLength column type specifies the number of bytes in the current packet, Culmulative Bytes specifies the culmulative number of bytes from the start of the capture. svn path=/trunk/; revision=8359
2003-08-28Marking packets with the middle mouse button works now with GTK2.Olivier Abad1-2/+1
svn path=/trunk/; revision=8301
2003-08-19Construct the About box ourselves, so it has the title "About Ethereal"Guy Harris1-9/+60
and doesn't have a message-box-type icon. This might want to be tweaked further, to more closely resemble various desktop environments' About boxes (although what's appropriate might depend on the environment). svn path=/trunk/; revision=8194
2003-08-19Update to the Response Time Statistics taps.Ronnie Sahlberg1-1/+3
SMB/FC/ONC-RPC/DCE-RPC now all use the default tap filter string as the same filter string as is used in the main window instead of using a default NULL filter string. The idea is that if you have applied a certain filter to your main window, it is likely that if you want to invoke the response time statistics feature you probably want to do the response time statistics over the same set of packets, i.e. the ones you see in the main window. svn path=/trunk/; revision=8192
2003-08-07From Michael Lum: add the ability to have a preferences file containingGuy Harris1-72/+120
a list of disabled protocols, and to save that list from the Edit > Protocols dialog box. Add checks for read errors in "read_prefs()". Clean up white space. svn path=/trunk/; revision=8144
2003-07-25Fix signed/unsigned comparison warnings.Gilbert Ramirez1-4/+6
svn path=/trunk/; revision=8084
2003-07-19In packet_list_button_pressed_cb :Olivier Abad1-1/+3
we must check if the event occured in the clist_window (because the x,y pixel positions of the event are relative to this window), before calling gtk_clist_get_selection_info() Fixes debian bug #199763 svn path=/trunk/; revision=8053
2003-07-19In set_plist_sel_browse : change broken logic when determining if theOlivier Abad1-12/+10
mode has changed. svn path=/trunk/; revision=8051
2003-07-18Various fixes related to GTK2 :Olivier Abad1-8/+9
- give the focus to the packet_list when a capture file is opened, and each time we change the selection in the packet list (it seems that the tree view has the focus if we don't do this) ; - in set_plist_sel_browse() : it seems that packet_list->selection_mode is always 0 in GTK2 so we can't use it to determine the current mode. Use a static variable instead. This should fix the second part of debian bug #199763 svn path=/trunk/; revision=8045
2003-07-04From Lars Roland: load WinPcap *before* constructing the informationGuy Harris1-9/+9
about library versions. svn path=/trunk/; revision=7964
2003-06-22Ringbuffer rework.Laurent Deniel1-8/+19
Almost completely rewritten in order to: - be able to use a unlimited number of ringbuffer files 0 specified with -b argument or in the GUI, means that the number of file is unlimited. else the maximum number of ring buffer files is arbitrarily set to 1024. - close the current file and open (truncating it) the next file at switch - set the final file name once open (or reopen) - avoid the deletion of files that could not be truncated (can't arise now) and do not erase empty files The idea behind that is to remove the limitation of the maximum # of ringbuffer files being less than the maximum # of open fd per process and to be able to reduce the amount of virtual memory usage (having only one file open at most) or the amount of file system usage (by truncating the files at switch and not the capture stop, and by closing them which makes possible their move or deletion after a switch). svn path=/trunk/; revision=7912
2003-06-09Clean up the usage message a bit (using the convention, adhered to by atGuy Harris1-10/+8
least some UNIX utilities, of listing all the flags with no arguments in a single lump, and then listing the ones with arguments individually; also, make lines as long as possible, as long as they fit in 80 columns). svn path=/trunk/; revision=7815
2003-06-08Add a "--enable-threads" option, which allows to build the gtk+ v2Olivier Abad1-6/+6
ethereal with or without threads. The default is to use threads. (see http://www.ethereal.com/lists/ethereal-dev/200210/msg00111.html and http://www.ethereal.com/lists/ethereal-dev/200306/msg00061.html). svn path=/trunk/; revision=7807
2003-05-16Squelch some compiler complaints.Guy Harris1-2/+2
svn path=/trunk/; revision=7682
2003-05-15Implement a ring buffer switch duration:Laurent Deniel1-4/+58
when the new "Rotate capture file every n second(s)" checkbox or the -b <# of file>[:<duration>] argument are used, [t]ethereal will skip to the next ring buffer file if the specified duration has elapsed (even if the specified capture size is not reached). This is useful when you want to have separate capture files per hour or day for instance. I let the autostop filesize parameter mandatory (i.e. the "rotate capture file after n kilobytes") but this could be no longer strictly necessary when that new feature is used ... Another point: it might be interesting to really truncate the file at the switch and not the closure ... According to user comments and my own real case tests, I might plan to enhance this point and others (still ring buffer related) in the future. svn path=/trunk/; revision=7678
2003-05-04Add support for asynchronous DNS updates using the GNU ADNS library.Gerald Combs1-1/+6
Support can be enabled at configure time by using "--with-adns=DIR". If support is enabled, async queries happen whenever host name resolution is enabled. Do we need a separate preference for async queries? Currently, only IPv4 reverse queries are supported. I can add IPv4 forward lookup support, but I don't have any way to test IPv6 queries. svn path=/trunk/; revision=7640
2003-05-03Rename "proto_alloc_dfilter_string()" toGuy Harris1-13/+13
"proto_construct_dfilter_string()", to more accurately reflect what it does. Give it, and "proto_can_match_selected()", an "epan_dissect_t *" argument, which replaces the raw data pointer argument to "proto_construct_dfilter_string()". For fields that don't have a type we can directly filter on, we don't support filtering on the field as raw data if: the "epan_dissect_t *" argument is null; the data source tvbuff for the field isn't the tvbuff for the "epan_dissect_t" in question (i.e., it's in the result of a reassembly, and "frame[N:M]" can't get at it). Trim the length the raw data in the case of such a field to the length of the tvbuff for the "epan_dissect_t" in question, so we don't go past it. Fetch the raw data bytes to match from that tvbuff. Have "proto_construct_dfilter_string()" return a null pointer if it can't construct the filter string, and have "protocolinfo_packet()" in the tap-protocolinfo tap ignore a field if "proto_construct_dfilter_string()" can't construct a filter string for it - and have it pass NULL as the "epan_dissect_t *", for now. If somebody decides it makes sense to dump out a "frame[N:M] =" value for non-registered fields, it can be changed to pass "edt". svn path=/trunk/; revision=7635
2003-04-23Change copyright date to 2003.Laurent Deniel1-2/+2
svn path=/trunk/; revision=7545
2003-04-23Make "register_tap_listener()" return NULL on success and a "GString *"Guy Harris1-2/+2
referring to a GString containing an error message on failure, and don't have it print anything on failure. If it fails, have its Tethereal-tap callers print an error message before exiting, and have its Ethereal callers pop up a dialog box with the error (except in cases where the failure is guaranteed not to be the user's fault, and where we exit, in which case we just print an error message before we exit). In all cases, the error message includes the text of the GString. Fix a scanf format string in the DCE RPC statistics Ethereal tap, so that it properly skips the comma before the filter string. Fix some Ethereal error messages not to say "tethereal". svn path=/trunk/; revision=7542
2003-04-23Allow taps to have menu item registration routines; the menu itemGuy Harris1-4/+9
registration routines, for taps with menu items (taps that can be run from the "Tools->Statistics" menu), create the menu item for the tap. "make-tapreg-dotc" constructs a "register_all_tap_menus()" function that calls all the tap menu item registration routines it finds, and Ethereal calls that routine after the main window has been constructed (so that the main menu exists, as the menu items are added to it). (Tethereal doesn't call it.) Get rid of the "menu" and "menu_init" arguments to "register_ethereal_tap"; the menu item is registered in the tap's menu item registration routine, not in its main registration routine. Have the RTP GUI tap register its menu item that way, rather than by having it compiled into "gtk/menu.c". (We're not ready yet to have taps whose menu items are under a submenu register themselves in that fashion, as "register_tap_menu_item()" can't yet create submenus.) svn path=/trunk/; revision=7540
2003-04-16Pull the stuff done in "dissect_packet()" to initialize a column_infoGuy Harris1-2/+2
structure into its own routine; rename "col_init()" to "col_setup()", and call the new routine "col_init()". svn path=/trunk/; revision=7467
2003-04-16Add the notion of a "fence" to columns. A dissector can set the fenceGuy Harris1-1/+2
to "protect" what's currently in the column, so that attempts to clear the column will only clear stuff after the fence and attempts to overwrite the column will append stuff after the fence. This, for example, allows a dissector to arrange that the Info column contain information for its protocol and for protocols running atop it. svn path=/trunk/; revision=7466
2003-03-12Change the version messages to put the "compiled with" stuff on aGuy Harris1-11/+15
separate line, and to put the "running with" info on a separate line from that, to make the output narrower. svn path=/trunk/; revision=7344
2003-03-08Put the code to get version numbers of various libraries with whichGuy Harris1-70/+4
Ethereal/Tethereal was linked into a common routine, and use that in both Ethereal and Tethereal. Add to that routine code to get OS version information. svn path=/trunk/; revision=7320
2003-03-02Get rid of unneeded includes of "../ui_util.h".Guy Harris1-2/+1
svn path=/trunk/; revision=7257
2003-03-02Have "goto_frame()" put up error dialog boxes itself, rather than havingGuy Harris1-19/+3
its callers put up the same error dialog boxes. Have it just return a success vs. failure Boolean. svn path=/trunk/; revision=7254
2003-03-01The correct way to go to a frame with a given number is to useGuy Harris1-4/+20
"goto_frame()", not to assume that all frames are being displayed and to go to the row whose number is the frame number - 1. svn path=/trunk/; revision=7242
2003-02-17In gtk2 code, replace gdk_string_width() with the "Pango" way ofOlivier Abad1-4/+8
computing strings width and height. svn path=/trunk/; revision=7159