Commit Graph

1425 Commits

Author SHA1 Message Date
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
Gerald Combs 6012eaeafb Wiretap code probably shouldn't abort the application either.
svn path=/trunk/; revision=25615
2008-06-26 23:43:15 +00:00
Guy Harris c6ac1c31fd We don't check structure sizes elsewhere; don't check them here. (In
any case, the detailed error string is supposed to be g_malloced....)

Fix some "snoop" to be "btsnoop", and note that this is Symbian btsnoop,
not regular snoop.

svn path=/trunk/; revision=25580
2008-06-24 18:00:14 +00:00
Stig Bjørlykke cb91244d0b Fixed some "shadowed variables", as pointed out by John Smith.
svn path=/trunk/; revision=25539
2008-06-23 20:06:20 +00:00
Guy Harris 3ff150d6d6 wtap_read() and wtap_seek_read(), and thus the functions that it calls,
are expected to return a g_mallocated error string; that's why they fill
in a gchar **, not a const gchar **.  g_strdup() the argument to
KERROR(), so it's g_mallocated.

svn path=/trunk/; revision=25398
2008-05-30 02:34:45 +00:00
Guy Harris c0f20c9e07 Fix references to tcpdump-workers@tcpdump.org to refer to the new
address, tcpdump-workers@lists.tcpdump.org.

svn path=/trunk/; revision=25396
2008-05-30 01:47:57 +00:00
Guy Harris e0ea5fe220 Fix the types of k12text_read() and k12text_seek_read() to match what
the types of read and seek_read routines in Wiretap are supposed to be,
and get rid of the casts of pointers to those functions (type problems
should be fixed, not papered over with casts, whenver possible).

svn path=/trunk/; revision=25393
2008-05-29 23:40:12 +00:00
Guy Harris 9ab8f5a907 Have iseries_parse_hex_string() take a "const char *" as its first
argument, as

	1) it doesn't modify the string that argument points to

and

	2) it's a buffer of "char".

Use g_ascii_xdigit_value() and put the values of the two bytes together
ourselves; strtoul() is a bit of overkill for two-hex-digit pairs. 
While we're at it, check for invalid hex digits, and for bytes where
only one hex digit is present.

svn path=/trunk/; revision=25392
2008-05-29 23:30:51 +00:00
Jeff Morriss 3251c05742 Always set pkt_encap, not just when we have the start date. This bug, around
since rev 17756, meant that attempts to read iSeries files would fail in the
"Make sure it [pkt_encap] is not WTAP_ENCAP_PER_PACKET" assertion in
wtap_read().

Also set file_encap to WTAP_ENCAP_ETHERNET (instead of WTAP_ENCAP_PER_PACKET)
since it seems that all the packets in iSeries files are Ethernet (or at least
this module currently only supports Ethernet).

svn path=/trunk/; revision=25388
2008-05-28 15:01:16 +00:00
Martin Mathieson c6dc7911df Fix subtle bugs introduced by recent change to safer APIs.
I was counting the length without the terminating NULL, and didn't want one to be written to the string and copied into the file.








svn path=/trunk/; revision=25383
2008-05-27 10:24:25 +00:00
Guy Harris 47e7477f22 file_util.c isn't part of Wiretap any more.
svn path=/trunk/; revision=25357
2008-05-23 00:54:59 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
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-22 15:46:27 +00:00
Jeff Morriss 3803a5ed0d Use the correct name for libwsutil
svn path=/trunk/; revision=25332
2008-05-20 21:58:11 +00:00
Jeff Morriss 58459d3fba Create a new "Wireshark utility" library and move the mpeg-audio stuff from
wiretap to this new libwsutil.  This solves
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1677 by making libwireshark
no longer depend on libwiretap.

svn path=/trunk/; revision=25330
2008-05-20 21:51:01 +00:00
Jeff Morriss 73c7570102 Undo rev 24518 and (re)fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2291 .
svn path=/trunk/; revision=25327
2008-05-20 14:30:01 +00:00
Martin Mathieson ec60070b2c Enable FP R7 support.
This commit adds a header file needed by my PDCP dissector.
(not yet ready to be added).

svn path=/trunk/; revision=25326
2008-05-20 10:08:28 +00:00
Tomas Kukosa cfc4122876 do not use * wildcard which is not supported by Windows commandline
svn path=/trunk/; revision=25299
2008-05-14 10:25:18 +00:00
Anders Broman b48924f9d5 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25288
2008-05-13 19:05:35 +00:00
Anders Broman bf75c5fed2 From: Luis Ontanon
Fix errors from checkapi.

svn path=/trunk/; revision=25287
2008-05-13 19:05:03 +00:00
Martin Mathieson 7e40100fb3 From Anders: Checkapi enabled for wiretap and more functions converted.
svn path=/trunk/; revision=25257
2008-05-08 09:37:11 +00:00
Martin Mathieson 723f40845e Use g_strlcpy() rather than strcpy(), strncpy().
svn path=/trunk/; revision=25256
2008-05-08 09:17:04 +00:00
Anders Broman 6d91aae2e1 strncpy -> g_strlcpy
svn path=/trunk/; revision=25254
2008-05-08 05:16:33 +00:00
Anders Broman 3d39efc2c3 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25248
2008-05-07 05:26:40 +00:00
Anders Broman e7cc1ee2aa Add checkapi target.
svn path=/trunk/; revision=25245
2008-05-06 06:18:26 +00:00
Bill Meier 0d4b874b44 Bug 2493: Fix (Part 2):
To prevent Windows compiler errors when using flex 2.5.35.
 Fixes "missing unistd.h" and yywrap "mismatched parameter" warnings
 [Upcoming Part 3: ignore 'signed /unsigned mismatch' errors]

svn path=/trunk/; revision=25173
2008-04-25 17:40:29 +00:00
Guy Harris b821b38b10 Expand and clean up the descriptions of the new WTAP_ENCAP values.
svn path=/trunk/; revision=25163
2008-04-24 00:14:18 +00:00
Guy Harris 5738a44654 Clean up indentation. There is no guarantee that tabs will appear
every 4 spaces or every 8 spaces, so just use spaces.

svn path=/trunk/; revision=25162
2008-04-24 00:08:19 +00:00
Jaap Keuter 632a3b791c The constants are there, now they need real names.
svn path=/trunk/; revision=25159
2008-04-23 21:35:36 +00:00
Anders Broman 155cb22957 From Hannes Kälber:
new WTAP_ENCAP files(X2E Xoraya serial frame and X2E Xoraya frame )
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2418

svn path=/trunk/; revision=25154
2008-04-23 20:23:09 +00:00
Stig Bjørlykke 7925fd5f2a From Rolf Fiedler (bug 2408):
This extends the EyeSDN wiretap module to be able to support:
- DSS1/Q.931
- PPP
- LAPB/X.25
- ATM raw cells
- SS7 MTP2

svn path=/trunk/; revision=25123
2008-04-20 11:53:31 +00:00
Sake Blok 5c7b76b8a0 From Stephen Donnelly (bug 2359):
- add support for ERF files created with a snaplength
- tighten heuristics (rlen>=16, time_delta < 1 week)


svn path=/trunk/; revision=24929
2008-04-12 10:21:51 +00:00
Jaap Keuter f6bf2c9451 From Mark C. Brown:
Added support for HPVM (Integrity Virtual Machines) guest AVIO (Accelerated Virtual IO) 
driver IGSSN and 2nd generation 10 Gigabit Ethernet adapter AD386A driver ICXGBE.

svn path=/trunk/; revision=24926
2008-04-12 09:23:35 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Martin Mathieson 2f5189f014 Allocate size of data pointed to (64 bits) rather than size of pointer to data...
svn path=/trunk/; revision=24765
2008-04-04 04:44:59 +00:00
Gerald Combs 68d23708bc From Stephen Donnelly via bug 2235:
This plugin implements a dissector for Infiniband. It is released 
under the GPL v2.

Rather than using say libpcap to capture raw (unframed) IP packets 
from near the top of an IPoIB stack, this plugin dissects link level
Infiniband frames.

Infiniband trace files can be read from Endace ERF format trace 
files, or from libpcap DLT_ERF files containing ERF TYPE_INFINIBAND 
records. There is currently no native DLT_INFINIBAND in libpcap.

Each record contains a hardware timestamp, capture metadata such as 
port Id, and a complete link level Infiniband frame starting from
the Local Route Header.

svn path=/trunk/; revision=24628
2008-03-14 17:47:53 +00:00
Gerald Combs 335927f46f From Hannes Kalber:
This patch adds some new ENCAP and FILE types for wiretap. It also adds new
entries to pcap_to_wtap_map[] to provide a mapping of the new types to some
pcap DLTs.

svn path=/trunk/; revision=24622
2008-03-14 00:01:51 +00:00
Anders Broman f9ad87dd7c From Owen Kirby :
IEEE 802.15.4 dissector and DLT_ type.

svn path=/trunk/; revision=24564
2008-03-05 20:30:03 +00:00
Jeff Morriss bc580e1aa0 All our programs link against glib so don't there's no need to link our libraries against it too. This should allow us to build Wireshark (with dynamic libs) with static glib (read: it should fix the OS X buildbot building with glib-1.2).
svn path=/trunk/; revision=24518
2008-03-01 12:14:38 +00:00
Jeff Morriss 810979a0b4 Add support for DLT_IPMB (199). The dissector for these packets is in http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1970 (pending review)
svn path=/trunk/; revision=24463
2008-02-25 21:55:41 +00:00
Jeff Morriss 0e62e093c1 From Peter via http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2291 : libwiretap uses glib so add it to LIBADD.
svn path=/trunk/; revision=24432
2008-02-22 20:42:35 +00:00
Stephen Fisher 831d85448a Really fix pcapng timestamp reading and writing this time.
svn path=/trunk/; revision=24398
2008-02-20 04:41:31 +00:00
Bill Meier 5b8da491d7 Add $Id$
svn path=/trunk/; revision=24382
2008-02-18 22:39:03 +00:00
Stig Bjørlykke 7f32e1b7d3 Cast secs and nsecs correct.
Fixed some indentation.

svn path=/trunk/; revision=24353
2008-02-16 11:52:56 +00:00
Stephen Fisher ee56c90fd0 Change if_tsaccur to if_tsresol and change timestamp reading/writing
routines to correctly follow the clarified PcapNg standard document.


svn path=/trunk/; revision=24349
2008-02-16 08:07:07 +00:00
Stig Bjørlykke e3c7039015 Add a cast.
svn path=/trunk/; revision=24307
2008-02-12 00:24:49 +00:00
Guy Harris c1e833bdef Do the time calculations with 64-bit integers, rather than in floating
point, so we don't have issues with numbers not being exactly
representable; that makes it less likely that the change described below
will change a time stamp if it's not fixing the time stamp (i.e., if
time_day is 0).

The Sniffer manual "Expert Sniffer(R) Network Analyzer Operations,
Release 5.50" says that a frame2_rec has a time stamp with an 8-bit
time_high field and an 8-bit time_day field.  Interpreting the time
stamp that way fixes the time stamps in at least some captures; see, for
example, bug 2251.

Fix/update some comments (for example, the Sniffer documentation is no
longer at that URL).

svn path=/trunk/; revision=24296
2008-02-10 18:29:05 +00:00
Bill Meier bad9f18d33 Fix (Sun) compiler warnings as reported by David Kirkby: Part 1
svn path=/trunk/; revision=24295
2008-02-09 23:35:28 +00:00
Stig Bjørlykke c6af1bfdd4 Removed some "statement not reached" warnings.
svn path=/trunk/; revision=24282
2008-02-07 12:14:40 +00:00
Stig Bjørlykke 609bb57097 Corrected some types.
svn path=/trunk/; revision=24280
2008-02-07 11:42:11 +00:00
Stig Bjørlykke 468475c996 Added btsnoop.h
svn path=/trunk/; revision=24269
2008-02-04 15:54:53 +00:00
Stig Bjørlykke ef625890aa From Shane Kearns (bug 2237):
Added support for Symbian OS btsnoop.

The bluetooth HCI layer in Symbian OS can be configured to log all packets to a
file.  The log format, "btsnoop" is based on the RFC1761 "snoop" format - but
differences in the header make it incompatible.

The btsnoop format supports logging of these formats:
"H1" (raw HCI packets without framing)
"H4" (HCI UART packets including packet type header)
"H5" (HCI 3 wire UART packets including framing)
"BCSP" (HCI bluecore serial protocol including framing)

"H1" and "H4" are section numbers in the original v1 bluetooth specifications,
but still used colloquially - wireshark's existing support for Linux bluez HCI
logs uses the "H4" name.

In practice, the "H1" format is used for H5,BCSP and USB HCI logs, as the HCI
packet logs are mainly useful for debugging higher layers, bluetooth profiles
and bluetooth applications.

From me:
Deleted some unused prototypes.
Mark an unused parameter.

svn path=/trunk/; revision=24263
2008-02-03 21:11:53 +00:00
Stig Bjørlykke 47d744b59d More rewrite of prohibited APIs (sprintf, strcpy, strcat).
svn path=/trunk/; revision=24258
2008-02-03 15:38:20 +00:00
Ulf Lamping 79fbb2a272 g_warning -> pcapng_debug and "switch it off" as default, so normal users won't be annoyed by debug messages
svn path=/trunk/; revision=24198
2008-01-26 14:08:51 +00:00
Jeff Morriss 75849c12f1 s/%ll/%" G_GINT64_MODIFIER "/g
svn path=/trunk/; revision=24181
2008-01-24 21:57:13 +00:00
Stig Bjørlykke d5d2e97b47 Fixed some more malloc -> g_malloc, free -> g_free, strdup -> g_strdup.
svn path=/trunk/; revision=24180
2008-01-24 19:30:43 +00:00
Stephen Fisher a3c2114fba Use WTAP_MAX_PACKET_SIZE in place of 65535 in sanity check for snap len
(although they are the same value right now)


svn path=/trunk/; revision=24159
2008-01-22 01:05:32 +00:00
Ulf Lamping 7c59586e56 as we have BSWAP64() now, at least read 64bit section_length (but currently unused)
svn path=/trunk/; revision=24149
2008-01-21 01:54:28 +00:00
Stephen Fisher 1cf84f3d27 Introduce BSWAP64() and use it in the pcapng code
svn path=/trunk/; revision=24142
2008-01-20 02:31:34 +00:00
Ulf Lamping 65a4daed1a Make it compile on Win32 ;-)
svn path=/trunk/; revision=24141
2008-01-19 12:34:43 +00:00
Stig Bjørlykke 75804cec1a Make it compile on OSX.
svn path=/trunk/; revision=24140
2008-01-19 12:22:44 +00:00
Ulf Lamping 39114205fe various enhancements:
- read simple packet block
- read various options
- jump over unknown block types
- more sanity checks

svn path=/trunk/; revision=24139
2008-01-19 12:09:00 +00:00
Ulf Lamping 31be5fa705 decode IDB options (if_tsaccur and if_fcslen)
svn path=/trunk/; revision=24133
2008-01-18 10:29:23 +00:00
Stephen Fisher 9a1c52db82 Add link to pcap-ng format specification and use #defines for hex values of
block types.


svn path=/trunk/; revision=24128
2008-01-18 00:59:30 +00:00
Jeff Morriss ed88c589b0 Add support for DLT_SCCP (SCCP without MTP2, MTP3, or any pseudo-header).
svn path=/trunk/; revision=24119
2008-01-17 17:55:38 +00:00
Stephen Fisher 1caef26fa4 Fix seek reading by adding the size of the block length at the end of the
block to the data offset.


svn path=/trunk/; revision=24083
2008-01-14 05:31:38 +00:00
Ulf Lamping 105a6009bd some minor updates
svn path=/trunk/; revision=24082
2008-01-13 22:26:11 +00:00
Stephen Fisher a98ff5a017 Add svn:eol-style native and svn:keywords Id
svn path=/trunk/; revision=24081
2008-01-13 21:10:09 +00:00
Stephen Fisher c352fb3832 Make pcapng.c compile on Unix (with gcc)
svn path=/trunk/; revision=24080
2008-01-13 20:48:36 +00:00
Ulf Lamping 4f565d1a4d add very experimental support for pcapng "PCAP Next Generation Dump File Format" - this is incomplete and buggy, be careful!
svn path=/trunk/; revision=24079
2008-01-13 20:05:07 +00:00
Guy Harris 3fb946dbec Get rid of extra blank lines at the end of the file.
svn path=/trunk/; revision=24054
2008-01-10 08:50:16 +00:00
Guy Harris 605e462b45 Use WTAP_ENCAP_ERF as the file encapsulation, as that's what we'd
otherwise use as the per-packet encapsulation.

The close routine does nothing; get rid of it - you don't *need* a close
routine (by default, the subtype_close pointer is null, which means that
nothing per-file-type is done when the file is closed).

Make the code to handle the length fields in the ERF header common,
rather than copying it to each group of record types.

svn path=/trunk/; revision=24053
2008-01-10 08:49:11 +00:00
Jeff Morriss f75249281d From Florent Drouin:
fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1727 (pppd format file
incorrectly detected as being an ERF file) by:

The file_seek() call has been replaced by a call to file_read(), so, when the
end of the file is reached and the current record is truncated, we have got an
error.
This solves the problem of bad file format detection.

Additionaly, the ERF heuristic has been improved.

svn path=/trunk/; revision=24051
2008-01-09 22:58:34 +00:00
Tomas Kukosa 831eaa39cb more buffer functions
svn path=/trunk/; revision=23956
2007-12-28 07:38:06 +00:00
Tomas Kukosa 1e229a76c7 export more buffer functions from wiretap
svn path=/trunk/; revision=23952
2007-12-27 13:35:44 +00:00
Jörg Mayer e7374fc016 _SOURCE has magic meaning and isn't to be used by non-wizards.
Aka: Newer autofoo tools broke because of the _SOURCE ending.

svn path=/trunk/; revision=23904
2007-12-17 23:35:02 +00:00
Stig Bjørlykke fa34d46851 From Fulko Hew:
1/ patches to support the libpcap/SITA format 'WTAP_ENCAP_SITA'.
2/ patches to the LAPB dissector to accept MLP (Multi-link protocol)
   (although MLP dissection has _not_ been added (yet)).
3/ New protocol dissectors for:
   a) SITA's WAN layer 0 status header,
   b) An airline protocol ALC,
   c) An airline (and other industry) protocol UTS.

These patches are submitted as a set since the new protocol dissectors are not
useful without the libpcap/SITA related changes, and there is no point in
having those changes without the additional dissectors.

This fixes bug/enhancement 2016.

svn path=/trunk/; revision=23885
2007-12-16 14:21:37 +00:00
Stig Bjørlykke 672659c0c2 From Marton Nemeth:
Error message when capturing too short WTAP_ENCAP_USB_LINUX type packets
contains a copy-paste typo.

From me:
Fix some addresses in AUTHORS.

svn path=/trunk/; revision=23882
2007-12-16 13:01:13 +00:00
Guy Harris a818a686ca wtap_process_pcap_packet() is gone; remove it from the list of exported
functions.

svn path=/trunk/; revision=23806
2007-12-08 03:57:04 +00:00
Guy Harris 9ea3c33ad5 Add .. to the directory in which to look for headers, just as is done
with automake/autoconf, so we pick up config.h.

svn path=/trunk/; revision=23805
2007-12-08 03:22:58 +00:00
Guy Harris 0ca5f6ace4 Get rid of wtap_process_pcap_packet(); it's no longer used. Get rid of
no-longer-needed wiretap/wtap-capture.h.

Clean up wiretap/libwiretap.vcproj (note: this isn't going to scale, if
it has to contain a list of all the files, as most committers will be
editing only Makefile.common files).

svn path=/trunk/; revision=23803
2007-12-08 00:10:33 +00:00
Guy Harris 947e70b4b7 Delete the *right* config.h.win32.
Copy the MSVC++-version-checking stuff from it into the top-level
config.h.win32, and try to set up config.nmake so that MSC_VER_REQUIRED
is defined in all Makefiles that include config.nmake.

svn path=/trunk/; revision=23802
2007-12-07 23:58:46 +00:00
Guy Harris 4408764e69 HAVE_PCAP_H is no longer defined; just use HAVE_LIBPCAP.
Fix indentation.

svn path=/trunk/; revision=23798
2007-12-07 23:42:19 +00:00
Guy Harris 8b14380c28 Run runlex.sh from the tools directory. Get rid of the extra copy in
the top-level directory.

Don't build config.h in the wiretap directory - it now uses config.h
from the top-level directory.  Get rid of the template config.h.win32 in
that directory.

Get rid of files that are no longer in the wiretap directory or are no
longer constructed in that directory.

svn path=/trunk/; revision=23797
2007-12-07 23:38:59 +00:00
Jörg Mayer 4fa211ef56 Get rid of configure in wiretap. Finally!
svn path=/trunk/; revision=23795
2007-12-07 18:59:32 +00:00
Guy Harris fb9e67e955 Get rid of 8-bit charcters in the example ETHERWATCH output - they can
cause gastric distress to at least som eversions of MSVC, and possibly
other compilers.

svn path=/trunk/; revision=23790
2007-12-07 01:18:17 +00:00
Ulf Lamping 99d60cce59 first steps to support MSVC 2008 Express Edition
svn path=/trunk/; revision=23691
2007-11-30 22:01:05 +00:00
Bill Meier 7f9585782d Fixes for Windows build w/o ZLIB
svn path=/trunk/; revision=23651
2007-11-28 20:06:21 +00:00
Stephen Fisher 9fbb31194c Add support for showing wireless LAN info (signal strength / rate / channel)
in Wireshark when reading CommView files.  Also write out these values when
coming from a file format with encapsulation type 802.11 with radio.


svn path=/trunk/; revision=23617
2007-11-27 05:43:29 +00:00
Ulf Lamping 98421df935 fix mpa_... problems
svn path=/trunk/; revision=23616
2007-11-27 01:49:40 +00:00
Jeff Morriss 1cd46ec7be Get rid of the global data structures populated by wiretap/mpeg-audio but
used by the mpeg-audio dissector: instead keep the data inside the wiretap
module and add accessor functions.  I think this should fix
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1677 and anyway it's
cleaner.

svn path=/trunk/; revision=23612
2007-11-26 23:06:07 +00:00
Jeff Morriss 309f7503e5 Get rid of C++/C99 style comments--not all compilers support them
svn path=/trunk/; revision=23608
2007-11-26 18:55:17 +00:00
Stephen Fisher b19c9f164e Change %G to %Y for year in strftime() so it works on Windows also (%G is an extension found at least on OS X). Also change from 4 to 5 bytes in each strftime() to allow space for the NULL terminator with 4 character outputs.
svn path=/trunk/; revision=23595
2007-11-26 08:08:51 +00:00
Stephen Fisher 91cd7ec475 Add writing support for the CommView file format.
svn path=/trunk/; revision=23594
2007-11-26 05:34:07 +00:00
Guy Harris d283cb18ab Clean up a comment.
svn path=/trunk/; revision=23579
2007-11-25 02:06:41 +00:00
Stig Bjørlykke 1497361156 Removed a "/*" within comment.
svn path=/trunk/; revision=23578
2007-11-25 01:53:45 +00:00
Stig Bjørlykke 0e229d8d63 Corrected setting of "warnings_as_errors_default".
svn path=/trunk/; revision=23577
2007-11-25 01:48:01 +00:00
Guy Harris 274c8c8670 Put in a comment about encapsulation hint values.
svn path=/trunk/; revision=23576
2007-11-25 00:50:49 +00:00
Guy Harris 1304dbf5f6 Note that the encapsulation type values are SNMP ifType values, and
suggest that perhaps WTAP_ENCAP_PER_PACKET be used for
propPointToPointSerial and HDLC.

svn path=/trunk/; revision=23575
2007-11-25 00:23:37 +00:00
Guy Harris 30cba1474c From James Menzies: if the per-packet encapsulation hint is 14, the
packets are always PPP, otherwise they're of an unknown type and we use
a heuristic to guess the type.

svn path=/trunk/; revision=23573
2007-11-24 23:43:21 +00:00
Stephen Fisher 8c0f4111ea Initial checkin of support to read TamoSoft's CommView packet capture files
per enhancement bug #1795.


svn path=/trunk/; revision=23558
2007-11-24 03:33:18 +00:00
Guy Harris 5dcf1db5f5 Get rid of a no-longer-used variable.
svn path=/trunk/; revision=23537
2007-11-21 22:47:36 +00:00
Guy Harris 5bbdbf6efb Don't use "if it begins with 0xff 0x03 it's PPP, otherwise it's Cisco
HDLC" to try to distinguish Cisco HDLC from PPP packets;
Address-and-Control-Field-Compression can be negotiated on, so there's
no guarantee that PPP frames begin with 0xff 0x03.  Fixes bug 2005.

svn path=/trunk/; revision=23535
2007-11-21 22:16:04 +00:00
Gerald Combs 4e70cac80c Make it easier to change the default behavior of --enable-warnings-as-errors.
svn path=/trunk/; revision=23531
2007-11-21 18:32:44 +00:00
Gerald Combs 3ce14803f9 Get the number of captured bytes from "rlen" instead of "wlen". This should
fix bug #1983.

svn path=/trunk/; revision=23500
2007-11-19 19:09:01 +00:00
Martin Mathieson 6823dd10fa Some comments and formatting.
svn path=/trunk/; revision=23473
2007-11-16 22:56:56 +00:00
Sake Blok 88589dc889 Added correct svn propset settings to wiretap/netscreen.[ch]
svn path=/trunk/; revision=23464
2007-11-15 19:46:25 +00:00
Anders Broman 5cd9fcc943 From Florent Drouin:
Fix bug Some Toshiba format files with LAPD cannot be open
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1711

svn path=/trunk/; revision=23379
2007-11-06 19:22:51 +00:00
Anders Broman e10e84c243 Strengthen BER and ERF heuristics to solve:
Fail to load I4B traces http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1972

svn path=/trunk/; revision=23367
2007-11-05 20:43:25 +00:00
Sake Blok f0313f6407 Bug 1751: From Allan M. Madsen :
When trying to open a pcap file with the new pseudo-header/DLT (using SVN
version, changelist 23283) I get the error message:
"libpcap: ERF file has a 13-byte packet, too small to have even an ERF
pseudo-header".

After reviewing Paolo's patch I found that there are 2 places with missing
breaks in switch case structures.



svn path=/trunk/; revision=23298
2007-10-28 18:52:45 +00:00
Anders Broman e6fc9efb62 From Mark C. Brown:
Add support for the new NS_LS_SCTP tracing subsystem.

svn path=/trunk/; revision=23290
2007-10-27 15:44:12 +00:00
Stephen Fisher 721e353447 Fix bug #1926: buffer overflow when parsing iseries files
svn path=/trunk/; revision=23232
2007-10-19 22:40:42 +00:00
Sake Blok 6bec9d3d9e From tmiller@hcjbtech.org : Spelling error on GDS DB protocol dissector: "Buffer lenght:"
(recursively grepped through the source and corrected all occurences, even 
the ones just in comments)



svn path=/trunk/; revision=23211
2007-10-16 23:42:33 +00:00
Guy Harris 4e6eec17b1 Bug 1704 is fixed in the main branch by the simpler expedient of not
using modf() and thus not requiring libm.  In addition, adding -lm to
the dependencies upsets the build on at least some platforms because
"-lm" isn't a pathname.

svn path=/trunk/; revision=23210
2007-10-16 19:01:58 +00:00
Jeff Morriss 0f82a3e7e8 From Paolo Abeni via bug 1751:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1751

The patch adds support to wiretap for a new libpcap DLT for bluetooth captures.
This DLT carries the direction information, which now can be displayed
correctly.
The hci H4 dissector is updated to handle also the newly introduced wtap encap.

svn path=/trunk/; revision=23208
2007-10-16 17:19:16 +00:00
Jeff Morriss 853e791444 Change more fopen() to eth_fopen() to finish fixing bug 1827:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1827

Update README.developer to tell developers not to use fopen() and friends
directly.

svn path=/trunk/; revision=23206
2007-10-16 15:43:18 +00:00
Bill Meier 3179e5cc6d Tighten up heuristic used to identify Ascend capture file....
svn path=/trunk/; revision=23152
2007-10-11 22:07:55 +00:00
Ulf Lamping 9e01356f7a minor updates
svn path=/trunk/; revision=23105
2007-10-09 05:37:34 +00:00
Anders Broman b9f9b33e0e From Florent DROUIN:
This is a replacement of the existing decoding of ERF files (Extensible Record
Format from Endace). 
For the decoding of the ERF files, according to the "type of record" given in
the ERF header, several decoders can be used. Up to now, the decoder is
determined according to an environment variable, or with a kind of heuristic.
And, all the treatment is done during the file extraction.

The new architecture, will separate the ERF file decoding, and the ERF record
decoding. The ERF records will be decoded with a specific dissector. This
dissector can be configured with options, to replace the environment variable.

http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1839

svn path=/trunk/; revision=23092
2007-10-08 11:41:21 +00:00
Ulf Lamping 474bdf9687 fix some comments and sort functions by functionality
svn path=/trunk/; revision=23063
2007-10-03 17:59:33 +00:00
Ulf Lamping 0e400cafb4 update to changes in the source files
svn path=/trunk/; revision=23062
2007-10-03 17:57:57 +00:00
Sake Blok a2778dcb27 When reading NetScreen snoop output, only use WTAP_ENCAP_PER_PACKET
if there are packets with different encapsulationtype in the file.
Otherwise use the encapsulationtype of the packets in the file. 

This makes it possible to save the imported data as libpcap file
(or any other format that does not support per-packet encapsulation).

svn path=/trunk/; revision=23031
2007-09-29 07:55:25 +00:00
Bill Meier f4e9824c46 Add error checking for fwrites; replacement for the 2nd of the patches provided in bug #1864
svn path=/trunk/; revision=23015
2007-09-28 17:22:03 +00:00
Sake Blok 235ab1445a When reading NetScreen snoop output, allow the '.' in interface names
so that packets on subinterfaces are accepted too.

svn path=/trunk/; revision=23012
2007-09-28 14:37:15 +00:00
Sake Blok 0e4ae39920 From Martin Warnes:
Attached is a small patch that correct an issue with reading certain IBM
iSeries Comms traces.

Traces where data has been dropped for whatever reason now have the
packet number suffixed with an asterix "*", this causes the current
iSeries wiretap routine to report a "bad" header. The attached patch
simply scans the packet number field and removes any "* characters prior
to scanning, the fact that data may be missing is more than adequately
reported later by current wireshark packet processing.

Regards .. Martin


svn path=/trunk/; revision=23000
2007-09-27 18:36:17 +00:00
Bill Meier 90160079c0 Fix whitespace of newly added lines to match rest of file
svn path=/trunk/; revision=22965
2007-09-25 20:34:06 +00:00
Bill Meier 151a51d956 Add error checking for fwrites; replacement for one of patches provided in bug #1864
svn path=/trunk/; revision=22964
2007-09-25 19:59:50 +00:00
Sake Blok dc3fcc1c5b Allow the output of NetScreen VSI interfaces to be parsed.
svn path=/trunk/; revision=22947
2007-09-25 05:42:22 +00:00
Jörg Mayer f3c4a9def0 Add ascend-grammar.h explicitely to the generation rules, otherwise
make distclean on a really clean source tree will fail.


svn path=/trunk/; revision=22933
2007-09-24 06:58:23 +00:00
Jaap Keuter 42ee794742 From Pieter de Boer:
tshark can read a HP-UX nettl IP packet dump (written with 'nettl -traceon all
-entity ns_ls_ip -file dump'), but cannot convert it to a pcap raw IP packet
dump, with 'tshark -r dump.nettl -w dump.pcap'. A single-line patch to
wiretap/libpcap.c makes it possible to do this.

The input file uses encapsulation type WTAP_ENCAP_NETTL_RAW_IP.

svn path=/trunk/; revision=22849
2007-09-11 21:31:21 +00:00
Ulf Lamping 830c6e094a translate some german to english
svn path=/trunk/; revision=22832
2007-09-09 14:58:02 +00:00
Ulf Lamping 1366745e45 start an experiment to provide MS Visual Studio 2005 solution / project files for a lot easier debugging. They still use the underlying Makefile.nmake files for the actual build process.
svn path=/trunk/; revision=22831
2007-09-09 13:59:58 +00:00
Sake Blok 98be4e676e This patch solves two issue with the NetScreen wiretap routine:
- It accepts the "/" character in interface names
- It accepts EOF as delimiter for the last packet (when there is no more emptyline)

svn path=/trunk/; revision=22765
2007-09-01 11:14:01 +00:00
Stephen Fisher f76387ba1c From Scott Robinson:
Enhancement patch:
  http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1758

This change gives Wireshark the ability to read ATM captures saved by UpTime
Select traffic capture.


svn path=/trunk/; revision=22612
2007-08-23 22:11:39 +00:00
Jeff Morriss 4020fb9c39 Move wtap_pcap_encap_to_wtap_encap()'s definition to libpcap.h so packet-ppi.c can get access to it even when we don't HAVE_LIBPCAP (besides, it doesn't seem to be specific to capturing...)
svn path=/trunk/; revision=22591
2007-08-22 19:38:49 +00:00
Guy Harris 2c041a8fa4 Cast away shortening conversions that are presumed not to lose any data.
Use G_GINT64_CONSTANT() to make a 64-bit integral constant; not all
compilers we use support LL as a suffix for that (MSVC++ 6, for one).

svn path=/trunk/; revision=22580
2007-08-22 02:45:42 +00:00
Richard van der Hoff e6002deb3e From Shaun Jackman <sjackman@gmail.com> / bug 1753:
* asn1/mpeg/packet-mpeg-pes-template.c: Improved decoding of PES
        extension header and Pack header. Decode SCR, PTS, and DTS.
        * asn1/mpeg/mpeg-pes.asn (Pack): Remove.
        * epan/dissectors/packet-mpeg-pes.c: Regenerate.
        * wiretap/mpeg.c (mpeg_read): Decode the SCR using integer
        arithmetic instead of double float arithmetic to prevent rounding
        error.
        * wiretap/wtap-int.h (mpeg_t) <t0>: Use time_t instead of double.


svn path=/trunk/; revision=22577
2007-08-21 22:00:06 +00:00
Guy Harris c193066114 At least some LAPB Windows Sniffer captures have 4 bytes of extra stuff
at the ends of packets.

svn path=/trunk/; revision=22540
2007-08-17 20:04:31 +00:00
Sake Blok 47ec0bead9 (http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1717)
This patch adds support for the Juniper NetScreen snoop output format. 
It takes a text-dump op the captured packets and parses the headers 
and hex-data. Since the snoop files on a Junpiper NetScreen can be saved 
to a tftp-server, this patch makes it quite easy to use the snoop 
function of the Juniper NetScreen firewalls.

/* XXX TODO:
 *
 * o  Create a wiki-page with instruction on how to make tracefiles
 *    on Juniper NetScreen devices. Also put a few examples up
 *    on the wiki (Done: wiki-page added 2007-08-03)
 *
 * o  Use the interface names to properly detect the encapsulation
 *    type (ie adsl packets are now not properly dissected)
 *    (Done: adsl packets are now correctly seen as PPP, 2007-08-03)
 *
 * o  Pass the interface names and the traffic direction to either
 *    the frame-structure, a pseudo-header or use PPI. This needs
 *    to be discussed on the dev-list first
 *    (Posted a message to wireshark-dev abou this 2007-08-03)
 *
 */


svn path=/trunk/; revision=22533
2007-08-17 08:03:32 +00:00
Guy Harris adea9d1ffc Parenthesize macro arguments.
svn path=/trunk/; revision=22480
2007-08-09 22:50:16 +00:00
Jaap Keuter f0b944adc9 Fix for bug 1659:
Changed eth_dir_get_name(dirent) macro

svn path=/trunk/; revision=22478
2007-08-09 20:40:32 +00:00
Jaap Keuter 171efad2b8 Fix for bug 1704:
libm required if C library is not libc (like uclibc)

svn path=/trunk/; revision=22475
2007-08-09 06:52:13 +00:00
Luis Ontanon 96f81d7eba From: Shaun Jackman
This patch adds MPEG PES (packetized elementary stream) to the list of
magic types in wiretap/mpeg.c.


svn path=/trunk/; revision=22460
2007-08-06 22:34:26 +00:00
Guy Harris 5238bd07f1 One quote mark sufficeth.
svn path=/trunk/; revision=22451
2007-08-04 03:47:20 +00:00
Guy Harris b1e9777a81 1989 was quite a while ago. We use function prototypes extensively;
don't worry about YY_PROTO, which isn't defined with the newer shinier
versions of Flex.

svn path=/trunk/; revision=22450
2007-08-04 03:27:18 +00:00
Guy Harris 0f6b7b836e runlex.sh is in tools, not the top-level directory.
svn path=/trunk/; revision=22449
2007-08-04 03:14:00 +00:00
Guy Harris c2d8a39d95 Sigh, crufty old shells. The Solaris test(1) manual says that
1) "-e" isn't supported by good old /bin/sh, so we use "-r"
	   instead;

	2) "The algorithm for determining the precedence of the
	   operators and the return value that will be generated is
	   based on the number of arguments presented to test", so we
	   explicitly parenthesize.

svn path=/trunk/; revision=22448
2007-08-04 03:11:06 +00:00
Guy Harris 517d6d57e4 Oops, forgot to check in the script for running Flex/Lex.
svn path=/trunk/; revision=22447
2007-08-04 02:36:21 +00:00
Guy Harris 5be4499ad1 Add a script as a front-end for Flex, to work around various problems,
such as the fact that Flex strips all but the last component of the "-o"
argument, and that it doesn't generate a header file to declare routines
the generated lexical analyzer defines.  Use that script when building
lexical analyzers, and, for each lexical analyzer, include the generated
header file in the generated analyzer.

svn path=/trunk/; revision=22446
2007-08-04 02:13:52 +00:00
Guy Harris 46be54cee3 Add a Makefile.nmake.inc file, to hold rules etc. used by multiple
Makefile.nmake files; currently, it has the (F)lex-to-C rule and a
.SUFFIXES pseudo-rule to add .l to the list of suffixes.  Have
Makefile.nmake files with .l.c rules include Makefile.nmake.inc to get
that rule.

The names Makefile.am.inc and Makefile.nmake.inc aren't necessarily the
right names for the files in question.

Use $(PACKAGE) in the Mate plugin's Makefile, rather than "mate".

svn path=/trunk/; revision=22437
2007-08-01 22:20:38 +00:00
Guy Harris 159e795100 Add a Makefile.am.inc file, to hold rules etc. used by multiple
Makefile.am files; currently, it has the (F)lex-to-C rule.  Have
Makefile.am files with .l.c rules include Makefile.am.inc to get that
rule.

svn path=/trunk/; revision=22436
2007-08-01 20:35:05 +00:00
Guy Harris 61dd46fa9c Use a common .l.c rule for running Flex on .l files, just as is done on
UN*X.

svn path=/trunk/; revision=22434
2007-08-01 00:22:25 +00:00
Martin Mathieson 0a5437dc33 Add "igmp" -> "ip" mapping.
svn path=/trunk/; revision=22430
2007-07-31 13:53:45 +00:00
Guy Harris 968d363f11 Add comments to various %option items to explain what they're doing.
Move the %options to the beginning if they weren't already there, and
put them in the same order in all files.

Add "prefix=" options to .l files that don't already have them, so we
don't have to pass a "-P" option.

Add "never-interactive" and "noyywrap" options to our lexical analyzers,
to remove extra isatty() checks and to eliminate the need for yywrap()
from the Flex library.

Get rid of %option nostdinit - that's the default.

Add .l.c: rules to Makefile.am files, replacing the rules for specific
.l files.  Have those rules all check that $(LEX) is set.

Update the address for the FSF.

svn path=/trunk/; revision=22424
2007-07-30 20:22:37 +00:00
Guy Harris f104bfa2ad I think the intent, at least, is to allow people to build Wireshark from
a source release tarball without having Flex (think of a source release
tarball being as much a platform-independent distribution format for
people *not* interested in development, and who are on platforms for
which there aren't binary packages, as a way of getting the source to do
development).  Don't check Flex's capabilities in the configure script
(handling reentrant scanners would have to be done differently).

svn path=/trunk/; revision=22414
2007-07-27 18:52:05 +00:00
Guy Harris 96ef450636 Step 1 in adding support for reentrant Flex scanners if Flex supports
them - check whether Flex supports them.

svn path=/trunk/; revision=22410
2007-07-27 02:51:42 +00:00
Martin Mathieson 2cf2fed06a More space needed for wimax frames.
svn path=/trunk/; revision=22395
2007-07-24 15:15:02 +00:00
Guy Harris 90ab61d9f7 Fix another cast of the argument to a ctype.h macro.
svn path=/trunk/; revision=22305
2007-07-14 00:29:03 +00:00
Guy Harris 3ccd39aec7 Fix more ctype.h calls - casting to "int" suppresses the warning, but
doesn't fix the problem, as the sign extension is still done; you have
to cast to "guchar".

svn path=/trunk/; revision=22304
2007-07-13 23:20:02 +00:00
Guy Harris 7e95109118 "isdigit()" doesn't need to be cast to "int".
Its argument, however, needs to be cast to "guchar", so that if the
high-order bit is set, it doesn't get sign-extended.

svn path=/trunk/; revision=22303
2007-07-13 23:18:04 +00:00
Martin Mathieson c4ebb075e7 Worked out properly the silly way aal header is encoded!
svn path=/trunk/; revision=22300
2007-07-13 15:51:34 +00:00
Jaap Keuter 6d6affd859 From Jim Paris:
The encap_table_base in wcap.c is missing an entry.
This causes e.g. "dumpcap -i usb3 -L" to output:
  Data link types (use option -y to set):
    USB_LINUX
   (MPEG)

svn path=/trunk/; revision=22292
2007-07-12 19:55:12 +00:00
Guy Harris 3242580dfa Check %l[doux] first, when looking for the format to use with 64-bit
integral data types, so we handle LP64 platforms if "gint64" is just a
"long int".

svn path=/trunk/; revision=22281
2007-07-09 20:27:38 +00:00
Jaap Keuter 668689a69d Now it really can read MP3 files, without SIGABRT.
svn path=/trunk/; revision=22261
2007-07-06 22:27:03 +00:00
Martin Mathieson 1d477c802c - Map gre -> IP
- Change a value string value to help an easily-frightened colleague

svn path=/trunk/; revision=22224
2007-06-29 16:16:57 +00:00
Martin Mathieson 1b8fccbc9d Don't create & leak a hash table during unsuccessful open()
svn path=/trunk/; revision=22150
2007-06-21 17:30:13 +00:00
Gerald Combs d1a745f27b Add support for PPI (the Per-Packet Information header), described at
http://www.cacetech.com/documents/PPI_Header_format_1.0.pdf .

svn path=/trunk/; revision=22094
2007-06-13 22:36:58 +00:00
Luis Ontanon e3fc848842 turns out that wtap_pkthdr was not exportable!
nm on my mac says it is there...


svn path=/trunk/; revision=22093
2007-06-13 19:43:26 +00:00
Luis Ontanon df05be6cf4 Export all that's exportable from libwiretap.dll
svn path=/trunk/; revision=22092
2007-06-13 19:06:19 +00:00
Luis Ontanon d24ceffe73 Fix coverity bug 244, [WS Bug 1649]
svn path=/trunk/; revision=22091
2007-06-13 19:05:03 +00:00
Bill Meier 68cdbd4e65 Note invalidity of realtick for
captypes ETH_CAPTYPE_OTHERPOD2 and
ETH_CAPTYPE_GIGPOD2 in comments for
the associated TpS tables.

svn path=/trunk/; revision=22074
2007-06-11 15:50:03 +00:00
Guy Harris 230c951306 From Stephen Donnelly of Endace:
The code for reading ERF files has not been significantly
	updated since 2004.  This patch brings it up to date with a
	number of changes.

	1) Increase number of decodable ERF types from 7 to 12. This
	   covers newer DAG card models and firmware updates.

	2) Fix timestamp conversion. Was calculating only microsecond
	   precision, now displaying with nanosecond resolution.  Hardware
	   precision is 7.5 to 30 ns depending on model.

	3) Allow the user to specify HDLC encapsulation as 'chdlc',
	   'ppp_serial', 'frelay' or 'mtp2'.  This is needed because the
	   ERF HDLC capture formats do not include information on what
	   protocol is used at the next level.  This is currently done via
	   an environment variable 'ERF_HDLC_ENCAP' and is analagous to the
	   existing 'ERF_ATM_ENCAP' variable.

	   If the user does not specify an HDLC encapsulation it tries to
	   guess, and falls back to MTP2 for backwards compatibility with
	   Florent's existing behaviour.

	   I know environment variables are ugly, suggestions are welcome.

	4) When reading HDLC captures as MTP2, use
	   WTAP_ENCAP_MTP2_WITH_PHDR rather than WTAP_ENCAP_MTP2.  This
	   allows us to put the 'Multi-Channel ERF' record 'channel
	   number' field into the MTP2 pseudo header > 'link_number'
	   field.  This is then displayed in Frame information, and can
	   be filtered on.  (Would be nice if it could be made a display
	   column?)

	Because the ERF record does not specify whether Annex A is used
	or not, we pass MTP2_ANNEX_A_USED_UNKNOWN and allow the existing
	user preference to decide.

Move the MTP2_ANNEX_A_ definitions into Wiretap, make the annex_a_used
field a guint8, and change MTP2_ANNEX_A_USED_UNKNOWN to 2 so it fits in
a guint8.  (This means that if you can save an ERF MTP2 file as a
libpcap file, the pseudo-header will have MTP2_ANNEX_A_USED_UNKNOWN in
it.)

svn path=/trunk/; revision=22067
2007-06-08 17:06:13 +00:00
Luis Ontanon 475916db3c Actually implement wtap_register_file_type() and have it returning the ID of the new file type.
Add few functions to wiretap's exported API.



svn path=/trunk/; revision=22060
2007-06-06 20:56:38 +00:00
Guy Harris 35546bfcc8 Note the version numbers in NetMon 3.0 files.
svn path=/trunk/; revision=22050
2007-06-05 17:17:22 +00:00
Guy Harris ef511c0bbc Note realtick's invalidity for ETH_CAPTYPE_OTHERPOD in the comment for
TpS_otherpod[].  Ask about its validity for ETH_CAPTYPE_OTHERPOD2 and
ETH_CAPTYPE_GIGPOD2.

svn path=/trunk/; revision=22016
2007-05-31 05:51:15 +00:00
Guy Harris aa3ac312b2 My comment is redundant with Bill's more-detailed comment; remove it.
svn path=/trunk/; revision=22015
2007-05-31 05:46:45 +00:00
Bill Meier e88e33d5e2 Update Comments
svn path=/trunk/; revision=22005
2007-05-30 15:32:31 +00:00
Guy Harris 70a9743831 Update a comment.
svn path=/trunk/; revision=21998
2007-05-30 00:36:32 +00:00
Guy Harris cba6441fa4 Give more detail on a captype of 6 for an Ethernet capture.
svn path=/trunk/; revision=21997
2007-05-29 23:35:45 +00:00
Guy Harris acde0f9f8a It's pretty clear that hdr.captype's interpretation depends on the
network type; there's no "presumably" about it.

Suggest that "realtick" might have the right time stamp in other cases
(if not, a comment should explicitly indicate that, so that in all cases
where we either know that realtick is wrong or have a lot of evidence to
show that it's right, we note that fact).

svn path=/trunk/; revision=21996
2007-05-29 23:31:03 +00:00
Guy Harris f93cf6dd86 Update the big time unit comment to reflect Bill Meier's recent changes.
Fix some other comments.

Add a suggestion for why the realtick values might correlate with
packets having an FCS.

svn path=/trunk/; revision=21993
2007-05-29 22:52:42 +00:00
Martin Mathieson 2d6388599a Work with isdn_l2.
svn path=/trunk/; revision=21986
2007-05-29 14:38:40 +00:00
Bill Meier 0bf864bc32 (fix comment)
svn path=/trunk/; revision=21983
2007-05-29 14:27:42 +00:00
Bill Meier 3b12c867a2 Another sniffer timestamp display fix; addresses bug 866 and other reports.
(Also: change variable name to correctly reflect usage).

svn path=/trunk/; revision=21982
2007-05-29 14:20:54 +00:00
Guy Harris 267a2cbf02 Print a gint64 the right way.
svn path=/trunk/; revision=21976
2007-05-29 06:16:24 +00:00
Sebastien Tandel 76729e5d0f From David Howells :
Fix compilation failures when building wireshark-0.99.6-SVN-21916 on an
x86_64-unknown-linux-gnu target with gcc version 4.1.2 20070403 (Red Hat
4.1.2-8).

The failures fall into two categories:
  (1) Casts between pointers and 32-bit integers without an intermediary cast
via 'long' or 'unsigned long'.  This results in a compiler warning complaining
about casts between a pointer and an integer of a different size.
  (2) Passing values to "%lld" or similar printf-style format options that the
compiler thinks are a different size.  Such values need to be cast to 'long
long' or 'unsigned long long'.

svn path=/trunk/; revision=21975
2007-05-29 02:43:18 +00:00
Guy Harris 00c0d3de9f Throw in some casts to suppress warnings.
svn path=/trunk/; revision=21971
2007-05-28 08:31:18 +00:00
Guy Harris e49fe5baec Change the Wiretap code so that it doesn't dereference
possibly-unaligned pointers, and turn on -Wcast-align so at least some
future code that does that will fail to compile.

svn path=/trunk/; revision=21968
2007-05-28 06:47:50 +00:00
Luis Ontanon 9e7615967b remove the never used wiretap/wtap-plugins.c
svn path=/trunk/; revision=21936
2007-05-25 17:23:46 +00:00
Guy Harris 4703ca6fc4 Get rid of CR's, and add a newline at the end.
Set svn:keywords and svn:eol-style appropriately.

svn path=/trunk/; revision=21923
2007-05-24 17:02:06 +00:00
Guy Harris b0f2653497 Back out the previous change.
svn path=/trunk/; revision=21918
2007-05-24 12:00:55 +00:00
Guy Harris cbd762e968 Temporarily turn on a bunch of warnings and turn off -Werror, to see
what the complete set of warnings we should either try to fix or, for
cases where it can't be fixed, turn off or or avoid -Werror for.  I'll
revert this change as soon as a complete set of buildbot builds start
with it.

svn path=/trunk/; revision=21917
2007-05-24 11:43:53 +00:00
Jaap Keuter 3272e98c39 Fix for bug 1601: handle zero length packets.
svn path=/trunk/; revision=21904
2007-05-23 06:03:48 +00:00
Jörg Mayer b7755fb4e4 Fix some (incorrect but unforseeable)
"might be used uninitialized" warnings.

svn path=/trunk/; revision=21862
2007-05-21 16:16:18 +00:00
Ronnie Sahlberg 532f102662 make the workaround use static so it wont dissapear when the frame ends
svn path=/trunk/; revision=21851
2007-05-21 02:13:21 +00:00
Ronnie Sahlberg 12f013d5fa workaroung a warning for const that prevents gtk1 builds
svn path=/trunk/; revision=21850
2007-05-21 02:12:19 +00:00
Jörg Mayer e3e1d07557 Fix a typo to make compiling with extra-gcc flags disable compiling with
errors.

svn path=/trunk/; revision=21840
2007-05-20 14:40:45 +00:00
Sebastien Tandel 2f921aa4c7 typo fix
svn path=/trunk/; revision=21836
2007-05-19 18:42:58 +00:00
Sebastien Tandel c60b0a4f3a temporarily put cast-align in extra-gcc-warnings while compilation on Solaris
slave generates 'cast increases required alignment of target type' warnings. 


svn path=/trunk/; revision=21835
2007-05-19 18:38:45 +00:00
Sebastien Tandel 55a4b5ad93 temporarily disable cast-align warnings
svn path=/trunk/; revision=21821
2007-05-18 00:04:58 +00:00
Sebastien Tandel e545636a4f include generator sources in EXTRA_DIST
svn path=/trunk/; revision=21820
2007-05-18 00:00:10 +00:00
Sebastien Tandel 8e9a3ba58d Since code generated by lex may trigger gcc warnings, we are now generating two
libraries.  A single library is generated with the lex code without the barrier
"stop on warning". An other library is generated from the remaining source
files with the "stop on warning" barrier.


svn path=/trunk/; revision=21817
2007-05-17 18:02:22 +00:00
Martin Mathieson 47a9c22ad4 mipv6 -> ip
svn path=/trunk/; revision=21741
2007-05-10 15:29:38 +00:00
Ulf Lamping b2afad68fb fix manifest error: for dll's mt.exe must be given ;2
svn path=/trunk/; revision=21735
2007-05-09 06:33:22 +00:00
Jörg Mayer 5b41e5bec5 propset...
svn path=/trunk/; revision=21725
2007-05-08 17:12:59 +00:00
Ronnie Sahlberg a7faef785f new attempt to resolve recent breakage
svn path=/trunk/; revision=21710
2007-05-07 07:33:26 +00:00
Ronnie Sahlberg 119634f650 GTK1 does not have GDir and as such needs to include dirent.h
Since wiretap.h is not autogenerated, just make wtap-plugins.h include
the top level config.h to pull in the defines for HAVE_DIRENT which was 
checked at top level


svn path=/trunk/; revision=21707
2007-05-07 06:17:58 +00:00
Ulf Lamping 0abc3ba979 instead of copying the MSVC 2005 manifest files around, embed them into the .exe / .dll files - this way is easier to handle while packaging and alike, and probably will solve some problems. We might want to do this for the plugins as well later.
svn path=/trunk/; revision=21696
2007-05-06 09:17:19 +00:00
Ulf Lamping 3c2089e582 fix win32 build by using wtap_get_num_file_types() instead of direct variable access
svn path=/trunk/; revision=21689
2007-05-05 10:47:35 +00:00
Luis Ontanon 131cecd1e8 Add a plugin interface to wiretap.
So far I've done only regression testing (the new functionality and what's in wtap-plugins.c has not yet being tested).

it is a first step in the way to have lua opening files.



svn path=/trunk/; revision=21686
2007-05-04 21:10:55 +00:00
Luis Ontanon bb7e52fcd8 will this finally get rid of the warnigs?
svn path=/trunk/; revision=21666
2007-05-03 18:32:52 +00:00
Luis Ontanon 13b1ebe574 fix warnings
svn path=/trunk/; revision=21653
2007-05-02 21:58:52 +00:00
Luis Ontanon d4fd968d50 add support for the text export format of textronix k1[25]
svn path=/trunk/; revision=21651
2007-05-02 20:09:42 +00:00
Guy Harris 235596a3c8 From Jeff Foster: add support for Cisco HDLC captures.
svn path=/trunk/; revision=21598
2007-04-26 20:06:06 +00:00
Guy Harris e7931530dd Grr. Flex. Can't make warnings errors yet - we'd have to keep that
from being done on Flex-generated files, or fix the problems that pop up
on some platforms.

svn path=/trunk/; revision=21520
2007-04-23 03:09:23 +00:00
Guy Harris f5b1131374 Make warnings errors when possible.
svn path=/trunk/; revision=21519
2007-04-23 02:48:40 +00:00
Guy Harris 8093569ebe Add a couple more warnings to the standard set.
svn path=/trunk/; revision=21516
2007-04-23 00:28:50 +00:00
Guy Harris 3b884cb0df Propagate Joerg's fix to make --enable-extra-gcc-checks turn off
--enable-warnings-as-errors (if any tests enabled by
--enable-extra-gcc-checks are safe to treat as errors, they're safe to
turn on by default).

svn path=/trunk/; revision=21515
2007-04-22 23:52:38 +00:00
Guy Harris aff8dc680d Turn on almost all warnings for Wiretap - if any of them cause problems
on some platforms due to unfixable problems (e.g., crappy vendor
headers), we can move them back to the "extra" list.

Put those warnings in the order in which they appear in the GCC man page
on my machine.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

svn path=/trunk/; revision=21514
2007-04-22 23:47:56 +00:00
Sebastien Tandel 706627f882 adding AC_(WIRESHARK|WIRETAP)_GCC_CFLAGS_OPTION macro to test whether gcc
supports the options passed as arguments. If the options are supported, they
are added to CFLAGS.


svn path=/trunk/; revision=21493
2007-04-22 09:27:21 +00:00