blob: e8eeebdecb813e549ae9d7a59a77b1c332821ab7 [file] [log] [blame]
Andreas Wundsam40e14f72013-05-06 14:49:08 -07001package org.openflow.util;
2
3import java.util.List;
4
5import org.jboss.netty.buffer.ChannelBuffer;
6import org.openflow.protocol.actions.OFAction;
7import org.openflow.protocol.instructions.OFInstruction;
8import org.openflow.protocol.match.Match;
9import org.openflow.types.OFBsnInterface;
10import org.openflow.types.OFBucket;
11import org.openflow.types.OFFlowModCmd;
12import org.openflow.types.OFHelloElement;
13import org.openflow.types.OFMeterBand;
14import org.openflow.types.OFPacketQueue;
15import org.openflow.types.OFPhysicalPort;
16
17/**
18 * Collection of helper functions for reading and writing into ChannelBuffers
19 *
20 * @author capveg
21 */
22
23public 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}