blob: 4a7557f70ebee32cad642f6fc2005551cb14bc88 [file] [log] [blame]
Andreas Wundsam40e14f72013-05-06 14:49:08 -07001package org.openflow.protocol;
2
Andreas Wundsam27303462013-07-16 12:52:35 -07003import org.jboss.netty.buffer.ChannelBuffer;
4
Andreas Wundsam40e14f72013-05-06 14:49:08 -07005/**
6 * Base interface of all OpenFlow objects (e.g., messages, actions, stats, etc.)
7 *
8 * All objects have a length and can be read and written from a buffer.
9 * When writing, the length field is dynamically updated, so it need not be
10 * managed manually. However, you can override the auto calculated length with
11 * overrideLength() call, if, for example, you want to intentionally create
12 * malformed packets, for example, for negative testing.
13 */
14
Andreas Wundsam40e14f72013-05-06 14:49:08 -070015
16public interface OFObject {
Andreas Wundsam27303462013-07-16 12:52:35 -070017 void writeTo(ChannelBuffer bb);
18 int getLength();
Andreas Wundsam40e14f72013-05-06 14:49:08 -070019}