aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/io_stat.c
AgeCommit message (Collapse)AuthorFilesLines
2005-09-14Have cf_retap_packets() take an argument that indicates whether toGuy Harris1-3/+3
generate columns; use cf_retap_packets instead of cf_redissect_packets() when running taps (the general flow graph stat uses the Info column). svn path=/trunk/; revision=15793
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping1-3/+2
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... svn path=/trunk/; revision=15520
2005-08-21As per a suggestion by Ulf Lamping, rename gtk_*.[ch] to gui_*.[ch], soGuy Harris1-1/+1
that it doesn't appear to be part of GTK+. svn path=/trunk/; revision=15501
2005-08-21Add a "register_dfilter_stat()", to register stats that take a displayGuy Harris1-1/+2
filter as an argument on the command line and have a dialog box to enter the display filter through the GUI. Use it for all stats using "gtk_tap_dfilter_dlg_cb()". Add a top-level "stat_menu.h" file to declare "REGISTER_STAT_GROUP_E" for the benefit of the declaration of "register_dfilter_stat()" in the top-level "tap_dfilter_dlg.h". Rename the "stat_menu.h" in the gtk directory to "gtk_stat_menu.h", so as not to have two headers with the same name. Get rid of headers not declaring any functions not being used in the module. svn path=/trunk/; revision=15493
2005-08-20Rename epan/stat.[ch] to epan/stat_cmd_args.[ch] - it only deals withGuy Harris1-1/+1
implementing the "-z" command-line arguments, it doesn't deal with *all* issues for stats. svn path=/trunk/; revision=15483
2005-08-20renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical ↵Ulf Lamping1-1/+1
named ui_util.h in / dir svn path=/trunk/; revision=15465
2005-08-19Move the stats.[ch] stuff into epan, so plugins can use it.Guy Harris1-1/+1
svn path=/trunk/; revision=15429
2005-08-19Move the APIs for registering and processing "-z" command-line argumentsGuy Harris1-3/+4
and "Statistics" menu items into "stat.h" and "stat.c", to separate them from the core tapping APIs. A tap could conceivably not register as a "-z" command-line argument or "Statistics" menu item, and a stat could conceivably not be implemented as a tap, and dissectors that implement tapping points don't need the UI-related stuff from "stat.h", they just want the tap-related stuff in <epan/tap.h>. svn path=/trunk/; revision=15427
2005-08-17strdup -> g_strdup and alikeUlf Lamping1-3/+3
svn path=/trunk/; revision=15392
2005-08-06Last set of char -> const char trivial warning fixes.Jörg Mayer1-6/+6
svn path=/trunk/; revision=15244
2005-08-06Squelch more const warnings (and fix some memory leaks that found).Guy Harris1-2/+2
_U_-ify some unused arguments, rather than assigning them to themselves. Un-constify one variable that gets assigned a mallocated pointer. Clean up indentation. svn path=/trunk/; revision=15236
2005-07-15make io-stat able to do SUM(*) for FT_RELATIVE_TIME fieldsRonnie Sahlberg1-0/+5
Example: SUM(tcp.analysis.rto) so one can plot the total amount of time that TCP sessions were idle due to waiting for a retransmission to occur. svn path=/trunk/; revision=14920
2005-04-20increase the length of the field field from 30 to 50 characters so that ↵Ronnie Sahlberg1-1/+1
hopefully all long named fields can fit in the textbox for iorapgs/advanced svn path=/trunk/; revision=14146
2005-04-01Rename "register_ethereal_tap()" to "register_tap_listener_cmd_arg()" asGuy Harris1-1/+1
it's used to register a callback for a tap listener invoked if the specified command line argument is specified to the "-z" flag. Move it, along with routines to: look up a "-z" argument in the table constructed by "register_tap_listener_cmd_arg()" and either save the full argument to "-z" and the corresponding listener if it's found or return a failure indication if it isn't; list the available tap listeners; call the "init" routines for the tap listeners saved in the table above; and have Ethereal and Tethereal use those routines. svn path=/trunk/; revision=13993
2005-02-04huge cleanup of capture file API (functions in file.c/file.h).Ulf Lamping1-3/+3
This includes: all functions in file.h now have a cf_ prefix, will have doxygen tags, will have the capture_file *cf as the first parameter and I tried to generalize the return values for non trivial functions. Hopefully, I didn't introduced any new bugs, as I had to change a lot of files... svn path=/trunk/; revision=13289
2005-01-20add some more online help functionality and help buttons at various dialog ↵Ulf Lamping1-7/+18
boxes, if a help page *is* available. However, the new help system needs a lot more work before completed. svn path=/trunk/; revision=13152
2005-01-01Add casts of OBJECT_SET_DATA() arguments in cases where that'sGuy Harris1-11/+12
appropriate. Use %u, not %d, to convert unsigned values to strings. svn path=/trunk/; revision=12921
2005-01-01As we've made the tap_specific_data field of a tap_packet_t structure aGuy Harris1-1/+1
const pointer (so that we don't get complaints when we make the tap-specific data argument to "tap_queue_packet()" a const pointer, allowing dissectors to hand const data to a tap without a complaint), we should make the tap per-packet function take a const pointer as an argument as well. Do so. In some taps, use _U_, or actually use the argument, rather than sticking in dummy "X = X" assignments to fake use of parameters. (This means that the tap functions in question no longer have the notion that they act on a particular static structure wired in.) svn path=/trunk/; revision=12910
2004-12-31"gtk_entry_get_text()" returns a "const char *" - assign the result toGuy Harris1-5/+5
one. "get_basename()" doesn't modify its argument, and its callers don't modify the substring pointed to by the result, so make it take a "const char *" as an argument and return a "const char *". "find_last_pathname_separator()" doesn't modify its argument, so make it a "const char *" - but some of its callers pass a non-"const" "char *" and modify the result, so don't make its return value a "const char *". And, as none of its callers are outside "filesystem.c", make it static. In "about_folders_page_new()", have separate variables for pathnames returned as "const char *" (which are cached by the routine that returns them, so you can't modify them - and can't free them, so get rid of the commented-out "g_free()" calls for them) and pathnames returned as "char *" (which are allocated anew for each call, and can be modified, but have to be freed). Clean up white space. svn path=/trunk/; revision=12881
2004-12-29Make the tone of the error messages a bit less formal, by usingGuy Harris1-2/+2
contractions. (Safari does, at least when you're trying to open a file to which you don't have read access.) svn path=/trunk/; revision=12852
2004-09-29Move the tap infrastructure to the epan directory.Guy Harris1-1/+1
svn path=/trunk/; revision=12128
2004-07-27From Ian Schorr: don't check the validity of the field name for anGuy Harris1-7/+7
advanced-mode graph if the graph isn't active. svn path=/trunk/; revision=11537
2004-07-19renamed filter_prefs to filter_dlg, as the filter settings are (well, for a ↵Ulf Lamping1-4/+1
long time) no longer part of the preferences dialog. svn path=/trunk/; revision=11436
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-05-23use new functions in window API (ui_util.h),Ulf Lamping1-18/+5
use window_new instead of dlg_window_new for the statistics windows (as these are no dialog windows) do some code cleanup svn path=/trunk/; revision=10979
2004-05-22going to have a standard behaviour of the dialogsUlf Lamping1-4/+2
(including remebering of the dialog size in recent file). for a first step, I replaced all window_new() calls from dialogs into dlg_window_new() ones, and removed all gtk_window_set_position calls, this should be done in a more generalized way svn path=/trunk/; revision=10964
2004-04-17Report problems due to the user specifying something we can't handle asGuy Harris1-7/+7
errors, not warnings. svn path=/trunk/; revision=10618
2004-03-13replaced sprintf / snprintf by g_snprintf,Ulf Lamping1-28/+28
various other string related changes svn path=/trunk/; revision=10373
2004-03-08update to iostat make it automagically make sure the field is part of the ↵Ronnie Sahlberg1-7/+59
filter string svn path=/trunk/; revision=10342
2004-02-27added dfilter string syntax check to various placesUlf Lamping1-1/+2
svn path=/trunk/; revision=10252
2004-02-25changed some labelsUlf Lamping1-11/+59
svn path=/trunk/; revision=10231
2004-02-24minor redesign of the dialogUlf Lamping1-43/+62
svn path=/trunk/; revision=10230
2004-02-24added a "Close" button to the dialogUlf Lamping1-3/+29
svn path=/trunk/; revision=10221
2004-02-23changed title and menu registering to "IO Graphs"Ulf Lamping1-8/+8
and changed some of the labels to be more intuitive svn path=/trunk/; revision=10207
2004-02-23Changed all items to "Endpoint List" and get rid of the "Host List" group.Ulf Lamping1-3/+3
called "IO stats" now "Throughput Graph" as this might be somewhat more descriptive IMHO. Same applies to the "TCP Stream Analysis" -> "TCP Stream Graphs" svn path=/trunk/; revision=10203
2004-02-23statistics menu redesigned, now looking more like the former menu,Ulf Lamping1-2/+2
items now again grouped by function, not by ISO layer svn path=/trunk/; revision=10202
2004-02-22Redesigned the menu structure of the former statistics stuff,Ulf Lamping1-7/+3
now sorted by ISO-layer, than alphabetically (now longer by functionality). Seperated the tap registering from the actual menu making stuff, so the seperate step of registering the tap and the menu is no longer needed. Removed all things related to this double registering. svn path=/trunk/; revision=10180
2004-02-13Add a "window_new()" routine that creates a window of a given type, setsGuy Harris1-4/+7
the title, and arranges to set the icon for it. Use that instead of "gtk_window_new()" and separate calls to set the title and arrange to set the icon. Regularize #includes a bit. Clean up white space. svn path=/trunk/; revision=10054
2004-02-11Most taps that now include "tap_menu.h" no longer need to includeGuy Harris1-3/+1
<stdio.h> to define FILE; get rid of the include. svn path=/trunk/; revision=10034
2004-02-11Move the declaration of "register_tap_menu_item()" into a newGuy Harris1-2/+2
"tap_menu.h" file, and have the Ethereal taps include that rather than "menu.h", so we don't have to worry about making sure we've included <stdio.h> to define FILE, etc. just because some "menu.h" functions require it. svn path=/trunk/; revision=10031
2004-02-11Add a routine to be used to put up alert boxes for invalid displayGuy Harris1-3/+3
filter expressions; use that in a number of places, so we use the same alert box. (More work is needed to figure out the right way to handle some other "dfilter_compile()" failures.) Use the error message from the display filter as the primary error, as that's the message that tells you what the underlying problem is. (The GNOME HIG says "In most situations the user should only need the primary text to make a quick decision", so the primary text should tell you what's wrong with the filter, not just that it's invalid. If there are messages from the display filter code that don't give enough information, or are a bit cryptic, such as "Unexpected end of filter string," those should be fixed in the display filter code.) Improve the error used if an empty filter is used for "find frame". svn path=/trunk/; revision=10025
2004-01-31Pass ESD_BTN_OK rather than NULL as a second argument toGuy Harris1-9/+9
"simple_dialog()"; NULL might be #defined to be a pointer expression on some platforms, causing compiler warnings (and, on platforms where a null pointer doesn't have all its bits 0, possibly causing misbehavior, although I don't think there are any such platforms on which Ethereal runs). Don't allow 0 as button mask argument to "simple_dialog()". Squelch a compiler warning. Report fatal problems as errors, not warnings. Report file I/O errors with "file_open_error_message()". Report file write errors (including those reported by "close()", e.g. some errors writing to an NFS server) when saving raw packet data to a file. svn path=/trunk/; revision=9915
2004-01-21use stock buttons whereever possible,Ulf Lamping1-2/+2
added some ethereal specific stock icons svn path=/trunk/; revision=9763
2004-01-13Add a routine "retap_packet()" that runs through all packets, dissectingGuy Harris1-28/+14
them and running all taps on them, but not reconstructing the packet list. Use that in the IO-stat tap rather than "redissect_packet()"; the latter does more work and redraws the display, neither of which are necessary. Call the filter callback when the Calc field is changed, to redraw the graphs; that change also fixes things so that it's called when the Filter field is changed. Rename the "filter_button" member of an io_stat_graph_t to "filter_field", as it's not the "Filter:" button, it's the text field containing the filter expression. svn path=/trunk/; revision=9659
2004-01-13"dfilter_compile()" supplies a null dfilter pointer for an empty filterGuy Harris1-2/+3
expression; don't assume it always supplies a non-null pointer. svn path=/trunk/; revision=9657
2004-01-13Add a routine "io_stat_reset()" to reset an io_stat_t; haveGuy Harris1-123/+100
"gtk_iostat_reset()" call it, and have calls to "gtk_iostat_reset(&io->graphs[0])" just call "io_stat_reset(io)". Add a routine "io_stat_draw()" to draw an io_stat_t; have "gtk_iostat_draw()" call it, and have calls to "gtk_iostat_draw(&io->graphs[0])" just call "io_stat_draw(io)". Add a routine "io_stat_redraw()" to set the "needs_redraw" flag on an io_stat_t and call "io_stat_draw()" on it, in order to force a redraw. Use that in place of set flag/io_stat_draw pairs. Add a routine "enable_graph()" to set an io_stat_graph_t's display flag to TRUE and register a tap listener for it, and add a routine "disable_graph()" to, if an io_stat_graph_t's display flag is set, clear it, remove its tap listener, and turn its display button off. Use "disable_graph()" to disable graphs, rather than just turning the display flag off, so that we ensure that the invariant "tap listener present iff graph enabled" is preserved - the code to destroy an io-stat window only removes tap listeners for enabled graphs, so it depends on that invariant being preserved. Check the validity of a display filter by compiling it, not by going through the whole sequence of registering a tap listener. svn path=/trunk/; revision=9656
2004-01-05removed some MSVC warnings (level 3)Ulf Lamping1-4/+4
svn path=/trunk/; revision=9560
2004-01-03Make Analyze/Statistics have an accelerator of Alt+A S and moveRichard Sharpe1-2/+2
Analyze/Summary to Alt+A Y. svn path=/trunk/; revision=9537
2003-12-23removed some MSVC warnings (conversions between double/float and int)Ulf Lamping1-7/+7
svn path=/trunk/; revision=9422
2003-12-17From Lars Roland: have common code to handle display filter dialogs inGuy Harris1-2/+2
taps, and use that in the H.225 taps. svn path=/trunk/; revision=9327