Track link status in Ethernet and register service
Add link status tracking (and setting IFF_UP) to ethernet devices.
When the interface is running, register a service with the manager.
BUG=chromium-os:12933
TEST=Manual -- unit tests and plug/unplug ethernet USB and RJ45 sides.
Change-Id: I1233ce5a63efddb7606183dc4daad4d2624d864a
Reviewed-on: http://gerrit.chromium.org/gerrit/1196
Tested-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
diff --git a/ethernet_service.cc b/ethernet_service.cc
new file mode 100644
index 0000000..5066369
--- /dev/null
+++ b/ethernet_service.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <time.h>
+#include <stdio.h>
+#include <netinet/ether.h>
+#include <linux/if.h>
+
+#include <string>
+
+#include <base/logging.h>
+
+#include "shill/control_interface.h"
+#include "shill/device.h"
+#include "shill/device_info.h"
+#include "shill/manager.h"
+#include "shill/shill_event.h"
+
+#include "shill/ethernet.h"
+#include "shill/ethernet_service.h"
+
+using std::string;
+
+namespace shill {
+EthernetService::EthernetService(ControlInterface *control_interface,
+ EventDispatcher *dispatcher,
+ Ethernet *device)
+ : Service(control_interface, dispatcher, device),
+ ethernet_(device) {
+}
+
+EthernetService::~EthernetService() { }
+
+void EthernetService::Connect() { }
+
+void EthernetService::Disconnect() { }
+
+} // namespace shill