1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef PLATFORM_IMPL_NETWORK_INTERFACE_H_ 6 #define PLATFORM_IMPL_NETWORK_INTERFACE_H_ 7 8 #include <vector> 9 10 #include "absl/types/optional.h" 11 #include "platform/base/interface_info.h" 12 13 namespace openscreen { 14 15 // The below functions are responsible for returning the network interfaces 16 // provided of the current machine. GetAllInterfaces() returns all interfaces, 17 // real or virtual. GetLoopbackInterfaceForTesting() returns one such interface 18 // which is associated with the machine's loopback interface, while 19 // GetNetworkInterfaces() returns all non-loopback interfaces. 20 std::vector<InterfaceInfo> GetAllInterfaces(); 21 absl::optional<InterfaceInfo> GetLoopbackInterfaceForTesting(); 22 std::vector<InterfaceInfo> GetNetworkInterfaces(); 23 24 } // namespace openscreen 25 26 #endif // PLATFORM_IMPL_NETWORK_INTERFACE_H_ 27