blob: c7823d80d575539592c97222f57f601d75bab1b1 [file] [log] [blame]
Paul Stewartf1ce5d22011-05-19 13:10:20 -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
Darin Petkovafa6fc42011-06-21 16:21:08 -07005#include "shill/ethernet_service.h"
6
Paul Stewartf1ce5d22011-05-19 13:10:20 -07007#include <time.h>
8#include <stdio.h>
9#include <netinet/ether.h>
10#include <linux/if.h>
11
12#include <string>
13
14#include <base/logging.h>
Chris Masone3bd3c8c2011-06-13 08:20:26 -070015#include <chromeos/dbus/service_constants.h>
Paul Stewartf1ce5d22011-05-19 13:10:20 -070016
17#include "shill/control_interface.h"
18#include "shill/device.h"
19#include "shill/device_info.h"
Darin Petkovafa6fc42011-06-21 16:21:08 -070020#include "shill/ethernet.h"
Paul Stewartf1ce5d22011-05-19 13:10:20 -070021#include "shill/manager.h"
Chris Masone7aa5f902011-07-11 11:13:35 -070022#include "shill/profile.h"
Paul Stewartf1ce5d22011-05-19 13:10:20 -070023#include "shill/shill_event.h"
24
Paul Stewartf1ce5d22011-05-19 13:10:20 -070025using std::string;
26
27namespace shill {
Darin Petkovafa6fc42011-06-21 16:21:08 -070028
Paul Stewartf1ce5d22011-05-19 13:10:20 -070029EthernetService::EthernetService(ControlInterface *control_interface,
30 EventDispatcher *dispatcher,
Chris Masone6791a432011-07-12 13:23:19 -070031 Manager *manager,
mukesh agrawal51a7e932011-07-27 16:18:26 -070032 const EthernetRefPtr &device)
33 : Service(control_interface, dispatcher, manager),
Chris Masone3bd3c8c2011-06-13 08:20:26 -070034 ethernet_(device),
35 type_(flimflam::kTypeEthernet) {
Darin Petkovafa6fc42011-06-21 16:21:08 -070036 set_auto_connect(true);
Chris Masone3bd3c8c2011-06-13 08:20:26 -070037
Chris Masone27c4aa52011-07-02 13:10:14 -070038 store_.RegisterConstString(flimflam::kTypeProperty, &type_);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070039}
40
41EthernetService::~EthernetService() { }
42
43void EthernetService::Connect() { }
44
45void EthernetService::Disconnect() { }
46
Chris Masone95207da2011-06-29 16:50:49 -070047std::string EthernetService::GetDeviceRpcId() {
48 return ethernet_->GetRpcIdentifier();
49}
50
Paul Stewartf1ce5d22011-05-19 13:10:20 -070051} // namespace shill