aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
AgeCommit message (Collapse)AuthorFilesLines
2006-10-30Fix for (already-closed) bug 1180martinm1-1/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19737 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-22Fix bug 1173, remove the space after the comma in CSV linesjake1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19660 f5534014-38df-0310-8fa8-9805f1628bb7
2006-09-28Remove extra double quote from fix to bug 1110martinm1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19347 f5534014-38df-0310-8fa8-9805f1628bb7
2006-09-27Fix PDML export problem for FT_NONE fields (bug 1110)martinm1-3/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19334 f5534014-38df-0310-8fa8-9805f1628bb7
2006-07-22print generated items in brackets [], just as we do it on the screenulfl1-0/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18783 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-28Ethereal->Wiresharketxrab1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18235 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-22ethereal->wireshark updatessahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18206 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21name changesahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2005-11-06replace *a lot* of file related calls by their GLib counterparts. This is ↵ulfl1-1/+2
necessary for the switch to GTK 2.6 (at least on WIN32). to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place. deleted related things from config.h.win32 As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16403 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-26In print_hex_data(), bail out early if our length is zero.gerald1-0/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15088 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-23More 'char*' -> 'const char*' changes to fix warnings.jmayer1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15015 f5534014-38df-0310-8fa8-9805f1628bb7
2005-05-31Put 'unmaskedvalue' field in XML for bit-masked values.gram1-1/+9
Fix interpretation of 'value' field. Patch from Vasanth Manickam. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14505 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-11from Stefano Pettini: add CSV export function, similar to PSML exportulfl1-0/+31
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13724 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-13change nmake makefiles in /trunk and /trunk/epan so thatlroland1-4/+0
object code for libethereal.dll isn't generated by the makefile in /trunk. Having no code in /trunk linked into libethereal.dll anymore, the definition of the macro _NEED_VAR_IMPORT_ can be moved from various source files in /trunk to /trunk/Makefile.nmake . So do that, too. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13389 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-02Writing the raw data of a TCP stream to a file isn't printing it, soguy1-16/+0
don't use the print mechanism for that - do the writing directly in the "follow stream" code. Use "size_t" for character counts. Make the "hexchars" array static and const, as it's not written to, and there's probably no point in copying it to the stack (unless that improves cache locality). There's no need to explain why we're subtracting the number of bytes actually read, rather than the number of bytes asked for, from the data length. Note an issue with printing lines. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13240 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-02from chris eaglesahlberg1-0/+16
add radiobutton to allow saving raw tcpstreams these radiobuttons should, by someone that uses, this feature be changed into a menu instead. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13236 f5534014-38df-0310-8fa8-9805f1628bb7
2004-12-30Make the "col_data" field in a "column_info" structure a pointer to anguy1-3/+3
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12875 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-10Move the stuff to handle ASCII <-> EBCDIC conversions toguy1-1/+1
"epan/charsets.c"; other character set translation code should perhaps go there as well. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11958 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-04The packet range stuff knows about capture_file structures, so it'sguy1-1/+1
really more of an Ethereal/Tethereal component than a libethereal component (nothing else in libethereal knows about capture files); move it back out of libethereal. (The range stuff doesn't; we leave it in libethereal.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11898 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-04Rename "range.c" and "range.h" to "packet-range.c" and "packet-range.h";guy1-1/+1
they should ultimately be split into files with routines that handle ranges, which are just subsets of [0,2^32), and packet ranges, which are subsets of the packet list, possibly specified by a range. Move them into epan, so they can be used by, for example, utilities that handle ranges, such editcap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11890 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-29From Lars Roland: With this patch print.(c/h) and ps.(c/h) don't belong to obiot1-0/+4
the DISSECTOR_SUPPORT_xy files any longer and as a consequence they won't be linked into libethereal. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11559 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-27"print_packet_header()" is no longer used (there's now a "generateguy1-34/+0
bookmark" op in the lower-level print functions), so remove it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11543 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-25Make some generic print routines that take, as an argument, a pointer toguy1-112/+337
a structure containing a pointer to print operations for that object and a pointer to the private subclass-dependent data for that object, with subclasses for text and PostScript, and use those rather than the old scheme where a print format was passed as an argument - or where (as in the case of printing summary information in Tethereal) we just printed as text even if "-T ps" was selected. Check whether those routines succeed or get an I/O error writing output. Clean up indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11514 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-18Move dissectors to epan/dissectors directory.gram1-2/+2
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11410 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-18Set the svn:eol-style property on all text files to "native", so thatguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11400 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-08Make the "human-readable text vs. PSML vs. PDML" choice separate fromguy1-276/+299
the "text vs. PostScript" choice. The "text vs. PostScript" choice should probably ultimately be done with a generic set of print methods, to handle various platform-native print mechanisms more cleanly (and perhaps the dialog box code for "export as {PDML,PSML}" should be separate from the "export as text"/"print" dialog). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11342 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-05bugfix: don't try to print data, if tvb is too shortulfl1-1/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11318 f5534014-38df-0310-8fa8-9805f1628bb7
2004-05-01Add escaping of an apostrophe in XML output.obiot1-1/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10760 f5534014-38df-0310-8fa8-9805f1628bb7
2004-05-01add PROTO_ITEM_SET_HIDDEN() and PROTO_ITEM_SET_GENERATED(),ulfl1-3/+3
this sets flags for later rendering of the field data git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10752 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-26Look for out of bounds data after calling tvb_length_remaining().gram1-8/+15
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10709 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-24some code cleanup of the printing systemulfl1-9/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10682 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-22added some options and enhancements to the print output:ulfl1-3/+51
-ps: added formatting hints for ghostscript, so pdf conversion will be much better -ps: print a thin line at the top and bottom of each page -ps/text: add an option to start a new page for every packet (formfeed) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10660 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-20changed postscript output:ulfl1-2/+12
reduced print margin to 1/2 inch and font size to 8 point, include filename in page header, wrap too long lines git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10652 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-17added PSML output to the printing dialogulfl1-6/+48
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10628 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-17PDML output: if a protocol field is invisible,ulfl1-7/+21
add the attribute: hide="yes" to the field node git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10626 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-16make print dialog "Packet Format" options somewhat similar to theulfl1-7/+30
Ethereal panes, thus better understandable git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10611 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-15added print output option, to suppress dissection completelyulfl1-3/+4
(for raw packet hexdump) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10607 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-15added print output of PDML formatulfl1-9/+13
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10606 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-25There's no need to keep a "FILE *" for the file being printed to in aguy1-11/+7
"capture_file" structure. Keep it locally, instead. Check for errors when printing packets. Report failure to open a print destination and failure to write to a print destination differently. Don't have the "print preamble" and "print final" routines return success/failure indications - revert to the old scheme where they didn't, and have the callers use "ferror()" to check for errors. Report write errors when printing dissections in Tethereal. Report print errors as errors, not warnings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9828 f5534014-38df-0310-8fa8-9805f1628bb7
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