diff options
| author | Odd Stranne <odd@mullvad.net> | 2018-05-31 23:20:39 +0200 |
|---|---|---|
| committer | Odd Stranne <odd@mullvad.net> | 2018-06-18 08:45:15 +0200 |
| commit | 276600656eb68d3fd3da7db441871b44d7759236 (patch) | |
| tree | 5752fa47908769a1226f3090957b229dea4c8fae /windows | |
| parent | 8a296d6725debe2a6d93b57b7eedcf98f4542bd3 (diff) | |
| download | mullvadvpn-276600656eb68d3fd3da7db441871b44d7759236.tar.xz mullvadvpn-276600656eb68d3fd3da7db441871b44d7759236.zip | |
Update WINDNS testing project with config sink
Diffstat (limited to 'windows')
| -rw-r--r-- | windows/windns/src/extras/loader/loader.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/windows/windns/src/extras/loader/loader.cpp b/windows/windns/src/extras/loader/loader.cpp index d73fac4228..8c58aac6a2 100644 --- a/windows/windns/src/extras/loader/loader.cpp +++ b/windows/windns/src/extras/loader/loader.cpp @@ -8,6 +8,11 @@ void WINDNS_API ErrorSink(const char *errorMessage, void *context) std::cout << "Error: " << errorMessage << std::endl; } +void WINDNS_API ConfigSink(const void *configData, uint32_t dataLength, void *context) +{ + std::wcout << L"Updated config was delivered to WINDNS client code" << std::endl; +} + int main() { std::wcout << L"Init: " << WinDns_Initialize(ErrorSink, nullptr) << std::endl; @@ -18,14 +23,14 @@ int main() L"1.1.1.1" }; - std::wcout << L"Set: " << WinDns_Set(servers, _countof(servers)) << std::endl; + std::wcout << L"Set: " << WinDns_Set(servers, _countof(servers), ConfigSink, nullptr) << std::endl; std::wcout << L"Press a key to abort DNS monitoring + enforcing..." << std::endl; _getwch(); std::wcout << L"Reset: " << WinDns_Reset() << std::endl; - std::wcout << L"Set: " << WinDns_Set(servers, _countof(servers)) << std::endl; + std::wcout << L"Set: " << WinDns_Set(servers, _countof(servers), ConfigSink, nullptr) << std::endl; std::wcout << L"Press a key to abort DNS monitoring + enforcing..." << std::endl; _getwch(); |
