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
23 public interface IDataPacketService {
25 * Transmit a data Packet. Transmission will ONLY happen if the
26 * RawPacket has the OutgoingNodeConnector set else of course
27 * transmission cannot happen.
29 * @param outPkt Packet to be transmitted out
31 void transmitDataPacket(RawPacket outPkt);
34 * Decode a Data Packet received as a raw stream
36 * @param pkt Raw Packet to be decoded
38 * @return The formatted Data Packet
40 Packet decodeDataPacket(RawPacket pkt);
43 * Encode a Formatted Data Packet in a raw bytestream
45 * @param pkt Formatted Data Packet to be encoded
47 * @return a RawPacket representation, good for transmission purpose
49 RawPacket encodeDataPacket(Packet pkt);