blob: 7c1748cc6c1d39bfbc1ca990c5f7a725d5295155 [file] [log] [blame]
mukesh agrawalb54601c2011-06-07 17:39:22 -07001// Copyright (c) 2011 The Chromium OS 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#include "shill/wifi_service.h"
6
7#include <string>
8
9#include <base/logging.h>
Chris Masone34af2182011-08-22 11:59:36 -070010#include <base/stringprintf.h>
11#include <base/string_number_conversions.h>
Paul Stewarta41e38d2011-11-11 07:47:29 -080012#include <base/string_split.h>
Chris Masone34af2182011-08-22 11:59:36 -070013#include <base/string_util.h>
Chris Masone3bd3c8c2011-06-13 08:20:26 -070014#include <chromeos/dbus/service_constants.h>
mukesh agrawal6e277772011-09-29 15:04:23 -070015#include <dbus/dbus.h>
mukesh agrawald835b202011-10-07 15:26:47 -070016#include <glib.h>
mukesh agrawalb54601c2011-06-07 17:39:22 -070017
18#include "shill/control_interface.h"
19#include "shill/device.h"
mukesh agrawal1a056262011-10-05 14:36:54 -070020#include "shill/error.h"
Paul Stewart26b327e2011-10-19 11:38:09 -070021#include "shill/event_dispatcher.h"
mukesh agrawal1a056262011-10-05 14:36:54 -070022#include "shill/ieee80211.h"
Thieu Lef7709452011-11-15 01:13:19 +000023#include "shill/property_accessor.h"
Paul Stewartd08f4432011-11-04 07:48:20 -070024#include "shill/store_interface.h"
mukesh agrawalb54601c2011-06-07 17:39:22 -070025#include "shill/wifi.h"
mukesh agrawal6e277772011-09-29 15:04:23 -070026#include "shill/wifi_endpoint.h"
27#include "shill/wpa_supplicant.h"
mukesh agrawalb54601c2011-06-07 17:39:22 -070028
29using std::string;
mukesh agrawal1a056262011-10-05 14:36:54 -070030using std::vector;
mukesh agrawalb54601c2011-06-07 17:39:22 -070031
32namespace shill {
mukesh agrawalb54601c2011-06-07 17:39:22 -070033
Paul Stewartd08f4432011-11-04 07:48:20 -070034const char WiFiService::kStorageHiddenSSID[] = "WiFi.HiddenSSID";
35
mukesh agrawalb54601c2011-06-07 17:39:22 -070036WiFiService::WiFiService(ControlInterface *control_interface,
37 EventDispatcher *dispatcher,
Chris Masone6791a432011-07-12 13:23:19 -070038 Manager *manager,
Chris Masone2b105542011-06-22 10:58:09 -070039 const WiFiRefPtr &device,
Paul Stewarta41e38d2011-11-11 07:47:29 -080040 const vector<uint8_t> &ssid,
41 const string &mode,
42 const string &security,
Paul Stewartced6a0b2011-11-08 15:32:04 -080043 bool hidden_ssid)
mukesh agrawal7a4e4002011-09-06 11:26:05 -070044 : Service(control_interface, dispatcher, manager, flimflam::kTypeWifi),
Chris Masone75612302011-10-12 16:31:21 -070045 need_passphrase_(false),
mukesh agrawal6e277772011-09-29 15:04:23 -070046 security_(security),
Chris Masone092df3e2011-08-22 09:41:39 -070047 mode_(mode),
Paul Stewartced6a0b2011-11-08 15:32:04 -080048 hidden_ssid_(hidden_ssid),
mukesh agrawalb54601c2011-06-07 17:39:22 -070049 task_factory_(this),
50 wifi_(device),
Chris Masone092df3e2011-08-22 09:41:39 -070051 ssid_(ssid) {
mukesh agrawalde29fa82011-09-16 16:16:36 -070052 PropertyStore *store = this->mutable_store();
Paul Stewartac4ac002011-08-26 12:04:26 -070053 store->RegisterConstString(flimflam::kModeProperty, &mode_);
Thieu Lef7709452011-11-15 01:13:19 +000054 HelpRegisterDerivedString(store,
55 flimflam::kPassphraseProperty,
56 NULL,
57 &WiFiService::SetPassphrase);
Paul Stewartac4ac002011-08-26 12:04:26 -070058 store->RegisterBool(flimflam::kPassphraseRequiredProperty, &need_passphrase_);
59 store->RegisterConstString(flimflam::kSecurityProperty, &security_);
60 store->RegisterConstUint8(flimflam::kSignalStrengthProperty, &strength_);
Chris Masone3bd3c8c2011-06-13 08:20:26 -070061
Paul Stewartac4ac002011-08-26 12:04:26 -070062 store->RegisterConstString(flimflam::kWifiAuthMode, &auth_mode_);
63 store->RegisterConstBool(flimflam::kWifiHiddenSsid, &hidden_ssid_);
64 store->RegisterConstUint16(flimflam::kWifiFrequency, &frequency_);
65 store->RegisterConstUint16(flimflam::kWifiPhyMode, &physical_mode_);
mukesh agrawal32399322011-09-01 10:53:43 -070066
mukesh agrawald835b202011-10-07 15:26:47 -070067 hex_ssid_ = base::HexEncode(ssid_.data(), ssid_.size());
68 string ssid_string(
69 reinterpret_cast<const char *>(ssid_.data()), ssid_.size());
70 if (SanitizeSSID(&ssid_string)) {
71 // WifiHexSsid property should only be present if Name property
72 // has been munged.
73 store->RegisterConstString(flimflam::kWifiHexSsid, &hex_ssid_);
74 }
75 set_friendly_name(ssid_string);
Chris Masone9d779932011-08-25 16:33:41 -070076
mukesh agrawal6e277772011-09-29 15:04:23 -070077 // TODO(quiche): determine if it is okay to set EAP.KeyManagement for
78 // a service that is not 802.1x.
79 if (security_ == flimflam::kSecurity8021x) {
80 NOTIMPLEMENTED();
81 // XXX needs_passpharse_ = false ?
82 } else if (security_ == flimflam::kSecurityPsk) {
83 SetEAPKeyManagement("WPA-PSK");
84 need_passphrase_ = true;
85 } else if (security_ == flimflam::kSecurityRsn) {
86 SetEAPKeyManagement("WPA-PSK");
87 need_passphrase_ = true;
88 } else if (security_ == flimflam::kSecurityWpa) {
89 SetEAPKeyManagement("WPA-PSK");
90 need_passphrase_ = true;
91 } else if (security_ == flimflam::kSecurityWep) {
92 SetEAPKeyManagement("NONE");
93 need_passphrase_ = true;
94 } else if (security_ == flimflam::kSecurityNone) {
95 SetEAPKeyManagement("NONE");
96 need_passphrase_ = false;
97 } else {
98 LOG(ERROR) << "unsupported security method " << security_;
99 }
100
Paul Stewartd08f4432011-11-04 07:48:20 -0700101 // Until we know better (at Profile load time), use the generic name.
102 storage_identifier_ = GetGenericStorageIdentifier();
mukesh agrawalb54601c2011-06-07 17:39:22 -0700103}
104
105WiFiService::~WiFiService() {
106 LOG(INFO) << __func__;
107}
108
mukesh agrawal1830fa12011-09-26 14:31:40 -0700109void WiFiService::Connect(Error */*error*/) {
mukesh agrawalb54601c2011-06-07 17:39:22 -0700110 LOG(INFO) << __func__;
111
112 // NB(quiche) defer handling, since dbus-c++ does not permit us to
113 // send an outbound request while processing an inbound one.
Paul Stewartac4ac002011-08-26 12:04:26 -0700114 dispatcher()->PostTask(
mukesh agrawaldc42bb32011-07-28 10:40:26 -0700115 task_factory_.NewRunnableMethod(&WiFiService::ConnectTask));
mukesh agrawalb54601c2011-06-07 17:39:22 -0700116}
117
Chris Masone3bd3c8c2011-06-13 08:20:26 -0700118void WiFiService::Disconnect() {
119 // TODO(quiche) RemoveNetwork from supplicant
Chris Masone3bd3c8c2011-06-13 08:20:26 -0700120}
121
Paul Stewart22aa71b2011-09-16 12:15:11 -0700122bool WiFiService::TechnologyIs(const Technology::Identifier type) const {
123 return wifi_->TechnologyIs(type);
124}
125
Chris Masone6515aab2011-10-12 16:19:09 -0700126string WiFiService::GetStorageIdentifier() const {
Paul Stewartd08f4432011-11-04 07:48:20 -0700127 return storage_identifier_;
Chris Masone34af2182011-08-22 11:59:36 -0700128}
Chris Masone092df3e2011-08-22 09:41:39 -0700129const string &WiFiService::mode() const {
mukesh agrawal445e72c2011-06-22 11:13:50 -0700130 return mode_;
131}
132
Chris Masone092df3e2011-08-22 09:41:39 -0700133const string &WiFiService::key_management() const {
Paul Stewartac4ac002011-08-26 12:04:26 -0700134 return GetEAPKeyManagement();
mukesh agrawal445e72c2011-06-22 11:13:50 -0700135}
136
Paul Stewarta41e38d2011-11-11 07:47:29 -0800137const vector<uint8_t> &WiFiService::ssid() const {
mukesh agrawal445e72c2011-06-22 11:13:50 -0700138 return ssid_;
139}
140
mukesh agrawal1a056262011-10-05 14:36:54 -0700141void WiFiService::SetPassphrase(const string &passphrase, Error *error) {
142 if (security_ == flimflam::kSecurityWep) {
Thieu Lef4cbda92011-11-10 23:41:24 +0000143 ValidateWEPPassphrase(passphrase, error);
mukesh agrawal1a056262011-10-05 14:36:54 -0700144 } else if (security_ == flimflam::kSecurityPsk ||
145 security_ == flimflam::kSecurityWpa ||
146 security_ == flimflam::kSecurityRsn) {
Thieu Lef4cbda92011-11-10 23:41:24 +0000147 ValidateWPAPassphrase(passphrase, error);
148 } else {
149 error->Populate(Error::kNotSupported);
mukesh agrawal1a056262011-10-05 14:36:54 -0700150 }
Thieu Lef4cbda92011-11-10 23:41:24 +0000151
152 if (error->IsSuccess())
153 passphrase_ = passphrase;
mukesh agrawal1a056262011-10-05 14:36:54 -0700154}
155
Paul Stewartd08f4432011-11-04 07:48:20 -0700156bool WiFiService::IsLoadableFrom(StoreInterface *storage) const {
157 return storage->ContainsGroup(GetGenericStorageIdentifier()) ||
158 storage->ContainsGroup(GetSpecificStorageIdentifier());
159}
160
Paul Stewarta41e38d2011-11-11 07:47:29 -0800161bool WiFiService::IsVisible() const {
162 // TODO(quiche): Write a function that returns whether (or which)
163 // endpoints are associated with this service. crosbug.com/22948
164 const bool is_visible_in_scan = true;
165
166 // WiFi Services should be displayed only if they are in range (have
167 // endpoints that have shown up in a scan) or if the service is actively
168 // being connected.
169 return is_visible_in_scan || IsConnected() || IsConnecting();
170}
171
Paul Stewartd08f4432011-11-04 07:48:20 -0700172bool WiFiService::Load(StoreInterface *storage) {
173 // First find out which storage identifier is available in priority order
174 // of specific, generic.
175 string id = GetSpecificStorageIdentifier();
176 if (!storage->ContainsGroup(id)) {
177 id = GetGenericStorageIdentifier();
178 if (!storage->ContainsGroup(id)) {
179 LOG(WARNING) << "Service is not available in the persistent store: "
180 << id;
181 return false;
182 }
183 }
184
185 // Set our storage identifier to match the storage name in the Profile.
186 storage_identifier_ = id;
187
188 // Load properties common to all Services.
189 if (!Service::Load(storage)) {
190 return false;
191 }
192
193 // Load properties specific to WiFi services.
194 storage->GetBool(id, kStorageHiddenSSID, &hidden_ssid_);
195 return true;
196}
197
198bool WiFiService::Save(StoreInterface *storage) {
199 // Save properties common to all Services.
200 if (!Service::Save(storage)) {
201 return false;
202 }
203
204 // Save properties specific to WiFi services.
205 const string id = GetStorageIdentifier();
206 storage->SetBool(id, kStorageHiddenSSID, &hidden_ssid_);
207 return true;
208}
209
Paul Stewart6ab23a92011-11-09 17:17:47 -0800210bool WiFiService::IsSecurityMatch(const string &security) const {
211 return GetSecurityClass(security) == GetSecurityClass(security_);
212}
213
mukesh agrawal32399322011-09-01 10:53:43 -0700214// private methods
Thieu Lef7709452011-11-15 01:13:19 +0000215void WiFiService::HelpRegisterDerivedString(
216 PropertyStore *store,
217 const std::string &name,
218 std::string(WiFiService::*get)(Error *),
219 void(WiFiService::*set)(const std::string&, Error *)) {
220 store->RegisterDerivedString(
221 name,
222 StringAccessor(new CustomAccessor<WiFiService, string>(this, get, set)));
223}
224
mukesh agrawaldc42bb32011-07-28 10:40:26 -0700225void WiFiService::ConnectTask() {
mukesh agrawal6e277772011-09-29 15:04:23 -0700226 std::map<string, DBus::Variant> params;
227 DBus::MessageIter writer;
228
229 params[wpa_supplicant::kNetworkPropertyMode].writer().
230 append_uint32(WiFiEndpoint::ModeStringToUint(mode_));
231
232 if (security_ == flimflam::kSecurity8021x) {
233 NOTIMPLEMENTED();
234 } else if (security_ == flimflam::kSecurityPsk) {
Gaurav Shahf8721ee2011-11-07 09:12:46 -0800235 const string psk_proto = StringPrintf("%s %s",
236 wpa_supplicant::kSecurityModeWPA,
237 wpa_supplicant::kSecurityModeRSN);
238 params[wpa_supplicant::kPropertySecurityProtocol].writer().
239 append_string(psk_proto.c_str());
240 params[wpa_supplicant::kPropertyPreSharedKey].writer().
241 append_string(passphrase_.c_str());
mukesh agrawal6e277772011-09-29 15:04:23 -0700242 } else if (security_ == flimflam::kSecurityRsn) {
mukesh agrawalf2fd7452011-10-03 16:38:47 -0700243 params[wpa_supplicant::kPropertySecurityProtocol].writer().
244 append_string(wpa_supplicant::kSecurityModeRSN);
245 params[wpa_supplicant::kPropertyPreSharedKey].writer().
246 append_string(passphrase_.c_str());
mukesh agrawal6e277772011-09-29 15:04:23 -0700247 } else if (security_ == flimflam::kSecurityWpa) {
248 params[wpa_supplicant::kPropertySecurityProtocol].writer().
249 append_string(wpa_supplicant::kSecurityModeWPA);
250 params[wpa_supplicant::kPropertyPreSharedKey].writer().
251 append_string(passphrase_.c_str());
252 } else if (security_ == flimflam::kSecurityWep) {
Thieu Lef4cbda92011-11-10 23:41:24 +0000253 params[wpa_supplicant::kPropertyAuthAlg].writer().
254 append_string(wpa_supplicant::kSecurityAuthAlg);
255 Error error;
256 int key_index;
257 std::vector<uint8> password_bytes;
258 ParseWEPPassphrase(passphrase_, &key_index, &password_bytes, &error);
259 writer = params[wpa_supplicant::kPropertyWEPKey +
260 base::IntToString(key_index)].writer();
261 writer << password_bytes;
262 params[wpa_supplicant::kPropertyWEPTxKeyIndex].writer().
263 append_uint32(key_index);
mukesh agrawal6e277772011-09-29 15:04:23 -0700264 } else if (security_ == flimflam::kSecurityNone) {
Gaurav Shahf8721ee2011-11-07 09:12:46 -0800265 // Nothing special to do here.
mukesh agrawal6e277772011-09-29 15:04:23 -0700266 } else {
Gaurav Shahf8721ee2011-11-07 09:12:46 -0800267 LOG(ERROR) << "Can't connect. Unsupported security method " << security_;
mukesh agrawal6e277772011-09-29 15:04:23 -0700268 }
269
270 params[wpa_supplicant::kPropertyKeyManagement].writer().
271 append_string(key_management().c_str());
Gaurav Shah7ad8e532011-11-11 17:14:49 -0800272
273 // See note in dbus_adaptor.cc on why we need to use a local.
mukesh agrawal6e277772011-09-29 15:04:23 -0700274 writer = params[wpa_supplicant::kNetworkPropertySSID].writer();
275 writer << ssid_;
276
277 wifi_->ConnectTo(this, params);
mukesh agrawalb54601c2011-06-07 17:39:22 -0700278}
279
Gaurav Shah1b7a6162011-11-09 11:41:01 -0800280string WiFiService::GetDeviceRpcId(Error */*error*/) {
Chris Masone95207da2011-06-29 16:50:49 -0700281 return wifi_->GetRpcIdentifier();
282}
283
mukesh agrawal1a056262011-10-05 14:36:54 -0700284// static
Thieu Lef4cbda92011-11-10 23:41:24 +0000285void WiFiService::ValidateWEPPassphrase(const std::string &passphrase,
286 Error *error) {
287 ParseWEPPassphrase(passphrase, NULL, NULL, error);
mukesh agrawal1a056262011-10-05 14:36:54 -0700288}
289
290// static
Thieu Lef4cbda92011-11-10 23:41:24 +0000291void WiFiService::ValidateWPAPassphrase(const std::string &passphrase,
292 Error *error) {
mukesh agrawal1a056262011-10-05 14:36:54 -0700293 unsigned int length = passphrase.length();
294 vector<uint8> passphrase_bytes;
295
296 if (base::HexStringToBytes(passphrase, &passphrase_bytes)) {
297 if (length != IEEE_80211::kWPAHexLen &&
298 (length < IEEE_80211::kWPAAsciiMinLen ||
299 length > IEEE_80211::kWPAAsciiMaxLen)) {
300 error->Populate(Error::kInvalidPassphrase);
301 }
302 } else {
303 if (length < IEEE_80211::kWPAAsciiMinLen ||
304 length > IEEE_80211::kWPAAsciiMaxLen) {
305 error->Populate(Error::kInvalidPassphrase);
306 }
307 }
Thieu Lef4cbda92011-11-10 23:41:24 +0000308}
mukesh agrawal1a056262011-10-05 14:36:54 -0700309
Thieu Lef4cbda92011-11-10 23:41:24 +0000310// static
311void WiFiService::ParseWEPPassphrase(const string &passphrase,
312 int *key_index,
313 std::vector<uint8> *password_bytes,
314 Error *error) {
315 unsigned int length = passphrase.length();
316 int key_index_local;
317 std::string password_text;
318 bool is_hex = false;
319
320 switch (length) {
321 case IEEE_80211::kWEP40AsciiLen:
322 case IEEE_80211::kWEP104AsciiLen:
323 key_index_local = 0;
324 password_text = passphrase;
325 break;
326 case IEEE_80211::kWEP40AsciiLen + 2:
327 case IEEE_80211::kWEP104AsciiLen + 2:
328 if (CheckWEPKeyIndex(passphrase, error)) {
329 base::StringToInt(passphrase.substr(0,1), &key_index_local);
330 password_text = passphrase.substr(2);
331 }
332 break;
333 case IEEE_80211::kWEP40HexLen:
334 case IEEE_80211::kWEP104HexLen:
335 if (CheckWEPIsHex(passphrase, error)) {
336 key_index_local = 0;
337 password_text = passphrase;
338 is_hex = true;
339 }
340 break;
341 case IEEE_80211::kWEP40HexLen + 2:
342 case IEEE_80211::kWEP104HexLen + 2:
343 if(CheckWEPKeyIndex(passphrase, error) &&
344 CheckWEPIsHex(passphrase.substr(2), error)) {
345 base::StringToInt(passphrase.substr(0,1), &key_index_local);
346 password_text = passphrase.substr(2);
347 is_hex = true;
348 } else if (CheckWEPPrefix(passphrase, error) &&
349 CheckWEPIsHex(passphrase.substr(2), error)) {
350 key_index_local = 0;
351 password_text = passphrase.substr(2);
352 is_hex = true;
353 }
354 break;
355 case IEEE_80211::kWEP40HexLen + 4:
356 case IEEE_80211::kWEP104HexLen + 4:
357 if (CheckWEPKeyIndex(passphrase, error) &&
358 CheckWEPPrefix(passphrase.substr(2), error) &&
359 CheckWEPIsHex(passphrase.substr(4), error)) {
360 base::StringToInt(passphrase.substr(0,1), &key_index_local);
361 password_text = passphrase.substr(4);
362 is_hex = true;
363 }
364 break;
365 default:
366 error->Populate(Error::kInvalidPassphrase);
367 break;
368 }
369
mukesh agrawal1a056262011-10-05 14:36:54 -0700370 if (error->IsSuccess()) {
Thieu Lef4cbda92011-11-10 23:41:24 +0000371 if (key_index)
372 *key_index = key_index_local;
373 if (password_bytes) {
374 if (is_hex)
375 base::HexStringToBytes(password_text, password_bytes);
376 else
377 password_bytes->insert(password_bytes->end(),
378 password_text.begin(),
379 password_text.end());
380 }
mukesh agrawal1a056262011-10-05 14:36:54 -0700381 }
382}
383
384// static
385bool WiFiService::CheckWEPIsHex(const string &passphrase, Error *error) {
386 vector<uint8> passphrase_bytes;
387 if (base::HexStringToBytes(passphrase, &passphrase_bytes)) {
388 return true;
389 } else {
390 error->Populate(Error::kInvalidPassphrase);
391 return false;
392 }
393}
394
395// static
396bool WiFiService::CheckWEPKeyIndex(const string &passphrase, Error *error) {
397 if (StartsWithASCII(passphrase, "0:", false) ||
398 StartsWithASCII(passphrase, "1:", false) ||
399 StartsWithASCII(passphrase, "2:", false) ||
400 StartsWithASCII(passphrase, "3:", false)) {
401 return true;
402 } else {
403 error->Populate(Error::kInvalidPassphrase);
404 return false;
405 }
406}
407
408// static
409bool WiFiService::CheckWEPPrefix(const string &passphrase, Error *error) {
410 if (StartsWithASCII(passphrase, "0x", false)) {
411 return true;
412 } else {
413 error->Populate(Error::kInvalidPassphrase);
414 return false;
415 }
416}
417
Paul Stewart6ab23a92011-11-09 17:17:47 -0800418// static
mukesh agrawald835b202011-10-07 15:26:47 -0700419bool WiFiService::SanitizeSSID(string *ssid) {
420 CHECK(ssid);
421
422 size_t ssid_len = ssid->length();
423 size_t i;
424 bool changed = false;
425
426 for (i=0; i < ssid_len; ++i) {
427 if (!g_ascii_isprint((*ssid)[i])) {
428 (*ssid)[i] = '?';
429 changed = true;
430 }
431 }
432
433 return changed;
434}
435
Paul Stewart6ab23a92011-11-09 17:17:47 -0800436// static
437string WiFiService::GetSecurityClass(const string &security) {
438 if (security == flimflam::kSecurityRsn ||
439 security == flimflam::kSecurityWpa) {
440 return flimflam::kSecurityPsk;
Paul Stewartd08f4432011-11-04 07:48:20 -0700441 } else {
Paul Stewart6ab23a92011-11-09 17:17:47 -0800442 return security;
Paul Stewartd08f4432011-11-04 07:48:20 -0700443 }
444}
445
Paul Stewarta41e38d2011-11-11 07:47:29 -0800446// static
447bool WiFiService::ParseStorageIdentifier(const string &storage_name,
448 string *address,
449 string *mode,
450 string *security) {
451 vector<string> wifi_parts;
452 base::SplitString(storage_name, '_', &wifi_parts);
453 if (wifi_parts.size() != 5 || wifi_parts[0] != flimflam::kTypeWifi) {
454 return false;
455 }
456 *address = wifi_parts[1];
457 *mode = wifi_parts[3];
458 *security = wifi_parts[4];
459 return true;
460}
461
Paul Stewart6ab23a92011-11-09 17:17:47 -0800462string WiFiService::GetGenericStorageIdentifier() const {
463 return GetStorageIdentifierForSecurity(GetSecurityClass(security_));
464}
465
Paul Stewartd08f4432011-11-04 07:48:20 -0700466string WiFiService::GetSpecificStorageIdentifier() const {
467 return GetStorageIdentifierForSecurity(security_);
468}
469
470string WiFiService::GetStorageIdentifierForSecurity(
471 const string &security) const {
472 return StringToLowerASCII(base::StringPrintf("%s_%s_%s_%s_%s",
473 flimflam::kTypeWifi,
474 wifi_->address().c_str(),
475 hex_ssid_.c_str(),
476 mode_.c_str(),
477 security.c_str()));
478}
479
mukesh agrawalb54601c2011-06-07 17:39:22 -0700480} // namespace shill