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)
svn path=/trunk/; revision=31382
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
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
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
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
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
- 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
"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
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
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
<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
- 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
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
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
#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