aboutsummaryrefslogtreecommitdiffstats
path: root/api/api.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* api: remove security attributes debug trap doorJason A. Donenfeld2020-10-311-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: make #ifdef-s more descriptiveSimon Rozman2020-10-311-0/+7
| | | | | Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Simon Rozman <simon@rozman.si>
* api: switch to private heapSimon Rozman2020-10-301-0/+1
| | | | | | | 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>
* api: introduce wintun.hSimon Rozman2020-10-301-22/+0
| | | | | | | | | | | 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>
* api: unify security descriptors and disable for _DEBUGSimon Rozman2020-10-301-0/+1
| | | | | | | | 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>
* api: move documentation to .h and discontinue on static functionsSimon Rozman2020-10-301-0/+13
| | | | | | | | | 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>
* api: introduce loggingSimon Rozman2020-10-301-0/+7
| | | | | | And other unifications with installer before merging. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: split api.hSimon Rozman2020-10-301-116/+1
| | | | | | As the project grew, api.h got bloated. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: honor locale when comparing case-insensitiveSimon Rozman2020-10-301-0/+6
| | | | | | | | | Quote from MSDN: > You will need to call setlocale for _wcsicmp to work with Latin 1 > characters. The C locale is in effect by default, so, for example, ä > will not compare equal to Ä. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: tighten source code annotationSimon Rozman2020-10-301-2/+2
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: tighten maximum registry key path lengthSimon Rozman2020-10-301-2/+6
| | | | | | | Maximum registry key path length is not 260 (MAX_PATH), but 255 (256 incl. zero terminator). Signed-off-by: Simon Rozman <simon@rozman.si>
* api: cleanupSimon Rozman2020-10-301-19/+19
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: rename WINSTATUS to WINTUN_STATUSSimon Rozman2020-10-301-19/+19
| | | | | | ...to reduce name collision probability. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: finish porting from wireguard-goSimon Rozman2020-10-301-1/+69
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: unify Win32 error typeSimon Rozman2020-10-301-5/+5
| | | | | | | This makes the code more readable and works around the clang-format.exe issues with _Return_type_success_ source annotation. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: port GetInterface member from wireguard-goSimon Rozman2020-10-301-0/+18
| | | | | | | | | | | Mind that this also fixes the order of adapter detection checks. A fast test to eliminate non-Wintun adapters from iteration to speed things up rendered the method incapable of detecting a non-Wintun adapter with the name we are looking for. ERROR_OBJECT_NOT_FOUND was replaced with ERROR_FILE_NOT_FOUND. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: port nci package from wireguard-goSimon Rozman2020-10-301-0/+15
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: port tun\wintun\namespace_windows.go from wireguard-goSimon Rozman2020-10-301-0/+13
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: add skeleton for wintun.dllSimon Rozman2020-10-301-0/+10
Signed-off-by: Simon Rozman <simon@rozman.si>