aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
AgeCommit message (Collapse)AuthorFilesLines
2011-02-04From Jason Masker (bug 5240):Sake Blok1-10/+16
` Allow editcap to chop from beginning of packet for decapsulation svn path=/trunk/; revision=35832
2011-01-06On Windows, convert all of our command-line arguments from UTF-16 toGerald Combs1-0/+18
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. svn path=/trunk/; revision=35411
2010-12-06Fix various typos and spelling errors.Bill Meier1-1/+1
svn path=/trunk/; revision=35126
2010-11-24Attempt to fix warnings not previously seen with VS2008EE.Chris Maynard1-5/+8
svn path=/trunk/; revision=35024
2010-11-24When listing encapsulation types with -T or file types with -F, sort them.Chris Maynard1-8/+39
svn path=/trunk/; revision=35022
2010-11-16Make editcap -B work like expected: output no packets after the stop time.Sake Blok1-4/+4
Old behavior was to include a packet with a timestamp of 12:00:00.934 if -B "YYYY-MM-DD 12:00:00" was used. svn path=/trunk/; revision=34913
2010-11-01From Jose Pedro Oliveira via ↵Jeff Morriss1-10/+10
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5353 : editcap -h sends 9 lines to stderr and the rest to stdout. This problem affects editcap 1.4.x (branch 1.4) and devel (trunk). How to duplicate: 1) run "editcap -h" 2) run "editcap -h > /dev/null" The attached patch replaces 9 ocurrences of "stderr" by "output" in the usage function. svn path=/trunk/; revision=34742
2010-09-16Turn on ASLR via /DYNAMICBASE and DEP via SetProcessDEPPolicy().Gerald Combs1-7/+7
svn path=/trunk/; revision=34137
2010-06-03Fix a gcc -Wshadow warningBill Meier1-13/+13
svn path=/trunk/; revision=33077
2010-06-02From Jim Young via bug 4331:Gerald Combs1-2/+154
This patch adds a new '-S' option to editcap that will rewrite timestamps of packets to insure that the new capture file is in strict chronological order. This option's primary use case is to fixup the occasional timestamps that have a negative delta time relative to previous packet. This feature is related to (but does not depend on) capinfos enhancement submitted in bug #4315 which helps identify tracefiles with "out-of-order" packets. svn path=/trunk/; revision=33042
2010-05-28Move some code (including the optional objects) into libwsutilJeff Morriss1-7/+7
svn path=/trunk/; revision=33012
2010-01-29Fix various gcc -Wshadow warnings.Bill Meier1-28/+28
svn path=/trunk/; revision=31729
2009-12-29Make edticap behave like the rest of the Wireshark programs where it willStephen Fisher1-64/+71
send normal -h output to stdout so it can be paginated and the usage output to stderr when there was an error in the command arguments. svn path=/trunk/; revision=31388
2009-10-25From Jim Young via bug 4162:Gerald Combs1-0/+10
This patch limits the number of fractional digits used to calculate the fractional component of editcap's -t and -w options. Specifically this patch truncates the fractional component (if any) of the -t and -w options to 6 and 9 respectively. svn path=/trunk/; revision=30698
2009-10-06Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_HStig Bjørlykke1-4/+4
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision. svn path=/trunk/; revision=30370
2009-07-22Use "svn info" to fetch the version by default. Fetch the repository path asGerald Combs1-1/+1
well. Add the repository path to the version strings. svn path=/trunk/; revision=29171
2009-06-21Clean up the "available XXX type" messages a bit.Guy Harris1-2/+2
svn path=/trunk/; revision=28793
2009-06-02If no valid packages was found in the input file we write an emptyStig Bjørlykke1-3/+17
header in the output file. This way we at least create a file. svn path=/trunk/; revision=28617
2009-06-02Only call wtap_dump_close() if we have an open file.Stig Bjørlykke1-2/+2
We can have a situation where a file only contains a valid file header without any packages, so this will avoid a crash. svn path=/trunk/; revision=28602
2009-05-23Have fileset_extract_prefix_suffix() print an error message if it fails,Guy Harris1-12/+13
so we don't just exit silently. Don't bother checking the validity of arguments - it shouldn't be passed NULL fprefix or fsuffix arguments in the first place, and isn't passed them. Exit with an exit status of 1 for command-line syntax errors and 2 for file open/close/IO errors. svn path=/trunk/; revision=28458
2009-05-23Fix indentation.Guy Harris1-6/+6
svn path=/trunk/; revision=28457
2009-05-23Initialize pdh...Sake Blok1-1/+1
svn path=/trunk/; revision=28455
2009-05-23From Kovarththanan Rajaratnam <krj@rajaratnam.dk> in bug 2683Sake Blok1-61/+144
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2683): Editcap should split file according to fileset pattern svn path=/trunk/; revision=28454
2009-05-12Minor cleanup of "-h" output text.Bill Meier1-23/+24
svn path=/trunk/; revision=28334
2009-04-17Fix Win64 compilation.Gerald Combs1-5/+5
svn path=/trunk/; revision=28076
2009-04-17From Jim Young <jyoung@gsu.edu>:Balint Reczey1-20/+303
- New duplicate packet removal options for editcap https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3168 I changed the patch a bit: - Adapted to 80 chars wide screen - Merged -w and -W parameters svn path=/trunk/; revision=28074
2009-04-16Fix the last(?) of the Win64 compilation problems.Gerald Combs1-5/+5
svn path=/trunk/; revision=28065
2009-03-22Change the signature of init_progfile_dir() so the casting of theGuy Harris1-1/+1
function pointer (to main) to an argument to dladdr() is done in init_progfile_dir() rather than its callers. svn path=/trunk/; revision=27814
2009-03-22In Solaris, the second argument to dladdr() is just a void *, not aGuy Harris1-2/+1
const void *. svn path=/trunk/; revision=27813
2009-03-22Attempt to use dladdr() to get the pathname of the executable image ifGuy Harris1-1/+2
it's available and works. svn path=/trunk/; revision=27812
2009-02-15Add a routine to report write errors to the list of failure-reportingGuy Harris1-1/+1
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. svn path=/trunk/; revision=27456
2008-12-18Only declare failure_message() if we HAVE_PLUGINS (since it's only used when ↵Jeff Morriss1-0/+2
that's the case). svn path=/trunk/; revision=27051
2008-10-24Windows build: #include winsock2.h only when needed.Bill Meier1-0/+3
#include winsock2.h pulls in about 90 distinct .h files and about 140 total .h files. Currently winsock2.h is (mostly unnecessarily) included for each dissector via packet.h/wtap.h. This patch removes #include winsock2.h from wtap.h and then includes winsock2.h (or windows.h) in the few specific places required. With this patch, my Windows Wireshark build takes about 30% less time. svn path=/trunk/; revision=26535
2008-06-30Move privileges.c and unicode-utils.c from epan to wsutil (so things likeJeff Morriss1-1/+1
capinfos and dumpcap don't need to depend on libwireshark nor directly pull in those modules). Because capinfos and editcap were only being linked with privileges.c if we had plugins, this allows those programs to be linked when someone is compiling --without-plugins. svn path=/trunk/; revision=25640
2008-06-21From Ken Smith (bug 2574): Allow editcap to parse files into even time intervalsSake Blok1-3/+72
A few changes from me: - make use of nstime_set_unset and nstime_is_unset i.s.o. extra variable first_pass - change 'if' to 'while' to allow intervals with no packets - remove 'unused' variable current_pkt_ts svn path=/trunk/; revision=25499
2008-05-30Free up the err_info string returned by wtap_read() andGuy Harris1-0/+1
wtap_seek_read(). Clean up indentation. svn path=/trunk/; revision=25400
2008-03-25Long time ago, I added these to troubleshoot a problem a user was seeing but ↵Luis Ontanon1-10/+0
I could not reproduce, as I had no feedback I forgot about removing these prints. This must be copied over to the release branch. svn path=/trunk/; revision=24727
2008-03-16Don't link plugins against libwireshark: any program that loads the dissectorJeff Morriss1-4/+7
plugins should already be linked against libwireshark. Don't link capinfos and editcap against libwireshark: they only needed to be because the plugins were linked against libwireshark (see rev 24123 and the ensuing discussion on -dev). capinfos and editcap: don't complain if plugins fail to load: dissector plugins should fail to load because they need libwireshark. I am assuming here that wiretap plugins don't need libwireshark (I've never seen such a plugin but LEGO's code and comments suggest this is the case). (The goal of this checkin is to stop linking capinfos and editcap against libwireshark while still allowing wiretap plugins. Since we don't have any such plugins in the tree I do somewhat doubt the need for all this but I don't want to be the one to remove the functionality.) svn path=/trunk/; revision=24650
2008-03-16Include epan/priveleges.h for get_credential_info()Jeff Morriss1-0/+1
svn path=/trunk/; revision=24649
2008-03-16Have started_with_special_privs() assert out if get_credential_info() was notJeff Morriss1-5/+15
previously called. This prevents the function from always returning TRUE in programs that hadn't called get_credential_info(). Call get_credential_info() in the programs that should have been. svn path=/trunk/; revision=24648
2008-02-20When doing random error mutation, protect DCT2000Martin Mathieson1-43/+63
meta information that is found at the beginning of the data - this lets me fuzztest my .out files properly. Also make some whitespace more consistent. svn path=/trunk/; revision=24401
2008-02-06Initialize filenamelen to avoid a warning.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=24275
2008-02-03snprintf -> g_snprintfStig Bjørlykke1-2/+2
svn path=/trunk/; revision=24260
2008-02-03More rewrite of prohibited APIs (sprintf, strcpy, strcat).Stig Bjørlykke1-3/+5
svn path=/trunk/; revision=24258
2008-01-24Fixed some strcpy -> strncpy/g_snprintf cleanups.Stig Bjørlykke1-1/+1
Removed a debug printout in t38. svn path=/trunk/; revision=24188
2008-01-24Fixed some malloc -> g_malloc, free -> g_free, strdup -> g_strdup.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=24179
2008-01-24Replace a handful of tabs with spaces.Martin Mathieson1-30/+30
svn path=/trunk/; revision=24176
2008-01-17From RD Thrush: Fix for 'editcap relies on gnu extension to strptime(3)'Bill Meier1-2/+2
svn path=/trunk/; revision=24124
2008-01-12Clean up the usage information of editcap and change the textSake Blok1-8/+10
of the -t option to fit its current behaviour ('fixes' bug 2101) svn path=/trunk/; revision=24072
2007-11-09Add a newline.Gerald Combs1-5/+5
svn path=/trunk/; revision=23416