Commit Graph

1643 Commits

Author SHA1 Message Date
Guy Harris 8c19a3441f Add an entry in encap_table_base for SocketCAN.
svn path=/trunk/; revision=33578
2010-07-18 22:14:56 +00:00
Guy Harris 9903a7853c The time delta in a NetMon frame header is signed - it can be negative.
svn path=/trunk/; revision=33576
2010-07-18 20:47:48 +00:00
Guy Harris 770dc398a4 NetMon per-packet link-layer types with 0xE000 in the upper 4 bits are
converted pcap files; the LINKTYPE_ value is in the lower 12 bits.

svn path=/trunk/; revision=33574
2010-07-18 20:27:46 +00:00
Guy Harris 6cb47bde7a Initial support for the trailer information in versions 2.1 and later of
the NetMon file format.  Currently, we just use the network type field,
and we ignore all the special record types and don't try to handle any
of the other special network types.

We also catch bogus frame tables where the record is bigger than the
frame table says it is.

svn path=/trunk/; revision=33572
2010-07-18 19:41:11 +00:00
Martin Mathieson b3f57106d4 It makes (slightly) more sense for comments to be "sent" by the context than "received".
svn path=/trunk/; revision=33552
2010-07-16 13:52:18 +00:00
Stig Bjørlykke 30f105640f Don't pass tvb data to col_set_str(), as it will not stay around.
Added support for Note (dumping as text).
Renamed Info to Power (as used in PacketLogger).

svn path=/trunk/; revision=33526
2010-07-14 20:24:38 +00:00
Gerald Combs bc9f8d0cd7 Add Visual C++ project files to the distribution.
svn path=/trunk/; revision=33386
2010-06-30 23:20:03 +00:00
Guy Harris a88d19d961 Clean up indentation.
svn path=/trunk/; revision=33118
2010-06-06 22:35:33 +00:00
Guy Harris 2206464efb Get rid of file_write(); nobody uses it, and file writers should use
wtap_dump_file_write() (it does the right error checking for you, and
returns FALSE on failure and gives you the right error code).

svn path=/trunk/; revision=33117
2010-06-06 22:24:48 +00:00
Guy Harris 194cfe2d2f Don't use fwrite directly when writing a dump file; call it through
wtap_dump_file_write().  Replace various wrappers around fwrite() with
wtap_dump_file_write(), or at least make the wrappers call
wtap_dump_file_write().

svn path=/trunk/; revision=33116
2010-06-06 22:19:30 +00:00
Guy Harris ae3049a04f Move the seekback stuff out of esc_read() to the one place where it's
done.

Use the wtap_dump_file_ routines to write out capture files, and check
for errors.

Use the phton macros, when available, to translate to big-endian byte
order.  Add a new phton24() macro.

Clean up indentation.

svn path=/trunk/; revision=33114
2010-06-06 19:37:49 +00:00
Guy Harris 1bf478fdef Rename wtap_dump_file_write_all() to wtap_dump_file_write(), and have
everybody use it; the places using the old wtap_dump_file_write() were
using it in the same way the old wtap_dump_file_write_all() did.

That also lets us get rid of wtap_dump_file_ferror().

Also, have the new wtap_dump_file_write() check for errors from
gzwrite() and fwrite() differently - the former returns 0 on error, the
latter can return a short write on error.

svn path=/trunk/; revision=33113
2010-06-06 19:14:32 +00:00
Guy Harris de4eefa3b1 From Rolf Fiedler: support for writing EyeSDN trace files.
svn path=/trunk/; revision=33107
2010-06-05 22:59:20 +00:00
Guy Harris 149ccb3b68 Attempt to handle isochronous descriptors between the 64-byte header and
the payload.  Should fix bug 4401.

svn path=/trunk/; revision=32828
2010-05-16 03:19:40 +00:00
Martin Mathieson 33dc9a3eb4 Fix non-libz build.
svn path=/trunk/; revision=32734
2010-05-10 12:56:01 +00:00
Guy Harris 31fbc9f528 Add wtap_cleareof().
svn path=/trunk/; revision=32719
2010-05-08 00:43:23 +00:00
Gerald Combs 0a209d762e Zlib has an officially-sanctioned way of clearing EOF when we're tailing
a file.  Use it.

svn path=/trunk/; revision=32716
2010-05-07 21:15:24 +00:00
Gerald Combs 52cbbd605f EOF in zlib 1.2.5 seems to be sticky. When we're tailing a file and we
reach EOF, zlib's file handle seems to stay at EOF even when more data
is appended to the file. Add a check for 1.2.5 which calls gzseek in
order to unset EOF. Fixes bugs 4708 and 4748.

svn path=/trunk/; revision=32715
2010-05-07 19:45:47 +00:00
Anders Broman a34b791645 Whitespace changes.
svn path=/trunk/; revision=32575
2010-04-27 10:35:12 +00:00
Guy Harris adf7e45432 Clean up properly if we get an error after allocating the private data
structure.

svn path=/trunk/; revision=32563
2010-04-26 02:26:22 +00:00
Guy Harris ea392ce83d A bit more information.
svn path=/trunk/; revision=32537
2010-04-22 04:50:55 +00:00
Guy Harris 53850f189a More updates to reflect all the hairy details of Linux USB capture.
svn path=/trunk/; revision=32536
2010-04-22 04:38:48 +00:00
Guy Harris c6e453d090 Update a comment to reflect recent changes and to reflect behavior of
later Linux kernels.

svn path=/trunk/; revision=32535
2010-04-22 00:10:17 +00:00
Guy Harris 21a210b777 From Chris Maynard:
Support PPP-over-USB.

	Don't remove the USB pseudo-header from the packet data for
	Linux USB packets, just byte-swap it if necessary and have the
	USB dissector fetch the pseudo-header from the raw packet data.

	Update USB language ID values.

svn path=/trunk/; revision=32534
2010-04-21 20:51:22 +00:00
Stig Bjørlykke 51af731c3a From Jakub Zawadzki:
Fix compile without zlib.

svn path=/trunk/; revision=32501
2010-04-17 10:09:52 +00:00
Stig Bjørlykke 7b1e97b64e Make it build without zlib on OSX.
svn path=/trunk/; revision=32472
2010-04-15 13:59:15 +00:00
Anders Broman 441c3f63b2 From Stephen Donnelly:
InfiniBand Link Packet (flow control) dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4656

svn path=/trunk/; revision=32425
2010-04-08 08:41:56 +00:00
Guy Harris 400d57fa2f Treat the first block we read, when opening, specially:
1) if it's not an SHB, just say "this is not a pcap-ng file",
	   don't try to process it (we can't process it, as we haven't
	   finished setting up all the state information yet);

	2) if it has the right SHB type code, but isn't a valid SHB,
	   just say "this is not a pcap-ng file".

For all other SHB's, treat anything that renders it invalid as an error.

svn path=/trunk/; revision=32393
2010-04-05 22:20:21 +00:00
Guy Harris 6ebf4bf0d2 From Robert Bullen: give the Bluetooth-H4-with-Linux-pseudo-header
encapsulation a name different from the no-pseudo-header H4
encapsulation.

svn path=/trunk/; revision=32321
2010-03-28 19:35:14 +00:00
Guy Harris 2101397e40 Update a comment to discuss how zlib and z_off_t has gotten messier lately.
svn path=/trunk/; revision=32280
2010-03-25 19:45:29 +00:00
Jörg Mayer 96779de920 cmake changes:
- Add checking for linker flags
- Install plugins with the name including the Wireshark version.
  This will make it easier to find matching plugin versions if
  files get just copied over.


svn path=/trunk/; revision=32231
2010-03-18 10:27:17 +00:00
Guy Harris c1efdf167a Fix some types, to squelch compiler warnings (this should introduce
another valid warning, if you've turned the warnings up high enough; we
need to generate a zlib version of stdout).

svn path=/trunk/; revision=32027
2010-02-27 02:23:44 +00:00
Guy Harris 17392a865a Move the definitions of all the private data structures out of
wtap-int.h, and change the unions of pointers to those private data
structures into just void *'s.

Have the generic wtap close routine free up the private data, rather
than the type-specific close routine, just as the wtap_dumper close
routine does for its private data.  Get rid of close routines that don't
do anything any more.

svn path=/trunk/; revision=32015
2010-02-26 07:59:54 +00:00
Guy Harris 207a75388a Have parse_ascend() return:
PARSED_RECORD if we got a packet;

    PARSED_NONRECORD if the parser succeeded but didn't see a packet;

    PARSE_FAILED if the parser failed.

Treat anything other than PARSED_RECORD as a failure, for now; I'm not
sure why we were treating "parser succeeded but didn't see a packet" as
success, as that was causing us to recognize some non-Ascend-output text
files as Ascend files and to return "records" with bogus caplen and len
values.

svn path=/trunk/; revision=32009
2010-02-25 20:45:59 +00:00
Guy Harris 756bf60020 Move the definition of the private data structure from wtap-int.h to the
iSeries capture processor.  Parse the start date into year/month/day at
the time we see it, rather than for every packet; that means we don't
need to allocate a buffer to hold the date as a string (a buffer which
we weren't ever freeing).

svn path=/trunk/; revision=31981
2010-02-24 08:39:19 +00:00
Guy Harris dde6d97f63 Define the private data structures for some particular capture file
types in the modules for those capture file types, not in wtap-int.h, so
wtap-int.h doesn't have to change when the code to handle that
particular capture type changes, or a new capture file type is added.
(Ultimately, we should do this for all the private data structures.)

svn path=/trunk/; revision=31974
2010-02-24 07:21:17 +00:00
Guy Harris c85899e946 Move the declarations of wtap_pcap_encap_to_wtap_encap() and
wtap_wtap_encap_to_pcap_encap() to wiretap/pcap-encap.h.  Include it
where it's needed; don't include other Wiretap headers where they're not
needed.

Include pcapng.h in pcapng.c, to declare the functions defined in
pcapng.c.  Add some casts to squelch some warnings, and add to a comment
to indicate one of the problems.

svn path=/trunk/; revision=31960
2010-02-23 03:50:42 +00:00
Guy Harris 41b012403e Squelch some compiler warnings (some of which indicate potential
problems, and some of which are, at least, incorrect casts).

svn path=/trunk/; revision=31957
2010-02-23 02:11:52 +00:00
Guy Harris 9845a10325 Don't use C++ keywords as variable names - prepend "ber_" in front of
variables with BER metadata.

svn path=/trunk/; revision=31956
2010-02-23 02:10:54 +00:00
Guy Harris dda82be58c Squelch some (valid) warnings.
svn path=/trunk/; revision=31955
2010-02-23 01:23:39 +00:00
Guy Harris 2d1e27dddb Fix cast.
svn path=/trunk/; revision=31954
2010-02-23 01:23:07 +00:00
Guy Harris ef418305f0 Attempt to squelch some compiler warnings.
svn path=/trunk/; revision=31953
2010-02-23 01:16:48 +00:00
Anders Broman 6dfde68911 From Stephen Donnelly:
Endace ATM and AAL2 enhancements.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4447

svn path=/trunk/; revision=31766
2010-02-02 04:56:39 +00:00
Anders Broman 2f6f1e48af From Tobias Witek:
Replace ERF dissector with ATM dissector for protocols 'FP Hint' and 'META'
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4384

svn path=/trunk/; revision=31761
2010-02-01 20:27:16 +00:00
Guy Harris 1c88b1f221 Fix a comment.
svn path=/trunk/; revision=31693
2010-01-27 00:35:32 +00:00
Jaap Keuter 7049fa5678 Fix for bug 4408:
Make further encapsulation determination between "VC-multiplexed PPP" and "LLC encapsulated PPP". See RFC 2364.

svn path=/trunk/; revision=31634
2010-01-23 16:45:03 +00:00
Bill Meier f1d4716d18 Fix gcc -Wshadow warnings ....
svn path=/trunk/; revision=31558
2010-01-18 21:50:50 +00:00
Guy Harris e5b99619b7 The maker of *Peek is WildPackets, InterCap and all, not Wildpacket.
svn path=/trunk/; revision=31358
2009-12-23 22:20:41 +00:00
Stig Bjørlykke 1439e56e5f From Petr Sumbera:
Small comment fix.

svn path=/trunk/; revision=31293
2009-12-17 15:32:23 +00:00
Stephen Fisher 233bb9cd25 When reading NetMon capture files version 2.1 and higher (the latest is 2.2 right
now), the capture file's header encapsulation type is set to 1 for Ethernet for
backwards compability only.  These files use per-packet encapsulation types
instead.  For now, set it to Unknown file encapsulation until we can find a
way to set it to WTAP_ENCAP_PER_PACKET without having to assert in wtap_read()
so the user can see that it is a per-packet encapulation in places such as
the capinfos program.


svn path=/trunk/; revision=31213
2009-12-09 03:27:12 +00:00
Stephen Fisher 09a4f2af2f From Felix Obenhuber via bug #4299: SocketCAN dissector patch
From me: Remove changes related to the ARP protocol because it doesn't
appear to be necessary for SocketCAN.  Will add later if Felix says it is
needed.


svn path=/trunk/; revision=31196
2009-12-08 07:21:33 +00:00
Bill Meier 0f1d360f64 Revise #31172 slightly to clarify #define dependencies
svn path=/trunk/; revision=31173
2009-12-04 16:56:34 +00:00
Bill Meier 2dd96f051a From: babi
[Fix] potential memory problem (crash?) in daintree-sna.

See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4294

(A parameterized version of the patch supplied in the above)



svn path=/trunk/; revision=31172
2009-12-04 16:42:14 +00:00
Bill Meier cc43ff3835 From: Ravi Kondamuru:
"... a patch to make the netscaler wiretap code independent of the
 host system endian-ness. 
 I have taken care of (1) reading and writing nstrace files (netscaler.c) and
 (2) reading in dissector code (packet-nstrace.c) also."

See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3540#c26

svn path=/trunk/; revision=31171
2009-12-04 15:21:48 +00:00
Stig Bjørlykke 11ba06366d Renamed some wtap defines:
WTAP_GCOM_TIE1 => WTAP_ENCAP_GCOM_TIE1
WTAP_GCOM_SERIAL => WTAP_ENCAP_GCOM_SERIAL

svn path=/trunk/; revision=31161
2009-12-03 15:47:52 +00:00
Stig Bjørlykke fcee7ad2df Added missing WTAP_ENCAP_DPNSS and WTAP_ENCAP_PACKETLOGGER to encap_table_base[]
Fixed some comments.

svn path=/trunk/; revision=31160
2009-12-03 15:40:15 +00:00
Stig Bjørlykke e592902393 From Petr Sumbera via bug 4284:
Added support for Solaris IPNET layer

From me:
Some code cleanup in packet-ipnet.c
Added packet-ipnet.c to CMakeFiles.txt
Added WTAP_ENCAP_IPNET to encap_table_base[]

svn path=/trunk/; revision=31159
2009-12-03 15:27:39 +00:00
Stig Bjørlykke e6a57f0107 Switch HighHdr and LowHdr to build correct absolute time.
svn path=/trunk/; revision=31005
2009-11-18 16:29:13 +00:00
Stig Bjørlykke 0eba377436 Another try to treat the two 32bit time values (low, high) in v23 format
as a 64bit value.

svn path=/trunk/; revision=31002
2009-11-18 07:48:03 +00:00
Guy Harris d393e03e07 If no error is returned by a Wiretap routine, err_info is presumed not
to have been set.  Do not set it to something g_mallocated in that case,
as that will cause a memory leak - the error string will not be freed by
the caller, as it's presumed not to have been set.

svn path=/trunk/; revision=31001
2009-11-18 06:36:13 +00:00
Stig Bjørlykke 99b8600eca From Ravi Kondamuru via bug 3540:
Treat the two 32bit time values (low, high) in v23 format as a 64bit value.

svn path=/trunk/; revision=30994
2009-11-17 18:23:40 +00:00
Jörg Mayer d2cc318f4f Beginnings of enabling static builds. Still to do:
* Add -static
* Registration may need different handling
* Add plugins
* Build error in wslua

svn path=/trunk/; revision=30987
2009-11-17 11:58:36 +00:00
Stig Bjørlykke 7d26a109cd Removed an unused assignment.
svn path=/trunk/; revision=30892
2009-11-09 14:24:02 +00:00
Stig Bjørlykke 50916b9174 Removed an unused variable.
svn path=/trunk/; revision=30891
2009-11-09 14:22:26 +00:00
Jörg Mayer 9ee31d1d0e cmake will now honor -Werror if configured (default: on)
svn path=/trunk/; revision=30852
2009-11-07 10:07:00 +00:00
Guy Harris ce6bcff318 Note in comments that the dct2000_file_externals_t structure is used for
more than just dumping, indicate what stuff is used for dumping, and
note that it probably shouldn't be used for that (one should not have to
have a Catapult 2000 input file in order to write a Catapult 2000 output
file).

svn path=/trunk/; revision=30719
2009-10-26 19:20:50 +00:00
Guy Harris 6d6fc060cd Update URL for LANalyzer file format.
svn path=/trunk/; revision=30717
2009-10-26 18:41:54 +00:00
Martin Mathieson 5c33e9f525 Try to fix win64 buildbot. Both fgets() and gzgets() take an int for the length.
svn path=/trunk/; revision=30709
2009-10-26 13:38:23 +00:00
Martin Mathieson bb78c91111 Get rid of capture.catapult_dct2000, move start time of capture into file_externals instead.
Thanks Guy for helping to simplify this file!

svn path=/trunk/; revision=30708
2009-10-26 12:17:11 +00:00
Guy Harris 524d9c2b8b Global variables considered harmful - we don't want to rule out two
threads reading from two different wtap_t's in different threads.

file_externals_table considered unnecessary - a wtap_t has a member
specifically intended to point to private data.

Clean up indentation.

svn path=/trunk/; revision=30707
2009-10-26 09:36:53 +00:00
Martin Mathieson 64e4ee759d Formatting changes only.
svn path=/trunk/; revision=30704
2009-10-26 07:57:38 +00:00
Anders Broman d52f502b66 Fix:
Error: Found prohibited APIs in catapult_dct2000.c: sprintf,strcpy

svn path=/trunk/; revision=30701
2009-10-26 05:50:05 +00:00
Martin Mathieson 6dfb4d1f71 Add support for showing/filtering/resaving logged LTE strings.
svn path=/trunk/; revision=30700
2009-10-26 00:04:27 +00:00
Stig Bjørlykke 1f5b4f5864 Fixed data type for a buffer.
svn path=/trunk/; revision=30609
2009-10-18 21:29:44 +00:00
Stig Bjørlykke de88ead3bc Fixed data type for asciibuf.
svn path=/trunk/; revision=30608
2009-10-18 21:29:17 +00:00
Stig Bjørlykke 2b54a78378 Removed non-ASCII characters.
svn path=/trunk/; revision=30590
2009-10-18 08:02:28 +00:00
Stig Bjørlykke b7d116667f From Marton Nemeth:
Add the ability to open JPEG/JFIF files directly.

From me:
Some code cleanup + add new file to cmake.

svn path=/trunk/; revision=30588
2009-10-17 20:56:06 +00:00
Stig Bjørlykke 98fd179d82 (minor) Indent fix.
svn path=/trunk/; revision=30228
2009-10-01 10:52:01 +00:00
Stig Bjørlykke 1d87c60187 Removed an unneeded assignment.
svn path=/trunk/; revision=30215
2009-09-30 13:42:58 +00:00
Stig Bjørlykke 4bdf8638b5 Read nsecs as a signed value.
svn path=/trunk/; revision=30189
2009-09-29 07:44:40 +00:00
Guy Harris 7be78a2d55 Treat 13 as if it came from OpenBSD except on BSD/OS, so that if there
are any BSD/OS users still out there using Wireshark to read RFC 1483
ATM captures from BSD/OS, they can still do so, but all other users get
to read OpenBSD DLT_ENC captures, not just users *on* OpenBSD.

That also lets us simplify some hacks to deal with a link-layer type of
13 on Nokia IPSO captures.

svn path=/trunk/; revision=30159
2009-09-25 21:55:39 +00:00
Anders Broman 9ac672ca81 Update *.vcproj to visual studio 8
svn path=/trunk/; revision=30111
2009-09-24 05:11:47 +00:00
Stig Bjørlykke 2ed762be0e Build wiretap with cmake on OSX.
svn path=/trunk/; revision=30096
2009-09-23 17:53:55 +00:00
Jörg Mayer cf326e0304 More fixes for OSX - might work now :-)
svn path=/trunk/; revision=30093
2009-09-23 15:56:44 +00:00
Guy Harris aa33901ae3 We pass the file handle to snoop_read_shomiti_wireless_pseudoheader();
use that.

svn path=/trunk/; revision=29960
2009-09-17 03:00:20 +00:00
Guy Harris e1a486db4b We need an err_info argument to snoop_read_shomiti_wireless_pseudoheader,
as it might fill that in.

svn path=/trunk/; revision=29959
2009-09-17 02:59:26 +00:00
Guy Harris a5152449ab Do *NOT* skip the rest of the header by reading into a fixed-size buffer
on the stack! There is no guarantee that the header length won't cause a
buffer overflow - there could be a bug in some version of Surveyor
generating a bad file, there could be a future version of Surveyor that
has a really big pseudo-header, the file could've been written by
something other than Surveyor that has a bug in it, there could be a
file that's corrupted in transit, or there could be a deliberately
malformed packet trying to cause *Shark to execute arbitrary code.

Also, explicitly check for a too-short header length and fail with
WTAP_ERR_BAD_RECORD in that case.

Add some comments asking some questions about the header.

(The previous change was for bug 3856:

	https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3856

not bug 3865.)

svn path=/trunk/; revision=29958
2009-09-17 02:42:31 +00:00
Jeff Morriss e95fe37933 From Clay Jones via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3865 :
The Shomiti Wireless head was modified in a recent release such that wireshark
can no longer read Shomiti wireless capture files.

This new format is backwards compatible with the old format.

svn path=/trunk/; revision=29956
2009-09-17 02:12:08 +00:00
Jörg Mayer 1aca48909c - now wireshark compiles with cmake as well
svn path=/trunk/; revision=29799
2009-09-08 15:56:16 +00:00
Jörg Mayer d26cdc30ea Beginnings of getting cmake to build stuff in epan.
It's only beginnings, so epan is commented out in
the subdirs statement.

This is more a synch to avoid duplicate work and creating
conflicting patches to the cmake stuff.

svn path=/trunk/; revision=29666
2009-09-02 16:33:01 +00:00
Kovarththanan Rajaratnam 13df2a878b On Windows a shared library in divided into a DLL part (RUNTIME) and an import lib (ARCHIVE).
svn path=/trunk/; revision=29622
2009-08-30 07:09:29 +00:00
Bill Meier acd415ca9b #include <stdio.h> no longer req'd.
svn path=/trunk/; revision=29569
2009-08-26 19:28:20 +00:00
Jaap Keuter 58dedc3872 From kahou:
Add Fibre Channel Delimiter Dissector for Fibre Channel FC2.

svn path=/trunk/; revision=29531
2009-08-23 19:16:35 +00:00
Guy Harris 93ad454c6a Update a comment - a bad packet size could also be the result of a file
not actually being an ERF file.

Don't compute the packet size until you know that rlen is valid.

svn path=/trunk/; revision=29366
2009-08-10 18:22:05 +00:00
Gerald Combs c158c4ad69 Don't try to allocate more than WTAP_MAX_PACKET_SIZE. Fixes a crash
reported in bug 3849.

svn path=/trunk/; revision=29364
2009-08-10 16:12:55 +00:00
Jörg Mayer 952cbd7902 * Tue May 26 2009 cmorve69@yahoo.es
- made it compile with --as-needed

This patch was taken from the opensuse wireshark.spec file.
No thanks go to the author and the package maintainers of
this package for not sending this upstream - it would have
made it into 1.2.0.

svn path=/trunk/; revision=29326
2009-08-07 18:47:56 +00:00
Guy Harris be2a84c231 Note that libpcap fails if it tries to read a file with a snapshot
length > 65535, so we shouldn't use a larger value.

svn path=/trunk/; revision=29194
2009-07-26 00:32:22 +00:00
Stig Bjørlykke e9066532cf From Kahou via bug 3739:
New DLT value is added for Fibre Channel FC2.

svn path=/trunk/; revision=29115
2009-07-16 10:45:14 +00:00
Anders Broman 67d6f5976e Move th /MP flag setting to LOCAL_CFLAGS set in configure.nmake
for MSVC variant 2008 only. As suggested by Bill Meier.

svn path=/trunk/; revision=29114
2009-07-16 08:27:18 +00:00
Anders Broman 91caa01090 Add /MP flag to make use of multi cores.
svn path=/trunk/; revision=29104
2009-07-15 20:55:31 +00:00
Guy Harris 9de2d18463 Don't dump out the raw link-layer type when noting that
KHciLoggerDatalinkTypeBCSP and KHciLoggerDatalinkTypeH5 aren't supported
- just explicitly say "BSCP" or "H5".

For unknown link-layer types, say "unknown or unsupported", as other
Wiretap modules do.

svn path=/trunk/; revision=28925
2009-07-02 20:10:05 +00:00
Michael Tüxen be7b89aa49 Patch from Alex Badea for Bug 3645.
This fix will be included in Wireshark 1.2.1.

svn path=/trunk/; revision=28924
2009-07-02 19:52:47 +00:00
Michael Tüxen 634a80b610 Add support for DLT_PPP_WITH_DIR. This fixes bug 3619.
Thanks for Tyson Key for reporting the issue.

svn path=/trunk/; revision=28877
2009-06-28 18:22:15 +00:00
Michael Tüxen 393214bc6b Stop loading a pcapng file with multiple section header blocks.
This fixes a bug reported by Tyson Key as a follow up of Bug 3560.
Also some cleanups and debug output improvements.

Thanks to Tyson Key for reporting the bug and providing a tracefile.
This fix will be included in Wireshark 1.2.1 and higher.

svn path=/trunk/; revision=28868
2009-06-28 11:09:24 +00:00
Michael Tüxen 7a728f6722 Accept file snaplen larger than WTAP_MAX_PACKET_SIZE,
text2pcap uses 102400.
This fixes bug 3620. Thanks to Tyson Key for reporting the bug
and providing capture files.
This fix should be included in Wireshark 1.2.1 and higher.

svn path=/trunk/; revision=28866
2009-06-27 18:50:13 +00:00
Michael Tüxen ce11d99c12 Fix copy/paste error introduced in rev. 28863.
Thanks to Guy for finding and reporting it. 

svn path=/trunk/; revision=28865
2009-06-27 18:10:10 +00:00
Michael Tüxen 1297ec0d61 Another cleanup. We are now back to Ulf's original
model of data handling.

svn path=/trunk/; revision=28864
2009-06-27 17:33:23 +00:00
Michael Tüxen dce1889fd7 Cleanup. Should be included in Wireshark 1.2.1 and higher to keep
merging future bug fixes simple.

svn path=/trunk/; revision=28863
2009-06-27 16:08:18 +00:00
Michael Tüxen a41d93603c Add support for writing pcapng files with multiple
encapsulations.
This fixes a bug reported by Sake during the
Sharkfest 09. Thanks for providing a
Netscreen tracefile with multiple link layer
types.
This patch will be included in Wireshark 1.2.1
and higher.

svn path=/trunk/; revision=28862
2009-06-27 15:20:44 +00:00
Michael Tüxen 6ce8546ecd This patch
* adds an encapsulation argument to pcap_write_phdr.
* writes the pseudo header when writing pcapng files.

This fixes a bug where you could not write pcapng files
when using encapsulations requiring pseudo headers.

svn path=/trunk/; revision=28859
2009-06-27 12:41:06 +00:00
Michael Tüxen 11a65d398b If all interfaces use the same encapsulation, use
this a the file encapsulation.

This fixes a bug where you can not save a file
in libpcap format when you captured it as a
pcapng one.

This fix will be scheduled for Wireshark 1.2.1
and higher.

svn path=/trunk/; revision=28858
2009-06-27 12:14:18 +00:00
Michael Tüxen 267df8e183 This commit
* adds an encap argument to pcap_process_pseudo_header.
* adds support for reading pseudo headers.
It fixes Bug 3560.
Thanks to Tyson Key for reporting the bug and providing
trace files. This fix will be scheduled for inclusion in
Wireshark 1.2.1 and higher.

svn path=/trunk/; revision=28857
2009-06-27 11:39:47 +00:00
Michael Tüxen f15cdff759 Disable debug output.
svn path=/trunk/; revision=28851
2009-06-26 15:25:22 +00:00
Michael Tüxen b5d3abb77b * Allocate enough memory for reading a packet.
* Initialize pseudoheader.
* Add some input validation / protection code.
* Fix some return values.
* Clean up some whitespaces.

This fixes Bug 3565. Thanks to Tyson Key how reported
the issue and provided capture files for debugging.

This fix is scheduled for inclusion in Wireshark 1.2.1
and higher.

svn path=/trunk/; revision=28850
2009-06-26 15:08:04 +00:00
Jaap Keuter 479b1ee737 From Duncan Salerno:
Ensure dct3trac packets never longer than 23 bytes.

svn path=/trunk/; revision=28838
2009-06-24 20:27:58 +00:00
Michael Tüxen 5562e6e8cf Improve heuristic for packetlogger file format detection.
svn path=/trunk/; revision=28809
2009-06-22 12:13:12 +00:00
Michael Tüxen 2f2c22c0c0 Add protection code to avoid crashed when .erf files
are wrongly identified as packetlogger ones.
Will be scheduled for 1.2.1.

svn path=/trunk/; revision=28808
2009-06-22 11:45:28 +00:00
Michael Tüxen 98a4696773 Fix for bug 3539: Address as signess issue for fcs_len.
Bugfix scheduled for 1.2.1.

svn path=/trunk/; revision=28768
2009-06-18 18:43:36 +00:00
Michael Tüxen 47fd39c73d Clean up a comment.
svn path=/trunk/; revision=28763
2009-06-17 00:46:38 +00:00
Michael Tüxen cb678fdcfd Whitespace cleanups.
svn path=/trunk/; revision=28757
2009-06-16 05:03:33 +00:00
Stig Bjørlykke fbb5b30ceb Support per packet dumping in wtap_encap_string() and wtap_encap_short_string().
svn path=/trunk/; revision=28752
2009-06-16 03:16:55 +00:00
Gerald Combs f7d80a113c From Ben Winslow via bug 3535:
Because Lucent/Ascend equipment will sometimes omit the hex dump for a packet
or send two headers followed by two hex dumps, Wireshark needs to be very
lenient when parsing a Lucent/Ascend trace.  On a busy access server, a packet
like this is pretty likely to appear within a few minutes.

svn path=/trunk/; revision=28749
2009-06-15 22:25:05 +00:00
Jörg Mayer 0d300bb6f5 Rename all of the ascend files:
That way we hopefully won't need the runlex.sh hack any
more. Also the ylwrap stuff is (hopefully) obsolete.

ascend.[hc]      -> ascendtext.[hc]
ascend-scanner.l -> ascend_scanner.l
ascend-grammar.y -> ascend.y


svn path=/trunk/; revision=28744
2009-06-15 18:56:46 +00:00
Michael Tüxen 46ecce3d3d Fix bug reported by Stig: per packet encapsulation for
pcapng is supported.

svn path=/trunk/; revision=28736
2009-06-15 12:55:42 +00:00
Michael Tüxen 1d65c4b06f When writing pcapng files use correct interface index
of 0 instead of 1.

svn path=/trunk/; revision=28696
2009-06-11 11:24:29 +00:00
Bill Meier 67c1595232 Fix Windows build warning:
cl : Command line warning D9024 : unrecognized source file type 'ascend-grammar.h', object file assumed
cl : Command line warning D9027 : source file 'ascend-grammar.h' ignored


svn path=/trunk/; revision=28635
2009-06-04 12:27:09 +00:00
Stig Bjørlykke d9b405deb9 Optimized check if file is a nstrace file.
svn path=/trunk/; revision=28614
2009-06-02 20:59:48 +00:00
Guy Harris 7d5afce08f When doing a seek-and-read, don't check the packet size, as we don't
have it (we have the size with the pseudo-header length already
removed); we've already read the packet, and thus have already checked
it.  Fixes bug 3501.

svn path=/trunk/; revision=28607
2009-06-02 19:06:05 +00:00
Graeme Lunt baf910f105 Better heuristics for detecting BER encoded file, especially when initial tag is indefinite length encoded.
Checked that the I4B traces reported in http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1972 still loads as expected.


svn path=/trunk/; revision=28595
2009-06-02 14:36:42 +00:00
Stig Bjørlykke e12f08aa8b Corrected nspm_signature_version() again.
svn path=/trunk/; revision=28588
2009-06-02 09:23:48 +00:00
Stig Bjørlykke a9c95008c7 Avoid infinite loop in nspm_signature_version().
svn path=/trunk/; revision=28585
2009-06-02 08:47:45 +00:00
Guy Harris 0c95d973d3 No newlines in the additional-error-information string, please.
svn path=/trunk/; revision=28584
2009-06-02 07:18:18 +00:00
Stig Bjørlykke 496e7909ba Try Jakub's casting with GPOINTER_TO_INT().
svn path=/trunk/; revision=28579
2009-06-01 21:47:45 +00:00
Stig Bjørlykke 29839540cf Adding casts, take 3.
svn path=/trunk/; revision=28578
2009-06-01 21:26:50 +00:00
Stig Bjørlykke c5bba6e8d8 Adding casts, take 2.
svn path=/trunk/; revision=28576
2009-06-01 19:55:57 +00:00
Stig Bjørlykke c1ef7b0135 Added/Changed some more casts to build.
svn path=/trunk/; revision=28575
2009-06-01 19:46:40 +00:00
Stig Bjørlykke ffd02e49f5 Added some casts to remove some warnings.
svn path=/trunk/; revision=28573
2009-06-01 18:50:16 +00:00
Stig Bjørlykke c9b492a422 From Ravi Kondamuru via bug 3457:
Add support to read citrix netscaler capture file format.

From me:
- Renamed packet-ns.c to packet-nstrace.c
- Rewrote to not use "goto" in netscaler.c
- Moved dissecting of coreid

svn path=/trunk/; revision=28564
2009-06-01 17:23:38 +00:00
Stephen Fisher c4680240d9 Change my e-mail address
svn path=/trunk/; revision=28537
2009-05-31 05:55:15 +00:00
Jörg Mayer 18887f7b72 Resume work on CMake for Wireshark. Finally found and fixed a
few mistakes that I made earlier.

Current status: dumpcap still doesn't build
Next step: Add a ylwrap like workaround for flex misbehaviour.

svn path=/trunk/; revision=28518
2009-05-29 10:57:47 +00:00
Sake Blok dbc67fc367 Fix for bug 3469:
In Juniper NetScreen snoop output files, the encapsulation type of
traffic on ADSL interfaces can be ethernet or PPP. Check whether the
first 6 bytes of the data are the same as the destination mac-address
in the packet header. If they are, assume ethernet. If not, assume PPP.



svn path=/trunk/; revision=28471
2009-05-25 19:59:17 +00:00
Stig Bjørlykke f39d677ef9 Added missing daintree-sna.h to Makefile.
svn path=/trunk/; revision=28469
2009-05-25 06:57:12 +00:00
Stig Bjørlykke 5fa6b90f6b From Fred Fierling (bug 3486):
Added support for Daintree's Sensor Network Analyzer capture files.

svn path=/trunk/; revision=28463
2009-05-24 22:49:36 +00:00
Michael Tüxen 83aa6f473f From Aaron Turner: Use wtap_wtap_encap_to_pcap_encap() instead of
fixed mapping for ethernet only.

svn path=/trunk/; revision=28443
2009-05-22 07:33:58 +00:00
Gerald Combs 3c6b6dc1a3 From Kovarththanan Rajaratnam via bug 2680:
Currently Wireshark doesn't support saving
WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR files as btsnoop files.

svn path=/trunk/; revision=28442
2009-05-22 00:05:19 +00:00
Gerald Combs a37191cb07 From Kovarththanan Rajaratnam via bug 2676:
If a PCAP file containing WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR packets is saved,
it gets corrupted because the direction pseudo header isn't included.

svn path=/trunk/; revision=28441
2009-05-21 23:16:49 +00:00
Michael Tüxen 21fcdad106 One more debug output.
svn path=/trunk/; revision=28274
2009-05-05 05:58:21 +00:00
Michael Tüxen cd369fcbf8 Use a dynamic glib array instead of a static C array for
storing the interface specific data.

svn path=/trunk/; revision=28264
2009-05-03 17:43:41 +00:00
Michael Tüxen 9366841f60 Add support for multiple IDBs. They can used different encapsulations.
svn path=/trunk/; revision=28262
2009-05-03 15:47:41 +00:00
Michael Tüxen 2d894fdd24 Improve handling of if_tsresol option.
svn path=/trunk/; revision=28261
2009-05-03 15:09:23 +00:00
Michael Tüxen 6d0211be52 Use WTAP_FILE_TSPREC_NSEC as tsprecision. This makes it independent from the
interfaces. Convert other times appropriately.

svn path=/trunk/; revision=28257
2009-05-03 11:46:40 +00:00
Michael Tüxen 9447c434e9 Remove code that should have been removed by my last commit.
svn path=/trunk/; revision=28256
2009-05-03 10:38:41 +00:00
Michael Tüxen b9d34749e6 Use WTAP_ENCAP_PER_PACKET. This is an intermediate step towards supporting
multiple IDBs.

svn path=/trunk/; revision=28255
2009-05-03 09:56:53 +00:00
Michael Tüxen 3b23d3dbd5 Whitespace change.
svn path=/trunk/; revision=28252
2009-05-02 18:24:44 +00:00
Michael Tüxen accb3a9207 Fix the handling of non PB/EPB blocks after the initial SDB/IDB.
svn path=/trunk/; revision=28251
2009-05-02 17:10:01 +00:00
Guy Harris e637af376a pcap_to_wtap_map is not used outside wiretap/pcap-common.c, so make it
static.

svn path=/trunk/; revision=28186
2009-04-27 22:07:11 +00:00
Guy Harris 7876fb4ead Nettl format != libpcap format && nettl format != pcap-NG format.
Remove the stuff for nettl from the LINKTYPE_ <-> WTAP_ENCAP_ mapping
table.

svn path=/trunk/; revision=28185
2009-04-27 21:28:53 +00:00
Guy Harris a60cae6935 Move pseudo-header routines from libpcap.c to pcap-common.c, for use
with pcap-NG files.

svn path=/trunk/; revision=28184
2009-04-27 19:39:06 +00:00
Michael Tüxen fa8bb35715 Use named constant.
svn path=/trunk/; revision=28176
2009-04-27 11:52:14 +00:00
Guy Harris 18a3b0659c Have the libpcap and pcap-NG code share the LINKTYPE_-to-WTAP_ENCAP_
mapping table - they should be using the same values.  Share the mapping
routines as well.

svn path=/trunk/; revision=28173
2009-04-27 09:28:28 +00:00
Michael Tüxen c68e344284 Clean up some comments I forgot to remove.
svn path=/trunk/; revision=28154
2009-04-26 07:46:03 +00:00
Guy Harris a043d8482f Don't do pointer casting - some version of GCC complain about that.
svn path=/trunk/; revision=28153
2009-04-26 02:59:16 +00:00
Guy Harris f71921252e There's no guarantee that "ll" is the right modifier to use for
gint64/guint64 with GLib's formatting routines; use G_GINT64_MODIFIER
instead.

svn path=/trunk/; revision=28152
2009-04-25 21:06:09 +00:00
Michael Tüxen 94fc2641e7 - add support for interface statistic block
- distinguish between packet block and enhanced packet block
- fix a bug regarding the handling of unknown blocks

svn path=/trunk/; revision=28151
2009-04-25 19:11:35 +00:00
Bill Meier fa6acc7d55 vms.c: undo an incorrect const committed in SVN #28144.
svn path=/trunk/; revision=28146
2009-04-24 12:52:02 +00:00
Bill Meier 72ef03e60a [Trivial] Constify a few things
svn path=/trunk/; revision=28144
2009-04-24 12:16:01 +00:00
Stig Bjørlykke 98f592713c Improved reading Apple's PacketLogger files:
- Send last byte of header (type) and data to a packetlogger dissector
- Rewrite type to ACI channel in the dissector
- Direction is indirectly given from the PL type
- Dissect PacketLogger NewC and Info as text

svn path=/trunk/; revision=28141
2009-04-24 08:14:36 +00:00
Stig Bjørlykke 3fd6fbb69e Added PacketLogger to dump_open_table_base to be able to open pklg files
(and avoid crash).

svn path=/trunk/; revision=28137
2009-04-23 09:13:56 +00:00
Guy Harris bea4b58ec5 More file-offset fixes.
svn path=/trunk/; revision=28122
2009-04-22 04:33:49 +00:00
Guy Harris c7d09027df ssize_t is UN*X-only; don't use it.
The header length, as processed by airopeekv9_process_header(), is never
0, so use 0, not -1, as the error return.

svn path=/trunk/; revision=28121
2009-04-22 03:57:37 +00:00
Guy Harris 0293e07437 LLP64 fix.
svn path=/trunk/; revision=28120
2009-04-22 03:50:13 +00:00
Guy Harris 5c224bdd74 Signed vs. unsigned fix.
svn path=/trunk/; revision=28119
2009-04-22 03:49:45 +00:00
Guy Harris ad33ca6c2f Clean up some 64-bit issues.
svn path=/trunk/; revision=28117
2009-04-22 03:07:37 +00:00
Gerald Combs 15f33eecbf Disable warnings-as-errors for Flex-generated output. Add a couple of gsize
casts.

svn path=/trunk/; revision=28002
2009-04-08 18:08:25 +00:00
Gerald Combs db3e983b04 Add a check to make sure we don't try to allocate a huge buffer. If
we get an improper buffer length, throw an error instead of
aborting. Clean up the debugging code.

svn path=/trunk/; revision=27918
2009-03-31 22:51:59 +00:00
Stig Bjørlykke 0258be0b05 From Jakub Zawadzki:
More remove checking for NULL before g_free().

svn path=/trunk/; revision=27728
2009-03-15 18:08:46 +00:00
Gerald Combs 0df88c651e Flex doesn't generate LLP64-compilable output. For the time being don't
use -WX when compiling ascend-scanner.c and k12text.c.

svn path=/trunk/; revision=27703
2009-03-11 18:48:34 +00:00
Gerald Combs 51cf696142 Another iteration of 64-bit-support-by-successive-approximation.
svn path=/trunk/; revision=27690
2009-03-10 17:38:24 +00:00
Gerald Combs 0b7885e04d ng_file_read and SnifferDecompress need to be able to return negative
values, so adjust accordingly.

svn path=/trunk/; revision=27688
2009-03-10 16:33:38 +00:00
Gerald Combs 2236109a82 More 64-bit fixes.
svn path=/trunk/; revision=27685
2009-03-09 22:37:55 +00:00
Gerald Combs 40f5a17d46 Convert a bunch of ints to size_t in ngsniffer.c, and make sure file_read
can accept size_t's.

svn path=/trunk/; revision=27684
2009-03-09 22:28:05 +00:00
Gerald Combs cc739fecb0 P64 fixes.
svn path=/trunk/; revision=27683
2009-03-09 21:18:55 +00:00
Bill Meier df62772320 Change a a remaining eth_fopen to ws_fopen (used only under an #if debug).
svn path=/trunk/; revision=27659
2009-03-08 16:28:20 +00:00
Guy Harris 4a5e0ba2bc More P64 changes.
svn path=/trunk/; revision=27641
2009-03-07 05:18:59 +00:00
Guy Harris 6552d5d5bd More P64 changes.
svn path=/trunk/; revision=27640
2009-03-07 05:13:44 +00:00
Guy Harris 849186ae59 More P64 changes.
svn path=/trunk/; revision=27639
2009-03-07 05:13:12 +00:00
Guy Harris 07addfdcea More P64 changes.
svn path=/trunk/; revision=27638
2009-03-07 05:11:56 +00:00
Guy Harris b2408ca1a3 Squelch warnings - none of those strings will be so long that the
difference between an int and a gsize/size_t matters.

svn path=/trunk/; revision=27637
2009-03-07 05:11:15 +00:00
Guy Harris e6ccfc6944 More P64 stuff.
svn path=/trunk/; revision=27636
2009-03-07 04:47:06 +00:00
Guy Harris 76582cf2e2 Some LLP64 work to get rid of warnings for Win64; this is also good for
LP64.

svn path=/trunk/; revision=27635
2009-03-07 04:40:14 +00:00
Gerald Combs 57dadc4664 More Windows compiler flag cleanups. Fix a problem with my last commit
that would break compilation for older compilers. Create a "DLL_LDFLAGS"
variable and use it in DLLs and plugins. Use PLUGIN_LDFLAGS and
DLL_LDFLAGS where needed. Don't force i386 code in the TPG plugin.

svn path=/trunk/; revision=27582
2009-03-02 21:33:11 +00:00
Martin Mathieson 887b68c64e Some context names now do include '-', so allow it.
svn path=/trunk/; revision=27562
2009-02-27 11:18:15 +00:00
Jaap Keuter b47e7619e6 From Mark C. Brown:
Added support for HPVM (Integrity Virtual Machines) guest AVIO (Accelerated Virtual IO) driver IGSSN.
Cleaned up the trace record checks.  
Made the default ethernet if the nettl subsystem is not recognized.

svn path=/trunk/; revision=27549
2009-02-25 23:19:56 +00:00
Bill Meier 388e05ed7a Add a cast to fix a VC6 compie warning
svn path=/trunk/; revision=27494
2009-02-21 21:44:03 +00:00
Stephen Fisher 18f3436e85 Add support for reading Apple's Bluetooth PacketLogger capture files to
wiretap.  Modify various other locations to accommodate the fact that
PacketLogger files do not specify the direction of packets. 


svn path=/trunk/; revision=27463
2009-02-16 07:24:04 +00:00
Anders Broman a8c964cd44 From Rolf Fiedler:
Add DPNSS link layer dissector, support EyeSDN Trace files with DPNSS.
(Removed a couple of c++ style comments).
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3224

svn path=/trunk/; revision=27312
2009-01-27 21:13:26 +00:00
Bill Meier 8e885dd1df Update comment re the use of the flex statement '%option noline'
svn path=/trunk/; revision=27231
2009-01-14 20:50:39 +00:00
Martin Mathieson 89c72aba05 Fix a bug where a space character wasn't being written back to save files.
svn path=/trunk/; revision=27198
2009-01-08 16:29:15 +00:00
Tomas Kukosa 6d5e6889f9 get rid of few signed/unsigned mishmash warnings to have it with MSVC6 compilable
svn path=/trunk/; revision=27195
2009-01-08 13:28:30 +00:00
Bill Meier 9714809165 Fix what certainly looks like a bug: change a SEEK_SET to SEEK_CUR
svn path=/trunk/; revision=27181
2009-01-07 20:06:24 +00:00
Jaap Keuter 322d89cf15 From Duncan Salerno:
Added LAPDm protocol dissector, GSM Um layer, and wiretap support for dct3trace
captures, generated by gammu (many available at http://wiki.thc.org/gsm).

svn path=/trunk/; revision=27176
2009-01-07 07:21:31 +00:00
Bill Meier d7ae2fb2bb Addt'l fix for bug #1937: Fill in frame pseudo_header as req'd.
Also: comment out support for MTP_L2 and SSCOP (encapsulation types
WTAP_ENCAP_MTP2 & WTAP_ENCAP_ATM_PDUS) since I don't know how to
fill in the pseudo_headers required by packet-mtp2 and packet-atm.

svn path=/trunk/; revision=27172
2009-01-06 21:25:11 +00:00
Bill Meier 11042d0dd1 Fix a typo in a comment
svn path=/trunk/; revision=27164
2009-01-06 13:31:28 +00:00
Bill Meier 1e76a31b7a Use encap=WTAP_ENCAP_UNKNOWN if encap can't be determined from the file frame.
(The original code before SVN 27158 was correct).

svn path=/trunk/; revision=27159
2009-01-05 20:05:39 +00:00
Bill Meier 901627bfd8 Rework code somewhat; Fixes bug 1937 & various other issues.
Fixed: 
  Crash when reading a K12text file with one frame;
  Crash after selecting the last frame and then a previous frame
    after file open.
  Select of frame n (>1) immediately after file open incorrectly
    displayed the packet details & data from frame n+1.
  File ! Merge (for K12text files) did not work correctly.

Fixes:
  Essentially: clear all lexer state (look-ahead buffer, etc)
   for every file read. Also: Don't use global for keeping
   track of the current file position.
  Also: Handle *nix-style line endings as well as DOS-style.

svn path=/trunk/; revision=27158
2009-01-05 19:45:58 +00:00
Bill Meier 489eceddaf Fix some indentation
svn path=/trunk/; revision=27156
2009-01-04 16:45:34 +00:00
Bill Meier f281fabf7f Oops: Revert SVN #27152: There weren't actually any memory leaks ...
svn path=/trunk/; revision=27155
2009-01-04 16:28:48 +00:00
Bill Meier e8cc3f500a Fix a few minor memory leaks...
svn path=/trunk/; revision=27152
2009-01-04 15:44:28 +00:00
Bill Meier a392d821db Minor rewording of a few comments; fix a few typos.
svn path=/trunk/; revision=27151
2009-01-04 14:21:54 +00:00
Guy Harris f6f84ae1dc Name changes to match libpcap name change of the corresponding DLT_
value.

svn path=/trunk/; revision=27113
2008-12-24 20:18:01 +00:00
Guy Harris d2cbbe0a2a Handle the new DLT_USB_LINUX_MMAP link-layer type.
svn path=/trunk/; revision=27099
2008-12-23 19:50:21 +00:00
Guy Harris 29a7854093 Move wtap_pcap_encap_to_wtap_encap() and wtap_wtap_encap_to_pcap_encap()
back to libwiretap for now, as it's inherently tied to reading libpcap
files; at some point we might want to have pcap-reading (and
pcap-ng-reading?) code in a separate library, for use by, for example,
dumpcap (and rawshark?).

svn path=/trunk/; revision=27076
2008-12-22 00:06:12 +00:00
Gerald Combs 3bb0df12f5 From babi: Fix three overflows (bugs 3150 and 3151).
From me: Use a #define for the RTP analysis field name lengths.

svn path=/trunk/; revision=27064
2008-12-20 00:07:21 +00:00
Guy Harris 916e8fc1bb Clarify that, in the Linux USB capture format, the header is always
followed by 8 bytes of "struct usb_device_setup_hdr", even if there's no
setup information, but it should be interpreted only if setup_flag is 0.
(That's what those mysterious 8 bytes are.)

svn path=/trunk/; revision=27043
2008-12-17 23:24:51 +00:00
Stig Bjørlykke 078e09692a Added support for open TNEF files directly.
No we can decode those winmail.dat files.

svn path=/trunk/; revision=26864
2008-11-27 16:40:45 +00:00
Jaap Keuter fe42d6af0a From yami:
The code in wiretap/wtap.c is not right. Because g_array_append_val should accept a value
of type 'struct encap_type_info' rather than a pointer to this type.

svn path=/trunk/; revision=26816
2008-11-20 20:16:07 +00:00
Anders Broman 95451b54f8 From Max Filippov:
patch to support IEE802.15.4 non-ASK PHY.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2906

svn path=/trunk/; revision=26792
2008-11-16 17:15:49 +00:00
Gerald Combs 62d20ccfb6 For libpcap captures with the DLT DLT_BLUETOOTH_HCI_H4, make sure we
initialize the P2P direction. This keeps Valgrind from complaining.

svn path=/trunk/; revision=26765
2008-11-13 00:36:52 +00:00
Stephen Fisher b380da2559 Patch from bug #2986: "Fixes and enhancements in pcapng reader"
svn path=/trunk/; revision=26556
2008-10-26 08:20:26 +00:00
Bill Meier 8afa208ffb Windows build: #include winsock2.h only when needed.
#include winsock2.h pulls in about 90 distinct .h files
and about 140 total .h files. 
Currently winsock2.h is (mostly unnecessarily) included
for each dissector via packet.h/wtap.h.
This patch removes #include winsock2.h from wtap.h and 
then includes winsock2.h (or windows.h) in the 
few specific places required. 
With this patch, my Windows Wireshark build takes 
about 30% less time.


svn path=/trunk/; revision=26535
2008-10-24 00:42:09 +00:00
Stig Bjørlykke 80b62e6728 Fixed a datatype to avoid a warning.
svn path=/trunk/; revision=26479
2008-10-16 13:36:37 +00:00
Martin Mathieson fb430597b7 Allow really long lines.
svn path=/trunk/; revision=26429
2008-10-13 16:24:42 +00:00
Jeff Morriss e801ff285c Fix for: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2926 :
provide a default case (returning an error) to prevent wiretap from asserting
out because we didn't set the packet encapsulation.

svn path=/trunk/; revision=26327
2008-10-01 13:57:41 +00:00
Anders Broman 637761d295 From Francesco Fusco:
Endace ERFII (extension header) support.

svn path=/trunk/; revision=26287
2008-09-29 16:20:24 +00:00
Gerald Combs 80e94e3ec3 Move wtap_pcap_encap_to_wtap_encap and wtap_wtap_encap_to_pcap_encap to
libwsutil.

svn path=/trunk/; revision=26233
2008-09-19 16:26:37 +00:00
Jeff Morriss 98fd7b71df Link libwireshark and wiretap against libwsutil. That was the original intent
of adding libwsutil but somehow I missed it/got it wrong.  This should solve
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1677#c18

Also remove the _DEPENDENCIES lines in epan and wiretap (as was done in the
top-level Makefile in rev 25930) so that automake will automatically figure out
the dependencies for us.

Since the those 2 libraries now link against libwsutil, don't make every
executable link against the library.  (If this works I think we can
significantly trim the list of libraries the executables link against and just
let the libraries pull in what they need--which is, apparently, the point of
the --as-needed flag: http://www.gentoo.org/proj/en/qa/asneeded.xml ).

svn path=/trunk/; revision=26218
2008-09-16 19:24:25 +00:00
Jaap Keuter b95f7e92ae Fix for bug 2875:
Fix a final eth_fopen -> ws_fopen
When configuring with --without-zlib these functions need to have some parameters tagged _U_

svn path=/trunk/; revision=26212
2008-09-15 21:50:50 +00:00
Guy Harris ba292329e0 Suggest why we might have at least 3 different network subtypes for 802.11.
svn path=/trunk/; revision=26175
2008-09-11 03:37:16 +00:00
Guy Harris 6dba0c117b A network type of 2 appears to be similar to a network type of 1
(including 0's rather than an FCS in the packet).

svn path=/trunk/; revision=26174
2008-09-10 21:55:02 +00:00
Anders Broman 5d962c8c7d From Neil Piercy:
VC6 Build problem: wiretap/k12text.c includes unistd.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2851

svn path=/trunk/; revision=26161
2008-09-07 13:43:49 +00:00
Guy Harris 9d1b5335ac g_ascii_strdown() and g_ascii_strup(), unlike g_strdown() and g_strup(),
do *not* modify the string handed to them - they g_mallocate a new
string and return it.

Create routines that *do* ASCII-only case mapping in place, and use them
instead.

Clean up indentation.

svn path=/trunk/; revision=26131
2008-09-03 19:14:52 +00:00
Gerald Combs 85fb7e2305 _MSC_VERs 1400 and greater require manifests. Check against
MSC_VER_REQUIRED when we run mt.exe instead of checking for each
individual MSVC_VARIANT. This fixes the current buildbot test failures
on Windows, which resulted from a missing check for MSVC2008. This
also keeps us from having to mess with a bunch of makefiles when we add
support for new Visual C++ versions.

svn path=/trunk/; revision=26052
2008-08-21 18:12:47 +00:00
Gerald Combs 93e34803b5 Replace "guint" with "size_t" in a couple of places.
svn path=/trunk/; revision=26021
2008-08-14 18:47:38 +00:00
Anders Broman c1e67bc6d0 From Márton Németh:
Clean up the Linux USB pseudoheader dissection.

svn path=/trunk/; revision=25990
2008-08-12 20:24:50 +00:00
Anders Broman 3eadb385c3 From Alexey Neyman:
Implement dissector for IPMB (DLT_IPMB_LINUX, 209).

svn path=/trunk/; revision=25986
2008-08-12 04:44:35 +00:00
Luis Ontanon 42c3239a1a luis.ontanon@gmail.com => luis@ontanon.org
svn path=/trunk/; revision=25937
2008-08-05 21:03:46 +00:00
Gerald Combs 7d8e29f501 From Pascal Quantin via bug 2719: Fix support for Microsoft Visual C++ 2008.
From me:

Instead of adding adns_config.h, place it a custom adns package in
wireshark-win32-libs. Update tools/win32-setup.sh accordingly.

Split the MSVC2008EE variant into MSVC2008 and MSVC2008EE, similar to
MSVC2005 and MSVC2005EE. We have to worry about vcredist_x86.exe in
both cases.

Add Pascal to AUTHORS.

Update the Developer's Guide.

svn path=/trunk/; revision=25921
2008-08-04 23:05:32 +00:00
Bill Meier df002f6b82 Remove -g abort from checkAPIs (for now) since existing issues not yet resolved.
svn path=/trunk/; revision=25759
2008-07-17 16:35:56 +00:00
Jaap Keuter 2665b689c1 From Stephen Donnelly:
ERF files can contain records of type TYPE_PAD. These records are not related
to captured packets, have a zero timestamp value and no associated packet data.
Normally TYPE_PAD records are stripped out during capture, but in rare cases
unstripped files may exist.
Previously wiretap/erf.c generated an 'unknown record encapsulation' error when
encountering TYPE_PAD records.
With this patch Wireshark skips over any TYPE_PAD records within ERF traces
files without reporting an error. TYPE_PAD records are not counted, displayed
or decoded.

svn path=/trunk/; revision=25733
2008-07-14 05:46:09 +00:00
Jeff Morriss ccd5751c19 packet-k12.c expects pseudo_header->k12.extra_info to be guchar so make it a unsigned
svn path=/trunk/; revision=25705
2008-07-11 16:37:21 +00:00
Jeff Morriss 9bd70e0d1d Don't cast a char[] into a guint32/64: the array may not be aligned correctly. This fixes a warning on Solaris/SPARC.
svn path=/trunk/; revision=25692
2008-07-09 20:16:24 +00:00
Jeff Morriss 34e3e26d07 Reindent some to get things a bit more consistent/readable.
svn path=/trunk/; revision=25691
2008-07-09 20:09:23 +00:00
Jeff Morriss 74c02268d8 Add MP3 to the list of magic types
svn path=/trunk/; revision=25690
2008-07-09 19:15:50 +00:00
Jeff Morriss a3e69d9ec5 Tighten heuristics a bit: if the caplen or iplen is 0 then it's not a valid CSIDS file
svn path=/trunk/; revision=25680
2008-07-08 22:24:32 +00:00
Jeff Morriss be97290991 Tighten heuristics a bit: traces with packets longer than 16k are no good (is this a valid limit?)
svn path=/trunk/; revision=25679
2008-07-08 22:23:26 +00:00
Guy Harris 3f215ba230 This directory needs some checkapi love; it's not yet ready for that to
be a default part of the build process, now that we're doing some more
checking.

svn path=/trunk/; revision=25658
2008-07-02 02:00:28 +00:00
Guy Harris a04774395f Add Makefile.common files for epan/dfilter and epan/ftypes.
Add checkapi rules to Makefile.am files.

svn path=/trunk/; revision=25656
2008-07-02 01:44:30 +00:00
Guy Harris b6e20d89be Put printf into a separate "termoutput" API group. For most files,
check for it - but not for TShark plugins, as they are expected to
print to the standard output.

svn path=/trunk/; revision=25653
2008-07-01 21:13:32 +00:00
Guy Harris 3d18ce8e87 The intended argument for "-g" was presumably "abort", given Gerald's
checkin comment (that Wiretap routines shouldn't abort the program).

svn path=/trunk/; revision=25650
2008-07-01 20:30:21 +00:00
Guy Harris d299a7f556 Unless I've misread the GetOptions documentation, the "-g" flag to
checkAPIs.pl takes a mandatory string argument, not an optional string
argument.

svn path=/trunk/; revision=25649
2008-07-01 20:28:26 +00:00