aboutsummaryrefslogtreecommitdiffstats
path: root/rawshark.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-27Minor formatting changes to the rawshark -h output.cmaynard1-3/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39165 f5534014-38df-0310-8fa8-9805f1628bb7
2011-09-21Fix ex "modeline" so it works;wmeier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39081 f5534014-38df-0310-8fa8-9805f1628bb7
2011-08-09Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608 :morriss1-3/+1
getopt() can/should normally be found in unistd.h, so: - When testing for getopt(), define that we HAVE_GETOPT instead of HAVE_GETOPT_H (to avoid confusion). - Don't attempt to include getopt.h: not all OS's have it (for example, Solaris 9 does not). - (All the places which need getopt already include unistd.h (if we have it).) If this breaks things on some OS, we might need (a real) HAVE_GETOPT_H check. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38437 f5534014-38df-0310-8fa8-9805f1628bb7
2011-07-04From Michael Mann:etxrab1-0/+4
Added ability to display UTC time or UTC time with date. I liked having the difference between UTC and local time, not just setting local=UTC. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2629 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37898 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-28Replace all strerror() with g_strerror().stig1-18/+14
Remove our local strerror implementation. Mark strerror as locale unsafe API. This fixes bug 5715. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37812 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-24Move the Windows argument list conversion code to a common routine.gerald1-10/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37372 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-21Add missing code to handle fields with an extended value_string ↵darkjames1-0/+4
(BASE_EXT_STRING) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36749 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-21Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discoveredguy1-5/+10
by the gunzipping code. Have it also supply a err_info string, and report it. Have file_error() supply an err_info string. Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to suggest a decompression error - into the rawshark and tshark errors, along the lines of what other programs print. Fix a case in the Netscaler code where we weren't fetching the error code on a read failure. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36748 f5534014-38df-0310-8fa8-9805f1628bb7
2011-04-10Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64guy1-2/+2
as an argument, along the lines of ws_fstat64, and, on Windows, make it use _wstati64, to handle 64-bit file sizes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36547 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-06On Windows, convert all of our command-line arguments from UTF-16 togerald1-1/+17
UTF-8 where we don't already do so. In Wireshark use g_utf16_to_utf8 instead of utf_16to8. This should fix bug 5520. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35411 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-22Avoid the need for cf_mark_frame stubs.jake1-9/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35248 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-21Fixed "Compiled with" information in the About box.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34601 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-15Revision 27919 added the ability to feed a libpcap-formatted file togerald1-14/+34
rawshark but broke the ability to feed it live packets with a pcap_pkthdr prefix on some 64-bit architectures. Add a "-p" flag which lets us explicitly handle file-based or memory-based packet record headers. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34522 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-12Rename g_resolv_flags --> gbl_resolv_flags; Also: cleanup some whitespace & ↵wmeier1-5/+5
indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34487 f5534014-38df-0310-8fa8-9805f1628bb7
2010-09-16Turn on ASLR via /DYNAMICBASE and DEP via SetProcessDEPPolicy().gerald1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34137 f5534014-38df-0310-8fa8-9805f1628bb7
2010-07-15Move the code to get version information for libraries used byguy1-1/+1
libwireshark into libwireshark, and call it only in programs linked with libwireshark. That way, programs that don't link with libwireshark don't have to link with libgcrypt or libgnutls solely so that they can say that they're linked with a particular version of libgcrypt or libgnutls. Don't link dumpcap with libgcrypt or libgnutls any more. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33531 f5534014-38df-0310-8fa8-9805f1628bb7
2010-07-14Get rid of no-longer-used variable.guy1-6/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33511 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-28Move some code (including the optional objects) into libwsutilmorriss1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33012 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-07Set default seconds type in rawshark and dftest.stig1-0/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32709 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-28 Let's not use tabs with tab-width=4; Convert tabs to spaces (with indent=4).wmeier1-1193/+1193
Also: use consistent indentation & remove any trailing blanks. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32588 f5534014-38df-0310-8fa8-9805f1628bb7
2010-03-04"capture-pcap-util.h" include <pcap.h>, and <pcap.h>, for better orguy1-1/+0
worse, has no include-once guards; include it only once. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32110 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-28Added svn:ignore targets.stig1-9/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32055 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-23Move the declarations of wtap_pcap_encap_to_wtap_encap() andguy1-2/+3
wtap_wtap_encap_to_pcap_encap() to wiretap/pcap-encap.h. Include it where it's needed; don't include other Wiretap headers where they're not needed. Include pcapng.h in pcapng.c, to declare the functions defined in pcapng.c. Add some casts to squelch some warnings, and add to a comment to indicate one of the problems. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31960 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-23Squelch some warnings.guy1-6/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31959 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-29Fix various gcc -Wshadow warnings.wmeier1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31729 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofguy1-5/+30
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL == (int)BASE_NONE, so there's no source or binary compatiblity issue, although we might want to eliminate BASE_NONE at some point and have the BASE_ values used with integral types start at 0, so that you can't specify BASE_NONE for an integral field. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31319 f5534014-38df-0310-8fa8-9805f1628bb7
2009-11-10Removed an unused assignment.stig1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30915 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-06Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_Hstig1-3/+4
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30370 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-22Rename init_cap_file() to cap_file_init()krj1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30073 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-22Make frame_data_set_after_dissect() callers do the necessary checks insteadkrj1-2/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30068 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-22Refactor frame_data_init() into frame_data_set_before_dissect() and ↵krj1-3/+9
frame_data_set_after_dissect(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30066 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-21Move 'Delta timestamp to previous captured frame' calculation inside ↵krj1-1/+1
add_packet_to_packet_list(). This is done in order to streamline add_packet_to_packet_list() with frame_data_init(). Hopefully we can switch to frame_data_init() soon git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30052 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-21Move frame_data_init() declaration to frame_data.hkrj1-8/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30033 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-20Fix return type for frame_data_init()krj1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30024 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-20Introduce frame_data_cleanup() and start using itkrj1-9/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30023 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-20Use frame_data_init() instead of the locally defined fill_in_fdata(), which ↵krj1-70/+11
will be removed as part of this change git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30022 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-20Move verbose banner output to show_version() and tighten scope of some variableskrj1-19/+28
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30020 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-08Make tshark and rawshark use build_column_format_array() instead of ↵krj1-29/+1
duplicating the code git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29803 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-07Store the packet encapsulation type as gint8. Saves 3 bytes per packetkrj1-1/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29767 f5534014-38df-0310-8fa8-9805f1628bb7
2009-09-06Split a bunch of init routines into init() and cleanup(). This allows us to ↵krj1-0/+2
free memory properly on shutdown. This is an initial step. There's still some work to do. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29754 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-13Introduce epan_dissect_init()/epan_dissect_cleanup(). These are used to ↵krj1-8/+8
initialise/cleanup stack allocated 'edt' structures. This should speed up dissection since we avoid some malloc traffic. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29404 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-05Have tap listeners specify whether the "packet" routine requiresguy1-1/+1
a protocol tree; the column values. This includes stats-tree listeners. Have the routines to build the packet list, and to retap packets, honor those requirements. This means that cf_retap_packets() no longer needs an argument to specify whether to construct the column values or not, so get rid of that argument. This also means that there's no need for a tap to have a fake filter to ensure that the protocol tree will be built, so don't set up a fake "frame" filter. While we're at it, clean up some cases where "no filter" was represented as a null string rather than a null pointer. Have a routine to return an indication of the number of tap listeners with filters; use that rather than the global num_tap_filters. Clean up some indentation and some gboolean vs. gint items. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28645 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-12Minor cleanup of "-h" output text.wmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28334 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-03-31Rawshark fixes from Duncan Salerno.gerald1-14/+39
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27919 f5534014-38df-0310-8fa8-9805f1628bb7
2009-03-22Change the signature of init_progfile_dir() so the casting of theguy1-1/+1
function pointer (to main) to an argument to dladdr() is done in init_progfile_dir() rather than its callers. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27814 f5534014-38df-0310-8fa8-9805f1628bb7
2009-03-22In Solaris, the second argument to dladdr() is just a void *, not aguy1-2/+1
const void *. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27813 f5534014-38df-0310-8fa8-9805f1628bb7
2009-03-22Attempt to use dladdr() to get the pathname of the executable image ifguy1-2/+3
it's available and works. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27812 f5534014-38df-0310-8fa8-9805f1628bb7
2009-02-15Add a routine to report write errors to the list of failure-reportingguy1-1/+13
routines handled by epan/report_err.c. Move copy_binary_file() in file.c to epan/filesystem.c, and rename it to copy_file_binary_mode() (to clarify that it *can* copy text files; arguably, *all* files are "binary" unless you're on, say, an IBM 1401 :-)). Have it use the report_err.c routines, so it works in console-mode programs. Clean up some comments while we're at it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27456 f5534014-38df-0310-8fa8-9805f1628bb7
2009-02-07#include <epan/conversation.h> not req'd ...wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27392 f5534014-38df-0310-8fa8-9805f1628bb7