aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
AgeCommit message (Collapse)AuthorFilesLines
2004-01-24As with "file_write_error_message()", so withguy1-10/+14
"file_close_error_message()" - but just use "file_write_error_message()" for UNIX-style errors, under the assumption that a close will only fail because a buffer-flushing write fails or because "close()" itself fails when, for example, pushing unsynced NFS client-side writes out over the wire. Make several routines in "print.c" return success/failure indications. Check for write errors when printing "Follow TCP Stream" stuff or saving it to a file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9825 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-09There seems to be a missing #include ... there are still errors, though.sharpe1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9611 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-30In "get_field_data()", check to make sure the field doesn't run past theguy1-3/+16
end of the tvbuff. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9501 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-10Analyzer's PDML will be changed to start the packet offset (the "pos" field)gram1-6/+6
at 0 instead of 1. This works better for Ethereal, as our offsets start at 0. Change the "geninfo" pseudo-protocol to use pos="0" instead of pos="1". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9238 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-09print system enhanced, more print ranges and expanded statesulfl1-13/+14
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9222 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-08"proto_construct_dfilter_string()" can return a null pointer, e.g. forguy1-18/+20
protocol tree fields that don't have values and that are zero-length. Combine the "if (fi->hfinfo->type != FT_PROTOCOL && fi->length > 0)" stuff to show the raw value into the previous "if". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9210 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-06Add the ability to print packet dissections in PDML (an XML-based format)gram1-8/+311
to tethereal. It could be added to Ethereal, but the GUI changes to allow the user to select PDML as a print format have not been added. Provide a python module (EtherealXML.py) to help parse PDML. Provide a sample app (msnchat) which uses tethereal and EtherealXML.py to reconstruct MSN Chat sessions from packet capture files. It produces a nice HTML report of the chat sessions. Document tethereal's PDML and EtherealXML.py usage in doc/README.xml-output Update tethereal's manpage to reflect the new [-T pdml|ps|text] option git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9180 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-04Don't use GNodes for the protocol tree, put the sibling pointer, andguy1-7/+6
pointers to the first *and* last child, in the "proto_node" structure itself. That saves us one level of indirection and memory allocation, and lets us append to a tree by appending to the last child directly, rather than having to scan through the list of siblings of the first child to find the end of that list. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9171 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-03The "ptr_u" unions no longer have a "next" pointer - they now just haveguy1-2/+2
one member - or have one that's not used, so get rid of those unions. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9151 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-27"representation", in an "item_label_t", is now an array, not a pointer,guy1-2/+2
so "fi->rep->representation" can't be null. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9108 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-27bugfix: removed access violation when using "File/Print Packet".ulfl1-2/+2
The label_ptr could be NULL, when calling function print_line git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9099 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-25remove another slow GMemChunk from ethereal making ethereal a little bit fastersahlberg1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9085 f5534014-38df-0310-8fa8-9805f1628bb7
2003-11-24Make the recent epan/proto.{c,h} change compile.guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9075 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-5/+5
winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hjmayer1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-29Have "print_line()" take an indentation argument, and do blankguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5798 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-23Fix up a comment.guy1-5/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5748 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-22Display as many digits of the offset, in the hex dump, as would beguy1-9/+56
required by the largest offset value. Get rid of trailing blanks in hex dump lines. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5739 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-22Use a common routine to print protocol tree nodes as text or PostScript,guy1-77/+33
rather than having duplicate routines (the PostScript one was missing some bug fixes in the text one). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5731 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-22Get rid of separate "print_hex_data_text()" and "print_hex_data_ps()"guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5729 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-22In the hex dump, generate the offset at the beginning of each line inguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5728 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-21Use common code to print the hex dump as text and PostScript.guy1-63/+72
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5727 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-21Make the hex dump when printing PostScript look the same way it doesguy1-6/+6
when printing plain text. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5726 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-04Get rid of the "data_src" member of the "frame_data" structure; put itguy1-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". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5614 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-10From Joerg Mayer: make a pile of stuff not used outside one source fileguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5441 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-02In the tree-printing code, we may be handed a leaf node, so don'tguy1-5/+7
require that "fi->tree_type" be positive. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5084 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-01Start assigning ett_ values at 0, rather than 1; get rid of the reservedguy1-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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5068 f5534014-38df-0310-8fa8-9805f1628bb7
2002-03-31From Joerg Mayer: get rid of unused arguments, and mark those that can'tguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5050 f5534014-38df-0310-8fa8-9805f1628bb7
2002-03-14Boost the maximum amount of indentation put into text output.guy1-5/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4939 f5534014-38df-0310-8fa8-9805f1628bb7
2002-02-18Don't give tvbuffs names; instead, give data sources names, where aguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4749 f5534014-38df-0310-8fa8-9805f1628bb7
2002-02-15From Joerg Mayer: remove trailing blanks from hex dump inguy1-2/+2
print/Tethereal. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4742 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-21Include files from the "epan" directory and subdirectories thereof withguy1-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/"). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4586 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-18Use new, correct method for retrieving field_info* from a proto_item*gram1-3/+3
(aka GNode*). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4423 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-13Hopefully the last time I have to change my e-mail address.gram1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4199 f5534014-38df-0310-8fa8-9805f1628bb7
2001-06-18Various signed vs. unsigned fixes, from Joerg Mayer.guy1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3560 f5534014-38df-0310-8fa8-9805f1628bb7
2001-06-08We only need to print the data corresponding to the field, so fetch onlyguy1-14/+11
that data with a "tvb_get_ptr()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3532 f5534014-38df-0310-8fa8-9805f1628bb7
2001-06-08When printing the contents of a raw-data field, don't use the raw dataguy1-9/+44
of the current frame as the source, use the raw data of the tvbuff that's the data source of that field. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3531 f5534014-38df-0310-8fa8-9805f1628bb7
2001-05-16Added 'text2pcap', a utility to convert text hexdumps into pcapashokn1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3421 f5534014-38df-0310-8fa8-9805f1628bb7
2001-03-24Always hand "print_line()" a string that ends with "\n".guy1-3/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3184 f5534014-38df-0310-8fa8-9805f1628bb7
2001-03-24Put a blank line before the line identifying the data source for theguy1-1/+2
data being dumped. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3183 f5534014-38df-0310-8fa8-9805f1628bb7
2001-03-23Added named data sources printing support, written by Guy Harrisjfoster1-7/+36
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3167 f5534014-38df-0310-8fa8-9805f1628bb7
2000-04-13Consolidate flags in struct frame_data, and add "visited" flag. Usegram1-2/+2
it in SOCKS dissector. (Okay, how many times am I going to modify packet.h today, forcing you to re-compile everything? :-) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1850 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-22Fix files that had Gilbert's old e-mail address or that didn't have myguy1-2/+2
forwarding e-mail address. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1522 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-07"print_file()" is no longer used; nuke it.guy1-48/+11
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1430 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-06Printing multiple pages of PostScript wasn't as tricky as I thought; addguy1-23/+40
support for printing in PostScript to the "Print..." dialog box. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1426 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-10Move GTK code out of summary.c and into gtk/summary_dlg.cgram1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1273 f5534014-38df-0310-8fa8-9805f1628bb7
1999-11-22Include "util.h" to get the declaration of "EBCDIC_to_ASCII1()".guy1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1091 f5534014-38df-0310-8fa8-9805f1628bb7
1999-11-22A "character encoding" variable is now set per packet. The existencegram1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1089 f5534014-38df-0310-8fa8-9805f1628bb7
1999-10-30Warren Young's patch to add a "Print" button to the "Follow TCP Stream"guy1-1/+39
data window. Some (belated) man page updates. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@950 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-29Add an item to the "File/Print" dialog box to ask that the full hex dataguy1-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". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@736 f5534014-38df-0310-8fa8-9805f1628bb7