aboutsummaryrefslogtreecommitdiffstats
path: root/capture-wpcap.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-30Fix QtShark compile error.Bill Meier1-1/+3
(Quoting can be tricky ...) svn path=/trunk/; revision=40766
2012-01-27Since we know the version of WinPcap we're compiling against, go ahead and ↵Chris Maynard1-1/+1
display it instead of displaying "version unknown". svn path=/trunk/; revision=40740
2011-12-29Swallow cant_load_winpcap_err() up into capture-wpcap.c, so thatGuy Harris1-1/+28
anything that uses WinPcap can use that message text in its error messages. svn path=/trunk/; revision=40335
2011-12-29Add an additional DONT_HAVE_PCAP return value from get_interface_list()Guy Harris1-0/+12
and capture_interface_list(). Return it if, on Windows, we ask for the interface list but don't have WinPcap installed. Handle it like CANT_GET_INTERFACE_LIST. svn path=/trunk/; revision=40334
2011-12-29Forgot the buffer length argument to g_snprintf().Guy Harris1-2/+4
svn path=/trunk/; revision=40331
2011-12-29If pcap_open_live() or pcap_open() fails due to not having WinPcap,Guy Harris1-0/+4
supply an appropriate error string. svn path=/trunk/; revision=40330
2010-10-12Fix comments (not all platforms on which we run support dlopen(), butGuy Harris1-1/+1
GLib handles that with g_module_open() as a platform-independent "load a module at run time" wrapper). svn path=/trunk/; revision=34491
2010-10-03Make "bpf_image" available on Windows. This enables the "Compile BPF" button ↵Sake Blok1-1/+1
and "dumpcap -d" on Windows. svn path=/trunk/; revision=34357
2010-10-03Retry of SVN 34338, now tested on my WinXP dev VM:Sake Blok1-0/+35
Use pcap_open_dead instead of pcap_create for the compile BPF button. svn path=/trunk/; revision=34340
2010-10-02Add pcap_compile_nopcap(); [Not tested]Bill Meier1-0/+11
svn path=/trunk/; revision=34336
2010-08-25Add ws_load_library and ws_module_open, which respectively callGerald Combs1-2/+4
LoadLibrary and g_module_open only for the program directory and system directory on Windows. Use them to replace a bunch of LoadLibrary and g_module_open calls. Use the extension ".dll" for all the DLLs that we load. Add comments about DLL loading in Python. svn path=/trunk/; revision=33924
2010-05-11Make sure pcap_open_live points to something.Gerald Combs1-2/+1
svn path=/trunk/; revision=32763
2010-03-17Use the right #define value to check whether WinPcap hasGuy Harris1-1/+1
pcap_free_datalinks(). *Set* that #define, while we're at it. svn path=/trunk/; revision=32220
2010-03-04Include "capture_ifinfo.h" to get declarations we require.Guy Harris1-0/+1
svn path=/trunk/; revision=32106
2010-03-04In Wireshark and TShark, run dumpcap to get interface lists and lists ofGuy Harris1-4/+0
link-layer header types for interfaces; if special privileges are necessary to open capture devices, Wireshark and TShark shouldn't have those privileges, but dumpcap should. svn path=/trunk/; revision=32104
2009-12-18Use the WinPcap version of pcap_datalink_val_to_description if it'sGerald Combs1-2/+34
present. Add an entry for DLT_PPI in case it's not. svn path=/trunk/; revision=31316
2009-12-15Behave more gracefully if WinPcap isn't installed. Don't assert ifGerald Combs1-3/+7
we call pcap_open or pcap_open_live when WinPcap isn't loaded - just return NULL. Don't display the "NPF driver isn't running" dialog if we're capturing from stdin or a file. Fix a cut-and-paste error in capture_pcap_linktype_list. svn path=/trunk/; revision=31275
2009-12-07If WinPcap isn't loaded, return NULL from pcap_lookupdev() insteadGerald Combs1-1/+3
of asserting. Returning an empty interface list is more graceful than crashing. svn path=/trunk/; revision=31188
2009-08-29We require WinPcap > 3.0 so get rid of WPCAP_CONSTIFIED_CONFIGKovarththanan Rajaratnam1-14/+0
svn path=/trunk/; revision=29616
2009-08-29Revert r29614 until I figure out why buildbot doesn't like itKovarththanan Rajaratnam1-1/+4
svn path=/trunk/; revision=29615
2009-08-29Use G_STRINGIFY/G_PASTEKovarththanan Rajaratnam1-4/+1
svn path=/trunk/; revision=29614
2009-04-16Fix the last(?) of the Win64 compilation problems.Gerald Combs1-2/+2
svn path=/trunk/; revision=28065
2008-11-03Do not use functions for remote capture on local interfaces.Stig Bjørlykke1-16/+0
This makes it possible to compile with remote capture features on unix. svn path=/trunk/; revision=26681
2008-07-04If we have pcap_free_datalinks(), use it. If not, then, on Windows,Guy Harris1-0/+26
just leak the list returned by pcap_list_datalinks(), as there's no guarantee that if you have a library built with one version of the MSVC++ run-time library, and it returns a pointer to allocated data, you can free that data from a program linked with another version of the MSVC++ run-time library. (This is not an issue on UN*X.) This should fix bug 2677. svn path=/trunk/; revision=25668
2008-06-24Add TurboCap-related changes from /trunk-1.0:Gerald Combs1-0/+32
From Dustin Johnson: Add support for TurboCap. - packet-ppi.c: Add aggregation and 802.3 extended information. - capture-wpcap.c: Add support for pcap_list_datalinks and pcap_set_datalink. Make pcap_list_datalinks and pcap_set_datalink mandatory on Windows. svn path=/trunk/; revision=25593
2008-05-07Fix some of the Errors/warnings detected by checkapi.Anders Broman1-3/+3
svn path=/trunk/; revision=25248
2008-04-09Remove:Anders Broman1-5/+0
#ifdef NEED_G_ASCII_STRCASECMP_H #include "g_ascii_strcasecmp.h" #endif svn path=/trunk/; revision=24859
2007-12-04Support for RPCAP features in GUI (from Boris Misenov, see Bug 1366)Tomas Kukosa1-0/+103
- retrieving the list of remote PCAP interfaces - password authentication support - UDP data fransfer - packet sampling (available in WinPcap 4.x) etc. fix problem if non-default rpcap port is used svn path=/trunk/; revision=23750
2007-11-30first steps to support MSVC 2008 Express EditionUlf Lamping1-3/+4
svn path=/trunk/; revision=23691
2007-11-27strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delendaGuy Harris1-1/+5
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our own versions if they're missing from GLib (as is the case with GLib 1.x). In the code to build the list of named fields for Diameter, don't use g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping in the hash function and use g_ascii_strcasecmp() in the compare function. We do this because there is no guarantee that toupper(), tolower(), and functions that use them will, for example, map between "I" and "i" in all locales; in Turkish locales, for example, there are, in both upper case and lower case, versions of "i" with and without a dot, and the upper-case version of "i" is "I"-with-a-dot and the lower-case version of "I" is "i"-without-a-dot. This causes strings that should match not to match. This finishes fixing bug 2010 - an earlier checkin prevented the crash (as there are other ways to produce the same crash, e.g. a bogus dictionary.xml file), but didn't fix the case-insensitive string matching. svn path=/trunk/; revision=23623
2007-01-21Have the routines to get interface lists take a pointer to a "gchar *"Guy Harris1-2/+5
as an argument, and, on an error, if they have an error message, have them set that "gchar *" to point to a g_malloc()ed string containing the error message, rather than taking a pointer to a buffer for that message as an argument. That's more like what's done in Wiretap, and doesn't impose an upper limit on the lengths of those error messages. If that pointer is null, don't allocate the message string and return it. Have that error message already have the "cant_get" processing applied to it, so nobody other than those routines need to call the "cant_get" routines to process the error messages. Have get_airpcap_interface_list() explicitly set "*err" to the appropriate error code. Clean up indentation. svn path=/trunk/; revision=20521
2006-10-19Fix up the changes to put the Portaudio information at the end of theGuy Harris1-2/+0
version string, so the information comes out right for applications that don't use Portaudio. Get rid of an extra "with" in the version string for dumpcap. Get rid of an extra blank after the libpcap version string, and get rid of an extra newline before it. Attempt to add more compiler version information and to prettify the MSVC++ version information (both untested). svn path=/trunk/; revision=19613
2006-09-22Slightly reshape the version text: Bring the OS info above the WinPcap text ↵Ulf Lamping1-1/+2
- this just makes more sense IMHO svn path=/trunk/; revision=19294
2006-05-31Tethereal/tethereal -> TShark/tshark.Gerald Combs1-1/+1
svn path=/trunk/; revision=18268
2006-05-28Ethereal->WiresharkAnders Broman1-1/+1
svn path=/trunk/; revision=18235
2006-05-21If we have pcap_breakloop(), at least on UN*X we can stop the captureGuy Harris1-0/+23
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-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-03-02from Daniele Orlandi:Anders Broman1-0/+3
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-02-17remove dependencies to pcap.h, so getting an idea what needs to be done by ↵Ulf Lamping1-0/+4
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
2005-12-06rename pcap-....c/.h files to capture-pcap-....c/.hUlf Lamping1-2/+2
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-10-04Remove an extra " from a command, and fix indentation.Guy Harris1-4/+4
svn path=/trunk/; revision=16101
2005-06-03Update URLs and domain names that refer to the WinPcap site.Guy Harris1-2/+2
svn path=/trunk/; revision=14540
2005-05-25add const to pcap_next_ex() parameter, as WinPcap 3.1 beta 4 (and libpcap ↵Ulf Lamping1-3/+4
0.8) requires it svn path=/trunk/; revision=14434
2005-05-21bugfix: prevent a (null pointer access) crash with very early WinPcap ↵Ulf Lamping1-1/+3
version < 2.3 svn path=/trunk/; revision=14413
2005-05-21bugfix: mark pcap_freecode() as optional, as it's not available by WinPcap 2.3Ulf Lamping1-2/+13
add optional pcap_next_ex() which is currently unused svn path=/trunk/; revision=14412
2005-04-14Strip off anything after a blank in the PacketLibraryVersion string, asGuy Harris1-12/+32
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-03-23It doesn't matter whether, when building with WinPcap, we haveGuy Harris1-8/+1
pcap_lib_version() in the WinPcap on the system on which we're building. svn path=/trunk/; revision=13873
2005-03-23If we have "pcap_freecode()", use it to free the instructions for a BPFGuy Harris1-3/+17
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
2004-09-27If "HAVE_PCAP_DATALINK_NAME_TO_VAL" is defined - i.e., if we're builtGuy Harris1-4/+128
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-24Fix a typo.Gerald Combs1-2/+2
svn path=/trunk/; revision=12082