Commit Graph

1773 Commits

Author SHA1 Message Date
Anders Broman e15692be8a From Jose Pedro Oliveira: Corrects several 'wdh->bytes_dumped += ...' lines. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6718
svn path=/trunk/; revision=41443
2012-03-09 04:50:43 +00:00
Anders Broman cd2c726c8c The User & Network direction is reversed https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6656
svn path=/trunk/; revision=41402
2012-03-07 17:02:27 +00:00
Anders Broman 1b25b08a0f From Martin Kaiser: correct sorting for wiretap's file type list
svn path=/trunk/; revision=41387
2012-03-07 08:03:42 +00:00
Anders Broman 7fba54762b From Mike Wakerly: Add wiretap suport for LINKTYPE_NFC_LLCP
svn path=/trunk/; revision=41368
2012-03-06 09:02:06 +00:00
Anders Broman ddd69f4775 Use correct lenght when writing if_filter_str.
svn path=/trunk/; revision=41352
2012-03-05 09:32:21 +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 995e10ef36 From Martin Kaiser:
wiretap mpeg2 ts: eof vs short read
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6909

svn path=/trunk/; revision=41350
2012-03-05 08:34:36 +00:00
Anders Broman 4db442ab90 From Martin Kaiser:
wiretap mpeg2 ts: more thorough check for sync byte.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6908

svn path=/trunk/; revision=41349
2012-03-05 08:30:39 +00:00
Guy Harris 732de9018d Squelch a can't-really-happen uninitialized reference warning.
svn path=/trunk/; revision=41342
2012-03-04 20:49:17 +00:00
Anders Broman 7348837ccd Use parentheses
svn path=/trunk/; revision=41341
2012-03-04 19:31:33 +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
Guy Harris aa974fda50 Make sure all names in NRB records are null-terminated; report an error
if they're not.  Also report an error for zero-length names.

Handle multiple names per IP address - the pcap-NG spec says "one or
more zero-terminated strings containing the DNS entries for that
address."

Use a Buffer to hold NRB records, so there's no maximum size (well,
there is a maximum size, because the record length is 16 bits, but let's
not allocate 64KiB on the stack if we don't have to).

svn path=/trunk/; revision=41332
2012-03-04 02:20:25 +00:00
Anders Broman ad6640344f From Jose Pedro Oliveira: Fix typos
svn path=/trunk/; revision=41330
2012-03-03 16:17:20 +00:00
Guy Harris b18a5f9805 Don't look at the interface_id field of the packet header if
WTAP_HAS_INTERFACE_ID isn't set in the presence flags.

svn path=/trunk/; revision=41327
2012-03-03 00:13:25 +00:00
Guy Harris 57839d9e4a Flag mp2t file as really having only relative time stamps. Put the
comment on its own line in mpeg.c as well.

svn path=/trunk/; revision=41294
2012-03-02 10:17:36 +00:00
Guy Harris 0475f29216 The additional_file_extensions member of struct file_type_info need not
and should not contain the extension in the default_file_extension
member - that's why the name starts with "additional".

svn path=/trunk/; revision=41293
2012-03-02 10:09:23 +00:00
Guy Harris 17dff5f3c4 Get rid of no-longer-needed argument to pcapng_write_section_header_block().
svn path=/trunk/; revision=41292
2012-03-02 09:38:43 +00:00
Guy Harris 10337e0ca4 Skip an intermediating wtapng_block_t in the code path to write
Interface Description Blocks.

Fix a typo (if_fcslen was meant rather than opt_comment when writing the
FCS length).

svn path=/trunk/; revision=41291
2012-03-02 09:30:10 +00:00
Guy Harris 334a807e14 Simplify the code path for writing pcap-NG packets, and remove some
no-longer-needed elements from the wtapng_packet_t structure.

svn path=/trunk/; revision=41289
2012-03-02 09:03:26 +00:00
Anders Broman e82ad19e58 From Weston Schmidt: Add mpeg-ts capture file format support. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6894
svn path=/trunk/; revision=41286
2012-03-02 06:02:28 +00:00
Guy Harris 44528a6437 Fill in the wtap_pkthdr fields in pcap_read_packet_block() and
pcap_read_simple_packet_block(), not in pcap_read() - the way the fields
are filled in differs between simple and non-simple packet blocks.

Clean up white space.

svn path=/trunk/; revision=41284
2012-03-02 05:03:06 +00:00
Bill Meier f2c1c108f5 AFAIKT there's no reason to #include <wsutil/crc32.c>; Include crc32.h like everyone else...
Also: Do some whitespace and indentation cleanup.

svn path=/trunk/; revision=41281
2012-03-02 00:31:30 +00:00
Michael Tüxen 59dee69a95 Fix CID 1385.
svn path=/trunk/; revision=41264
2012-03-01 14:57:14 +00:00
Michael Tüxen 3bd0e0be10 Fix CID 354.
svn path=/trunk/; revision=41263
2012-03-01 14:51:26 +00:00
Anders Broman ffbba61fdf Read the complete NRB.
#Backport

svn path=/trunk/; revision=41259
2012-03-01 13:31:40 +00:00
Anders Broman cc9bcfb068 Add debuginfo
svn path=/trunk/; revision=41258
2012-03-01 10:13:02 +00:00
Anders Broman 23ec82fae9 From Reinhard Speyerer: Adding support for LINKTYPE_PPP_ETHER/DLT_PPP_ETHER
svn path=/trunk/; revision=41256
2012-03-01 07:39:54 +00:00
Anders Broman d24fad6371 - Add a LED in the statusbar to indicate that capture comments exists,
clickable to open an edit window.
- Add checks for NULL pointers.

Help with a different color LED possibly with Jeff's (c) in it apreceated.
Should the LED be placed elsewhere or the whole thing done differently?

svn path=/trunk/; revision=41242
2012-02-29 16:51:32 +00:00
Guy Harris 76652d9d4a Some more details about REC_HEADER1 and REC_V2DESC; REC_HEADER1 doesn't
appear to contain anything of use to us - too random - but REC_V2DESC
might be worth converting into a comment.

svn path=/trunk/; revision=41215
2012-02-28 01:11:11 +00:00
Anders Broman 38c69c8431 Make it possible to edit capture comments
svn path=/trunk/; revision=41193
2012-02-26 17:04:28 +00:00
Guy Harris 83bf13e1e6 For LANalyzer files, make the "File type name" be the file comment.
Display the file comment in the Summary dialog.

svn path=/trunk/; revision=41188
2012-02-26 10:20:40 +00:00
Guy Harris b6ff142f60 Add a presence flag field to the packet information structure filled in
by Wiretap, to indicate whether certain fields in that structure
actually have data in them.

Use the "time stamp present" flag to omit showing time stamp information
for packets (and "packets") that don't have time stamps; don't bother
working very hard to "fake" a time stamp for data files.

Use the "interface ID present" flag to omit the interface ID for packets
that don't have an interface ID.

We don't use the "captured length, separate from packet length, present"
flag to omit the captured length; that flag might be present but equal
to the packet length, and if you want to know if a packet was cut short
by a snapshot length, comparing the values would be the way to do that.

More work is needed to have wiretap/pcapng.c properly report the flags,
e.g. reporting no time stamp being present for a Simple Packet Block.

svn path=/trunk/; revision=41185
2012-02-25 23:24:34 +00:00
Bill Meier 605dea0486 CVARSDLL hasn't been used (is undefined) for a while....
svn path=/trunk/; revision=41180
2012-02-24 16:23:38 +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 c14dbfc465 Fix a typo.
svn path=/trunk/; revision=41178
2012-02-24 15:53:00 +00:00
Michael Tüxen 525df25b7f No debug output, please.
svn path=/trunk/; revision=41165
2012-02-23 19:14:58 +00:00
Michael Tüxen 2b3cd82cb1 interface id is 32-bit, not 64-bit.
svn path=/trunk/; revision=41159
2012-02-23 11:55:24 +00:00
Guy Harris b6330fc765 Do a check of the block total length in pcapng_read_unknown_block().
That means we don't need to do the block length check in
pcapng_read_block(); each block type reader, including the one for
unknown block types, does a check that's as stringent as that block
length check or more stringent, which means any block whose length is
less than the minimum will fail with the same error in both cases.

Fix the message for a too-short NRB.

svn path=/trunk/; revision=41152
2012-02-23 10:03:16 +00:00
Guy Harris 4bf0c5bf5b Fix typo introduced by previous checkin.
svn path=/trunk/; revision=41145
2012-02-22 23:44:25 +00:00
Guy Harris 3b262a0621 Add sanity checks to make sure the claimed block size is big enough to:
1) contain the block length fields and block type field;

	2) contain that plus the fixed-length portion of the block;

	3) for blocks that have a variable-length portion other than the
	   options, contain that variable-length portion.

Fixes a crash we're seeing with a bad pcap-NG file in the Wireshark
menagerie (7799-lastPacketWithoutComment.pcapng - the last packet's
block length is 128, but it claims to have 98 bytes of packet data,
which requires a 132-byte block).

Clean up white space (use 8-space tabs).

svn path=/trunk/; revision=41143
2012-02-22 18:32:43 +00:00
Anders Broman ace4d65e47 Grr forgot debug flag - again.
svn path=/trunk/; revision=41140
2012-02-22 16:02:38 +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
Guy Harris 46cb65974b Handle the case where there are no IDBs before the first non-SHB/non-IDB
block, which could be the case even in a *valid* file (consider a file
with an SHB, an NRB, an IDB, and a packet block, in that order); even if
there's no IDB before the first packet block, that should be reported to
the user as "interface N not less than interface count M", to more
precisely indicate the problem.

(Yes, the loop should probably keep going until it finds a packet block,
not just a non-IDB block.)

svn path=/trunk/; revision=41132
2012-02-22 03:03:34 +00:00
Michael Tüxen b85f69ebde Fix bugs which resulted in the buildbot errors.
svn path=/trunk/; revision=41126
2012-02-21 20:37:22 +00:00
Michael Tüxen 2764d9977b Use wtap_dump_open_ng() in tshark.
svn path=/trunk/; revision=41123
2012-02-21 17:19:45 +00:00
Michael Tüxen 660a348df1 When saving a file and the are no IDBs, create a default one.
This seems right, but doesn't make the buildbots happy, because
a read pcap file is reported a per packet encaps...

svn path=/trunk/; revision=41121
2012-02-21 16:51:23 +00:00
Michael Tüxen 4ea2838bdb Disable debug output...
svn path=/trunk/; revision=41119
2012-02-21 16:33:33 +00:00
Michael Tüxen 877edcc89d When writing an option in an IDB, also write an endofoption option.
Use (consistently) 0 as the default for the interface speed.
While there, do some whitespace cleanups.

svn path=/trunk/; revision=41118
2012-02-21 16:32:25 +00:00
Michael Tüxen 822782f7c4 Improve the error handling.
svn path=/trunk/; revision=41112
2012-02-21 15:36:08 +00:00
Michael Tüxen 7d7c5ca02d Don't dereference idb_inf in wtap_dump_open_ng() when
you provide NULL when you call it via wtap_dump_open.

This does not make the buildbots happy, but at least
tshark doesn't crash anymore.

svn path=/trunk/; revision=41111
2012-02-21 15:21:01 +00:00