aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-20When doing random error mutation, protect DCT2000martinm1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24401 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-06Initialize filenamelen to avoid a warning.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24275 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-03snprintf -> g_snprintfstig1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24260 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-03More rewrite of prohibited APIs (sprintf, strcpy, strcat).stig1-3/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24258 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-24Fixed some strcpy -> strncpy/g_snprintf cleanups.stig1-1/+1
Removed a debug printout in t38. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24188 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-24Fixed some malloc -> g_malloc, free -> g_free, strdup -> g_strdup.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24179 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-24Replace a handful of tabs with spaces.martinm1-30/+30
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24176 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-17From RD Thrush: Fix for 'editcap relies on gnu extension to strptime(3)'wmeier1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24124 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-12Clean up the usage information of editcap and change the textsake1-8/+10
of the -t option to fit its current behaviour ('fixes' bug 2101) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24072 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-09Add a newline.gerald1-5/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23416 f5534014-38df-0310-8fa8-9805f1628bb7
2007-09-30Clean up indentation.guy1-49/+55
"time_t" is not guaranteed to be an "unsigned long"; when printing it with %lu, cast it to "unsigned long". The "secs" field of a wtap_nstime, however, *is* defined to be a time_t; there's no need to cast it to time_t. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23036 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-31This patch fixes the following two errors that appear whensake1-1/+1
configure is run with "--without-plugins" cc1: warnings being treated as errors about_dlg.c: In function ‘about_wireshark_cb’: about_dlg.c:426: warning: unused variable ‘plugins_page’ make[2]: *** [about_dlg.o] Error 1 editcap.c: In function ‘main’: editcap.c:663: error: ‘check_ts’ undeclared (first use in this function) editcap.c:663: error: (Each undeclared identifier is reported only once editcap.c:663: error: for each function it appears in.) make[2]: *** [editcap.o] Error 1 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22761 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-07Make sure that wiretap plugins are loaded before dissectors are (if a new ↵lego1-1/+0
encap type is registered the plugin probably needs it before reg_handoff) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22461 f5534014-38df-0310-8fa8-9805f1628bb7
2007-07-30nononono.... print one on 250 not every linelego1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22426 f5534014-38df-0310-8fa8-9805f1628bb7
2007-07-30for bug 1158 have editcap print the value of the timestamps while running so ↵lego1-4/+13
I can get feedback from the user. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22425 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-20Increase the maximum number of packet selections to 512 (from 100). More ↵morriss1-11/+15
importantly, give the user feedback if we run out of room for packet selections. As mentioned on the list, this could be made completely dynamic if someone actually goes over the (new) limit. OK for 0.99.6 but not necessary. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22145 f5534014-38df-0310-8fa8-9805f1628bb7
2007-06-17Have editcap and capinfos compile --without-pluginslego1-7/+9
Should go in 0.99.6 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22116 f5534014-38df-0310-8fa8-9805f1628bb7
2007-05-25Have editcap and capinfos loading the wiretap plugins.lego1-3/+25
epan/filesystem.c have get_plugin_dir() calling init_plugin_dir() if necessary epan/epan.c and epan/report_err.c move the report_failure family into the new report_err.c file, have epan_init() calling the initializer epan/plugins.h and epan/proto.c do not have init_plugins() calling the proto_reg functions instead do it in init_proto() gtk/main.c and tshark.c init_plugin_dir() has become suprefluous capinfos.c and editcap.c load the wiretap plugins Makefiles do what's needed to build withe the above changes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21935 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-22Only #deinfe __USE_XOPEN if not already defined. On my Suse 10.2 it wasjmayer1-2/+6
already #defined to 1, so this would create a warning/error. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21508 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-21fix MSVC warnings of / and set CFLAGS to block new warningsulfl1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21098 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-16From Sebastien Tandeil:jake1-6/+8
a patch to avoid the warning "implicit declaration of function 'strptime'" in editcap.c glib.h is included just after the define __USE_XOPEN and include <time.h> git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20455 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-02Move epan/crypt-md5.[ch] to epan/crypt. Removegerald1-3/+3
epan/crypt/airpdcap_md5.[ch]. Fix up whitespace. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20277 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-14nikai@nikai.net:jmayer1-1/+0
Remaining fixes from: http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1225 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19895 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵ulfl1-1/+1
handle files > 2GB correct. Please distclean Win32 builds! git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19814 f5534014-38df-0310-8fa8-9805f1628bb7
2006-10-23As proposed by Tim Furlong:lego1-1/+4
set starttm.tm_isdst to -1 to have mktime() propperly interpret DST. Might fix Bug 1158 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19662 f5534014-38df-0310-8fa8-9805f1628bb7
2006-07-27Add duplicate frame detection (and removal) to editcap. (Some switchesgerald1-10/+75
generate duplicate packets when a mirror/SPAN port is misconfigured). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18800 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-03-16- Have strptime prototype being included.lego1-10/+33
- clear struct tm s before passing them to strptime. - make sure stopttime is a valid value on every plattform. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17647 f5534014-38df-0310-8fa8-9805f1628bb7
2006-03-15use time_t instead of an unsigned integer to sstore the time.lego1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17638 f5534014-38df-0310-8fa8-9805f1628bb7
2006-03-13Add -A <start time> and -B <stop time> options to editcaplego1-5/+54
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17614 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-10print the list of available types also if the given type is invalidulfl1-18/+24
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16993 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-10redesign of the usage output (displayed with -h or an unknown option):ulfl1-36/+66
option explanation is more detailed now, I've added the option parameters to the description added version information to the usage output instead of using the usage page to display the available file and encapsulation types (which makes the usage page almost unreadable), use empty options -F or -T to print the available types. I've used optopt for this, it seems to be portable that way ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16991 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-09add a new command line option "chop", which will simply cut off the last "n" ↵ulfl1-19/+39
bytes from each packet. This is required (at least by me) when converting from PacketGrabber files which sometimes seem to include some additional bytes. sort the usage string, so it will be ordered alphabetically replace appearances of "frame" and "record" with "packet" git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16981 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-16From Jaap Keuter:etxrab1-5/+61
- Editcap Mikko Tiihonen filed bug 379 including a patch for editcap. This wasn't picked up so far. I've ported the patch to svn 16820 and included a documentation patch. -packet-ieee80211.c Radek Vokal of RedHat filed a bug found by Vladimir Kondratiev of Intel in the 802.11 dissector. Radek provided a sample capture and Vladimir a oneliner patch. I've ported the patch to svn 16820 and tested it against the provided capture. Works well. -From Kan Sasaki A patch for packet-ospf.c is attached: - Fix the handling of the DN-bit of options field. - Add a new function dissect_ospf_bitfield() to dissect a bitfield such as options, flags. The following functions are merged by using this function. - dissect_ospf_lls_extended_options() - dissect_ospf_dbd() - dissect_ospf_options() - dissect_ospf_v3_prefix_options() - dissect the flags and prefix-options bitfield. - lldp Bugfix Bug 596 LLDP TIA Network Policy Decode is not correct - Camel make it possible to dissect based on OID. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16822 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-14added compression support for capture file output. The Save/As dialog now ↵ulfl1-1/+1
has a checkbox "Compress with gzip" currently limited to Ethereal and all the variants of libpcap filetypes only. We might want to add output compression support to the other tools as well (tethereal, mergecap, ...). We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek. One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15804 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-24fix usec -> nsec translationulfl1-12/+12
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15521 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-26From Peter Johansson:etxrab1-1/+5
The supplied patch takes care of the following compilation warnings: editcap.c(273) : warning C4013: 'getpid' undefined; assuming extern returning int editcap.c(464) : warning C4018: '<' : signed/unsigned mismatch git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15084 f5534014-38df-0310-8fa8-9805f1628bb7
2005-06-17the -E probability parameter was missing in the usage summaryulfl1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14677 f5534014-38df-0310-8fa8-9805f1628bb7
2005-05-30Add random bit errors to the fuzz tests.gerald1-1/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14489 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-10Remove debugging printf()s.gerald1-4/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14048 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-10Add an option to Editcap that adds various types of errors to the capture gerald1-26/+94
file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14046 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-03Make editcap use wtap_read(); that eliminates the last user ofguy1-97/+79
wtap_loop(), so eliminate wtap_loop(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14006 f5534014-38df-0310-8fa8-9805f1628bb7
2004-12-29Make the tone of the error messages a bit less formal, by usingguy1-6/+6
contractions. (Safari does, at least when you're trying to open a file to which you don't have read access.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12852 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-02-23Another small closing bracket fixup.sharpe1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10196 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-23Small fix to usage text to add a trailing closed square bracket (]).sharpe1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10194 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-25Free the error info string after using it.guy1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9855 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inguy1-4/+25
addition to an error code, an error info string, for WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and WTAP_ERR_BAD_RECORD errors. Replace the error messages logged with "g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed strings returned as the error info string, and change the callers of those routines to, for those errors, put the info string into the printed message or alert box for the error. Add messages for cases where those errors were returned without printing an additional message. Nobody uses the error code from "cf_read()" - "cf_read()" puts up the alert box itself for failures; get rid of the error code, so it just returns a success/failure indication. Rename "file_read_error_message()" to "cf_read_error_message()", as it handles read errors from Wiretap, and have it take an error info string as an argument. (That handles a lot of the work of putting the info string into the error message.) Make some variables in "ascend-grammar.y" static. Check the return value of "erf_read_header()" in "erf_seek_read()". Get rid of an unused #define in "i4btrace.c". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9852 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-18Fix warnings found by -Wstrict-prototypesjmayer1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9722 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-6/+6
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