summaryrefslogtreecommitdiff
path: root/wsutil/file_util.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-20Qt+Win32: Make software updates more friendly.Gerald Combs1-313/+319
Add WinSparkle can_shutdown and shutdown_request callbacks which are called prior to running the installer. Reject updates when we have unsaved information. Add notes about possible improvements. Ping-Bug: 9687 Ping-Bug: 12989 Change-Id: Ia126244b311417aa3105ea8136f186adc2745445 Reviewed-on: https://code.wireshark.org/review/19244 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-21pcap: Add support to "new" Npcap native mode without setting PATHYang Luo1-0/+9
Npcap decided not to add "C:\Windows\System32\Npcap" to system PATH in the installation any more (starting from Npcap 0.07 r14). So this patch needs to be applied, otherwise Wireshark will not find Packet.dll (the error message will only say wpcap.dll is missing, but actually is Packet.dll missing). Change-Id: Ifd8b6e6d8ecf9866cd37c3368b604de210ff8c7b Reviewed-on: https://code.wireshark.org/review/15959 Reviewed-by: Yang Luo <hsluoyz@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-16file_util.c: do not search in Npcap installation folder when calling ↵Pascal Quantin1-13/+0
ws_load_library() ws_load_library() is not used to load packet.dll or wpcap.dll (we use ws_module_open() for this). Let's not lose time checking the folder content. Change-Id: Ibd4a71b8b0c5ffc0c4c146eca51ad9f20964515b Reviewed-on: https://code.wireshark.org/review/15938 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-03Add support for Npcap native mode:Yang Luo1-2/+33
1) Start Npcap service for capturing packets on Windows if WinPcap service is unavailable. 2) Search Npcap DLLs (wpcap.dll, Packet.dll) also in "system32\Npcap" folder after "system32" is searched. Change-Id: I6810382db431a4e7fe309edd08757db60d8ade38 Reviewed-on: https://code.wireshark.org/review/15707 Reviewed-by: Yang Luo <hsluoyz@gmail.com> Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-03wsutil: Remove getenv_utf8(), replaced with g_getenv()João Valverde1-33/+0
Replace getenv() calls in filesystem.c too for consistency. Change-Id: I31425179290e556e6696953531989d93777adf92 Reviewed-on: https://code.wireshark.org/review/14752 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: João Valverde <j@v6e.pt> Tested-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-30ws_load_library() is called with constant char reflect that.MSVC15 build.AndersBroman1-1/+1
Change-Id: I7d103c7316ee372b5cdb3aa9033a62eb75cd38b2 Reviewed-on: https://code.wireshark.org/review/14702 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-06file_util.h includes io.h, we don't need to do so ourselves.Guy Harris1-7/+32
While we're at it, get rid of a commented-out include, and update a comment to give more information. Change-Id: I910a26a3d7f4a50f0559abe5f2ab97a93c80357f Reviewed-on: https://code.wireshark.org/review/11610 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-14Add editor-modelines; adjust whitespace.Bill Meier1-140/+153
Change-Id: I8cad872cee972a6d22a72852dac57fd188daca84 Reviewed-on: https://code.wireshark.org/review/4683 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-09-16Trivial: Fix typo.Chris Maynard1-4/+4
svn path=/trunk/; revision=52101
2013-02-20As http://www.jrsoftware.org/iskb.php?mutexsessions points out, a sessionGerald Combs1-1/+23
mutex may not be visible to other sessions and we may not be able to create a global mutex. Try to create both, and make each one accessible to all users. Update the NSIS installer to check for both global and session mutexes. svn path=/trunk/; revision=47773
2013-02-20When any of our executables start on Windows create or open a "WiresharkGerald Combs1-0/+7
is running" mutex. Have the NSIS installer check for this mutex and ask the user to close Wireshark if it's found. While not perfect this makes the WinSparkle update process much less annoying. svn path=/trunk/; revision=47758
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45015
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-08-17From Gisle Vanem:Stig Bjørlykke1-2/+3
Patch for a missing WINAPI. svn path=/trunk/; revision=38592
2011-07-11More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versionsGerald Combs1-3/+0
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and reassemble_cleanup() since they were only used for older GLib versions which didn't support GSlices. Assume we always support the "matches" operator. svn path=/trunk/; revision=37978
2011-04-10Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64Guy Harris1-3/+3
as an argument, along the lines of ws_fstat64, and, on Windows, make it use _wstati64, to handle 64-bit file sizes. svn path=/trunk/; revision=36547
2010-12-07Include stdlib.h for getenv().Jeff Morriss1-0/+1
svn path=/trunk/; revision=35149
2010-12-07Move getenv_utf8() to wsutil.Jeff Morriss1-4/+44
svn path=/trunk/; revision=35148
2010-11-22Make sure we pass a directory path and not a file path toGerald Combs1-5/+9
SetCurrentDirectory. Should fix bug 5420. svn path=/trunk/; revision=35010
2010-08-27Forward-port r33953.Gerald Combs1-0/+22
Move the SetDllDirectory calls to ws_init_dll_search_path. If SetDllDirectory fails, pass the Wireshark program path to SetCurrentDirectory. svn path=/trunk/; revision=33958
2010-08-26Add a newline. Fixup whitespace.Gerald Combs1-7/+7
svn path=/trunk/; revision=33933
2010-08-25Add ws_load_library and ws_module_open, which respectively callGerald Combs1-2/+112
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
2009-03-08Fix ws_stdio_unlink so it works properly on WIndows for all Unicode filenames.Bill Meier1-5/+5
- Essentially: ws_stdio_unlink would fail trying to delete any path\filename containing a Unicode character which could not be mapped to the "system codepage" (ie: to a character encoded with a value of 1-255). For example: ws_stdio_unlink was not able to delete a path\filename containing the character U+210B. - The problem: A copy/paste of the wrong (non-Windows) portion of the GLib g_unlink code was done when file_util.c was created. - The solution: replace the ws_stdio_unlink code with the correct code copied from the Glib g_unlink function. svn path=/trunk/; revision=27661
2008-08-13Another try to fix the cast problem.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=26001
2008-08-13Add a cast to avoid a warning.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=26000
2008-08-12Take courage!Guy Harris1-2/+2
http://www.flickr.com/photos/clammm/503029097/ svn path=/trunk/; revision=25993
2008-08-12Fix a bunch of Win64 compilation errors by cowardly casting size_ts to ints.Gerald Combs1-1/+1
svn path=/trunk/; revision=25992
2008-05-23file_util.c is only for Windows; don't build it on UN*X. Put in a checkGuy Harris1-37/+4
to cause it to fail when built on UN*X, and get rid of code that's not needed on Windows. svn path=/trunk/; revision=25362
2008-05-22Move the file utility functions from wiretap to libwsutil so thatJeff Morriss1-0/+476
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