shill: LinkMonitor: Schedule periodic ARP requests

The LinkMonitor performs periodic unicast and broadcast ARP requests
for a connection's gateway IP address.  It creates a weighted
average of response time, and can call a failure callback function
whenever the sum of consecutive unicast and broadcast response
failures exceed a threshold.

BUG=chromium-os:32600
TEST=Unit tests

Change-Id: Id5a66ad9ca80c51f227ef4811eb8c3885a70c1b8
Reviewed-on: https://gerrit.chromium.org/gerrit/28610
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/mock_link_monitor.h b/mock_link_monitor.h
new file mode 100644
index 0000000..083b5d2
--- /dev/null
+++ b/mock_link_monitor.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 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.
+
+#ifndef SHILL_MOCK_LINK_MONITOR_H_
+#define SHILL_MOCK_LINK_MONITOR_H_
+
+#include "shill/link_monitor.h"
+
+#include <gmock/gmock.h>
+
+namespace shill {
+
+class MockLinkMonitor : public LinkMonitor {
+ public:
+  MockLinkMonitor();
+  virtual ~MockLinkMonitor();
+
+  MOCK_METHOD0(Start, bool());
+  MOCK_METHOD0(Stop, void());
+  MOCK_METHOD0(GetResponseTimeMilliseconds, unsigned int());
+
+  DISALLOW_COPY_AND_ASSIGN(MockLinkMonitor);
+};
+
+}  // namespace shill
+
+#endif  // SHILL_MOCK_LINK_MONITOR_H_