Commit Graph

249 Commits

Author SHA1 Message Date
Michael Tüxen 4abfc13149 Clear preamble if no timespec is given.
svn path=/trunk/; revision=46738
2012-12-25 17:45:04 +00:00
Michael Tüxen f8d48662c8 Add support of -m option for SCTP.
svn path=/trunk/; revision=46737
2012-12-25 17:32:30 +00:00
Michael Tüxen dcd2b0614b Fix SCTP packet generation if DATA chunk headers need
to be generated.

svn path=/trunk/; revision=46736
2012-12-25 14:34:24 +00:00
Michael Tüxen 4aa19ce98f Fix bugs I introduced. Now
od -Ax -tx1 -v stream | text2pcap -m1460 -T1234,1234 - stream.pcap
does work again.

svn path=/trunk/; revision=46734
2012-12-25 12:02:39 +00:00
Michael Tüxen d6a70b809e Improve description.
svn path=/trunk/; revision=46731
2012-12-25 10:31:21 +00:00
Michael Tüxen 644f8485da Add support for writing per packet comments when using pcapng.
Not actually used with this commit, which just brings in the
infrastructure.


svn path=/trunk/; revision=46715
2012-12-23 09:25:42 +00:00
Michael Tüxen b70c24ca79 When using pcapng, provide input file name as comment.
svn path=/trunk/; revision=46714
2012-12-23 09:00:55 +00:00
Michael Tüxen dcadf85feb Specifiy time resolution explicitly.
svn path=/trunk/; revision=46693
2012-12-22 12:35:01 +00:00
Michael Tüxen 91534394cc Fix timestamp computation when using pcapng.
svn path=/trunk/; revision=46692
2012-12-22 12:09:38 +00:00
Michael Tüxen a52b0de406 Add support for writing pcap-ng files by specifying -n as an option.
Leave pcap the default file format for now. The is should be reconsidered
before the next release as it might make sense to use pcapgn as
the default as we do for dumpcap. (We can use the -P option to allow
switching back to pcap).

svn path=/trunk/; revision=46691
2012-12-22 09:43:17 +00:00
Michael Tüxen 3039785ecb Fix a warning on Windows.
svn path=/trunk/; revision=46674
2012-12-21 14:38:00 +00:00
Michael Tüxen 2440176cab Use pcapio routines. This concludes the preperation for
adding pcapng support.

svn path=/trunk/; revision=46673
2012-12-21 14:34:26 +00:00
Michael Tüxen edc47dbf88 This should make the Linux buildbot happy.
svn path=/trunk/; revision=46670
2012-12-21 13:53:21 +00:00
Michael Tüxen 67f86530b1 Address a build issue on Windows.
svn path=/trunk/; revision=46669
2012-12-21 13:17:20 +00:00
Michael Tüxen 2dcbad6126 Build the packet to be sent completely in the buffer and
then send it out at once.
This allows the usage of routines from pcapio.

svn path=/trunk/; revision=46668
2012-12-21 13:05:43 +00:00
Michael Tüxen e8d6a3a627 Make handling of inconsistent transport layer parameters more consistent.
svn path=/trunk/; revision=46599
2012-12-18 22:29:44 +00:00
Michael Tüxen 0ba722d3bf Whitespace changes. Use consistent 4 space indent.
svn path=/trunk/; revision=46597
2012-12-18 21:52:08 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris 2d6301dd90 There's no __solaris__ predefine for Solaris; just use __sun.
svn path=/trunk/; revision=42012
2012-04-10 19:05:20 +00:00
Jeff Morriss bc465f37fc Revisit https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3161
and r39501:

Setting _XOPEN_SOURCE to 600 is only allowed on Solaris 10 if the compiler is
set to C99 mode.  Conversely (and as reported in the bug), simply defining it
(but with no value) is not allowed if the compiler *is* compiling to C99.

So, don't define _XOPEN_SOURCE at all on Solaris.  Keep defining it as 600 on
other OS's as (also) requested in that bug.

Maybe there's a cleaner way to do this but all of this is a "trickery" mess
anyway...

svn path=/trunk/; revision=41182
2012-02-24 20:33:19 +00:00
Jeff Morriss e925843f90 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3161 :
Solaris doesn't like _XOPEN_SOURCE being defined but with no value, at least
when being compiled in C99-mode.  So set it to 600 (XPG6); hopefully this
won't break any other systems.

svn path=/trunk/; revision=39501
2011-10-21 01:03:48 +00:00
Stig Bjørlykke d7f7889f0c From Peter Fales via bug 6424:
Corrected IP address with text2pcap -i option on big endian machines.

svn path=/trunk/; revision=39215
2011-10-02 13:43:57 +00:00
Stig Bjørlykke c8a187390d From Pascal Quantin via bug 1723:
Make ASCII text dump identification optional.

svn path=/trunk/; revision=38886
2011-09-05 20:03:03 +00:00
Stig Bjørlykke f27f459195 Change malloc -> g_malloc and free -> g_free.
svn path=/trunk/; revision=38884
2011-09-05 19:12:31 +00:00
Stig Bjørlykke d0f83e0d8d Yet another cast.
svn path=/trunk/; revision=38703
2011-08-24 06:57:14 +00:00
Stig Bjørlykke cf114c1124 Fix a warning by changing a pointer type.
text2pcap.c: In function ‘parse_token’:
text2pcap.c:1076: warning: cast from pointer to integer of different size
text2pcap.c:1076: warning: cast from pointer to integer of different size

svn path=/trunk/; revision=38702
2011-08-24 06:42:40 +00:00
Anders Broman 1f23674191 From Jack Yu modified by Chris Maynard:
Enhancement of text2cap for parsing flexibility.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1723

svn path=/trunk/; revision=38679
2011-08-23 04:36:37 +00:00
Bill Meier e74fe5c6ea Test return value from fwrite(); If an error occurred then exit with a message.
svn path=/trunk/; revision=38449
2011-08-10 17:15:08 +00:00
Jeff Morriss bf95c7b5e4 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608 :
getopt() can/should normally be found in unistd.h, so:

- When testing for getopt(), define that we HAVE_GETOPT instead of
  HAVE_GETOPT_H (to avoid confusion).
- Don't attempt to include getopt.h: not all OS's have it (for example,
  Solaris 9 does not).
- (All the places which need getopt already include unistd.h (if we have it).)

If this breaks things on some OS, we might need (a real) HAVE_GETOPT_H check.

svn path=/trunk/; revision=38437
2011-08-09 21:02:10 +00:00
Stig Bjørlykke 8443bbbf75 Replace all strerror() with g_strerror().
Remove our local strerror implementation.
Mark strerror as locale unsafe API.

This fixes bug 5715.

svn path=/trunk/; revision=37812
2011-06-28 09:00:11 +00:00
Gerald Combs a24687ce8e Move the Windows argument list conversion code to a common routine.
svn path=/trunk/; revision=37372
2011-05-24 00:07:56 +00:00
Michael Tüxen cbcc0f287a Fix a typo in the help message.
Reported by Matthias Wellmeyer.

svn path=/trunk/; revision=36471
2011-04-05 14:28:33 +00:00
Chris Maynard a3fe8fbd1a Fix a couple of typos.
svn path=/trunk/; revision=36410
2011-03-30 15:54:28 +00:00
Chris Maynard 9e55be72fc Wrap all text lines of help at column 80.
svn path=/trunk/; revision=36408
2011-03-30 14:44:18 +00:00
Bill Meier 31b01ae88e Don't compute each checksum twice when adding dummy headers (-u, -T, -s, -S options)
g_ntohs() & friends may be (are ?) macros and may (will ?) eval args more than once ...


svn path=/trunk/; revision=36272
2011-03-23 00:43:55 +00:00
Gerald Combs 3bc1fc3802 On Windows, convert all of our command-line arguments from UTF-16 to
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
2011-01-06 23:28:58 +00:00
Bill Meier 6e011bbf6e Change dummy MAC addresses so we don't get Wireshark expert message:
"[...] 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).

svn path=/trunk/; revision=34571
2010-10-19 16:13:48 +00:00
Jeff Morriss 47e2d75820 Move some code (including the optional objects) into libwsutil
svn path=/trunk/; revision=33012
2010-05-28 20:19:55 +00:00
Bill Meier c14b985146 From Jim Young: Include svnversion.h in capinfos and text2pcap
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
2009-12-29 16:11:43 +00:00
Stephen Fisher 772e36f433 From Jakub Zawadzki via bug #4289: (Fix for) Frame arrival times (pcap)
are 1 hour more than timestamps in txt


svn path=/trunk/; revision=31195
2009-12-08 07:12:59 +00:00
Stig Bjørlykke 98024a007f Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_H
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision.

svn path=/trunk/; revision=30370
2009-10-06 16:01:18 +00:00
Gerald Combs 1e93d53b56 Use "svn info" to fetch the version by default. Fetch the repository path as
well. Add the repository path to the version strings.

svn path=/trunk/; revision=29171
2009-07-22 23:59:15 +00:00
Bill Meier fa920e48ed Minor cleanup of "-h" output text.
svn path=/trunk/; revision=28334
2009-05-12 16:06:14 +00:00
Gerald Combs e648060f0f Fix the last(?) of the Win64 compilation problems.
svn path=/trunk/; revision=28065
2009-04-16 04:05:39 +00:00
Jeff Morriss 76037635d3 Declare ts_sec as a time_t because that's how it's used; this avoids a warning
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-09-21 14:04:41 +00:00
Guy Harris f6ab1892e6 The joys of beating header files over the head to get all the various
APIs we use declared.  We still need to define __EXTENSIONS__ on
Solaris, in order to get strptime() declared.

svn path=/trunk/; revision=25426
2008-06-04 18:05:45 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
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-22 15:46:27 +00:00
Anders Broman a814581553 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25284
2008-05-13 07:26:20 +00:00
Bill Meier 0743b6f090 "Read 1 potential packet, wrote 1 packet": use packet or packets as appropriate
svn path=/trunk/; revision=24526
2008-03-01 20:39:31 +00:00
Stig Bjørlykke 273ea4b70d From Michael McCartney (bug 2246):
Enhancement to allow dec option when parsing offset.

svn path=/trunk/; revision=24272
2008-02-05 21:31:18 +00:00
Stig Bjørlykke 47d744b59d More rewrite of prohibited APIs (sprintf, strcpy, strcat).
svn path=/trunk/; revision=24258
2008-02-03 15:38:20 +00:00
Jörg Mayer 46db55e4e7 Pavol Rusnak <stick@gk2.sk>:
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
2008-01-09 16:05:17 +00:00
Jeff Morriss 53489c8f5d A few more s/fopen/eth_fopen/
svn path=/trunk/; revision=23207
2007-10-16 15:58:25 +00:00
Bill Meier c387e3fbc9 When -t option: Use current date or time fields for unspecified fields; Fixes bug #1836.
svn path=/trunk/; revision=22916
2007-09-20 16:12:17 +00:00
Bill Meier 090d07dabd If bad date/time: use 1/1/70 00:00:00 local time; Add some addt'l output if debug option used
svn path=/trunk/; revision=22902
2007-09-18 15:30:34 +00:00
Bill Meier f891c2cc6a Output err msg if strptime fails converting input time;
svn path=/trunk/; revision=22852
2007-09-12 14:50:27 +00:00
Richard van der Hoff 80f24e2cc6 fix usage message for -o option
svn path=/trunk/; revision=22574
2007-08-21 21:25:53 +00:00
Sebastien Tandel da8eba288d set #ifndef __USE_XOPEN instead of only #ifndef
should fix rev21508

svn path=/trunk/; revision=21511
2007-04-22 21:55:39 +00:00
Jörg Mayer b16106f89f Only #deinfe __USE_XOPEN if not already defined. On my Suse 10.2 it was
already #defined to 1, so this would create a warning/error.


svn path=/trunk/; revision=21508
2007-04-22 20:04:34 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher 2896811274 Fix about 150 warnings new to gcc 4.0 in the error on warning directories.
Comment out -Werror in plugins/asn1/ until warnings can be fixed.


svn path=/trunk/; revision=21158
2007-03-23 22:49:23 +00:00
Ulf Lamping 45c8c7a843 fix MSVC warnings of / and set CFLAGS to block new warnings
svn path=/trunk/; revision=21098
2007-03-21 23:14:23 +00:00
Anders Broman f68d6e4c8c Ethereal->Wireshark
svn path=/trunk/; revision=18235
2006-05-28 20:28:20 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Guy Harris 4ed66d9779 "help()" really just prints a usage message; it's not a full-blown help
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-03-01 00:11:16 +00:00
Ulf Lamping 7a0e7d12d2 update usage text
svn path=/trunk/; revision=16999
2006-01-11 10:14:32 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
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-18 00:24:25 +00:00
Michael Tüxen ef36256855 fix a typo in the help text.
svn path=/trunk/; revision=11311
2004-07-04 17:36:53 +00:00
Guy Harris 5887d3d5f9 Add some sanity checking for the "-i" argument.
svn path=/trunk/; revision=9573
2004-01-06 02:58:20 +00:00
Ulf Lamping 0d9679de8d removed some MSVC warnings (level 3)
svn path=/trunk/; revision=9561
2004-01-05 19:31:44 +00:00
Jörg Mayer 3f020f582e Compiling with -pedantic:
warning: comma at end of enumerator list

svn path=/trunk/; revision=9383
2003-12-21 04:31:58 +00:00
Guy Harris 6df423d0be From Matthijs Melchior:
-  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-04-27 00:41:52 +00:00
Guy Harris 1697aac429 From Jason Copenhaver: put the address fields in the Ethernet header in
the right order.

svn path=/trunk/; revision=7208
2003-02-27 02:31:00 +00:00
Guy Harris 0bba015d3e Don't use "unsigned long" when you mean "unsigned 32-bit integer", as
"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-17 20:02:00 +00:00
Jörg Mayer 6859b2caa6 Increase addr outside of macro
svn path=/trunk/; revision=6393
2002-10-10 01:45:25 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
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-08-02 23:36:07 +00:00
Guy Harris 73a4f43644 "yyin" is from lex/flex, so it should be "extern", not "static" - we
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-21 20:27:30 +00:00
Guy Harris e0dc69929e From Joerg Mayer:
Replace our own definitions of TRUE/FALSE by their glib.h
	equivalents.  Put sys/types.h into ifdefs.

svn path=/trunk/; revision=5880
2002-07-15 20:57:13 +00:00
Guy Harris ac444e6b9d From Joerg Mayer: add some missing static declarations.
svn path=/trunk/; revision=5806
2002-06-30 20:28:54 +00:00
Guy Harris 73ef5a2753 WinPcap 2.3's <pcap.h> includes <packet32.h>, and WinPcap 2.3's
<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-06-23 10:32:36 +00:00
Guy Harris 693bcba7cb From Michael Tuexen:
- 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-15 21:53:55 +00:00
Guy Harris c3b66ffa9c From Michael Tuexen:
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-04-13 18:36:24 +00:00
Guy Harris 7b4403d361 Try defining just _USE_XOPEN and see if that gets "strptime()" declared
on most platforms; it works on Solaris, at least.

svn path=/trunk/; revision=4630
2002-01-30 10:19:44 +00:00
Guy Harris e6f24ee951 Alas, on Solaris, defining _XOPEN_SOURCE causes some things not in the
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-30 10:10:03 +00:00
Gilbert Ramirez 147b9e8d52 Use:
#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-29 22:57:31 +00:00
Guy Harris 33a5bc4772 From Hamish Moffatt: set the year to 1970 before parsing the date, in
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-23 08:35:17 +00:00
Guy Harris 287425df9c From Michael Tuexen:
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-20 22:36:03 +00:00
Guy Harris 4deaae7705 SCTP support in text2pcap, and fix to usage message for "-u", from
Michael Tuexen.

Documentation of SCTP support in text2pcap, from me.

svn path=/trunk/; revision=4553
2002-01-16 21:05:10 +00:00
Guy Harris 3ee8a76475 Fix the usage message and man page for text2pcap.
svn path=/trunk/; revision=4254
2001-11-24 08:59:39 +00:00
Guy Harris c871a24514 Support for time stamping packets in text2pcap, from Gordon McKinney.
svn path=/trunk/; revision=4252
2001-11-24 08:14:12 +00:00
Guy Harris 73fc903278 Fix the return value of a routine.
svn path=/trunk/; revision=4251
2001-11-24 07:55:07 +00:00
Guy Harris f84bce97cc If the expected "next offset" doesn't match the offset we read, it may
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
2001-11-24 07:52:05 +00:00
Guy Harris 97a90e0f6c "getopt()" doesn't support multiple option arguments to a flag; have
"-u" take a single argument with two port numbers separated by a comma.

svn path=/trunk/; revision=3802
2001-08-01 03:22:15 +00:00
Guy Harris f7b50ca754 From Joerg Mayer:
* gcc 3.0 warning fixes:
  - text2pcap.c: The number of characters to scan should probably not be 0
  - wiretap/csids.c: using preincrement on a variable used on both
    sides of an assignment might be undefined by the C99(?) standard
 * turn on additional warnings for epan and wiretap too
  - epan/configure.in
  - wiretap/configure.in
 * Fix some warnings (missing includes, signed/unsigned, missing
    initializers) found by turning on the warnings
  - all other files :-)

svn path=/trunk/; revision=3709
2001-07-13 00:55:58 +00:00
Guy Harris 1caea2c361 Build text2pcap on Windows.
Fix text2pcap.c so that it can be compiled with Microsoft Visual C++
6.0:

	protect some includes with #ifdefs, as not all the header files
	in question exist in the MSVC++ build environment;

	include <winsock.h> if we have it, to declare "ntohs()" and the
	like;

	include "getopt.h" if we need it, to declare stuff for
	"getopt()";

	include "config.h" if we have it, so we know whether the header
	files in question exist or are needed;

	rename "BYTE" to "READ_BYTE", as <winsock.h> defines BYTE as
	well, and that definition causes a conflict;

	get rid of references to "__FUNCTION__", as MSVC++ doesn't
	define it (I suspect at least some UNIX compilers don't define
	it, either).

svn path=/trunk/; revision=3428
2001-05-21 03:17:14 +00:00
Ashok Narayanan 2914e81177 Added 'text2pcap', a utility to convert text hexdumps into pcap
files. See text2pcap.1 (built from doc/text2pcap.pod) for details.

Changed 'tethereal -x' output to match hex dump format of text2pcap,
Ethereal and others.

svn path=/trunk/; revision=3421
2001-05-16 21:32:05 +00:00