aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
AgeCommit message (Collapse)AuthorFilesLines
2002-04-01Start assigning ett_ values at 0, rather than 1; get rid of the reservedGuy Harris1-1/+4
ETT_NONE entry. Initialize the "tree_type" field of a "field_info" structure to -1, meaning "this has not been given a subtree". Add checks before using that field that it's in range. That way, you have to create a subtree before putting protocol tree items under another item. We allocate the "tree_is_expanded" array when we've registered all dissectors; there's no need to allocate it while we're registering dissectors and, in fact, doing so means we leak memory (the memory for the version we allocated while registering dissectors). svn path=/trunk/; revision=5068
2002-03-31Get rid of unused arguments.Guy Harris4-17/+15
Use the "nb" argument to "redraw_hex_dump()", so we redraw the specified byte view pane, rather than always redrawing the main window's byte view pane (and never redrawing the byte view pane of additional packet windows, so that the font for them doesn't change if you change the font preference). svn path=/trunk/; revision=5066
2002-03-31Get rid of an unused argument to "set_active_all()".Guy Harris1-6/+6
Mark as unused arguments that are now unused as a result of not passing them to "set_active_all()". svn path=/trunk/; revision=5065
2002-03-31From Joerg Mayer: get rid of unused arguments, and mark those that can'tGuy Harris1-2/+2
be eliminated (because the function is called through a pointer, and other functions called through the same pointer *do* use the argument) as unused. svn path=/trunk/; revision=5050
2002-03-16A double-click in a filter name in the list-of-filters dialog box shouldGuy Harris1-9/+28
activate the text widget into which the filter text is put only if clicking "OK" in the list-of-filters dialog box does so. Make it so. svn path=/trunk/; revision=4955
2002-03-12Get rid of the "--enable-snmp" option; instead, use "--with-ucdsnmp".Guy Harris1-5/+3
Make the directory option to "--with-ucdsnmp" optional. Handle "--with-ucdsnmp" similar to the way "--with-pcap" is handled. Get rid of unnecessary #defines in "packet-cops.c". Get rid of no-longer-necessary include of "dlfcn.h" in "packet-snmp.c". svn path=/trunk/; revision=4930
2002-03-10Remove code to show the presence, and version number, of the CMU SNMPGuy Harris1-13/+2
library, as we no longer support linking with that library. svn path=/trunk/; revision=4917
2002-03-06Don't say "without SNMP"; that can confuse people into thinking it meansGuy Harris1-4/+2
Ethereal doesn't dissect SNMP if not linked with an SNMP library (and *did* confuse at least one person into thinking that). Say "without SNMP MIB support", instead, as you only lose the ability to read SNMP MIBs and interpret OIDs and variable bindings according to those MIBs. svn path=/trunk/; revision=4894
2002-03-05From Joerg Mayer: remove unused variables.Guy Harris6-17/+8
svn path=/trunk/; revision=4879
2002-03-05From Joerg Mayer: use _U_ to flag unused arguments.Guy Harris32-258/+258
svn path=/trunk/; revision=4878
2002-03-05Have "wtap_seek_read()" return 0 on success and -1 on failure, and takeGuy Harris2-6/+11
an "err" argument that points to an "int" into which to put an error code if it fails. Check for errors in one call to it, and note that we should do so in other places. In the "wtap_seek_read()" call in the TCP graphing code, don't overwrite "cfile.pseudo_header", and make the buffer into which we read the data WTAP_MAX_PACKET_SIZE bytes, as it should be. In some of the file readers for text files, check for errors from the "parse the record header" and "parse the hex dump" routines when reading sequentially. In "csids_seek_read()", fix some calls to "file_error()" to check the error on the random stream (that being what we're reading). svn path=/trunk/; revision=4874
2002-03-05Cut down the vertical spacing in the "Capture Options" dialog box.Guy Harris1-7/+7
svn path=/trunk/; revision=4870
2002-02-28In follow.c, initialize data_out_file to NULL, as it used toGilbert Ramirez1-2/+2
be initialized in gtk/follow_dlg.c In gtk/follow_dlg.c, declare data_out_file as 'extern'. In tethereal.c, no longer define 'data_out_file', as the storage for it is now in follow.c. svn path=/trunk/; revision=4830
2002-02-27From Joerg Mayer:Guy Harris1-1/+6
In the "configure.in" files, add -D_U_="__attribute__((unused))" to CFLAGS if we're using GCC, and add -D_U_="" otherwise, so _U_ can be used to mark arguments as unused. Add -D_U_="" arguments to the Makefile.nmake files as well, so _U_ works with Microsoft Visual C++ as well. Add comments and RCS IDs to the Makefile.nmake files that don't already have them. svn path=/trunk/; revision=4824
2002-02-24Put all the capture options into a structure.Guy Harris2-86/+102
Move the ringbuffer capture options from the "capture_file" structure to the structure for capture options, as they're a property of an in-progress capture, not a property of a particular capture file. svn path=/trunk/; revision=4799
2002-02-24Have "get_positive_int()" really check for positive integers, not justGuy Harris2-36/+7
non-negative integers. Get rid of unused "get_positive_int()" routine in "gtk/capture_dlg.c". svn path=/trunk/; revision=4796
2002-02-24"autostop_filesize" and "autostop_duration" don't need to be in theGuy Harris2-29/+38
"capture_file" structure - they're a property of an in-progress capture, not a property of an open capture file. Make them just variables. The maximum number of packets to be captured should be a variable separate from the "count" field in the "capture_file" structure - the latter is a count of the packets in the capture file in question. Have Boolean variables indicating whether a maximum packet count, maximum capture file size, and maximum capture duration were specified. If an option isn't set, and we're doing an "update list of packets in real time" capture, don't pass the option to the child process with a command-line argument. Don't create "stop when the capture file reaches this size" or "stop when the capture's run for this long" conditions if a maximum capture file size or a maximum capture duration, respectively, haven't been specified. Don't test or free a condition if it wasn't created. Don't allow a 0 argument to the "-c" flag - the absence of a "-c" flag is the way you specify "no limit on the number of packets". Initialize the check boxes and spin buttons for the "maximum packets to capture", "maximum capture size", and "maximum capture duration" options to the values they had in the last capture. If an option wasn't specified, don't read its value from the dialog box and set the variable. svn path=/trunk/; revision=4795
2002-02-24From Peter Valchev: fix editcap to assign the result of "getopt()" to anGuy Harris1-2/+2
"int" and to check "getopt()"s return value with -1 rather than EOF. Fix other "getopt()" loops to check against -1 as well (EOF is -1 on most if not all platforms, but the Single UNIX Specification says "getopt()" returns -1, so we should check against -1, not EOF). svn path=/trunk/; revision=4793
2002-02-22Set "snaplen", not "has_snaplen", to the snapshot length specified inGuy Harris1-6/+6
the capture preferences dialog box. svn path=/trunk/; revision=4783
2002-02-18Don't give tvbuffs names; instead, give data sources names, where aGuy Harris4-256/+238
"data source" has a name and a top-level tvbuff, and frames can have a list of data sources associated with them. Use the tvbuff pointer to determine which data source is the data source for a given field; this means we don't have to worry about multiple data sources with the same name - the only thing the name does is label the notebook tab for the display of the data source, and label the hex dump of the data source in print/Tethereal output. Clean up a bunch of things discovered in the process of doing the above. svn path=/trunk/; revision=4749
2002-02-14FIRST_PROTO_PREFS_PAGE needs to be incremented by 2 in order forGilbert Ramirez1-2/+2
the "Protocol Preferences" pop-up menu option to work properly. svn path=/trunk/; revision=4735
2002-02-08Have Wiretap set the snapshot length to 0 if it can't be derived fromGuy Harris3-190/+349
reading the capture file. Have callers of "wtap_snapshot_length()" treat a value of 0 as "unknown", and default to WTAP_MAX_PACKET_SIZE (so that, when writing a capture file in a format that *does* store the snapshot length, we can at least put *something* in the file). If we don't know the snapshot length of the current capture file, don't display a value in the summary window. Don't use "cfile.snap" as the snapshot length option when capturing - doing so causes Ethereal to default, when capturing, to the snapshot length of the last capture file that you read in, rather than to the snapshot length of the last capture you did (or the initial default of "no snapshot length"). Redo the "Capture Options" dialog box to group options into sections with frames around them, and add units to the snapshot length, maximum file size, and capture duration options, as per a suggestion by Ulf Lamping. Also add units to the capture count option. Make the snapshot length, capture count, maximum file size, and capture duration options into a combination of a check box and a spin button. If the check box is not checked, the limit in question is inactive (snapshot length of 65535, no max packet count, no max file size, no max capture duration); if it's checked, the spinbox specifies the limit. Default all of the check boxes to "not checked" and all of the spin boxes to small values. Use "gtk_toggle_button_get_active()" rather than directly fetching the state of a check box. svn path=/trunk/; revision=4709
2002-01-30Include <string.h> to declare various string functions.Guy Harris1-1/+6
Include "snprintf.h", when needed, to declare "snprintf()" on platforms that don't have it. Fix some formats and arguments to various printing routines. Fix "diameter_time_to_string()" to properly fetch the time value from the data buffer handed to it. svn path=/trunk/; revision=4639
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris21-71/+68
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
2002-01-20Make the blurbs for protocol preference items into tooltips. (This alsoGuy Harris6-48/+110
lets us add tooltips to other preference items whose widgets are created with the "create_preference_XXX()" routines - just pass in a tooltip text string rather than a null pointer.) svn path=/trunk/; revision=4577
2002-01-18Squelch a valid compiler warning (passing a "char" to the "is..." macrosGuy Harris1-2/+4
can give the wrong answer if the 8th bit of the "char" is set). svn path=/trunk/; revision=4567
2002-01-18Memory freeing fix, from Jirka Novak.Guy Harris1-7/+7
svn path=/trunk/; revision=4565
2002-01-18Support for hex dump mode in "Follow TCP Stream" window showing hex andGuy Harris1-2/+26
ASCII data, from Jirka Novak. svn path=/trunk/; revision=4564
2002-01-14Get the current value of Boolean preferences before adding widgets forGuy Harris1-1/+2
them (by putting back a line that got accidentally deleted in a previous checkin). svn path=/trunk/; revision=4537
2002-01-13Add a preferences page for the name resolution flags.Guy Harris14-344/+530
Separate the preferences value for those flags and the name resolution code's value into separate variables; this means that the resolution code no longer depends on the preferences code, and may let us eventually have the current setting and the preference setting differ (so that a user can temporarily override the preference setting without causing subsequent saves of the preferences to save the temporary value). Add routines to create various types of widgets for preferences, and to fetch the values for "enumerated" preferences, and use them both in the code to handle hardwired preference pages and table-driven preference pages. svn path=/trunk/; revision=4536
2002-01-12Put the labels of check boxes to the left of the checkboxes,Guy Harris1-6/+8
right-aligned, and give all of them a colon at the end, to match the style of other preferences. svn path=/trunk/; revision=4535
2002-01-12Get rid of unused variables.Guy Harris1-10/+12
Put the labels of check boxes to the left of the checkboxes, right-aligned, and give all of them a colon at the end, to match the style of module preferences. svn path=/trunk/; revision=4534
2002-01-12While you're at it, use the key for the auto scroll option checkbox forGuy Harris1-2/+2
the pointer to the auto scroll options checkbox.... svn path=/trunk/; revision=4532
2002-01-12Make the key for the capture preference window's pointer to the autoGuy Harris1-2/+2
scroll option checkbox distinct from the key for the pointer to the real-time capture option checkbox, so thee auto scroll option checkbox can be fetched. svn path=/trunk/; revision=4531
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