aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/packet_win.c
AgeCommit message (Collapse)AuthorFilesLines
2005-08-20- Include ../ui_util.h into files that implement functions declard inJörg Mayer1-0/+2
ui_util.h - Replace one instance of ui_util.h by gui_utils.h svn path=/trunk/; revision=15468
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-03-06Undo the last "fix" (13626): Unconditionally including <pcap.h> isJörg Mayer1-2/+0
going to cause trouble for compilations without libpcap. svn path=/trunk/; revision=13628
2005-03-06Warning fix:Jörg Mayer1-0/+2
../capture.h:115: warning: struct pcap_stat declared inside parameter list ../capture.h:115: warning: its scope is only this definition or declaration, which is probably not what you want ../capture.h:125: warning: struct pcap_stat declared inside parameter list svn path=/trunk/; revision=13626
2004-12-30Make the "col_data" field in a "column_info" structure a pointer to anGuy Harris1-1/+1
array of "const char *" rather than to an array of "char *", and make the second argument of "col_set_str()" a "const char *" - there's no guarantee that "col_data" points to something you're allowed to modify. svn path=/trunk/; revision=12875
2004-09-29Move the column preferences stuff to epan (the rest of the preferencesGuy Harris1-1/+1
stuff is already there). Update Gerald's e-mail address in column.h. svn path=/trunk/; revision=12131
2004-09-27Move prefs.c and prefs.h into the epan subdirectory.Guy Harris1-1/+1
svn path=/trunk/; revision=12115
2004-08-06From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that anGuy Harris1-1/+1
include of <resolv.h> in any system header file gets the system <resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]). svn path=/trunk/; revision=11615
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-26more code cleanup from dialog things:Ulf Lamping1-2/+2
changed window_xy (dialog) function calling in a lot of gtk files cleanup of file selection code cleanup in dlg_utils/file_dlg/ui_util Please report any problems!!! svn path=/trunk/; revision=11003
2004-02-13Add a "window_new()" routine that creates a window of a given type, setsGuy Harris1-4/+3
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-01-19added some menuitems "View->Show" including show/hide of all main widgets,Ulf Lamping1-3/+9
saving the states in the recent file svn path=/trunk/; revision=9726
2002-11-11Use gtk1/gtk2 compatibility macros to reduce #ifdefs.Olivier Abad1-13/+10
svn path=/trunk/; revision=6610
2002-11-03Merge gtk and gtk2 directories.Olivier Abad1-12/+75
svn path=/trunk/; revision=6552
2002-09-05Include cleanups in gtk and gtk2:Jörg Mayer1-7/+1
Remove unneded includes Add include wrappers where missing svn path=/trunk/; revision=6191
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-8/+8
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-06-04Clean up white space.Guy Harris1-2/+2
svn path=/trunk/; revision=5615
2002-06-04Get rid of the "data_src" member of the "frame_data" structure; put itGuy Harris1-51/+33
in the "packet_info" structure instead, as we don't need a pointer for every single frame in the capture file, just for each frame for which we currently have an open "epan_dissect_t". svn path=/trunk/; revision=5614
2002-03-31Get rid of unused arguments.Guy Harris1-4/+3
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-05From Joerg Mayer: remove unused variables.Guy Harris1-2/+1
svn path=/trunk/; revision=4879
2002-03-05From Joerg Mayer: use _U_ to flag unused arguments.Guy Harris1-6/+6
svn path=/trunk/; revision=4878
2002-02-18Don't give tvbuffs names; instead, give data sources names, where aGuy Harris1-32/+24
"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-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-7/+7
"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-11Have a routine to create a scrolled window, set its vertical scrollbarGuy Harris1-2/+2
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
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez1-3/+5
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-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-06Remove proto_tree from capture_file and PacketWinData, since theyGilbert Ramirez1-7/+4
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-11-21Get rid of some unused variables.Guy Harris1-3/+1
svn path=/trunk/; revision=4239
2001-11-20Have a routine to add all the hex dump tabs to the hex dump notebook,Guy Harris1-11/+5
and call it both from "select_packet()" and "create_new_window()", rather than having two similar loops in both places. svn path=/trunk/; revision=4233
2001-11-20If bytes in a hex dump view are selected, the field in the correspondingGuy Harris1-2/+3
text view should be selected, rather than always selecting a field in the main text view. svn path=/trunk/; revision=4232
2001-11-20Allow the tvbuff pointer to various "proto_tree_add" routines to be nullGuy Harris1-4/+6
if (and only if) the length of the item being added is 0 (so that it has no data backing it). This means the data stream name pointer for the item in question is null; make sure we handle that. Use that for some "uses the value from the matching request" fields in the SMB Pipe protocol. svn path=/trunk/; revision=4231
2001-08-21On Windows, use the directory in which the binary resides as theGuy Harris1-4/+2
directory in which global data files are stored. If an installed binary is being run, that's the correct directory for them; if a build-tree binary is being run, the "manuf" file will be there, and you can put other data files there as well, if necessary. Do the same with plugins, except that, if there's no "plugins\\{version}" subdirectory of that directory, fall back on the default installation directory, so you at least have a place where you can put plugins for use by build-tree binaries. (Should we, instead, have the Windows build procedure create a subdirectory of the "plugins" source directory, with the plugin version number as its name, and copy the plugins there, so you'd use the build-tree plugin binaries?) Move "test_for_directory()" out of "util.c" and into "epan/filesystem.c", with the other file system access portability wrappers and convenience routines. Fix "util.h" not to declare it - or other routines moved to "epan/filesystem.c" a while ago. svn path=/trunk/; revision=3858
2001-03-24Fix typos in comments.Guy Harris1-3/+3
svn path=/trunk/; revision=3185
2001-03-24The declaration of "destroy_packet_wins()" belongs inGuy Harris1-2/+1
"gtk/packet_win.h", along with the declarations of the other packet window manipulation routines; put it there. svn path=/trunk/; revision=3180
2001-03-23Changes required to support multiple named data sources.Jeff Foster1-16/+46
Tvbuffers changed to added the data source name, GUI and printing code changed to support these changes and display the multiple hex views. svn path=/trunk/; revision=3165
2001-02-11In Ethereal, attempt to get the packet statistics from libpcap whenGuy Harris1-2/+1
capturing; if we succeed, display the packet drops count as the "Drops" value in the status line and as the "Dropped packets" statistics in the summary dialog box, otherwise don't display it at all. In Tethereal, attempt to get the packet statistics from libpcap when capturing; if we succeed, and if there were any dropped packets, print out the count of dropped packets when the capture finishes. svn path=/trunk/; revision=3016
2001-02-01Create a more modular type system for the FT_* types. Put themGilbert Ramirez1-2/+1
into epan/ftypes. Re-write display filter routines using Lemon parser instead of yacc. Besides using a different tool, the new grammar is much simpler, while the display filter engine itself is more powerful and more easily extended. Add dftest executable, to test display filter "bytecode" generation. Add option to "configure" to build dftest or randpkt, both of which are not built by default. Implement Ed Warnicke's ideas about dranges in the new display filter and ftype code. Remove type FT_TEXT_ONLY in favor of FT_NONE, and have protocols registered as FT_PROTOCOL. Thus, FT_NONE is used only for simple labels in the proto tree, while FT_PROTOCOL is used for protocols. This was necessary for being able to make byte slices (ranges) out of protocols, like "frame[0:3]" Win32 Makefile.nmake's will be added tonight. svn path=/trunk/; revision=2967
2000-10-06Implement epan_dissect_new() and epan_dissect_free(). These are theGilbert Ramirez1-2/+5
"top-level" dissectors that libepan-users call, instead of dissect_packet(). The epan_dissect_t holds the tvbuff after dissection so that the tvbuff's memory is not cleared until after the proto_tree is freed. (I might stuff the proto_tree into the epan_dissect_t, too). What remains of dissect_packet() in packet.c handles the tvbuff initialiation. The real meat of dissect_packet() is now in dissect_frame(), in packet-frame.c This means that "packet.c" is no longer a dissector, os it is no longer passed to make-reg-dotc. Once dissect_fddi() gets two wrapper functions (dissect_fddi_swapped() and dissect_fddi_nonswapped()), the a dissector handoff routine could be used instead of the switch statement in dissect_frame(). I'd register a field like "wtap.encap" svn path=/trunk/; revision=2478
2000-09-09"redraw_hex_dump()" can't use "cfile.pd" or "cfile.current_frame", as itGuy Harris1-14/+11
may be redrawing a packet window that displays a frame other than the current frame; give it arguments to specify the raw frame data and "frame_data" structure for the frame. This requires that each packet window have, associated with it, a pointer to the "frame_data" structure; that replaces the "cap_len" and "encoding" fields in a "PacketWinData" structure, as those are just copies of fields from the frame's "frame_data" structure. "packet_hex_print()" needn't be passed both the start and length values from a "field_info" structure - just pass it a pointer to that structure, or NULL for "no field is selected in the packet". It also needn't, any longer, be passed the "cap_len" and "flags.encoding" fields of a "frame_data" structure - just pass it a pointer to that structure. In "redraw_hex_dump_all()", don't redraw the hex dump pane of the main window if there is no current frame. svn path=/trunk/; revision=2404
2000-09-08Redraw:Guy Harris1-12/+9
the text in all "Follow TCP Stream" windows; the text in the help window if we have one up; all hex dump windows; when GUI preference changes are to be applied, so that font changes and "Follow TCP Stream" color changes show up. Update both the Roman and bold font when the font is changed. Don't decrement the reference counts on the old Roman and bold fonts until that's all done. svn path=/trunk/; revision=2401
2000-09-08Graham Bloice's patch to support inverse video rather than boldfaceGuy Harris1-5/+26
highlighting of the bytes, in the hex dump window, corresponding to a selected field. Also, make "remember_ptree_widget()" static, as it's not used outside "gtk/proto_draw.c". svn path=/trunk/; revision=2399
2000-08-21Instead of each set of built-in preferences having "ok", "save",Guy Harris1-46/+1
"cancel", and "delete" methods, give them: "fetch" - fetch from the notebook tab any values not already stored in "prefs", and store them there, but doesn't apply them; "apply" - apply the settings in "prefs"; "destroy" - clean up any windows created from the tab. As we no longer have "cancel" methods, we don't have per-preference code to revert preference values; instead, we have the common preference dialog box code make a copy of all the current preferences, and, when the "Cancel" button is clicked, free the current preferences and copy the saved preferences to it, and apply the preferences. Add an "Apply" button to the preference dialog box, which applies the current preferences without closing the dialog box. Treat a request to delete the preferences dialog box as equivalent to clicking "Cancel". Have a "remember_ptree_widget()" routine to remember all protocol tree widgets, and use the list of those widgets when we set GUI preferences for the protocol tree widgets, rather than setting the main protocol tree widget and then using the list of packet windows. Move that code out of "main.c" to "proto_draw.c", as it's not used by anything in "main.c", but is used by stuff in "proto_draw.c". Make the font one of the preferences we can set on the fly for protocol tree widgets. Also make it something we can set on the fly for the packet list widget. svn path=/trunk/; revision=2316
2000-08-17It was silly of me to require that "forget_scrolled_window()" be calledGuy Harris1-3/+1
explicitly; the right thing to do was to have "remember_scrolled_window()" catch the "destroy" signal on the scrolled window widget, and have the handler for that signal forget the scrolled window. Doing that obviates the need to have creators of scrolled windows keep track of the windows they have and forget them when they're destroyed. The signal for a "the window manager has requested that this window go away" event is "delete_event", not "delete-event"; fix the "gtk_signal_connect()" calls that were using "delete-event". svn path=/trunk/; revision=2284
2000-08-03Add a "Save As" feature to the TCP Follow dialogue, to save the streamGilbert Ramirez1-2/+1
file to a user-specified file. Move the file-copy routine in save_cap_file() to an indepenent function in file.c (copy_binary_file()) so that follow_dlg.c can use it. Remove #include "follow.h" from the C files that don't need it. svn path=/trunk/; revision=2200
2000-06-27Patch from Ben Fowler to rename the global variable "cf" to "cfile", toGuy Harris1-8/+8
make it easier to use grep to find all references to it without getting a lot of false hits and to check, after allocating the memory chunk for "frame_data" structures, that the allocation succeeded. svn path=/trunk/; revision=2092
2000-05-19Add wtap-int.h. Move definitions relevant to the internal workins of wiretapGilbert Ramirez1-2/+2
to that file, leave public definitions in wtap.h. Rename "union pseudo_header" to "union wtap_pseudo_header". Make the wtap_pseudo_header pointer available in packet_info struct. svn path=/trunk/; revision=1989
2000-05-18Remove the "union pseudo_header" from the "frame_data" structure;Guy Harris1-2/+5
there's no need to keep it around in memory - when the frame data is read in when handing a frame, read in the information, if any, necessary to reconstruct the frame header, and reconstruct it. This saves some memory. This requires that the seek-and-read function be implemented inside Wiretap, and that the Wiretap handle remain open even after we've finished reading the file sequentially. This also points out that we can't really do X.25-over-Ethernet correctly, as we don't know where the direction (DTE->DCE or DCE->DTE) flag is stored; it's not clear how the Ethernet type 0x0805 for X.25 Layer 3 is supposed to be handled in any case. We eliminate X.25-over-Ethernet support (until we find out what we're supposed to do). svn path=/trunk/; revision=1975
2000-05-18Have "proto_tree_is_visible" false except when we're in the middle ofGuy Harris1-1/+3
doing something that requires that the text for protocol tree entries be generated, i.e. 1) initialize it to FALSE; 2) have every routine that sets it clear it when it's done; 3) when printing packets, set it to TRUE only if we're not just printing packet summary lines; and then get rid of settings to FALSE made unnecessary as a result of those changes. This makes sure it's not set when it doesn't have to be (which causes the protocol tree code to format the text when it doesn't have to, wasting CPU time). svn path=/trunk/; revision=1973
2000-04-13Consolidate flags in struct frame_data, and add "visited" flag. UseGilbert Ramirez1-2/+2
it in SOCKS dissector. (Okay, how many times am I going to modify packet.h today, forcing you to re-compile everything? :-) svn path=/trunk/; revision=1850