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_API_NETWORK_INTERFACE_H_ 6 #define PLATFORM_API_NETWORK_INTERFACE_H_ 7 8 #include <vector> 9 10 #include "platform/base/interface_info.h" 11 12 namespace openscreen { 13 14 // Returns an InterfaceInfo for each currently active network interface on the 15 // system. No two entries in this vector can have the same NetworkInterfaceIndex 16 // value. 17 // 18 // This can return an empty vector if: 1) there are no active network 19 // interfaces, 2) an error occurred querying the system for them, or 3) Open 20 // Screen features that involve broadcast listening/publishing (e.g., mDNS 21 // discovery) are not being used. 22 std::vector<InterfaceInfo> GetNetworkInterfaces(); 23 24 } // namespace openscreen 25 26 #endif // PLATFORM_API_NETWORK_INTERFACE_H_ 27