summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOdd Stranne <odd@mullvad.net>2020-02-01 15:27:04 +0100
committerOdd Stranne <odd@mullvad.net>2020-02-03 13:42:46 +0100
commit0c2d0c1221c0bcb4523ce5458c2771e8e6dd34e9 (patch)
treedf684eb2d673afbdb3e26d3f40cf1ed2147a5e2b
parent746e0ddf05a53911fddc4ae2fc8dfb67600ede8e (diff)
downloadmullvadvpn-0c2d0c1221c0bcb4523ce5458c2771e8e6dd34e9.tar.xz
mullvadvpn-0c2d0c1221c0bcb4523ce5458c2771e8e6dd34e9.zip
Remove redundant enum type
-rw-r--r--windows/winnet/src/winnet/winnet.cpp6
-rw-r--r--windows/winnet/src/winnet/winnet.h12
2 files changed, 6 insertions, 12 deletions
diff --git a/windows/winnet/src/winnet/winnet.cpp b/windows/winnet/src/winnet/winnet.cpp
index 59a08b826c..7a206635ed 100644
--- a/windows/winnet/src/winnet/winnet.cpp
+++ b/windows/winnet/src/winnet/winnet.cpp
@@ -366,10 +366,10 @@ WinNet_RegisterDefaultRouteChangedCallback(
// Translate the family type.
//
- static const std::pair<ADDRESS_FAMILY, WINNET_IP_FAMILY> familyMap[] =
+ static const std::pair<ADDRESS_FAMILY, WINNET_ADDR_FAMILY> familyMap[] =
{
- { static_cast<ADDRESS_FAMILY>(AF_INET), WINNET_IP_FAMILY_V4 },
- { static_cast<ADDRESS_FAMILY>(AF_INET6), WINNET_IP_FAMILY_V6 }
+ { static_cast<ADDRESS_FAMILY>(AF_INET), WINNET_ADDR_FAMILY_IPV4 },
+ { static_cast<ADDRESS_FAMILY>(AF_INET6), WINNET_ADDR_FAMILY_IPV6 }
};
const auto translatedFamily = common::ValueMapper::Map<>(family, familyMap);
diff --git a/windows/winnet/src/winnet/winnet.h b/windows/winnet/src/winnet/winnet.h
index 29efd4fd12..5afc4052eb 100644
--- a/windows/winnet/src/winnet/winnet.h
+++ b/windows/winnet/src/winnet/winnet.h
@@ -177,20 +177,14 @@ enum WINNET_DEFAULT_ROUTE_CHANGED_EVENT_TYPE
WINNET_DEFAULT_ROUTE_CHANGED_EVENT_TYPE_REMOVED = 1,
};
-enum WINNET_IP_FAMILY
-{
- WINNET_IP_FAMILY_V4 = 0,
- WINNET_IP_FAMILY_V6 = 1,
-};
-
typedef void (WINNET_API *WinNetDefaultRouteChangedCallback)
(
WINNET_DEFAULT_ROUTE_CHANGED_EVENT_TYPE eventType,
- // Signals which IP family the event relates to.
- WINNET_IP_FAMILY family,
+ // Indicates which IP family the event relates to.
+ WINNET_ADDR_FAMILY family,
- // For update events, signals the interface associated with the new best default route.
+ // For update events, indicates the interface associated with the new best default route.
uint64_t interfaceLuid,
void *context