aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-25Clear preamble if no timespec is given.Michael Tüxen1-1/+4
svn path=/trunk/; revision=46738
2012-12-25Add support of -m option for SCTP.Michael Tüxen1-12/+23
svn path=/trunk/; revision=46737
2012-12-25Fix SCTP packet generation if DATA chunk headers needMichael Tüxen1-11/+18
to be generated. svn path=/trunk/; revision=46736
2012-12-25Fix bugs I introduced. NowMichael Tüxen1-6/+6
od -Ax -tx1 -v stream | text2pcap -m1460 -T1234,1234 - stream.pcap does work again. svn path=/trunk/; revision=46734
2012-12-25Improve description.Michael Tüxen1-1/+1
svn path=/trunk/; revision=46731
2012-12-23Add support for writing per packet comments when using pcapng.Michael Tüxen1-0/+1
Not actually used with this commit, which just brings in the infrastructure. svn path=/trunk/; revision=46715
2012-12-23When using pcapng, provide input file name as comment.Michael Tüxen1-3/+4
svn path=/trunk/; revision=46714
2012-12-22Specifiy time resolution explicitly.Michael Tüxen1-1/+1
svn path=/trunk/; revision=46693
2012-12-22Fix timestamp computation when using pcapng.Michael Tüxen1-2/+2
svn path=/trunk/; revision=46692
2012-12-22Add support for writing pcap-ng files by specifying -n as an option.Michael Tüxen1-9/+89
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-21Fix a warning on Windows.Michael Tüxen1-1/+1
svn path=/trunk/; revision=46674
2012-12-21Use pcapio routines. This concludes the preperation forMichael Tüxen1-30/+16
adding pcapng support. svn path=/trunk/; revision=46673
2012-12-21This should make the Linux buildbot happy.Michael Tüxen1-1/+1
svn path=/trunk/; revision=46670
2012-12-21Address a build issue on Windows.Michael Tüxen1-2/+2
svn path=/trunk/; revision=46669
2012-12-21Build the packet to be sent completely in the buffer andMichael Tüxen1-94/+134
then send it out at once. This allows the usage of routines from pcapio. svn path=/trunk/; revision=46668
2012-12-18Make handling of inconsistent transport layer parameters more consistent.Michael Tüxen1-2/+11
svn path=/trunk/; revision=46599
2012-12-18Whitespace changes. Use consistent 4 space indent.Michael Tüxen1-159/+156
svn path=/trunk/; revision=46597
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45015
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-04-10There's no __solaris__ predefine for Solaris; just use __sun.Guy Harris1-1/+1
svn path=/trunk/; revision=42012
2012-02-24Revisit https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3161Jeff Morriss1-1/+3
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
2011-10-21Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3161 :Jeff Morriss1-7/+7
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-02From Peter Fales via bug 6424:Stig Bjørlykke1-1/+7
Corrected IP address with text2pcap -i option on big endian machines. svn path=/trunk/; revision=39215
2011-09-05From Pascal Quantin via bug 1723:Stig Bjørlykke1-43/+57
Make ASCII text dump identification optional. svn path=/trunk/; revision=38886
2011-09-05Change malloc -> g_malloc and free -> g_free.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=38884
2011-08-24Yet another cast.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=38703
2011-08-24Fix a warning by changing a pointer type.Stig Bjørlykke1-2/+2
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-23From Jack Yu modified by Chris Maynard:Anders Broman1-4/+81
Enhancement of text2cap for parsing flexibility. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1723 svn path=/trunk/; revision=38679
2011-08-10Test return value from fwrite(); If an error occurred then exit with a message.Bill Meier1-10/+31
svn path=/trunk/; revision=38449
2011-08-09Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608 :Jeff Morriss1-3/+1
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-06-28Replace all strerror() with g_strerror().Stig Bjørlykke1-2/+2
Remove our local strerror implementation. Mark strerror as locale unsafe API. This fixes bug 5715. svn path=/trunk/; revision=37812
2011-05-24Move the Windows argument list conversion code to a common routine.Gerald Combs1-13/+2
svn path=/trunk/; revision=37372
2011-04-05Fix a typo in the help message.Michael Tüxen1-1/+1
Reported by Matthias Wellmeyer. svn path=/trunk/; revision=36471
2011-03-30Fix a couple of typos.Chris Maynard1-2/+2
svn path=/trunk/; revision=36410
2011-03-30Wrap all text lines of help at column 80.Chris Maynard1-5/+7
svn path=/trunk/; revision=36408
2011-03-23Don't compute each checksum twice when adding dummy headers (-u, -T, -s, -S ↵Bill Meier1-15/+31
options) g_ntohs() & friends may be (are ?) macros and may (will ?) eval args more than once ... svn path=/trunk/; revision=36272
2011-01-06On Windows, convert all of our command-line arguments from UTF-16 toGerald Combs1-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. svn path=/trunk/; revision=35411
2010-10-19Change dummy MAC addresses so we don't get Wireshark expert message:Bill Meier1-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). svn path=/trunk/; revision=34571
2010-05-28Move some code (including the optional objects) into libwsutilJeff Morriss1-3/+3
svn path=/trunk/; revision=33012
2009-12-29From Jim Young: Include svnversion.h in capinfos and text2pcapBill Meier1-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) svn path=/trunk/; revision=31382
2009-12-08From Jakub Zawadzki via bug #4289: (Fix for) Frame arrival times (pcap)Stephen Fisher1-0/+1
are 1 hour more than timestamps in txt svn path=/trunk/; revision=31195
2009-10-06Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_HStig Bjørlykke1-2/+4
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision. svn path=/trunk/; revision=30370
2009-07-22Use "svn info" to fetch the version by default. Fetch the repository path asGerald Combs1-1/+1
well. Add the repository path to the version strings. svn path=/trunk/; revision=29171
2009-05-12Minor cleanup of "-h" output text.Bill Meier1-23/+27
svn path=/trunk/; revision=28334
2009-04-16Fix the last(?) of the Win64 compilation problems.Gerald Combs1-2/+2
svn path=/trunk/; revision=28065
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