3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
11 * @file IDataPacketService.java
13 * @brief SAL exported Data Packet services
15 * Data Packet Services SAL provides to the components
17 package org.opendaylight.controller.sal.packet;
20 * Data Packet Services SAL provides to the components
22 public interface IDataPacketService {
24 * Transmit a data Packet. Transmission will ONLY happen if the
25 * RawPacket has the OutgoingNodeConnector set else of course
26 * transmission cannot happen.
28 * @param outPkt Packet to be transmitted out
30 void transmitDataPacket(RawPacket outPkt);
33 * Decode a Data Packet received as a raw stream
35 * @param pkt Raw Packet to be decoded
37 * @return The formatted Data Packet
39 Packet decodeDataPacket(RawPacket pkt);
42 * Encode a Formatted Data Packet in a raw bytestream
44 * @param pkt Formatted Data Packet to be encoded
46 * @return a RawPacket representation, good for transmission purpose
48 RawPacket encodeDataPacket(Packet pkt);