Commit Graph

16 Commits

Author SHA1 Message Date
Simon Rozman
d675646ab8 api: upgrade
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-07-28 20:25:27 +02:00
Simon Rozman
7dffa4be72 vs: move shared configuration to wintun.props and upgrade
Remember to rename wintun.vcxproj.user file in your local working folder
to wintun.props.user manually.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-07-28 20:22:18 +02:00
Simon Rozman
bc5cde8916 api: upgrade logging
Log runtime information to quickly check whether the values are sane
when analyzing error logs sent in by users.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-02-16 04:19:21 +01:00
Jason A. Donenfeld
2628412d71 global: bump copyright
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-01-30 16:45:26 +01:00
Simon Rozman
f657e6fd27 api: use GetLastError() to report failures like standard Win32
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-11-04 13:21:42 +01:00
Simon Rozman
47a241e5d8 api: simplify and unify error messages
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-11-02 12:19:36 +01:00
Jason A. Donenfeld
937eb44727 api: get rid of pch and make headers sane
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-10-31 19:11:51 +01:00
Jason A. Donenfeld
8c935ce151 api: remove security attributes debug trap door
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-10-31 10:41:49 +01:00
Simon Rozman
0fdd9fbb85 api: use standard C void
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:01 +01:00
Simon Rozman
8272da638e api: unify security descriptors and disable for _DEBUG
When debugger is attached, CreateDirectory() with SYSTEM-only SID fails
with "This security ID may not be assigned as the owner of this object.
(Code 0x0000051B)".

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:00 +01:00
Simon Rozman
ac6db7788a api: move documentation to .h and discontinue on static functions
While Doxygen correctly locates the function documentation when it is
written directly preceding the function body, Microsoft Visual Studio
IDE does not. The former requires the documentation to precede the
function declaration.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:00 +01:00
Simon Rozman
0ad302c11d api: stop double error status reporting
When an internal function logs an error and its cause, it bloats the log
when the caller logs the cause again.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:00 +01:00
Simon Rozman
16a9737578 api: internal reorganization
Gather adapter management in adapter.h/.c (formerly devmgmt.h/.c) and
unify HwID tests.

Use "Namespace" namespace in all functions from namespace.h/.c.

Fix char strings in LOG_...

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:00 +01:00
Simon Rozman
78b7a01eb3 api: simplify logger macros names
WINTUN_LOGGER_... => LOGGER_... => LOG_...

Those macros are internal, so they don/t need to start with WINTUN_...

Replacing the noun LOGGER_... with the verb LOG_... makes the code more
natural to read now.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:00 +01:00
Simon Rozman
84113bd294 api: unify and document resource loading
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:00 +01:00
Simon Rozman
c324d07ffb api: add driver management
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:50:59 +01:00