blob: c217065098a617034ae5772b94cbf8a851935bd6 [file] [log] [blame]
Carmelo Casconef7aa3f92017-07-06 23:56:50 -04001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Carmelo Casconef7aa3f92017-07-06 23:56:50 -04003 *
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.p4runtime.api;
18
19import com.google.common.annotations.Beta;
Andrea Campanella288b2732017-07-28 14:16:16 +020020import org.onosproject.net.pi.runtime.PiPacketOperation;
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040021
22/**
23 * Information about a packet-in received from a P4Runtime device.
24 */
25@Beta
26public interface P4RuntimePacketIn extends P4RuntimeEventSubject {
27
28 /**
Andrea Campanella288b2732017-07-28 14:16:16 +020029 * Returns the packet operation corresponding to this packet-in event.
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040030 *
Andrea Campanella288b2732017-07-28 14:16:16 +020031 * @return pi packet operation
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040032 */
Andrea Campanella288b2732017-07-28 14:16:16 +020033 PiPacketOperation packetOperation();
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040034
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040035}