Andreas Wundsam | 40e14f7 | 2013-05-06 14:49:08 -0700 | [diff] [blame^] | 1 | package org.openflow.util; |
| 2 | |
| 3 | import java.util.List; |
| 4 | |
| 5 | import org.jboss.netty.buffer.ChannelBuffer; |
| 6 | import org.openflow.protocol.actions.OFAction; |
| 7 | import org.openflow.protocol.instructions.OFInstruction; |
| 8 | import org.openflow.protocol.match.Match; |
| 9 | import org.openflow.types.OFBsnInterface; |
| 10 | import org.openflow.types.OFBucket; |
| 11 | import org.openflow.types.OFFlowModCmd; |
| 12 | import org.openflow.types.OFHelloElement; |
| 13 | import org.openflow.types.OFMeterBand; |
| 14 | import org.openflow.types.OFPacketQueue; |
| 15 | import org.openflow.types.OFPhysicalPort; |
| 16 | |
| 17 | /** |
| 18 | * Collection of helper functions for reading and writing into ChannelBuffers |
| 19 | * |
| 20 | * @author capveg |
| 21 | */ |
| 22 | |
| 23 | public class ChannelUtils { |
| 24 | |
| 25 | static public byte[] readBytes(final ChannelBuffer bb, final int length) { |
| 26 | byte byteArray[] = new byte[length]; |
| 27 | bb.readBytes(byteArray); |
| 28 | return byteArray; |
| 29 | } |
| 30 | |
| 31 | static public void writeBytes(final ChannelBuffer bb, final byte byteArray[]) { |
| 32 | bb.writeBytes(byteArray); |
| 33 | } |
| 34 | |
| 35 | public static List<OFPhysicalPort> readPhysicalPortList(final ChannelBuffer bb, |
| 36 | final int i) { |
| 37 | // TODO Auto-generated method stub |
| 38 | return null; |
| 39 | } |
| 40 | |
| 41 | public static List<OFInstruction> readInstructionsList(final ChannelBuffer bb, |
| 42 | final int i) { |
| 43 | // TODO Auto-generated method stub |
| 44 | return null; |
| 45 | } |
| 46 | |
| 47 | public static Match readOFMatch(final ChannelBuffer bb) { |
| 48 | // TODO Auto-generated method stub |
| 49 | return null; |
| 50 | } |
| 51 | |
| 52 | public static OFFlowModCmd readOFFlowModCmd(final ChannelBuffer bb) { |
| 53 | // TODO Auto-generated method stub |
| 54 | return null; |
| 55 | } |
| 56 | |
| 57 | public static List<OFAction> readActionsList(final ChannelBuffer bb, final int i) { |
| 58 | // TODO Auto-generated method stub |
| 59 | return null; |
| 60 | } |
| 61 | |
| 62 | public static List<OFBsnInterface> readBsnInterfaceList(final ChannelBuffer bb) { |
| 63 | // TODO Auto-generated method stub |
| 64 | return null; |
| 65 | } |
| 66 | |
| 67 | public static OFPhysicalPort readPhysicalPort(final ChannelBuffer bb) { |
| 68 | // TODO Auto-generated method stub |
| 69 | return null; |
| 70 | } |
| 71 | |
| 72 | public static List<OFPacketQueue> readPacketQueueList(final ChannelBuffer bb, |
| 73 | final int i) { |
| 74 | // TODO Auto-generated method stub |
| 75 | return null; |
| 76 | } |
| 77 | |
| 78 | public static List<OFHelloElement> readHelloElementList(final ChannelBuffer bb) { |
| 79 | // TODO Auto-generated method stub |
| 80 | return null; |
| 81 | } |
| 82 | |
| 83 | public static List<OFBucket> readBucketList(final ChannelBuffer bb, final int i) { |
| 84 | // TODO Auto-generated method stub |
| 85 | return null; |
| 86 | } |
| 87 | |
| 88 | public static List<OFMeterBand> readMeterBandList(final ChannelBuffer bb) { |
| 89 | // TODO Auto-generated method stub |
| 90 | return null; |
| 91 | } |
| 92 | |
| 93 | } |