Commit Graph

30 Commits

Author SHA1 Message Date
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Anders Broman f68d6e4c8c Ethereal->Wireshark
svn path=/trunk/; revision=18235
2006-05-28 20:28:20 +00:00
Guy Harris aa1e053ce6 If we have pcap_breakloop(), at least on UN*X we can stop the capture
with a pcap_breakloop() call - we don't need to call select() before
calling pcap_dispatch().

Even if we do need to call select(), we don't need to supply it with a
timeout - it's OK if we block indefinitely, as the signal will interrupt
select().

That also means we can pass -1 as the count to pcap_dispatch(), as
pcap_breakloop() will terminate the loop in pcap_dispatch().

Use sigaction() to catch SIGUSR1, so we can make sure that the signal
handler doesn't get reset when the signal is delivered, and that system
calls don't restart when we return from the signal handler.

svn path=/trunk/; revision=18201
2006-05-21 21:32:04 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Anders Broman 9951fc2cff from Daniele Orlandi:
The attached patch adds support for LAPD frames captured using vISDN thru 
libpcap. The support has already been included in libpcap.

The patch adds a new wiretap encapsulation, the necessary glue to decode 
SLL-encapsulated frames, and some minor change in the LAPD dissector in order 
to support the remote-to-remote frames captured on the ISDN E-Channel.

Please apply ethereal-encap-table.diff before, as it fixes a misalignment in 
the encapsulation names table.

svn path=/trunk/; revision=17451
2006-03-02 21:29:15 +00:00
Ulf Lamping 79053183c5 remove dependencies to pcap.h, so getting an idea what needs to be done by dumpcap in addition to the things already done now
various dumpcap related code cleanup: mainly #include's and capture engine related stuff

svn path=/trunk/; revision=17327
2006-02-17 02:18:48 +00:00
Ulf Lamping 7e3a24418c rename pcap-....c/.h files to capture-pcap-....c/.h
this way, the capture prefix will "logically" group the files together and file browsers will also group them

we may want to move the files into a subdir capture later

svn path=/trunk/; revision=16691
2005-12-06 00:07:13 +00:00
Guy Harris 038cbce335 Remove an extra " from a command, and fix indentation.
svn path=/trunk/; revision=16101
2005-10-04 03:58:40 +00:00
Guy Harris e6dfe72d71 Update URLs and domain names that refer to the WinPcap site.
svn path=/trunk/; revision=14540
2005-06-03 09:55:28 +00:00
Ulf Lamping a3d36ae031 add const to pcap_next_ex() parameter, as WinPcap 3.1 beta 4 (and libpcap 0.8) requires it
svn path=/trunk/; revision=14434
2005-05-25 21:37:46 +00:00
Ulf Lamping 7c7ee07c4e bugfix: prevent a (null pointer access) crash with very early WinPcap version < 2.3
svn path=/trunk/; revision=14413
2005-05-21 11:08:48 +00:00
Ulf Lamping f6831ab340 bugfix: mark pcap_freecode() as optional, as it's not available by WinPcap 2.3
add optional pcap_next_ex() which is currently unused

svn path=/trunk/; revision=14412
2005-05-21 09:59:49 +00:00
Guy Harris 8f71b85840 Strip off anything after a blank in the PacketLibraryVersion string, as
the string says "3.0 alpha3" in the final release of WinPcap 3.0, and
saying that's "3.0 alpha3" is misleading.

Don't repeatedly fetch the version string from PacketLibraryVersion;
just cache the version we got the first time.

svn path=/trunk/; revision=14081
2005-04-14 20:37:13 +00:00
Guy Harris 596a4f865b It doesn't matter whether, when building with WinPcap, we have
pcap_lib_version() in the WinPcap on the system on which we're building.

svn path=/trunk/; revision=13873
2005-03-23 01:55:11 +00:00
Guy Harris 46e1907f13 If we have "pcap_freecode()", use it to free the instructions for a BPF
filter after installing the filter.

Set HAVE_PCAP_LIB_VERSION if we're building with WinPcap 3.1; it's not
present in earlier versions, but is present in current 3.1 betas.

Check HAVE_PCAP_LIB_VERSION when building capture-wpcap.c.

svn path=/trunk/; revision=13872
2005-03-23 01:25:01 +00:00
Guy Harris 1d400fd77f If "HAVE_PCAP_DATALINK_NAME_TO_VAL" is defined - i.e., if we're built
with a version of WinPcap that has "pcap_datalink_name_to_val()" - then,
if the version of WinPcap we've loaded doesn't have
"pcap_datalink_name_to_val()", supply our own version.  Do the
equivalent for "pcap_datalink_val_to_name()".

We do that so that we can build Ethereal with a recent version of
WinPcap, so that it uses the new APIs in newer versions, and still have
it work with older versions.

svn path=/trunk/; revision=12109
2004-09-27 01:11:23 +00:00
Gerald Combs 38bd8a1969 Fix a typo.
svn path=/trunk/; revision=12082
2004-09-24 02:09:40 +00:00
Guy Harris 29753bf6b2 From Gisle Vanem: add support for pcap_datalink_val_to_name() for Win32.
Also add support for pcap_datalink_name_to_val(), and arrange that we
properly define HAVE_PCAP_DATALINK_NAME_TO_VAL and
HAVE_PCAP_DATALINK_VAL_TO_NAME for MSVC++ builds.

svn path=/trunk/; revision=12073
2004-09-23 17:54:49 +00:00
Guy Harris 47f37ee5fb From Graham Bloice: if we don't have "pcap_lib_version()" in WinPcap, we
might have "PacketLibraryVersion[]" in packet.dll - try using that.

svn path=/trunk/; revision=11639
2004-08-10 05:27:50 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris f9be24cd13 On Windows, if "get_interface_list()" returns CANT_GET_INTERFACE_LIST
and the error message includes "Not enough storage is available
to process this command" or "The operation completed successfully",
suggest that the user install a WinPcap version later than 3.0 - this is
definitely a Frequently Asked Question on the Ethereal list.

svn path=/trunk/; revision=11143
2004-06-12 07:47:14 +00:00
Ulf Lamping 6c9a1dc093 experimental: make usage of pcap_setbuff to increase the kernel buffer size
svn path=/trunk/; revision=10377
2004-03-13 22:49:30 +00:00
Ulf Lamping 0d9679de8d removed some MSVC warnings (level 3)
svn path=/trunk/; revision=9561
2004-01-05 19:31:44 +00:00
Ulf Lamping 3b77bfee59 removed some MSVC warnings (moved pcap.h before glib.h)
svn path=/trunk/; revision=9393
2003-12-21 12:19:39 +00:00
Guy Harris bd2ea47524 Configure whether we have WinPcap based on whether WINPCAP_VERSION is
set in the config.nmake file.

Configure whether we have pcap_findalldevs() based on whether
WINPCAP_VERSION is 2.3 (if so, we don't) or 3.0 or 3.1 (if so, we do).

WinPcap 3.0 has the new libpcap declarations of "pcap_lookupnet()" and
"pcap_open_live()" in which the first argument is a "const char *"
rather than a "char *"; declare the functions and pointers to them
appropriately based on the version of WinPcap.

If we don't have pcap_findalldevs(), don't declare a pointer to it, as
we don't have a declaration of pcap_if_t.

We also need to refer to "pcap_freealldevs()", so make a pointer for it.

"symbols[]" is a const array; make the pointer to elements in it a const
pointer.

Fix some typoes.

svn path=/trunk/; revision=8660
2003-10-10 09:48:54 +00:00
Guy Harris 8e51328bc2 Get the version number of the libpcap/WinPcap with which we're running
with "pcap_lib_version()", if available.

svn path=/trunk/; revision=8656
2003-10-10 06:05:48 +00:00
Guy Harris de7bbaf8da Use "pcap_findalldevs()" if present.
svn path=/trunk/; revision=8655
2003-10-10 03:04:38 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Gilbert Ramirez a817e97015 Now that WinPcap is a DLL, I can load it at run-time rather than load-time.
That means that I no longer need to distribute capture and non-capture
versions of Ethereal for Win32; one version (compiled with WinPcap headers)
can run on systems with or without WinPcap.

For systems that don't have WinPcap, instead of disabling the Capture
menu, Capture|Start brings up a dialogue informing the user that wpcap.dll
was not loadable, and gives a URL to the WinPcap home page.

svn path=/trunk/; revision=3249
2001-04-03 05:26:27 +00:00