| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
These threads just run in the background; we don't need to wait for them
to finish, so close the handle as soon as we've gotten it.
|
| |
|
|
|
|
| |
That way, we get the same semantics on Windows and UN*X.
|
|
|
|
|
| |
That's one fewer tool you have to go run out and get in order to
assemble the motorocycle engine you picked up from Ikea.
|
|
|
|
|
|
|
|
| |
To block a thread forever (or, on UN*X, until a signal), use
Sleep(INFINITE) on Windows and pause() on UN*X.
To block a thread for N seconds, use Sleep(N*1000) on Windows and
sleep(N) on UN*X.
|
| |
|
|
|
|
|
|
| |
Currently, we only have one protocol version, but the code should be
able to handle multiple versions in the future - and to be able to work
with older code that doesn't do negotiation.
|
| |
|
| |
|
|
|
|
| |
Fixes Coverity CID 1419001.
|
|
|
|
|
|
|
|
|
|
| |
On Windows, you're supposed to check against INVALID_SOCKET. On UN*X,
you're supposed to check against -1, but, on UN*X, we define
INVALID_SOCKET to be -1 so you can compare against INVALID_SOCKET on
both platforms.
That means that sock_open() should return INVALID_SOCKET on errors as
well.
|
|
|
|
| |
This fixes Coverity CID 1419002.
|
|
|
|
|
|
|
|
| |
In the daemon main loop, if we get an error after we've allocated the
control socket, close the control socket before continuing. Also,
report the error to the client.
Fixes Coverity CID 1419020.
|
| |
|
| |
|
|
|
|
| |
The option is -4, for IPv4-only, not -6.
|
|
|
|
|
| |
That way, rpcapd doesn't depend on them being exported from libpcap
(which they shouldn't be).
|
|
|
|
|
|
|
|
| |
sockutils.h may include <crtdbg.h> on Windows, and portability.h expects
that, if <crtdbg.h> is going to be included, it'll be included before
portability.h, so that, if __STDC__ is 0, strdup will have been defined
by <crtdbg.h>, and portability.h won't define it only to have a later
include of <crtdbg.h> redefine it and provoke warnings.
|
|
|
|
|
|
|
|
| |
This can prevent bizarre failures if, for example, you've done a
configuration in the top-level source directory, leaving behind one
config.h file, and then do an out-of-tree build in another directory,
with different configuration options. This way, we always pick up the
same config.h, in the build directory.
|
|
|
|
|
|
|
| |
On Linux, define _GNU_SOURCE to get as much stuff declared as possible.
Define the feature test macros in ftmacros.h, and include that befoe
including any header files other than config.h.
|
| |
|
| |
|
|
Everything in that directory is part of rpcapd.
That matches the source layout of WinPcap.
|