aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-11Squelch some compiler warnings.guy1-21/+21
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32165 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-26Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4402 :morriss1-1/+7
Escape all non-printable characters so that we generate valid PDML. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31674 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-24Update the URL of the PDML specmorriss1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31648 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-19Use more unique names for certain enum constants.wmeier1-4/+4
(enum constant names are part of the global name space). (Fixes at least one gcc -Wshadow warning). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31572 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-31Fix bug #1564: PSML - structure context node missing [when not displayingsfisher1-1/+4
packet #1 from the capture file] This change keeps track of whether the <structure></structure> elements and information in between have been shown yet, and if not, it shows them once. The previous behavior would only show it if packet #1 from the capture file was being shown. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31395 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-10Add an argument to abs_time_to_str() and abs_time_secs_to_str()guy1-1/+1
indicating whether the time should be shown as local time or UTC. For now, always pass FALSE, meaning "show as local time". Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str() for times with one-second resolution, and update a comment in various macros in the WSP dissector, while we're at it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31227 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-06Removed unnecessary assignment.stig1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30361 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-04Removed a redundant prototype.stig1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30298 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-04Fix typokrj1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30291 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-26Introduce print_stream_ps_alloc() and start using itkrj1-17/+14
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30164 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-26Introduce print_stream_text_alloc() and start using itkrj1-17/+14
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30163 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-01From Richard Brodie via. Bug 3913:krj1-5/+5
Free ptr array allocated through proto_find_finfo() git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29654 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-21Also fake empty field_info's by gracefully handling NULL field_info pointer ↵krj1-1/+8
elsewhere. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29490 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-15This patch introduces packet_add_new_data_source() which effectively ↵krj1-0/+8
deprecates add_new_data_source(). This is based on the following observation: 1) The tvb + name (aka. data_source) is only used when the protocol tree is visible The current implementation of add_new_data_source() doesn't take this into account and simply allocates a data_source regardless. This is what packet_add_new_data_source() tries to rectify. A couple of dissectors have already been switched over to the new packet_add_new_data_source(). Many are still missing. Help appreciated! git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29427 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Add PNODE_FINFO. We've been using PITEM_FINFO on proto_node's. This works ↵krj1-3/+3
because proto_item is typedefed to proto_node. We shouldn't rely on this since this is an implementation detail. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29354 f5534014-38df-0310-8fa8-9805f1628bb7
2009-07-12From Kovarththanan Rajaratnam via bug 3702:stig1-2/+2
This patch optimizes the data source name processing in add_new_data_source() by delaying it. We now simply store the constant string and lazily compute the name when needed. This gives a performance boost because we only need the name if we have multiple data sources. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29066 f5534014-38df-0310-8fa8-9805f1628bb7
2009-04-16Fix the last(?) of the Win64 compilation problems.gerald1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28065 f5534014-38df-0310-8fa8-9805f1628bb7
2009-04-08Add some more "copy" functionality:sake1-2/+2
- Enabled "Copy Description" in the main menu and gave it accelerator key CTRL+SHIFT+D - Added "Copy Fieldname" to copy the fieldname of the selected field in the detail view (Acc.Key: CTRL+SHIFT+F) - Added "Copy Value" to copy the value of the selected field in the detail view (Acc.Key: CTRL+SHIFT+V) - Updated documentation to reflect the changes git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28006 f5534014-38df-0310-8fa8-9805f1628bb7
2009-01-29Group time related fields.jake1-3/+3
Drop packet length in favor of frame length. Clean up code / indentations / header fields. Improve docsis preference description. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27329 f5534014-38df-0310-8fa8-9805f1628bb7
2008-11-26Improve title and remove Ethereal legacy.jake1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26850 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-09Fix for bug 2934.jake1-0/+6
Check that tvb backing is available before accessing it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26393 f5534014-38df-0310-8fa8-9805f1628bb7
2008-08-01Really start printing in 8 pnt Courier, not just state so in the template.jake1-3/+4
Add Wireshark version info to the page header. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25901 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-22Move the file utility functions from wiretap to libwsutil so thatmorriss1-16/+16
libwireshark (and the plugins using those functions) do not depend on wiretap on Windows. While doing that, rename the eth_* functions to ws_*. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25354 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-03Fix for bug #2518: 'tshark -Tfields -e data' Omits Last Character of Datawmeier1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25223 f5534014-38df-0310-8fa8-9805f1628bb7
2008-03-11From Francesco Fondelli (bug 2349):stig1-0/+39
Attached is a patch to export packets data as "C Arrays". I often have the need to [re]send data captured with wireshark using a raw/pf_packet socket. Output format is one char[] per packet, it looks like almost the same as the one produced by "Follow TCP stream". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24604 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-07When generating PDML, insert a fake protocol wrapper around top-level field ↵martinm1-3/+33
items. This is to help preserve the PDML schema, and is discussed in bug 2226. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24281 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-03More rewrite of prohibited APIs (sprintf, strcpy, strcat).stig1-3/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24258 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-22Clean up indentation.guy1-72/+68
Move some comments to make it a bit clearer what each branch of the if handles. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24161 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-22When using -T fields, print a "1" instead of nothing when a field of type ↵sake1-1/+3
FT_NONE is present. This way, scripts can check for the presence of this type of fields. (fixes bug 2210) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24158 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-12Don't write closing PDML tag for Data protocol - it uses simple ↵martinm1-5/+7
(self-closing) tags. Fixes bug 2185. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24069 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-28Remove almost all of the casts I committed recently and in place ofsfisher1-4/+4
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21253 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-26From Doug Pratley:sfisher1-0/+368
The purpose of the patch is to provide a new output format (so it is independent of -V): single line record per-packet with the fields chosen by the user, with configuration options to control separator, quoting and whether a header line is printed. It also extends some existing options behaviour (-c and -a:filesize) so that they affect reading a file as well as writing one, so that only the first <n> packets or bytes are read). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21211 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-23Fix about 150 warnings new to gcc 4.0 in the error on warning directories.sfisher1-8/+8
Comment out -Werror in plugins/asn1/ until warnings can be fixed. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21158 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-18Add separate union entries to fvalue.value for signed and unsignedmartinm1-4/+4
32-bit numbers. Separate signed and unsigned accessors have been added and used where appropriate. Definitely not for 0.99.5. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20472 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-24Have separate proto_construct_match_selected_string() andguy1-2/+3
proto_can_match_selected() routines, to more clearly separate the two functions - but have them both call the same underlying routine, so they both make the same decisions as to whether a match-selected string can be constructed or not. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19976 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-23Rename proto_construct_dfilter_string() toguy1-3/+2
proto_construct_match_selected_string() to indicate what it does - and have it return a Boolean indication of whether the string could be built, returning the string through a pointer, and, if that pointer is null, have it just return the Boolean and not construct the string. Get rid of proto_can_match_selected() - proto_construct_match_selected_string() can be used for that, which means we have only one piece of code that knows whether a "match selected" string can be constructed or not. Have proto_construct_match_selected_string() support matching zero-length FT_NONE (and FT_PCRE, but that shouldn't happen) fields even if there's no epan_dissect_t, as such a match just checks whether the field is present. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19967 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-07Revert the previous changes - the problem Paul Blankenbaker was fixingguy1-43/+41
was really a problem with bytes_repr_len() and zero-length FT_BYTES fields, and it's not clear what to do about fields that have zero length. (Put in a comment about that.) Clean up indentation a bit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19864 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-07Based on a change from Paul Blankenbaker, make the "show" attribute forguy1-27/+37
a field an empty string if the field is zero-length; for some reason, the existing code doesn't handle that correctly. Also, the NetPDL Visualization Extension: http://www.nbee.org/Docs/NetPDL/NetPDLVisualization.htm seems to imply that "value" has to be present, so display it even if the field is zero-length. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19862 f5534014-38df-0310-8fa8-9805f1628bb7
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