Abstraction to help applications write logic to handle ARP + NDP packets.

The idea is to allow applications to contribute NeighbourMessageHandlers to
handle ARP/NDP packets coming from a particular ConnectPoint, Interface or with
a particular traffic selector. Applications can contribute different handlers
for different ports, because they know how those ports will be used. Also,
multiple applications can contribute handlers for different ports/interfaces
without having to have one ARP handler for the entire network. The framework
provides actions that the handler can choose to take - flood, proxy, reply, drop.
The handler is free to implement some other action if none of these fit what it
needs to do. The framework also handles many of the common tasks for ARP handlers,
like parsing packets, abstracting the differences between ARP and NDP, implementing
actions like replying to a request. This allows handlers to be very simple and
easy to understand and implement.

Change-Id: I313c723e9ebc3d0816eb79870ee0536780e7a640
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/neighbour/NeighbourMessageHandler.java b/incubator/api/src/main/java/org/onosproject/incubator/net/neighbour/NeighbourMessageHandler.java
new file mode 100644
index 0000000..e638642
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/neighbour/NeighbourMessageHandler.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.incubator.net.neighbour;
+
+import com.google.common.annotations.Beta;
+import org.onosproject.net.host.HostService;
+
+/**
+ * Handler for an incoming neighbour message.
+ *
+ * <p>An application may implement this interface in order to provide their own
+ * logic for handling particular neighbour messages.</p>
+ */
+@Beta
+public interface NeighbourMessageHandler {
+
+    /**
+     * Handles a neighbour message.
+     *
+     * @param context neighbour message context
+     * @param hostService host service
+     */
+    void handleMessage(NeighbourMessageContext context, HostService hostService);
+}