Commit Graph

7 Commits

Author SHA1 Message Date
Simon Rozman
f389fd5629 api: use C locale for adapter and pool name case-insensitive comparing
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-31 10:41:47 +01:00
Simon Rozman
e630c3bec1 api: fix zero-parameter C function prototypes
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-31 10:41:46 +01:00
Simon Rozman
bf4eabb4ca api: switch to private heap
We must not use the process heap, as it is changeable. Client may change
it causing our HeapFree() to use wrong heap.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:01 +01:00
Simon Rozman
4b8f879fd6 api: add ring management
Rather than every client reinvent the art of using the Wintun and its
ring buffers, we offer helper structs and functions to unify and
simplify Wintun usage.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:01 +01:00
Simon Rozman
449876fdfd api: introduce wintun.h
The SDK header for deployment containing datatype and function
declarations for use by C/C++ clients.

As we shall not distribute MSVC wintun.lib files, making clients need to
use GetProcAddress(), this file contains function type declarations
rather then __declspec(dllimport) function declarations.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:01 +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
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