blob: 3332e92b746dafbab064d97fbabdf6b35224b7e1 [file] [log] [blame]
Jonathan Hart06e89082016-08-08 17:21:01 -07001/*
2 * Copyright 2016-present Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.incubator.net.neighbour;
18
19import com.google.common.annotations.Beta;
20import org.onlab.packet.MacAddress;
21import org.onosproject.incubator.net.intf.Interface;
22import org.onosproject.net.ConnectPoint;
23
24/**
25 * Performs actions on a neighbour message contexts.
26 */
27@Beta
28public interface NeighbourMessageActions {
29
30 /**
31 * Replies to an incoming request with the given MAC address.
32 *
33 * @param context incoming message context
34 * @param targetMac target MAC address.
35 */
36 void reply(NeighbourMessageContext context, MacAddress targetMac);
37
38 /**
39 * Proxies the incoming message to the given connect point.
40 *
41 * @param context incoming message context
42 * @param outPort port to send the message out
43 */
44 void proxy(NeighbourMessageContext context, ConnectPoint outPort);
45
46 /**
47 * Proxies the incoming message to a given interface.
48 *
49 * @param context incoming message context
50 * @param outIntf interface to send the message out. The message will be
51 * modified to fit the parameters of the outgoing interface.
52 */
53 void proxy(NeighbourMessageContext context, Interface outIntf);
54
55 /**
56 * Floods the incoming message to all edge ports except the in port.
57 *
58 * @param context incoming message context
59 */
60 void flood(NeighbourMessageContext context);
61
62 /**
63 * Drops the incoming message.
64 *
65 * @param context incoming message context
66 */
67 void drop(NeighbourMessageContext context);
68}