blob: 05a507406b729162136569f9e943856d12d20fa7 [file] [log] [blame]
tom613d8142014-09-11 15:09:37 -07001package org.onlab.onos.net.packet;
2
3import org.onlab.onos.net.DeviceId;
tom8bb16062014-09-12 14:47:46 -07004import org.onlab.onos.net.flow.TrafficTreatment;
tom613d8142014-09-11 15:09:37 -07005
6import java.nio.ByteBuffer;
tom613d8142014-09-11 15:09:37 -07007
8/**
9 * Represents an outbound data packet that is to be emitted to network via
10 * an infrastructure device.
11 */
12public interface OutboundPacket {
13
14 /**
15 * Returns the identity of a device through which this packet should be
16 * sent.
17 *
18 * @return device identity
19 */
20 DeviceId sendThrough();
21
22 /**
tom8bb16062014-09-12 14:47:46 -070023 * Returns how the outbound packet should be treated.
tom613d8142014-09-11 15:09:37 -070024 *
25 * @return output treatment
26 */
tom8bb16062014-09-12 14:47:46 -070027 TrafficTreatment treatment();
tom613d8142014-09-11 15:09:37 -070028
29 /**
tom8bb16062014-09-12 14:47:46 -070030 * Returns immutable view of the raw data to be sent.
tom613d8142014-09-11 15:09:37 -070031 *
32 * @return data to emit
33 */
34 ByteBuffer data();
35
36}