aboutsummaryrefslogtreecommitdiffstats
path: root/capture-pcap-util.c
AgeCommit message (Collapse)AuthorFilesLines
2011-04-26Cast away warnings about "struct sockaddr" -> "struct sockaddr_XXX"guy1-2/+2
casts that are actually safe. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36861 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-18Move get_pcap_linktype() into dumpcap - it's not used elsewhere.guy1-124/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32853 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-14Um, no, the problem with the Leopard x86 build is that we first do aguy1-1/+1
build without libpcap, to make sure that works, and then do a build with libpcap, to put into a binary release. It's the former that's failing; I'll back out the previous change and then work on that. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32801 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-14See whether the Leopard x86 buildbot is upset because of the nameguy1-1/+1
if_capabilities_t - it doesn't fail on Snow Leopard, even if I undefine HAVE_PCAP_CREATE, and doesn't fail on the Leopard PPC buildbot, either. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32799 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-13Fetch an indication of whether the interface supports capturing inguy1-3/+4
monitor mode at the same time that we fetch its list of link-layer types. Support fetching that list in monitor mode, as the list may be different in regular and monitor mode. If the interface supports monitor mode, when printing the list of link-layer types, indicate whether they're fetched in monitor mode or not, as tcpdump 4.1.x does. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32789 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-07For TShark and Wireshark, get the list of link-layer types for anguy1-105/+0
interface by running dumpcap, so that if you need privileges to open an interface, and dumpcap has those privileges, neither TShark nor Wireshark need them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32710 f5534014-38df-0310-8fa8-9805f1628bb7
2010-03-04Squelch some compiler warnings.guy1-6/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32111 f5534014-38df-0310-8fa8-9805f1628bb7
2010-03-04In Wireshark and TShark, run dumpcap to get interface lists and lists ofguy1-15/+14
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32104 f5534014-38df-0310-8fa8-9805f1628bb7
2010-02-28Added svn:ignore targets.stig1-20/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32055 f5534014-38df-0310-8fa8-9805f1628bb7
2009-03-16Hack toprevent checkAPIs complaining about use of 'free'wmeier1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27745 f5534014-38df-0310-8fa8-9805f1628bb7
2009-03-15From Jakub Zawadzki:stig1-4/+2
More remove checking for NULL before g_free(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27728 f5534014-38df-0310-8fa8-9805f1628bb7
2008-12-21If we don't have any of the pcap_datalink_XXX_to_YYY routines,guy1-31/+97
substitute our own (I wrote them all, so I can steal them from the BSD-licensed libpcap if I want :-)). This means that linktype_name_to_val() and linktype_val_to_name() are always available, and we don't need to #ifdef use of them. Use pcap_datalink_val_to_description() to get the description for a particular DLT_ value, rather than mapping the DLT_ value to a WTAP_ENCAP_ value and getting the description for the latter. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27074 f5534014-38df-0310-8fa8-9805f1628bb7
2008-11-03Do not use functions for remote capture on local interfaces.stig1-6/+34
This makes it possible to compile with remote capture features on unix. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26681 f5534014-38df-0310-8fa8-9805f1628bb7
2008-07-04Fix benign usage of incorrect symbol in #ifdefwmeier1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25669 f5534014-38df-0310-8fa8-9805f1628bb7
2008-07-04If we have pcap_free_datalinks(), use it. If not, then, on Windows,guy1-2/+25
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25668 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-21Constify some arguments.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24407 f5534014-38df-0310-8fa8-9805f1628bb7
2007-12-04Support for RPCAP features in GUI (from Boris Misenov, see Bug 1366)kukosa1-0/+15
- 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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23750 f5534014-38df-0310-8fa8-9805f1628bb7
2007-11-30first steps to support MSVC 2008 Express Editionulfl1-2/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23691 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-23Include libpcap.h so that we can use wtap_pcap_encap_to_wtap_encap()gerald1-1/+1
in its new location. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22604 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-13fix gcc warning about qualifier types (const) which are discarded when arrivingstandel1-1/+1
at the pcap interface. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21417 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-21Have the routines to get interface lists take a pointer to a "gchar *"guy1-8/+18
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20521 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-02Frederic Heem:jmayer1-0/+1
Fix some memleaks and overflows. I haven't committed the changes that are not bug fixes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19777 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-28Ethereal->Wiresharketxrab1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18235 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21name changesahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-25an error return was missing a pcap_close() callulfl1-1/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17404 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-17remove dependencies to pcap.h, so getting an idea what needs to be done by ↵ulfl1-0/+16
dumpcap in addition to the things already done now various dumpcap related code cleanup: mainly #include's and capture engine related stuff git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17327 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-14Constify a bunch of arguments and variables, to squelch compilerguy1-3/+3
warnings. Include "wiretap/libpcap.h" in "capture_loop.h", to get its declarations of data structures for headers in libpcap files. This lets us remove the includes of "wiretap/libpcap.h from files including "capture_loop.h". Make "log_func_ignore()" in "tethereal.c" static, and declare some of its arguments unused. Also get rid of an unused variable. Include <pcap.h> before including "wiretap/wtap-capture.h", to declare "struct pcap_pkthdr". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16791 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-06rename pcap-....c/.h files to capture-pcap-....c/.hulfl1-0/+433
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16691 f5534014-38df-0310-8fa8-9805f1628bb7