aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
AgeCommit message (Collapse)AuthorFilesLines
2008-09-21Declare ts_sec as a time_t because that's how it's used; this avoids a warningJeff Morriss1-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. svn path=/trunk/; revision=26242
2008-06-04The joys of beating header files over the head to get all the variousGuy Harris1-0/+16
APIs we use declared. We still need to define __EXTENSIONS__ on Solaris, in order to get strptime() declared. svn path=/trunk/; revision=25426
2008-05-22Move the file utility functions from wiretap to libwsutil so thatJeff Morriss1-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_*. svn path=/trunk/; revision=25354
2008-05-13Fix some of the Errors/warnings detected by checkapi.Anders Broman1-4/+4
svn path=/trunk/; revision=25284
2008-03-01"Read 1 potential packet, wrote 1 packet": use packet or packets as appropriateBill Meier1-2/+3
svn path=/trunk/; revision=24526
2008-02-05From Michael McCartney (bug 2246):Stig Bjørlykke1-3/+7
Enhancement to allow dec option when parsing offset. svn path=/trunk/; revision=24272
2008-02-03More rewrite of prohibited APIs (sprintf, strcpy, strcat).Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=24258
2008-01-09Pavol Rusnak <stick@gk2.sk>:Jörg Mayer1-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). svn path=/trunk/; revision=24044
2007-10-16A few more s/fopen/eth_fopen/Jeff Morriss1-8/+9
svn path=/trunk/; revision=23207
2007-09-20When -t option: Use current date or time fields for unspecified fields; ↵Bill Meier1-20/+29
Fixes bug #1836. svn path=/trunk/; revision=22916
2007-09-18If bad date/time: use 1/1/70 00:00:00 local time; Add some addt'l output if ↵Bill Meier1-30/+36
debug option used svn path=/trunk/; revision=22902
2007-09-12Output err msg if strptime fails converting input time;Bill Meier1-1/+4
svn path=/trunk/; revision=22852
2007-08-21fix usage message for -o optionRichard van der Hoff1-1/+1
svn path=/trunk/; revision=22574
2007-04-22set #ifndef __USE_XOPEN instead of only #ifndefSebastien Tandel1-1/+1
should fix rev21508 svn path=/trunk/; revision=21511
2007-04-22Only #deinfe __USE_XOPEN if not already defined. On my Suse 10.2 it wasJörg Mayer1-2/+5
already #defined to 1, so this would create a warning/error. svn path=/trunk/; revision=21508
2007-03-28Remove almost all of the casts I committed recently and in place ofStephen Fisher1-3/+3
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it. svn path=/trunk/; revision=21253
2007-03-23Fix about 150 warnings new to gcc 4.0 in the error on warning directories.Stephen Fisher1-3/+3
Comment out -Werror in plugins/asn1/ until warnings can be fixed. svn path=/trunk/; revision=21158
2007-03-21fix MSVC warnings of / and set CFLAGS to block new warningsUlf Lamping1-1/+1
svn path=/trunk/; revision=21098
2006-05-28Ethereal->WiresharkAnders Broman1-1/+1
svn path=/trunk/; revision=18235
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-03-01"help()" really just prints a usage message; it's not a full-blown helpGuy Harris1-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. svn path=/trunk/; revision=17431
2006-01-11update usage textUlf Lamping1-44/+55
svn path=/trunk/; revision=16999
2005-07-23More 'char*' -> 'const char*' changes to fix warnings.Jörg Mayer1-4/+4
svn path=/trunk/; revision=15015
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-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. svn path=/trunk/; revision=11400
2004-07-04fix a typo in the help text.Michael Tüxen1-2/+2
svn path=/trunk/; revision=11311
2004-01-06Add some sanity checking for the "-i" argument.Guy Harris1-3/+5
svn path=/trunk/; revision=9573
2004-01-05removed some MSVC warnings (level 3)Ulf Lamping1-4/+4
svn path=/trunk/; revision=9561
2003-12-21Compiling with -pedantic:Jörg Mayer1-2/+2
warning: comma at end of enumerator list svn path=/trunk/; revision=9383
2003-04-27From Matthijs Melchior:Guy Harris1-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 .... svn path=/trunk/; revision=7571
2003-02-27From Jason Copenhaver: put the address fields in the Ethernet header inGuy Harris1-2/+2
the right order. svn path=/trunk/; revision=7208
2002-10-17Don't use "unsigned long" when you mean "unsigned 32-bit integer", asGuy Harris1-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. svn path=/trunk/; revision=6445
2002-10-10Increase addr outside of macroJörg Mayer1-2/+3
svn path=/trunk/; revision=6393
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-132/+132
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-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. svn path=/trunk/; revision=5932
2002-07-21"yyin" is from lex/flex, so it should be "extern", not "static" - weGuy Harris1-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. svn path=/trunk/; revision=5899
2002-07-15From Joerg Mayer:Guy Harris1-10/+9
Replace our own definitions of TRUE/FALSE by their glib.h equivalents. Put sys/types.h into ifdefs. svn path=/trunk/; revision=5880
2002-06-30From Joerg Mayer: add some missing static declarations.Guy Harris1-41/+41
svn path=/trunk/; revision=5806
2002-06-23WinPcap 2.3's <pcap.h> includes <packet32.h>, and WinPcap 2.3'sGuy Harris1-3/+3
<packet32.h> includes <winsock2.h>; we include that rather than <winsock.h>, to avoid errors due to conflicting declarations in <winsock.h> and <winsock2.h>. svn path=/trunk/; revision=5742
2002-04-15From Michael Tuexen:Guy Harris1-6/+22
- support for current SCTP checksum - fix a bug for the -S parameter - fix a bug in the displayed output for the TSN and PPI. svn path=/trunk/; revision=5169
2002-04-13From Michael Tuexen:Guy Harris1-8/+44
The -S option has been changed such that the payload protocol identifier can be specified instead of the verification tag. The error messages for -s -S have been corrected. Update the text2pcap man page to reflect the "-S" change. svn path=/trunk/; revision=5150
2002-01-30Try defining just _USE_XOPEN and see if that gets "strptime()" declaredGuy Harris1-16/+1
on most platforms; it works on Solaris, at least. svn path=/trunk/; revision=4630
2002-01-30Alas, on Solaris, defining _XOPEN_SOURCE causes some things not in theGuy Harris1-1/+13
X/Open specs *not* to be defined, so we also have to define __EXTENSIONS__. XXX - can we just define __USE_XOPEN, and not define _XOPEN_SOURCE? Is that sufficient to get "strptime()" declared on all platforms? svn path=/trunk/; revision=4629
2002-01-29Use:Gilbert Ramirez1-1/+12
#ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE 500 #endif #define __USE_XOPEN #include <time.h> to get strptime() declared in time.h on various systems. I hope this helps more than it hurts. svn path=/trunk/; revision=4624
2002-01-23From Hamish Moffatt: set the year to 1970 before parsing the date, inGuy Harris1-2/+14
case there's no date specified. Set the day-of-month to 1, as well, and set the "is DST" flag to "not known", i.e. -1. svn path=/trunk/; revision=4602
2002-01-20From Michael Tuexen:Guy Harris1-14/+167
put a CRC32C checksum into the header of SCTP packets; add a new "-S" option that is similar to "-s" but that also includes the DATA chunk header, for input files that contain only SCTP payloads. svn path=/trunk/; revision=4580
2002-01-16SCTP support in text2pcap, and fix to usage message for "-u", fromGuy Harris1-28/+92
Michael Tuexen. Documentation of SCTP support in text2pcap, from me. svn path=/trunk/; revision=4553
2001-11-24Fix the usage message and man page for text2pcap.Guy Harris1-10/+16
svn path=/trunk/; revision=4254
2001-11-24Support for time stamping packets in text2pcap, from Gordon McKinney.Guy Harris1-7/+150
svn path=/trunk/; revision=4252
2001-11-24Fix the return value of a routine.Guy Harris1-2/+2
svn path=/trunk/; revision=4251
2001-11-24If the expected "next offset" doesn't match the offset we read, it mayGuy Harris1-18/+36
merely mean that we mistakenly treated stuff from the text-dump part of the file we're reading as if it were hex byte data (e.g., if the first non-white-space part of the text dump was a 2-digit hex number). If the offset we read is less than the expected next offset, assume that's the problem, and throw away enough extra bytes to make the offset we read the expected next offset. "getopt()" will never, for any option that the "getopt()" string says takes an argument, leave "optarg" null; if no argument was specified, it'll return an error, so there's no need to check for a null "optarg". svn path=/trunk/; revision=4250