Age | Commit message (Collapse) | Author | Files | Lines |
|
In file included from ../sharkd_daemon.c:31:
../wsutil/wsgetopt.h:38:21: warning: redundant redeclaration of ‘optarg’ [-Wredundant-decls]
38 | WS_DLL_PUBLIC char *optarg;
| ^~~~~~
In file included from /usr/include/bits/getopt_posix.h:27,
from /usr/include/unistd.h:883,
from ../wsutil/socket.h:33,
from ../sharkd_daemon.c:28:
/usr/include/bits/getopt_core.h:36:14: note: previous declaration of ‘optarg’ was here
36 | extern char *optarg;
| ^~~~~~
In file included from ../sharkd_daemon.c:31:
../wsutil/wsgetopt.h:52:19: warning: redundant redeclaration of ‘optind’ [-Wredundant-decls]
52 | WS_DLL_PUBLIC int optind;
| ^~~~~~
In file included from /usr/include/bits/getopt_posix.h:27,
from /usr/include/unistd.h:883,
from ../wsutil/socket.h:33,
from ../sharkd_daemon.c:28:
/usr/include/bits/getopt_core.h:50:12: note: previous declaration of ‘optind’ was here
50 | extern int optind;
| ^~~~~~
In file included from ../sharkd_daemon.c:31:
../wsutil/wsgetopt.h:57:19: warning: redundant redeclaration of ‘opterr’ [-Wredundant-decls]
57 | WS_DLL_PUBLIC int opterr;
| ^~~~~~
In file included from /usr/include/bits/getopt_posix.h:27,
from /usr/include/unistd.h:883,
from ../wsutil/socket.h:33,
from ../sharkd_daemon.c:28:
/usr/include/bits/getopt_core.h:55:12: note: previous declaration of ‘opterr’ was here
55 | extern int opterr;
| ^~~~~~
In file included from ../sharkd_daemon.c:31:
../wsutil/wsgetopt.h:61:19: warning: redundant redeclaration of ‘optopt’ [-Wredundant-decls]
61 | WS_DLL_PUBLIC int optopt;
| ^~~~~~
In file included from /usr/include/bits/getopt_posix.h:27,
from /usr/include/unistd.h:883,
from ../wsutil/socket.h:33,
from ../sharkd_daemon.c:28:
/usr/include/bits/getopt_core.h:59:12: note: previous declaration of ‘optopt’ was here
59 | extern int optopt;
| ^~~~~~
In file included from ../sharkd_daemon.c:31:
../wsutil/wsgetopt.h:131:19: warning: redundant redeclaration of ‘getopt’ [-Wredundant-decls]
131 | WS_DLL_PUBLIC int getopt (int ___argc, char *const *___argv, const char *__shortopts)
| ^~~~~~
In file included from /usr/include/bits/getopt_posix.h:27,
from /usr/include/unistd.h:883,
from ../wsutil/socket.h:33,
from ../sharkd_daemon.c:28:
/usr/include/bits/getopt_core.h:91:12: note: previous declaration of ‘getopt’ was here
91 | extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
| ^~~~~~
|
|
Commit 69df23fc40951556d2f9f303944f943547c31ac0 refactored sharkd_loop()
making the use of argv[] dependent on the #define _WIN32. Add _U_ for
the #ifndef _WIN32 case.
Suppresses:
> [2005/2398] Building C object CMakeFiles/sharkd.dir/sharkd_daemon.c.o
> /projects/wireshark/sharkd_daemon.c:357:33: warning: unused parameter 'argv' [-Wunused-parameter]
> sharkd_loop(int argc _U_, char* argv[])
> ^
> 1 warning generated.
|
|
This change adds code to allow the selection of a configuration
profile during sharkd start by adding a -C command line option.
A new -a option has been added to specify the api service
endpoint e.g. tcp:127.0.0.1:4446
The change also adds version display (-v) and help display (-h) options.
These additions have been made in a way to ensure that the original
command line options still work correctly to maintain backward
compatibility.
The new options have been added using the getopt_long(...) function
that is used by tshark to simplify the addition of further command
line options.
Closes #17222
|
|
Change all wireshark.org URLs to use https.
Fix some broken links while we're at it.
Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
It's broken, unmaintained, poorly implemented and obsoleted by saner
debug-info methods.
Note: To do the compliance check properly would require much more
extensive work to clearly define public and private interfaces (without
manual bookeeping of files or symbols either, of course, because who
would want that...).
Change-Id: Ib801f3c152ca2369f95ca1f4af4d37cd8cc7c47a
Reviewed-on: https://code.wireshark.org/review/33928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
|
|
Those routines exist on both Windows and UN*X, but they don't do
anything on UN*X (they could if it were ever necessary).
That eliminates some #ifdefs, and also means that the gory details of
initializing Winsock, including the Winsock version being requested,
are buried in one routine.
The initialization routine returns NULL on success and a pointer to a
g_malloc()ated error message on failure; report the error to the user,
along with a "report this to the Wireshark developers" suggestion.
That means including wsutil/socket.h, which obviates the need to include
some headers for socket APIs, as it includes them for you.
Change-Id: I9327bbf25effbb441e4217edc5354a4d5ab07186
Reviewed-on: https://code.wireshark.org/review/33045
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Make sure we link each application that calls WSAStartup with ws2_32.lib.
Pass version 2.2 to WSAStartup. Wikipedia says it was introduced in 1996,
so we should be OK.
Ping-Bug: 15711
Change-Id: I431839e930e7c646669af7373789640b5180ec28
Reviewed-on: https://code.wireshark.org/review/33033
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
|
|
Move ws_pipe_kill_child_on_exit to win32-utils. Add win32_create_process,
which calls CreateProcess + AssignProcessToJobObject. Use
win32_create_process instead of CreateProcess everywhere.
Bug: 1419
Change-Id: I7a1f17dddf6a73f6973d54621f271b69311400d1
Reviewed-on: https://code.wireshark.org/review/26448
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
The first is deprecated, as per https://spdx.org/licenses/.
Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
A while back Graham pointed out the SPDX project (spdx.org), which is
working on standardizing license specifications:
https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html
Appendix V of the specification describes a short identifier
(SPDX-License-Identifier) that you can use in place of boilerplate in
your source files:
https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b
Start the conversion process with our top-level C and C++ files.
Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878
Reviewed-on: https://code.wireshark.org/review/24302
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
Error checking omitted like in original code.
Change-Id: If8b4181d30ddf5717951aaf7ec61db25c0bc5322
Reviewed-on: https://code.wireshark.org/review/24309
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
|
|
Change-Id: I65713f6d49fccb2045a99636d0d2f1aa5be44b83
Reviewed-on: https://code.wireshark.org/review/23677
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
|
|
Patch will allow to use stdin/stdout on other than windows platforms.
Change-Id: I729ebd4efaa1675956b085e74b413805125a7d7a
Reviewed-on: https://code.wireshark.org/review/23676
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
|
|
Windows vscodeanalysis complains even though the event is probably
very unlikely.
Change-Id: Iafe158eea5586908209d6bfe1e45540117558673
Reviewed-on: https://code.wireshark.org/review/20727
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
Change-Id: I907dbc924574b02d2f1b8d7668158b5b6d2c87cf
Reviewed-on: https://code.wireshark.org/review/20073
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
|
|
According to https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx
the lpCommandLine argument must not be const as is may cause an access violation.
Change-Id: Iedd77663cd21ca8df542595890fbc7023f2c9c2b
Reviewed-on: https://code.wireshark.org/review/19922
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
-1 is fine on UN*X, but, on Windows, it's INVALID_SOCKET. We define
INVALID_SOCKET as (-1) on UN*X, so it can be used on both platforms.
Change-Id: Ib2269ddf98c352a1d3c85e44006cc49d80750a78
Reviewed-on: https://code.wireshark.org/review/19909
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: Ie9ad31289f0572a7e7249fcb3305849673536f05
Reviewed-on: https://code.wireshark.org/review/19908
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I6581bacdea49416cc26431f66b093f36b39c5a67
Reviewed-on: https://code.wireshark.org/review/19829
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Have a wsutil/socket.h file, for inclusion by everything that uses
sockets, that contains the UN*X-vs-Windows #includes and #defines to
hide some UN*X-sockets vs. Winsock API differences. That stuff mostly
comes from from extcap/extcap-base.h; have that file just include
wsutil/socket.h rather than defining that stuff itself.
Include it in sharkd_daemon.c. Use socklen_t for the size of things to
pass to bind() as the last argument; wsutil/socket.h defines it as int
on Windows.
Ignore sharkd in Git.
Change-Id: I3f2171b7aa613717f52305f62bfd7d43e0172dc6
Reviewed-on: https://code.wireshark.org/review/19796
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>
|
|
Change-Id: I8c614189159f1263d9452d495cee34d1a2c1bfcb
Reviewed-on: https://code.wireshark.org/review/19790
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
sharkd listens on UNIX socket and allows external clients
to run commands like: loading file, analysing frames or running TAP(s).
Change-Id: I443b2865e4adfd1c11f4f57d09ff7fce6b1e8766
Reviewed-on: https://code.wireshark.org/review/18208
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
|