Commit Graph

1351 Commits

Author SHA1 Message Date
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Guy Harris bb674a2e1e Include <wsutil/crc11.h> so that we check whether the prototypes therein
match the actual function types here.

svn path=/trunk/; revision=46648
2012-12-21 01:57:03 +00:00
Guy Harris 166b5d4469 Squelch some cast-discard warnings.
svn path=/trunk/; revision=46647
2012-12-21 00:53:30 +00:00
Guy Harris 0ddce65214 fclose() and fflush() are standard C routines, so there's no need for
our own wrappers.  (pcapio.c isn't using wrappers around, for example,
fwrite().)

svn path=/trunk/; revision=46640
2012-12-20 20:00:06 +00:00
Michael Tüxen 7e84abf005 Add ws_fclose(), ws_fflush(), and ws_fdopen() to the fileutils.
Retire libpcap_fdopen(), libpcap_dump_flush(), and libpcap_dump_close().

svn path=/trunk/; revision=46636
2012-12-20 14:53:09 +00:00
Anders Broman a98414062c try to fix Id.
svn path=/trunk/; revision=45922
2012-11-05 11:52:14 +00:00
Gerald Combs b369a09cd2 The file set and export object trees are lists. Make them act like
it. Show human-readable sizes in the file set dialog. Move the
format_size_flags_e operator to qt_ui_utils.cpp for lack of a better
place.

svn path=/trunk/; revision=45661
2012-10-19 19:04:21 +00:00
Gerald Combs 576b24c96e Move ui-independent object export routines to the common ui directory.
Implement DICOM, HTTP, and SMB object exports. Rename the GTK+ export
files. C++-ize epan/tap.h. Fix an apparent memory leak in
eo_save_all_clicked_cb.

The Qt dialog has an indeterminate progress bar. I tried adding
something similar to the GTK+ dialog but event processing led down a
rabbit hole.

svn path=/trunk/; revision=45647
2012-10-18 21:14:43 +00:00
Chris Maynard b66cc7ed48 str_util.c:format_size() uses 0xff00 for the mask, so left-shift format_size_prefix_[si|iec] by 8, not 16. Fixes Coverity CID 733852: Operands don't affect result.
svn path=/trunk/; revision=45637
2012-10-18 17:29:37 +00:00
Gerald Combs f003add90f Fix a copy+paste error and a missing include. Adjust the format_size
digit threshold.

svn path=/trunk/; revision=45456
2012-10-10 20:19:18 +00:00
Gerald Combs 98b0812341 Add a format_size function similar to g_format_size that renders a size
value in a human-readable format. Use it in the welcome screen, status
bar, and Win32 interface details.

Note that in the welcome screen and status bar we've switched from
customary binary prefixes to strict SI.

svn path=/trunk/; revision=45453
2012-10-10 19:17:31 +00:00
Bill Meier d882372200 *nix: Test return status of set*uid and related set*gid fcns for failure;
This fixes gcc compiler errors [-Werror=unused-result]  caused by the recent addition
of the "__wur" (warn_unused_result) attribute to the declarations of these functions in
unistd.h.

svn path=/trunk/; revision=45286
2012-10-03 15:22:31 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Chris Maynard 1c35b91296 Trivial typo/copy-and-paste comment fix.
svn path=/trunk/; revision=44983
2012-09-18 20:03:03 +00:00
Anders Broman 68e2e8b889 From Jacob Nordgren and Rishie Sharma:
Add CRC11 algorithms

svn path=/trunk/; revision=44346
2012-08-08 16:27:10 +00:00
Gerald Combs 89e6169fc5 Back out an inadvertent change in r44194.
svn path=/trunk/; revision=44210
2012-08-02 16:26:57 +00:00
Gerald Combs 02894a0be8 Move utf8_entities.h to the "ui" directory. Separate packet information
items with MIDDLE DOTs.

svn path=/trunk/; revision=44194
2012-08-01 19:18:49 +00:00
Anders Broman 967a3c9ce4 From Rishie Sharma:
Add a new CRC16 routine.

svn path=/trunk/; revision=43982
2012-07-25 08:57:33 +00:00
Anders Broman 01e69df536 Get rid of not needed includes
svn path=/trunk/; revision=43917
2012-07-22 16:48:52 +00:00
Anders Broman 5160177aff Remove not needed includes.
svn path=/trunk/; revision=43830
2012-07-19 15:04:43 +00:00
Evan Huus a234b68ff0 Fix some system header files that were #included with "" instead of <>.
They made cppcheck unhappy.

svn path=/trunk/; revision=43779
2012-07-18 02:47:56 +00:00
Anders Broman 02d23f97b0 Add crc7 calculation abillity.
svn path=/trunk/; revision=43680
2012-07-12 14:24:19 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jeff Morriss 9e1359e2fa Revert 43481: linking dftest against libui was not the problem.
svn path=/trunk/; revision=43488
2012-06-25 22:21:58 +00:00
Jeff Morriss 8eeebf73e0 Move get_args_as_string from ui/util.c into wsutil (maybe not to the best
module, but...).

This makes dftest no longer dependent on libui, so stop linking against it.

svn path=/trunk/; revision=43481
2012-06-25 20:38:45 +00:00
Gerald Combs 1a7470c6be Forward-port r43165 and r43168 from trunk-1.6.
------------------------------------------------------------------------
  r43165 | gerald | 2012-06-08 14:23:25 -0700 (Fri, 08 Jun 2012) | 4 lines
  Changed paths:
     M /trunk-1.6/epan/Makefile.am
     M /trunk-1.6/wiretap/Makefile.am
     M /trunk-1.6/wsutil/Makefile.am
  
  Use separate commands in the dumpabi recipes instead a big huge long
  chain. If abi-compliance-checker fails print the contents of its
  log file.
  ------------------------------------------------------------------------
  r43168 | gerald | 2012-06-08 15:43:50 -0700 (Fri, 08 Jun 2012) | 2 lines
  Changed paths:
     M /trunk-1.6/epan/Makefile.am
     M /trunk-1.6/wiretap/Makefile.am
     M /trunk-1.6/wsutil/Makefile.am
  
  Make sure ln happens in the right directory.
  ------------------------------------------------------------------------

We don't currently have a usable tag for "git describe --tags
--abbrev=0" to latch onto so just use the first 1.9 commit.

svn path=/trunk/; revision=43170
2012-06-08 23:54:22 +00:00
Guy Harris 03f0e46d6f Update comments to reflect that the GLib version is no longer relevant
(we require GLib 2.14 or later, and always use UTF-8 for pathnames on
Windows), to note that ws_stdio_rename() should have UN*X-style
rename semantics in that it removes the target if necessary, and to give
more details in other ways.

Clean up indetation a bit.

svn path=/trunk/; revision=42775
2012-05-22 09:57:18 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Guy Harris d0039be915 Always declare getopt() with a prototype.
svn path=/trunk/; revision=41939
2012-04-04 19:36:24 +00:00
Gerald Combs f934bcd42c Fix compilation on Win64.
svn path=/trunk/; revision=41930
2012-04-04 16:13:35 +00:00
Anders Broman 1d60842c59 Update to a version which have getopt_long(). + one file
svn path=/trunk/; revision=41927
2012-04-04 15:24:23 +00:00
Anders Broman 82913779e4 Update to a version which have getopt_long().
svn path=/trunk/; revision=41926
2012-04-04 15:23:47 +00:00
Anders Broman 45c342dfdb From Weston Schmidt:
Update packet-mpeg-sect to support CRCs & simpler header processing for subdissectors.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6941

svn path=/trunk/; revision=41523
2012-03-13 08:57:04 +00:00
Bill Meier 605dea0486 CVARSDLL hasn't been used (is undefined) for a while....
svn path=/trunk/; revision=41180
2012-02-24 16:23:38 +00:00
Stephen Fisher 7a52947075 Move exec_isdigit_string() and exec_isprint_string() functions out of
the exec dissector and into wsutil/str_util.c.  Rename them to
isdigit_string() and isprint_string().  Also rename the variables they use
for consistency: string -> str and position -> pos.


svn path=/trunk/; revision=41053
2012-02-17 17:22:12 +00:00
Anders Broman 0179b7dc50 Add *.sbr files to the clean target.
svn path=/trunk/; revision=40763
2012-01-29 20:33:58 +00:00
Michael Tüxen 0c682968dd Sync checkapi target with Makefile.nmake.
svn path=/trunk/; revision=40626
2012-01-21 12:06:31 +00:00
Balint Reczey 26503be7dc fix compile errors found by dumpabi target
svn path=/trunk/; revision=40595
2012-01-19 22:55:37 +00:00
Gerald Combs 9dc580af2a More C++ updates.
svn path=/trunk/; revision=40377
2012-01-04 21:26:51 +00:00
Guy Harris e243b5f566 OK, one of them was already declared; we still want to declare the other
one.

svn path=/trunk/; revision=39793
2011-11-11 03:29:51 +00:00
Guy Harris 845e927657 If we're exporting routines from crc32.c, declare them in crc32.h and
list them in libwsutil.def.

svn path=/trunk/; revision=39792
2011-11-11 03:28:10 +00:00
Stig Bjørlykke db6f524164 From Roland Knall via bug 6539:
Implementing generic CRC8 and CRC16 functions for openSAFETY in wsutil.

svn path=/trunk/; revision=39726
2011-11-03 20:58:29 +00:00
Anders Broman f08f09ecd4 From Michael Mann:
Condense all SCTP CRC routines to wsutil/crc32.[ch]. Also made
crc32_ccitt_table not explicitly accessible (must use crc32_ccitt_table_lookup).

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6298

svn path=/trunk/; revision=39233
2011-10-03 04:53:17 +00:00
Bill Meier 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Stig Bjørlykke 70c3a7d727 Don't include files from epan in wsutil.
svn path=/trunk/; revision=38989
2011-09-13 18:36:46 +00:00
Anders Broman a757c16877 Move airpcap_wep.c to /wsutil CMakefile changes
svn path=/trunk/; revision=38973
2011-09-12 13:07:54 +00:00
Anders Broman c7c6bbf831 Move airpcap_wep.c to /wsutil
svn path=/trunk/; revision=38969
2011-09-12 08:23:15 +00:00
Anders Broman 3407eb314b Add Id tag
svn path=/trunk/; revision=38915
2011-09-07 11:01:59 +00:00
Stig Bjørlykke 1ced4079c5 Lookup in correct tables. Document functions.
svn path=/trunk/; revision=38819
2011-08-31 12:03:18 +00:00
Stig Bjørlykke 582a75cb97 Add the new functions; crc32c_table_lookup and crc32_ccitt_table_lookup.
svn path=/trunk/; revision=38818
2011-08-31 11:53:20 +00:00
Stig Bjørlykke 84b3c5da84 Make lookup functions for accessing crc32c_table and crc32_ccitt_table.
svn path=/trunk/; revision=38817
2011-08-31 11:47:27 +00:00
Stig Bjørlykke 8b0361b62e Try declaring tables with WS_VAR_IMPORT.
svn path=/trunk/; revision=38814
2011-08-31 09:56:25 +00:00
Stig Bjørlykke 464d135ef2 Add missing crc16_plain_update and crc_drm.
svn path=/trunk/; revision=38812
2011-08-31 09:22:40 +00:00
Stig Bjørlykke 5359494b1f Second try to move crc routines to libwsutil.
This time keep the tvb routines in epan.

Now we can use common crc routines outside epan.

svn path=/trunk/; revision=38810
2011-08-31 09:00:54 +00:00
Stig Bjørlykke 71f903b956 Revert r38800, as the crc routines contains some tvb functions.
svn path=/trunk/; revision=38803
2011-08-30 14:17:40 +00:00
Stig Bjørlykke 4132d40e50 Move all crc routines to libwsutil.
This way we can use the crc routines in wiretap.

svn path=/trunk/; revision=38800
2011-08-30 13:46:42 +00:00
Stig Bjørlykke 7fb2c994df From Gisle Vanem:
Patch for a missing WINAPI.

svn path=/trunk/; revision=38592
2011-08-17 19:46:13 +00:00
Gerald Combs 78d49fadf5 From Gisle Vanem: Make sure our SetProcessDEPPolicyHandler typedef
matches the documentation.

I also verified that DEP is still enabled on Win32 using Process Explorer.

svn path=/trunk/; revision=38583
2011-08-17 16:47:04 +00:00
Jörg Mayer 46d4528e3d Attempt to properly fix the missing path information for glib libraries
svn path=/trunk/; revision=38360
2011-08-05 12:21:46 +00:00
Gerald Combs 3d2c4f6182 Use GLIB2_LDFLAGS instead of GLIB2_LIBRARIES for wsutil, since it
includes the path to the libraries. Add gthread to wireshark_LIBS if
threads are enabled.

svn path=/trunk/; revision=38345
2011-08-05 00:25:02 +00:00
Gerald Combs 49b92440de More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versions
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-07-11 20:32:19 +00:00
Stig Bjørlykke 8443bbbf75 Replace all strerror() with g_strerror().
Remove our local strerror implementation.
Mark strerror as locale unsafe API.

This fixes bug 5715.

svn path=/trunk/; revision=37812
2011-06-28 09:00:11 +00:00
Gerald Combs 349273944d Add links to libtool's recommendations for library versions.
svn path=/trunk/; revision=37582
2011-06-06 21:40:40 +00:00
Balint Reczey 9fe47db306 Reorganize dumpabi targets to keep temporary files
svn path=/trunk/; revision=37540
2011-06-04 16:44:37 +00:00
Balint Reczey 81849d7682 Fixing wrong library names in r37474
svn path=/trunk/; revision=37475
2011-05-31 12:09:47 +00:00
Balint Reczey 8ac6683629 Add dumpabi target to Makefiles in wsutil, epan and wiretap directories.
We can use the dumped ABI description for comparing ABI changes between revisions.

svn path=/trunk/; revision=37474
2011-05-31 12:07:25 +00:00
Gerald Combs 962b23f8d5 Filter out arg_list_utf_16to8.
svn path=/trunk/; revision=37396
2011-05-25 18:38:39 +00:00
Gerald Combs a24687ce8e Move the Windows argument list conversion code to a common routine.
svn path=/trunk/; revision=37372
2011-05-24 00:07:56 +00:00
Guy Harris f10a13b748 We have to define ws_statb64 before declaring routines that use it.
svn path=/trunk/; revision=36550
2011-04-10 23:51:34 +00:00
Guy Harris a6fc7f14c4 To fill in a ws_statb64, you must use ws_fstat64.
Declare ws_stdio_stat64, as that's its new name.

svn path=/trunk/; revision=36549
2011-04-10 22:04:14 +00:00
Guy Harris 83f6659cdb ws_stdio_stat got renamed to ws_stdio_stat64.
svn path=/trunk/; revision=36548
2011-04-10 21:36:05 +00:00
Guy Harris 4fdcc5c180 Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64
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
2011-04-10 20:59:10 +00:00
Guy Harris f2008e4dd3 Define ws_statb64 as struct stat *within* the "not Windows" block.
svn path=/trunk/; revision=36546
2011-04-10 20:51:58 +00:00
Guy Harris 0629b7399a Define ws_statb64 to be the appropriate "struct XXX" for a
64-bit-file-size-capable stat call, and use it for ws_fstat64().

svn path=/trunk/; revision=36545
2011-04-10 19:56:06 +00:00
Guy Harris 71d4caa5b9 Add ws_fstat64(), defined to be fstat on UN*X and _fstati64 on Windows.
Use it in some places where we're getting the file size.

svn path=/trunk/; revision=36544
2011-04-10 18:55:06 +00:00
Guy Harris c349caf925 Use AC_SYS_LARGEFILE to turn on large file support on platforms that
support it.

Rename ws_lseek to ws_lseek64, as it should be given a 64-bit offset,
and have it use _lseeki64 on Windows, to try to get 64-bit offset
support; AC_SYS_LARGEFILE should cause lseek() to support 64-bit offsets
on UN*X if possible.

svn path=/trunk/; revision=36542
2011-04-10 18:22:47 +00:00
Guy Harris 6c6f3528f1 Squelch a warning from the MSVC++ static analyzer (it's worried that
GetModuleHandle() could return a null pointer, which is possible,
although if it returns one when handed "kernel32.dll", you have bigger
problems...).

Add some comments.

svn path=/trunk/; revision=35972
2011-02-17 03:02:18 +00:00
Bill Meier d3efa3ed9f A bit of Windows makefiles rework and cleanup:
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile;
  a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS;
  b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake)
      (This allows disabling "Warnings as Errors" by just changing config.nmake)
  c. CVARSDLL definitions (not usage) have been removed from the various makefiles.
     XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since:
     -DWIN32 and -DNULL=0 do not appear to be needed (any more);
     -D_MT and _D_DLL  are not needed since /MP causes these definitions.
  d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled.
     E.G., 4295: array is too small to include a terminating null character
- config.nmake: reformat some long lines for readability;
- plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile);
- dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ...

svn path=/trunk/; revision=35747
2011-02-02 01:19:53 +00:00
Bill Meier b0aac9d9c2 WIN32 ==> _WIN32
svn path=/trunk/; revision=35745
2011-02-01 23:02:54 +00:00
Balint Reczey 5dc1634248 Update filter for Windows-only symbols.
svn path=/trunk/; revision=35203
2010-12-16 17:22:17 +00:00
Balint Reczey 7f690fd086 Export only defined symbols from libwsutil.
Exported symbols are the symbols listed in libwsutil.def, but the
symbols defined in not used optional objects are filtered out.

svn path=/trunk/; revision=35202
2010-12-16 16:42:34 +00:00
Jeff Morriss ab75652d59 Include stdlib.h for getenv().
svn path=/trunk/; revision=35149
2010-12-07 20:45:22 +00:00
Jeff Morriss ad47f04c94 Move getenv_utf8() to wsutil.
svn path=/trunk/; revision=35148
2010-12-07 20:24:57 +00:00
Jeff Morriss d6eff0493c Revert rev 35145 for wsutil: go back to exporting all symbols. libwsutil's list of exported symbols includes our optional targets and trying to export symbols that don't (always) exist upsets some linkers. Anyway, the list of global symbols in libwsutil is (so far) quite short.
svn path=/trunk/; revision=35147
2010-12-07 18:31:50 +00:00
Balint Reczey 8b4573f705 Make libtool export only symbols listed in *.def files
svn path=/trunk/; revision=35145
2010-12-07 13:38:15 +00:00
Stephen Fisher 462245684a Add extern "C" to more header files.
svn path=/trunk/; revision=35093
2010-12-01 18:25:18 +00:00
Stephen Fisher efc64e43f6 Add #ifndef __PRIVILEGES_H__ / #define / #endif logic to prevent multiple
inclusions of privileges.h.


svn path=/trunk/; revision=35092
2010-12-01 18:16:41 +00:00
Balint Reczey 772161973c Add libtool version info to libwsutil.
From Eloy Paris <peloy@debian.org>
http://svn.debian.org/wsvn/collab-maint/ext-maint/wireshark/branches/wireshark-1.4.x%2Blibseparation/debian/patches/25_libwsutil-version.patch

svn path=/trunk/; revision=35030
2010-11-25 23:00:16 +00:00
Gerald Combs 68974e890a Make sure we pass a directory path and not a file path to
SetCurrentDirectory.  Should fix bug 5420.

svn path=/trunk/; revision=35010
2010-11-22 20:43:22 +00:00
Jörg Mayer de68ad3066 H. Sivank <hsivank@gmail.com>
I try to configure Wireshark with cmake on macosx 10.6.
It fails with : set_target_properties called with incorrect number of arguments.
Attached a patch to fix this issue.


svn path=/trunk/; revision=34201
2010-09-23 07:02:33 +00:00
Gerald Combs 8b1205bac4 More typos.
svn path=/trunk/; revision=34139
2010-09-16 19:56:34 +00:00
Gerald Combs 15e9e06448 Fix a typo.
svn path=/trunk/; revision=34138
2010-09-16 19:55:25 +00:00
Gerald Combs a87bdf9660 Turn on ASLR via /DYNAMICBASE and DEP via SetProcessDEPPolicy().
svn path=/trunk/; revision=34137
2010-09-16 19:20:06 +00:00
Jeff Morriss e8bee3d12e Also rename inet_ntop() on Windows
svn path=/trunk/; revision=34129
2010-09-15 21:41:27 +00:00
Jeff Morriss 71fca3c87f Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5160 differently:
On Windows, rename inet_pton() to ws_inet_pton() so that builds on Vista or
later systems (that have inet_pton() natively) will still work on pre-Vista
systems.

svn path=/trunk/; revision=34122
2010-09-15 15:13:40 +00:00
Gerald Combs 5aae07254f Forward-port r33953.
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-27 19:24:44 +00:00
Gerald Combs 88a0298183 Add a newline. Fixup whitespace.
svn path=/trunk/; revision=33933
2010-08-26 17:18:44 +00:00
Gerald Combs 58f1427305 Move Windows-specific material inside an appropriate #ifdef.
svn path=/trunk/; revision=33925
2010-08-25 22:41:26 +00:00
Gerald Combs 607b228df6 Add ws_load_library and ws_module_open, which respectively call
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-08-25 20:30:59 +00:00
Jeff Morriss d19f63e8f8 Include glib.h (for g_snprintf).
svn path=/trunk/; revision=33019
2010-05-29 03:35:32 +00:00
Jeff Morriss 7cfd2c66f9 Add braces to avoid an ambiguous else
svn path=/trunk/; revision=33018
2010-05-29 03:34:05 +00:00
Jeff Morriss 403e4e62a4 Put the optional objects in EXTRA..SOURCES instead of EXTRA_DIST.
Put the optional objects in a _DEPENDENCIES rule so they actually get built
when needed.

Use libtool to make these objects.  Remove AC variables that are no longer
needed.

svn path=/trunk/; revision=33017
2010-05-29 03:33:28 +00:00
Jeff Morriss baee0e77fe Make inet_aton an optional object on *NIX again
svn path=/trunk/; revision=33016
2010-05-29 01:00:52 +00:00
Jeff Morriss 600d32434f Add a missing variable from wsgetopt
svn path=/trunk/; revision=33013
2010-05-28 20:37:18 +00:00
Jeff Morriss 47e2d75820 Move some code (including the optional objects) into libwsutil
svn path=/trunk/; revision=33012
2010-05-28 20:19:55 +00:00
Jörg Mayer 96779de920 cmake changes:
- Add checking for linker flags
- Install plugins with the name including the Wireshark version.
  This will make it easier to find matching plugin versions if
  files get just copied over.


svn path=/trunk/; revision=32231
2010-03-18 10:27:17 +00:00
Jörg Mayer d2cc318f4f Beginnings of enabling static builds. Still to do:
* Add -static
* Registration may need different handling
* Add plugins
* Build error in wslua

svn path=/trunk/; revision=30987
2009-11-17 11:58:36 +00:00
Jörg Mayer b7ce60b95a Hopefully fix wsutil build on OSX.
svn path=/trunk/; revision=30091
2009-09-23 15:08:32 +00:00
Kovarththanan Rajaratnam 418699b85d Add utf_8to16_snprintf() which creates a UTF16 string according to the given format string. The format string + arguments are expected to be in UTF-8 format. This change effectively removes the only place where we use PRIu64.
svn path=/trunk/; revision=29635
2009-08-31 18:16:16 +00:00
Kovarththanan Rajaratnam 13df2a878b On Windows a shared library in divided into a DLL part (RUNTIME) and an import lib (ARCHIVE).
svn path=/trunk/; revision=29622
2009-08-30 07:09:29 +00:00
Anders Broman 67d6f5976e Move th /MP flag setting to LOCAL_CFLAGS set in configure.nmake
for MSVC variant 2008 only. As suggested by Bill Meier.

svn path=/trunk/; revision=29114
2009-07-16 08:27:18 +00:00
Anders Broman 91caa01090 Add /MP flag to make use of multi cores.
svn path=/trunk/; revision=29104
2009-07-15 20:55:31 +00:00
Jörg Mayer 67d508edaf OK, so my last commit message was too optimistic - I was using
an installed version of wsutil. dumpcap now really builds on
Linux via cmake.

svn path=/trunk/; revision=28754
2009-06-16 04:12:30 +00:00
Jörg Mayer d3fcd1a09b CMake now successfully builds dumpcap
svn path=/trunk/; revision=28745
2009-06-15 18:59:33 +00:00
Bill Meier 8837679be0 Fix ws_stdio_unlink so it works properly on WIndows for all Unicode filenames.
- 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
2009-03-08 22:12:13 +00:00
Bill Meier b89f2dd2bc Update a comment
svn path=/trunk/; revision=27626
2009-03-06 22:34:13 +00:00
Gerald Combs 57dadc4664 More Windows compiler flag cleanups. Fix a problem with my last commit
that would break compilation for older compilers. Create a "DLL_LDFLAGS"
variable and use it in DLLs and plugins. Use PLUGIN_LDFLAGS and
DLL_LDFLAGS where needed. Don't force i386 code in the TPG plugin.

svn path=/trunk/; revision=27582
2009-03-02 21:33:11 +00:00
Bill Meier 0147b08a4e Revise ascii...inplace to return a ptr to the string
svn path=/trunk/; revision=27253
2009-01-17 17:30:23 +00:00
Guy Harris f134efc657 wtap_pcap_encap_to_wtap_encap() and wtap_wtap_encap_to_pcap_encap() were
moved back into libwiretap.

svn path=/trunk/; revision=27077
2008-12-22 01:14:36 +00:00
Guy Harris 29a7854093 Move wtap_pcap_encap_to_wtap_encap() and wtap_wtap_encap_to_pcap_encap()
back to libwiretap for now, as it's inherently tied to reading libpcap
files; at some point we might want to have pcap-reading (and
pcap-ng-reading?) code in a separate library, for use by, for example,
dumpcap (and rawshark?).

svn path=/trunk/; revision=27076
2008-12-22 00:06:12 +00:00
Tomas Kukosa 096fd50872 commit forgotten changed file
svn path=/trunk/; revision=27035
2008-12-17 10:51:53 +00:00
Tomas Kukosa 9043380793 type conversion gdouble<->guint64 is not supported in all MSVC versions, convert it with functions
svn path=/trunk/; revision=27032
2008-12-17 09:41:17 +00:00
Anders Broman 95451b54f8 From Max Filippov:
patch to support IEE802.15.4 non-ASK PHY.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2906

svn path=/trunk/; revision=26792
2008-11-16 17:15:49 +00:00
Gerald Combs 09bf9e6946 ETH -> WS updates.
svn path=/trunk/; revision=26570
2008-10-27 04:47:57 +00:00
Jeff Morriss 8451a2b829 Add a newline at the end of the file
svn path=/trunk/; revision=26235
2008-09-19 16:40:37 +00:00
Gerald Combs acc2c73d09 Set SVN properties.
svn path=/trunk/; revision=26234
2008-09-19 16:28:57 +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
Guy Harris 36e19b19bb I hate Windows.
svn path=/trunk/; revision=26133
2008-09-03 22:35:20 +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
Stig Bjørlykke 1ead9eff69 Another try to fix the cast problem.
svn path=/trunk/; revision=26001
2008-08-13 11:04:15 +00:00
Stig Bjørlykke 01b33e4894 Add a cast to avoid a warning.
svn path=/trunk/; revision=26000
2008-08-13 10:37:24 +00:00
Stig Bjørlykke b683d25860 Added libwsutil.def to EXTRA_DIST
svn path=/trunk/; revision=25999
2008-08-13 10:35:33 +00:00
Guy Harris 7ec695d943 Take courage!
http://www.flickr.com/photos/clammm/503029097/

svn path=/trunk/; revision=25993
2008-08-12 22:11:15 +00:00
Gerald Combs e7a8150c7b Fix a bunch of Win64 compilation errors by cowardly casting size_ts to ints.
svn path=/trunk/; revision=25992
2008-08-12 21:25:19 +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 b0aae5a02e checkAPIs: remove '-g abort'; g_assert OK for wsutils files ?
svn path=/trunk/; revision=25761
2008-07-17 21:40:28 +00:00
Jeff Morriss 2cd9755e81 unicode-utils.c is only for Windows; don't build it on UN*X. Put in a check
to cause it to fail when built on UN*X.

svn path=/trunk/; revision=25704
2008-07-11 16:18:32 +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
Jeff Morriss 8980883a4e Move privileges.c and unicode-utils.c symbols from epan to wsutil
svn path=/trunk/; revision=25641
2008-06-30 18:07:34 +00:00
Jeff Morriss 83f9ecf96f Move privileges.c and unicode-utils.c from epan to wsutil (so things like
capinfos and dumpcap don't need to depend on libwireshark nor directly pull
in those modules).  Because capinfos and editcap were only being linked with
privileges.c if we had plugins, this allows those programs to be linked when
someone is compiling --without-plugins.

svn path=/trunk/; revision=25640
2008-06-30 17:16:29 +00:00
Gerald Combs b642ef10fa Have checkAPIs.pl print to stderr, so that its output is colored red in
Buildbot. Make capitalization more consistent. Look for abort functions in
wsutil.

svn path=/trunk/; revision=25619
2008-06-27 22:48:25 +00:00
Anders Broman 2640b786f4 Fix run checkapi for more targets.
svn path=/trunk/; revision=25414
2008-06-03 05:35:19 +00:00
Guy Harris d6e94dafb3 file_util.c is only for Windows; don't build it on UN*X. Put in a check
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-23 02:15:27 +00:00
Guy Harris 819dc6c790 Add a Makefile.common file, and have Makefile.am and Makefile.nmake use it.
svn path=/trunk/; revision=25360
2008-05-23 02:09:48 +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 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