aboutsummaryrefslogtreecommitdiffstats
path: root/api/registry.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* api: check netsetup2 key when trying to determine if GUID is duplicatedjd/netsetup2-guid-compareJason A. Donenfeld2021-05-111-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: clean up NetSetup2 GUIDsJason A. Donenfeld2021-05-051-0/+71
| | | | | | | | Recent versions of Windows fail to tidy up, causing issues when reusing GUIDs. Check to see if a GUID might be orphaned, and forcibly clear out the registry state if so. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: upgrade logging0.10.2Simon Rozman2021-02-161-18/+70
| | | | | | | 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>
* global: bump copyrightJason A. Donenfeld2021-01-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: use a logging alloc functionJason A. Donenfeld2020-11-041-41/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: use GetLastError() to report failures like standard Win32Simon Rozman2020-11-041-92/+156
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: check buffer overflows in runtimeSimon Rozman2020-10-311-7/+3
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: get rid of pch and make headers saneJason A. Donenfeld2020-10-311-1/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: selectively use temporary variable to prepare outputSimon Rozman2020-10-311-4/+7
| | | | | Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Simon Rozman <simon@rozman.si>
* api: fallback to hard-coded versionSimon Rozman2020-10-311-3/+7
| | | | | | | Windows 7 doesn't have DriverMajorVersion and DriverMinorVersion registry values yet. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: switch to private heapSimon Rozman2020-10-301-21/+16
| | | | | | | 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: revise loggingSimon Rozman2020-10-301-5/+6
| | | | | | | | | | | | RegistryQueryString() may produce one or more "File not found" errors when called from RegistryQueryStringWait() - which is expected while waiting. Those errors were annoying and awkward to read in the log. Furthermore, should RegistryQueryString() fail, it already displays detailed Windows error message and the parent's logging was simplified to prevent repetitions in the log. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: move documentation to .h and discontinue on static functionsSimon Rozman2020-10-301-120/+0
| | | | | | | | | 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: log out-of-memory errors tooSimon Rozman2020-10-301-6/+6
| | | | | | | It's not likely the write to log will succeed in low memory condition thou. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: remove dead codeSimon Rozman2020-10-301-11/+0
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: internal reorganizationSimon Rozman2020-10-301-3/+3
| | | | | | | | | | | 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>
* api: simplify logger macros namesSimon Rozman2020-10-301-16/+16
| | | | | | | | | | | 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>
* api: introduce loggingSimon Rozman2020-10-301-7/+35
| | | | | | And other unifications with installer before merging. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: update documentationSimon Rozman2020-10-301-51/+50
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: tighten maximum registry key path lengthSimon Rozman2020-10-301-3/+3
| | | | | | | 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-16/+16
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* api: add pre-compiled header supportSimon Rozman2020-10-301-3/+1
| | | | | | ...for super-fast compilation. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: rename WINSTATUS to WINTUN_STATUSSimon Rozman2020-10-301-10/+10
| | | | | | ...to reduce name collision probability. Signed-off-by: Simon Rozman <simon@rozman.si>
* api: finish porting from wireguard-goSimon Rozman2020-10-301-0/+411
Signed-off-by: Simon Rozman <simon@rozman.si>