aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
AgeCommit message (Collapse)AuthorFilesLines
2011-04-05Fix a typo in the help message.tuexen1-1/+1
Reported by Matthias Wellmeyer. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36471 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-30Fix a couple of typos.cmaynard1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36410 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-30Wrap all text lines of help at column 80.cmaynard1-5/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36408 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-23Don't compute each checksum twice when adding dummy headers (-u, -T, -s, -S ↵wmeier1-15/+31
options) g_ntohs() & friends may be (are ?) macros and may (will ?) eval args more than once ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36272 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-06On Windows, convert all of our command-line arguments from UTF-16 togerald1-1/+21
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-10-19Change dummy MAC addresses so we don't get Wireshark expert message:wmeier1-3/+3
"[...] Source MAC must not be a group address: IEEE 802.3-2002, Section 3.2.3(b)" Specifically: use 0a:01:01:01:01:01 and 0a:02:02:02;02:02 (and dummy IP addresses 10.1.1.1 and 10.2.2.2). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34571 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-28Move some code (including the optional objects) into libwsutilmorriss1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33012 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-29From Jim Young: Include svnversion.h in capinfos and text2pcapwmeier1-0/+1
This patch adds a #include "svnversion.h" statement to the capinfos.c and text2pcap.c files so that their usage() functions will display the SVNVERSION and SVNPATH infos (if defined). See Bug #4360 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4360) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31382 f5534014-38df-0310-8fa8-9805f1628bb7
2009-12-08From Jakub Zawadzki via bug #4289: (Fix for) Frame arrival times (pcap)sfisher1-0/+1
are 1 hour more than timestamps in txt git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31195 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-06Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_Hstig1-2/+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-07-22Use "svn info" to fetch the version by default. Fetch the repository path asgerald1-1/+1
well. Add the repository path to the version strings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29171 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-12Minor cleanup of "-h" output text.wmeier1-23/+27
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
2008-09-21Declare ts_sec as a time_t because that's how it's used; this avoids a warningmorriss1-8/+8
about how dereferencing a type-punned pointer will break strict-aliasing rules when calling localtime(). Make ts_sec in text2pcap's definition of a PCAP record header unsigned to match that in libpcap.h . Cast the time_t into guint32 as necessary. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26242 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-04The joys of beating header files over the head to get all the variousguy1-0/+16
APIs we use declared. We still need to define __EXTENSIONS__ on Solaris, in order to get strptime() declared. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25426 f5534014-38df-0310-8fa8-9805f1628bb7
2008-05-22Move the file utility functions from wiretap to libwsutil so thatmorriss1-3/+3
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-13Fix some of the Errors/warnings detected by checkapi.etxrab1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25284 f5534014-38df-0310-8fa8-9805f1628bb7
2008-03-01"Read 1 potential packet, wrote 1 packet": use packet or packets as appropriatewmeier1-2/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24526 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-05From Michael McCartney (bug 2246):stig1-3/+7
Enhancement to allow dec option when parsing offset. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24272 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-03More rewrite of prohibited APIs (sprintf, strcpy, strcat).stig1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24258 f5534014-38df-0310-8fa8-9805f1628bb7
2008-01-09Pavol Rusnak <stick@gk2.sk>:jmayer1-6/+9
Fix for http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2183 Strptime function is not properly included. It needs __USE_XOPEN macro, but it is defined in wrong place. It must be defined before _any_ include file. Otherwise I get "implicit declaration of function `strptime`" (gcc 4.3.0). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24044 f5534014-38df-0310-8fa8-9805f1628bb7
2007-10-16A few more s/fopen/eth_fopen/morriss1-8/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23207 f5534014-38df-0310-8fa8-9805f1628bb7
2007-09-20When -t option: Use current date or time fields for unspecified fields; ↵wmeier1-20/+29
Fixes bug #1836. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22916 f5534014-38df-0310-8fa8-9805f1628bb7
2007-09-18If bad date/time: use 1/1/70 00:00:00 local time; Add some addt'l output if ↵wmeier1-30/+36
debug option used git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22902 f5534014-38df-0310-8fa8-9805f1628bb7
2007-09-12Output err msg if strptime fails converting input time;wmeier1-1/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22852 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-21fix usage message for -o optionrichardv1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22574 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-22set #ifndef __USE_XOPEN instead of only #ifndefstandel1-1/+1
should fix rev21508 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21511 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-22Only #deinfe __USE_XOPEN if not already defined. On my Suse 10.2 it wasjmayer1-2/+5
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-28Remove almost all of the casts I committed recently and in place ofsfisher1-3/+3
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-23Fix about 150 warnings new to gcc 4.0 in the error on warning directories.sfisher1-3/+3
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-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
2006-05-28Ethereal->Wiresharketxrab1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18235 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
2006-03-01"help()" really just prints a usage message; it's not a full-blown helpguy1-26/+27
system. Just call it "usage()". Also, it doesn't use the "progname" argument - it doesn't need to, it's text2pcap-specific, and it prefers to call it "Text2pcap" anyway (and, besides, argv[0] might well be a pathname). Get rid of that argument. Fix some white space. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17431 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-11update usage textulfl1-44/+55
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16999 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-23More 'char*' -> 'const char*' changes to fix warnings.jmayer1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15015 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-04fix a typo in the help text.tuexen1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11311 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-06Add some sanity checking for the "-i" argument.guy1-3/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9573 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-05removed some MSVC warnings (level 3)ulfl1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9561 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-21Compiling with -pedantic:jmayer1-2/+2
warning: comma at end of enumerator list git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9383 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-27From Matthijs Melchior:guy1-24/+130
- added option -m to set maximum packet length - added option -T to generate TCP headers - UDP headers now have a correct checksum - default capture timestamp is current time, usec field counts packets - UDP and TCP headers are mutually exclusive - changed etherenet addresses, now sends from 1 -> 2 .... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7571 f5534014-38df-0310-8fa8-9805f1628bb7
2003-02-27From Jason Copenhaver: put the address fields in the Ethernet header inguy1-2/+2
the right order. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7208 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-17Don't use "unsigned long" when you mean "unsigned 32-bit integer", asguy1-59/+59
"unsigned long" is an unsigned *64-bit* integer on many platforms. While we're at it, use "guint8" rather than "unsigned char" for "unsigned 8-bit integer", and use "guint16" rather than "unsigned short" for "unsigned 16-bit integer". Make the seconds field of a libpcap time stamp signed, as it's supposed to be. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6445 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-10Increase addr outside of macrojmayer1-2/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6393 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-132/+132
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
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hjmayer1-30/+18
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7
2002-07-21"yyin" is from lex/flex, so it should be "extern", not "static" - weguy1-15/+19
have to modify lex/flex's input stream, not some private "FILE *". Fix up the usage message to: mention the "-h" flag; not mention the non-existent "-w" flag; fit within 80 columns. Add "-h" to the list of options in the "getopt()" call, as there's code to support it, and remove "-r" and "-w", as there wasn't any code to support them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5899 f5534014-38df-0310-8fa8-9805f1628bb7
2002-07-15From Joerg Mayer:guy1-10/+9
Replace our own definitions of TRUE/FALSE by their glib.h equivalents. Put sys/types.h into ifdefs. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5880 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-30From Joerg Mayer: add some missing static declarations.guy1-41/+41
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5806 f5534014-38df-0310-8fa8-9805f1628bb7