blob: 88be67da99127557787d575debab7fb048dc8a24 [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"
22#include "shill/shill_event.h"
23
Paul Stewartf1ce5d22011-05-19 13:10:20 -070024using std::string;
25
26namespace shill {
Darin Petkovafa6fc42011-06-21 16:21:08 -070027
Paul Stewartf1ce5d22011-05-19 13:10:20 -070028EthernetService::EthernetService(ControlInterface *control_interface,
29 EventDispatcher *dispatcher,
Chris Masone2b105542011-06-22 10:58:09 -070030 const EthernetRefPtr &device,
Darin Petkovafa6fc42011-06-21 16:21:08 -070031 const string &name)
Chris Masone2b105542011-06-22 10:58:09 -070032 : Service(control_interface, dispatcher, name),
Chris Masone3bd3c8c2011-06-13 08:20:26 -070033 ethernet_(device),
34 type_(flimflam::kTypeEthernet) {
Darin Petkovafa6fc42011-06-21 16:21:08 -070035 set_auto_connect(true);
Chris Masone3bd3c8c2011-06-13 08:20:26 -070036
37 RegisterConstString(flimflam::kTypeProperty, &type_);
Paul Stewartf1ce5d22011-05-19 13:10:20 -070038}
39
40EthernetService::~EthernetService() { }
41
42void EthernetService::Connect() { }
43
44void EthernetService::Disconnect() { }
45
Chris Masone95207da2011-06-29 16:50:49 -070046std::string EthernetService::GetDeviceRpcId() {
47 return ethernet_->GetRpcIdentifier();
48}
49
Paul Stewartf1ce5d22011-05-19 13:10:20 -070050} // namespace shill