1 // Copyright (c) 2012 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.
5 #ifndef CHROMEOS_NETWORK_NETWORK_IP_CONFIG_H_
6 #define CHROMEOS_NETWORK_NETWORK_IP_CONFIG_H_
11 #include "base/basictypes.h"
12 #include "base/callback.h"
13 #include "chromeos/chromeos_export.h"
17 // ipconfig types (see flimflam/files/doc/ipconfig-api.txt)
19 IPCONFIG_TYPE_UNKNOWN,
23 IPCONFIG_TYPE_BOOTP, // Not Used.
24 IPCONFIG_TYPE_ZEROCONF,
30 struct CHROMEOS_EXPORT NetworkIPConfig {
31 NetworkIPConfig(const std::string& device_path, IPConfigType type,
32 const std::string& address, const std::string& netmask,
33 const std::string& gateway, const std::string& name_servers);
36 std::string ToString() const;
38 std::string device_path; // This looks like "/device/0011aa22bb33"
43 std::string name_servers;
46 typedef std::vector<NetworkIPConfig> NetworkIPConfigVector;
48 // Used to return the list of IP configs and hardware address from an
49 // asynchronous call to Shill. The hardware address is usually a MAC address
50 // like "0011AA22BB33". |hardware_address| will be an empty string, if no
51 // hardware address is found.
52 typedef base::Callback<void(const NetworkIPConfigVector& ip_configs,
53 const std::string& hardware_address)>
54 NetworkGetIPConfigsCallback;
56 } // namespace chromeos
58 #endif // CHROMEOS_NETWORK_NETWORK_IP_CONFIG_H_