Commit graph

34 commits

Author SHA1 Message Date
Jeroen Koekkoek
3b69213f51 Do not require table to contain address if interface is down (Fixes #55)
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-12-10 13:05:59 +01:00
Erik Boasson
e16c59e392 use sizeof(buffer) instead of uninitialised variable
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-01 12:58:22 +01:00
Jeroen Koekkoek
7acf32663e Add tests for new logging implementation
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-30 23:42:55 +01:00
Jeroen Koekkoek
1cf03332ca Simplify logging and remove unwanted functions from abstraction layer
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-30 23:42:19 +01:00
Jeroen Koekkoek
ac020f62f7 Add read-write locks for POSIX
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-30 23:32:26 +01:00
eboasson
2e2224daea
Merge pull request #31 from eboasson/builtintopics
Refactor sample representation (along with a few small other details)
2018-11-09 12:23:47 +01:00
eboasson
970680468c
Merge pull request #34 from k0ekk0ek/cunit
Cleanup and CUnit integration and add support for theories and fixtures
2018-11-08 17:31:16 +01:00
Jeroen Koekkoek
c903fee0c9 Extend strcasecmp tests and convert them to theories
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-08 09:42:02 +01:00
Erik Boasson
263a9b30a3 Do not consider loopback on Windows multicast-capable
Tests with network interface set to 127.0.0.1 don't see any multicasts
despite multicast loopback being enabled.  It therefore seems the
multicast flag on the loopback interface on Windows is at least
unreliable, and so the safest course of action is to disable multicast
by default on that interface.

Internal/AssumeMulticastCapable can still be used to override this and
enable multicasting anyway.

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-06 09:32:28 +01:00
Erik Boasson
d05b0a4d13 Use GetSystemTimePreciseAsFileTime
When building for Windows 8 or later, use
GetSystemTimePreciseAsFileTime, otherwise do a run-time lookup of that
function and fall back to GetSystemTimeAsFileTime if it doesn't exist.

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-05 08:56:20 +01:00
Jeroen Koekkoek
630178fb12 Cleanup CUnit integration and add support for theories
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-01 19:32:24 +01:00
Erik Boasson
b34cbdcf0c sockaddr_compare should really be ipaddr_compare
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-10-29 13:38:16 +08:00
Jeroen Koekkoek
8fc9535316 Terminate address filter with OS_AF_NULL instead of 0 (AF_UNSPEC)
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-24 22:32:27 +02:00
Jeroen Koekkoek
40b7b5f423 Copy socket address regardless of interface state
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-24 19:33:51 +02:00
Jeroen Koekkoek
4b3c6ed643 Fix warning caused by assert on parameter required to be nonnull
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-24 16:53:12 +02:00
Jeroen Koekkoek
961706bb48 Replace NULL address family filter by supported address families
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-24 16:31:43 +02:00
Jeroen Koekkoek
25198e565b Rename os_sockaddr_size to os_sockaddr_get_size for consitency
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-24 15:53:29 +02:00
Jeroen Koekkoek
0324f36dd2 Disable IPv6 interface tests if IPv6 is not available at runtime
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-24 00:13:16 +02:00
Jeroen Koekkoek
fbde1ba5b8 Do not stop interface iteration if address is NULL
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 17:50:13 +02:00
Jeroen Koekkoek
a9e160ec07 Update API documentation for modified socket address functions
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 17:35:08 +02:00
Jeroen Koekkoek
6b41dada9d Fix compiler warnings
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 17:35:08 +02:00
Jeroen Koekkoek
6867f949cd Add extra os_getifaddrs test cases
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 17:35:08 +02:00
Jeroen Koekkoek
03c081fa18 Simplify os_getifaddrs operation for POSIX platforms
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 17:30:33 +02:00
Jeroen Koekkoek
7ba3bca087 Change socket function signatures to use os_sockaddr
* Consolidated and cleaned up some (duplicate) functions.
* Removed some unused functions that did not make sense to keep around.

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 17:00:15 +02:00
Jeroen Koekkoek
ea3f5e7ff4 Disable AF_PACKET interfaces for all platforms but Linux
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 16:58:40 +02:00
Jeroen Koekkoek
458b1df3f7 Replace os_sockQueryInterfaces by os_getifaddrs
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 16:58:40 +02:00
Jeroen Koekkoek
2fc4cac1a7 Consolidate some duplicate functions
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-10-19 16:58:40 +02:00
Erik Boasson
b7487b18a6 stricter warning checks and the corresponding fixes
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-08-09 09:23:03 +02:00
Jeroen Koekkoek
657325707c return early from os_reportExit if report stack is not initialized
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-08-06 15:10:10 +02:00
Erik Boasson
37953f5c49 initial support for OpenIndiana
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-08-02 12:53:36 +02:00
Erik Boasson
bfb5874373 fix crashes when C++ global destructors call DDS code
- properly count invocations of os_osInit/os_osExit
- handle concurrent invocations of those
- provide a single mutex for use by dds_init
- eliminate use of atexit()
- attendant dds_init/dds_fini changes
- fix related crash in thread local storage cleanup

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-07-18 17:44:41 +02:00
Erik Boasson
890af34168 Change install location of OS abstraction files to a subdirectory of ddsc
This patch puts all installed include files under PREFIX/include/ddsc so we no longer create a /usr/local/include/os directory in a default installation.

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-07-09 13:16:56 +02:00
Michiel Beemster
06a894a990 Add getopt 1.5 3rd party dependency 2018-05-08 10:18:52 +02:00
Michiel Beemster
11d9ce37aa Initial contribution 2018-04-10 17:03:59 +02:00