aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
AgeCommit message (Collapse)AuthorFilesLines
2002-01-11Label the window popped up by "Capture->Start" "Capture Options", notGuy Harris1-7/+7
"Capture Preferences", to avoid confusion with the "Capture" item in the "Preferences" dialog (which sets the initial default values for the "Capture Options" dialog). svn path=/trunk/; revision=4523
2002-01-11From Jirka Novak:Guy Harris4-34/+469
Support for generating filter expressions based on packet list column values Support for adding filter expressions generated from column or protocol tree field values to the current expression rather than replacing the current expression svn path=/trunk/; revision=4522
2002-01-11Have a routine to create a scrolled window, set its vertical scrollbarGuy Harris20-155/+118
preference, and add it to the list of scrolled windows; call that routine to create scrolled windows, rather than creating it and calling other routines to do the other two operations. As "set_scrollbar_placement_all()" and "set_ctree_styles_all()" always set the styles to match the user's preference, don't have them take an argument, have them just use the user's preference settings. Get rid of unnecessary includes of "prefs_dlg.h", replacing them with includes of "prefs.h" if necessary. Don't have "prefs_dlg.h" include "prefs.h" - its sole purpose is to declare routines defined in "prefs_dlg.c" - and add any additional includes of "prefs.h" this requires. Get rid of unnecessary includes of "prefs.h" and "gtkglobals.h". Fix up white space. svn path=/trunk/; revision=4521
2002-01-11Have routines to create GtkCTrees, set their line and expander styleGuy Harris10-154/+188
based on the user's UI preferences, and add them to a list of GtkCTrees. Use those routines to create all GtkCTrees. Have a routine to update the preferences for all of those GtkCTrees. Call that routine whenever the preferences change. Label the line and expander style preferences as "Tree line style" and "Tree expander style", as they no longer apply only to protocol trees. Move the routines to maintain a list of scrolled windows, and to update scrollbar placement for scrolled windows, to "ui_util.c". svn path=/trunk/; revision=4520
2002-01-10Separate the promiscuous mode, "Update list of packets in real time",Guy Harris3-26/+48
and "Automatic scrolling in live capture" options from the preference settings for them, so that the preference settings affect the initial values of those options, but changing those values in a capture don't affect the preferences, and don't automatically get saved when you save the preferences. If we're building without libpcap, don't have an "Automatic scrolling in live capture" option anywhere. svn path=/trunk/; revision=4514
2002-01-10Fix some problems with building Ethereal/Tethereal without libpcap.Guy Harris2-8/+35
Get rid of a #include I'd #if 0'ed out. svn path=/trunk/; revision=4513
2002-01-10Add a preferences page for capture preferences, so that the user canGuy Harris7-15/+261
directly edit the capture preferences, rather than only being able to set them implicitly from the values for the most recent capture. Add a preferences item for the interface on which to capture. Get rid of some unused variables. svn path=/trunk/; revision=4510
2002-01-08Don't process a color filter if there's no filter associated with it.Guy Harris1-107/+111
Don't put a color filter into the list of color filters if we can't allocate the colors for the filter. Clean up white space. svn path=/trunk/; revision=4502
2002-01-08Add a routine to kill a capture child if it exists, so that if we exitGuy Harris1-29/+48
(by deleting the main window or selecting File->Quit or typing ^Q) while an "Update list of packets in real time" capture is in progress, we can abort the capture. Arrange that "fork_child" is -1 when there is no capture child, so said routine knows when it can kill the child. When we exit, kill off any capture child, using that routine, and, if we're exiting due to a request to delete the main window and, if a read is in progress (from an "Update list of packets in real time" capture), don't delete the main window - just set the "Read aborted" flag, so that the code doing the read will see that flag (it will be called because the pipe to the capture child is closed due to the child exiting) will see that and clean up and exit itself. svn path=/trunk/; revision=4498
2002-01-03From Albert Chin: eliminate a GCCism.Guy Harris1-3/+3
svn path=/trunk/; revision=4467
2001-12-31Fix a pointer error in find_stat_node.Gerald Combs1-2/+5
Define a default width and maximum height for the stats dialog. svn path=/trunk/; revision=4463
2001-12-31Add preferences to save the main window size and position. If enabled,Gerald Combs4-28/+158
the geometry is saved at exit. Should we save the main window pane sizes as well? Move the DEF_WIDTH and DEF_HEIGHT #defines from gtk/main.h to prefs.h. Remove the reference to DEF_WIDTH from proto_hier_stats_dlg.c. svn path=/trunk/; revision=4462
2001-12-21Print out messages if any of the ring buffer checks fail.Guy Harris1-16/+22
Do the ring buffer checks at the same time other command-line argument checks are done. svn path=/trunk/; revision=4439
2001-12-21There is no such thing as an optional parameter to a command-line flagGuy Harris1-8/+2
if you're using "getopt" - if a flag requires a parameter, not specifying the parameter is an error. svn path=/trunk/; revision=4437
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez9-12/+42
Put a hash-table of "interesting" fields in the per-proto-tree data. The dfilter code records which fields/protocols are "interesting" (by which I mean, their value or existence is checked). Thus, the proto_tree routines can create special arrays of field_info*'s that are ready for the dfilter engine to use during a filter operation. Also store the "proto_tree_is_visible" boolean, renamed "visible", in the per-proto-tree data. Move epan_dissect_t to its own header file to make #include dependencies easier to handle. Provide epan_dissect_fill_in_columns(), which accepts just the epan_dissect_t* as an argument. epan_dissect_new() needs to be followed by epan_dissect_run() for the dissection to actually take place. Between those two calls, epan_dissect_prime_dfilter() can be run 0, 1, or multiple times in order to prime the empty proto_tree with the "intersesting" fields from the dfilter_t. svn path=/trunk/; revision=4422
2001-12-16Add an extra argument to "epan_dissect_new()" that indicates whether theGuy Harris1-4/+2
display representation should be put into protocol tree items if a protocol tree is to be constructed; have it set "proto_tree_is_visible" from that argument. svn path=/trunk/; revision=4408
2001-12-13Fix up the comment on "set_main_window_name()" (I'm not sure why I putGuy Harris1-15/+51
that note in about KWM, unless I was noting that the title bar entry for a window has the window title rather than the icon title, but, as we're setting both, I'm not sure it's relevant), and change the name of its argument, as it's used to set both the window and icon titles. Add some more information to the comments for "reactivate_window()" and "window_icon_realize_cb()". svn path=/trunk/; revision=4394
2001-12-12Go nuts with the 3D logo.Gerald Combs10-15/+77
Add a routine to ui_util.c that sets a window's icon pixmap to a 16x16 version of the 3D logo. Call the routine for each window that is created. This has been tested with kwm and Sawfish (which expect a 16x16 icon), but we may have to come up with a better solution for other window managers (e.g. olwm and mwm). Add a 3D exclamation point image. Replace the exclamation point and Ethereal logo images used in simple_dialog() with their 3D counterparts. Remove the old icons from the source distribution. svn path=/trunk/; revision=4390
2001-12-12From Motonori Shindo:Guy Harris1-3/+3
fix a bogus batch mode inference rule of make, so that "vc60.pdb" files are created in the proper directory; delete ".pdb" files in a "nmake -f Makefile.nmake clean"; include the text2pcap and mergecap ".pdb" files in the Windows binary distribution. svn path=/trunk/; revision=4385
2001-12-12From Motonori Shindo: add a cast of "ip" to "guint8 *" so pointerGuy Harris1-2/+2
arithmetic can be done on it. svn path=/trunk/; revision=4384
2001-12-10Put in a comment indicating that even loading a one-byte field from anGuy Harris1-1/+12
unaligned data structure could get an unaligned load fault on Alpha. svn path=/trunk/; revision=4381
2001-12-10Test the link-layer type of the frame being looked at, not theGuy Harris1-7/+6
currently-selected frame - they're not necessarily the same. svn path=/trunk/; revision=4380
2001-12-10Use the encapsulation type of the current frame to decide whatGuy Harris1-11/+27
link-layer header it has. svn path=/trunk/; revision=4379
2001-12-10Get rid of the stuff to use bitfields to dissect IP and TCP headers -Guy Harris1-62/+12
bitfields are a pain to use when dealing with structures with a fixed layout in memory (you have to worry about bit order, for example). Don't assume that the Ethernet header is aligned on a 2-byte boundary - use "pntohs()" to extract stuff from it. (Perhaps C will force it onto a 2-byte boundary, but why take chances, and why leave the code vulnerable to changes outside this module?) Don't assume that the pointers to the IP and TCP headers are nicely aligned - use "memcpy()", not structure assignment, to copy the headers. (They're probably *not* nicely aligned on platforms that require 4-byte alignment of 4-byte integral quantities; the code was dumping core on SPARC with an alignment error.) Don't even make those pointers be pointers to structures, as that may cause the C compiler to generate in-line 4-byte loads and stores for "memcpy()" (in fact, it *did* do so with GCC 2.95.1 on SPARC), which has the same problem as structure assignment. Don't test the IP protocol number twice when handling PPP. svn path=/trunk/; revision=4378
2001-12-10Change a printf() error message to a simple_dialog() error message.Gilbert Ramirez1-2/+4
svn path=/trunk/; revision=4377
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-2/+2
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
2001-12-09Check for invalid maximum packet count values.Guy Harris1-2/+6
svn path=/trunk/; revision=4368
2001-12-09From Gordon McKinney: make IP-over-PPP work with the TCP graph code.Guy Harris1-3/+15
svn path=/trunk/; revision=4367
2001-12-09On Win32, a GUI application apparently can't use "popen()" (itGuy Harris1-1/+42
"returns an invalid file handle, if used in a Windows program, that will cause the program to hang indefinitely"), so we can't use a pipe to a print command to print to a printer. Eventually, we should try to use the native Win32 printing API for this (and also use various UNIX printing APIs, when present?). For now, we support only printing to a file in Windows. svn path=/trunk/; revision=4366
2001-12-08Give the help window a title.Guy Harris1-1/+2
svn path=/trunk/; revision=4361
2001-12-08TCP time-sequence, round-trip time, and throughput graphs, from PavelGuy Harris5-2/+3806
Mores. svn path=/trunk/; revision=4360
2001-12-08Attach a descriptive name field type and base to dissector tables; thatGuy Harris1-6/+42
specifies how the selector values used as keys in those tables are to be displayed, and the title to use when displaying the table. Use that information in the code to display the initial and current entries of various dissector tables. Have the dissector for BACnet APDUs register itself by name, and have the BACnet NPDU dissector call it iff the BAC_CONTROL_NET bit isn't set, rather than doing it with a dissector table. svn path=/trunk/; revision=4358
2001-12-06Handle the case of the initial, or current, dissector handle for aGuy Harris1-3/+9
particular port number being null. svn path=/trunk/; revision=4347
2001-12-06Remove proto_tree from capture_file and PacketWinData, since theyGilbert Ramirez3-16/+13
already contain a pointer to an epan_dissect_t, which contains the proto_tree. Routines calling epan_dissect_new() do not create their own proto_tree via proto_tree_create_root(); instead, they pass a boolean to epan_dissect_new() telling it whether it should create the root proto_tree. svn path=/trunk/; revision=4343
2001-12-06Don't update the "Save As..." dialog box if it doesn't exist.Guy Harris1-7/+22
Update some comments. svn path=/trunk/; revision=4342
2001-12-06Make the "Save only marked frames" button in the "Save As..." dialog boxGuy Harris3-14/+56
sensitive only if there *are* marked frames. svn path=/trunk/; revision=4341
2001-12-04When making the "number of ring buffer files" spin button sensitive orGuy Harris1-40/+67
insensitive, make its label sensitive or insensitive too. When "update list of packets in real time" mode is on, make the ring buffer mode toggle button, and the "number of ring buffer files" spin button, insensitive, as ring buffer mode is not supported in "update list of packets in real time" captures. When "update list of packets in real time" mode is off, make the auto-scroll mode button insensitive, as auto-scroll mode is meaningless unless you're doing an "update list of packets in real time" capture. Bundle all the sensitivity setting into a single common routine. Make "ring buffer" two words. svn path=/trunk/; revision=4325
2001-12-04Make the bytes-written information from Wiretap a long, as we allowGuy Harris2-9/+145
files to get that big. From Thomas Wittwer and Matthias Nyffenegger: Support for "ring buffer mode", wherein there's a ring buffer of N capture files; as each capture file reaches its maximum size (the ring buffer works only with a maximum capture file size specified), Ethereal rolls over to the next capture file in the ring buffer, replacing whatever packets might be in it with new packets. svn path=/trunk/; revision=4323
2001-12-04Support for stopping capture at specified capture file size or captureGuy Harris2-21/+176
duration, from Thomas Wittwer and Matthias Nyffenegger. svn path=/trunk/; revision=4322
2001-12-04From Thomas Wittwer: remove unnecessary calls toGuy Harris1-3/+1
"prefs_module_foreach()". svn path=/trunk/; revision=4321
2001-12-03"ptype" is always set, even if only to PT_NONE; it will be set to PT_TCPGuy Harris1-21/+22
only there's TCP in the current frame and it will be set to PT_UDP only if there's UDP in the current frame. As such, there's no need to check "ipproto" before checking "ptype" - and we should check "ptype" as well as "ipproto" when deciding whether we'll put up a "Decode As" dialog with anything in it. (Not that there's anything other than IPv4 or IPv6 over which we currently dissect TCP or UDP....) svn path=/trunk/; revision=4318
2001-12-03To check whether the current frame contains TCP or UDP traffic, checkGuy Harris1-168/+25
whether the port type is PT_TCP or PT_UDP, don't check the IP protocol type at the network layer (except to check whether it's set at all, to decide whether it's IP/IPv6 - if it's not, the transport isn't TCP or UDP); that way, we don't have to keep track of which IP protocol numbers are being decoded as TCP or UDP. svn path=/trunk/; revision=4317
2001-12-03When the dissector tables are reset to the default settings, the list ofGuy Harris1-1/+10
IP protocol numbers to be decoded as TCP and as UDP should be reset as well. svn path=/trunk/; revision=4313
2001-12-03Get rid of the lists of conversation dissectors; instead, have aGuy Harris1-231/+168
dissector table contain both a hash table, to use to look up port numbers to find a dissector, and a list of all dissectors that *could* be assigned to ports in that hash table, to be used by user interface code. Make the "Decode As" dialog box code use that. Also make it *not* let you choose whether to set the dissector for both the UDP and TCP versions of a port; some protocols run only atop TCP, some run only atop UDP, and even those that can run atop both may have different dissector handles to use over TCP and UDP, so handling a single merged list would be a mess. (If the user is setting the dissector for a TCP port, only those protocols that Ethereal can handle over TCP should be listed; if the user is setting the dissector for a UDP port, only those protocols that Ethereal can handle over TCP should be listed; if the user is setting a dissector for both, only those protocols that Ethereal can handle over *both* TCP *and* UDP should be listed, *and* there needs to be a way to let the "Decode As" code get both the TCP handle *and* the UDP handle and use the right ones. If somebody really wants that, they need to implement all of the above if they want the code to be correct.) Fix the code that handles setting the dissection for the IP protocol number to correctly update the lists of protocols being dissected as TCP and as UDP; the code before this change wasn't updating the single such list to add new protocols. svn path=/trunk/; revision=4311
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris1-25/+20
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
2001-12-03Get rid of an unused variable, and fix a comment.Guy Harris1-3/+2
svn path=/trunk/; revision=4307
2001-12-02From John McDermott:Guy Harris2-105/+98
Adds an "Add Expression..." button to the color filter creation dialog. Improve the look of the "Add color to protocols" window. Clean up some ugly code. Give John credit in the AUTHORS file for the coloring stuff. svn path=/trunk/; revision=4301
2001-11-24If a non-option command-line argument is specified to Ethereal, treat itGuy Harris1-3/+36
as the pathname of a capture file to be read. If more than one such option is specified, print a usage message. Fix the documentation of the "-r" option to Ethereal and Tethereal. svn path=/trunk/; revision=4253
2001-11-21Remove the global packet_info called "pi". Dissectors now onlyGilbert Ramirez5-27/+23
access their own "pinfo". A packet_info is stored in epan_dissect_t, which is created for the dissection of a single packet. GUI functions which need to access the packet_info of the currently selected packet used to use "pi"; now they use cfile.edt->pi. cfile's "edt" member is the epan_dissect_t of the currently-selected packet. The functionality of blank_packetinfo() was moved into dissect_packet(), as that's the only place that called blank_packetinfo(), after a spurious call to blank_packetinfo() was removed from packet_list_select_cb(). svn path=/trunk/; revision=4246
2001-11-21Get rid of some unused variables.Guy Harris1-3/+1
svn path=/trunk/; revision=4239