blob: 3319759c7769292b09bcecb048933a80b8660712 [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;
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040020import org.onosproject.net.DeviceId;
Andrea Campanella288b2732017-07-28 14:16:16 +020021import org.onosproject.net.pi.runtime.PiPacketOperation;
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040022
23/**
24 * Information about a packet-in received from a P4Runtime device.
25 */
26@Beta
27public interface P4RuntimePacketIn extends P4RuntimeEventSubject {
28
29 /**
30 * Returns the identifier of the device that generated this packet-in.
31 *
32 * @return device identifier
33 */
34 DeviceId deviceId();
35
36 /**
Andrea Campanella288b2732017-07-28 14:16:16 +020037 * Returns the packet operation corresponding to this packet-in event.
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040038 *
Andrea Campanella288b2732017-07-28 14:16:16 +020039 * @return pi packet operation
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040040 */
Andrea Campanella288b2732017-07-28 14:16:16 +020041 PiPacketOperation packetOperation();
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040042
Carmelo Casconef7aa3f92017-07-06 23:56:50 -040043}