aboutsummaryrefslogtreecommitdiffstats
path: root/pcapio.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-02Whitespace changes. Use 8-space indents consistently.Michael Tüxen1-96/+96
svn path=/trunk/; revision=46898
2013-01-02Fix bug introduced by myself inMichael Tüxen1-1/+1
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=46592 svn path=/trunk/; revision=46897
2013-01-02Fix bug introduced in Michael Tüxen1-1/+1
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=46891 svn path=/trunk/; revision=46896
2013-01-02Use consistent indentation.Michael Tüxen1-18/+18
svn path=/trunk/; revision=46894
2013-01-02Cast size_t to something the Visual C++ CRT will accept.Gerald Combs1-13/+13
svn path=/trunk/; revision=46893
2013-01-02Allow pcap/pcapng format to be written to more than just a file (FILE*). ↵Michael Mann1-127/+198
Gives more flexibility if needed. WRITE_DATA macro replaced and applied consistently throughout pcapio.c svn path=/trunk/; revision=46891
2012-12-26Fix a bunch of warnings.Guy Harris1-50/+57
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-12-25Fix writing of PCAP-NG files when flags are provided.Michael Tüxen1-3/+0
svn path=/trunk/; revision=46742
2012-12-23Add support for writing per packet comments when using pcapng.Michael Tüxen1-2/+29
Not actually used with this commit, which just brings in the infrastructure. svn path=/trunk/; revision=46715
2012-12-20Need to include Windows.h for gettting FILETIME.Michael Tüxen1-0/+3
svn path=/trunk/; revision=46638
2012-12-20Don't use an pcap structures in pcapio.[ch]. Michael Tüxen1-24/+24
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-20Add ws_fclose(), ws_fflush(), and ws_fdopen() to the fileutils.Michael Tüxen1-35/+0
Retire libpcap_fdopen(), libpcap_dump_flush(), and libpcap_dump_close(). svn path=/trunk/; revision=46636
2012-12-19Add support for writing the flags option in the enhancedMichael Tüxen1-0/+15
packet block (pcapng). svn path=/trunk/; revision=46619
2012-12-18Simplify code.Michael Tüxen1-4/+4
svn path=/trunk/; revision=46594
2012-12-18fwrite() returns the number of objects written, not the number of bytes.Michael Tüxen1-4/+4
svn path=/trunk/; revision=46593
2012-12-18Fix sequence of parameters. The size is the second parameter of fwrite,Michael Tüxen1-4/+4
the nitems the third, not vice versa. svn path=/trunk/; revision=46592
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
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-25Allow writing ISB with given recv/drop counters.Michael Tüxen1-21/+14
No functional change by this commit. svn path=/trunk/; revision=42242
2012-04-15Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7048Michael Tüxen1-2/+12
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-03-26Fix Coverty 1392 ('name' might be NULL): don't write out the interface name ↵Jeff Morriss1-1/+1
when we're trying to write out the interface description. svn path=/trunk/; revision=41779
2012-03-20To be consistent with the wiretap API don't null terminate the counted strings.Anders Broman1-49/+49
svn path=/trunk/; revision=41682
2012-03-12From Jose Pedro Oliveira:Anders Broman1-530/+530
Enforce the modelines in dumpcap.c and in pcapio.c svn path=/trunk/; revision=41505
2012-03-12From Jose Pedro Oliveira: Add ModlinesAnders Broman1-0/+13
svn path=/trunk/; revision=41496
2012-03-10In pcapng.c use the units per second value from the interface instead ofGerald Combs1-3/+4
the default. Add support for reading nseclibpcap files to dumpcap. svn path=/trunk/; revision=41455
2012-03-09From Jose Pedro Oliveira:Anders Broman1-42/+43
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-06Add a note about using GetSystemTimePreciseAsFileTime.Gerald Combs1-3/+6
svn path=/trunk/; revision=41382
2012-03-05Fix calculation of pading for if_filter_str.Anders Broman1-3/+3
svn path=/trunk/; revision=41351
2012-03-04if_filter isn't a string per se,The first byte of the Option Data keeps a ↵Anders Broman1-3/+8
code of the filter used svn path=/trunk/; revision=41339
2012-02-25From Jose Pedro Oliveira: pcapio is writing the if_speed value in the ↵Anders Broman1-1/+1
IDB_TSRESOL optiones svn path=/trunk/; revision=41184
2012-02-24Fix a typo and revert previous.Anders Broman1-1/+1
svn path=/trunk/; revision=41179
2012-02-22- Write ISB(s) at start and end of capture.Anders Broman1-4/+2
- Read all options. - Prepare to write ISB. svn path=/trunk/; revision=41137
2012-02-22Expand the API for ISB:sAnders Broman1-4/+60
svn path=/trunk/; revision=41136
2012-02-21Correctly write os string...Michael Tüxen1-2/+2
svn path=/trunk/; revision=41125
2012-02-21Whitespace changes.Michael Tüxen1-2/+2
svn path=/trunk/; revision=41117
2012-02-21Whitespace changes.Michael Tüxen1-10/+10
svn path=/trunk/; revision=41113
2012-02-21Use tab indentation as elsewhere in the files.Michael Tüxen1-148/+156
Only whitespace changes. svn path=/trunk/; revision=41110
2012-02-21Check if the string exists first.Anders Broman1-10/+10
svn path=/trunk/; revision=41109
2012-02-21Extend libpcap_write_interface_description_block() wiyh more optionsAnders Broman1-67/+162
all exept os curently unused. svn path=/trunk/; revision=41108
2012-02-14From Anders: Add support for options in the SHB.Michael Tüxen1-6/+65
From me: Some whitespace changes. svn path=/trunk/; revision=41026
2012-01-10From Jose Pedro Oliveira via ↵Alexis La Goutte1-2/+2
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
2011-06-15Constify some arguments.Guy Harris1-3/+3
svn path=/trunk/; revision=37674
2011-03-21Don't close file handle if a file write error; (caller does the close)Bill Meier1-6/+5
Fixes "USE_AFTER_FREE" defect reported by Coverity Prevent. svn path=/trunk/; revision=36226
2009-04-27Fix a comment.Michael Tüxen1-1/+1
svn path=/trunk/; revision=28174
2009-04-27Use GLib's G_MAXUINT16 as the largest value that fits in a guint16.Guy Harris1-11/+10
svn path=/trunk/; revision=28172
2009-04-27Improve handling of strings longer than 64KB.Michael Tüxen1-26/+37
svn path=/trunk/; revision=28169
2009-04-27Trying to make the Windows compiler happy.Michael Tüxen1-2/+2
svn path=/trunk/; revision=28168
2009-04-26More casts to deal with 64-bit size_t.Guy Harris1-4/+6
svn path=/trunk/; revision=28167
2009-04-26Cast both parts of a FILETIME to guint32, as I think DWORD is signed.Guy Harris1-1/+5
svn path=/trunk/; revision=28166
2009-04-26Add code that should work on Windows to get current time as microsecondsGuy Harris1-2/+29
since January 1, 1970, 00:00:00 UTC. svn path=/trunk/; revision=28165