aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed trailing whitespaces from .h and .c files using theJörg Mayer2002-08-281-5/+5
| | | | | | | winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
* Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer2002-08-021-13/+9
| | | | | | | | equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
* Have "print_line()" take an indentation argument, and do blankGuy Harris2002-06-291-44/+35
| | | | | | | | | | | | padding when printing text and use "putline" when printing PostScript. Eliminate "hexdump", as it's just a special case of "putline". Have "proto_tree_print_node()" just call "print_line()". Get rid of "print_ps_hex()" - the font used for the hex dump and the protocol tree are the same, so there's no need to switch fonts. svn path=/trunk/; revision=5798
* Fix up a comment.Guy Harris2002-06-231-5/+4
| | | | svn path=/trunk/; revision=5748
* Display as many digits of the offset, in the hex dump, as would beGuy Harris2002-06-221-9/+56
| | | | | | | | required by the largest offset value. Get rid of trailing blanks in hex dump lines. svn path=/trunk/; revision=5739
* Use a common routine to print protocol tree nodes as text or PostScript,Guy Harris2002-06-221-77/+33
| | | | | | | rather than having duplicate routines (the PostScript one was missing some bug fixes in the text one). svn path=/trunk/; revision=5731
* Get rid of separate "print_hex_data_text()" and "print_hex_data_ps()"Guy Harris2002-06-221-71/+42
| | | | | | | | | | | | routines; instead, rename "print_hex_data_common()" to "print_hex_data_buffer()" as it prints a buffer in hex and ASCII (or EBCDIC), and have it take the print format as an argument. Have it use "print_line()" to print lines, and fix "print_line()" so that it prints a buffer *without* a newline at the end, printing the newline itself. svn path=/trunk/; revision=5729
* In the hex dump, generate the offset at the beginning of each line inGuy Harris2002-06-221-25/+19
| | | | | | | | | common code, rather than in print-format-specific code, and have "print_hex_data_common()" put out the blank line before the dump itself rather than relying on the print-format-specific "start printing the hex dump" code to do it. svn path=/trunk/; revision=5728
* Use common code to print the hex dump as text and PostScript.Guy Harris2002-06-211-63/+72
| | | | svn path=/trunk/; revision=5727
* Make the hex dump when printing PostScript look the same way it doesGuy Harris2002-06-211-6/+6
| | | | | | when printing plain text. svn path=/trunk/; revision=5726
* Get rid of the "data_src" member of the "frame_data" structure; put itGuy Harris2002-06-041-15/+22
| | | | | | | | 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
* From Joerg Mayer: make a pile of stuff not used outside one source fileGuy Harris2002-05-101-4/+2
| | | | | | | | | static, and add a new "packet-data.h" to declare "proto_data". Display escape sequences in octal in the IAPP dissector, as is now done in the RADIUS dissector. svn path=/trunk/; revision=5441
* In the tree-printing code, we may be handed a leaf node, so don'tGuy Harris2002-04-021-5/+7
| | | | | | require that "fi->tree_type" be positive. svn path=/trunk/; revision=5084
* Start assigning ett_ values at 0, rather than 1; get rid of the reservedGuy Harris2002-04-011-1/+2
| | | | | | | | | | | | | | | | 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
* From Joerg Mayer: get rid of unused arguments, and mark those that can'tGuy Harris2002-03-311-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
* Boost the maximum amount of indentation put into text output.Guy Harris2002-03-141-5/+7
| | | | svn path=/trunk/; revision=4939
* Don't give tvbuffs names; instead, give data sources names, where aGuy Harris2002-02-181-11/+15
| | | | | | | | | | | | | | | "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
* From Joerg Mayer: remove trailing blanks from hex dump inGuy Harris2002-02-151-2/+2
| | | | | | print/Tethereal. svn path=/trunk/; revision=4742
* Include files from the "epan" directory and subdirectories thereof withGuy Harris2002-01-211-3/+3
| | | | | | | | | | | | | "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
* Use new, correct method for retrieving field_info* from a proto_item*Gilbert Ramirez2001-12-181-3/+3
| | | | | | (aka GNode*). svn path=/trunk/; revision=4423
* Hopefully the last time I have to change my e-mail address.Gilbert Ramirez2001-11-131-2/+2
| | | | svn path=/trunk/; revision=4199
* Various signed vs. unsigned fixes, from Joerg Mayer.Guy Harris2001-06-181-3/+3
| | | | svn path=/trunk/; revision=3560
* We only need to print the data corresponding to the field, so fetch onlyGuy Harris2001-06-081-14/+11
| | | | | | that data with a "tvb_get_ptr()". svn path=/trunk/; revision=3532
* When printing the contents of a raw-data field, don't use the raw dataGuy Harris2001-06-081-9/+44
| | | | | | | of the current frame as the source, use the raw data of the tvbuff that's the data source of that field. svn path=/trunk/; revision=3531
* Added 'text2pcap', a utility to convert text hexdumps into pcapAshok Narayanan2001-05-161-6/+6
| | | | | | | | | files. See text2pcap.1 (built from doc/text2pcap.pod) for details. Changed 'tethereal -x' output to match hex dump format of text2pcap, Ethereal and others. svn path=/trunk/; revision=3421
* Always hand "print_line()" a string that ends with "\n".Guy Harris2001-03-241-3/+2
| | | | svn path=/trunk/; revision=3184
* Put a blank line before the line identifying the data source for theGuy Harris2001-03-241-1/+2
| | | | | | data being dumped. svn path=/trunk/; revision=3183
* Added named data sources printing support, written by Guy HarrisJeff Foster2001-03-231-7/+36
| | | | svn path=/trunk/; revision=3167
* Consolidate flags in struct frame_data, and add "visited" flag. UseGilbert Ramirez2000-04-131-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
* Fix files that had Gilbert's old e-mail address or that didn't have myGuy Harris2000-01-221-2/+2
| | | | | | forwarding e-mail address. svn path=/trunk/; revision=1522
* "print_file()" is no longer used; nuke it.Guy Harris2000-01-071-48/+11
| | | | svn path=/trunk/; revision=1430
* Printing multiple pages of PostScript wasn't as tricky as I thought; addGuy Harris2000-01-061-23/+40
| | | | | | support for printing in PostScript to the "Print..." dialog box. svn path=/trunk/; revision=1426
* Move GTK code out of summary.c and into gtk/summary_dlg.cGilbert Ramirez1999-12-101-2/+1
| | | | | | | | | | | | summary.c now provides a struct of info (see summary.h) Changed the name of the summary dialogue callback (hence the change in menu.c), and added a close button to the dialogue. Moved #include <gtk/gtk.h> out of print.c and into prefs.h where it was needed for GdkColor. svn path=/trunk/; revision=1273
* Include "util.h" to get the declaration of "EBCDIC_to_ASCII1()".Guy Harris1999-11-221-1/+2
| | | | svn path=/trunk/; revision=1091
* A "character encoding" variable is now set per packet. The existenceGilbert Ramirez1999-11-221-7/+20
| | | | | | | | | | of SNA in a packet changes the character encoding from the default ASCII to EBCDIC. The hex-printing routines in the GUI code and in the printing code convert to EBCDIC if appropriate. svn path=/trunk/; revision=1089
* Warren Young's patch to add a "Print" button to the "Follow TCP Stream"Guy Harris1999-10-301-1/+39
| | | | | | | | data window. Some (belated) man page updates. svn path=/trunk/; revision=950
* Add an item to the "File/Print" dialog box to ask that the full hex dataGuy Harris1999-09-291-12/+15
| | | | | | | | | | | | | of the packet be printed (this is only done if "Print detail" is selected; it should be grayed out of "Print summary" is selected). If that item is selected, suppress the hex printing of uninterpreted data items in the protocol tree. Move some GTK+ keys not used outside of "gtk/print_dlg.c" from "gtk/keys.h" into "gtk/print_dlg.c". svn path=/trunk/; revision=736
* Add a "Expand all levels"/"Print as displayed" pair of radio buttons toGuy Harris1999-09-121-11/+17
| | | | | | | | | | the "File/Print" dialog box; "Expand all levels" means that all levels of the protocol tree should be printed, while "Print as displayed" means that only those levels shown in the display should be printed. Free the table of column widths once printing is done. svn path=/trunk/; revision=671
* Add summary-vs-detail radio buttons to the print dialog box; detailGuy Harris1999-09-121-13/+3
| | | | | | | | | | | | | | | | | | | | | prints the protocol tree, and summary prints the fields in the summary clist, with a header line at the beginning of the printout. Print only packets selected by the current packet filter. Just have "ARP" and "RARP" in the "Protocol" field for ARP packets; whether it's a request or a reply can be seen in the "Info" field. Add to the "Frame" section of the protocol tree the time between the current packet and the previous displayed packet, and the packet number. Have FT_RELATIVE_TIME fields be a "struct timeval", and display them as seconds and fractional seconds (we didn't have any fields of that type, and that type of time fits the delta time above). Add an FT_DOUBLE field type (although we don't yet have anything using it). svn path=/trunk/; revision=666
* More shuffling of GTK-related files to gtk subdirectory.Gilbert Ramirez1999-09-091-2/+1
| | | | svn path=/trunk/; revision=635
* Moved GTK-dependent routines for file dialogues, print dialogues, printGilbert Ramirez1999-09-011-205/+3
| | | | | | preferences, and menus to gtk subdirectory. svn path=/trunk/; revision=623
* Printing multiple frames in PostScript is a bit tricky, I think - IGuy Harris1999-07-231-6/+32
| | | | | | | | | | | think I may have to worry about page boundaries and the like - so, for now, we make the "File/Print..." stuff print only as text. ("Print Packet" can still print PostScript, as always.) We clean up a few text vs. PostScript things for printing multiple frames, but it's still not ready for prime time. svn path=/trunk/; revision=383
* Fix "open_print_dest()" to do the right thing.Guy Harris1999-07-231-4/+2
| | | | svn path=/trunk/; revision=379
* Add a "File/Print" menu item, which prints *all* the packets in theGuy Harris1999-07-231-23/+22
| | | | | | | | | | | | | | | | | capture to a file or printer. This should eventually get the ability to print either all the packets or only the packets selected by the display filter, and possibly also the ability to print only packets M through N. Get rid of "cur" member of "capture_file" structure; nobody used it. There's no need to pass a pointer to a "dialog_button" variable to "simple_dialog()" for the error boxes displayed if a file copy or move fails; that dialog box is just a message box and has only an "OK" button. Put the declaration of "prefs" into "prefs.h". svn path=/trunk/; revision=378
* Modified the proto_register_field_array usage again. Thanks to Guy'sGilbert Ramirez1999-07-151-7/+6
| | | | | | | | | | | | | | | | | | | suggestion, this new method using a static array should use less memory and be faster. It also has a nice side-effect of making the source-code more readble, IMHO. Changed the print routines to look for protocol proto_data instead of looking at the text label as they did before, hoping that the data hex dump field item starts with "Data (". Added the -G keyword to ethereal to make it dump a glossary of display filter keywords to stdout and exit. This data is then formatted with the doc/dfilter2pod perl program to pod format, which is combined with doc/ethereal.pod.template to create doc/ethereal.pod, from which the ethereal manpage is created. This way we can keep the manpage up-to-date with a list of fields that can be filtered on. svn path=/trunk/; revision=364
* When printing a packet, do it from the protocol tree, not from the GTK+Guy Harris1999-07-131-111/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tree constructed from the protocol tree: 1) The value of "level" field of GTK+ tree items appears to depend on various random things - see a change I made to "packet-dns.c" a while ago, to change the order in which items were put in the tree, so that DNS trees printed with correct indentation - and, right now, we appear to be doing *something* wrong, as some packets I printed from one file here had randomly bogus indentation; I could probably track the problem down and fix it, but that might just hold us until we accidentally do something *else* wrong by GTK+'s lights. The new code provides its own tree level as it goes. 2) The new code is independent of GTK+, so it could be used with other toolkits, or with non-GUI variants of Ethereal. 3) This may make it easier to add a "Print..." menu item to let the user print packets other than the currently selected packet. Make the internal routines used to print the packet static. For the "Print Packet" menu item, put up a message box if they haven't yet selected a packet. svn path=/trunk/; revision=362
* Created a new protocol tree implementation and a new display filterGilbert Ramirez1999-07-071-2/+2
| | | | | | | mechanism that is built into ethereal. Wiretap is now used to read all file formats. Libpcap is used only for capturing. svn path=/trunk/; revision=342
* Found some erroneous usages of gtk_signal_connect_object. I always wonderedGilbert Ramirez1999-06-211-4/+4
| | | | | | | | | | | | why I had to swap fields (data = w) in some of the callback functions when I added support for gtk+-1.1. Because of the use of gtk_signal_connect_object, the wrong value was being sent to the callback function. We were just lucky that with gtk+-1.0 it worked. gtk_signal_connect_object is for use with callbacks that take one argument. gtk_signal_connect is for use with callbacks that take two arguments. svn path=/trunk/; revision=324
* Removed all references to gtk objects from packet*.[ch] files. They nowGilbert Ramirez1999-03-231-1/+2
| | | | | | | | | | reference the protocol tree with struct proto_tree and struct proto_item objects. That way, the packet decoding source code file can be used with non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged some of the information in packet.h to more appropriate places (like other packet-*.[ch] files). svn path=/trunk/; revision=223
* * Added preference file saves and reads.Gerald Combs1998-10-281-97/+86
| | | | svn path=/trunk/; revision=75