Michael Tüxen
01d97c7ee1
Fix writing of PCAP-NG files when flags are provided.
...
svn path=/trunk/; revision=46742
2012-12-25 22:25:40 +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
197ac6704d
Need to include Windows.h for gettting FILETIME.
...
svn path=/trunk/; revision=46638
2012-12-20 15:40:28 +00:00
Michael Tüxen
9a2f4c8e9d
Don't use an pcap structures in pcapio.[ch].
...
Currently, pcapio is only used by dumpcap, which is only compiled
if there is pcap support. However, making pcapio independent from
libpcap allows it also to be used from text2pcap, which does not
rely on libpcap.
svn path=/trunk/; revision=46637
2012-12-20 15:20:10 +00:00
Michael Tüxen
7e84abf005
Add ws_fclose(), ws_fflush(), and ws_fdopen() to the fileutils.
...
Retire libpcap_fdopen(), libpcap_dump_flush(), and libpcap_dump_close().
svn path=/trunk/; revision=46636
2012-12-20 14:53:09 +00:00
Michael Tüxen
10dbe80c65
Add support for writing the flags option in the enhanced
...
packet block (pcapng).
svn path=/trunk/; revision=46619
2012-12-19 20:27:12 +00:00
Michael Tüxen
3895df85aa
Simplify code.
...
svn path=/trunk/; revision=46594
2012-12-18 19:16:11 +00:00
Michael Tüxen
86925e10e1
fwrite() returns the number of objects written, not the number of bytes.
...
svn path=/trunk/; revision=46593
2012-12-18 19:09:27 +00:00
Michael Tüxen
f55922be77
Fix sequence of parameters. The size is the second parameter of fwrite,
...
the nitems the third, not vice versa.
svn path=/trunk/; revision=46592
2012-12-18 18:18:11 +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
Michael Tüxen
8ea1984ddc
Allow writing ISB with given recv/drop counters.
...
No functional change by this commit.
svn path=/trunk/; revision=42242
2012-04-25 20:50:38 +00:00
Michael Tüxen
bacf81ff06
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7048
...
Write timetamps for the interface statistic blocks the way specified
by http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html
svn path=/trunk/; revision=42080
2012-04-15 11:11:36 +00:00
Jeff Morriss
2256fabd86
Fix Coverty 1392 ('name' might be NULL): don't write out the interface name when we're trying to write out the interface description.
...
svn path=/trunk/; revision=41779
2012-03-26 21:57:57 +00:00
Anders Broman
237a850f84
To be consistent with the wiretap API don't null terminate the counted strings.
...
svn path=/trunk/; revision=41682
2012-03-20 11:41:58 +00:00
Anders Broman
cbde63643e
From Jose Pedro Oliveira:
...
Enforce the modelines in dumpcap.c and in pcapio.c
svn path=/trunk/; revision=41505
2012-03-12 15:40:57 +00:00
Anders Broman
8fa5ef33f9
From Jose Pedro Oliveira: Add Modlines
...
svn path=/trunk/; revision=41496
2012-03-12 06:42:47 +00:00
Gerald Combs
7a8df2f485
In pcapng.c use the units per second value from the interface instead of
...
the default.
Add support for reading nseclibpcap files to dumpcap.
svn path=/trunk/; revision=41455
2012-03-10 00:24:42 +00:00
Anders Broman
abbdb721dd
From Jose Pedro Oliveira:
...
pcapio.c: write IDB options in numeric order and corrects the IDB block_total_length.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6718
svn path=/trunk/; revision=41447
2012-03-09 11:47:55 +00:00
Gerald Combs
57eeea4b20
Add a note about using GetSystemTimePreciseAsFileTime.
...
svn path=/trunk/; revision=41382
2012-03-06 21:11:31 +00:00
Anders Broman
a20cfcc745
Fix calculation of pading for if_filter_str.
...
svn path=/trunk/; revision=41351
2012-03-05 09:21:36 +00:00
Anders Broman
971cb84877
if_filter isn't a string per se,The first byte of the Option Data keeps a code of the filter used
...
svn path=/trunk/; revision=41339
2012-03-04 19:01:14 +00:00
Anders Broman
e994e78412
From Jose Pedro Oliveira: pcapio is writing the if_speed value in the IDB_TSRESOL optiones
...
svn path=/trunk/; revision=41184
2012-02-25 08:20:50 +00:00
Anders Broman
cacbe31797
Fix a typo and revert previous.
...
svn path=/trunk/; revision=41179
2012-02-24 15:57:56 +00:00
Anders Broman
8fff390455
- Write ISB(s) at start and end of capture.
...
- Read all options.
- Prepare to write ISB.
svn path=/trunk/; revision=41137
2012-02-22 14:41:02 +00:00
Anders Broman
af2100d4c3
Expand the API for ISB:s
...
svn path=/trunk/; revision=41136
2012-02-22 10:01:16 +00:00
Michael Tüxen
28b74c5760
Correctly write os string...
...
svn path=/trunk/; revision=41125
2012-02-21 18:01:44 +00:00
Michael Tüxen
bb3a686a99
Whitespace changes.
...
svn path=/trunk/; revision=41117
2012-02-21 16:30:22 +00:00
Michael Tüxen
3806dfa6c8
Whitespace changes.
...
svn path=/trunk/; revision=41113
2012-02-21 15:38:30 +00:00
Michael Tüxen
e485ac5175
Use tab indentation as elsewhere in the files.
...
Only whitespace changes.
svn path=/trunk/; revision=41110
2012-02-21 15:16:45 +00:00
Anders Broman
3d0ac5c69a
Check if the string exists first.
...
svn path=/trunk/; revision=41109
2012-02-21 13:59:08 +00:00
Anders Broman
5df11d41bb
Extend libpcap_write_interface_description_block() wiyh more options
...
all exept os curently unused.
svn path=/trunk/; revision=41108
2012-02-21 13:35:04 +00:00
Michael Tüxen
68204c94a4
From Anders: Add support for options in the SHB.
...
From me: Some whitespace changes.
svn path=/trunk/; revision=41026
2012-02-14 17:07:52 +00:00
Alexis La Goutte
8b66d8fae7
From Jose Pedro Oliveira via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6719
...
pcapio.c: bug in libpcap_write_interface_description_block
The attached patch fixes a copy_and_paste error in the code of the function libpcap_write_interface_description_block(): strlen(name) instead of strlen(filter).
svn path=/trunk/; revision=40423
2012-01-10 13:59:27 +00:00
Guy Harris
37654b4023
Constify some arguments.
...
svn path=/trunk/; revision=37674
2011-06-15 20:13:42 +00:00
Bill Meier
f7d44fa268
Don't close file handle if a file write error; (caller does the close)
...
Fixes "USE_AFTER_FREE" defect reported by Coverity Prevent.
svn path=/trunk/; revision=36226
2011-03-21 17:07:18 +00:00
Michael Tüxen
5f96074755
Fix a comment.
...
svn path=/trunk/; revision=28174
2009-04-27 09:58:09 +00:00
Guy Harris
2b36f00d1c
Use GLib's G_MAXUINT16 as the largest value that fits in a guint16.
...
svn path=/trunk/; revision=28172
2009-04-27 08:38:58 +00:00
Michael Tüxen
6c26c204a1
Improve handling of strings longer than 64KB.
...
svn path=/trunk/; revision=28169
2009-04-27 07:12:36 +00:00
Michael Tüxen
f76f80ac31
Trying to make the Windows compiler happy.
...
svn path=/trunk/; revision=28168
2009-04-27 05:53:02 +00:00
Guy Harris
b8b67161c8
More casts to deal with 64-bit size_t.
...
svn path=/trunk/; revision=28167
2009-04-26 22:27:46 +00:00
Guy Harris
caff2f7cd4
Cast both parts of a FILETIME to guint32, as I think DWORD is signed.
...
svn path=/trunk/; revision=28166
2009-04-26 22:24:48 +00:00
Guy Harris
b6a18ad0b8
Add code that should work on Windows to get current time as microseconds
...
since January 1, 1970, 00:00:00 UTC.
svn path=/trunk/; revision=28165
2009-04-26 22:14:23 +00:00
Michael Tüxen
46e57a5574
(Try to) fix the 64-bit issues.
...
svn path=/trunk/; revision=28164
2009-04-26 21:30:40 +00:00
Michael Tüxen
fff39b54ee
Don't declare now when not used.
...
svn path=/trunk/; revision=28163
2009-04-26 20:03:16 +00:00
Michael Tüxen
120bf41606
Windows does not support gettimeofday(). Use 0 as a workaround for now.
...
svn path=/trunk/; revision=28162
2009-04-26 20:01:56 +00:00
Michael Tüxen
b09b4f4084
constify some args of libpcap_write_enhanced_packet_block()
...
similar to libpcap_write_packet().
svn path=/trunk/; revision=28161
2009-04-26 19:24:36 +00:00
Michael Tüxen
16027310e0
Fix names.
...
svn path=/trunk/; revision=28160
2009-04-26 19:16:54 +00:00
Michael Tüxen
b23f4a90fd
Add functions to write several pcapng blocks.
...
svn path=/trunk/; revision=28159
2009-04-26 18:40:40 +00:00
Michael Tüxen
f5547c0d78
Make ringbuffer.[ch] file format agnostic.
...
Move write routines to dumpcap.c
This is a preparation for pcapng support.
svn path=/trunk/; revision=28155
2009-04-26 15:51:25 +00:00