blob: 32629eb81a99f5b9b96595157f04e8b07b98d77b [file] [log] [blame]
Carmelo Cascone17fc9e42016-05-31 11:29:21 -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.bmv2.api.service;
18
Carmelo Cascone9e39e312016-06-16 14:47:09 -070019import com.google.common.annotations.Beta;
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070020import org.onlab.util.ImmutableByteSequence;
21import org.onosproject.bmv2.api.runtime.Bmv2Device;
22
23/**
24 * A listener of BMv2 packet events.
25 */
Carmelo Cascone9e39e312016-06-16 14:47:09 -070026@Beta
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070027public interface Bmv2PacketListener {
28
29 /**
30 * Handles a packet-in message.
31 *
32 * @param device the BMv2 device that originated the message
33 * @param inputPort the device port where the packet was received
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070034 * @param packet the packet raw data
35 */
Carmelo Cascone25f18882016-06-14 19:16:50 -070036 void handlePacketIn(Bmv2Device device, int inputPort, ImmutableByteSequence packet);
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070037}